dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

69743 Commits

Author SHA1 Message Date
Al Viro f2ccfb3e56 score: ->restart_block.fn needs to be reset on rt_sigreturn
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:39 -04:00
Al Viro 58e4257bc6 microblaze: ->restart_block.fn needs to be reset on rt_sigreturn
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:39 -04:00
Al Viro ef9b122f32 hexagon: ->restart_block.fn needs to be reset on rt_sigreturn
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:38 -04:00
Al Viro 2a3fdc117c c6x: ->restart_block.fn needs to be reset on rt_sigreturn
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:38 -04:00
Al Viro 85a847ffad parisc: resetting ->restart_block.fn needs to be done on rt_sigreturn()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:38 -04:00
Matt Fleming 43a3599556 m68k: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:37 -04:00
Oleg Nesterov 3334bf1248 hexagon: do_notify_resume() needs tracehook_notify_resume()
arch/hexagon/kernel/signal.c:do_notify_resume() forgets to call
tracehook_notify_resume() if TIF_NOTIFY_RESUME is set.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Richard Kuo <rkuo@codeaurora.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alexander Gordeev <agordeev@redhat.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Smith <dsmith@redhat.com>
Cc: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Larry Woodman <lwoodman@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:37 -04:00
Matt Fleming 54bbf3e3a9 avr32: use block_sigmask()
Use the new helper function introduced in commit 5e6292c0f2 ("signal:
add block_sigmask() for adding sigmask to current->blocked") which
centralises the code for updating current->blocked after successfully
delivering a signal and reduces the amount of duplicate code across
architectures.

In the past some architectures got this code wrong, so using this helper
function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: Havard Skinnemoen <hskinnemoen@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:37 -04:00
Oleg Nesterov 49209590cb avr32: use set_current_blocked() in handle_signal/sys_rt_sigreturn
It is wrong to change ->blocked directly, see e6fa16ab.  Change
handle_signal() and sys_rt_sigreturn() to use the right helper,
set_current_blocked().

Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com>
Reviewed-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:36 -04:00
Matt Fleming e1b1fd79a0 avr32: don't mask signals in the error path
The current handle_signal() implementation is broken - it will mask
signals if we fail to setup the signal stack frame, which isn't the
desired behaviour, we should only be masking signals if we succeed in
setting up the stack frame.  It looks like this code was copied from the
old (broken) arm implementation but wasn't updated when the arm code was
fixed in commit a6c61e9dfd ("[ARM] 3168/1: Update ARM signal delivery
and masking").

Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:36 -04:00
Matt Fleming 3883e301bf m32r: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:36 -04:00
Matt Fleming 00f35785fa mn10300: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:35 -04:00
Matt Fleming f3b5e82273 cris: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Mikael Starvik <starvik@axis.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:35 -04:00
Matt Fleming 7a076e4ff0 ia64: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:34 -04:00
Matt Fleming 60c597513e microblaze: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:34 -04:00
Matt Fleming bcb8c8d0b7 microblaze: fix signal masking
There are a couple of problems with the current signal code,

1. If we failed to setup the signal stack frame then we should not be
   masking any signals.

2. ka->sa.sa_mask is only added to the current blocked signals list if
   SA_NODEFER is set in ka->sa.sa_flags.  If we successfully setup the
   signal frame and are going to run the handler then we must honour
   sa_mask.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:34 -04:00
Matt Fleming a12c3694ae microblaze: no need to reset handler if SA_ONESHOT
get_signal_to_deliver() already resets the signal handler if SA_ONESHOT is
set in ka->sa.sa_flags, there's no need to do it again in handle_signal().
 Furthermore, because we were modifying ka->sa.sa_handler (which is a copy
of sighand->action[]) instead of sighand->action[] the original code
actually had no effect on signal delivery.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:33 -04:00
Matt Fleming de8f2ddd69 microblaze: don't reimplement force_sigsegv()
Instead of open coding the sequence from force_sigsegv() just call it.
This also fixes a bug because we were modifying ka->sa.sa_handler (which
is a copy of sighand->action[]), whereas the intention of the code was to
modify sighand->action[] directly.

As the original code was working with a copy it had no effect on signal
delivery.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:33 -04:00
Matt Fleming 4c3181bd3b score: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:33 -04:00
Matt Fleming 80c1dfa91c score: don't mask signals if we fail to setup signal stack
If setup_rt_frame() returns -EFAULT then we must not block any signals
in the current process.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:32 -04:00
Matt Fleming 97c47bb707 h8300: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:32 -04:00
Matt Fleming 9ae3679602 unicore32: use block_sigmask()
Use the new helper function introduced in commit 5e6292c0f2 ("signal:
add block_sigmask() for adding sigmask to current->blocked") which
centralises the code for updating current->blocked after successfully
delivering a signal and reduces the amount of duplicate code across
architectures.  In the past some architectures got this code wrong, so
using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:32 -04:00
Matt Fleming 8e3f9f65cb blackfin: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:31 -04:00
Matt Fleming 7ebe0c5d72 frv: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:31 -04:00
Matt Fleming ade7728b4e parisc: use set_current_blocked() and block_sigmask()
As described in e6fa16ab ("signal: sigprocmask() should do
retarget_shared_pending()") the modification of current->blocked is
incorrect as we need to check whether the signal we're about to block is
pending in the shared queue.

Also, use the new helper function introduced in commit 5e6292c0f2
("signal: add block_sigmask() for adding sigmask to current->blocked")
which centralises the code for updating current->blocked after
successfully delivering a signal and reduces the amount of duplicate code
across architectures.  In the past some architectures got this code wrong,
so using this helper function should stop that from happening again.

Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:31 -04:00
Al Viro 68f3f16d9a new helper: sigsuspend()
guts of saved_sigmask-based sigsuspend/rt_sigsuspend.  Takes
kernel sigset_t *.

Open-coded instances replaced with calling it.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 23:52:30 -04:00
Linus Torvalds 471368557a Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core irq changes from Ingo Molnar:
 "A collection of small fixes."

By Thomas Gleixner
* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  hexagon: Remove select of not longer existing Kconfig switches
  arm: Select core options instead of redefining them
  genirq: Do not consider disabled wakeup irqs
  genirq: Allow check_wakeup_irqs to notice level-triggered interrupts
  genirq: Be more informative on irq type mismatch
  genirq: Reject bogus threaded irq requests
  genirq: Streamline irq_action
2012-05-21 20:33:19 -07:00
Linus Torvalds cb60e3e65c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull security subsystem updates from James Morris:
 "New notable features:
   - The seccomp work from Will Drewry
   - PR_{GET,SET}_NO_NEW_PRIVS from Andy Lutomirski
   - Longer security labels for Smack from Casey Schaufler
   - Additional ptrace restriction modes for Yama by Kees Cook"

Fix up trivial context conflicts in arch/x86/Kconfig and include/linux/filter.h

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (65 commits)
  apparmor: fix long path failure due to disconnected path
  apparmor: fix profile lookup for unconfined
  ima: fix filename hint to reflect script interpreter name
  KEYS: Don't check for NULL key pointer in key_validate()
  Smack: allow for significantly longer Smack labels v4
  gfp flags for security_inode_alloc()?
  Smack: recursive tramsmute
  Yama: replace capable() with ns_capable()
  TOMOYO: Accept manager programs which do not start with / .
  KEYS: Add invalidation support
  KEYS: Do LRU discard in full keyrings
  KEYS: Permit in-place link replacement in keyring list
  KEYS: Perform RCU synchronisation on keys prior to key destruction
  KEYS: Announce key type (un)registration
  KEYS: Reorganise keys Makefile
  KEYS: Move the key config into security/keys/Kconfig
  KEYS: Use the compat keyctl() syscall wrapper on Sparc64 for Sparc32 compat
  Yama: remove an unused variable
  samples/seccomp: fix dependencies on arch macros
  Yama: add additional ptrace scopes
  ...
2012-05-21 20:27:36 -07:00
Linus Torvalds bf67f3a5c4 Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull smp hotplug cleanups from Thomas Gleixner:
 "This series is merily a cleanup of code copied around in arch/* and
  not changing any of the real cpu hotplug horrors yet.  I wish I'd had
  something more substantial for 3.5, but I underestimated the lurking
  horror..."

Fix up trivial conflicts in arch/{arm,sparc,x86}/Kconfig and
arch/sparc/include/asm/thread_info_32.h

* 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (79 commits)
  um: Remove leftover declaration of alloc_task_struct_node()
  task_allocator: Use config switches instead of magic defines
  sparc: Use common threadinfo allocator
  score: Use common threadinfo allocator
  sh-use-common-threadinfo-allocator
  mn10300: Use common threadinfo allocator
  powerpc: Use common threadinfo allocator
  mips: Use common threadinfo allocator
  hexagon: Use common threadinfo allocator
  m32r: Use common threadinfo allocator
  frv: Use common threadinfo allocator
  cris: Use common threadinfo allocator
  x86: Use common threadinfo allocator
  c6x: Use common threadinfo allocator
  fork: Provide kmemcache based thread_info allocator
  tile: Use common threadinfo allocator
  fork: Provide weak arch_release_[task_struct|thread_info] functions
  fork: Move thread info gfp flags to header
  fork: Remove the weak insanity
  sh: Remove cpu_idle_wait()
  ...
2012-05-21 19:43:57 -07:00
Linus Torvalds 226da0dbc8 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RCU changes from Ingo Molnar:
 "This is the v3.5 RCU tree from Paul E.  McKenney:

 1) A set of improvements and fixes to the RCU_FAST_NO_HZ feature (with
    more on the way for 3.6).  Posted to LKML:
       https://lkml.org/lkml/2012/4/23/324 (commits 1-3 and 5),
       https://lkml.org/lkml/2012/4/16/611 (commit 4),
       https://lkml.org/lkml/2012/4/30/390 (commit 6), and
       https://lkml.org/lkml/2012/5/4/410 (commit 7, combined with
       the other commits for the convenience of the tester).

 2) Changes to make rcu_barrier() avoid disrupting execution of CPUs
    that have no RCU callbacks.  Posted to LKML:
       https://lkml.org/lkml/2012/4/23/322.

 3) A couple of commits that improve the efficiency of the interaction
    between preemptible RCU and the scheduler, these two being all that
    survived an abortive attempt to allow preemptible RCU's
    __rcu_read_lock() to be inlined.  The full set was posted to LKML at
    https://lkml.org/lkml/2012/4/14/143, and the first and third patches
    of that set remain.

 4) Lai Jiangshan's algorithmic implementation of SRCU, which includes
    call_srcu() and srcu_barrier().  A major feature of this new
    implementation is that synchronize_srcu() no longer disturbs the
    execution of other CPUs.  This work is based on earlier
    implementations by Peter Zijlstra and Paul E.  McKenney.  Posted to
    LKML: https://lkml.org/lkml/2012/2/22/82.

 5) A number of miscellaneous bug fixes and improvements which were
    posted to LKML at: https://lkml.org/lkml/2012/4/23/353 with
    subsequent updates posted to LKML."

* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (32 commits)
  rcu: Make rcu_barrier() less disruptive
  rcu: Explicitly initialize RCU_FAST_NO_HZ per-CPU variables
  rcu: Make RCU_FAST_NO_HZ handle timer migration
  rcu: Update RCU maintainership
  rcu: Make exit_rcu() more precise and consolidate
  rcu: Move PREEMPT_RCU preemption to switch_to() invocation
  rcu: Ensure that RCU_FAST_NO_HZ timers expire on correct CPU
  rcu: Add rcutorture test for call_srcu()
  rcu: Implement per-domain single-threaded call_srcu() state machine
  rcu: Use single value to handle expedited SRCU grace periods
  rcu: Improve srcu_readers_active_idx()'s cache locality
  rcu: Remove unused srcu_barrier()
  rcu: Implement a variant of Peter's SRCU algorithm
  rcu: Improve SRCU's wait_idx() comments
  rcu: Flip ->completed only once per SRCU grace period
  rcu: Increment upper bit only for srcu_read_lock()
  rcu: Remove fast check path from __synchronize_srcu()
  rcu: Direct algorithmic SRCU implementation
  rcu: Introduce rcutorture testing for rcu_barrier()
  timer: Fix mod_timer_pinned() header comment
  ...
2012-05-21 19:26:51 -07:00
Linus Torvalds 5ec29e3149 Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core locking updates from Ingo Molnar:
 "This update:

   - extends and simplifies x86 NMI callback handling code to enhance
     and fix the HP hw-watchdog driver

   - simplifies the x86 NMI callback handling code to fix a kmemcheck
     bug.

   - enhances the hung-task debugger"

* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/nmi: Fix the type of the nmiaction.flags field
  x86/nmi: Fix page faults by nmiaction if kmemcheck is enabled
  x86/nmi: Add new NMI queues to deal with IO_CHK and SERR
  watchdog, hpwdt: Remove priority option for NMI callback
  hung task debugging: Inject NMI when hung and going to panic
2012-05-21 19:25:14 -07:00
Linus Torvalds abd209b708 Merge branch 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull iommu core changes from Ingo Molnar:
 "The IOMMU changes in this cycle are mostly about factoring out
  Intel-VT-d specific IRQ remapping details and introducing struct
  irq_remap_ops, in preparation for AMD specific hardware."

* 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  iommu: Fix off by one in dmar_get_fault_reason()
  irq_remap: Fix the 'sub_handle' uninitialized warning
  irq_remap: Fix UP build failure
  irq_remap: Fix compiler warning with CONFIG_IRQ_REMAP=y
  iommu: rename intr_remapping.[ch] to irq_remapping.[ch]
  iommu: rename intr_remapping references to irq_remapping
  x86, iommu/vt-d: Clean up interfaces for interrupt remapping
  iommu/vt-d: Convert MSI remapping setup to remap_ops
  iommu/vt-d: Convert free_irte into a remap_ops callback
  iommu/vt-d: Convert IR set_affinity function to remap_ops
  iommu/vt-d: Convert IR ioapic-setup to use remap_ops
  iommu/vt-d: Convert missing apic.c intr-remapping call to remap_ops
  iommu/vt-d: Make intr-remapping initialization generic
  iommu: Rename intr_remapping files to intel_intr_remapping
2012-05-21 19:23:41 -07:00
Linus Torvalds 06930b94d1 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu tree from Greg Ungerer:
 "More merge and clean up of MMU and non-MMU common files, namely
  signal.c and dma.c.  There is also a simplification of the ColdFire
  GPIO setup tables.  Using a couple of simple macros we make the init
  tables really small and easy to read, and save a couple of thousand
  lines of code.  Also a move of all the ColdFire subarch support files
  into the existing coldfire directory.  The sub-directories just ended
  up duplicating Makefiles and now only contain really simple pieces of
  code.  This saves quite a few lines of code too.

  As always a couple of bugs fixes thrown in too.  Oh and a new
  defconfig for the ColdFire platforms that support having the MMU
  enabled."

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: (39 commits)
  m68k: add a defconfig for the M5475EVB ColdFire with MMU board
  m68knommu: unaligned.h fix for M68000 core
  m68k: merge the MMU and non-MMU versions of the arch dma code
  m68knommu: reorganize the no-MMU cache flushing to match m68k
  m68knommu: move the 54xx platform code into the common ColdFire code directory
  m68knommu: move the 532x platform code into the common ColdFire code directory
  m68knommu: move the 5407 platform code into the common ColdFire code directory
  m68knommu: move the 5307 platform code into the common ColdFire code directory
  m68knommu: move the 528x platform code into the common ColdFire code directory
  m68knommu: move the 527x platform code into the common ColdFire code directory
  m68knommu: move the 5272 platform code into the common ColdFire code directory
  m68knommu: move the 5249 platform code into the common ColdFire code directory
  m68knommu: move the 523x platform code into the common ColdFire code directory
  m68knommu: move the 520x platform code into the common ColdFire code directory
  m68knommu: move the 5206 platform code into the common ColdFire code directory
  m68knommu: simplify the ColdFire 5407 GPIO struct setup
  m68knommu: simplify the ColdFire 532x GPIO struct setup
  m68knommu: simplify the ColdFire 5307 GPIO struct setup
  m68knommu: simplify the ColdFire 528x GPIO struct setup
  m68knommu: simplify the ColdFire 527x GPIO struct setup
  ...
2012-05-21 19:15:03 -07:00
Linus Torvalds f4c16c5817 OpenRISC updates for 3.5
A couple of cleanups for the OpenRISC architecture:
 
 * Implement IRQ domains
 * Use DMA mapping framework completely and catch up with recent
   changes to dma_map_ops
 * One bug fix to the "or1k_atomic" syscall to not clobber call-saved
   registers
 * OOM killer patches to the pagefault handler ported from the X86 arch
 * ...and a couple of header file cleanups
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iEYEABECAAYFAk+6o7MACgkQ70gcjN2673OpcACeIwRxhw1ZgtgMSLcR2/t8Twsn
 Ct0AoMDLvEW7BW+5E7ZgaAlIwNkGmcZQ
 =TG1P
 -----END PGP SIGNATURE-----

Merge tag 'for-3.5' of git://openrisc.net/jonas/linux

Pull OpenRISC updates from Jonas Bonn:
 "A couple of cleanups for the OpenRISC architecture:

   - Implement IRQ domains
   - Use DMA mapping framework completely and catch up with recent
     changes to dma_map_ops
   - One bug fix to the "or1k_atomic" syscall to not clobber call-saved
     registers
   - OOM killer patches to the pagefault handler ported from the X86
     arch
   - ...and a couple of header file cleanups"

* tag 'for-3.5' of git://openrisc.net/jonas/linux:
  openrisc: use scratch regs in atomic syscall
  openrisc: provide dma_map_ops
  openrisc: header file cleanups
  openrisc/mm/fault.c: Port OOM changes to do_page_fault
  openrisc: remove unnecessary includes
  openrisc: implement irqdomains
