1. 18 Jul, 2007 1 commit
  2. 09 May, 2007 2 commits
  3. 02 May, 2007 3 commits
    • Jeremy Fitzhardinge's avatar
      [PATCH] i386: Convert PDA into the percpu section · 7c3576d2
      Jeremy Fitzhardinge authored
      Currently x86 (similar to x84-64) has a special per-cpu structure
      called "i386_pda" which can be easily and efficiently referenced via
      the %fs register.  An ELF section is more flexible than a structure,
      allowing any piece of code to use this area.  Indeed, such a section
      already exists: the per-cpu area.
      So this patch:
      (1) Removes the PDA and uses per-cpu variables for each current member.
      (2) Replaces the __KERNEL_PDA segment with __KERNEL_PERCPU.
      (3) Creates a per-cpu mirror of __per_cpu_offset called this_cpu_off, which
          can be used to calculate addresses for this CPU's variables.
      (4) Simplifies startup, because %fs doesn't need to be loaded with a
          special segment at early boot; it can be deferred until the first
          percpu area is allocated (or never for UP).
      The result is less code and one less x86-specific concept.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
    • Jeremy Fitzhardinge's avatar
      [PATCH] i386: Add smp_ops interface · 01a2f435
      Jeremy Fitzhardinge authored
      Add a smp_ops interface.  This abstracts the API defined by
      <linux/smp.h> for use within arch/i386.  The primary intent is that it
      be used by a paravirtualizing hypervisor to implement SMP, but it
      could also be used by non-APIC-using sub-architectures.
      This is related to CONFIG_PARAVIRT, but is implemented unconditionally
      since it is simpler that way and not a highly performance-sensitive
      Signed-off-by: default avatarJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
    • Jan Beulich's avatar
      [PATCH] x86: adjust inclusion of asm/fixmap.h · 00f1ea69
      Jan Beulich authored
      Move inclusion of asm/fixmap.h to where it is really used rather than
      where it may have been used long ago (requires a few other adjustments
      to includes due to previous implicit dependencies).
      Signed-off-by: default avatarJan Beulich <jbeulich@novell.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
  4. 13 Feb, 2007 1 commit
    • Zachary Amsden's avatar
      [PATCH] i386: SMP boot hook for paravirt · ae5da273
      Zachary Amsden authored
      Add VMI SMP boot hook.  We emulate a regular boot sequence and use the same
      APIC IPI initiation, we just poke magic values to load into the CPU state when
      the startup IPI is received, rather than having to jump through a real mode
      This is all that was needed to get SMP to work.
      Signed-off-by: default avatarZachary Amsden <zach@vmware.com>
      Signed-off-by: default avatarAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
  5. 06 Dec, 2006 1 commit
  6. 06 Oct, 2006 1 commit
  7. 01 Oct, 2006 1 commit
    • Fernando Vazquez's avatar
      [PATCH] stack overflow safe kdump: safe_smp_processor_id() · dc2bc768
      Fernando Vazquez authored
      This is a the first of a series of patch-sets aiming at making kdump more
      robust against stack overflows.
      This patch set does the following:
      * Add safe_smp_processor_id function to i386 architecture (this function was
        inspired by the x86_64 function of the same name).
      * Substitute "smp_processor_id" with the stack overflow-safe
        "safe_smp_processor_id" in the reboot path to the second kernel.
      This patch:
      On the event of a stack overflow critical data that usually resides at the
      bottom of the stack is likely to be stomped and, consequently, its use should
      be avoided.
      In particular, in the i386 and IA64 architectures the macro smp_processor_id
      ultimately makes use of the "cpu" member of struct thread_info which resides
      at the bottom of the stack.  x86_64, on the other hand, is not affected by
      this problem because it benefits from the use of the PDA infrastructure.
      To circumvent this problem I suggest implementing "safe_smp_processor_id()"
      (it already exists in x86_64) for i386 and IA64 and use it as a replacement
      for smp_processor_id in the reboot path to the dump capture kernel.  This is a
      possible implementation for i386.
      Signed-off-by: default avatarFernando Vazquez <fernando@intellilink.co.jp>
      Looks-reasonable-to: Andi Kleen <ak@muc.de>
      Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  8. 29 Sep, 2006 1 commit
    • keith mannthey's avatar
      [PATCH] convert i386 Summit subarch to use SRAT info for apicid_to_node calls · 3b08606d
      keith mannthey authored
      Convert the i386 summit subarch apicid_to_node to use node information
      provided by the SRAT.  It was discussed a little on LKML a few weeks ago
      and was seen as an acceptable fix.  The current way of obtaining the nodeid
       static inline int apicid_to_node(int logical_apicid)
         return logical_apicid >> 5;
      is just not correct for all summit systems/bios.  Assuming the apicid
      matches the Linux node number require a leap of faith that the bios mapped
      out the apicids a set way.  Modern summit HW (IBM x460) does not layout its
      bios in the manner for various reasons and is unable to boot i386 numa.
      The best way to get the correct apicid to node information is from the SRAT
      table during boot.  It lays out what apicid belongs to what node.  I use
      this information to create a table for use at run time.
      Signed-off-by: default avatarKeith Mannthey <kmannth@us.ibm.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  9. 26 Sep, 2006 2 commits
  10. 26 Apr, 2006 1 commit
  11. 10 Nov, 2005 1 commit
    • Ashok Raj's avatar
      [PATCH] PCI: Change MSI to use physical delivery mode always · b4033c17
      Ashok Raj authored
      MSI hardcoded delivery mode to use logical delivery mode. Recently
      x86_64 moved to use physical mode addressing to support physflat mode.
      With this mode enabled noticed that my eth with MSI werent working.
      msi_address_init()  was hardcoded to use logical mode for i386 and x86_64.
      So when we switch to use physical mode, things stopped working.
      Since anyway we dont use lowest priority delivery with MSI, its always
      directed to just a single CPU. Its safe  and simpler to use
      physical mode always, even when we use logical delivery mode for IPI's
      or other ioapic RTE's.
      Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
  12. 05 Sep, 2005 1 commit
    • Zwane Mwaikambo's avatar
      [PATCH] i386 boottime for_each_cpu broken · 4ad8d383
      Zwane Mwaikambo authored
      for_each_cpu walks through all processors in cpu_possible_map, which is
      defined as cpu_callout_map on i386 and isn't initialised until all
      processors have been booted. This breaks things which do for_each_cpu
      iterations early during boot. So, define cpu_possible_map as a bitmap with
      NR_CPUS bits populated. This was triggered by a patch i'm working on which
      does alloc_percpu before bringing up secondary processors.
      From: Alexander Nyberg <alexn@telia.com>
      The SMP version of __alloc_percpu checks the cpu_possible_map before
      allocating memory for a certain cpu.  With the above patches the BSP cpuid
      is never set in cpu_possible_map which breaks CONFIG_SMP on uniprocessor
      machines (as soon as someone tries to dereference something allocated via
      __alloc_percpu, which in fact is never allocated since the cpu is not set
      in cpu_possible_map).
      Signed-off-by: default avatarZwane Mwaikambo <zwane@arm.linux.org.uk>
      Signed-off-by: default avatarAlexander Nyberg <alexn@telia.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  13. 28 Jul, 2005 1 commit
  14. 25 Jun, 2005 4 commits
    • Ashok Raj's avatar
      [PATCH] make smp_prepare_cpu to a weak function · 52a119fe
      Ashok Raj authored
      I really wish smp_prepare_cpu() would disappear eventually.  In the interim
      this is ideally a weak function, so we dont end up changing several places
      to define this dummy in headers.
      Today since the dummy declaration is done only in drivers/base/cpu.c but
      the function is called in kernel/power/smp.c i get undefined reference in
      my cpu hotplug code for x86_64 under development.
      Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Li Shaohua's avatar
      [PATCH] cpu state clean after hot remove · e1367daf
      Li Shaohua authored
      Clean CPU states in order to reuse smp boot code for CPU hotplug.
      Signed-off-by: default avatarLi <Shaohua&lt;shaohua.li@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Li Shaohua's avatar
      [PATCH] sep initializing rework · 6fe940d6
      Li Shaohua authored
      Make SEP init per-cpu, so it is hotplug safe.
      Signed-off-by: default avatarLi <Shaohua&lt;shaohua.li@intel.com>
      Signed-off-by: default avatarAshok Raj <ashok.raj@intel.com>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    • Zwane Mwaikambo's avatar
      [PATCH] i386 CPU hotplug · f3705136
      Zwane Mwaikambo authored
      (The i386 CPU hotplug patch provides infrastructure for some work which Pavel
      is doing as well as for ACPI S3 (suspend-to-RAM) work which Li Shaohua
      <shaohua.li@intel.com> is doing)
      The following provides i386 architecture support for safely unregistering and
      registering processors during runtime, updated for the current -mm tree.  In
      order to avoid dumping cpu hotplug code into kernel/irq/* i dropped the
      cpu_online check in do_IRQ() by modifying fixup_irqs().  The difference being
      that on cpu offline, fixup_irqs() is called before we clear the cpu from
      cpu_online_map and a long delay in order to ensure that we never have any
      queued external interrupts on the APICs.  There are additional changes to s390
      and ppc64 to account for this change.
      2) disable local APIC timer on dead cpus.
      3) Disable preempt around irq balancing to prevent CPUs going down.
      4) Print irq stats for all possible cpus.
      5) Debugging check for interrupts on offline cpus.
      6) Hacky fixup_irqs() to redirect irqs when cpus go off/online.
      7) play_dead() for offline cpus to spin inside.
      8) Handle offline cpus set in flush_tlb_others().
      9) Grab lock earlier in smp_call_function() to prevent CPUs going down.
      10) Implement __cpu_disable() and __cpu_die().
      11) Enable local interrupts in cpu_enable() after fixup_irqs()
      12) Don't fiddle with NMI on dead cpu, but leave intact on other cpus.
      13) Program IRQ affinity whilst cpu is still in cpu_online_map on offline.
      Signed-off-by: default avatarZwane Mwaikambo <zwane@linuxpower.ca>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  15. 21 Jun, 2005 1 commit
    • Ingo Molnar's avatar
      [PATCH] smp_processor_id() cleanup · 39c715b7
      Ingo Molnar authored
      This patch implements a number of smp_processor_id() cleanup ideas that
      Arjan van de Ven and I came up with.
      The previous __smp_processor_id/_smp_processor_id/smp_processor_id API
      spaghetti was hard to follow both on the implementational and on the
      usage side.
      Some of the complexity arose from picking wrong names, some of the
      complexity comes from the fact that not all architectures defined
      In the new code, there are two externally visible symbols:
       - smp_processor_id(): debug variant.
       - raw_smp_processor_id(): nondebug variant. Replaces all existing
         uses of _smp_processor_id() and __smp_processor_id(). Defined
         by every SMP architecture in include/asm-*/smp.h.
      There is one new internal symbol, dependent on DEBUG_PREEMPT:
       - debug_smp_processor_id(): internal debug variant, mapped to
      Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new
      lib/smp_processor_id.c file.  All related comments got updated and/or
      I have build/boot tested the following 8 .config combinations on x86:
      I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT.  (Other
      architectures are untested, but should work just fine.)
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarArjan van de Ven <arjan@infradead.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
  16. 16 Apr, 2005 2 commits