1. 18 10月, 2007 2 次提交
    • J
      x86: multi-byte single instruction NOPs · 32c464f5
      Jan Beulich 提交于
      Add support for and use the multi-byte NOPs recently documented to be
      available on all PentiumPro and later processors.
      
      This patch only applies cleanly on top of the "x86: misc.
      constifications" patch sent earlier.
      
      [ tglx: arch/x86 adaptation ]
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      
       arch/x86/kernel/alternative.c  |   23 ++++++++++++++++++++++-
       include/asm-x86/processor_32.h |   22 ++++++++++++++++++++++
       include/asm-x86/processor_64.h |   22 ++++++++++++++++++++++
       3 files changed, 66 insertions(+), 1 deletion(-)
      32c464f5
    • S
      i386: fix argument signedness warnings · ffecad95
      Satyam Sharma 提交于
      These build warnings:
      
      In file included from include/asm/thread_info.h:16,
      from include/linux/thread_info.h:21,
      from include/linux/preempt.h:9,
      from include/linux/spinlock.h:49,
      from include/linux/vmalloc.h:4,
      from arch/i386/boot/compressed/misc.c:14:
      include/asm/processor.h: In function cpuid_count
      include/asm/processor.h:615: warning: pointer targets in passing argument 1 of native_cpuid differ in signedness
      include/asm/processor.h:615: warning: pointer targets in passing argument 2 of native_cpuid differ in signedness
      include/asm/processor.h:615: warning: pointer targets in passing argument 3 of native_cpuid differ in signedness
      include/asm/processor.h:615: warning: pointer targets in passing argument 4 of native_cpuid differ in signedness
      
      come because the arguments have been specified as pointers to (signed) int
      types, not unsigned. So let's specify those as unsigned. Do some codingstyle
      here and there while at it.
      
      [ tglx: arch/x86 adaptation ]
      Signed-off-by: NSatyam Sharma <satyam@infradead.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ffecad95
  2. 11 10月, 2007 1 次提交
  3. 23 7月, 2007 1 次提交
    • J
      x86: Replace NSC/Cyrix specific chipset access macros by inlined functions. · f25f64ed
      Juergen Beisert 提交于
      Due to index register access ordering problems, when using macros a line
      like this fails (and does nothing):
      
      	setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);
      
      With inlined functions this line will work as expected.
      
      Note about a side effect: Seems on Geode GX1 based systems the
      "suspend on halt power saving feature" was never enabled due to this
      wrong macro expansion. With inlined functions it will be enabled, but
      this will stop the TSC when the CPU runs into a HLT instruction.
      Kernel output something like this:
      	Clocksource tsc unstable (delta = -472746897 ns)
      
      This is the 3rd version of this patch.
      
       - Adding missed arch/i386/kernel/cpu/mtrr/state.c
      	Thanks to Andres Salomon
       - Adding some big fat comments into the new header file
       	Suggested by Andi Kleen
      
      AK: fixed x86-64 compilation
      Signed-off-by: NJuergen Beisert <juergen@kreuzholzen.de>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f25f64ed
  4. 22 7月, 2007 1 次提交
  5. 17 7月, 2007 1 次提交
  6. 13 7月, 2007 1 次提交
  7. 15 5月, 2007 1 次提交
  8. 03 5月, 2007 12 次提交
  9. 27 2月, 2007 1 次提交
    • L
      Revert "[PATCH] i386: add idle notifier" · ea3d5226
      Linus Torvalds 提交于
      This reverts commit 2ff2d3d7.
      
      Uwe Bugla reports that he cannot mount a floppy drive any more, and Jiri
      Slaby bisected it down to this commit.
      
      Benjamin LaHaise also points out that this is a big hot-path, and that
      interrupt delivery while idle is very common and should not go through
      all these expensive gyrations.
      
      Fix up conflicts in arch/i386/kernel/apic.c and arch/i386/kernel/irq.c
      due to other unrelated irq changes.
      
      Cc: Stephane Eranian <eranian@hpl.hp.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Andrew Morton <akpm@osdl.org>
      Cc: Uwe Bugla <uwe.bugla@gmx.de>
      Cc: Jiri Slaby <jirislaby@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ea3d5226
  10. 13 2月, 2007 2 次提交
    • S
      [PATCH] i386: add idle notifier · 2ff2d3d7
      Stephane Eranian 提交于
      Add a notifier mechanism to the low level idle loop.  You can register a
      callback function which gets invoked on entry and exit from the low level idle
      loop.  The low level idle loop is defined as the polling loop, low-power call,
      or the mwait instruction.  Interrupts processed by the idle thread are not
      considered part of the low level loop.
      
      The notifier can be used to measure precisely how much is spent in useless
      execution (or low power mode).  The perfmon subsystem uses it to turn on/off
      monitoring.
      Signed-off-by: Nstephane eranian <eranian@hpl.hp.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      2ff2d3d7
    • J
      [PATCH] i386: Convert i386 PDA code to use %fs · 464d1a78
      Jeremy Fitzhardinge 提交于
      Convert the PDA code to use %fs rather than %gs as the segment for
      per-processor data.  This is because some processors show a small but
      measurable performance gain for reloading a NULL segment selector (as %fs
      generally is in user-space) versus a non-NULL one (as %gs generally is).
      
      On modern processors the difference is very small, perhaps undetectable.
      Some old AMD "K6 3D+" processors are noticably slower when %fs is used
      rather than %gs; I have no idea why this might be, but I think they're
      sufficiently rare that it doesn't matter much.
      
      This patch also fixes the math emulator, which had not been adjusted to
      match the changed struct pt_regs.
      
      [frederik.deweerdt@gmail.com: fixit with gdb]
      [mingo@elte.hu: Fix KVM too]
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Ian Campbell <Ian.Campbell@XenSource.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NZachary Amsden <zach@vmware.com>
      Cc: Eric Dumazet <dada1@cosmosbay.com>
      Signed-off-by: NFrederik Deweerdt <frederik.deweerdt@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      464d1a78
  11. 23 1月, 2007 1 次提交
    • J
      [PATCH] x86: fix PDA variables to work during boot · 9ee79a3d
      James Bottomley 提交于
      The current PDA code, which went in in post 2.6.19 has a flaw in that it
      doesn't correctly cycle the GDT and %GS segment through the boot PDA,
      the CPU PDA and finally the per-cpu PDA.
      
      The bug generally doesn't show up if the boot CPU id is zero, but
      everything falls apart for a non zero boot CPU id.  The basically kills
      voyager which is perfectly capable of doing non zero CPU id boots, so
      voyager currently won't boot without this.
      
      The fix is to be careful and actually do the GDT setups correctly.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9ee79a3d
  12. 07 12月, 2006 6 次提交
    • R
      [PATCH] i386: cpu_detect extraction · d7cd5611
      Rusty Russell 提交于
      Both lhype and Xen want to call the core of the x86 cpu detect code before
      calling start_kernel.
      
      (extracted from larger patch)
      
      AK: folded in start_kernel header patch
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      d7cd5611
    • R
      [PATCH] paravirt: Patch inline replacements for paravirt intercepts · 139ec7c4
      Rusty Russell 提交于
      It turns out that the most called ops, by several orders of magnitude,
      are the interrupt manipulation ops.  These are obvious candidates for
      patching, so mark them up and create infrastructure for it.
      
      The method used is that the ops structure has a patch function, which
      is called for each place which needs to be patched: this returns a
      number of instructions (the rest are NOP-padded).
      
      Usually we can spare a register (%eax) for the binary patched code to
      use, but in a couple of critical places in entry.S we can't: we make
      the clobbers explicit at the call site, and manually clobber the
      allowed registers in debug mode as an extra check.
      
      And:
      
      Don't abuse CONFIG_DEBUG_KERNEL, add CONFIG_DEBUG_PARAVIRT.
      
      And:
      
      AK:  Fix warnings in x86-64 alternative.c build
      
      And:
      
      AK: Fix compilation with defconfig
      
      And:
      
      ^From: Andrew Morton <akpm@osdl.org>
      
      Some binutlises still like to emit references to __stop_parainstructions and
      __start_parainstructions.
      
      And:
      
      AK: Fix warnings about unused variables when PARAVIRT is disabled.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NJeremy Fitzhardinge <jeremy@xensource.com>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      139ec7c4
    • R
      [PATCH] paravirt: header and stubs for paravirtualisation · d3561b7f
      Rusty Russell 提交于
      Create a paravirt.h header for all the critical operations which need to be
      replaced with hypervisor calls, and include that instead of defining native
      operations, when CONFIG_PARAVIRT.
      
      This patch does the dumbest possible replacement of paravirtualized
      instructions: calls through a "paravirt_ops" structure.  Currently these are
      function implementations of native hardware: hypervisors will override the ops
      structure with their own variants.
      
      All the pv-ops functions are declared "fastcall" so that a specific
      register-based ABI is used, to make inlining assember easier.
      
      And:
      
      +From: Andy Whitcroft <apw@shadowen.org>
      
      The paravirt ops introduce a 'weak' attribute onto memory_setup().
      Code ordering leads to the following warnings on x86:
      
          arch/i386/kernel/setup.c:651: warning: weak declaration of
                      `memory_setup' after first use results in unspecified behavior
      
      Move memory_setup() to avoid this.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NChris Wright <chrisw@sous-sol.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: Zachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
      d3561b7f
    • A
      [PATCH] i386: Retrieve CLFLUSH size from CPUID · 770d132f
      Andi Kleen 提交于
      Also report it in /proc/cpuinfo similar to x86-64.
      
      Needed for followon patch
      Signed-off-by: NAndi Kleen <ak@suse.de>
      770d132f
    • 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
  13. 14 10月, 2006 1 次提交
  14. 26 9月, 2006 1 次提交
  15. 28 6月, 2006 1 次提交
  16. 27 6月, 2006 2 次提交
  17. 23 6月, 2006 2 次提交
  18. 26 4月, 2006 1 次提交
  19. 29 3月, 2006 1 次提交
  20. 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