2012-05-21 17:01:56 -07:00
Linus Torvalds 3bb07f1b73 PCI changes for the 3.5 merge window:
- Host bridge cleanups from Yinghai
   - Disable Bus Master bit on PCI device shutdown (kexec-related)
   - Stratus ftServer fix
   - pci_dev_reset() locking fix
   - IvyBridge graphics erratum workaround
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJPumymAAoJEPGMOI97Hn6z9JUQALVh5UE/X+kg9CU63FGSwrRQ
 nMiQiOv4uX3K+QV7LJsx/wKlOu2AQuZvHbiDNn100865LlLvMfPLOhYxzitjQ9fb
 38j9GsXBgMxPQZOdvWT9F6XUTONR84w3xoxGFZb1sLAmAxkWhsHBCGSfNwJXzQhG
 7AENGhby/AisYpHT915KJ3ZshSIiqHEo34DFyQtEkjaJRWIC643TMQoBhURb+aIn
 K/rjaWxS4AaXue3npkpBTyd2ngMiDz65+FTUJXxy+F0sIZ5w44ZZCdBk59UCLVYU
 LynjXeHWYzvC6YKOF47PY/vkToVcX3mtZ06KpW8kuesZDAO+qAdPnVOlY/O21NCI
 6KKCn3bkGEOldHLsw5mtUU5Pwf1WixfURiDi5bd/X1k5NeFJNjyvWJ/HArJS8OAh
 CvJO9UNsgaqAcx4fnrJ+CY2PcX1W44m1IsqpCMbxbSRXPEN+JLBrW7oeRrk0hyIa
 dhUZXt7wancda8iK5XYFPhFwaMRnsAibdsUOBecSK6XhVtmd6hflo3p6DWRQdpXL
 R3pECiI4j3lBCByQCMbSSk6TOCj4J2spRSZOE38n0nNAoR4Vxldw1m1uyE2swP0v
 n+KYd5w3O3VwLAFGMYI7LYtwWlTBX7ith/NAnsn1YEtiBBm9Ft51c38jI1QtzjOU
 lrzViloqYnYGJctJ4ojo
 =gHTG
 -----END PGP SIGNATURE-----

Merge tag 'pci-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI changes from Bjorn Helgaas:
 - Host bridge cleanups from Yinghai
 - Disable Bus Master bit on PCI device shutdown (kexec-related)
 - Stratus ftServer fix
 - pci_dev_reset() locking fix
 - IvyBridge graphics erratum workaround

* tag 'pci-for-3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (21 commits)
  microblaze/PCI: fix "io_offset undeclared" error
  x86/PCI: only check for spinlock being held in SMP kernels
  resources: add resource_overlaps()
  PCI: fix uninitialized variable 'cap_mask'
  MAINTAINERS: update PCI git tree and patchwork
  PCI: disable Bus Master on PCI device shutdown
  PCI: work around IvyBridge internal graphics FLR erratum
  x86/PCI: fix unused variable warning in amd_bus.c
  PCI: move mutex locking out of pci_dev_reset function
  PCI: work around Stratus ftServer broken PCIe hierarchy
  x86/PCI: merge pcibios_scan_root() and pci_scan_bus_on_node()
  x86/PCI: dynamically allocate pci_root_info for native host bridge drivers
  x86/PCI: embed pci_sysdata into pci_root_info on ACPI path
  x86/PCI: embed name into pci_root_info struct
  x86/PCI: add host bridge resource release for _CRS path
  x86/PCI: refactor get_current_resources()
  PCI: add host bridge release support
  PCI: add generic device into pci_host_bridge struct
  PCI: rename pci_host_bridge() to find_pci_root_bridge()
  x86/PCI: fix memleak with get_current_resources()
  ...
2012-05-21 16:24:54 -07:00
Linus Torvalds ff8ce5f67d Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm
Pull core ARM updates from Russell King:
 "This is the bulk of the core ARM updates for this merge window.
  Included in here is a different way to handle the VIVT cache flushing
  on context switch, which should allow scheduler folk to remove a
  special case in their core code.

  We have architectured timer support here, which is a set of timers
  specified by the ARM architecture for future SoCs.  So we should see
  less variability in timer design going forward.

  The last big thing here is my cleanup to the way we handle PCI across
  ARM, fixing some oddities in some platforms which hadn't realised
  there was a way to deal with their private data already built in to
  our PCI backend.

  I've also removed support for the ARMv3 architecture; it hasn't worked
  properly for years so it seems pointless to keep it around."

* 'for-linus' of git://git.linaro.org/people/rmk/linux-arm: (47 commits)
  ARM: PCI: remove per-pci_hw list of buses
  ARM: PCI: dove/kirkwood/mv78xx0: use sys->private_data
  ARM: PCI: provide a default bus scan implementation
  ARM: PCI: get rid of pci_std_swizzle()
  ARM: PCI: versatile: fix PCI interrupt setup
  ARM: PCI: integrator: use common PCI swizzle
  ARM: 7416/1: LPAE: Remove unused L_PTE_(BUFFERABLE|CACHEABLE) macros
  ARM: 7415/1: vfp: convert printk's to pr_*'s
  ARM: decompressor: avoid speculative prefetch from non-RAM areas
  ARM: Remove ARMv3 support from decompressor
  ARM: 7413/1: move read_{boot,persistent}_clock to the architecture level
  ARM: Remove support for ARMv3 ARM610 and ARM710 CPUs
  ARM: 7363/1: DEBUG_LL: limit early mapping to the minimum
  ARM: 7391/1: versatile: add some auxdata for device trees
  ARM: 7389/2: plat-versatile: modernize FPGA IRQ controller
  AMBA: get rid of last two uses of NO_IRQ
  ARM: 7408/1: cacheflush: return error to userspace when flushing syscall fails
  ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held
  ARM: 7404/1: cmpxchg64: use atomic64 and local64 routines for cmpxchg64
  ARM: 7347/1: SCU: use cpu_logical_map for per-CPU low power mode
  ...
2012-05-21 16:01:50 -07:00
Thomas Gleixner 764e0da14f timers: Fixup the Kconfig consolidation fallout
Sigh, I missed to check which architecture Kconfig files actually
include the core Kconfig file. There are a few which did not. So we
broke them.

Instead of adding the includes to those, we are better off to move the
include to init/Kconfig like we did already with irqs and others.

This does not change anything for the architectures using the old
style periodic timer mode. It just solves the build wreckage there.

For those architectures which use the clock events infrastructure it
moves the include of the core Kconfig file to "General setup" which is
a way more logical place than having it at random locations specified
by the architecture specific Kconfigs.

Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: Anna-Maria Gleixner <anna-maria@glx-um.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 23:43:46 +02:00
Richard Weinberger 2ccf62b360 Merge branch 'for-um' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal into for-3.5 2012-05-21 23:25:37 +02:00
Al Viro ffc51be82b um: missing checks of __put_user()/__get_user() return values
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 16:29:02 -04:00
Al Viro 0088b6ec8f um: stub_rt_sigsuspend isn't needed these days anymore
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 16:29:01 -04:00
Al Viro 243412be9c um/x86: merge (and trim) 32- and 64-bit variants of ptrace.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 16:28:34 -04:00
Sam Ravnborg e47b65b032 net: drop NET dependency from HAVE_BPF_JIT
There is no point having the NET dependency on the select target, as it
forces all users to depend on NET to tell they support BPF_JIT.  Move
the config option to the bottom of the file - this could be a nice place
also for future "selectable" config symbols.

Fix up all users to drop the dependency on NET now that it is not
required to supress warnings for non-NET builds.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: David Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-21 12:50:12 -07:00
Linus Torvalds 8e95a53ba4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin
Pull blackfin changes from Bob Liu:
 "The biggest change was added an new processor(bf60x series).

  Bf60x series processor of blackfin can up to 1GHz with Hardware
  Support for HD Video Analytics, it use the same blackfin ISA but with
  some changes on system buses, interrupt controller and peripheral
  devices.

  Added dir arch/blackfin/mach-bf609/ and did some changes to the
  framework made linux working fine on the reference board bf609-ezkit
  now."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lliubbo/blackfin: (41 commits)
  blackfin: fix build after add bf60x mach/pm.h
  blackfin: twi: include linux/i2c.h
  blackfin: bf60x: add head file for crc controller
  blackfin: bf60x: twi: work around temporary anomaly 0501001
  blackfin: twi: Move TWI MMR access macro to twi head file
  blackfin: twi: Move TWI peripheral pin request array to platform data
  blackfin: bf60x: anomaly: Add a temporary anomaly 0501001
  blackfin: bf60x: Rename the DDR controller macro
  blackfin: mach-bf609: pm: cleanup bfin_deepsleep
  blackfin: bf60x: cleanup get clock code
  blackfin: bf60x: pm: Add a debug option to calculate kernel wakeup time.
  blackfin: bf60x: add wakeup source select
  blackfin: bf60x: make clock changeable in kernel menuconfig
  blackfin:mach-bf609: fix norflash for bf609-ezkit
  blackfin: mach-bf609: add can_wakeup to ethernet device
  blackfin: remove redundant CONFIG_BF60x macro
  blackfin: rotary: Add pm_wakeup flag to platform data structure.
  bfin_gpio: fix bf548-ezkit kernel fail to boot
  bfin_dma: fix initcall return error in proc_dma_init()
  Blackfin: delete fork func
  ...
2012-05-21 12:47:53 -07:00
Linus Torvalds cd975ae0ce Clean up some c6x Kconfig items and add support for Elf FDPIC loader.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJPunCjAAoJEOiN4VijXeFPR3cP+gLDhWJGWC/xnI+vr1WJJxZU
 xJQbaopEyqJa7GBT+3BasCCLUCU7MVIrYaqubzEI4dzVCMDxwuJYPT7m/N3Avssg
 bm1ZaLUnanc8ZLfLHlnsG02xtBtEYI4mUM7ggCfcDJJC0b7tDGcz0kiM2WDGK0fq
 LRbZmlC57qK0UTx2IEvl0DoMuH7pq7N1sSXFr6keBm/lqN7Qj3VtAf/ASVQdIgN8
 TfQiWbu40v8EEcKAZSkVKvhS3kSiPI9Dr1DGeR1JIhjFqFYUaw52aOzNTJyC9k1g
 4oPIoDh0xnSzYrYpetP1gN5bT/FMRcVXLvKM7cIbeUzoAlgnQsBDAGA7x205X8Bf
 ChrQEpm/yKZnwEBtp9uIEQY3rRT7iecqVgeVO5LXskg+/OX0+gO5CtCDPopWzqJN
 wSOCsP9va0G9W0a8G5hKqEGYhbCXDkzU6KzmcgxbxIeF+CvJ+72mWgqxJkF0GtuU
 KCoLQT7Necq+4p/SaiXL7KogS9m2rClbszManceyAYSGwqAPIfU3RzUw+Fz6NcIh
 DrYXNTZelrVN2wrVrlhn3B6GdgfyVabhQ1e3CftmAtbY/i+i/ArHCT9JxjyAHTuV
 ekTnpVVDBZUCUluJXFJKzrvRuSUt9X18AxK0NfJ+xglOPQnPh026K/sCuvmn6mAq
 U1f1XmCqG2l2TDtkZ6Wu
 =q4Z6
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming

