1. 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
  2. 24 5月, 2008 1 次提交
  3. 20 5月, 2008 1 次提交
  4. 20 4月, 2008 1 次提交
    • 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
  5. 07 2月, 2008 3 次提交
    • D
      [CPUFREQ] Fix sparse warning in powernow-k8 · 89c04849
      Dave Jones 提交于
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:1238:9: warning: symbol '__ptr' shadows an earlier one
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:1238:9: originally declared here
      Signed-off-by: NDave Jones <davej@redhat.com>
      89c04849
    • Y
      [CPUFREQ] powernow-k8 print pstate instead of fid/did for family 10h · 4ae5c49f
      Yinghai Lu 提交于
      powernow-k8: Found 1 Quad-Core AMD Opteron(tm) Processor 8354 processors (4 cpu cores) (version 2.20.00)
      powernow-k8:    0 : fid 0x0 did 0x0 (2200 MHz)
      powernow-k8:    1 : fid 0x0 did 0x0 (2000 MHz)
      powernow-k8:    2 : fid 0x0 did 0x0 (1700 MHz)
      powernow-k8:    3 : fid 0x0 did 0x0 (1400 MHz)
      powernow-k8:    4 : fid 0x0 did 0x0 (1100 MHz)
      
      actually index for CPU_HW_PSTATE is pstate instead of fid/vid
      So print it out as pstate.
      
      powernow-k8: Found 1 Quad-Core AMD Opteron(tm) Processor 8354 processors (4 cpu cores) (version 2.20.00)
      powernow-k8:    0 : pstate 0 (2200 MHz)
      powernow-k8:    1 : pstate 1 (2000 MHz)
      powernow-k8:    2 : pstate 2 (1700 MHz)
      powernow-k8:    3 : pstate 3 (1400 MHz)
      powernow-k8:    4 : pstate 4 (1100 MHz)
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Cc: "Langsdorf, Mark" <mark.langsdorf@amd.com>
      Cc: "Herrmann3, Andreas" <Andreas.Herrmann3@amd.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      4ae5c49f
    • H
      x86: fix sparse warnings in powernow-k8.c · d7ac12fa
      Harvey Harrison 提交于
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:7: warning: symbol 'hi' shadows an earlier one
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:6: originally declared here
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:830:15: warning: symbol 'lo' shadows an earlier one
      arch/x86/kernel/cpu/cpufreq/powernow-k8.c:824:14: originally declared here
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d7ac12fa
  6. 30 1月, 2008 1 次提交
  7. 23 10月, 2007 1 次提交
  8. 20 10月, 2007 1 次提交
  9. 17 10月, 2007 1 次提交
    • M
      x86: Convert cpu_core_map to be a per cpu variable · 08357611
      Mike Travis 提交于
      This is from an earlier message from 'Christoph Lameter':
      
          cpu_core_map is currently an array defined using NR_CPUS. This means that
          we overallocate since we will rarely really use maximum configured cpu.
      
          If we put the cpu_core_map into the per cpu area then it will be allocated
          for each processor as it comes online.
      
          This means that the core map cannot be accessed until the per cpu area
          has been allocated. Xen does a weird thing here looping over all processors
          and zeroing the masks that are not yet allocated and that will be zeroed
          when they are allocated. I commented the code out.
      Signed-off-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Christoph Lameter <clameter@sgi.com>
      Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      08357611
  10. 11 10月, 2007 1 次提交
  11. 05 10月, 2007 3 次提交
  12. 14 7月, 2007 1 次提交
  13. 13 7月, 2007 2 次提交
  14. 19 5月, 2007 1 次提交
  15. 15 5月, 2007 1 次提交
  16. 13 5月, 2007 1 次提交
  17. 01 5月, 2007 1 次提交
  18. 27 2月, 2007 1 次提交
  19. 23 2月, 2007 1 次提交
  20. 04 2月, 2007 1 次提交
  21. 22 6月, 2006 1 次提交
  22. 20 6月, 2006 2 次提交
  23. 05 6月, 2006 1 次提交
  24. 31 5月, 2006 2 次提交
  25. 19 4月, 2006 2 次提交
  26. 11 4月, 2006 2 次提交
  27. 10 4月, 2006 2 次提交
  28. 28 3月, 2006 1 次提交
  29. 27 3月, 2006 1 次提交
  30. 26 3月, 2006 1 次提交