1. 29 10月, 2009 1 次提交
    • T
      percpu: make percpu symbols in x86 unique · 0fe1e009
      Tejun Heo 提交于
      This patch updates percpu related symbols in x86 such that percpu
      symbols are unique and don't clash with local symbols.  This serves
      two purposes of decreasing the possibility of global percpu symbol
      collision and allowing dropping per_cpu__ prefix from percpu symbols.
      
      * arch/x86/kernel/cpu/common.c: rename local variable to avoid collision
      
      * arch/x86/kvm/svm.c: s/svm_data/sd/ for local variables to avoid collision
      
      * arch/x86/kernel/cpu/cpu_debug.c: s/cpu_arr/cpud_arr/
        				   s/priv_arr/cpud_priv_arr/
      				   s/cpu_priv_count/cpud_priv_count/
      
      * arch/x86/kernel/cpu/intel_cacheinfo.c: s/cpuid4_info/ici_cpuid4_info/
        					 s/cache_kobject/ici_cache_kobject/
      					 s/index_kobject/ici_index_kobject/
      
      * arch/x86/kernel/ds.c: s/cpu_context/cpu_ds_context/
      
      Partly based on Rusty Russell's "alloc_percpu: rename percpu vars
      which cause name clashes" patch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Acked-by: N(kvm) Avi Kivity <avi@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: x86@kernel.org
      0fe1e009
  2. 04 9月, 2009 1 次提交
  3. 11 7月, 2009 1 次提交
  4. 10 4月, 2009 6 次提交
  5. 12 3月, 2009 1 次提交
  6. 27 2月, 2009 1 次提交
    • I
      fix warning in arch/x86/kernel/cpu/intel_cacheinfo.c · ba1d755a
      Ingo Molnar 提交于
      fix this warning:
      
        arch/x86/kernel/cpu/intel_cacheinfo.c:139: warning: ‘k8_nb_id’ defined but not used
        arch/x86/kernel/cpu/intel_cacheinfo.c:527: warning: ‘free_cache_attributes’ defined but not used
        arch/x86/kernel/cpu/intel_cacheinfo.c:538: warning: ‘detect_cache_attributes’ defined but not used
      
      Unused variables in the !CONFIG_SYSCTL case.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ba1d755a
  7. 01 2月, 2009 1 次提交
  8. 27 1月, 2009 1 次提交
  9. 12 1月, 2009 1 次提交
  10. 29 12月, 2008 1 次提交
  11. 17 12月, 2008 1 次提交
  12. 13 12月, 2008 1 次提交
    • R
      cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and... · 29c0177e
      Rusty Russell 提交于
      cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and cpulist_scnprintf to take pointers.
      
      Impact: change calling convention of existing cpumask APIs
      
      Most cpumask functions started with cpus_: these have been replaced by
      cpumask_ ones which take struct cpumask pointers as expected.
      
      These four functions don't have good replacement names; fortunately
      they're rarely used, so we just change them over.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: paulus@samba.org
      Cc: mingo@redhat.com
      Cc: tony.luck@intel.com
      Cc: ralf@linux-mips.org
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: cl@linux-foundation.org
      Cc: srostedt@redhat.com
      29c0177e
  13. 30 11月, 2008 1 次提交
  14. 28 7月, 2008 5 次提交
  15. 26 7月, 2008 1 次提交
  16. 19 7月, 2008 1 次提交
    • M
      cpumask: Replace cpumask_of_cpu with cpumask_of_cpu_ptr · 65c01184
      Mike Travis 提交于
        * This patch replaces the dangerous lvalue version of cpumask_of_cpu
          with new cpumask_of_cpu_ptr macros.  These are patterned after the
          node_to_cpumask_ptr macros.
      
          In general terms, if there is a cpumask_of_cpu_map[] then a pointer to
          the cpumask_of_cpu_map[cpu] entry is used.  The cpumask_of_cpu_map
          is provided when there is a large NR_CPUS count, reducing
          greatly the amount of code generated and stack space used for
          cpumask_of_cpu().  The pointer to the cpumask_t value is needed for
          calling set_cpus_allowed_ptr() to reduce the amount of stack space
          needed to pass the cpumask_t value.
      
          If there isn't a cpumask_of_cpu_map[], then a temporary variable is
          declared and filled in with value from cpumask_of_cpu(cpu) as well as
          a pointer variable pointing to this temporary variable.  Afterwards,
          the pointer is used to reference the cpumask value.  The compiler
          will optimize out the extra dereference through the pointer as well
          as the stack space used for the pointer, resulting in identical code.
      
          A good example of the orthogonal usages is in net/sunrpc/svc.c:
      
      	case SVC_POOL_PERCPU:
      	{
      		unsigned int cpu = m->pool_to[pidx];
      		cpumask_of_cpu_ptr(cpumask, cpu);
      
      		*oldmask = current->cpus_allowed;
      		set_cpus_allowed_ptr(current, cpumask);
      		return 1;
      	}
      	case SVC_POOL_PERNODE:
      	{
      		unsigned int node = m->pool_to[pidx];
      		node_to_cpumask_ptr(nodecpumask, node);
      
      		*oldmask = current->cpus_allowed;
      		set_cpus_allowed_ptr(current, nodecpumask);
      		return 1;
      	}
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      65c01184
  17. 18 7月, 2008 1 次提交
  18. 24 5月, 2008 1 次提交
  19. 13 5月, 2008 1 次提交
  20. 20 4月, 2008 3 次提交
    • M
      x86: modify show_shared_cpu_map in intel_cacheinfo · fb0f330e
      Mike Travis 提交于
        * Removed kmalloc (or local array) in show_shared_cpu_map().
      
        * Added show_shared_cpu_list() function.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fb0f330e
    • M
      x86: use new set_cpus_allowed_ptr function · fc0e4748
      Mike Travis 提交于
        * Use new set_cpus_allowed_ptr() function added by previous patch,
          which instead of passing the "newly allowed cpus" cpumask_t arg
          by value,  pass it by pointer:
      
          -int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
          +int set_cpus_allowed_ptr(struct task_struct *p, const cpumask_t *new_mask)
      
        * Cleanup uses of CPU_MASK_ALL.
      
        * Collapse other NR_CPUS changes to arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c
          Use pointers to cpumask_t arguments whenever possible.
      
      Depends on:
      	[sched-devel]: sched: add new set_cpus_allowed_ptr function
      
      Cc: Len Brown <len.brown@intel.com>
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fc0e4748
    • M
      x86: reduce memory and stack usage in intel_cacheinfo · 6b6309b4
      Mike Travis 提交于
      * Change the following static arrays sized by NR_CPUS to
        per_cpu data variables:
      
      	_cpuid4_info *cpuid4_info[NR_CPUS];
      	_index_kobject *index_kobject[NR_CPUS];
      	kobject * cache_kobject[NR_CPUS];
      
      * Remove the local NR_CPUS array with a kmalloc'd region in
        show_shared_cpu_map().
      
      Also some minor complaints from checkpatch.pl fixed.
      
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      6b6309b4
  21. 01 2月, 2008 1 次提交
    • H
      x86: fix sparse warnings in intel_cacheinfo.c · c1666e66
      Harvey Harrison 提交于
      arch/x86/kernel/cpu/intel_cacheinfo.c:355:7: warning: symbol 'i' shadows an earlier one
      arch/x86/kernel/cpu/intel_cacheinfo.c:296:39: originally declared here
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:18: warning: incorrect type in argument 2 (different signedness)
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:18:    expected unsigned int *eax
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:18:    got int *
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:28: warning: incorrect type in argument 3 (different signedness)
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:28:    expected unsigned int *ebx
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:28:    got int *
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:38: warning: incorrect type in argument 4 (different signedness)
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:38:    expected unsigned int *ecx
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:38:    got int *
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:48: warning: incorrect type in argument 5 (different signedness)
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:48:    expected unsigned int *edx
      arch/x86/kernel/cpu/intel_cacheinfo.c:367:48:    got int *
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c1666e66
  22. 25 1月, 2008 2 次提交
  23. 21 12月, 2007 1 次提交
  24. 05 12月, 2007 1 次提交
  25. 20 10月, 2007 2 次提交
  26. 19 10月, 2007 1 次提交
    • A
      cpu hotplug: intel_cacheinfo: fix cpu hotplug error handling · ef1d7151
      Akinobu Mita 提交于
      - Fix resource leakage in error case within detect_cache_attributes()
      
      - Don't register hotcpu notifier when cache_add_dev() returns error
      
      - Introduce cache_dev_map cpumask to track whether cache interface for
        CPU is successfully added by cache_add_dev() or not.
      
        cache_add_dev() may fail with out of memory error. In order to
        avoid cache_remove_dev() with that uninitialized cache interface when
        CPU_DEAD event is delivered we need to have the cache_dev_map cpumask.
      
        (We cannot change cache_add_dev() from CPU_ONLINE event handler
        to CPU_UP_PREPARE event handler. Because cache_add_dev() needs
        to do cpuid and store the results with its CPU online.)
      
      [nix.or.die@googlemail.com: fix a section mismatch warning]
      Cc: Ashok Raj <ashok.raj@intel.com>
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Oleg Nesterov <oleg@tv-sign.ru>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jan Beulich <jbeulich@novell.com>
      Signed-off-by: NGabriel Craciunescu <nix.or.die@googlemail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ef1d7151
  27. 18 10月, 2007 1 次提交