Pull c6x updates from Mark Salter:
 "Clean up some c6x Kconfig items and add support for Elf FDPIC loader."

* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
  C6X: remove unused config items
  C6X: add support to build with BINFMT_ELF_FDPIC
  C6X: change main arch kbuild symbol
2012-05-21 12:46:48 -07:00
Linus Torvalds 881bcabbde Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
Pull m68k updates from Geert Uytterhoeven.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Setup CROSS_COMPILE at the top
  m68k: Correct the Atari ALLOWINT definition
  m68k/video: Create <asm/vga.h>
  m68k: Make sure {read,write}s[bwl]() are always defined
  m68k/mm: Port OOM changes to do_page_fault()
  scsi/atari: Make more functions static
  scsi/atari: Revive "atascsi=" setup option
  net/ariadne: Improve debug prints
  m68k/atari: Change VME irq numbers from unsigned long to unsigned int
  m68k/amiga: Use arch_initcall() for registering platform devices
  m68k/amiga: Add error checks when registering platform devices
  m68k/amiga: Mark z_dev_present() __init
  m68k: Remove unused MAX_NOINT_IPL definition
2012-05-21 12:43:54 -07:00
Linus Torvalds e60b9a0346 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky:
 "Just a random collection of bug-fixes and cleanups, nothing new in
  this merge request."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (46 commits)
  s390/ap: Fix wrong or missing comments
  s390/ap: move receive callback to message struct
  s390/dasd: re-prioritize partition detection message
  s390/qeth: reshuffle initialization
  s390/qeth: cleanup drv attr usage
  s390/claw: cleanup drv attr usage
  s390/lcs: cleanup drv attr usage
  s390/ctc: cleanup drv attr usage
  s390/ccwgroup: remove ccwgroup_create_from_string
  s390/qeth: stop using struct ccwgroup driver for discipline callbacks
  s390/qeth: switch to ccwgroup_create_dev
  s390/claw: switch to ccwgroup_create_dev
  s390/lcs: switch to ccwgroup_create_dev
  s390/ctcm: switch to ccwgroup_create_dev
  s390/ccwgroup: exploit ccwdev_by_dev_id
  s390/ccwgroup: introduce ccwgroup_create_dev
  s390: fix race on TIF_MCCK_PENDING
  s390/barrier: make use of fast-bcr facility
  s390/barrier: cleanup barrier functions
  s390/claw: remove "eieio" calls
  ...
2012-05-21 12:41:17 -07:00
Jarkko Sakkinen b2d668da93 x86, relocs: Build clean fix
relocs was not cleaned up when "make clean" is issued. This
patch fixes the issue.

Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@intel.com>
Link: http://lkml.kernel.org/r/1337622684-6834-1-git-send-email-jarkko.sakkinen@intel.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: <stable@vger.kernel.org> v3.4
2012-05-21 12:19:37 -07:00
H. Peter Anvin d13a822e6d Merge commit 'v3.4' into x86/urgent 2012-05-21 12:17:50 -07:00
Richard Weinberger 985a94a96d um: Remove CONFIG_IRQ_RELEASE_METHOD
UML does no longer need CONFIG_IRQ_RELEASE_METHOD.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 21:09:37 +02:00
Richard Weinberger 8e514b2a81 um: Remove usage of irq_chip->release()
UML does no longer need irq_chip->release().

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 21:09:36 +02:00
Richard Weinberger fa7a0449e0 um: Implement um_free_irq()
Instead of using chip->release() we can achieve the same
using a simple wrapper for free_irq().
We have already um_request_irq(), so um_free_irq() is the perfect
counterpart.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 21:09:36 +02:00
Richard Weinberger 2b76ebaa72 um: Fix __swp_type()
The current __swp_type() function uses a too small bitshift.
Using more than one swap files causes bad pages because
the type bits clash with other page flags.

CC: stable@kernel.org
Analyzed-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2012-05-21 21:09:35 +02:00
Richard Weinberger f15b9000eb um: Implement a custom pte_same() function
UML uses the _PAGE_NEWPAGE flag to mark pages which are not jet
installed on the host side using mmap().
pte_same() has to ignore this flag, otherwise unuse_pte_range()
is unable to unuse the page because two identical
page tables entries with different _PAGE_NEWPAGE flags would not
match and swapoff() would never return.

CC: stable@kernel.org
Analyzed-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2012-05-21 21:09:34 +02:00
Richard Weinberger 62179d47c2 um: Add BUG() to do_ops()'s error path
In case we encounter a bad operation in do_ops() something is really
broken and it's better to BUG().

Signed-off-by: Richard Weinberger <richard@nod.at>
2012-05-21 21:09:33 +02:00
Richard Weinberger 54ce9256ad um: Remove unused variables
Signed-off-by: Richard Weinberger <richard@nod.at>
2012-05-21 21:09:32 +02:00
Al Viro c6802f4370 um: bury unused _TIF_RESTORE_SIGMASK
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 14:22:25 -04:00
Al Viro 5a30a798fb um: wrong sigmask saved in case of multiple sigframes
we can't just find oldmask once; if there are multiple signals
and we loop building sigframes for those, ->saved_mask will be
definitely wrong for all but the first one.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 14:20:27 -04:00
Al Viro d50349b0c3 um: add TIF_NOTIFY_RESUME
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 14:19:53 -04:00
Al Viro 3b7d15bde5 um: ->restart_block.fn needs to be reset on sigreturn
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-05-21 14:19:31 -04:00
Stefano Stabellini 68c2c39a76 xen: do not map the same GSI twice in PVHVM guests.
PV on HVM guests map GSIs into event channels. At restore time the
event channels are resumed by restore_pirqs.

Device drivers might try to register the same GSI again through ACPI at
restore time, but the GSI has already been mapped and bound by
restore_pirqs. This patch detects these situations and avoids
 mapping the same GSI multiple times.

Without this patch we get:
(XEN) irq.c:2235: dom4: pirq 23 or emuirq 28 already mapped
and waste a pirq.

CC: stable@kernel.org
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-05-21 14:11:36 -04:00
Linus Torvalds 9daeaa3705 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next
Pull sparc updates from David Miller:

1) Kill off support for sun4c and Cypress sun4m chips.

   And as a result we were able to also kill off that ugly btfixup thing
   that required multi-stage links of the final vmlinux image in the
   Kbuild system.  This should make the kbuild maintainers really happy.

   Thanks a lot to Sam Ravnborg for his tireless efforts to get this
   going.

2) Convert sparc64 to nobootmem.  I suspect now with sparc32 being a lot
   cleaner, it should be able to fall in line and modernize in this area
   too.

3) Make sparc32 use generic clockevents, from Tkhai Kirill.

[ I fixed up the BPF rules, and tried to clean up the build rules too.
  But I don't have - or want - a sparc cross-build environment, so the
  BPF rule bug and the related build cleanup was all done with just a
  bare "make -n" pseudo-test.      - Linus ]

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next: (110 commits)
  sparc32: use flushi when run-time patching in per_cpu_patch
  sparc32: fix cpuid_patch run-time patching
  sparc32: drop unused inline functions in srmmu.c
  sparc32: drop unused functions in pgtsrmmu.h
  sparc32,leon: move leon mmu functions to leon_mm.c
  sparc32,leon: remove duplicate definitions in leon.h
  sparc32,leon: remove duplicate UART register definitions
  sparc32,leon: move leon ASI definitions to asi.h
  sparc32: move trap table to a separate file
  sparc64: renamed ttable.S to ttable_64.S
  sparc32: Remove asm/sysen.h header.
  sparc32: Delete asm/smpprim.h
  sparc32: Remove unused empty_bad_page{,_table} declarations.
  sparc32: Kill boot_cpu_id4
  sparc32: Move GET_PROCESSOR*_ID() out of asm/asmmacro.h
  sparc32: Remove completely unused code from asm/cache.h
  sparc32: Add ucmpdi2.o to obj-y instead of lib-y.
  sparc32: add ucmpdi2
  sparc: introduce arch/sparc/Kbuild
  sparc: remove obsolete documentation
  ...
2012-05-21 10:32:01 -07:00
Sasha Levin 29d679ffd8 x86, printk: Add missing KERN_CONT to NMI selftest
Fix this behaviour:

----------------
| NMI testsuite:
--------------------
  remote IPI:
  ok  |

   local IPI:
  ok  |

