1. 17 5月, 2012 5 次提交
    • W
      ARM: 7419/1: vfp: fix VFP flushing regression on sigreturn path · 56cb2484
      Will Deacon 提交于
      Commit ff9a184c ("ARM: 7400/1: vfp: clear fpscr length and stride bits
      on entry to sig handler") flushes the VFP state prior to entering a
      signal handler so that a VFP operation inside the handler will trap and
      force a restore of ABI-compliant registers. Reflushing and disabling VFP
      on the sigreturn path is predicated on the saved thread state indicating
      that VFP was used by the handler -- however for SMP platforms this is
      only set on context-switch, making the check unreliable and causing VFP
      register corruption in userspace since the register values are not
      necessarily those restored from the sigframe.
      
      This patch unconditionally flushes the VFP state after a signal handler.
      Since we already perform the flush before the handler and the flushing
      itself happens lazily, the redundant flush when VFP is not used by the
      handler is essentially a nop.
      Reported-by: NJon Medhurst <tixy@linaro.org>
      Signed-off-by: NJon Medhurst <tixy@linaro.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      56cb2484
    • V
      ARM: 7418/1: LPAE: fix access flag setup in mem_type_table · 1a3abcf4
      Vitaly Andrianov 提交于
      A zero value for prot_sect in the memory types table implies that
      section mappings should never be created for the memory type in question.
      This is checked for in alloc_init_section().
      
      With LPAE, we set a bit to mask access flag faults for kernel mappings.
      This breaks the aforementioned (!prot_sect) check in alloc_init_section().
      
      This patch fixes this bug by first checking for a non-zero
      prot_sect before setting the PMD_SECT_AF flag.
      Signed-off-by: NVitaly Andrianov <vitalya@ti.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      1a3abcf4
    • B
      ARM: PRIMA2: fix irq domain size and IRQ mask of internal interrupt controller · ad3b8a83
      Barry Song 提交于
      the old codes will cause 3.4 kernel warning as irq domain size is wrong:
      ------------[ cut here ]------------
      WARNING: at kernel/irq/irqdomain.c:74 irq_domain_legacy_revmap+0x24/0x48()
      Modules linked in:
      [<c0013f50>] (unwind_backtrace+0x0/0xf8) from [<c001e7d8>] (warn_slowpath_common+0x54/0x64)
      [<c001e7d8>] (warn_slowpath_common+0x54/0x64) from [<c001e804>] (warn_slowpath_null+0x1c/0x24)
      [<c001e804>] (warn_slowpath_null+0x1c/0x24) from [<c005c3c4>] (irq_domain_legacy_revmap+0x24/0x48)
      [<c005c3c4>] (irq_domain_legacy_revmap+0x24/0x48) from [<c005c704>] (irq_create_mapping+0x20/0x120)
      [<c005c704>] (irq_create_mapping+0x20/0x120) from [<c005c880>] (irq_create_of_mapping+0x7c/0xf0)
      [<c005c880>] (irq_create_of_mapping+0x7c/0xf0) from [<c01a6c48>] (irq_of_parse_and_map+0x2c/0x34)
      [<c01a6c48>] (irq_of_parse_and_map+0x2c/0x34) from [<c01a6c68>] (of_irq_to_resource+0x18/0x74)
      [<c01a6c68>] (of_irq_to_resource+0x18/0x74) from [<c01a6ce8>] (of_irq_count+0x24/0x34)
      [<c01a6ce8>] (of_irq_count+0x24/0x34) from [<c01a7220>] (of_device_alloc+0x58/0x158)
      [<c01a7220>] (of_device_alloc+0x58/0x158) from [<c01a735c>] (of_platform_device_create_pdata+0x3c/0x80)
      [<c01a735c>] (of_platform_device_create_pdata+0x3c/0x80) from [<c01a7468>] (of_platform_bus_create+0xc8/0x190)
      [<c01a7468>] (of_platform_bus_create+0xc8/0x190) from [<c01a74cc>] (of_platform_bus_create+0x12c/0x190)
      ---[ end trace 1b75b31a2719ed32 ]---
      Signed-off-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      ad3b8a83
    • C
      arch/tile: apply commit 74fca9da to the compat signal handling as well · a134d228
      Chris Metcalf 提交于
      This passes siginfo and mcontext to tilegx32 signal handlers that
      don't have SA_SIGINFO set just as we have been doing for tilegx64.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      a134d228
    • C
      arch/tile: fix up some issues in calling do_work_pending() · fc327e26
      Chris Metcalf 提交于
      First, we were at risk of handling thread-info flags, in particular
      do_signal(), when returning from kernel space.  This could happen
      after a failed kernel_execve(), or when forking a kernel thread.
      The fix is to test in do_work_pending() for user_mode() and return
      immediately if so; we already had this test for one of the flags,
      so I just hoisted it to the top of the function.
      
      Second, if a ptraced process updated the callee-saved registers
      in the ptregs struct and then processed another thread-info flag, we
      would overwrite the modifications with the original callee-saved
      registers.  To fix this, we add a register to note if we've already
      saved the registers once, and skip doing it on additional passes
      through the loop.  To avoid a performance hit from the couple of
      extra instructions involved, I modified the GET_THREAD_INFO() macro
      to be guaranteed to be one instruction, then bundled it with adjacent
      instructions, yielding an overall net savings.
      Reported-By: NAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
      fc327e26
  2. 16 5月, 2012 8 次提交
  3. 15 5月, 2012 3 次提交
  4. 13 5月, 2012 7 次提交
  5. 12 5月, 2012 2 次提交
  6. 11 5月, 2012 6 次提交
    • R
      parisc: move definition of PAGE0 to asm/page.h · 4a8a0788
      Rolf Eike Beer 提交于
      This was defined in asm/pdc.h which needs to include asm/page.h for
      __PAGE_OFFSET. This leads to an include loop so that page.h eventually will
      include pdc.h again. While this is no problem because of header guards, it is
      a problem because some symbols may be undefined. Such an error is this:
      
      In file included from include/linux/bitops.h:35:0,
                       from include/asm-generic/getorder.h:7,
                       from arch/parisc/include/asm/page.h:162,
                       from arch/parisc/include/asm/pdc.h:346,
                       from arch/parisc/include/asm/processor.h:16,
                       from arch/parisc/include/asm/spinlock.h:6,
                       from arch/parisc/include/asm/atomic.h:20,
                       from include/linux/atomic.h:4,
                       from include/linux/sysfs.h:20,
                       from include/linux/kobject.h:21,
                       from include/linux/device.h:17,
                       from include/linux/eisa.h:5,
                       from arch/parisc/kernel/pci.c:11:
      arch/parisc/include/asm/bitops.h: In function ‘set_bit’:
      arch/parisc/include/asm/bitops.h:82:2: error: implicit declaration of function ‘_atomic_spin_lock_irqsave’ [-Werror=implicit-function-declaration]
      arch/parisc/include/asm/bitops.h:84:2: error: implicit declaration of function ‘_atomic_spin_unlock_irqrestore’ [-Werror=implicit-function-declaration]
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4a8a0788
    • R
      parisc: add missing include of asm/page.h to asm/pgtable.h · 9b05b1ec
      Rolf Eike Beer 提交于
      Fixes these errors:
      
      In file included from arch/parisc/include/asm/io.h:5:0,
                       from include/linux/io.h:22,
                       from include/linux/pci.h:54,
                       from arch/parisc/kernel/setup.c:35:
      arch/parisc/include/asm/pgtable.h:92:6: warning: "PAGE_SHIFT" is not defined [-Wundef]
      arch/parisc/include/asm/pgtable.h:92:6: warning: "PAGE_SHIFT" is not defined [-Wundef]
      arch/parisc/include/asm/pgtable.h:92:6: warning: "BITS_PER_PTE_ENTRY" is not defined [-Wundef]
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9b05b1ec
    • R
      parisc: drop include of asm/pdc.h from asm/hardware.h · 6eb608f5
      Rolf Eike Beer 提交于
      It seems none of the symbols defined by pdc.h is needed, but it introduces an
      include loop causing compile errors:
      
      In file included from arch/parisc/include/asm/spinlock.h:4:0,
                       from arch/parisc/include/asm/atomic.h:20,
                       from include/linux/atomic.h:4,
                       from arch/parisc/include/asm/bitops.h:56,
                       from include/linux/bitops.h:35,
                       from include/asm-generic/getorder.h:7,
                       from arch/parisc/include/asm/page.h:162,
                       from arch/parisc/include/asm/pdc.h:346,
                       from arch/parisc/include/asm/hardware.h:5,
                       from arch/parisc/kernel/hardware.c:30:
      arch/parisc/include/asm/processor.h:74:16: error: field ‘cpu_type’ has incomplete type
      arch/parisc/include/asm/processor.h:77:20: error: field ‘model’ has incomplete type
      arch/parisc/include/asm/processor.h: In function ‘parisc_requires_coherency’:
      arch/parisc/include/asm/processor.h:349:36: error: ‘mako’ undeclared (first use in this function)
      arch/parisc/include/asm/processor.h:349:36: note: each undeclared identifier is reported only once for each function it appears in
      arch/parisc/include/asm/processor.h:350:30: error: ‘mako2’ undeclared (first use in this function)
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Acked-by: NGrant Grundler <grantgrundler@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6eb608f5
    • R
      parisc: add missing forward declarations in asm/hardware.h · 25fe853d
      Rolf Eike Beer 提交于
      Fixes this warnings:
      
      In file included from arch/parisc/include/asm/processor.h:15:0,
                       from arch/parisc/include/asm/spinlock.h:4,
                       from arch/parisc/include/asm/atomic.h:20,
                       from include/linux/atomic.h:4,
                       from arch/parisc/include/asm/bitops.h:11,
                       from include/linux/bitops.h:22,
                       from include/linux/kernel.h:19,
                       from include/linux/sched.h:55,
                       from arch/parisc/kernel/asm-offsets.c:31:
      arch/parisc/include/asm/hardware.h:106:10: warning: ‘struct hardware_path’ declared inside parameter list [enabled by default]
      arch/parisc/include/asm/hardware.h:106:10: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
      arch/parisc/include/asm/hardware.h:116:59: warning: ‘struct hardware_path’ declared inside parameter list [enabled by default]
      arch/parisc/include/asm/hardware.h:118:47: warning: ‘struct hardware_path’ declared inside parameter list [enabled by default]
      arch/parisc/include/asm/hardware.h:119:57: warning: ‘struct hardware_path’ declared inside parameter list [enabled by default]
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      25fe853d
    • R
      parisc: add missing includes in asm/spinlock.h · 1cab4201
      Rolf Eike Beer 提交于
      This leads to this errors:
      
      In file included from arch/parisc/include/asm/atomic.h:20:0,
                       from include/linux/atomic.h:4,
                       from arch/parisc/include/asm/bitops.h:56,
                       from include/linux/bitops.h:22,
                       from include/linux/kernel.h:19,
                       from include/linux/sched.h:55,
                       from arch/parisc/kernel/asm-offsets.c:31:
      arch/parisc/include/asm/spinlock.h: In function ‘arch_spin_is_locked’:
      arch/parisc/include/asm/spinlock.h:9:2: error: implicit declaration of function ‘__ldcw_align’ [-Werror=implicit-function-declaration]
      arch/parisc/include/asm/spinlock.h:9:29: warning: initialization makes pointer from integer without a cast [enabled by default]
      arch/parisc/include/asm/spinlock.h: In function ‘arch_spin_lock_flags’:
      arch/parisc/include/asm/spinlock.h:22:2: error: implicit declaration of function ‘mb’ [-Werror=implicit-function-declaration]
      arch/parisc/include/asm/spinlock.h:23:4: warning: assignment makes pointer from integer without a cast [enabled by default]
      arch/parisc/include/asm/spinlock.h:24:2: error: implicit declaration of function ‘__ldcw’ [-Werror=implicit-function-declaration]
      Signed-off-by: NRolf Eike Beer <eike-kernel@sf-tec.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1cab4201
    • D
      sparc64: Do not clobber %g2 in xcall_fetch_glob_regs(). · a5a737e0
      David S. Miller 提交于
      %g2 is meant to hold the CPUID number throughout this routine, since
      at the very beginning, and at the very end, we use %g2 to calculate
      indexes into per-cpu arrays.
      
      However we erroneously clobber it in order to hold the %cwp register
      value mid-stream.
      
      Fix this code to use %g3 for the %cwp read and related calulcations
      instead.
      Reported-by: NMeelis Roos <mroos@linux.ee>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a5a737e0
  7. 09 5月, 2012 7 次提交
  8. 08 5月, 2012 2 次提交
    • D
      KVM: PPC: Book3S HV: Fix refcounting of hugepages · de6c0b02
      David Gibson 提交于
      The H_REGISTER_VPA hcall implementation in HV Power KVM needs to pin some
      guest memory pages into host memory so that they can be safely accessed
      from usermode.  It does this used get_user_pages_fast().  When the VPA is
      unregistered, or the VCPUs are cleaned up, these pages are released using
      put_page().
      
      However, the get_user_pages() is invoked on the specific memory are of the
      VPA which could lie within hugepages.  In case the pinned page is huge,
      we explicitly find the head page of the compound page before calling
      put_page() on it.
      
      At least with the latest kernel, this is not correct.  put_page() already
      handles finding the correct head page of a compound, and also deals with
      various counts on the individual tail page which are important for
      transparent huge pages.  We don't support transparent hugepages on Power,
      but even so, bypassing this count maintenance can lead (when the VM ends)
      to a hugepage being released back to the pool with a non-zero mapcount on
      one of the tail pages.  This can then lead to a bad_page() when the page
      is released from the hugepage pool.
      
      This removes the explicit compound_head() call to correct this bug.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      de6c0b02
    • J
      x86: Fix section annotation of acpi_map_cpu2node() · b2a34777
      Jan Beulich 提交于
      Commit 943bc7e1 ("x86: Fix section warnings") added
      __cpuinitdata here, while for functions __cpuinit should be
      used.
      Signed-off-by: NJan Beulich <jbeulich@suse.com>
      Cc: <sp@numascale.com>
      Link: http://lkml.kernel.org/r/4FA947910200007800082470@nat28.tlf.novell.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      Cc: Steffen Persvold <sp@numascale.com>
      b2a34777