1. 23 3月, 2011 1 次提交
  2. 17 3月, 2011 1 次提交
  3. 15 3月, 2011 3 次提交
  4. 11 3月, 2011 2 次提交
    • M
      futex: Sanitize futex ops argument types · 8d7718aa
      Michel Lespinasse 提交于
      Change futex_atomic_op_inuser and futex_atomic_cmpxchg_inatomic
      prototypes to use u32 types for the futex as this is the data type the
      futex core code uses all over the place.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20110311025058.GD26122@google.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      8d7718aa
    • M
      futex: Sanitize cmpxchg_futex_value_locked API · 37a9d912
      Michel Lespinasse 提交于
      The cmpxchg_futex_value_locked API was funny in that it returned either
      the original, user-exposed futex value OR an error code such as -EFAULT.
      This was confusing at best, and could be a source of livelocks in places
      that retry the cmpxchg_futex_value_locked after trying to fix the issue
      by running fault_in_user_writeable().
          
      This change makes the cmpxchg_futex_value_locked API more similar to the
      get_futex_value_locked one, returning an error code and updating the
      original value through a reference argument.
      Signed-off-by: NMichel Lespinasse <walken@google.com>
      Acked-by: Chris Metcalf <cmetcalf@tilera.com>  [tile]
      Acked-by: Tony Luck <tony.luck@intel.com>  [ia64]
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Tested-by: Michal Simek <monstr@monstr.eu>  [microblaze]
      Acked-by: David Howells <dhowells@redhat.com> [frv]
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Matt Turner <mattst88@gmail.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20110311024851.GC26122@google.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      37a9d912
  5. 18 2月, 2011 1 次提交
  6. 15 2月, 2011 1 次提交
    • F
      sh: Change __nosave_XXX symbols to long · 13c12a4e
      Francesco Virlinzi 提交于
      This patch changes the:
       - __nosave_begin
       - __nosave_end
      symbols from 'void' to 'long' as required by the latest
      Gcc (4.5.2) which raises the compilation error:
      
      cc1: warnings being treated as errors
      arch/sh/kernel/swsusp.c: In function 'pfn_is_nosave':
      arch/sh/kernel/swsusp.c:24:28: error: taking address of expression of type 'void'
      arch/sh/kernel/swsusp.c:25:26: error: taking address of expression of type 'void'
      arch/sh/kernel/swsusp.c:25:26: error: taking address of expression of type 'void'
      arch/sh/kernel/swsusp.c:25:26: error: taking address of expression of type 'void'
      Signed-off-by: NFrancesco Virlinzi <francesco.virlinzi@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      13c12a4e
  7. 27 1月, 2011 5 次提交
  8. 14 1月, 2011 1 次提交
    • P
      sh: Fix up breakage from asm-generic/pgtable.h changes. · 8f82f0c7
      Paul Mundt 提交于
      We require a forward declaration for mm_struct:
      
      In file included from arch/sh/include/asm/pgtable.h:163,
                       from arch/sh/include/asm/io.h:21,
                       from arch/sh/kernel/machvec.c:20:
      include/asm-generic/pgtable.h:104: error: 'struct mm_struct' declared inside parameter list
      include/asm-generic/pgtable.h: In function 'ptep_get_and_clear_full':
      include/asm-generic/pgtable.h:107: error: passing argument 1 of 'ptep_get_and_clear' from incompatible pointer type
      include/asm-generic/pgtable.h:70: note: expected 'struct mm_struct *' but argument is of type 'struct mm_struct *'
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      8f82f0c7
  9. 13 1月, 2011 1 次提交
  10. 11 1月, 2011 5 次提交
  11. 05 1月, 2011 1 次提交
  12. 24 12月, 2010 1 次提交
    • P
      sh: Tidy up SH-4A unaligned load support. · 1dee92bb
      Paul Mundt 提交于
      The current implementation was rather tied to the packed_struct.h
      definitions, which immediately began to clash when the packed_struct.h
      types changed and drivers began to include packed_struct.h directly.
      
      In order to support this sort of use it's necessary to get out of the way
      with regards to namespace collisions, and at the same time we can also
      kill off some duplicate code now that the unaligned headers are a bit
      more broken out.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      1dee92bb
  13. 17 12月, 2010 1 次提交
  14. 14 12月, 2010 1 次提交
  15. 01 12月, 2010 1 次提交
    • P
      sh: Assume new page cache pages have dirty dcache lines. · 55661fc1
      Paul Mundt 提交于
      This follows the ARM change c0177800
      ("ARM: 6379/1: Assume new page cache pages have dirty D-cache") for the
      same rationale:
      
          There are places in Linux where writes to newly allocated page
          cache pages happen without a subsequent call to flush_dcache_page()
          (several PIO drivers including USB HCD). This patch changes the
          meaning of PG_arch_1 to be PG_dcache_clean and always flush the
          D-cache for a newly mapped page in update_mmu_cache().
      
      This addresses issues seen with executing binaries from MMC, in
      addition to some of the other HCDs that don't explicitly do cache
      management for their pipe-in buffers.
      Requested-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      55661fc1
  16. 26 11月, 2010 1 次提交
  17. 18 11月, 2010 1 次提交
    • G
      sh: Use GCC __builtin_prefetch() to implement prefetch(). · d53e4307
      Giuseppe CAVALLARO 提交于
      GCC's __builtin_prefetch() was introduced a long time ago, all
      supported GCC versions have it. So this patch is to use it for
      implementing the prefetch on SH2A and SH4.
      
      The current  prefetch implementation is almost equivalent with
      __builtin_prefetch.
      The third parameter in the __builtin_prefetch is the locality
      that it's not supported on SH architectures.  It has been set
      to three and it should be verified if it's suitable for SH2A
      as well. I didn't test on this architecture.
      
      The builtin usage should be more efficient that an __asm__
      because less barriers, and because the compiler doesn't see the
      inst as a "black box" allowing better code generation.
      
      This has been already done on other architectures (see the commit:
      0453fb3c).
      
      Many thanks to Christian Bruel <christain.bruel@st.com> for his
      support on evaluate the impact of the gcc built-in on SH4 arch.
      
      No regressions found while testing with LMbench on STLinux targets.
      Signed-off-by: NGiuseppe Cavallaro <peppe.cavallaro@st.com>
      Signed-off-by: NStuart Menefy <stuart.menefy@st.com>
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      d53e4307
  18. 04 11月, 2010 3 次提交
  19. 01 11月, 2010 1 次提交
    • P
      sh: machvec IO death. · 37b7a978
      Paul Mundt 提交于
      This takes a bit of a sledgehammer to the machvec I/O routines. The
      iomem case requires no special casing and so can just be dropped
      outright. This only leaves the ioport casing for PCI and SuperIO
      mangling. With the SuperIO case going through the standard ioport
      mapping, it's possible to replace everything with generic routines.
      
      With this done the standard I/O routines are tidied up and NO_IOPORT
      now gets default-enabled for the vast majority of boards.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      37b7a978
  20. 27 10月, 2010 2 次提交
  21. 26 10月, 2010 1 次提交
    • P
      sh: Expose physical addressing mode through cpuinfo. · 2f98492c
      Paul Mundt 提交于
      CPUs can be in either the legacy 29-bit or 32-bit physical addressing
      modes. This follows the x86 approach of tracking the phys bits in cpuinfo
      and exposing it to userspace through procfs.
      
      This change was requested to permit kexec-tools to detect the physical
      addressing mode in order to determine the appropriate address mangling.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      2f98492c
  22. 19 10月, 2010 1 次提交
    • P
      irq_work: Add generic hardirq context callbacks · e360adbe
      Peter Zijlstra 提交于
      Provide a mechanism that allows running code in IRQ context. It is
      most useful for NMI code that needs to interact with the rest of the
      system -- like wakeup a task to drain buffers.
      
      Perf currently has such a mechanism, so extract that and provide it as
      a generic feature, independent of perf so that others may also
      benefit.
      
      The IRQ context callback is generated through self-IPIs where
      possible, or on architectures like powerpc the decrementer (the
      built-in timer facility) is set to generate an interrupt immediately.
      
      Architectures that don't have anything like this get to do with a
      callback from the timer tick. These architectures can call
      irq_work_run() at the tail of any IRQ handlers that might enqueue such
      work (like the perf IRQ handler) to avoid undue latencies in
      processing the work.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NKyle McMartin <kyle@mcmartin.ca>
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      [ various fixes ]
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      LKML-Reference: <1287036094.7768.291.camel@yhuang-dev>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e360adbe
  23. 15 10月, 2010 2 次提交
  24. 13 10月, 2010 1 次提交
  25. 07 10月, 2010 1 次提交
    • D
      Fix IRQ flag handling naming · df9ee292
      David Howells 提交于
      Fix the IRQ flag handling naming.  In linux/irqflags.h under one configuration,
      it maps:
      
      	local_irq_enable() -> raw_local_irq_enable()
      	local_irq_disable() -> raw_local_irq_disable()
      	local_irq_save() -> raw_local_irq_save()
      	...
      
      and under the other configuration, it maps:
      
      	raw_local_irq_enable() -> local_irq_enable()
      	raw_local_irq_disable() -> local_irq_disable()
      	raw_local_irq_save() -> local_irq_save()
      	...
      
      This is quite confusing.  There should be one set of names expected of the
      arch, and this should be wrapped to give another set of names that are expected
      by users of this facility.
      
      Change this to have the arch provide:
      
      	flags = arch_local_save_flags()
      	flags = arch_local_irq_save()
      	arch_local_irq_restore(flags)
      	arch_local_irq_disable()
      	arch_local_irq_enable()
      	arch_irqs_disabled_flags(flags)
      	arch_irqs_disabled()
      	arch_safe_halt()
      
      Then linux/irqflags.h wraps these to provide:
      
      	raw_local_save_flags(flags)
      	raw_local_irq_save(flags)
      	raw_local_irq_restore(flags)
      	raw_local_irq_disable()
      	raw_local_irq_enable()
      	raw_irqs_disabled_flags(flags)
      	raw_irqs_disabled()
      	raw_safe_halt()
      
      with type checking on the flags 'arguments', and then wraps those to provide:
      
      	local_save_flags(flags)
      	local_irq_save(flags)
      	local_irq_restore(flags)
      	local_irq_disable()
      	local_irq_enable()
      	irqs_disabled_flags(flags)
      	irqs_disabled()
      	safe_halt()
      
      with tracing included if enabled.
      
      The arch functions can now all be inline functions rather than some of them
      having to be macros.
      
      Signed-off-by: David Howells <dhowells@redhat.com> [X86, FRV, MN10300]
      Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> [Tile]
      Signed-off-by: Michal Simek <monstr@monstr.eu> [Microblaze]
      Tested-by: Catalin Marinas <catalin.marinas@arm.com> [ARM]
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [AVR]
      Acked-by: Tony Luck <tony.luck@intel.com> [IA-64]
      Acked-by: Hirokazu Takata <takata@linux-m32r.org> [M32R]
      Acked-by: Greg Ungerer <gerg@uclinux.org> [M68K/M68KNOMMU]
      Acked-by: Ralf Baechle <ralf@linux-mips.org> [MIPS]
      Acked-by: Kyle McMartin <kyle@mcmartin.ca> [PA-RISC]
      Acked-by: Paul Mackerras <paulus@samba.org> [PowerPC]
      Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> [S390]
      Acked-by: Chen Liqin <liqin.chen@sunplusct.com> [Score]
      Acked-by: Matt Fleming <matt@console-pimps.org> [SH]
      Acked-by: David S. Miller <davem@davemloft.net> [Sparc]
      Acked-by: Chris Zankel <chris@zankel.net> [Xtensa]
      Reviewed-by: Richard Henderson <rth@twiddle.net> [Alpha]
      Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp> [H8300]
      Cc: starvik@axis.com [CRIS]
      Cc: jesper.nilsson@axis.com [CRIS]
      Cc: linux-cris-kernel@axis.com
      df9ee292