Revealed due to a new modification to printk().

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Link: http://lkml.kernel.org/r/1336492573-17530-3-git-send-email-levinsasha928@gmail.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2012-05-21 10:13:04 -07:00
Linus Torvalds cb62ab71fe Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
Pull networking changes from David Miller:

 1) Get rid of the error prone NLA_PUT*() macros that used an embedded
    goto.

 2) Kill off the token-ring and MCA networking drivers, from Paul
    Gortmaker.

 3) Reduce high-order allocations made by datagram AF_UNIX sockets, from
    Eric Dumazet.

 4) Add PTP hardware clock support to IGB and IXGBE, from Richard
    Cochran and Jacob Keller.

 5) Allow users to query timestamping capabilities of a card via
    ethtool, from Richard Cochran.

 6) Add loadbalance mode to the teaming driver, from Jiri Pirko.  Part
    of this is that we can now have BPF filters not attached to sockets,
    and the loadbalancing function is calculated using one.

 7) Francois Romieu went through the network drivers removing gratuitous
    uses of netdev->base_addr, perhaps some day we can remove it
    completely but it's used for ISA probing still.

 8) Add a BPF JIT for sparc.  I know, who cares, right? :-)

 9) Move networking sysctl registry away from using the compatability
    mode interfaces in the sysctl code.  From Eric W Biederman.

10) Pavel Emelyanov added a way to save and restore TCP socket state via
    TCP_REPAIR, TCP_REPAIR_QUEUE, and TCP_QUEUE_SEQ socket options as
    well as a way to forcefully bind a socket to a port via the
    sk->sk_reuse value SK_FORCE_REUSE.  There is also a
    TCP_REPAIR_OPTIONS which allows to reinstante the TCP options
    enabled on the connection.

11) Several enhancements from Eric Dumazet that, in particular, can
    enhance splice performance on TCP sockets significantly.

     a) Reset the offset of the per-socket sendmsg page when we know
        we're the only use of the page in linear_to_page().

     b) Add facilities such that skb->data can be backed a page rather
        than SLAB kmalloc'd memory.  In particular devices which were
        receiving into linear RX buffers can now end up providing paged
        data.

    The big result is that code like splice and GRO do not have to copy
    any more.

12) Allow a pure sender to more gracefully handle ACK backlogs in TCP.
    What can happen at high rates is that the sender hasn't grown his
    receive buffer limits at all (he's not receiving data so really
    doesn't need to), but the non-data ACKs consume receive buffer
    space.

    sk_add_backlog() is too aggressive in dropping frames in this case,
    so relax it's requirements by using the receive buffer plus the send
    buffer limit as the backlog limit instead of just the former.

    Also from Eric Dumazet.

13) Add ipv6 support to L2TP, from Benjamin LaHaise, James Chapman, and
    Chris Elston.

14) Implement TCP early retransmit (RFC 5827), from Yuchung Cheng.
    Basically, we can start fast retransmit before hiting the dupack
    threshold under certain conditions.

15) New CODEL active queue management packet scheduler, from Eric
    Dumazet based upon initial work by Dave Taht.

    Basically, the big feature is that packets are dropped (or ECN bits
    are set) based upon how long packets live in the queue, rather than
    the queue length (which is what RED uses).

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1341 commits)
  drivers/net/stmmac: seq_file fix memory leak
  ipv6/exthdrs: strict Pad1 and PadN check
  USB: qmi_wwan: Add ZTE (Vodafone) K3520-Z
  USB: qmi_wwan: Add ZTE (Vodafone) K3765-Z
  USB: qmi_wwan: Make forced int 4 whitelist generic
  net/ipv4: replace simple_strtoul with kstrtoul
  net/ipv4/ipconfig: neaten __setup placement
  net: qmi_wwan: Add Vodafone/Huawei K5005 support
  net: cdc_ether: Add ZTE WWAN matches before generic Ethernet
  ipv6: use skb coalescing in reassembly
  ipv4: use skb coalescing in defragmentation
  net: introduce skb_try_coalesce()
  net:ipv6:fixed space issues relating to operators.
  net:ipv6:fixed a trailing white space issue.
  ipv6: disable GSO on sockets hitting dst_allfrag
  tg3: use netdev_alloc_frag() API
  net: napi_frags_skb() is static
  ppp: avoid false drop_monitor false positives
  ipv6: bool/const conversions phase2
  ipx: Remove spurious NULL checking in ipx_ioctl().
  ...
2012-05-21 10:03:46 -07:00
Linus Torvalds 7e5cb5e151 Merge branch 'vfs-cleanups' (random vfs cleanups)
This teaches vfs_fstat() to use the appropriate f[get|put]_light
functions, allowing it to avoid some unnecessary locking for the common
case.

More noticeably, it also cleans up and simplifies the "getname_flags()"
function, which now relies on the architecture strncpy_from_user() doing
all the user access checks properly, instead of hacking around the fact
that on x86 it didn't use to do it right (see commit 92ae03f2ef99: "x86:
merge 32/64-bit versions of 'strncpy_from_user()' and speed it up").

* vfs-cleanups:
  VFS: make vfs_fstat() use f[get|put]_light()
  VFS: clean up and simplify getname_flags()
  x86: make word-at-a-time strncpy_from_user clear bytes at the end
2012-05-21 08:46:08 -07:00
Linus Torvalds 8c12fec90c Merge branch 'stat-cleanups' (clean up copying of stat info to user space)
This makes cp_new_stat() a bit more readable, and avoids having to
memset() the whole structure just to fill in a couple of padding fields.

This is another result of me looking at code generation of functions
that show up high on certain kernel profiles, and just going "Oh, let's
just clean that up".

Architectures that don't supply the #define to fill just the padding
fields will still fall back to memset().

* stat-cleanups:
  vfs: don't force a big memset of stat data just to clear padding fields
  vfs: de-crapify "cp_new_stat()" function
2012-05-21 08:41:38 -07:00
Russell King 4ab1056766 Merge branch 'v3-removal' into for-linus
Conflicts:
	arch/arm/boot/compressed/head.S
2012-05-21 15:15:33 +01:00
Russell King 4175160b06 Merge branch 'misc' into for-linus
Conflicts:
	arch/arm/kernel/ptrace.c
2012-05-21 15:15:24 +01:00
Russell King ddf90a2ff2 Merge branches 'amba', 'devel-stable', 'fixes', 'mach-types', 'mmci', 'pci' and 'versatile' into for-linus 2012-05-21 15:15:10 +01:00
Konrad Rzeszutek Wilk 2f1bd67d54 xen/smp: unbind irqworkX when unplugging vCPUs.
The git commit  1ff2b0c303
"xen: implement IRQ_WORK_VECTOR handler" added the functionality
to have a per-cpu "irqworkX" for the IPI APIC functionality.
However it missed the unbind when a vCPU is unplugged resulting
in an orphaned per-cpu interrupt line for unplugged vCPU:

  30:        216          0   xen-dyn-event     hvc_console
  31:        810          4   xen-dyn-event     eth0
  32:         29          0   xen-dyn-event     blkif
- 36:          0          0  xen-percpu-ipi       irqwork2
- 37:        287          0   xen-dyn-event     xenbus
+ 36:        287          0   xen-dyn-event     xenbus
 NMI:          0          0   Non-maskable interrupts
 LOC:          0          0   Local timer interrupts
 SPU:          0          0   Spurious interrupts

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2012-05-21 09:26:04 -04:00
Vitaly Andrianov 61f6c7a47a ARM: dma-mapping: use PMD size for section unmap
The dma_contiguous_remap() function clears existing section maps using
the wrong size (PGDIR_SIZE instead of PMD_SIZE).  This is a bug which
does not affect non-LPAE systems, where PGDIR_SIZE and PMD_SIZE are the same.
On LPAE systems, however, this bug causes the kernel to hang at this point.

This fix has been tested on both LPAE and non-LPAE kernel builds.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-05-21 15:09:40 +02:00
Marek Szyprowski c790950928 ARM: integrate CMA with DMA-mapping subsystem
This patch adds support for CMA to dma-mapping subsystem for ARM
architecture. By default a global CMA area is used, but specific devices
are allowed to have their private memory areas if required (they can be
created with dma_declare_contiguous() function during board
initialisation).

Contiguous memory areas reserved for DMA are remapped with 2-level page
tables on boot. Once a buffer is requested, a low memory kernel mapping
is updated to to match requested memory access type.

GFP_ATOMIC allocations are performed from special pool which is created
early during boot. This way remapping page attributes is not needed on
allocation time.

CMA has been enabled unconditionally for ARMv6+ systems.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
2012-05-21 15:09:38 +02:00
Marek Szyprowski 0a2b9a6ea9 X86: integrate CMA with DMA-mapping subsystem
This patch adds support for CMA to dma-mapping subsystem for x86
architecture that uses common pci-dma/pci-nommu implementation. This
allows to test CMA on KVM/QEMU and a lot of common x86 boxes.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-05-21 15:09:38 +02:00
Marek Szyprowski c64be2bb1c drivers: add Contiguous Memory Allocator
The Contiguous Memory Allocator is a set of helper functions for DMA
mapping framework that improves allocations of contiguous memory chunks.

CMA grabs memory on system boot, marks it with MIGRATE_CMA migrate type
and gives back to the system. Kernel is allowed to allocate only movable
pages within CMA's managed memory so that it can be used for example for
page cache when DMA mapping do not use it. On
dma_alloc_from_contiguous() request such pages are migrated out of CMA
area to free required contiguous block and fulfill the request. This
allows to allocate large contiguous chunks of memory at any time
assuming that there is enough free memory available in the system.

This code is heavily based on earlier works by Michal Nazarewicz.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
2012-05-21 15:09:37 +02:00
Marek Szyprowski 4ce63fcd91 ARM: dma-mapping: add support for IOMMU mapper
This patch add a complete implementation of DMA-mapping API for
devices which have IOMMU support.

This implementation tries to optimize dma address space usage by remapping
all possible physical memory chunks into a single dma address space chunk.

