1. 10 5月, 2012 5 次提交
  2. 09 5月, 2012 14 次提交
    • E
      ARM: OMAP: igep0020: fix smsc911x dummy regulator id · 1a21932e
      Enrico Butera 提交于
      id 0 is already used and causes errors at boot:
      
      WARNING: at fs/sysfs/dir.c:508 sysfs_add_one+0x9c/0xac()
      sysfs: cannot create duplicate filename '/devices/platform/reg-fixed-voltage.0'
      
      Fix it by using the next available one (id=1).
      
      This was caused by 5b3689f4 (ARM: OMAP2+: smsc911x: Add fixed
      board regulators) that did not account for some regulators
      already being used.
      Signed-off-by: NEnrico Butera <ebutera@users.berlios.de>
      [tony@atomide.com: updated comments for regression causing commit]
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      1a21932e
    • L
      regmap: fix possible memory corruption in regmap_bulk_read() · 6560ffd1
      Laxman Dewangan 提交于
      The function regmap_bulk_read() calls the regmap_read() for
      each register if set of register has volatile and cache is
      enabled. In this case, last few register read makes the memory
      corruption if the register size is not the size of unsigned int.
      The regam_read() takes argument as unsigned int for returning
      value and it update the value as
      	*val = map->format.parse_val(map->work_buf);
      This causes complete 4 bytes (size of unsigned int) to get written.
      Now if client pass the memory pointer for value which is equal to the
      required size of register count in regmap_bulk_read() then last few
      register read actually update the memory beyond passed pointer size.
      
      Avoid this by using local variable for read and then do memcpy()
      for actual byte copy to passed pointer based on register size.
      
      I allocated one pointer ptr and take first 16 bytes dump of that
      pointer then call regmap_bulk_read() with pointer which is just
      on top of this allocated pointer and register count of 128. Here
      register size is 1 byte.
      The memory trace of last 5 register read are as follows:
      
      [    5.438589] regmap_bulk_read after regamp_read() for register 122
      [    5.447421] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.467535] regmap_bulk_read after regamp_read() for register 123
      [    5.476374] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.496425] regmap_bulk_read after regamp_read() for register 124
      [    5.505260] 0xef993c20 0xef993c00 0x00000000 0x00000001
      [    5.525372] regmap_bulk_read after regamp_read() for register 125
      [    5.534205] 0xef993c00 0xef993c00 0x00000000 0x00000001
      [    5.554258] regmap_bulk_read after regamp_read() for register 126
      [    5.563100] 0xef990000 0xef993c00 0x00000000 0x00000001
      [    5.554258] regmap_bulk_read after regamp_read() for register 127
      [    5.587108] 0xef000000 0xef993c00 0x00000000 0x00000001
      
      Here it is observed that the memory content at first word started changing
      on last 3 regmap_read() and so corruption happened.
      Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      6560ffd1
    • A
      KVM: ia64: fix build due to typo · 331b646d
      Avi Kivity 提交于
      s/kcm/kvm/.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      331b646d
    • O
      Merge branch 'kirkwood_fixes_for_v3.4' of... · 973076ae
      Olof Johansson 提交于
      Merge branch 'kirkwood_fixes_for_v3.4' of git://git.infradead.org/users/jcooper/linux-kirkwood into fixes
      
      By Ben Hutchings (1) and Ian Campbell (1)
      via Jason Cooper: "ARM: kirkwood: fixes for v3.4"
      * 'kirkwood_fixes_for_v3.4' of git://git.infradead.org/users/jcooper/linux-kirkwood:
        ARM: orion5x: Fix GPIO enable bits for MPP9
        ARM: kirkwood: add missing kexec.h include
      973076ae
    • B
      powerpc/irq: Make alignment & program interrupt behave the same · a3512b2d
      Benjamin Herrenschmidt 提交于
      Alignment was the last user of the ENABLE_INTS macro, which we can
      now remove. All non-syscall exceptions now disable interrupts on
      entry, they get re-enabled conditionally from C code. Don't
      unconditionally re-enable in program check either, check the
      original context.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      a3512b2d
    • B
      powerpc/irq: Fix bug with new lazy IRQ handling code · 56dfa7fa
      Benjamin Herrenschmidt 提交于
      We had a case where we could turn on hard interrupts while
      leaving the PACA_IRQ_HARD_DIS bit set in the PACA. This can
      in turn cause a BUG_ON() to hit in __check_irq_replay() due
      to interrupt state getting out of sync.
      
      The assembly code was also way too convoluted. Instead, we
      now leave it to the C code to do the right thing which ends
      up being smaller and more readable.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      56dfa7fa
    • B
      ARM: orion5x: Fix GPIO enable bits for MPP9 · 48d99f47
      Ben Hutchings 提交于
      Commit 554cdaef ('ARM: orion5x: Refactor
      mpp code to use common orion platform mpp.') seems to have accidentally
      inverted the GPIO valid bits for MPP9 (only).  For the mv2120 platform
      which uses MPP9 as a GPIO LED device, this results in the error:
      
      [   12.711476] leds-gpio: probe of leds-gpio failed with error -22
      Reported-by: NHenry von Tresckow <hvontres@gmail.com>
      References: http://bugs.debian.org/667446Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Cc: stable@vger.kernel.org [v3.0+]
      Tested-by: NHans Henry von Tresckow <hvontres@gmail.com>
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      48d99f47
    • L
      Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator · 1eef1600
      Linus Torvalds 提交于
      Pull regulator fixes from Mark Brown:
       "One small fix for an edge condition in the max8997 driver and a fix
        for a surprise in the devres API which caused devm_regulator_put() to
        not actually put the regulator - a nicer version of this based on an
        improvement of the devres API is queued for 3.5."
      
      * tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: Actually free the regulator in devm_regulator_put()
        regulator: Fix the logic to ensure new voltage setting in valid range
      1eef1600
    • I
      ARM: kirkwood: add missing kexec.h include · a7ac56de
      Ian Campbell 提交于
      Fixes the following build error when CONFIG_KEXEC is enabled:
        CC      arch/arm/mach-kirkwood/board-dt.o
      arch/arm/mach-kirkwood/board-dt.c: In function 'kirkwood_dt_init':
      arch/arm/mach-kirkwood/board-dt.c:52:2: error: 'kexec_reinit' undeclared (first use in this function)
      arch/arm/mach-kirkwood/board-dt.c:52:2: note: each undeclared identifier is reported only once for each function it appears in
      Signed-off-by: NIan Campbell <ijc@hellion.org.uk>
      [v4, rebase onto recent Linus for repost]
      [v3, speak actual English in the commit message, thanks Sergei Shtylyov]
      [v2, using linux/kexec.h not asm/kexec.h]
      Signed-off-by: NJason Cooper <jason@lakedaemon.net>
      a7ac56de
    • L
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 789505b0
      Linus Torvalds 提交于
      Pull drm fixes from Dave Airlie:
       "Two fixes from Intel, one a regression, one because I merged an early
        version of a fix.
      
        Also the nouveau revert of the i2c code that was tested on the list."
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
        drm/nouveau/i2c: resume use of i2c-algo-bit, rather than custom stack
        drm/i915: Do no set Stencil Cache eviction LRA w/a on gen7+
        drm/i915: disable sdvo hotplug on i945g/gm
      789505b0
    • L
      Merge tag 'stable/for-linus-3.4-rc6-tag' of... · 4ed6cede
      Linus Torvalds 提交于
      Merge tag 'stable/for-linus-3.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull xen fixes from Konrad Rzeszutek Wilk:
       - fix to Kconfig to make it fit within 80 line characters,
       - two bootup fixes (AMD 8-core and with PCI BIOS),
       - cleanup code in a Xen PV fb driver,
       - and a crash fix when trying to see non-existent PTE's
      
      * tag 'stable/for-linus-3.4-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        xen/Kconfig: fix Kconfig layout
        xen/pci: don't use PCI BIOS service for configuration space accesses
        xen/pte: Fix crashes when trying to see non-existent PGD/PMD/PUD/PTEs
        xen/apic: Return the APIC ID (and version) for CPU 0.
        drivers/video/xen-fbfront.c: add missing cleanup code
      4ed6cede
    • L
      Merge branch 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu · e9b19cd4
      Linus Torvalds 提交于
      Pull two percpu fixes from Tejun Heo:
       "One adds missing KERN_CONT on split printk()s and the other makes
        the percpu allocator avoid using PMD_SIZE as atom_size on x86_32.
      
        Using PMD_SIZE led to vmalloc area exhaustion on certain
        configurations (x86_32 android) and the only cost of using PAGE_SIZE
        instead is static percpu area not being aligned to large page
        mapping."
      
      * 'for-3.4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu:
        percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit
        percpu: use KERN_CONT in pcpu_dump_alloc_info()
      e9b19cd4
    • L
      Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm · 301cdf5c
      Linus Torvalds 提交于
      Pull ARM fixes from Russell King:
       "This is mainly audit fixes, found by folks who happened to enable this
        feature and then found it broke their user applications."
      
      * 'fixes' of git://git.linaro.org/people/rmk/linux-arm:
        ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd
        ARM: 7412/1: audit: use only AUDIT_ARCH_ARM regardless of endianness
        ARM: 7411/1: audit: fix treatment of saved ip register during syscall tracing
        ARM: 7410/1: Add extra clobber registers for assembly in kernel_execve
      301cdf5c
    • T
      percpu, x86: don't use PMD_SIZE as embedded atom_size on 32bit · d5e28005
      Tejun Heo 提交于
      With the embed percpu first chunk allocator, x86 uses either PAGE_SIZE
      or PMD_SIZE for atom_size.  PMD_SIZE is used when CPU supports PSE so
      that percpu areas are aligned to PMD mappings and possibly allow using
      PMD mappings in vmalloc areas in the future.  Using larger atom_size
      doesn't waste actual memory; however, it does require larger vmalloc
      space allocation later on for !first chunks.
      
      With reasonably sized vmalloc area, PMD_SIZE shouldn't be a problem
      but x86_32 at this point is anything but reasonable in terms of
      address space and using larger atom_size reportedly leads to frequent
      percpu allocation failures on certain setups.
      
      As there is no reason to not use PMD_SIZE on x86_64 as vmalloc space
      is aplenty and most x86_64 configurations support PSE, fix the issue
      by always using PMD_SIZE on x86_64 and PAGE_SIZE on x86_32.
      
      v2: drop cpu_has_pse test and make x86_64 always use PMD_SIZE and
          x86_32 PAGE_SIZE as suggested by hpa.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reported-by: NYanmin Zhang <yanmin.zhang@intel.com>
      Reported-by: NShuoX Liu <shuox.liu@intel.com>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      LKML-Reference: <4F97BA98.6010001@intel.com>
      Cc: stable@vger.kernel.org
      d5e28005
  3. 08 5月, 2012 3 次提交
  4. 07 5月, 2012 13 次提交
  5. 06 5月, 2012 5 次提交
    • G
      KVM: Do not take reference to mm during async #PF · 62c49cc9
      Gleb Natapov 提交于
      It turned to be totally unneeded. The reason the code was introduced is
      so that KVM can prefault swapped in page, but prefault can fail even
      if mm is pinned since page table can change anyway. KVM handles this
      situation correctly though and does not inject spurious page faults.
      
      Fixes:
       "INFO: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected" warning while
       running LTP inside a KVM guest using the recent -next kernel.
      Reported-by: NSasha Levin <levinsasha928@gmail.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      62c49cc9
    • G
      KVM: ensure async PF event wakes up vcpu from halt · a4fa1635
      Gleb Natapov 提交于
      If vcpu executes hlt instruction while async PF is waiting to be delivered
      vcpu can block and deliver async PF only after another even wakes it
      up. This happens because kvm_check_async_pf_completion() will remove
      completion event from vcpu->async_pf.done before entering kvm_vcpu_block()
      and this will make kvm_arch_vcpu_runnable() return false. The solution
      is to make vcpu runnable when processing completion.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      a4fa1635
    • C
      Btrfs: avoid sleeping in verify_parent_transid while atomic · b9fab919
      Chris Mason 提交于
      verify_parent_transid needs to lock the extent range to make
      sure no IO is underway, and so it can safely clear the
      uptodate bits if our checks fail.
      
      But, a few callers are using it with spinlocks held.  Most
      of the time, the generation numbers are going to match, and
      we don't want to switch to a blocking lock just for the error
      case.  This adds an atomic flag to verify_parent_transid,
      and changes it to return EAGAIN if it needs to block to
      properly verifiy things.
      Signed-off-by: NChris Mason <chris.mason@oracle.com>
      b9fab919
    • C
      ARM: 7414/1: SMP: prevent use of the console when using idmap_pgd · fde165b2
      Colin Cross 提交于
      Commit 4e8ee7de (ARM: SMP: use
      idmap_pgd for mapping MMU enable during secondary booting)
      switched secondary boot to use idmap_pgd, which is initialized
      during early_initcall, instead of a page table initialized during
      __cpu_up.  This causes idmap_pgd to contain the static mappings
      but be missing all dynamic mappings.
      
      If a console is registered that creates a dynamic mapping, the
      printk in secondary_start_kernel will trigger a data abort on
      the missing mapping before the exception handlers have been
      initialized, leading to a hang.  Initial boot is not affected
      because no consoles have been registered, and resume is usually
      not affected because the offending console is suspended.
      Onlining a cpu with hotplug triggers the problem.
      
      A workaround is to the printk in secondary_start_kernel until
      after the page tables have been switched back to init_mm.
      
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NColin Cross <ccross@android.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fde165b2
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha · 03cb00b3
      Linus Torvalds 提交于
      Pull alpha fixes from Matt Turner:
       "My alpha tree is back up (after taking quite some time to get my GPG
        key signed).  It contains just some simple fixes."
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha:
        alpha: silence 'const' warning in sys_marvel.c
        alpha: include module.h to fix modpost on Tsunami
        alpha: properly define get/set_rtc_time on Marvel/SMP
        alpha: VGA_HOSE depends on VGA_CONSOLE
      03cb00b3