1. 08 2月, 2008 3 次提交
  2. 07 2月, 2008 18 次提交
    • I
      x86: fix deadlock, make pgd_lock irq-safe · 58d5d0d8
      Ingo Molnar 提交于
      lockdep just caught this one:
      
      =================================
      [ INFO: inconsistent lock state ]
      2.6.24 #38
      ---------------------------------
      inconsistent {in-softirq-W} -> {softirq-on-W} usage.
      swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
       (pgd_lock){-+..}, at: [<ffffffff8022a9ea>] mm_init+0x1da/0x250
      {in-softirq-W} state was registered at:
        [<ffffffffffffffff>] 0xffffffffffffffff
      irq event stamp: 394559
      hardirqs last  enabled at (394559): [<ffffffff80267f0a>] get_page_from_freelist+0x30a/0x4c0
      hardirqs last disabled at (394558): [<ffffffff80267d25>] get_page_from_freelist+0x125/0x4c0
      softirqs last  enabled at (393952): [<ffffffff80232f8e>] __do_softirq+0xce/0xe0
      softirqs last disabled at (393945): [<ffffffff8020c57c>] call_softirq+0x1c/0x30
      
      other info that might help us debug this:
      no locks held by swapper/1.
      
      stack backtrace:
      Pid: 1, comm: swapper Not tainted 2.6.24 #38
      
      Call Trace:
       [<ffffffff8024e1fb>] print_usage_bug+0x18b/0x190
       [<ffffffff8024f55d>] mark_lock+0x53d/0x560
       [<ffffffff8024fffa>] __lock_acquire+0x3ca/0xed0
       [<ffffffff80250ba8>] lock_acquire+0xa8/0xe0
       [<ffffffff8022a9ea>] ? mm_init+0x1da/0x250
       [<ffffffff809bcd10>] _spin_lock+0x30/0x70
       [<ffffffff8022a9ea>] mm_init+0x1da/0x250
       [<ffffffff8022aa99>] mm_alloc+0x39/0x50
       [<ffffffff8028b95a>] bprm_mm_init+0x2a/0x1a0
       [<ffffffff8028d12b>] do_execve+0x7b/0x220
       [<ffffffff80209776>] sys_execve+0x46/0x70
       [<ffffffff8020c214>] kernel_execve+0x64/0xd0
       [<ffffffff8020901e>] ? _stext+0x1e/0x20
       [<ffffffff802090ba>] init_post+0x9a/0xf0
       [<ffffffff809bc5f6>] ? trace_hardirqs_on_thunk+0x35/0x3a
       [<ffffffff8024f75a>] ? trace_hardirqs_on+0xba/0xd0
       [<ffffffff8020c1a8>] ? child_rip+0xa/0x12
       [<ffffffff8020bcbc>] ? restore_args+0x0/0x44
       [<ffffffff8020c19e>] ? child_rip+0x0/0x12
      
      turns out that pgd_lock has been used on 64-bit x86 in an irq-unsafe
      way for almost two years, since commit 8c914cb7.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      58d5d0d8
    • Y
      x86: fix mttr trimming · 20651af9
      Yinghai Lu 提交于
      Pavel Emelyanov reported that his networking card did not work
      and bisected it down to:
      
      "
      The commit
      
        093af8d7
        x86_32: trim memory by updating e820
      
      broke my e1000 card: on loading driver says that
      
        e1000: probe of 0000:04:03.0 failed with error -5
      
      and the interface doesn't appear.
      "
      
      on a 32-bit kernel, base will overflow when try to do PAGE_SHIFT,
      and highest_addr will always less 4G.
      
      So use pfn instead of address to avoid the overflow when more than
      4g RAM is installed on a 32-bit kernel.
      
      Many thanks to Pavel Emelyanov for reporting and testing it.
      Bisected-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Tested-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      20651af9
    • I
      x86: delay CPA self-test and repeat it · 971a52d6
      Ingo Molnar 提交于
      delay the CPA self-test so that any impact (corruption) of
      user-space pagetables can be triggered. Repeat the test
      every 30 seconds.
      
      this would have prevented the bug fixed by 8cb2a7c1,
      at its source.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      971a52d6
    • S
      x86: fix 64-bit sections · f1fbabb3
      Sam Ravnborg 提交于
      fix 64-bit section warnings.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f1fbabb3
    • A
      x86: remove suprious ifdefs from pageattr.c · cc842b82
      Arjan van de Ven 提交于
      The .rodata section really should just be read only; the config option
      is there to make breaking up the 2Mb page an option (so people whos machines
      give more performance for the 2Mb case can opt to do so).
      But when the page gets split anyway, this is no longer an issue, so
      clean up the code and remove the ifdefs
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      cc842b82
    • A
      x86: mark the .rodata section also NX · 984bb80d
      Arjan van de Ven 提交于
      The .rodata section shouldn't just be read-only,
      but also non-executable. This is free since we've broken
      up the 2MB page already anyway.
      
      also update test_nx to check for this.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      984bb80d
    • R
      x86: fix iret exception recovery on 64-bit · a57dae3a
      Roland McGrath 提交于
      This change broke recovery of exceptions in iret:
      
         commit 72fe4858
         Author: Glauber de Oliveira Costa <gcosta@redhat.com>
      
             x86: replace privileged instructions with paravirt macros
      
      The ENTRY(native_iret) macro adds alignment padding before the iretq
      instruction, so "iret_label" no longer points exactly at the instruction.
      It was sloppy to leave the old "iret_label" label behind when replacing
      its nearby use.  Removing it would have revealed the other use of the
      label later in the file, and upon noticing that use, anyone exercising
      the minimum of attention to detail expected of anyone touching this
      subtle code would realize it needed to change as well.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a57dae3a
    • H
      x86: fix sparse warnings in powernow-k8.c · d7ac12fa
      Harvey Harrison 提交于
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:7: warning: symbol 'hi' shadows an earlier one
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:6: originally declared here
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:15: warning: symbol 'lo' shadows an earlier one
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:14: originally declared here
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d7ac12fa
    • H
      x86: fix sparse error in traps_32.c · deef79ef
      Harvey Harrison 提交于
      This was being used to ensure the proper alignment of the FXSAVE/FXRSTOR data.
      This would create a sparse error in the _correct_ cases, hiding further
      warnings.  Use BUILD_BUG_ON instead.
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      deef79ef
    • H
      x86: trivial sparse/checkpatch in quirks.c · 4a5a77d1
      Harvey Harrison 提交于
      arch/x86/kernel/quirks.c:384:3: warning: returning void-valued expression
      arch/x86/kernel/quirks.c:387:3: warning: returning void-valued expression
      arch/x86/kernel/quirks.c:390:3: warning: returning void-valued expression
      arch/x86/kernel/quirks.c:393:3: warning: returning void-valued expression
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4a5a77d1
    • R
      x86 ptrace: disallow null cs/ss · c63855d0
      Roland McGrath 提交于
      In my revamp of the x86 ptrace code for setting register values,
      I accidentally omitted a check that was there in the old code.
      Allowing %cs to be 0 causes a bad crash in recovery from iret failure.
      This patch fixes that regression against 2.6.24, and adds a comment
      that should help prevent this subtlety from being overlooked again.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c63855d0
    • I
      x86: remove X2 workaround · 2d684cd6
      Ingo Molnar 提交于
      With the spurious handler fix, the X2 does not lock up anymore.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2d684cd6
    • T
      x86: make spurious fault handler aware of large mappings · d8b57bb7
      Thomas Gleixner 提交于
      In very rare cases, on certain CPUs, we could end up in the spurious
      fault handler and ignore a large pud/pmd mapping. The resulting pte
      pointer points into the mapped physical space and dereferencing it
      will fault recursively.
      
      Make the code aware of large mappings and do the permission check
      on the pmd/pud entry, when a large pud/pmd mapping is detected.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d8b57bb7
    • R
      x86: make traps on entry code be debuggable in user space, 64-bit · 3aa4b37d
      Roland McGrath 提交于
      Unify the x86-64 behavior for 32-bit processes that set
      bogus %cs/%ss values (the only ones that can fault in iret)
      match what the native i386 behavior is. (do not kill the task
      via do_exit but generate a SIGSEGV signal)
      
      [ tglx@linutronix.de: build fix ]
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3aa4b37d
    • B
      rtc: add HPET RTC emulation to RTC_DRV_CMOS · 9d8af78b
      Bernhard Walle 提交于
      That patch adds the RTC emulation of the HPET timer to the new RTC_DRV_CMOS.
      The old drivers/char/rtc.ko driver had that functionality and it's important
      on new systems.
      
      [akpm@linux-foundation.org: unbreak alpha build]
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Cc: Alessandro Zummo <a.zummo@towertech.it>
      Cc: David Brownell <david-b@pacbell.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Robert Picco <Robert.Picco@hp.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9d8af78b
    • A
      idle_regs() must be __cpuinit · 6b2fb3c6
      Adrian Bunk 提交于
      Fix the following section mismatch with CONFIG_HOTPLUG=n,
      CONFIG_HOTPLUG_CPU=y:
      
      WARNING: vmlinux.o(.text+0x399a6): Section mismatch: reference to .init.text.5:idle_regs (between 'fork_idle' and 'get_task_mm')
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6b2fb3c6
    • A
      calibrate_delay() must be __cpuinit · 6c81c32f
      Adrian Bunk 提交于
      calibrate_delay() must be __cpuinit, not __{dev,}init.
      
      I've verified that this is correct for all users.
      
      While doing the latter, I also did the following cleanups:
      - remove pointless additional prototypes in C files
      - ensure all users #include <linux/delay.h>
      
      This fixes the following section mismatches with CONFIG_HOTPLUG=n,
      CONFIG_HOTPLUG_CPU=y:
      
      WARNING: vmlinux.o(.text+0x1128d): Section mismatch: reference to .init.text.1:calibrate_delay (between 'check_cx686_slop' and 'set_cx86_reorder')
      WARNING: vmlinux.o(.text+0x25102): Section mismatch: reference to .init.text.1:calibrate_delay (between 'smp_callin' and 'cpu_coregroup_map')
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Christian Zankel <chris@zankel.net>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6c81c32f
    • A
      read_current_timer() cleanups · 941e492b
      Andrew Morton 提交于
      - All implementations can be __devinit
      
      - The function prototypes were in asm/timex.h but they all must be the same,
        so create a single declaration in linux/timex.h.
      
      - uninline the sparc64 version to match the other architectures
      
      - Don't bother #defining ARCH_HAS_READ_CURRENT_TIMER to a particular value.
      
      [ezk@cs.sunysb.edu: fix build]
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      941e492b
  3. 06 2月, 2008 8 次提交
  4. 05 2月, 2008 1 次提交
    • D
      intel-agp: add chipset flushing support · 6c00a61e
      Dave Airlie 提交于
      This adds support for flushing the chipsets on the 915, 945, 965 and G33
      families of Intel chips.
      
      The BIOS doesn't seem to always allocate the BAR on the 965 chipsets
      so I have to use pci resource code to create a resource
      
      It adds an export for pcibios_align_resource.
      6c00a61e
  5. 04 2月, 2008 10 次提交