DMA address space is managed on top of the bitmap stored in the
dma_iommu_mapping structure stored in device->archdata. Platform setup
code has to initialize parameters of the dma address space (base address,
size, allocation precision order) with arm_iommu_create_mapping() function.
To reduce the size of the bitmap, all allocations are aligned to the
specified order of base 4 KiB pages.

dma_alloc_* functions allocate physical memory in chunks, each with
alloc_pages() function to avoid failing if the physical memory gets
fragmented. In worst case the allocated buffer is composed of 4 KiB page
chunks.

dma_map_sg() function minimizes the total number of dma address space
chunks by merging of physical memory chunks into one larger dma address
space chunk. If requested chunk (scatter list entry) boundaries
match physical page boundaries, most calls to dma_map_sg() requests will
result in creating only one chunk in dma address space.

dma_map_page() simply creates a mapping for the given page(s) in the dma
address space.

All dma functions also perform required cache operation like their
counterparts from the arm linear physical memory mapping version.

This patch contains code and fixes kindly provided by:
- Krishna Reddy <vdumpa@nvidia.com>,
- Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
- Hiroshi DOYU <hdoyu@nvidia.com>

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:23 +02:00
Marek Szyprowski f99d603412 ARM: dma-mapping: use alloc, mmap, free from dma_ops
This patch converts dma_alloc/free/mmap_{coherent,writecombine}
functions to use generic alloc/free/mmap methods from dma_map_ops
structure. A new DMA_ATTR_WRITE_COMBINE DMA attribute have been
introduced to implement writecombine methods.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:22 +02:00
Marek Szyprowski 51fde3499b ARM: dma-mapping: remove redundant code and do the cleanup
This patch just performs a global cleanup in DMA mapping implementation
for ARM architecture. Some of the tiny helper functions have been moved
to the caller code, some have been merged together.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:19 +02:00
Marek Szyprowski 15237e1f50 ARM: dma-mapping: move all dma bounce code to separate dma ops structure
This patch removes dma bounce hooks from the common dma mapping
implementation on ARM architecture and creates a separate set of
dma_map_ops for dma bounce devices.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:18 +02:00
Marek Szyprowski 2a550e73d3 ARM: dma-mapping: implement dma sg methods on top of any generic dma ops
This patch converts all dma_sg methods to be generic (independent of the
current DMA mapping implementation for ARM architecture). All dma sg
operations are now implemented on top of respective
dma_map_page/dma_sync_single_for* operations from dma_map_ops structure.

Before this patch there were custom methods for all scatter/gather
related operations. They iterated over the whole scatter list and called
cache related operations directly (which in turn checked if we use dma
bounce code or not and called respective version). This patch changes
them not to use such shortcut. Instead it provides similar loop over
scatter list and calls methods from the device's dma_map_ops structure.
This enables us to use device dependent implementations of cache related
operations (direct linear or dma bounce) depending on the provided
dma_map_ops structure.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:17 +02:00
Marek Szyprowski 2dc6a016bb ARM: dma-mapping: use asm-generic/dma-mapping-common.h
This patch modifies dma-mapping implementation on ARM architecture to
use common dma_map_ops structure and asm-generic/dma-mapping-common.h
helpers.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:14 +02:00
Marek Szyprowski a227fb92a0 ARM: dma-mapping: remove offset parameter to prepare for generic dma_ops
This patch removes the need for the offset parameter in dma bounce
functions. This is required to let dma-mapping framework on ARM
architecture to use common, generic dma_map_ops based dma-mapping
helpers.

Background and more detailed explaination:

dma_*_range_* functions are available from the early days of the dma
mapping api. They are the correct way of doing a partial syncs on the
buffer (usually used by the network device drivers). This patch changes
only the internal implementation of the dma bounce functions to let
them tunnel through dma_map_ops structure. The driver api stays
unchanged, so driver are obliged to call dma_*_range_* functions to
keep code clean and easy to understand.

The only drawback from this patch is reduced detection of the dma api
abuse. Let us consider the following code:

dma_addr = dma_map_single(dev, ptr, 64, DMA_TO_DEVICE);
dma_sync_single_range_for_cpu(dev, dma_addr+16, 0, 32, DMA_TO_DEVICE);

Without the patch such code fails, because dma bounce code is unable
to find the bounce buffer for the given dma_address. After the patch
the above sync call will be equivalent to:

dma_sync_single_range_for_cpu(dev, dma_addr, 16, 32, DMA_TO_DEVICE);

which succeeds.

I don't consider this as a real problem, because DMA API abuse should be
caught by debug_dma_* function family. This patch lets us to simplify
the internal low-level implementation without chaning the driver visible
API.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:13 +02:00
Marek Szyprowski 553ac78877 ARM: dma-mapping: introduce DMA_ERROR_CODE constant
Replace all uses of ~0 with DMA_ERROR_CODE, what should make the code
easier to read.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:12 +02:00
Marek Szyprowski 6b6f770b57 ARM: dma-mapping: use pr_* instread of printk
Replace all calls to printk with pr_* functions family.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-By: Subash Patel <subash.ramaswamy@linaro.org>
2012-05-21 15:06:11 +02:00
Marek Szyprowski 47142f07ee ARM: dma-mapping: use dma_mmap_from_coherent()
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
2012-05-21 15:06:10 +02:00
Paul Mundt c30b9c432e sh: Enable PIO API for hp6xx and se770x.
Both of these boards are still using the PIO API sans PCI, and will need
to be carefully converted. As conversion is out of scope for this merge
window, simply make sure NO_IOPORT doesn't get accidentally set for
these, joining a long list of other crap platforms.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-21 18:19:18 +09:00
Thomas Gleixner e0d8ffd1df hexagon: Remove select of not longer existing Kconfig switches
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:08:02 +02:00
Thomas Gleixner d4aa8b1593 arm: Select core options instead of redefining them
HARDIRQS_SW_RESEND and GENERIC_IRQ_PROBE are already defined as config
switches in the core Kconfig file. Select them instead of defining
them in ARM.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:06:17 +02:00
Thomas Gleixner bdebaf80a0 x86: Use generic time config
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Link: http://lkml.kernel.org/r/20120518163104.630579708@glx-um.de
Cc: x86@kernel.org
2012-05-21 11:01:44 +02:00
Anna-Maria Gleixner 22bc48f986 unicore32: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Link: http://lkml.kernel.org/r/20120518163107.383567224@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:44 +02:00
Anna-Maria Gleixner 875c9d09b5 um: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Acked-by: Richard Weinberger <richard@nod.at>
Link: http://lkml.kernel.org/r/20120518163107.251597655@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:44 +02:00
Anna-Maria Gleixner 4ec008d630 tile: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Link: http://lkml.kernel.org/r/20120518163107.122560037@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:44 +02:00
Anna-Maria Gleixner ded1cc5cfc sparc: Use: generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: David S. Miller <davem@davemloft.net>
Link: http://lkml.kernel.org/r/20120518163106.987564297@glx-um.de
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:44 +02:00
Anna-Maria Gleixner 8cf200d8d0 sh: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Link: http://lkml.kernel.org/r/20120518163106.857566635@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:44 +02:00
Anna-Maria Gleixner 43229d1e09 score: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Link: http://lkml.kernel.org/r/20120518163106.727602709@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:44 +02:00
Anna-Maria Gleixner a6527b92e4 s390: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20120518163106.595607369@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:43 +02:00
Anna-Maria Gleixner 5bf8f6bfc9 openrisc: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Acked-by: Jonas Bonn <jonas@southpole.se>
Link: http://lkml.kernel.org/r/20120518163106.333611712@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:43 +02:00
Anna-Maria Gleixner b9ed27dfcd powerpc: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Link: http://lkml.kernel.org/r/20120518163106.464567389@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:43 +02:00
Anna-Maria Gleixner ea5332098e mn10300: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: David Howells <dhowells@redhat.com>
Link: http://lkml.kernel.org/r/20120518163106.201635926@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:43 +02:00
Anna-Maria Gleixner cde1794b06 mips: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/20120518163106.073559820@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:43 +02:00
Anna-Maria Gleixner d6412e2bdc microblaze: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Michal Simek <monstr@monstr.eu>
Link: http://lkml.kernel.org/r/20120518163105.939597527@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:43 +02:00
Anna-Maria Gleixner 60a5e4c3d3 m68k: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Link: http://lkml.kernel.org/r/20120518163105.808606368@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:42 +02:00
Anna-Maria Gleixner 97a1c1e918 m32r: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Link: http://lkml.kernel.org/r/20120518163105.678581749@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:42 +02:00
Anna-Maria Gleixner 21b19710a2 ia64: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/20120518163105.547603093@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:42 +02:00
Anna-Maria Gleixner 24a6f35e19 hexagon: Use generic time config
config GENERIC_TIME not longer used.

Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Richard Kuo <rkuo@codeaurora.org>
Link: http://lkml.kernel.org/r/20120518163105.416570309@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:42 +02:00
Anna-Maria Gleixner 5227b636ec cris: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Link: http://lkml.kernel.org/r/20120518163105.286556794@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:42 +02:00
Anna-Maria Gleixner 6220443db4 c6x: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Acked-by: Mark Salter <msalter@redhat.com>
Link: http://lkml.kernel.org/r/20120518163105.156595383@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:41 +02:00
Anna-Maria Gleixner dfbaec06bd blackfin: Use generic time config
Use seperate selector for clockevents.

Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Link: http://lkml.kernel.org/r/20120518163105.026597932@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:41 +02:00
Anna-Maria Gleixner 8d6af9914c avr32: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
Link: http://lkml.kernel.org/r/20120518163104.889514832@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:41 +02:00
Anna-Maria Gleixner 3d92a71a44 arm: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Cc: Russell King <linux@arm.linux.org.uk>
Link: http://lkml.kernel.org/r/20120518163104.760560327@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:41 +02:00
Anna-Maria Gleixner 6e24f31eab alpha: Use generic time config
Signed-off-by: Anna-Maria Gleixner <anna-maria@glx-um.de>
Acked-by: Matt Turner <mattst88@gmail.com>
Link: http://lkml.kernel.org/r/20120518163107.510619939@glx-um.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2012-05-21 11:01:41 +02:00
Paul Mundt 63dc02bde6 sh: Kill off machvec IRQ hinting.
Everything is using sparseirq these days, so we have no need to
arbitrarily size nr_irqs ahead of time. The legacy IRQ pre-allocation
likewise has no meaning for us, so that's killed off too. We now depend
on nr_irqs expansion by the generic hardirq layer instead.

