1. 20 1月, 2009 3 次提交
  2. 18 1月, 2009 8 次提交
  3. 16 1月, 2009 3 次提交
    • T
      x86: make pda a percpu variable · b12d8db8
      Tejun Heo 提交于
      [ Based on original patch from Christoph Lameter and Mike Travis. ]
      
      As pda is now allocated in percpu area, it can easily be made a proper
      percpu variable.  Make it so by defining per cpu symbol from linker
      script and declaring it in C code for SMP and simply defining it for
      UP.  This change cleans up code and brings SMP and UP closer a bit.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b12d8db8
    • T
      x86: fold pda into percpu area on SMP · 1a51e3a0
      Tejun Heo 提交于
      [ Based on original patch from Christoph Lameter and Mike Travis. ]
      
      Currently pdas and percpu areas are allocated separately.  %gs points
      to local pda and percpu area can be reached using pda->data_offset.
      This patch folds pda into percpu area.
      
      Due to strange gcc requirement, pda needs to be at the beginning of
      the percpu area so that pda->stack_canary is at %gs:40.  To achieve
      this, a new percpu output section macro - PERCPU_VADDR_PREALLOC() - is
      added and used to reserve pda sized chunk at the start of the percpu
      area.
      
      After this change, for boot cpu, %gs first points to pda in the
      data.init area and later during setup_per_cpu_areas() gets updated to
      point to the actual pda.  This means that setup_per_cpu_areas() need
      to reload %gs for CPU0 while clearing pda area for other cpus as cpu0
      already has modified it when control reaches setup_per_cpu_areas().
      
      This patch also removes now unnecessary get_local_pda() and its call
      sites.
      
      A lot of this patch is taken from Mike Travis' "x86_64: Fold pda into
      per cpu area" patch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1a51e3a0
    • T
      x86: use static _cpu_pda array · c8f3329a
      Tejun Heo 提交于
      _cpu_pda array first uses statically allocated storage in data.init
      and then switches to allocated bootmem to conserve space.  However,
      after folding pda area into percpu area, _cpu_pda array will be
      removed completely.  Drop the reallocation part to simplify the code
      for soon-to-follow changes.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c8f3329a
  4. 11 1月, 2009 1 次提交
  5. 08 1月, 2009 1 次提交
  6. 04 1月, 2009 2 次提交
    • M
      x86: cleanup remaining cpumask_t ops in smpboot code · c2d1cec1
      Mike Travis 提交于
      Impact: use new cpumask API to reduce memory and stack usage
      
      Allocate the following local cpumasks based on the number of cpus that
      are present.  References will use new cpumask API.  (Currently only
      modified for x86_64, x86_32 continues to use the *_map variants.)
      
          cpu_callin_mask
          cpu_callout_mask
          cpu_initialized_mask
          cpu_sibling_setup_mask
      
      Provide the following accessor functions:
      
          struct cpumask *cpu_sibling_mask(int cpu)
          struct cpumask *cpu_core_mask(int cpu)
      
      Other changes are when setting or clearing the cpu online, possible
      or present maps, use the accessor functions.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c2d1cec1
    • M
      x86: cleanup some remaining usages of NR_CPUS where s/b nr_cpu_ids · 9628937d
      Mike Travis 提交于
      Impact: Reduce future system panics due to cpumask operations using NR_CPUS
      
      Insure that code does not look at bits >= nr_cpu_ids as when cpumasks are
      allocated based on nr_cpu_ids, these extra bits will not be defined.
      
      Also some other minor updates:
      
         * change in to use cpu accessor function set_cpu_present() instead of
           directly accessing cpu_present_map w/cpu_clear() [arch/x86/kernel/reboot.c]
      
         * use cpumask_of() instead of &cpumask_of_cpu() [arch/x86/kernel/reboot.c]
      
         * optimize some cpu_mask_to_apicid_and functions.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9628937d
  7. 20 12月, 2008 1 次提交
  8. 02 11月, 2008 1 次提交
    • A
      x86: Hypervisor detection and get tsc_freq from hypervisor · 88b094fb
      Alok Kataria 提交于
      Impact: Changes timebase calibration on Vmware.
      
      v3->v2 : Abstract the hypervisor detection and feature (tsc_freq) request
      	 behind a hypervisor.c file
      v2->v1 : Add a x86_hyper_vendor field to the cpuinfo_x86 structure.
      	 This avoids multiple calls to the hypervisor detection function.
      
      This patch adds function to detect if we are running under VMware.
      The current way to check if we are on VMware is following,
      #  check if "hypervisor present bit" is set, if so read the 0x40000000
         cpuid leaf and check for "VMwareVMware" signature.
      #  if the above fails, check the DMI vendors name for "VMware" string
         if we find one we query the VMware hypervisor port to check if we are
         under VMware.
      
      The DMI + "VMware hypervisor port check" is needed for older VMware products,
      which don't implement the hypervisor signature cpuid leaf.
      Also note that since we are checking for the DMI signature the hypervisor
      port should never be accessed on native hardware.
      
      This patch also adds a hypervisor_get_tsc_freq function, instead of
      calibrating the frequency which can be error prone in virtualized
      environment, we ask the hypervisor for it. We get the frequency from
      the hypervisor by accessing the hypervisor port if we are running on VMware.
      Other hypervisors too can add code to the generic routine to get frequency on
      their platform.
      Signed-off-by: NAlok N Kataria <akataria@vmware.com>
      Signed-off-by: NDan Hecht <dhecht@vmware.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      88b094fb
  9. 31 10月, 2008 4 次提交
    • I
      x86: build fix · b342797c
      Ingo Molnar 提交于
      Impact: build fix on certain UP configs
      
      fix:
      
       arch/x86/kernel/cpu/common.c: In function 'cpu_init':
       arch/x86/kernel/cpu/common.c:1141: error: 'boot_cpu_id' undeclared (first use in this function)
       arch/x86/kernel/cpu/common.c:1141: error: (Each undeclared identifier is reported only once
       arch/x86/kernel/cpu/common.c:1141: error: for each function it appears in.)
      
      Pull in asm/smp.h on UP, so that we get the definition of
      boot_cpu_id.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b342797c
    • I
      x86: cpu_index build fix · 1c4acdb4
      Ingo Molnar 提交于
      fix:
      
       arch/x86/kernel/cpu/common.c: In function 'early_identify_cpu':
       arch/x86/kernel/cpu/common.c:553: error: 'struct cpuinfo_x86' has no member named 'cpu_index'
      
      as cpu_index is only available on SMP.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1c4acdb4
    • J
      x86/voyager: fix missing cpu_index initialisation · bfcb4c1b
      James Bottomley 提交于
      Impact: fix /proc/cpuinfo output on x86/Voyager
      
      Ever since
      
      | commit 92cb7612
      | Author: Mike Travis <travis@sgi.com>
      | Date:   Fri Oct 19 20:35:04 2007 +0200
      |
      |     x86: convert cpuinfo_x86 array to a per_cpu array
      
      We've had an extra field in cpuinfo_x86 which is cpu_index.
      Unfortunately, voyager has never initialised this, although the only
      noticeable impact seems to be that /proc/cpuinfo shows all zeros for
      the processor ids.
      
      Anyway, fix this by initialising the boot CPU properly and setting the
      index when the secondaries update.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      bfcb4c1b
    • J
      x86/voyager: fix compile breakage caused by dc1e35c6 · b3572e36
      James Bottomley 提交于
      Impact: build fix on x86/Voyager
      
      Given commits like this:
      
      | Author: Suresh Siddha <suresh.b.siddha@intel.com>
      | Date:   Tue Jul 29 10:29:19 2008 -0700
      |
      |     x86, xsave: enable xsave/xrstor on cpus with xsave support
      
      Which deliberately expose boot cpu dependence to pieces of the system,
      I think it's time to explicitly have a variable for it to prevent this
      continual misassumption that the boot CPU is zero.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b3572e36
  10. 13 10月, 2008 3 次提交
  11. 10 10月, 2008 1 次提交
  12. 17 9月, 2008 1 次提交
  13. 14 9月, 2008 3 次提交
  14. 08 9月, 2008 1 次提交
  15. 07 9月, 2008 1 次提交
  16. 06 9月, 2008 4 次提交
  17. 05 9月, 2008 2 次提交