1. 01 12月, 2012 1 次提交
    • V
      x86, fpu: Avoid FPU lazy restore after suspend · 644c1541
      Vincent Palatin 提交于
      When a cpu enters S3 state, the FPU state is lost.
      After resuming for S3, if we try to lazy restore the FPU for a process running
      on the same CPU, this will result in a corrupted FPU context.
      
      Ensure that "fpu_owner_task" is properly invalided when (re-)initializing a CPU,
      so nobody will try to lazy restore a state which doesn't exist in the hardware.
      
      Tested with a 64-bit kernel on a 4-core Ivybridge CPU with eagerfpu=off,
      by doing thousands of suspend/resume cycles with 4 processes doing FPU
      operations running. Without the patch, a process is killed after a
      few hundreds cycles by a SIGFPE.
      
      Cc: Duncan Laurie <dlaurie@chromium.org>
      Cc: Olof Johansson <olofj@chromium.org>
      Cc: <stable@kernel.org> v3.4+ # for 3.4 need to replace this_cpu_write by percpu_write
      Signed-off-by: NVincent Palatin <vpalatin@chromium.org>
      Link: http://lkml.kernel.org/r/1354306532-1014-1-git-send-email-vpalatin@chromium.orgSigned-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      644c1541
  2. 29 11月, 2012 7 次提交
  3. 28 11月, 2012 2 次提交
    • W
      ARM: 7586/1: sp804: set cpumask to cpu_possible_mask for clock event device · ea3aacf5
      Will Deacon 提交于
      The SP804 driver statically initialises the cpumask of the clock event
      device to be cpu_all_mask, which is derived from the compile-time
      constant NR_CPUS. This breaks SMP_ON_UP systems where the interrupt
      controller handling the sp804 doesn't have the irq_set_affinity callback
      on the irq_chip, because the common timer code fails to identify the
      device as cpu-local and ends up treating it as a broadcast device
      instead.
      
      This patch fixes the problem by using cpu_possible_mask at runtime,
      which will correctly represent the possible CPUs when SMP_ON_UP is being
      used.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ea3aacf5
    • H
      x86-32: Unbreak booting on some 486 clones · 6662c34f
      H. Peter Anvin 提交于
      There appear to have been some 486 clones, including the "enhanced"
      version of Am486, which have CPUID but not CR4.  These 486 clones had
      only the FPU flag, if any, unlike the Intel 486s with CPUID, which
      also had VME and therefore needed CR4.
      
      Therefore, look at the basic CPUID flags and require at least one bit
      other than bit 0 before we modify CR4.
      
      Thanks to Christian Ludloff of sandpile.org for confirming this as a
      problem.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      6662c34f
  4. 27 11月, 2012 3 次提交
    • H
      x86, kvm: Remove incorrect redundant assembly constraint · cb7cb286
      H. Peter Anvin 提交于
      In __emulate_1op_rax_rdx, we use "+a" and "+d" which are input/output
      constraints, and *then* use "a" and "d" as input constraints.  This is
      incorrect, but happens to work on some versions of gcc.
      
      However, it breaks gcc with -O0 and icc, and may break on future
      versions of gcc.
      Reported-and-tested-by: NMelanie Blower <melanie.blower@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Link: http://lkml.kernel.org/r/B3584E72CFEBED439A3ECA9BCE67A4EF1B17AF90@FMSMSX107.amr.corp.intel.comReviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Acked-by: NMarcelo Tosatti <mtosatti@redhat.com>
      cb7cb286
    • M
      c6x: fix misleading comment · 9c0603f4
      Mark Salter 提交于
      A comment in entry.S incorrectly stated that interrupt vectors
      called __do_IRQ() and that int6 vector was used for syscalls.
      Both statements are incorrect for the current kernel, so this
      patch cleans up the wording to reflect current reality.
      Signed-off-by: NMark Salter <msalter@redhat.com>
      9c0603f4
    • M
      c6x: run do_notify_resume with interrupts enabled · 9d34340e
      Mark Salter 提交于
      C6x was mistakenly running do_notify_resume with interrupts disabled.
      This would triggerlead to a warning in local_bh_enable() because interrupts
      were disabled:
      
      ------------[ cut here ]------------
      WARNING: at /es/linux/linux-next/kernel/softirq.c:160 local_bh_enable+0x5c/0x10c()
      Modules linked in:
      
                   e02f384d e002cda8 e02f3469 e02f384d 000000a0 e00363fc e01cce58 e5005c00
                   e0327986 00000000 e63c0aec 00000164 e00363fc 00000000 fffffffe e5005c00
                   e61fde00 e0268184 00000134 e01c91dc 00000001 fffffffe 00000000 10000100
                   e01c80e4 e5005c00 00000000 00000000 00000000 e63c0aec e526ce00 10000100
                   e628f920 e63c0a88 e6010410 e6449750 e5005c20 00000000 00000000 e63c0a80
                   e5005c20 e01c8590 e63c0a80 e5005c20 e63c0aec e00a0554 e009c758 e639e860
       irq_spurious_proc_fops+0x6ad/0x3438
       warn_slowpath_common+0x8c/0xb8
       irq_spurious_proc_fops+0x2c9/0x3438
       irq_spurious_proc_fops+0x6ad/0x3438
       local_bh_enable+0x5c/0x10c
       sk_alloc+0x34/0xa4
       local_bh_enable+0x5c/0x10c
       unix_release_sock+0x5c/0x2a0
       sys_connect+0x94/0xd4
       sock_release+0x38/0x104
       sock_close+0x3c/0x54
       __fput+0x154/0x2ec
       filp_close+0xc0/0xe4
       task_work_run+0xdc/0x12c
       sys_close+0x2c/0x74
       resume_userspace+0x0/0x30
      ---[ end trace a70cbd610ae1f6b4 ]---
      
      This patch enables interrupts before calling do_notify_resume().
      Signed-off-by: NMark Salter <msalter@redhat.com>
      9d34340e
  5. 26 11月, 2012 1 次提交
  6. 24 11月, 2012 3 次提交
  7. 23 11月, 2012 2 次提交
  8. 22 11月, 2012 12 次提交
    • A
      [PARISC] fix user-triggerable panic on parisc · 441a179d
      Al Viro 提交于
      int sys32_rt_sigprocmask(int how, compat_sigset_t __user *set, compat_sigset_t __user *oset,
                                          unsigned int sigsetsize)
      {
              sigset_t old_set, new_set;
              int ret;
      
              if (set && get_sigset32(set, &new_set, sigsetsize))
      
      ...
      static int
      get_sigset32(compat_sigset_t __user *up, sigset_t *set, size_t sz)
      {
              compat_sigset_t s;
              int r;
      
              if (sz != sizeof *set) panic("put_sigset32()");
      
      In other words, rt_sigprocmask(69, (void *)69, 69) done by 32bit process
      will promptly panic the box.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      441a179d
    • A
      IXP4xx: use __iomem for MMIO · 0d2c9f05
      Arnd Bergmann 提交于
      The ixp4xx queue manager uses "const struct qmgr_regs __iomem *" as the
      type for a pointer that is passed to __raw_writel, which is not
      allowed because of the const-ness.
      
      Dropping the 'const' keyword fixes the problem. While we're here,
      let's also drop the useless type cast.
      
      Without this patch, building ixp4xx_defconfig results in:
      
      In file included from arch/arm/mach-ixp4xx/ixp4xx_qmgr.c:15:0:
      arch/arm/mach-ixp4xx/include/mach/qmgr.h: In function 'qmgr_put_entry':
      arch/arm/mach-ixp4xx/include/mach/qmgr.h:96:2: warning: passing argument 2 of '__raw_writel' discards 'const' qualifier from pointer target type [enabled by default]
      arch/arm/include/asm/io.h:88:91: note: expected 'volatile void *' but argument is of type 'const u32 *'
      In file included from drivers/net/ethernet/xscale/ixp4xx_eth.c:41:0:
      arch/arm/mach-ixp4xx/include/mach/qmgr.h: In function 'qmgr_put_entry':
      arch/arm/mach-ixp4xx/include/mach/qmgr.h:96:2: warning: passing argument 2 of '__raw_writel' discards 'const' qualifier from pointer target type [enabled by default]
      arch/arm/include/asm/io.h:88:91: note: expected 'volatile void *' but argument is of type 'const u32 *'
      arch/arm/mach-ixp4xx/ixp4xx_qmgr.c: In function 'qmgr_set_irq':
      arch/arm/mach-ixp4xx/ixp4xx_qmgr.c:41:9: warning: passing argument 2 of '__raw_writel' discards 'const' qualifier from pointer target type [enabled by default]
      arch/arm/include/asm/io.h:88:91: note: expected 'volatile void *' but argument is of type 'const u32 *'
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NKrzysztof Hałasa <khc@pm.waw.pl>
      0d2c9f05
    • K
      b7b23db7
    • K
      IXP4xx: Always ioremap() Queue Manager MMIO region at boot. · f0cdb153
      Krzysztof Hałasa 提交于
      It doesn't make much sense to map QMgr dynamically - we almost always need it
      and the static mapping will be needed for little-endian data-coherent operation
      (to make QMgr region value-coherent).
      Signed-off-by: NKrzysztof Hałasa <khc@pm.waw.pl>
      f0cdb153
    • T
      ixp4xx: Declare MODULE_FIRMWARE usage · 05cd3db0
      Tim Gardner 提交于
      Cc: Krzysztof Halasa <khc@pm.waw.pl>
      Cc: Imre Kaloz <kaloz@openwrt.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: linux-arm-kernel@lists.infradead.org
      Signed-off-by: NTim Gardner <tim.gardner@canonical.com>
      Signed-off-by: NKrzysztof Hałasa <khc@pm.waw.pl>
      05cd3db0
    • K
    • K
      87ba5c6a
    • K
      3043c5c8
    • I
      ARM - OMAP: ads7846: fix pendown debounce setting · 0a0d6285
      Igor Grinberg 提交于
      Commit 97ee9f01 (ARM: OMAP: fix the ads7846 init code) have enabled the
      pendown GPIO debounce time setting by the below sequence:
      
        gpio_request_one()
        gpio_set_debounce()
        gpio_free()
      
      It also revealed a bug in the OMAP GPIO handling code which prevented
      the GPIO debounce clock to be disabled and CORE transition to low power
      states.
      
      Commit c9c55d92 (gpio/omap: fix off-mode bug: clear debounce settings on
      free/reset) fixes the OMAP GPIO handling code by making sure that the
      GPIO debounce clock gets disabled if no GPIO is requested from current
      bank.
      
      While fixing the OMAP GPIO handling code (in the right way), the above
      commit makes the gpio_request->set_debounce->free sequence invalid as
      after freeing the GPIO, the debounce settings are lost.
      
      Fix the debounce settings by moving the debounce initialization to the
      actual GPIO requesting code - the ads7846 driver.
      Signed-off-by: NIgor Grinberg <grinberg@compulab.co.il>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      0a0d6285
    • J
      ARM: Kirkwood: Update PCI-E fixup · 1dc831bf
      Jason Gunthorpe 提交于
      - The code relies on rc_pci_fixup being called, which only happens
        when CONFIG_PCI_QUIRKS is enabled, so add that to Kconfig. Omitting
        this causes a booting failure with a non-obvious cause.
      - Update rc_pci_fixup to set the class properly, copying the
        more modern style from other places
      - Correct the rc_pci_fixup comment
      Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      1dc831bf
    • R
      Dove: Fix irq_to_pmu() · d356cf5a
      Russell King - ARM Linux 提交于
      PMU interrupts start at IRQ_DOVE_PMU_START, not IRQ_DOVE_PMU_START + 1.
      Fix the condition.  (It may have been less likely to occur had the code
      been written "if (irq >= IRQ_DOVE_PMU_START" which imho is the easier
      to understand notation, and matches the normal way of thinking about
      these things.)
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      d356cf5a
    • R
      Dove: Attempt to fix PMU/RTC interrupts · 5d3df935
      Russell King - ARM Linux 提交于
      Fix the acknowledgement of PMU interrupts on Dove: some Dove hardware
      has not been sensibly designed so that interrupts can be handled in a
      race free manner.  The PMU is one such instance.
      
      The pending (aka 'cause') register is a bunch of RW bits, meaning that
      these bits can be both cleared and set by software (confirmed on the
      Armada-510 on the cubox.)
      
      Hardware sets the appropriate bit when an interrupt is asserted, and
      software is required to clear the bits which are to be processed.  If
      we write ~(1 << bit), then we end up asserting every other interrupt
      except the one we're processing.  So, we need to do a read-modify-write
      cycle to clear the asserted bit.
      
      However, any interrupts which occur in the middle of this cycle will
      also be written back as zero, which will also clear the new interrupts.
      
      The upshot of this is: there is _no_ way to safely clear down interrupts
      in this register (and other similarly behaving interrupt pending
      registers on this device.)  The patch below at least stops us creating
      new interrupts.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Cc: stable@vger.kernel.org
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      5d3df935
  9. 21 11月, 2012 7 次提交
  10. 20 11月, 2012 1 次提交
  11. 19 11月, 2012 1 次提交
    • L
      ARM: davinci: dm644x: fix out range signal for ED · e37212aa
      Lad, Prabhakar 提交于
      Fix the video clock setting when custom timings are used with
      pclock <= 27MHz. Existing video clock selection uses PLL2 mode
      which results in a 54MHz clock whereas using the MXI mode results
      in a 27MHz clock (which is the one actually desired).
      
      This bug affects the Enhanced Definition (ED) support on DM644x.
      Without this patch, out-range signals errors are were observed on
      the TV when viewing ED. An out-of-range signal is often caused when
      the field rate is above the rate that the television will handle.
      Signed-off-by: NLad, Prabhakar <prabhakar.lad@ti.com>
      Signed-off-by: NManjunath Hadli <manjunath.hadli@ti.com>
      Cc: Sekhar Nori <nsekhar@ti.com>
      [nsekhar@ti.com: reword commit message based on on-list discussion]
      Signed-off-by: NSekhar Nori <nsekhar@ti.com>
      e37212aa