It's also worth noting that the majority of boards had completely bogus
values for their nr_irqs relative to their CPU and configurations, so
this ends up correcting behaviour for quite a few platforms.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-05-21 17:54:01 +09:00
Shuah Khan 74bc491795 x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage
Change calgary_parse_options() to call kstrtoul() instead of
calling obsoleted simple_strtoul().

Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Acked-by: Muli Ben-Yehuda <muli@cs.technion.ac.il>
Cc: jdmason@kudzu.us
Link: http://lkml.kernel.org/r/1337556268.3126.5.camel@lorien2
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-05-21 10:29:40 +02:00
Ingo Molnar bb27f55eb9 Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Fixes for perf/core:

 - Rename some perf_target methods to avoid double negation, from Namhyung Kim.
 - Revert change to use per task events with inheritance, from Namhyung Kim.
 - Events should start disabled till children starts running, from David Ahern.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-05-21 09:17:50 +02:00
Steven Miao 672552adb3 blackfin: fix build after add bf60x mach/pm.h
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:55:07 +08:00
Sonic Zhang bda45b8f34 blackfin: twi: include linux/i2c.h
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:55:05 +08:00
Sonic Zhang 7967ba013e blackfin: bf60x: add head file for crc controller
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:55:04 +08:00
Sonic Zhang c41704f509 blackfin: bf60x: twi: work around temporary anomaly 0501001
Disable IRQ when reading MMR rcv_data8 and rcv_data16.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:55:03 +08:00
Sonic Zhang 1e92bf6d80 blackfin: twi: Move TWI MMR access macro to twi head file
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:55:01 +08:00
Sonic Zhang cf93feb3a0 blackfin: twi: Move TWI peripheral pin request array to platform data
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:55:00 +08:00
Sonic Zhang 913f2f2df7 blackfin: bf60x: anomaly: Add a temporary anomaly 0501001
Add a temporary anomaly 0501001 for data loss in MMR reading if interrupted.
Add work around for bfin serial driver as well.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:58 +08:00
Sonic Zhang 8bf7135fff blackfin: bf60x: Rename the DDR controller macro
Rename the DDR controller macro from DDR0 to DMC0 to avoid confustion for
bf60x.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:57 +08:00
Steven Miao 5a84775e99 blackfin: mach-bf609: pm: cleanup bfin_deepsleep
In bfin_deepsleep(), using register instead of local variable and remove
unused dpmc register read.

Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:55 +08:00
Sonic Zhang 1d3dbda6ed blackfin: bf60x: cleanup get clock code
Remove redundance code for get clock.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:53 +08:00
Sonic Zhang 72b099ed93 blackfin: bf60x: pm: Add a debug option to calculate kernel wakeup time.
Display the total time when kernel resumes normal from standby or suspend to mem
mode.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:52 +08:00
Steven Miao 0fbd88ca20 blackfin: bf60x: add wakeup source select
Support select the wakeup source for power management on bf60x.

Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:50 +08:00
Bob Liu 7c141c1c5c blackfin: bf60x: make clock changeable in kernel menuconfig
Add clock changeable support in kernel menuconfig for bf60x.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:49 +08:00
Bob Liu 1c40093976 blackfin:mach-bf609: fix norflash for bf609-ezkit
Set smc register to async flash protocol mode and use physmap driver instead of
bfin-bf6xx.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:47 +08:00
Bob Liu 6e1953e140 blackfin: mach-bf609: add can_wakeup to ethernet device
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:46 +08:00
Sonic Zhang 364130227d blackfin: remove redundant CONFIG_BF60x macro
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:44 +08:00
Sonic Zhang 5b8163a3f9 blackfin: rotary: Add pm_wakeup flag to platform data structure.
Rotary can't be used as a wakeup source in all platform.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:43 +08:00
Steven Miao ec98e6b836 bfin_gpio: fix bf548-ezkit kernel fail to boot
Fix bf548-ezkit kernel fail to boot when request peripheral pins.

Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:41 +08:00
Steven Miao 1a1214519b bfin_dma: fix initcall return error in proc_dma_init()
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:40 +08:00
Mike Frysinger 080bb657eb Blackfin: delete fork func
We don't implement fork() since we are no-mmu, so redirect it to the
existing ENOSYS stub rather than adding a custom EINVAL one.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:39 +08:00
Mike Frysinger 592b8785b9 Blackfin: fix unused clk var warning
This is only used on BF60x code (so this patch should get squashed into
the original one that added it).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:37 +08:00
Steven Miao 8db08136dc blackfin: SMP: pda: "next" field of blackfin_pda only used in SMP kernel
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:36 +08:00
Sonic Zhang 45abc49d19 blackfin: GPIO: Implement more GPIO APIs
Implement more GPIO APIs in case GPIOLIB is disabled.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:34 +08:00
Bob Liu 494b794808 blackfin: mach-common: ints-priority: fix compile error
IRQ_PINT4/PINT5 are not defined on !CONFIG_BF60x, this patch fix it.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:33 +08:00
Sonic Zhang 8e2f524fd9 blackfin: bf60x: bfin_uart: Add more LCR bits masks
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:31 +08:00
Sonic Zhang de45083831 blackfin: license: Change ADI BSD license
Change ADI BSD license to standart 3 clause BSD license for some blackfin arch
code requested by ADI Legal.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:30 +08:00
Aaron Wu 8c998b2a15 blackfin: bf537-stamp: update board file for platform bfin_sport device
Blackfin sport driver has been rewrited update board file according.

Signed-off-by: Aaron Wu <Aaron.Wu@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:28 +08:00
Steven Miao c5cfb736bc blackfin: bf60x: cleanup mem_map macro
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:27 +08:00
Bob Liu 3a3cf0d7b8 blackfin: bf60x: fix compiling warning
Fix several compiling warning for bf60x.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:26 +08:00
Steven Miao 93f89519fd blackfin: bf60x: add power management support
Add bf60x cpu pm callbacks and change blackfin pm framework to support bf60x.

Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:24 +08:00
Bob Liu b2cfc653a5 blackfin: bf60x: add l2 ecc irq handler
bf60x support l2 hardware ecc error check, add panic when double bits ecc error
happened.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:23 +08:00
Sonic Zhang c55c89e939 blackfin: twi: move twi bit mask macro to twi head file
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:21 +08:00
Steven Miao 2879bb30d7 blackfin: bf60x: enable gptimer clock source
Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:20 +08:00
Scott Jiang e578bbdeb8 blackfin: add spi/sport3/ppi head file for bf60x
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:18 +08:00
Bob Liu 7adede5b9b blackfin: cplb: add support for bf60x
Bf60x support big CPLB pages, this commit enable it.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:16 +08:00
Steven Miao 4f6b600fdc blackfin: mach-common: add sec support for bf60x
Add system event controller support for bf60x so that interrupt can be
handled.

Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:15 +08:00
Steven Miao 969003152a blackfin: bf60x: add clock support
Add clock support for bf60x.

Signed-off-by: Steven Miao <realmz6@gmail.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:13 +08:00
Bob Liu b5affb0147 blackfin: add bf60x to current framework
This patch added bf60x to current blackfin kernel framework.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:12 +08:00
Sonic Zhang 22a8262885 blackfin: mach-bf609: add machine files
Add machine files for bf60x including head files, Kconfig/Makefile and board
file.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:10 +08:00
Bob Liu b2286f2b43 blackfin: asm: fix blackfin.h broken
do{...}while makes no sense in __ASSEMBLY__ code paths.  now
kernels fail to build:
arch/blackfin/mach-bf561/atomic.S: Assembler messages:
arch/blackfin/mach-bf561/atomic.S:48: Error: syntax error. Input text
was do.
arch/blackfin/mach-bf561/atomic.S:48: Error:
arch/blackfin/mach-bf561/atomic.S:48: Error: syntax error. Input text
was }.
arch/blackfin/mach-bf561/atomic.S:48: Error:
arch/blackfin/mach-bf561/atomic.S:53: Error: syntax error. Input text
was do.
arch/blackfin/mach-bf561/atomic.S:53: Error:
arch/blackfin/mach-bf561/atomic.S:53: Error: syntax error. Input text
was }.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:08 +08:00
Bob Liu b1a3c1daf6 blackfin: configs: add SMP support back to BF561-EZKIT-SMP_defconfig
SMP support was removed from BF561-EZKIT-SMP_defconfig in last commit by
mistake, this patch add it back.

