1. 07 12月, 2006 4 次提交
    • J
      [PATCH] i386: Implement smp_processor_id() with the PDA · b2938f88
      Jeremy Fitzhardinge 提交于
      Use the cpu_number in the PDA to implement raw_smp_processor_id.  This is a
      little simpler than using thread_info, though the cpu field in thread_info
      cannot be removed since it is used for things other than getting the current
      CPU in common code.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Chuck Ebbert <76306.1226@compuserve.com>
      Cc: Zachary Amsden <zach@vmware.com>
      Cc: Jan Beulich <jbeulich@novell.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      b2938f88
    • J
      [PATCH] i386: Use %gs as the PDA base-segment in the kernel · f95d47ca
      Jeremy Fitzhardinge 提交于
      This patch is the meat of the PDA change.  This patch makes several related
      changes:
      
      1: Most significantly, %gs is now used in the kernel.  This means that on
         entry, the old value of %gs is saved away, and it is reloaded with
         __KERNEL_PDA.
      
      2: entry.S constructs the stack in the shape of struct pt_regs, and this
         is passed around the kernel so that the process's saved register
         state can be accessed.
      
         Unfortunately struct pt_regs doesn't currently have space for %gs
         (or %fs). This patch extends pt_regs to add space for gs (no space
         is allocated for %fs, since it won't be used, and it would just
         complicate the code in entry.S to work around the space).
      
      3: Because %gs is now saved on the stack like %ds, %es and the integer
         registers, there are a number of places where it no longer needs to
         be handled specially; namely context switch, and saving/restoring the
         register state in a signal context.
      
      4: And since kernel threads run in kernel space and call normal kernel
         code, they need to be created with their %gs == __KERNEL_PDA.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Chuck Ebbert <76306.1226@compuserve.com>
      Cc: Zachary Amsden <zach@vmware.com>
      Cc: Jan Beulich <jbeulich@novell.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      f95d47ca
    • J
      [PATCH] i386: Initialize the per-CPU data area · 62111195
      Jeremy Fitzhardinge 提交于
      When a CPU is brought up, a PDA and GDT are allocated for it.  The GDT's
      __KERNEL_PDA entry is pointed to the allocated PDA memory, so that all
      references using this segment descriptor will refer to the PDA.
      
      This patch rearranges CPU initialization a bit, so that the GDT/PDA are set up
      as early as possible in cpu_init().  Also for secondary CPUs, GDT+PDA are
      preallocated and initialized so all the secondary CPU needs to do is set up
      the ldt and load %gs.  This will be important once smp_processor_id() and
      current use the PDA.
      
      In all cases, the PDA is set up in head.S, before a CPU starts running C code,
      so the PDA is always available.
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Chuck Ebbert <76306.1226@compuserve.com>
      Cc: Zachary Amsden <zach@vmware.com>
      Cc: Jan Beulich <jbeulich@novell.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: James Bottomley <James.Bottomley@SteelEye.com>
      Cc: Matt Tolentino <matthew.e.tolentino@intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      62111195
    • S
      [PATCH] i386: espfix cleanup · be44d2aa
      Stas Sergeev 提交于
      Clean up the espfix code:
      
      - Introduced PER_CPU() macro to be used from asm
      - Introduced GET_DESC_BASE() macro to be used from asm
      - Rewrote the fixup code in asm, as calling a C code with the altered %ss
        appeared to be unsafe
      - No longer altering the stack from a .fixup section
      - 16bit per-cpu stack is no longer used, instead the stack segment base
        is patched the way so that the high word of the kernel and user %esp
        are the same.
      - Added the limit-patching for the espfix segment. (Chuck Ebbert)
      
      [jeremy@goop.org: use the x86 scaling addressing mode rather than shifting]
      Signed-off-by: NStas Sergeev <stsp@aknet.ru>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Acked-by: NZachary Amsden <zach@vmware.com>
      Acked-by: NChuck Ebbert <76306.1226@compuserve.com>
      Acked-by: NJan Beulich <jbeulich@novell.com>
      Cc: Andi Kleen <ak@muc.de>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      be44d2aa
  2. 04 10月, 2006 2 次提交
    • E
      BUG_ON cleanups in arch/i386 · 8d8f3cbe
      Eric Sesterhenn 提交于
      This changes a couple of if() BUG(); constructs to
      BUG_ON(); so it can be safely optimized away.
      Signed-off-by: NEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      8d8f3cbe
    • L
      x86: Fix booting with "no387 nofxsr" · 8ccb3dcd
      Linus Torvalds 提交于
      Jesper Juhl reported that testing the software math-emulation by forcing
      "no387" doesn't work on modern CPU's.
      
      The reason was two-fold:
       - you also need to pass in "nofxsr" to make sure that we not only don't
         touch the old i387 legacy hardware, it also needs to disable the
         modern XMM/FXSR sequences
       - "nofxsr" didn't actually clear the capability bits immediately,
         leaving the early boot sequence still using FXSR until we got to
         the identify_cpu() stage.
      
      This fixes the "nofxsr" flag to take effect immediately on the boot CPU.
      
      Debugging by Randy Dunlap
      Acked-by: NRandy Dunlap <rdunlap@xenotime.net>
      Cc: Jesper Juhl <jesper.juhl@gmail.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8ccb3dcd
  3. 26 9月, 2006 4 次提交
  4. 28 6月, 2006 3 次提交
  5. 23 6月, 2006 2 次提交
  6. 28 3月, 2006 1 次提交
    • S
      [PATCH] sched: new sched domain for representing multi-core · 1e9f28fa
      Siddha, Suresh B 提交于
      Add a new sched domain for representing multi-core with shared caches
      between cores.  Consider a dual package system, each package containing two
      cores and with last level cache shared between cores with in a package.  If
      there are two runnable processes, with this appended patch those two
      processes will be scheduled on different packages.
      
      On such systems, with this patch we have observed 8% perf improvement with
      specJBB(2 warehouse) benchmark and 35% improvement with CFP2000 rate(with 2
      users).
      
      This new domain will come into play only on multi-core systems with shared
      caches.  On other systems, this sched domain will be removed by domain
      degeneration code.  This new domain can be also used for implementing power
      savings policy (see OLS 2005 CMP kernel scheduler paper for more details..
      I will post another patch for power savings policy soon)
      
      Most of the arch/* file changes are for cpu_coregroup_map() implementation.
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1e9f28fa
  7. 23 3月, 2006 3 次提交
  8. 09 3月, 2006 1 次提交
  9. 25 2月, 2006 1 次提交
    • J
      [PATCH] x86: fix broken SMP boot sequence · 2b932f6c
      James Bottomley 提交于
      Recent GDT changes broke the SMP boot sequence if the booting CPU is
      numbered anything other than zero.  There's also a subtle source of error
      in that the boot time CPU now uses cpu_gdt_table (which is actually the GDT
      for booting CPUs in head.S).  This patch fixes both problems by making GDT
      descriptors themselves allocated from a per_cpu area and switching to them
      in cpu_init(), which now means that cpu_gdt_table is exclusively used for
      booting CPUs again.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      Cc: Zachary Amsden <zach@vmware.com>
      Cc: Matt Tolentino <metolent@snoqualmie.dp.intel.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2b932f6c
  10. 06 2月, 2006 1 次提交
  11. 12 1月, 2006 1 次提交
  12. 09 1月, 2006 1 次提交
  13. 07 1月, 2006 2 次提交
  14. 15 11月, 2005 2 次提交
  15. 07 11月, 2005 1 次提交
  16. 31 10月, 2005 2 次提交
  17. 11 9月, 2005 1 次提交
  18. 05 9月, 2005 2 次提交
    • Z
      [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management · 4d37e7e3
      Zachary Amsden 提交于
      i386 inline assembler cleanup.
      
      This change encapsulates descriptor and task register management.  Also,
      it is possible to improve assembler generation in two cases; savesegment
      may store the value in a register instead of a memory location, which
      allows GCC to optimize stack variables into registers, and MOV MEM, SEG
      is always a 16-bit write to memory, making the casting in math-emu
      unnecessary.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4d37e7e3
    • Z
      [PATCH] i386: inline asm cleanup · 4bb0d3ec
      Zachary Amsden 提交于
      i386 Inline asm cleanup.  Use cr/dr accessor functions.
      
      Also, a potential bugfix.  Also, some CR accessors really should be volatile.
      Reads from CR0 (numeric state may change in an exception handler), writes to
      CR4 (flipping CR4.TSD) and reads from CR2 (page fault) prevent instruction
      re-ordering.  I did not add memory clobber to CR3 / CR4 / CR0 updates, as it
      was not there to begin with, and in no case should kernel memory be clobbered,
      except when doing a TLB flush, which already has memory clobber.
      
      I noticed that page invalidation does not have a memory clobber.  I can't find
      a bug as a result, but there is definitely a potential for a bug here:
      
      #define __flush_tlb_single(addr) \
      	__asm__ __volatile__("invlpg %0": :"m" (*(char *) addr))
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4bb0d3ec
  19. 08 7月, 2005 1 次提交
  20. 26 6月, 2005 3 次提交
  21. 24 6月, 2005 1 次提交
  22. 21 5月, 2005 1 次提交