Commit graph

302 commits

Author SHA1 Message Date
Ingo Molnar 589ee62844 sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h>
Update code that relied on sched.h including various MM types for them.

This will allow us to remove the <linux/mm_types.h> include from <linux/sched.h>.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:37 +01:00
Ingo Molnar 68db0cf106 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h>
We are going to split <linux/sched/task_stack.h> out of <linux/sched.h>, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder <linux/sched/task_stack.h> file that just
maps to <linux/sched.h> to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:36 +01:00
Ingo Molnar 299300258d sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task.h>
We are going to split <linux/sched/task.h> out of <linux/sched.h>, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder <linux/sched/task.h> file that just
maps to <linux/sched.h> to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:35 +01:00
Ingo Molnar b17b01533b sched/headers: Prepare for new header dependencies before moving code to <linux/sched/debug.h>
We are going to split <linux/sched/debug.h> out of <linux/sched.h>, which
will have to be picked up from other headers and a couple of .c files.

Create a trivial placeholder <linux/sched/debug.h> file that just
maps to <linux/sched.h> to make this patch obviously correct and
bisectable.

Include the new header in the files that are going to need it.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:34 +01:00
Ingo Molnar 174cd4b1e5 sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>
Fix up affected files that include this signal functionality via sched.h.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-03-02 08:42:32 +01:00
Linus Torvalds 7c0f6ba682 Replace <asm/uaccess.h> with <linux/uaccess.h> globally
This was entirely automated, using the script by Al:

  PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>'
  sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \
        $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-12-24 11:46:01 -08:00
Andrea Gelmini 46813ddcce Fix typo
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2016-09-23 15:42:05 +02:00
Andrea Gelmini 8d59dc11be Fix typo
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2016-09-23 15:42:03 +02:00
Niklas Cassel 0e1847c4b1 cris: v10: axisflashmap: remove unused ifdefs
The Kconfig CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE
does not exist for crisv10, so remove it.

Signed-off-by: Niklas Cassel <niklas.cassel@axis.com>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2016-09-23 15:27:57 +02:00
Ben Hutchings ef158bdf83 mtd: Remove unused symbol CONFIG_MTDRAM_ABS_POS
This has been unused, except as the condition for a fatal error, since
commit c13cbf3b50 ("[MTD] mtdram: Quick cleanup of the driver:") in
2.6.13 (!).

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2016-07-09 17:38:05 -07:00
Jiri Slaby 5f56a5dfdb exit_thread: remove empty bodies
Define HAVE_EXIT_THREAD for archs which want to do something in
exit_thread. For others, let's define exit_thread as an empty inline.

This is a cleanup before we change the prototype of exit_thread to
accept a task parameter.

[akpm@linux-foundation.org: fix mips]
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Howells <dhowells@redhat.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Ley Foon Tan <lftan@altera.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Rich Felker <dalias@libc.org>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-05-20 17:58:30 -07:00
Adam Buchbinder 014b38ec69 cris: Fix misspellings in comments.
Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-04-18 12:45:53 +02:00
Guenter Roeck f9f3f864b5 cris: Fix section mismatches in architecture startup code
Section mismatches can now result in build failures.
As result, cris:allnoconfig fails to build as follows.

WARNING: modpost: Found 7 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
FATAL: modpost: Section mismatches detected.
Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.

Part of the problem is that references from .text to .init.text
are not permitted, and such references are used in cris startup code.
Since references from .head.text to .init.text are permitted, move
cris startup code to a new section .head.text.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2015-12-15 14:03:19 +01:00
Guenter Roeck 56edefc98a cris: debugport: Fix section mismatches
Section mismatches can now cause build failures, such as for
cris:allnoconfig. Rename affected variables to end with _console
to make section mismatch checks happy.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2015-12-15 14:03:11 +01:00
Jesper Nilsson e301a08be4 CRIS: Drop code related to obsolete or unused kconfigs
Drop all code related to Kconfigs that don't exist.
Fix one Kconfig where it was actually typo:ed (ETRAX_KGB_PORT2)
Drop content related to CRIS v32 SoCs from etraxgpio.h headerfile,
all use of GPIO for both ETRAX FS and ARTPEC-3 should now be through
standard gpiolib instead.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2015-11-02 20:03:05 +01:00
Chen Gang c33fe44443 cris: arch-v10: kgdb: Add '__used' for static variable is_dyn_brkp
Within one C file, current gcc can optimize the global static variables
according to the C code, but it will skip assembly code -- it will pass
them to gas directly.

