1. 22 8月, 2008 1 次提交
    • M
      x86: fix section mismatch warning - uv_cpu_init · c4bd1fda
      Marcin Slusarz 提交于
      WARNING: vmlinux.o(.cpuinit.text+0x3cc4): Section mismatch in reference from the function uv_cpu_init() to the function .init.text:uv_system_init()
      The function __cpuinit uv_cpu_init() references
      a function __init uv_system_init().
      If uv_system_init is only used by uv_cpu_init then
      annotate uv_system_init with a matching annotation.
      
      uv_system_init was ment to be called only once, so do it from codepath
      (native_smp_prepare_cpus) which is called once, right before activation
      of other cpus (smp_init).
      
      Note: old code relied on uv_node_to_blade being initialized to 0,
      but it'a not initialized from anywhere.
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Acked-by: NJack Steiner <steiner@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c4bd1fda
  2. 18 8月, 2008 1 次提交
    • M
      x86: silence section mismatch warning - get_local_pda · d19fbfdf
      Marcin Slusarz 提交于
      Take out part of get_local_pda referencing __init function (free_bootmem)
      to new (static) function marked as __ref. It's safe to do because free_bootmem
      is called before __init sections are dropped.
      
      WARNING: vmlinux.o(.cpuinit.text+0x3cd7): Section mismatch in reference from the function get_local_pda() to the function .init.text:free_bootmem()
      The function __cpuinit get_local_pda() references
      a function __init free_bootmem().
      If free_bootmem is only used by get_local_pda then
      annotate free_bootmem with a matching annotation.
      Signed-off-by: NMarcin Slusarz <marcin.slusarz@gmail.com>
      Cc: Mike Travis <travis@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d19fbfdf
  3. 14 8月, 2008 2 次提交
    • Y
      x86: check bigsmp in smp_sanity_check instead of cpu_up · a58f03b0
      Yinghai Lu 提交于
      clear bits for cpu nr > 8.
      
      This allows us to boot the full range of possible CPUs that the
      supported APIC model will allow. Previously we'd hang or boot up
      with less than 8 CPUs.
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Tested-by: NJeff Chua <jeff.chua.linux@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a58f03b0
    • M
      x86: resurrect proper handling of maxcpus= kernel option (v2) · 23b49c19
      Max Krasnyansky 提交于
      For some reason we had two parsers registered for maxcpus=. One in init/main.c
      and another in arch/x86/smpboot.c. So I nuked the one in arch/x86.
      
      Also 64-bit kernels used to handle maxcpus= as documented in
      Documentation/cpu-hotplug.txt. CPUs with 'id > maxcpus' are initialized
      but not booted. 32-bit version for some reason ignored them even though
      all the infrastructure for booting them later is there.
      
      In the current mainline both 64 and 32 bit versions are broken.
      This patch restores the correct behaviour. I've tested x86_64 version on
      4- and 8- way Core2 and 2-way Opteron based machines. Various config
      combinations SMP, !SMP, CPU_HOTPLUG, !CPU_HOTPLUG.
      Booted with maxcpus=1 and maxcpus=4, etc. Everything is working as expected.
      
      So far we've received two reports from different people confirming that 32-bit
      version also works fine, both on dual core laptops and 16way server machines.
      
      [v2: This version fixes visws breakage pointed out by Ingo.]
      Signed-off-by: NMax Krasnyansky <maxk@qualcomm.com>
      Cc: lizf@cn.fujitsu.com
      Cc: jeff.chua.linux@gmail.com
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      23b49c19
  4. 12 8月, 2008 1 次提交
  5. 11 8月, 2008 1 次提交
  6. 22 7月, 2008 1 次提交
  7. 18 7月, 2008 2 次提交
    • M
      x86: APIC: remove apic_write_around(); use alternatives · 593f4a78
      Maciej W. Rozycki 提交于
      Use alternatives to select the workaround for the 11AP Pentium erratum
      for the affected steppings on the fly rather than build time.  Remove the
      X86_GOOD_APIC configuration option and replace all the calls to
      apic_write_around() with plain apic_write(), protecting accesses to the
      ESR as appropriate due to the 3AP Pentium erratum.  Remove
      apic_read_around() and all its invocations altogether as not needed.
      Remove apic_write_atomic() and all its implementing backends.  The use of
      ASM_OUTPUT2() is not strictly needed for input constraints, but I have
      used it for readability's sake.
      
      I had the feeling no one else was brave enough to do it, so I went ahead
      and here it is.  Verified by checking the generated assembly and tested
      with both a 32-bit and a 64-bit configuration, also with the 11AP
      "feature" forced on and verified with gdb on /proc/kcore to work as
      expected (as an 11AP machines are quite hard to get hands on these days).
      Some script complained about the use of "volatile", but apic_write() needs
      it for the same reason and is effectively a replacement for writel(), so I
      have disregarded it.
      
      I am not sure what the policy wrt defconfig files is, they are generated
      and there is risk of a conflict resulting from an unrelated change, so I
      have left changes to them out.  The option will get removed from them at
      the next run.
      
      Some testing with machines other than mine will be needed to avoid some
      stupid mistake, but despite its volume, the change is not really that
      intrusive, so I am fairly confident that because it works for me, it will
      everywhere.
      Signed-off-by: NMaciej W. Rozycki <macro@linux-mips.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      593f4a78
    • Y
      x86: use cpu_clear in remove_cpu_from_maps · 29cbeb0e
      Yinghai Lu 提交于
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      29cbeb0e
  8. 16 7月, 2008 1 次提交
  9. 09 7月, 2008 2 次提交
  10. 08 7月, 2008 21 次提交
  11. 30 6月, 2008 1 次提交
    • Z
      x86: fix cpu hotplug crash · fcb43042
      Zhang, Yanmin 提交于
      Vegard Nossum reported crashes during cpu hotplug tests:
      
        http://marc.info/?l=linux-kernel&m=121413950227884&w=4
      
      In function _cpu_up, the panic happens when calling
      __raw_notifier_call_chain at the second time. Kernel doesn't panic when
      calling it at the first time. If just say because of nr_cpu_ids, that's
      not right.
      
      By checking the source code, I found that function do_boot_cpu is the culprit.
      Consider below call chain:
       _cpu_up=>__cpu_up=>smp_ops.cpu_up=>native_cpu_up=>do_boot_cpu.
      
      So do_boot_cpu is called in the end. In do_boot_cpu, if
      boot_error==true, cpu_clear(cpu, cpu_possible_map) is executed. So later
      on, when _cpu_up calls __raw_notifier_call_chain at the second time to
      report CPU_UP_CANCELED, because this cpu is already cleared from
      cpu_possible_map, get_cpu_sysdev returns NULL.
      
      Many resources are related to cpu_possible_map, so it's better not to
      change it.
      
      Below patch against 2.6.26-rc7 fixes it by removing the bit clearing in
      cpu_possible_map.
      Signed-off-by: NZhang Yanmin <yanmin_zhang@linux.intel.com>
      Tested-by: NVegard Nossum <vegard.nossum@gmail.com>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fcb43042
  12. 26 6月, 2008 1 次提交
  13. 04 6月, 2008 1 次提交
    • I
      x86: disable preemption in native_smp_prepare_cpus · deef3250
      Ingo Molnar 提交于
      Priit Laes reported the following warning:
      
      Call Trace:
       [<ffffffff8022f1e1>] warn_on_slowpath+0x51/0x63
       [<ffffffff80282e48>] sys_ioctl+0x2d/0x5d
       [<ffffffff805185ff>] _spin_lock+0xe/0x24
       [<ffffffff80227459>] task_rq_lock+0x3d/0x73
       [<ffffffff805133c3>] set_cpu_sibling_map+0x336/0x350
       [<ffffffff8021c1b8>] read_apic_id+0x30/0x62
       [<ffffffff806d921d>] verify_local_APIC+0x90/0x138
       [<ffffffff806d84b5>] native_smp_prepare_cpus+0x1f9/0x305
       [<ffffffff806ce7b1>] kernel_init+0x59/0x2d9
       [<ffffffff80518a26>] _spin_unlock_irq+0x11/0x2b
       [<ffffffff8020bf48>] child_rip+0xa/0x12
       [<ffffffff806ce758>] kernel_init+0x0/0x2d9
       [<ffffffff8020bf3e>] child_rip+0x0/0x12
      
      fix this by generally disabling preemption in native_smp_prepare_cpus().
      Reported-and-bisected-by: NPriit Laes <plaes@plaes.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      deef3250
  14. 25 5月, 2008 2 次提交
    • Y
      x86: extend e820 ealy_res support 32bit · a4c81cf6
      Yinghai Lu 提交于
      move early_res related from e820_64.c to e820.c
      make edba detection to be done in head32.c
      remove smp_alloc_memory, because we have fixed trampoline address now.
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      
       arch/x86/kernel/e820.c              |  214 ++++++++++++++++++++++++++++++++++++
       arch/x86/kernel/e820_64.c           |  196 --------------------------------
       arch/x86/kernel/head32.c            |   76 ++++++++++++
       arch/x86/kernel/setup_32.c          |  109 +++---------------
       arch/x86/kernel/smpboot.c           |   17 --
       arch/x86/kernel/trampoline.c        |    2
       arch/x86/mach-voyager/voyager_smp.c |    9 -
       include/asm-x86/e820.h              |    6 +
       include/asm-x86/e820_64.h           |    9 -
       include/asm-x86/smp.h               |    1
       arch/x86/kernel/e820.c              |  214 ++++++++++++++++++++++++++++++++++++
       arch/x86/kernel/e820_64.c           |  196 --------------------------------
       arch/x86/kernel/head32.c            |   76 ++++++++++++
       arch/x86/kernel/setup_32.c          |  109 +++---------------
       arch/x86/kernel/smpboot.c           |   17 --
       arch/x86/kernel/trampoline.c        |    2
       arch/x86/mach-voyager/voyager_smp.c |    9 -
       include/asm-x86/e820.h              |    6 +
       include/asm-x86/e820_64.h           |    9 -
       include/asm-x86/smp.h               |    1
       arch/x86/kernel/e820.c              |  214 ++++++++++++++++++++++++++++++++++++
       arch/x86/kernel/e820_64.c           |  196 --------------------------------
       arch/x86/kernel/head32.c            |   76 ++++++++++++
       arch/x86/kernel/setup_32.c          |  109 +++---------------
       arch/x86/kernel/smpboot.c           |   17 --
       arch/x86/kernel/trampoline.c        |    2
       arch/x86/mach-voyager/voyager_smp.c |    9 -
       include/asm-x86/e820.h              |    6 +
       include/asm-x86/e820_64.h           |    9 -
       include/asm-x86/smp.h               |    1
       10 files changed, 320 insertions(+), 319 deletions(-)
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a4c81cf6
    • H
      x86: smpboot.c: removed duplicated include · 883b7af9
      Huang Weiyi 提交于
      Removed duplicated include <asm/nmi.h> in
      arch/x86/kernel/smpboot.c.
      Signed-off-by: NHuang Weiyi <weiyi.huang@gmail.com>
      Cc: mingo@redhat.com
      Cc: hpa@zytor.com
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      883b7af9
  15. 24 5月, 2008 1 次提交
  16. 14 5月, 2008 1 次提交
    • H
      x86: fix app crashes after SMP resume · 61165d7a
      Hugh Dickins 提交于
      After resume on a 2cpu laptop, kernel builds collapse with a sed hang,
      sh or make segfault (often on 20295564), real-time signal to cc1 etc.
      
      Several hurdles to jump, but a manually-assisted bisect led to -rc1's
      d2bcbad5 x86: do not zap_low_mappings
      in __smp_prepare_cpus.  Though the low mappings were removed at bootup,
      they were left behind (with Global flags helping to keep them in TLB)
      after resume or cpu online, causing the crashes seen.
      
      Reinstate zap_low_mappings (with local __flush_tlb_all) for each cpu_up
      on x86_32.  This used to be serialized by smp_commenced_mask: that's now
      gone, but a low_mappings flag will do.  No need for native_smp_cpus_done
      to repeat the zap: let mem_init zap BSP's low mappings just like on UP.
      
      (In passing, fix error code from native_cpu_up: do_boot_cpu returns a
      variety of diagnostic values, Dprintk what it says but convert to -EIO.
      And save_pg_dir separately before zap_low_mappings: doesn't matter now,
      but zapping twice in succession wiped out resume's swsusp_pg_dir.)
      
      That worked well on the duo and one quad, but wouldn't boot 3rd or 4th
      cpu on P4 Xeon, oopsing just after unlock_ipi_call_lock.  The TLB flush
      IPI now being sent reveals a long-standing bug: the booting cpu has its
      APIC readied in smp_callin at the top of start_secondary, but isn't put
      into the cpu_online_map until just before that unlock_ipi_call_lock.
      
      So native_smp_call_function_mask to online cpus would send_IPI_allbutself,
      including the cpu just coming up, though it has been excluded from the
      count to wait for: by the time it handles the IPI, the call data on
      native_smp_call_function_mask's stack may well have been overwritten.
      
      So fall back to send_IPI_mask while cpu_online_map does not match
      cpu_callout_map: perhaps there's a better APICological fix to be
      made at the start_secondary end, but I wouldn't know that.
      Signed-off-by: NHugh Dickins <hugh@veritas.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      61165d7a