1. 04 12月, 2007 2 次提交
  2. 30 11月, 2007 4 次提交
    • J
      x86/paravirt: revert exports to restore old behaviour · f97b8954
      Jeremy Fitzhardinge 提交于
      Subdividing the paravirt_ops structure caused a regression in certain
      non-GPL modules which try to use mmu_ops and cpu_ops.  This restores the
      old behaviour, and makes it consistent with the non-CONFIG_PARAVIRT case.
      
      Takashi Iwai <tiwai@suse.de> adds:
      > I took at this problem (as I have an nvidia card on one of my
      > workstations), and found out that the following suffer from
      > EXPORT_SYMBOL_GPL changes:
      >
      > * local_disable_irq(), local_irq_save*(), etc.
      > * MSR-related macros like rdmsr(), wrmsr(), read_cr0(), etc.
      >   wbinvd(), too.
      > * pmd_val(), pgd_val(), etc are all involved with pv_mm_ops.
      >   pmd_large() and pmd_bad() is also indirectly involved.
      >   __flush_tlb() and friends suffer, too.
      
      Christoph Hellwig objects to this patch on the grounds that modules
      shouldn't be using these operations anyway.  I don't think this is a
      particularly good reason to reject the patch, for several reasons:
      
      1. These operations are still available to modules when not using
         CONFIG_PARAVIRT, since they are implicitly exported as inline
         functions via the kernel headers.  Exporting the same functionality as
         GPL-only symbols just adds a gratuitious difference between
         CONFIG_PARAVIRT and non-CONFIG_PARAVIRT configurations.  If we really
         think these operations are not for module use (or non-GPL module use),
         then we should solve the problem in a general way.
      
      2. It's a regression from previous kernels, which would work these
         modules even with CONFIG_PARAVIRT enabled.
      
      3. The operations in question seem pretty reasonable for modules to
         use.  The control registers/MSRs can be accessed directly anyway, so there's
         no benefit in preventing modules from using standard interfaces.  And it seems
         reasonable to allow a graphics driver to create its own mappings if it wants.
      
      Therefore, I think this patch should go in for 2.6.24.  If people
      really think that these operations should not be available to modules,
      then we can address that separately.
      Signed-off-by: NJeremy Fitzhardinge <Jeremy.Fitzhardinge@citrix.com>
      Cc: Tobias Powalowski <t.powa@gmx.de>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Zachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f97b8954
    • R
      lguest: prevent VISWS or VOYAGER randconfigs · b8415ec3
      Randy Dunlap 提交于
      Keep lguest from being enabled on VISWS or VOYAGER configs, just as is
      already done for VMI and XEN.  Otherwise randconfigs with VISWS and LGUEST
      have this problem:
      
      In file included from arch/x86/kernel/setup_32.c:61:
      include/asm-x86/mach-visws/setup_arch.h:8:1: warning: "ARCH_SETUP" redefined
      In file included from include/asm/msr.h:80,
                       from include/asm/processor_32.h:17,
                       from include/asm/processor.h:2,
                       from include/asm/thread_info_32.h:16,
                       from include/asm/thread_info.h:2,
                       from include/linux/thread_info.h:21,
                       from include/linux/preempt.h:9,
                       from include/linux/spinlock.h:49,
                       from include/linux/seqlock.h:29,
                       from include/linux/time.h:8,
                       from include/linux/timex.h:57,
                       from include/linux/sched.h:53,
                       from arch/x86/kernel/setup_32.c:24:
      include/asm/paravirt.h:458:1: warning: this is the location of the previous definition
      
      (and of course, this happens because kconfig does not follow dependencies
      when [evil] select is used...)
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b8415ec3
    • K
      memory hotplug x86_64: fix section mismatch in init_memory_mapping() · b6fd6ecb
      KAMEZAWA Hiroyuki 提交于
      Changes __meminit to __init_refok.
      
      WARNING: vmlinux.o(.text+0x1d07c): Section mismatch: reference to
      .init.text:find_e820_area (between 'init_memory_mapping' and 'arch_add_memory')
      Signed-off-by: NKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b6fd6ecb
    • J
      xen: mask _PAGE_PCD from ptes · 2c80b01b
      Jeremy Fitzhardinge 提交于
      _PAGE_PCD maps a page with caching disabled, which is typically used for
      mapping harware registers.  Xen never allows it to be set on a mapping, and
      unprivileged guests never need it since they can't see the real underlying
      hardware.  However, some uncached mappings are made early when probing the
      (non-existent) APIC, and its OK to mask off the PCD flag in these cases.
      
      This became necessary because Xen started checking for this bit, rather
      than silently masking it off.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2c80b01b
  3. 29 11月, 2007 1 次提交
    • J
      x86 setup: don't recalculate ss:esp unless really necessary · 16252da6
      Jens Rottmann 提交于
      In order to work around old LILO versions providing an invalid ss
      register, the current setup code always sets up a new stack,
      immediately following .bss and the heap. But this breaks LOADLIN.
      
      This rewrite of the workaround checks for an invalid stack (ss!=ds)
      first, and leaves ss:sp alone otherwise (apart from aligning esp).
      
      [hpa note: LOADLIN has a number of arbitrary hard-coded limits that
      are being pushed up against.  Without some major revision of LOADLIN
      itself it will not be sustainable keeping it alive.  This gives it
      another brief lease on life, however.  This patch also helps the
      cmdline truncation problem with old versions of SYSLINUX.]
      
      Signed-off-by: Jens Rottmann <JRottmann at LiPPERT-AT. de>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      16252da6
  4. 27 11月, 2007 10 次提交
    • A
      x86: correctly set UTS_MACHINE for "make ARCH=x86" · 8c6531f7
      Andreas Herrmann 提交于
      For a kernel built with "make ARCH=x86" the following system
      information is displayed when running the new kernel
      
          $ uname -m
          x86
      
      On some i386 systems (e.g. K7) we even have the following information
      
          $ uname -m
          x66
      
      This is weird. The usual information for "uname -m" should be "x86_64"
      on 64-bit and "i386" or "i686" on 32-bit.
      
      This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
      kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
      won't be used for UTS_MACHINE anymore.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndreas Herrmann <aherrman@arcor.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8c6531f7
    • I
      x86: fix APIC related bootup crash on Athlon XP CPUs · f44d9efd
      Ingo Molnar 提交于
      warmbloodedcreature@gmail.com reported that an APIC-enabled
      Asus a7v8x-x with an Athlon XP reboots early in the bootup:
      
         http://bugzilla.kernel.org/show_bug.cgi?id=8723
      
      after a long marathon of spontaneous-reboot debugging, it turns
      out to be caused by sync_Arb_ids(). AMD CPUs never really needed
      this sequence anyway, so just return early if we meet an AMD CPU.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f44d9efd
    • T
      x86: export the symbol empty_zero_page on the 32-bit x86 architecture · 8232fd62
      Theodore Ts'o 提交于
      The latest KVM driver wants to use the empty_zero_page symbol, and it's
      not exported in 32-bit x86 (although it is exported by x86_64, s390, and
      uml architectures).
      Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu>
      Cc: tglx@linutronix.de
      Cc: linux-kernel@vger.kernel.com
      Cc: kvm-devel@lists.sourceforge.net
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8232fd62
    • A
      x86: fix kprobes_64.c inlining borkage · 8645419c
      Andrew Morton 提交于
      fix:
      
      arch/x86/kernel/kprobes_64.c: In function 'set_current_kprobe':
      arch/x86/kernel/kprobes_64.c:152: sorry, unimplemented: inlining failed in call to 'is_IF_modifier': recursive inlining
      arch/x86/kernel/kprobes_64.c:166: sorry, unimplemented: called from here
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: mingo@elte.hu
      Cc: akpm@linux-foundation.org
      Cc: tglx@linutronix.de
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8645419c
    • M
      pci: use pci=bfsort for HP DL385 G2, DL585 G2 · c82bc5ad
      Michal Schmidt 提交于
      HP ProLiant systems DL385 G2 and DL585 G2 need pci=bfsort to enumerate PCI
      devices in the expected order.
      
      Matt sayeth:
      
        biosdevname is a userspace app I wrote to help solve this so we don't need
        to patch the kernel for future systems.  It's not integrated into any
        distributions properly yet, but is included in openSUSE 10.3 and Fedora 8
        for people who want to download and install it there.  It acts as a udev
        helper.
      
        For the time being, patching the kernel is necessary.  I really hope
        biosdevname eliminates that need in future distributions.
      
        http://linux.dell.com/biosdevname/Signed-off-by: NMichal Schmidt <mschmidt@redhat.com>
      Acked-by: NAndy Gospodarek <andy@greyhouse.net>
      Cc: mingo@elte.hu
      Cc: andy@greyhouse.net
      Cc: john.cagle@hp.com
      Cc: Matt Domsch <Matt_Domsch@dell.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c82bc5ad
    • A
      x86: correctly set UTS_MACHINE for "make ARCH=x86" · 43517854
      Andreas Herrmann 提交于
      x86: correctly set UTS_MACHINE for "make ARCH=x86"
      
      For a kernel built with "make ARCH=x86" the following system
      information is displayed when running the new kernel
      
          $ uname -m
          x86
      
      On some i386 systems (e.g. K7) we even have the following information
      
          $ uname -m
          x66
      
      This is weird. The usual information for "uname -m" should be "x86_64"
      on 64-bit and "i386" or "i686" on 32-bit.
      
      This patch fixes the issue by setting UTS_MACHINE to "i386" for 32-bit
      kernel builds and to "x86_64" for 64-bit kernel builds. I.e., "x86"
      won't be used for UTS_MACHINE anymore.
      Acked-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndreas Herrmann <aherrman@arcor.de>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@redhat.com>
      43517854
    • P
      lockdep: annotate do_debug() trap handler · 000f4a9e
      Peter Zijlstra 提交于
      Ensure the hardirq state is consistent before using locks. Use the rare
      trace_hardirqs_fixup() because the trap can happen in any context.
      
      resolves this rare lockdep warning:
      
      WARNING: at kernel/lockdep.c:2658 check_flags()
       [<c013571e>] check_flags+0x90/0x140
       [<c0138a69>] lock_release+0x4b/0x1d0
       [<c0507fea>] notifier_call_chain+0x2a/0x47
       [<c050806b>] __atomic_notifier_call_chain+0x64/0x6d
       [<c0508007>] __atomic_notifier_call_chain+0x0/0x6d
       [<c050808b>] atomic_notifier_call_chain+0x17/0x1a
       [<c0131802>] notify_die+0x30/0x34
       [<c0506b09>] do_debug+0x3e/0xd4
       [<c050658f>] debug_stack_correct+0x27/0x2c
       [<c04be389>] tcp_rcv_established+0x1/0x620
       [<c04c38c2>] tcp_v4_do_rcv+0x2b/0x313
       [<c04c56b6>] tcp_v4_rcv+0x467/0x85d
       [<c0505ff2>] _spin_lock_nested+0x27/0x32
       [<c04c5a4d>] tcp_v4_rcv+0x7fe/0x85d
       [<c04c560e>] tcp_v4_rcv+0x3bf/0x85d
       [<c04adbb5>] ip_local_deliver_finish+0x11b/0x1b0
       [<c04adac8>] ip_local_deliver_finish+0x2e/0x1b0
       [<c04ada7b>] ip_rcv_finish+0x27b/0x29a
       [<c04961e5>] netif_receive_skb+0xfb/0x2a6
       [<c04add0f>] ip_rcv+0x0/0x1fb
       [<c0496354>] netif_receive_skb+0x26a/0x2a6
       [<c04961e5>] netif_receive_skb+0xfb/0x2a6
       [<c049872e>] process_backlog+0x7f/0xc6
       [<c04983ba>] net_rx_action+0xb9/0x1ac
       [<c0498348>] net_rx_action+0x47/0x1ac
       [<c01376cb>] trace_hardirqs_on+0x118/0x16b
       [<c01225e2>] __do_softirq+0x49/0xa2
       [<c010595f>] do_softirq+0x60/0xdd
       [<c0506300>] _spin_unlock_irq+0x20/0x2c
       [<c0103e4f>] restore_nocheck+0x12/0x15
       [<c01440e1>] handle_fasteoi_irq+0x0/0x9b
       [<c0105a70>] do_IRQ+0x94/0xaa
       [<c0506300>] _spin_unlock_irq+0x20/0x2c
       [<c0104832>] common_interrupt+0x2e/0x34
       [<c0114703>] native_safe_halt+0x2/0x3
       [<c0102c01>] default_idle+0x44/0x65
       [<c010257f>] cpu_idle+0x42/0x50
       [<c076ea09>] start_kernel+0x26b/0x270
       [<c076e317>] unknown_bootoption+0x0/0x196
       =======================
      irq event stamp: 559190
      hardirqs last  enabled at (559190): [<c0507316>] kprobe_exceptions_notify+0x299/0x305
      hardirqs last disabled at (559189): [<c05067bf>] do_int3+0x1d/0x95
      softirqs last  enabled at (559172): [<c010595f>] do_softirq+0x60/0xdd
      softirqs last disabled at (559181): [<c010595f>] do_softirq+0x60/0xdd
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      000f4a9e
    • I
      x86: turn off iommu merge by default · bc84cf17
      Ingo Molnar 提交于
      revert this commit for now:
      
          commit 94806268
          Author: Andi Kleen <ak@suse.de>
          Date:   Fri Oct 19 20:35:03 2007 +0200
      
              x86: enable iommu_merge by default
      
      it's causing regressions:
      
          http://bugzilla.kernel.org/show_bug.cgi?id=9412Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      bc84cf17
    • A
      x86: printk kernel version in WARN_ON and other dump_stack users · 57c351de
      Arjan van de Ven 提交于
      today, all oopses contain a version number of the kernel, which is nice
      because the people who actually do bother to read the oops get this
      vital bit of information always without having to ask the reporter in
      another round trip.
      
      However, WARN_ON() and many other dump_stack() users right now lack this
      information; the patch below adds this. This information is essential
      for getting people to use their time effectively when looking at these
      things; in addition, it's essential for tools that try to collect
      statistics about defects.
      
      Please consider, since its so simple and important for long term kernel
      quality processes.
      
      The code is identical between 32/64 bit; a lot of this code should be
      unified over time, the patch keeps the identical-ness intact.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      57c351de
    • M
      x86: fix NMI watchdog & 'stopped time' problem · d4d25dec
      Maciej W. Rozycki 提交于
      More than 3 years ago Niclas Gustafsson reported a 'stopped time'
      problem:
      
      > Watching the /proc/interrupts with 10s apart after the "stop".
      >
      > [root@s151 root]# more /proc/interrupts
      >            CPU0
      >   0:   66413955  local-APIC-edge  timer
      [...]
      > LOC:   67355837
      > ERR:          0
      > MIS:          0
      > [root@s151 root]# more /proc/interrupts
      >            CPU0
      >   0:   66413955  local-APIC-edge  timer
      [...]
      > LOC:   67379568
      > ERR:          0
      > MIS:          0
      
      This may be because buggy SMM firmware messes with the 8259A (configured
      for a transparent mode -- yes that rare "local-APIC-edge" mode is tricky
      ;-) ) insanely.
      
      this should resolve:
      
        http://bugzilla.kernel.org/show_bug.cgi?id=2544
        http://bugzilla.kernel.org/show_bug.cgi?id=6296Patch-dusted-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      d4d25dec
  5. 20 11月, 2007 1 次提交
  6. 18 11月, 2007 2 次提交
    • S
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 6840999b
      Sam Ravnborg 提交于
      Simplify "make ARCH=x86" and fix kconfig so we again can set 64BIT in
      all.config.
      
      For a fix the diffstat is nice:
       6 files changed, 3 insertions(+), 36 deletions(-)
      
      The patch reverts these commits:
       - 0f855aa6 ("kconfig: add helper to set
         config symbol from environment variable")
       - 2a113281 ("kconfig: use $K64BIT to
         set 64BIT with all*config targets")
      
      Roman Zippel pointed out that kconfig supported string compares so
      the additional complexity introduced by the above two patches were
      not needed.
      
      With this patch we have following behaviour:
      
        # make {allno,allyes,allmod,rand}config [ARCH=...]
        option \ host arch      | 32bit         | 64bit
        =====================================================
        ./.                     | 32bit         | 64bit
        ARCH=x86                | 32bit         | 32bit
        ARCH=i386               | 32bit         | 32bit
        ARCH=x86_64             | 64bit         | 64bit
      
      The general rule are that ARCH= and native architecture takes
      precedence over the configuration.
      
      So make ARCH=i386 [whatever] will always build a 32-bit kernel
      no matter what the configuration says.  The configuration will
      be updated to 32-bit if it was configured to 64-bit and the
      other way around.
      
      This behaviour is consistent with previous behaviour so no
      suprises here.
      
      make ARCH=x86 will per default result in a 32-bit kernel but as
      the only ARCH= value x86 allow the user to select between 32-bit
      and 64-bit using menuconfig.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6840999b
    • S
      x86: simplify "make ARCH=x86" and fix kconfig all.config · 80ef88d6
      Sam Ravnborg 提交于
      Simplify "make ARCH=x86" and fix kconfig so we again
      can set 64BIT in all.config.
      
      For a fix the diffstat is nice:
       6 files changed, 3 insertions(+), 36 deletions(-)
      
      The patch reverts these commits:
      0f855aa6
      -> kconfig: add helper to set config symbol from environment variable
      
      2a113281
      -> kconfig: use $K64BIT to set 64BIT with all*config targets
      
      Roman Zippel pointed out that kconfig supported string
      compares so the additional complexity introduced by the
      above two patches were not needed.
      
      With this patch we have following behaviour:
      
      # make {allno,allyes,allmod,rand}config [ARCH=...]
      option \ host arch      | 32bit         | 64bit
      =====================================================
      ./.                     | 32bit         | 64bit
      ARCH=x86                | 32bit         | 32bit
      ARCH=i386               | 32bit         | 32bit
      ARCH=x86_64             | 64bit         | 64bit
      
      The general rule are that ARCH= and native architecture
      takes precedence over the configuration.
      So make ARCH=i386 [whatever] will always build a 32-bit
      kernel no matter what the configuration says.
      The configuration will be updated to 32-bit if it was
      configured to 64-bit and the other way around.
      
      This behaviour is consistent with previous behaviour so
      no suprises here.
      
      make ARCH=x86 will per default result in a 32-bit kernel
      but as the only ARCH= value x86 allow the user to select
      between 32-bit and 64-bit using menuconfig. 
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andreas Herrmann <aherrman@arcor.de>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      80ef88d6
  7. 17 11月, 2007 14 次提交
    • D
      x86: reboot fixup for wrap2c board · 6d1b30e3
      Denys 提交于
      Needed to make the wireless board, WRAP2C reboot.
      
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      6d1b30e3
    • Y
      x86: check boundary in count setup resource · 3d9befd2
      Yinghai Lu 提交于
      need to check info->res_num less than PCI_BUS_NUM_RESOURCES, so
      info->bus->resource[info->res_num] = res will not beyond of bus resource
      array when acpi returns too many resource entries.
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Gary Hade <gary.hade@us.ibm.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      3d9befd2
    • T
      x86: add hpet sanity checks · f4df73c2
      Thomas Gleixner 提交于
      Some BIOSes advertise HPET at 0x0. We really do no want to 
      allocate a resource there. Check for it and leave early.
      
      Other BIOSes tell us the HPET is at 0xfed0000000000000 
      instead of 0xfed00000. Add a check and fix it up with a warning
      on user request.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      f4df73c2
    • D
      x86: on x86_64, correct reading of PC RTC when update in progress in time_64.c · bbbd9995
      David P. Reed 提交于
      Correct potentially unstable PC RTC time register reading in time_64.c
      
      Stop the use of an incorrect technique for reading the standard PC RTC
      timer, which is documented to "disconnect" time registers from the bus
      while updates are in progress.  The use of UIP flag while interrupts
      are disabled to protect a 244 microsecond window is one of the
      Motorola spec sheet's documented ways to read the RTC time registers
      reliably.
      
      tglx: removed locking changes from original patch, as they gain nothing
      (read_persistent_clock is only called during boot, suspend, resume - so
      no hot path affected) and conflict with the paravirt locking scheme
      (see 32bit code), which we do not want to complicate for no benefit.
      Signed-off-by: NDavid P. Reed <dpreed@reed.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      bbbd9995
    • D
      x86: fix freeze in x86_64 RTC update code in time_64.c · c399da0d
      David P. Reed 提交于
      Fix hard freeze on x86_64 when the ntpd service calls 
      update_persistent_clock()
      
      A repeatable but randomly timed freeze has been happening in Fedora 6
      and 7 for the last year, whenever I run the ntpd service on my AMD64x2
      HP Pavilion dv9000z laptop.  This freeze is due to the use of
      spin_lock(&rtc_lock) under the assumption (per a bad comment) that
      set_rtc_mmss is called only with interrupts disabled.  The call from
      ntp.c to update_persistent_clock is made with interrupts enabled.
      Signed-off-by: NDavid P. Reed <dpreed@reed.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      c399da0d
    • T
      x86: fixup cpu_info array conversion · 699d934d
      Thomas Gleixner 提交于
      92cb7612 sets cpu_info->cpu_index to zero
      for no reason. Referencing cpu_info->cpu_index now points always to CPU#0,
      which is apparently not what we want.
      
      Remove it.
      Spotted-by: NZou Nan hai <nanhai.zou@intel.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      699d934d
    • A
      x86: show cpuinfo only for online CPUs · c0c52d28
      Andreas Herrmann 提交于
      Fix regressions introduced with 92cb7612.
      
      It can happen that cpuinfo is displayed for CPUs that are not online or
      even worse for CPUs not present at all. As an example, following was
      shown for a "second" CPU of a single core K8 variant:
      
          processor       : 0
          vendor_id       : unknown
          cpu family      : 0
          model           : 0
          model name      : unknown
          stepping        : 0
          cache size      : 0 KB
          fpu             : yes
          fpu_exception   : yes
          cpuid level     : 0
          wp              : yes
          flags           :
          bogomips        : 0.00
          clflush size    : 0
          cache_alignment : 0
          address sizes   : 0 bits physical, 0 bits virtual
          power management:
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      c0c52d28
    • A
      x86: fix cpu-hotplug regression · 90367556
      Andreas Herrmann 提交于
      Commit d435d862
      ("cpu hotplug: mce: fix cpu hotplug error handling")
      changed the error handling in mce_cpu_callback.
      
      In cases where not all CPUs are brought up during
      boot (e.g. using maxcpus and additional_cpus parameters)
      mce_cpu_callback now returns NOTFIY_BAD because
      for such CPUs cpu_data is not completely filled when
      the notifier is called. Thus mce_create_device fails right
      at its beginning:
      
              if (!mce_available(&cpu_data[cpu]))
                      return -EIO;
      
      As a quick fix I suggest to check boot_cpu_data for MCE.
      
      To reproduce this regression:
      
      (1) boot with maxcpus=2 addtional_cpus=2 on a 4 CPU x86-64 system
      (2) # echo 1 >/sys/devices/system/cpu/cpu2/online
        -bash: echo: write error: Invalid argument
      
      dmesg shows:
      
      _cpu_up: attempt to bring up CPU 2 failed
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      90367556
    • I
      x86: ignore the sys_getcpu() tcache parameter · 4307d1e5
      Ingo Molnar 提交于
      dont use the vgetcpu tcache - it's causing problems with tasks
      migrating, they'll see the old cache up to a jiffy after the
      migration, further increasing the costs of the migration.
      
      In the worst case they see a complete bogus information from
      the tcache, when a sys_getcpu() call "invalidated" the cache
      info by incrementing the jiffies _and_ the cpuid info in the
      cache and the following vdso_getcpu() call happens after
      vdso_jiffies have been incremented.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NUlrich Drepper <drepper@redhat.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      4307d1e5
    • R
      x86: fix smp init sections · 8f818210
      Randy Dunlap 提交于
      Fix Voyager section mismatch due to using __devinit instead of __cpuinit.
      
      WARNING: vmlinux.o(.text+0xd943): Section mismatch: reference to .init.text:init_gdt (between 'voyager_smp_prepare_boot_cpu' and 'smp_vic_cmn_interrupt')
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      8f818210
    • R
      x86: fix voyager_cat_init section · e5ef67ef
      Randy Dunlap 提交于
      Fix Voyager section mismatches:  voyager_cat_init() should be __init.
      
      WARNING: vmlinux.o(.text+0xee83): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xeea6): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xeeac): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xeeb2): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xef4c): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xef56): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf10f): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf13b): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf14b): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf159): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf1b1): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf1bb): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf1c1): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf1c7): Section mismatch: reference to .init.data:eprom_buf (between 'voyager_cat_init' and 'aes_enc_blk')
      WARNING: vmlinux.o(.text+0xf1e6): Section mismatch: reference to .init.data: (between 'voyager_cat_init' and 'aes_enc_blk')
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      e5ef67ef
    • Z
      ACPI: Enable MSR (FixedHW) support for T-States · f79f06ab
      Zhao Yakui 提交于
      Add throttling control via MSR when T-states uses
      the FixHW Control Status registers.
      Signed-off-by: NZhao Yakui <yakui.zhao@intel.com>
      Signed-off-by: NLi Shaohua <shaohua.li@intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      f79f06ab
    • A
      x86: acpi_pciprobe_dmi_table[] must be __devinitdata · 55b8d50c
      Adrian Bunk 提交于
      This patch fixes the following section mismatches with CONFIG_HOTPLUG=n:
      
      <--  snip  -->
      
      ...
      WARNING: vmlinux.o(.data+0x23640): Section mismatch: reference to .init.text.20:can_skip_ioresource_align (between 'acpi_pciprobe_dmi_table' and 'pcibios_irq_mask')
      WARNING: vmlinux.o(.data+0x2366c): Section mismatch: reference to .init.text.20:can_skip_ioresource_align (between 'acpi_pciprobe_dmi_table' and 'pcibios_irq_mask')
      WARNING: vmlinux.o(.data+0x23698): Section mismatch: reference to .init.text.20:can_skip_ioresource_align (between 'acpi_pciprobe_dmi_table' and 'pcibios_irq_mask')
      ...
      
      <--  snip  -->
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      55b8d50c
    • A
      x86_64: remove acpi_pci_link_exit() · 16ee2db6
      Adrian Bunk 提交于
      acpi_pci_link_exit() is both unused and empty.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      16ee2db6
  8. 15 11月, 2007 2 次提交
    • A
      x86: don't call mce_create_device on CPU_UP_PREPARE · bae19fe0
      Andreas Herrmann 提交于
      Fix regression introduced with d435d862
      ("cpu hotplug: mce: fix cpu hotplug error handling").
      
      A CPU which was not brought up during boot (using maxcpus and
      additional_cpus parameters) couldn't be onlined anymore.  For such a CPU it
      seemed that MCE was not supported during CPU_UP_PREPARE-time which caused
      mce_cpu_callback to return NOTIFY_BAD to notifier_call_chain.  To fix this
      we:
      
       - call mce_create_device for CPU_ONLINE event (instead of CPU_UP_PREPARE),
       - avoid mce_remove_device() for the CPU that is not correctly initialized
         by mce_create_device() failure,
       - make mce_cpu_callback always return NOTIFY_OK for CPU_ONLINE event.
         Because CPU_ONLINE callback return value is always ignored.
      
      [akinobu.mita@gmail.com: avoid mce_remove_device() for not initialized device]
      [akinobu.mita@gmail.com: make mce_cpu_callback always return NOTIFY_OK]
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Signed-off-by: NAndreas Herrmann <andreas.herrmann3@amd.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bae19fe0
    • A
      x86: disable preemption in delay_tsc() · 35d5d08a
      Andrew Morton 提交于
      Marin Mitov points out that delay_tsc() can misbehave if it is preempted and
      rescheduled on a different CPU which has a skewed TSC.  Fix it by disabling
      preemption.
      
      (I assume that the worst-case behaviour here is a stall of 2^32 cycles)
      
      Cc: Andi Kleen <ak@suse.de>
      Cc: Marin Mitov <mitov@issp.bas.bg>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: <stable@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      35d5d08a
  9. 13 11月, 2007 4 次提交
    • S
      x86: enable "make ARCH=x86" · daa93fab
      Sam Ravnborg 提交于
      After unification of the Kconfig files and
      introducing K64BIT support in kconfig
      it required only trivial changes to enable
      "make ARCH=x86".
      
      With this patch you can build for x86_64 in several ways:
      1) make ARCH=x86_64
      2) make ARCH=x86 K64BIT=y
      3) make ARCH=x86 menuconfig
         => select 64-bit
      
      Likewise for i386 with the addition that
      i386 is default is you say ARCH=x86.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      daa93fab
    • S
      x86: do not use $(ARCH) when not needed · d746d647
      Sam Ravnborg 提交于
      For x86 ARCH may say i386 or x86_64 and soon x86.
      Rely on CONFIG_X64_32 to select between 32/64 or just
      hardcode the value as appropriate.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      d746d647
    • S
      x86: move the rest of the menu's to Kconfig · 506f1d07
      Sam Ravnborg 提交于
      With this patch we have all the Kconfig file shared
      between i386 and x86_64.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      506f1d07
    • S
      x86: move all simple arch settings to Kconfig · 8d5fffb9
      Sam Ravnborg 提交于
      Most of the arch settings were equal so combine them
      in the first part of Kconfig.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      8d5fffb9