if the static variable is used between C code and assembly code in one C
file (e.g. is_dyn_brkp in kgdb.c), it needs '__used' to let gcc know it
should be still used, or gcc may remove it for optimization.

The related error in this case:

    LD      init/built-in.o
  arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
  (.text+0x2aca): undefined reference to `is_dyn_brkp'
  arch/cris/arch-v10/kernel/built-in.o: In function `is_static':
  kgdb.c:(.text+0x2ada): undefined reference to `is_dyn_brkp'

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2015-11-02 20:03:04 +01:00
Chen Gang 8f40dcebef cris: arch-v10: kgdb: Use BAR instead of DTP0 for register P12
For arch-v10, there is no DTP0 register, and at present, assembler know
BAR, so use BAR instead of DTP0, the related error (with allmodconfig):

    CC      arch/cris/arch-v10/kernel/kgdb.o
  {standard input}: Assembler messages:
  {standard input}:6: Error: Illegal operands
  {standard input}:6: Error: Illegal operands

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Acked-by: Hans-Peter Nilsson <hp@axis.com>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2015-11-02 20:03:04 +01:00
Andy Shevchenko 4d0d39758d cris: kgdb: use native hex2bin
There are kernel native helpers to convert hex ascii to the binary format:
hex_to_bin() and hex2bin(). Thus, no need to reimplement them customly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2015-11-02 20:03:04 +01:00
Rabin Vincent 254a0f4135 CRISv10: delete unused lib/dmacopy.c
This file is never built.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2015-09-05 00:56:51 +02:00
Rabin Vincent c2ffc68afc CRISv10: delete unused lib/old_checksum.c
This file is never built.

Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2015-09-05 00:56:51 +02:00
Chen Gang ee59843cd2 CRIS: Wire up missing syscalls
The related warnings:

    CALL    scripts/checksyscalls.sh
  <stdin>:1229:2: warning: #warning syscall sched_setattr not implemented [-Wcpp]
  <stdin>:1232:2: warning: #warning syscall sched_getattr not implemented [-Wcpp]
  <stdin>:1235:2: warning: #warning syscall renameat2 not implemented [-Wcpp]
  <stdin>:1238:2: warning: #warning syscall seccomp not implemented [-Wcpp]
  <stdin>:1241:2: warning: #warning syscall getrandom not implemented [-Wcpp]
  <stdin>:1244:2: warning: #warning syscall memfd_create not implemented [-Wcpp]
  <stdin>:1247:2: warning: #warning syscall bpf not implemented [-Wcpp]
  <stdin>:1250:2: warning: #warning syscall execveat not implemented [-Wcpp]

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2015-09-05 00:33:25 +02:00
Paul Gortmaker 84c3e5bf1d cris: don't use module_init for non-modular core eeprom.c code
The eeprom.c code is compiled based on the Kconfig setting
ETRAX_I2C_EEPROM, which is bool.  So the code is either built in
or absent.  It will never be modular, so using module_init as an
alias for __initcall is rather misleading.

Fix this up now, so that we can relocate module_init from
init.h into module.h in the future.  If we don't do this, we'd
have to add module.h to obviously non-modular code, and that
would be a worse thing.

Direct use of __initcall is discouraged, vs prioritized ones.
Use of device_initcall is consistent with what __initcall
maps onto, and hence does not change the init order, making the
impact of this change zero.   Should someone with real hardware
for boot testing want to change it later to arch_initcall or
something different, they can do that at a later date.

Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2015-06-16 14:12:31 -04:00
Linus Torvalds eea3a00264 Merge branch 'akpm' (patches from Andrew)
Merge second patchbomb from Andrew Morton:

 - the rest of MM

 - various misc bits

 - add ability to run /sbin/reboot at reboot time

 - printk/vsprintf changes

 - fiddle with seq_printf() return value

* akpm: (114 commits)
  parisc: remove use of seq_printf return value
  lru_cache: remove use of seq_printf return value
  tracing: remove use of seq_printf return value
  cgroup: remove use of seq_printf return value
  proc: remove use of seq_printf return value
  s390: remove use of seq_printf return value
  cris fasttimer: remove use of seq_printf return value
  cris: remove use of seq_printf return value
  openrisc: remove use of seq_printf return value
  ARM: plat-pxa: remove use of seq_printf return value
  nios2: cpuinfo: remove use of seq_printf return value
  microblaze: mb: remove use of seq_printf return value
  ipc: remove use of seq_printf return value
  rtc: remove use of seq_printf return value
  power: wakeup: remove use of seq_printf return value
  x86: mtrr: if: remove use of seq_printf return value
  linux/bitmap.h: improve BITMAP_{LAST,FIRST}_WORD_MASK
  MAINTAINERS: CREDITS: remove Stefano Brivio from B43
  .mailmap: add Ricardo Ribalda
  CREDITS: add Ricardo Ribalda Delgado
  ...
2015-04-15 16:39:15 -07:00
Joe Perches dc640a8813 cris fasttimer: remove use of seq_printf return value
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c03 ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Miscellanea:

o Coalesce formats, realign arguments

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-15 16:35:25 -07:00
Joe Perches 1336d4221d cris: remove use of seq_printf return value
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c03 ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-15 16:35:25 -07:00
Richard Weinberger fa41b1c7df arch: Remove exec_domain from remaining archs
Signed-off-by: Richard Weinberger <richard@nod.at>
2015-04-12 21:03:30 +02:00
Andy Lutomirski f56141e3e2 all arches, signal: move restart_block to struct task_struct
If an attacker can cause a controlled kernel stack overflow, overwriting
the restart block is a very juicy exploit target.  This is because the
restart_block is held in the same memory allocation as the kernel stack.

Moving the restart block to struct task_struct prevents this exploit by
making the restart_block harder to locate.

Note that there are other fields in thread_info that are also easy
targets, at least on some architectures.

It's also a decent simplification, since the restart code is more or less
identical on all architectures.

[james.hogan@imgtec.com: metag: align thread_info::supervisor_stack]
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kees Cook <keescook@chromium.org>
Cc: David Miller <davem@davemloft.net>
Acked-by: Richard Weinberger <richard@nod.at>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Steven Miao <realmz6@gmail.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Chen Liqin <liqin.linux@gmail.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-02-12 18:54:12 -08:00
Jesper Nilsson dbd3c7e1bf CRIS: Export missing function symbols
strcmp was lost when all other string functions were removed,
but we still have an optimized version for this on CRISv32,
so any driver built as a module would not have access to this symbol.

In a similar manner, we had optimized versions of
csum_partial_copy_from_user and __do_clear_user
but no exported symbols for them, breaking bunch of other drivers
when built as a module.

At the same time, move EXPORT_SYMBOL(__copy_user) and
EXPORT_SYMBOL(__copy_user_zeroing) C-files so it's
located together with the function definition.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2014-12-20 00:03:22 +01:00
Kirill Tkhai f139caf2e8 sched, cleanup, treewide: Remove set_current_state(TASK_RUNNING) after schedule()
schedule(), io_schedule() and schedule_timeout() always return
with TASK_RUNNING state set, so one more setting is unnecessary.

(All places in patch are visible good, only exception is
 kiblnd_scheduler() from:

      drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c

 Its schedule() is one line above standard 3 lines of unified diff)

No places where set_current_state() is used for mb().

Signed-off-by: Kirill Tkhai <ktkhai@parallels.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1410529254.3569.23.camel@tkhai
Cc: Alasdair Kergon <agk@redhat.com>
Cc: Anil Belur <askb23@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Kleikamp <shaggy@kernel.org>
Cc: David Airlie <airlied@linux.ie>
Cc: David Howells <dhowells@redhat.com>
Cc: Dmitry Eremin <dmitry.eremin@intel.com>
Cc: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Isaac Huang <he.huang@intel.com>
Cc: James E.J. Bottomley <JBottomley@parallels.com>
Cc: James E.J. Bottomley <jejb@parisc-linux.org>
Cc: J. Bruce Fields <bfields@fieldses.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Laura Abbott <lauraa@codeaurora.org>
Cc: Liang Zhen <liang.zhen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Masaru Nomura <massa.nomura@gmail.com>
Cc: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Oleg Drokin <green@linuxhacker.ru>
Cc: Peng Tao <bergwolf@gmail.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: Robert Love <robert.w.love@intel.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: Ursula Braun <ursula.braun@de.ibm.com>
Cc: Zi Shen Lim <zlim.lnx@gmail.com>
Cc: devel@driverdev.osuosl.org
Cc: dm-devel@redhat.com
Cc: dri-devel@lists.freedesktop.org
Cc: fcoe-devel@open-fcoe.org
Cc: jfs-discussion@lists.sourceforge.net
Cc: linux390@de.ibm.com
Cc: linux-afs@lists.infradead.org
Cc: linux-cris-kernel@axis.com
Cc: linux-kernel@vger.kernel.org
Cc: linux-nfs@vger.kernel.org
Cc: linux-parisc@vger.kernel.org
Cc: linux-raid@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linux-scsi@vger.kernel.org
Cc: qla2xxx-upstream@qlogic.com
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: user-mode-linux-user@lists.sourceforge.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2014-09-19 12:35:17 +02:00
Richard Weinberger 8215ade82d cris: Use sigsp()
Use sigsp() instead of the open coded variant.

Signed-off-by: Richard Weinberger <richard@nod.at>
2014-08-06 13:04:07 +02:00
Richard Weinberger fa0197722e cris: Use get_signal() signal_setup_done()
Use the more generic functions get_signal() signal_setup_done()
for signal delivery.

Signed-off-by: Richard Weinberger <richard@nod.at>
2014-08-06 13:02:13 +02:00
Geert Uytterhoeven 835eeeed73 cris: update comments for generic idle conversion
As of commit 8dc7c5ecd8 ("cris: Use generic idle loop"), cris no
longer provides cpu_idle().

- On cris-v10, etrax_gpio_wake_up_check() is called from default_idle()
  instead of cpu_idle(),

- On cris-v32, etrax_gpio_wake_up_check() is not called from
  default_idle(), so remove this (copy-and-paste?) part.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-06-06 16:08:18 -07:00
Jesper Nilsson cd065a010a CRISv10: Readd missing header
The svinto architecture header was mistakenly removed,
leading to a compile error.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2014-01-28 15:14:35 +01:00
Jesper Nilsson e269a86941 Drop code for CRISv10 CPU simulator
That simulator is dead and redundant.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2014-01-15 14:44:02 +01:00
Jesper Nilsson e7672be573 Cleanup whitespace, remove old author tag
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2014-01-09 17:18:51 +01:00
Jesper Nilsson bb1d2a9453 CRIS: Add missing syscalls
Complete list of syscalls for CRISv10 and CRISv32.
Clean up some whitespace at the same time.

Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2014-01-09 12:48:17 +01:00
Arnd Bergmann 329fddd7b6 cris: sync_serial: remove interruptible_sleep_on
sleep_on and its variants are racy and going away. This replaces
the two uses in the cris sync_serial drivers with the equivalent
but race-free wait_event_interruptible.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mikael Starvik <starvik@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2014-01-09 10:50:50 +01:00
Michael Opdenacker 64d8ad933d cris: remove deprecated IRQF_DISABLED
This patch proposes to remove the IRQF_DISABLED flag from CRIS
architecture code. It's a NOOP since 2.6.35 and it will be removed
one day.

Comments mentioning IRQF_DISABLED are also updated, knowing
that all interrupts are now "fast interrupts", their handlers
running with interrupts disabled.

Don't hesitate to let me know if you have other ways of
rephrasing the comments!

This is an update for 3.11 of a patch already sent for 3.10

Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2014-01-08 16:10:18 +01:00
Paul Bolle be8cb7f42a CRIS: drop unused Kconfig symbols
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
2013-09-10 17:38:07 +02:00
Paul Bolle 569fa26319 CRIS: Remove last traces of legacy RTC drivers
These legacy drivers were removed in commit
9c75fc8c5c ("CRIS: Remove legacy RTC
drivers"). Now remove their last traces in two Kconfig files and one
Makefile.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Jesper Nilsson <jespern@axis.com>
2013-09-10 17:28:19 +02:00
Linus Torvalds 496322bc91 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking updates from David Miller:
 "This is a re-do of the net-next pull request for the current merge
  window.  The only difference from the one I made the other day is that
  this has Eliezer's interface renames and the timeout handling changes
  made based upon your feedback, as well as a few bug fixes that have
  trickeled in.

  Highlights:

   1) Low latency device polling, eliminating the cost of interrupt
      handling and context switches.  Allows direct polling of a network
      device from socket operations, such as recvmsg() and poll().

      Currently ixgbe, mlx4, and bnx2x support this feature.

      Full high level description, performance numbers, and design in
      commit 0a4db187a9 ("Merge branch 'll_poll'")

      From Eliezer Tamir.

   2) With the routing cache removed, ip_check_mc_rcu() gets exercised
      more than ever before in the case where we have lots of multicast
      addresses.  Use a hash table instead of a simple linked list, from
      Eric Dumazet.

   3) Add driver for Atheros CQA98xx 802.11ac wireless devices, from
      Bartosz Markowski, Janusz Dziedzic, Kalle Valo, Marek Kwaczynski,
      Marek Puzyniak, Michal Kazior, and Sujith Manoharan.

   4) Support reporting the TUN device persist flag to userspace, from
      Pavel Emelyanov.

   5) Allow controlling network device VF link state using netlink, from
      Rony Efraim.

   6) Support GRE tunneling in openvswitch, from Pravin B Shelar.

   7) Adjust SOCK_MIN_RCVBUF and SOCK_MIN_SNDBUF for modern times, from
      Daniel Borkmann and Eric Dumazet.

   8) Allow controlling of TCP quickack behavior on a per-route basis,
      from Cong Wang.

   9) Several bug fixes and improvements to vxlan from Stephen
      Hemminger, Pravin B Shelar, and Mike Rapoport.  In particular,
      support receiving on multiple UDP ports.

  10) Major cleanups, particular in the area of debugging and cookie
      lifetime handline, to the SCTP protocol code.  From Daniel
      Borkmann.

  11) Allow packets to cross network namespaces when traversing tunnel
      devices.  From Nicolas Dichtel.

  12) Allow monitoring netlink traffic via AF_PACKET sockets, in a
      manner akin to how we monitor real network traffic via ptype_all.
      From Daniel Borkmann.

  13) Several bug fixes and improvements for the new alx device driver,
      from Johannes Berg.

  14) Fix scalability issues in the netem packet scheduler's time queue,
      by using an rbtree.  From Eric Dumazet.

  15) Several bug fixes in TCP loss recovery handling, from Yuchung
      Cheng.

  16) Add support for GSO segmentation of MPLS packets, from Simon
      Horman.

  17) Make network notifiers have a real data type for the opaque
      pointer that's passed into them.  Use this to properly handle
      network device flag changes in arp_netdev_event().  From Jiri
      Pirko and Timo Teräs.

  18) Convert several drivers over to module_pci_driver(), from Peter
      Huewe.

  19) tcp_fixup_rcvbuf() can loop 500 times over loopback, just use a
      O(1) calculation instead.  From Eric Dumazet.

  20) Support setting of explicit tunnel peer addresses in ipv6, just
      like ipv4.  From Nicolas Dichtel.

  21) Protect x86 BPF JIT against spraying attacks, from Eric Dumazet.

  22) Prevent a single high rate flow from overruning an individual cpu
      during RX packet processing via selective flow shedding.  From
      Willem de Bruijn.

  23) Don't use spinlocks in TCP md5 signing fast paths, from Eric
      Dumazet.

  24) Don't just drop GSO packets which are above the TBF scheduler's
      burst limit, chop them up so they are in-bounds instead.  Also
      from Eric Dumazet.

  25) VLAN offloads are missed when configured on top of a bridge, fix
      from Vlad Yasevich.

  26) Support IPV6 in ping sockets.  From Lorenzo Colitti.

  27) Receive flow steering targets should be updated at poll() time
      too, from David Majnemer.

  28) Fix several corner case regressions in PMTU/redirect handling due
      to the routing cache removal, from Timo Teräs.

  29) We have to be mindful of ipv4 mapped ipv6 sockets in
      upd_v6_push_pending_frames().  From Hannes Frederic Sowa.

  30) Fix L2TP sequence number handling bugs, from James Chapman."

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1214 commits)
  drivers/net: caif: fix wrong rtnl_is_locked() usage
  drivers/net: enic: release rtnl_lock on error-path
  vhost-net: fix use-after-free in vhost_net_flush
  net: mv643xx_eth: do not use port number as platform device id
  net: sctp: confirm route during forward progress
  virtio_net: fix race in RX VQ processing
  virtio: support unlocked queue poll
  net/cadence/macb: fix bug/typo in extracting gem_irq_read_clear bit
  Documentation: Fix references to defunct linux-net@vger.kernel.org
  net/fs: change busy poll time accounting
  net: rename low latency sockets functions to busy poll
  bridge: fix some kernel warning in multicast timer
  sfc: Fix memory leak when discarding scattered packets
  sit: fix tunnel update via netlink
  dt:net:stmmac: Add dt specific phy reset callback support.
  dt:net:stmmac: Add support to dwmac version 3.610 and 3.710
  dt:net:stmmac: Allocate platform data only if its NULL.
  net:stmmac: fix memleak in the open method
  ipv6: rt6_check_neigh should successfully verify neigh if no NUD information are available
  net: ipv6: fix wrong ping_v6_sendmsg return value
  ...
2013-07-09 18:24:39 -07:00
Ben Hutchings 2206209e75 net: Add missing dependencies on NETDEVICES
ETRAX_ETHERNET selects ETHERNET and MII, which depend on NETDEVICES.
I don't think anything should select NETDEVICES, so make it a
dependency.  It also doesn't need to select or depend on ETHERNET,
which has nothing to do with the Ethernet library functions.

BPCTL selects MII, which depends on NETDEVICES.  But everything in the
drivers/staging/silicom directory is related to net devices, so make
NET_VENDOR_SILICOM depend on NETDEVICES and remove the now-redundant
dependencies on NET.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-19 22:22:56 -07:00
Ben Hutchings a1606c7dc6 net: Move MII out from under NET_CORE and hide it
All drivers that select MII also need to select NET_CORE because MII
depends on it.  This is a bit ridiculous because NET_CORE is just a
menu option that doesn't enable any code by itself.

There is also no need for it to be a visible option, since its users
all select it.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-19 22:22:56 -07:00
Geert Uytterhoeven 6a89a9dba2 cris/kgdb: Remove sections protected by #ifdef PROCESS_SUPPORT
When enabled, it doesn't build anyway:

arch/cris/arch-v10/kernel/kgdb.c: In function 'copy_registers_from_stack':
arch/cris/arch-v10/kernel/kgdb.c:631:2: error: unknown type name 'stack_registers'
arch/cris/arch-v10/kernel/kgdb.c:631:24: error: 'stack_registers' undeclared (first use in this function)
arch/cris/arch-v10/kernel/kgdb.c:631:24: note: each undeclared identifier is reported only once for each function it appears in
arch/cris/arch-v10/kernel/kgdb.c:631:41: error: expected expression before ')' token
arch/cris/arch-v10/kernel/kgdb.c:635:11: error: request for member 'r' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:636:29: error: 'stack_list' undeclared (first use in this function)
arch/cris/arch-v10/kernel/kgdb.c:637:16: error: request for member 'pc' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:638:18: error: request for member 'dccr' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:639:17: error: request for member 'srp' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c: In function 'copy_registers_to_stack':
arch/cris/arch-v10/kernel/kgdb.c:648:2: error: unknown type name 'stack_registers'
arch/cris/arch-v10/kernel/kgdb.c:648:24: error: 'stack_registers' undeclared (first use in this function)
arch/cris/arch-v10/kernel/kgdb.c:648:41: error: expected expression before ')' token
arch/cris/arch-v10/kernel/kgdb.c:652:4: error: request for member 'r' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:654:3: error: request for member 'pc' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:655:3: error: request for member 'dccr' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:656:3: error: request for member 'srp' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c: In function 'write_stack_register':
arch/cris/arch-v10/kernel/kgdb.c:702:2: error: unknown type name 'stack_registers'
arch/cris/arch-v10/kernel/kgdb.c:702:24: error: 'stack_registers' undeclared (first use in this function)
arch/cris/arch-v10/kernel/kgdb.c:702:41: error: expected expression before ')' token
arch/cris/arch-v10/kernel/kgdb.c:707:4: error: request for member 'r' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:710:3: error: 'stack_list' undeclared (first use in this function)
arch/cris/arch-v10/kernel/kgdb.c:713:4: error: request for member 'pc' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:716:4: error: request for member 'srp' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c:719:4: error: request for member 'dccr' in something not a structure or union
arch/cris/arch-v10/kernel/kgdb.c: In function 'stub_is_stopped':
arch/cris/arch-v10/kernel/kgdb.c:827:36: error: 'pos' undeclared (first use in this function)
arch/cris/arch-v10/kernel/kgdb.c: In function 'handle_exception':
arch/cris/arch-v10/kernel/kgdb.c:1064:40: error: 'number_of_tasks' undeclared (first use in this function)
arch/cris/arch-v10/kernel/kgdb.c:1125:8: error: implicit declaration of function 'os_is_started' [-Werror=implicit-function-declaration]

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16 13:47:36 +02:00
Geert Uytterhoeven de666cf0a6 cris/kgdb: Fix buffer overflow in getpacket()
arch/cris/arch-v10/kernel/kgdb.c: In function 'handle_exception':
arch/cris/arch-v10/kernel/kgdb.c:534:17: warning: array subscript is above array bounds [-Warray-bounds]

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16 13:47:34 +02:00
Geert Uytterhoeven e42e3980ad cris/kgdb: Remove obsolete USED*() macros
handle_exception and internal_stack are now global

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16 13:47:33 +02:00
Geert Uytterhoeven 6408ac4997 cris/kgdb: Make symbols used from asm global
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c3e): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c48): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c50): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c58): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_breakpoint':
(.text+0x2c60): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o:(.text+0x2c68): more undefined references to `reg' follow
arch/cris/arch-v10/kernel/built-in.o: In function `is_static':
kgdb.c:(.text+0x2d46): undefined reference to `internal_stack'
kgdb.c:(.text+0x2d4e): undefined reference to `handle_exception'
kgdb.c:(.text+0x2d54): undefined reference to `reg'
kgdb.c:(.text+0x2d5c): undefined reference to `reg'
kgdb.c:(.text+0x2d64): undefined reference to `reg'
kgdb.c:(.text+0x2d6c): undefined reference to `reg'
kgdb.c:(.text+0x2d74): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o:kgdb.c:(.text+0x2d7c): more undefined references to `reg' follow
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_serial':
(.text+0x2ef6): undefined reference to `internal_stack'
arch/cris/arch-v10/kernel/built-in.o: In function `kgdb_handle_serial':
(.text+0x2efe): undefined reference to `handle_exception'
arch/cris/arch-v10/kernel/built-in.o: In function `goback':
kgdb.c:(.text+0x2f04): undefined reference to `reg'
kgdb.c:(.text+0x2f0c): undefined reference to `reg'
kgdb.c:(.text+0x2f14): undefined reference to `reg'
kgdb.c:(.text+0x2f1c): undefined reference to `reg'
kgdb.c:(.text+0x2f24): undefined reference to `reg'
arch/cris/arch-v10/kernel/built-in.o:kgdb.c:(.text+0x2f2c): more undefined references to `reg' follow