Signed-off-by: Bob Liu <lliubbo@gmail.com>
2012-05-21 14:54:06 +08:00
David S. Miller 17eea0df5f Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-20 21:53:04 -04:00
Sam Ravnborg 1edc17832d sparc32: use flushi when run-time patching in per_cpu_patch
Davis S. Miller wrote:
"
The way we do that now is overkill.  We only needed to use the MMU
cache ops when we had sun4c around because sun4c lacked support for
the "flush" instruction.

But all sun4m and later chips have it so we can use it
unconditionally.

So in the per_cpu_patch() code, get rid of the cache ops invocation,
and instead execute a "flush %reg" after each of the instruction patch
assignments, where %reg is set to the address of the instruction that
was stored into.

Perhaps take the flushi() definition from asm/cacheflush_64.h and
place it into asm/cacheflush.h, then you can simply use that.
"

Implemented as per suggestion.
Moved run-time patching before we call paging_init(),
so helper methods in paging_init() may utilise run-time patching too.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-20 13:33:36 -07:00
Sam Ravnborg 9cd5f82246 sparc32: fix cpuid_patch run-time patching
We hang forever when trying to do run-time patching of instructions
identified by the cpuid_patch section

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-20 13:33:35 -07:00
Lee Jones d28f1db818 mfd: Remove confusing ab8500-i2c file and merge into ab8500-core
ab8500-i2c is used as core code to register the ab8500 device.
After allocating ab8500 memory, it immediately calls into
ab8500-core where the real initialisation takes place. This
patch moves all core registration and memory allocation into
the true ab8500-core file and removes ab8500-i2c completely.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-05-20 17:27:10 +02:00
Greg Ungerer 7094ac08cb m68k: add a defconfig for the M5475EVB ColdFire with MMU board
Add a default configuration for the newly supported ColdFire CPUs running
with MMU enabled. This is based on Freescales own M5475EVB demo board.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:23:05 +10:00
Luis Alves b2fb49bf2a m68knommu: unaligned.h fix for M68000 core
This patch fixes unaligned memory access for the 68000 core based cpu's.

Some time ago, my cpu (68000) was raising address/bus error's when mounting
cifs shares (didn't bother to debug it at the time). After developing the
MMC/SD card driver I was having the same issue when mounting the vfat fs.

I've traced the issue down to the 'unaligned.h' file. (I guess nobody has
ever used unaligned.h back in the 68328 'era'.

Signed-off-by: Luis Alves <ljalvs@gmail.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:23:04 +10:00
Greg Ungerer 5641686c23 m68k: merge the MMU and non-MMU versions of the arch dma code
The majority of the m68k architecture dma code is the same, so merge the
current separated files dma_no.c and dma_mm.c back into a single dma.c

The main alloc and free routines are a little different, so we keep a
single #ifdef based on CONFIG_MMU for them. All the other support functions
are now identical.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-05-20 21:22:56 +10:00
Greg Ungerer 1744bd921c m68knommu: reorganize the no-MMU cache flushing to match m68k
Introduce cache_push() and cache_clear() functions for the non-MMU m68k
devices. With these in place we can more easily merge some of the common
m68k arch code.

In particular by reorganizing the __flush_cache_all() code and separating
the cache push and clear functions it becomes trivial to implement the
new cache_push() and cache_clear() functions.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-05-20 21:22:08 +10:00
Greg Ungerer 453549d2e5 m68knommu: move the 54xx platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:07 +10:00
Greg Ungerer e33e73f560 m68knommu: move the 532x platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:06 +10:00
Greg Ungerer 9f8c8c072d m68knommu: move the 5407 platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:05 +10:00
Greg Ungerer 136f148f61 m68knommu: move the 5307 platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:04 +10:00
Greg Ungerer 76148ab8b7 m68knommu: move the 528x platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:04 +10:00
Greg Ungerer 60fb32ca61 m68knommu: move the 527x platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:03 +10:00
Greg Ungerer 40711ccb22 m68knommu: move the 5272 platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:02 +10:00
Greg Ungerer 2d11251168 m68knommu: move the 5249 platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:01 +10:00
Greg Ungerer 4bf648fa98 m68knommu: move the 523x platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:22:00 +10:00
Greg Ungerer a654730ec1 m68knommu: move the 520x platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:21:59 +10:00
Greg Ungerer daacd5cc25 m68knommu: move the 5206 platform code into the common ColdFire code directory
All these separate directories for each ColdFire CPU SoC varient seems like
overkill. The majority of them only contain a single small config file. Move
these into the common ColdFire code directory.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:21:58 +10:00
Greg Ungerer f198f9cd85 m68knommu: simplify the ColdFire 5407 GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:57 +10:00
Greg Ungerer bb70e21b52 m68knommu: simplify the ColdFire 532x GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:56 +10:00
Greg Ungerer 24d4502632 m68knommu: simplify the ColdFire 5307 GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:55 +10:00
Greg Ungerer e774921c17 m68knommu: simplify the ColdFire 528x GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:54 +10:00
Greg Ungerer 748dddb6fa m68knommu: simplify the ColdFire 527x GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:53 +10:00
Greg Ungerer 6621c5cde9 m68knommu: simplify the ColdFire 5272 GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:52 +10:00
Greg Ungerer 60e26cfd0b m68knommu: simplify the ColdFire 5249 GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:51 +10:00
Greg Ungerer 045f8c4af4 m68knommu: simplify the ColdFire 523x GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:50 +10:00
Greg Ungerer a10cf320d8 m68knommu: simplify the ColdFire 520x GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:49 +10:00
Greg Ungerer a75250b3d5 m68knommu: simplify the ColdFire 5206 GPIO struct setup
The GPIO data struct setup is now the only remaining code in the platform
gpio.c file. So move it to the platform config.c code and remove the gpio.c
file.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:48 +10:00
Greg Ungerer f23c144d42 m68knommu: make duplicated ColdFire GPIO init code common for all
The code that adds each ColdFire platforms GPIO signals is duplicated in
each platforms specific code. Remove it from each platforms code and put
a single version in the existing ColdFire gpio subsystem init code.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:47 +10:00
Greg Ungerer 943c0cd0ad m68knommu: switch to GPIO init macros in ColdFire 532x init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:46 +10:00
Greg Ungerer 322eaaff60 m68knommu: switch to GPIO init macros in ColdFire 5407 init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:45 +10:00
Greg Ungerer df1a000e76 m68knommu: switch to GPIO init macros in ColdFire 5307 init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:44 +10:00
Greg Ungerer c222f5f41f m68knommu: switch to GPIO init macros in ColdFire 528x init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

We also need to rename some of the GPIO registers to be consistent with
all other ColdFire parts (we can't use the new GPIO macros otherwise).

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:43 +10:00
Greg Ungerer 174d2ca390 m68knommu: switch to GPIO init macros in ColdFire 527x init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:42 +10:00
Greg Ungerer 26b7c8270b m68knommu: switch to GPIO init macros in ColdFire 5272 init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:41 +10:00
Greg Ungerer 56248926ec m68knommu: switch to GPIO init macros in ColdFire 5249 init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:41 +10:00
Greg Ungerer 32ec635089 m68knommu: switch to GPIO init macros in ColdFire 523x init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:40 +10:00
Greg Ungerer 5d89633d76 m68knommu: switch to GPIO init macros in ColdFire 520x init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:39 +10:00
Greg Ungerer 6f84758edb m68knommu: switch to GPIO init macros in ColdFire 5206 init code
Modify the GPIO setup table to use the mcfgpio.h macros for table init.
Simplifies code and reduces line count significantly.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:38 +10:00
Greg Ungerer c269d4efaa m68knommu: introduce macros to simplify ColdFire GPIO table initialization
We have very large tables in the ColdFire CPU GPIO setup code that essentially
boil down to 2 distinct types of GPIO pin initiaization. Using 2 macros we can
reduce these large tables to at most a dozen lines of setup code, and in quite
a few cases a single table entry.

Introduce these 2 macros into the existing mcfgpio.h header.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Steven King <sfking@fdwdc.com>
2012-05-20 21:21:35 +10:00
Ezequiel Garcia f106eac91e m68k: fix compiler warning by properly inlining flat_set_persistent()
This patch removes the following warning:
fs/binfmt_flat.c:752: warning: unused variable 'persistent'.
There is neither functionality change, nor extra code generated.

Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
2012-05-20 21:21:33 +10:00
Greg Ungerer 0c22fafd31 m68k: merge the MMU and non-MMU signal.c code
The MMU (signal_mm.c) and non-MMU (signal_no.c) versions of the m68k
architecture signal handling code are very similar. Most of their code is
the same.

Merge the two back into a single signal.c, and move some of the code around
inside the file to minimize the number of #ifdefs required. Specificially
we can group out the CONFIG_FPU and the CONFIG_MMU code. We end up needing
a few other "#ifdef CONFIG_MMU" as well, but not too many.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
2012-05-20 21:21:08 +10:00
Sam Ravnborg 8578149904 sparc32: drop unused inline functions in srmmu.c
When decelared inline the compiler does not warn
about unused functions.
But they are not used so drop them.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19 23:27:40 -07:00
Sam Ravnborg 3d5f7d37c8 sparc32: drop unused functions in pgtsrmmu.h
One function was only used by leon - move it to a leon specific file.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19 23:27:39 -07:00
Sam Ravnborg accf032cfa sparc32,leon: move leon mmu functions to leon_mm.c
We already have a leaon specific file - so
keep all the laon stuff in one place.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Konrad Eisele <konrad@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19 23:27:38 -07:00
Sam Ravnborg f6678d3b41 sparc32,leon: remove duplicate definitions in leon.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Konrad Eisele <konrad@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-05-19 23:27:37 -07:00