1. 26 12月, 2008 7 次提交
  2. 19 12月, 2008 4 次提交
    • M
      sysfs: add documentation to cputopology.txt for system cpumasks · d62720ad
      Mike Travis 提交于
      Add information to cputopology.txt explaining the output of various
      system cpumask's.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d62720ad
    • M
      cpumask: add sysfs displays for configured and disabled cpu maps · e057d7ae
      Mike Travis 提交于
      Impact: add new sysfs files.
      
      Add sysfs files "kernel_max" and "offline" to display the max CPU index
      allowed (NR_CPUS-1), and the map of cpus that are offline.
      
      Cpus can be offlined via HOTPLUG, disabled by the BIOS ACPI tables, or
      if they exceed the number of cpus allowed by the NR_CPUS config option,
      or the "maxcpus=NUM" kernel start parameter.
      
      The "possible_cpus=NUM" parameter can also extend the number of possible
      cpus allowed, in which case the cpus not present at startup will be
      in the offline state.  (These cpus can be HOTPLUGGED ON after system
      startup [pending a follow-on patch to provide the capability via the
      /sys/devices/sys/cpu/cpuN/online mechanism to bring them online.])
      
      By design, the "offlined cpus > possible cpus" display will always
      use the following formats:
      
        * all possible cpus online:   "x$"    or "x-y$"
        * some possible cpus offline: ".*,x$" or ".*,x-y$"
      
      where:
        x == number of possible cpus (nr_cpu_ids); and
        y == number of cpus >= NR_CPUS or maxcpus (if y > x).
      
      One use of this feature is for distros to select (or configure) the
      appropriate kernel to install for the resident system.
      
      Notes:
        * cpus offlined <= possible cpus will be printed for all architectures.
        * cpus offlined >  possible cpus will only be printed for arches that
        	set 'total_cpus' [X86 only in this patch].
      
      Based on tip/cpus4096 + .../rusty/linux-2.6-for-ingo.git/master +
      	 x86-only-patches sent 12/15.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      e057d7ae
    • M
      cpumask: documentation for cpumask_var_t · ec26b805
      Mike Travis 提交于
      Impact: New kerneldoc comments
      
      Additional documentation added to all the alloc_cpumask and free_cpumask
      functions.
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (minor additions)
      ec26b805
    • M
      cpumask: Add alloc_cpumask_var_node() · 7b4967c5
      Mike Travis 提交于
      Impact: New API
      
      This will be needed in x86 code to allocate the domain and old_domain
      cpumasks on the same node as where the containing irq_cfg struct is
      allocated.
      
      (Also fixes double-dump_stack on rare CONFIG_DEBUG_PER_CPU_MAPS case)
      Signed-off-by: NMike Travis <travis@sgi.com>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (re-impl alloc_cpumask_var)
      7b4967c5
  3. 13 12月, 2008 7 次提交
    • R
      cpumask: Use all NR_CPUS bits unless CONFIG_CPUMASK_OFFSTACK · 7be75853
      Rusty Russell 提交于
      Impact: futureproof as we convert more code to new APIs
      
      The old cpumask operators treat all NR_CPUS bits as relevent, the new
      ones use nr_cpumask_bits.  For large NR_CPUS and small nr_cpu_ids, this
      makes a difference.
      
      However, mixing the two can cause problems with undefined bits.  An
      arch which sets CONFIG_CPUMASK_OFFSTACK should have converted across
      to the new operators, so it's safe in that case.
      
      (Thanks to Stephen Rothwell for bisecting the initial unused-bits bug,
      and Mike Travis for this solution).
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Mike Travis <travis@sgi.com>
      7be75853
    • R
      cpumask: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask · f0b848ce
      Rusty Russell 提交于
      Impact: New APIs
      
      The old node_to_cpumask/node_to_pcibus returned a cpumask_t: these
      return a pointer to a struct cpumask.  Part of removing cpumasks from
      the stack.
      
      This defines them in the generic non-NUMA case.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Richard Henderson <rth@twiddle.net>
      f0b848ce
    • R
      cpumask: Add CONFIG_CPUMASK_OFFSTACK · aab46da0
      Rusty Russell 提交于
      Impact: Add config option to enable code in cpumask.h
      
      Currently it can be set if DEBUG_PER_CPU_MAPS, or set specifically by
      an arch.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      aab46da0
    • R
      cpumask: convert struct clock_event_device to cpumask pointers. · 320ab2b0
      Rusty Russell 提交于
      Impact: change calling convention of existing clock_event APIs
      
      struct clock_event_timer's cpumask field gets changed to take pointer,
      as does the ->broadcast function.
      
      Another single-patch change.  For safety, we BUG_ON() in
      clockevents_register_device() if it's not set.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      320ab2b0
    • R
      cpumask: make irq_set_affinity() take a const struct cpumask · 0de26520
      Rusty Russell 提交于
      Impact: change existing irq_chip API
      
      Not much point with gentle transition here: the struct irq_chip's
      setaffinity method signature needs to change.
      
      Fortunately, not widely used code, but hits a few architectures.
      
      Note: In irq_select_affinity() I save a temporary in by mangling
      irq_desc[irq].affinity directly.  Ingo, does this break anything?
      
      (Folded in fix from KOSAKI Motohiro)
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NMike Travis <travis@sgi.com>
      Reviewed-by: NGrant Grundler <grundler@parisc-linux.org>
      Acked-by: NIngo Molnar <mingo@redhat.com>
      Cc: ralf@linux-mips.org
      Cc: grundler@parisc-linux.org
      Cc: jeremy@xensource.com
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      0de26520
    • 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
    • R
      cpumask: centralize cpu_online_map and cpu_possible_map · 98a79d6a
      Rusty Russell 提交于
      Impact: cleanup
      
      Each SMP arch defines these themselves.  Move them to a central
      location.
      
      Twists:
      1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a
         CONFIG_INIT_ALL_POSSIBLE for this rather than break them.
      
      2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'.
         Those archs simply have phys_cpu_present_map replaced everywhere.
      
      3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky
         so I just manipulate them both in sync.
      
      4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map'
         declarations.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: NGrant Grundler <grundler@parisc-linux.org>
      Tested-by: NTony Luck <tony.luck@intel.com>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Mike Travis <travis@sgi.com>
      Cc: ink@jurassic.park.msu.ru
      Cc: rmk@arm.linux.org.uk
      Cc: starvik@axis.com
      Cc: tony.luck@intel.com
      Cc: takata@linux-m32r.org
      Cc: ralf@linux-mips.org
      Cc: grundler@parisc-linux.org
      Cc: paulus@samba.org
      Cc: schwidefsky@de.ibm.com
      Cc: lethal@linux-sh.org
      Cc: wli@holomorphy.com
      Cc: davem@davemloft.net
      Cc: jdike@addtoit.com
      Cc: mingo@redhat.com
      98a79d6a
  4. 11 12月, 2008 22 次提交