Make reg, internal_stack, and handle_exception global to fix this.
Rename reg to cris_reg as it's a too generic name for a global symbol.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16 13:47:24 +02:00
Geert Uytterhoeven d6c97e1ccb cris/kgdb: Use #ifdef PROCESS_SUPPORT where needed
arch/cris/arch-v10/kernel/kgdb.c:354:12: warning: 'current_thread_c' defined but not used [-Wunused-variable]
arch/cris/arch-v10/kernel/kgdb.c:355:12: warning: 'current_thread_g' defined but not used [-Wunused-variable]
arch/cris/arch-v10/kernel/kgdb.c:359:18: warning: 'reg_g' defined but not used [-Wunused-variable]
arch/cris/arch-v10/kernel/kgdb.c:622:1: warning: 'copy_registers' defined but not used [-Wunused-function]

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16 13:47:23 +02:00
Geert Uytterhoeven 4bf01dda08 cris/kgdb: Kill forward declarations for static functions
Move some functions around and kill forward declarations for static
functions. This fixes:

arch/cris/arch-v10/kernel/kgdb.c:255:13: warning: 'copy_registers_from_stack' declared 'static' but never defined [-Wunused-function]
arch/cris/arch-v10/kernel/kgdb.c:259:13: warning: 'copy_registers_to_stack' declared 'static' but never defined [-Wunused-function]
arch/cris/arch-v10/kernel/kgdb.c:267:12: warning: 'write_stack_register' declared 'static' but never defined [-Wunused-function]

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16 13:47:22 +02:00
Geert Uytterhoeven 4bb77a9dfa cris/kgdb: Remove unused static int do_printk
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
2013-06-16 13:47:20 +02:00