1. 13 Dec, 2008 7 commits
    • Rusty Russell's avatar
      cpumask: Use all NR_CPUS bits unless CONFIG_CPUMASK_OFFSTACK · 7be75853
      Rusty Russell authored
      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: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Mike Travis <travis@sgi.com>
      7be75853
    • Rusty Russell's avatar
      cpumask: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask · f0b848ce
      Rusty Russell authored
      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: default avatarRusty 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
    • Rusty Russell's avatar
      cpumask: Add CONFIG_CPUMASK_OFFSTACK · aab46da0
      Rusty Russell authored
      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: default avatarRusty Russell <rusty@rustcorp.com.au>
      aab46da0
    • Rusty Russell's avatar
      cpumask: convert struct clock_event_device to cpumask pointers. · 320ab2b0
      Rusty Russell authored
      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: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Ingo Molnar <mingo@elte.hu>
      320ab2b0
    • Rusty Russell's avatar
      cpumask: make irq_set_affinity() take a const struct cpumask · 0de26520
      Rusty Russell authored
      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: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Reviewed-by: default avatarGrant Grundler <grundler@parisc-linux.org>
      Acked-by: default avatarIngo 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
    • Rusty Russell's avatar
      cpumask: change cpumask_scnprintf, cpumask_parse_user, cpulist_parse, and... · 29c0177e
      Rusty Russell authored
      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: default avatarRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: default avatarMike Travis <travis@sgi.com>
      Acked-by: default avatarIngo 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
    • Rusty Russell's avatar
      cpumask: centralize cpu_online_map and cpu_possible_map · 98a79d6a
      Rusty Russell authored
      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: default avatarRusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: default avatarGrant Grundler <grundler@parisc-linux.org>
      Tested-by: default avatarTony Luck <tony.luck@intel.com>
      Acked-by: default avatarIngo 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
  2. 11 Dec, 2008 1 commit
  3. 10 Dec, 2008 32 commits