1. 19 Mar, 2009 2 commits
    • Stephen Rothwell's avatar
      numa, cpumask: move numa_node_id default implementation to topology.h, fix · 17ad6ea6
      Stephen Rothwell authored
      Impact: build fix for powerpc and sparc
      
      Today's linux-next build (powerpc allyesconfig) failed like this:
      
      > In file included from include/linux/mmzone.h:776,
      >                  from include/linux/gfp.h:5,
      >                  from include/linux/kmod.h:23,
      >                  from include/linux/module.h:14,
      >                  from init/version.c:11:
      > arch/powerpc/include/asm/mmzone.h:32: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'numa_cpumask_lookup_table'
      
      Caused by commit 082edb7b ("numa,
      cpumask: move numa_node_id default implementation to topology.h") from
      the cpus4096 tree which removed the include of linux/topology.h from
      linux/mmzone.h.
      
      Same for sparc64 defconfig.
      Signed-off-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Acked-b: Rusty Russell <rusty@rustcorp.com.au>
      Cc: ppc-dev <linuxppc-dev@ozlabs.org>
      LKML-Reference: <20090319220322.3baa4613.sfr@canb.auug.org.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      17ad6ea6
    • Rusty Russell's avatar
      cpumask: remove cpumask allocation from idle_balance · df7c8e84
      Rusty Russell authored
      Impact: fix circular locking
      
      Steven reports a circular locking from alloc_cpumask_var doing
      a wakeup. We get rid of this using the tried-and-true technique
      of using a per-cpu cpumask_var_t rather than doing an alloc
      every time.
      
      Simpler and more robust than a rare, implicit allocation within
      an atomic codepath.
      Reported-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      LKML-Reference: <alpine.DEB.2.00.0903181729360.31583@gandalf.stny.rr.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      df7c8e84
  2. 18 Mar, 2009 5 commits
    • Rusty Russell's avatar
      x86: cpumask: x86 mmio-mod.c use cpumask_var_t for downed_cpus · c38da569
      Rusty Russell authored
      Impact: cleanup, reduce memory usage for CONFIG_CPUMASK_OFFSTACK=y
      
      Part of the "getting rid of obsolete cpumask_t" patch:
      
       1) Use cpumask_var_t: this is a pointer if CONFIG_CPUMASK_OFFSTACK=y
       2) Call alloc_cpumask_var() on first entry into enter_uniprocessor()
       3) Use modern cpumask_* functions.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Pekka Paalanen <pq@iki.fi>
      LKML-Reference: <200903111633.55952.rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      c38da569
    • Rusty Russell's avatar
      x86: cpumask: update 32-bit APM not to mug current->cpus_allowed · 89bd55d1
      Rusty Russell authored
      Impact: cleanup, avoid cpumask games
      
      The APM code wants to run on CPU 0: we create an "on_cpu0" wrapper
      which uses work_on_cpu() if we're not already on cpu 0.
      
      This introduces a new failure mode: -ENOMEM, so we add an explicit
      err arg and handle Linux-style errnos in apm_err().
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      LKML-Reference: <200903111631.29787.rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      89bd55d1
    • Ingo Molnar's avatar
      x86: microcode: cleanup · 4bae1967
      Ingo Molnar authored
      Impact: cleanup
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com>
      Cc: Peter Oruba <peter.oruba@amd.com>
      LKML-Reference: <200903111632.37279.rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      4bae1967
    • Rusty Russell's avatar
      x86: cpumask: use work_on_cpu in arch/x86/kernel/microcode_core.c · af5c820a
      Rusty Russell authored
      Impact: don't play with current's cpumask
      
      Straightforward indirection through work_on_cpu().  One change is
      that the error code from microcode_update_cpu() is now actually
      plumbed back to microcode_init_cpu(), so now we printk if it fails
      on cpu hotplug.
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com>
      Cc: Peter Oruba <peter.oruba@amd.com>
      LKML-Reference: <200903111632.37279.rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      af5c820a
    • Rusty Russell's avatar
      cpumask: fix CONFIG_CPUMASK_OFFSTACK=y cpu hotunplug crash · 30e1e6d1
      Rusty Russell authored
      Impact: Fix cpu offline when CONFIG_MAXSMP=y
      
      Changeset bc9b83dd "cpumask: convert
      c1e_mask in arch/x86/kernel/process.c to cpumask_var_t" contained a
      bug: c1e_mask is manipulated even if C1E isn't detected (and hence
      not allocated).
      
      This is simply fixed by checking for NULL (which gcc optimizes out
      anyway of CONFIG_CPUMASK_OFFSTACK=n, since it knows ce1_mask can never
      be NULL).
      
      In addition, fix a leak where select_idle_routine re-allocates
      (and re-clears) c1e_mask on every cpu init.
      Reported-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Cc: Mike Travis <travis@sgi.com>
      LKML-Reference: <200903171450.34549.rusty@rustcorp.com.au>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      30e1e6d1
  3. 13 Mar, 2009 28 commits
  4. 12 Mar, 2009 5 commits