1. 17 12月, 2008 1 次提交
  2. 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
  3. 28 7月, 2008 5 次提交
  4. 26 7月, 2008 1 次提交
  5. 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
  6. 18 7月, 2008 1 次提交
  7. 24 5月, 2008 1 次提交
  8. 13 5月, 2008 1 次提交
  9. 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
  10. 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
  11. 25 1月, 2008 2 次提交
  12. 21 12月, 2007 1 次提交
  13. 05 12月, 2007 1 次提交
  14. 20 10月, 2007 2 次提交
  15. 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
  16. 18 10月, 2007 2 次提交
  17. 11 10月, 2007 1 次提交
  18. 13 9月, 2007 1 次提交
  19. 22 7月, 2007 3 次提交
  20. 10 5月, 2007 1 次提交
    • R
      Add suspend-related notifications for CPU hotplug · 8bb78442
      Rafael J. Wysocki 提交于
      Since nonboot CPUs are now disabled after tasks and devices have been
      frozen and the CPU hotplug infrastructure is used for this purpose, we need
      special CPU hotplug notifications that will help the CPU-hotplug-aware
      subsystems distinguish normal CPU hotplug events from CPU hotplug events
      related to a system-wide suspend or resume operation in progress.  This
      patch introduces such notifications and causes them to be used during
      suspend and resume transitions.  It also changes all of the
      CPU-hotplug-aware subsystems to take these notifications into consideration
      (for now they are handled in the same way as the corresponding "normal"
      ones).
      
      [oleg@tv-sign.ru: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8bb78442
  21. 07 12月, 2006 1 次提交
  22. 01 8月, 2006 1 次提交
  23. 28 6月, 2006 4 次提交
  24. 27 6月, 2006 1 次提交
  25. 26 4月, 2006 1 次提交
  26. 28 3月, 2006 1 次提交