08 Jan, 2012

1 commit

  • SGI UV systems print a message during boot:

    UV: Found blades

    Due to packaging changes, the blade count is not accurate for
    on the next generation of the platform. This patch corrects the
    count.

    Signed-off-by: Jack Steiner
    Cc:
    Link: http://lkml.kernel.org/r/20120106191900.GA19772@sgi.com
    Signed-off-by: Ingo Molnar

    Jack Steiner
     

05 Dec, 2011

1 commit

  • There was a mixup when the SGI UV2 hub chip was sent to be
    fabricated, and it ended up with the wrong part number in the
    HRP_NODE_ID mmr. Future versions of the chip will (may) have the
    correct part number. Change the UV infrastructure to recognize
    both part numbers as valid IDs of a UV2 hub chip.

    Signed-off-by: Jack Steiner
    Link: http://lkml.kernel.org/r/20111129210058.GA20452@sgi.com
    Signed-off-by: Ingo Molnar

    Jack Steiner
     

28 Oct, 2011

1 commit


10 Oct, 2011

1 commit

  • Just convert all the files that have an nmi handler to the new routines.
    Most of it is straight forward conversion. A couple of places needed some
    tweaking like kgdb which separates the debug notifier from the nmi handler
    and mce removes a call to notify_die.

    [Thanks to Ying for finding out the history behind that mce call

    https://lkml.org/lkml/2010/5/27/114

    And Boris responding that he would like to remove that call because of it

    https://lkml.org/lkml/2011/9/21/163]

    The things that get converted are the registeration/unregistration routines
    and the nmi handler itself has its args changed along with code removal
    to check which list it is on (most are on one NMI list except for kgdb
    which has both an NMI routine and an NMI Unknown routine).

    Signed-off-by: Don Zickus
    Signed-off-by: Peter Zijlstra
    Acked-by: Corey Minyard
    Cc: Jason Wessel
    Cc: Andi Kleen
    Cc: Robert Richter
    Cc: Huang Ying
    Cc: Corey Minyard
    Cc: Jack Steiner
    Link: http://lkml.kernel.org/r/1317409584-23662-4-git-send-email-dzickus@redhat.com
    Signed-off-by: Ingo Molnar

    Don Zickus
     

21 Sep, 2011

1 commit

  • This is a workaround for a UV2 hub bug that affects the format of system
    global addresses.

    The GRU API for UV2 was inadvertently broken by a hardware change. The
    format of the physical address used for TLB dropins and for addresses used
    with instructions running in unmapped mode has changed. This change was
    not documented and became apparent only when diags failed running on
    system simulators.

    For UV1, TLB and GRU instruction physical addresses are identical to
    socket physical addresses (although high NASID bits must be OR'ed into the
    address).

    For UV2, socket physical addresses need to be converted. The NODE portion
    of the physical address needs to be shifted so that the low bit is in bit
    39 or bit 40, depending on an MMR value.

    It is not yet clear if this bug will be fixed in a silicon respin. If it
    is fixed, the hub revision will be incremented & the workaround disabled.

    Signed-off-by: Jack Steiner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Thomas Gleixner

    Jack Steiner
     

06 Aug, 2011

1 commit

  • Delete the 10 msec delay between the INIT and SIPI when starting
    slave cpus. I can find no requirement for this delay. BIOS also
    has similar code sequences without the delay.

    Removing the delay reduces boot time by 40 sec. Every bit helps.

    Signed-off-by: Jack Steiner
    Cc:
    Link: http://lkml.kernel.org/r/20110805140900.GA6774@sgi.com
    Signed-off-by: Ingo Molnar

    Jack Steiner
     

14 Jun, 2011

1 commit


25 May, 2011

1 commit

  • This patch adds support for a new version of the SGI UV hub
    chip. The hub chip is the node controller that connects multiple
    blades into a larger coherent SSI.

    For the most part, UV2 is compatible with UV1. The majority of
    the changes are in the addresses of MMRs and in a few cases, the
    contents of MMRs. These changes are the result in changes in the
    system topology such as node configuration, processor types,
    maximum nodes, physical address sizes, etc.

    Signed-off-by: Jack Steiner
    Link: http://lkml.kernel.org/r/20110511175028.GA18006@sgi.com
    Signed-off-by: Ingo Molnar

    Jack Steiner
     

22 May, 2011

2 commits

  • Apic probe now looks at the apic drivers listed in the
    .apicdrivers section. Remove apic_probe[] and make each apic
    driver static.

    Signed-off-by: Suresh Siddha
    Tested-by: Cyrill Gorcunov
    Cc: steiner@sgi.com
    Cc: gorcunov@openvz.org
    Cc: yinghai@kernel.org
    Link: http://lkml.kernel.org/r/20110521005526.341718626@sbsiddha-MOBL3.sc.intel.com
    Signed-off-by: Ingo Molnar

    Suresh Siddha
     
  • This will pave the way for each apic driver to be self-contained
    and eliminate the need for apic_probe[].

    Order in which apic drivers are listed in the .apicdrivers
    section is important, as this determines the apic probe order.
    And this is enforced by the ordering of apic driver files in the
    Makefile and the macros apic_driver()/apic_drivers().

    Signed-off-by: Suresh Siddha
    Tested-by: Cyrill Gorcunov
    Cc: steiner@sgi.com
    Cc: gorcunov@openvz.org
    Cc: yinghai@kernel.org
    Link: http://lkml.kernel.org/r/20110521005526.068775085@sbsiddha-MOBL3.sc.intel.com
    Signed-off-by: Ingo Molnar

    Suresh Siddha
     

20 May, 2011

1 commit

  • Use the unused probe routine in the apic driver to finalize the
    apic model selection. This cleans up the
    default_setup_apic_routing() and this probe routine in future
    can also be used for doing any apic model specific
    initialisation.

    Signed-off-by: Suresh Siddha
    Acked-by: Cyrill Gorcunov
    Cc: steiner@sgi.com
    Cc: yinghai@kernel.org
    Link: http://lkml.kernel.org/r/20110519234637.247458931@sbsiddha-MOBL3.sc.intel.com
    Signed-off-by: Ingo Molnar

    Suresh Siddha
     

10 May, 2011

1 commit

  • This fixes problems seen on UV systems handling NMIs from the
    node controller.

    I isolated the "dazed..." messages that I saw earlier to a bug in
    the BMC on our platform. It was sending NMIs w/o properly setting
    a register that indicated the source of NMI.

    So rather than _assuming_ any unhandled NMI came from the UV system
    maintenance console (SMC), add a check to verify that the SMC actually
    sent the NMI.

    Signed-off-by: Jack Steiner
    Cc: gorcunov@gmail.com
    Cc: dzickus@redhat.com
    Signed-off-by: Ingo Molnar

    Jack Steiner
     

01 Apr, 2011

1 commit

  • After a crash dump on an SGI Altix UV system the crash kernel
    fails to cause a reboot. EFI mode is disabled in the kdump
    kernel, so only the reboot_type of BOOT_ACPI works.

    Signed-off-by: Cliff Wickman
    Cc: rja@sgi.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Cliff Wickman
     

29 Mar, 2011

1 commit

  • Stop including in x86 header files which don't
    need it. This will let the compiler complain when this header is
    not included by source files when it should, so that
    contributors can fix the problem before building on other
    architectures starts to fail.

    Credits go to Geert for the idea.

    Signed-off-by: Jean Delvare
    Cc: James E.J. Bottomley
    Cc: Geert Uytterhoeven
    Cc: Stephen Rothwell
    LKML-Reference:
    [ this also fixes an upstream build bug in drivers/media/rc/ite-cir.c ]
    Signed-off-by: Ingo Molnar

    Jean Delvare
     

28 Jan, 2011

2 commits

  • apic->apicid_to_node() is 32bit specific apic operation which
    determines NUMA node for a CPU. Depending on the APIC
    implementation, it can be easier to determine NUMA node from
    either physical or logical apicid. Currently,
    ->apicid_to_node() takes @logical_apicid and calls
    hard_smp_processor_id() if the physical apicid is needed.

    This prevents NUMA mapping from being queried from a different
    CPU, which in turn makes it impossible to initialize NUMA
    mapping before SMP bringup.

    This patch replaces apic->apicid_to_node() with
    ->x86_32_numa_cpu_node() which takes @cpu, from which both
    logical and physical apicids can easily be determined. While at
    it, drop duplicate implementations from bigsmp_32 and summit_32,
    and use the default one.

    Signed-off-by: Tejun Heo
    Reviewed-by: Pekka Enberg
    Cc: eric.dumazet@gmail.com
    Cc: yinghai@kernel.org
    Cc: brgerst@gmail.com
    Cc: gorcunov@gmail.com
    Cc: shaohui.zheng@intel.com
    Cc: rientjes@google.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tejun Heo
     
  • After the previous patch, apic->cpu_to_logical_apicid() is no
    longer used. Kill it.

    For apic types with custom cpu_to_logical_apicid() which is also
    used for other purposes, remove the function and modify its
    users to do the mapping directly.

    #ifdef's on CONFIG_SMP in es7000_32 and summit_32 are ignored
    during conversion as they are not used for UP kernels.

    Signed-off-by: Tejun Heo
    Cc: eric.dumazet@gmail.com
    Cc: yinghai@kernel.org
    Cc: brgerst@gmail.com
    Cc: gorcunov@gmail.com
    Cc: penberg@kernel.org
    Cc: shaohui.zheng@intel.com
    Cc: rientjes@google.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Tejun Heo
     

12 Jan, 2011

2 commits

  • …/git/tip/linux-2.6-tip

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Fix Moorestown VRTC fixmap placement
    x86/gpio: Implement x86 gpio_to_irq convert function
    x86, UV: Fix APICID shift for Westmere processors
    x86: Use PCI method for enabling AMD extended config space before MSR method
    x86: tsc: Prevent delayed init if initial tsc calibration failed
    x86, lapic-timer: Increase the max_delta to 31 bits
    x86: Fix sparse non-ANSI function warnings in smpboot.c
    x86, numa: Fix CONFIG_DEBUG_PER_CPU_MAPS without NUMA emulation
    x86, AMD, PCI: Add AMD northbridge PCI device id for CPU families 12h and 14h
    x86, numa: Fix cpu to node mapping for sparse node ids
    x86, numa: Fake node-to-cpumask for NUMA emulation
    x86, numa: Fake apicid and pxm mappings for NUMA emulation
    x86, numa: Avoid compiling NUMA emulation functions without CONFIG_NUMA_EMU
    x86, numa: Reduce minimum fake node size to 32M

    Fix up trivial conflict in arch/x86/kernel/apic/x2apic_uv_x.c

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (28 commits)
    perf session: Fix infinite loop in __perf_session__process_events
    perf evsel: Support perf_evsel__open(cpus > 1 && threads > 1)
    perf sched: Use PTHREAD_STACK_MIN to avoid pthread_attr_setstacksize() fail
    perf tools: Emit clearer message for sys_perf_event_open ENOENT return
    perf stat: better error message for unsupported events
    perf sched: Fix allocation result check
    perf, x86: P4 PMU - Fix unflagged overflows handling
    dynamic debug: Fix build issue with older gcc
    tracing: Fix TRACE_EVENT power tracepoint creation
    tracing: Fix preempt count leak
    tracepoint: Add __rcu annotation
    tracing: remove duplicate null-pointer check in skb tracepoint
    tracing/trivial: Add missing comma in TRACE_EVENT comment
    tracing: Include module.h in define_trace.h
    x86: Save rbp in pt_regs on irq entry
    x86, dumpstack: Fix unused variable warning
    x86, NMI: Clean-up default_do_nmi()
    x86, NMI: Allow NMI reason io port (0x61) to be processed on any CPU
    x86, NMI: Remove DIE_NMI_IPI
    x86, NMI: Add priorities to handlers
    ...

    Linus Torvalds
     

11 Jan, 2011

1 commit


09 Jan, 2011

1 commit


08 Jan, 2011

1 commit

  • * 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (30 commits)
    gameport: use this_cpu_read instead of lookup
    x86: udelay: Use this_cpu_read to avoid address calculation
    x86: Use this_cpu_inc_return for nmi counter
    x86: Replace uses of current_cpu_data with this_cpu ops
    x86: Use this_cpu_ops to optimize code
    vmstat: User per cpu atomics to avoid interrupt disable / enable
    irq_work: Use per cpu atomics instead of regular atomics
    cpuops: Use cmpxchg for xchg to avoid lock semantics
    x86: this_cpu_cmpxchg and this_cpu_xchg operations
    percpu: Generic this_cpu_cmpxchg() and this_cpu_xchg support
    percpu,x86: relocate this_cpu_add_return() and friends
    connector: Use this_cpu operations
    xen: Use this_cpu_inc_return
    taskstats: Use this_cpu_ops
    random: Use this_cpu_inc_return
    fs: Use this_cpu_inc_return in buffer.c
    highmem: Use this_cpu_xx_return() operations
    vmstat: Use this_cpu_inc_return for vm statistics
    x86: Support for this_cpu_add, sub, dec, inc_return
    percpu: Generic support for this_cpu_add, sub, dec, inc_return
    ...

    Fixed up conflicts: in arch/x86/kernel/{apic/nmi.c, apic/x2apic_uv_x.c, process.c}
    as per Tejun.

    Linus Torvalds
     

07 Jan, 2011

1 commit

  • They are a handful of places in the code that register a die_notifier
    as a catch all in case no claims the NMI. Unfortunately, they trigger
    on events like DIE_NMI and DIE_NMI_IPI, which depending on when they
    registered may collide with other handlers that have the ability to
    determine if the NMI is theirs or not.

    The function unknown_nmi_error() makes one last effort to walk the
    die_chain when no one else has claimed the NMI before spitting out
    messages that the NMI is unknown.

    This is a better spot for these devices to execute any code without
    colliding with the other handlers.

    The two drivers modified are only compiled on x86 arches I believe, so
    they shouldn't be affected by other arches that may not have
    DIE_NMIUNKNOWN defined.

    Signed-off-by: Don Zickus
    Cc: Russ Anderson
    Cc: Corey Minyard
    Cc: openipmi-developer@lists.sourceforge.net
    Cc: dann frazier
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Don Zickus
     

30 Dec, 2010

1 commit

  • Go through x86 code and replace __get_cpu_var and get_cpu_var
    instances that refer to a scalar and are not used for address
    determinations.

    Cc: Yinghai Lu
    Cc: Ingo Molnar
    Acked-by: Tejun Heo
    Acked-by: "H. Peter Anvin"
    Signed-off-by: Christoph Lameter
    Signed-off-by: Tejun Heo

    Tejun Heo
     

22 Dec, 2010

2 commits


18 Nov, 2010

1 commit

  • This patch for SGI UV systems addresses a problem whereby
    interrupt transactions being looped back from a local IOH,
    through the hub to a local CPU can (erroneously) conflict with
    IO port operations and other transactions.

    To workaound this we set a high bit in the APIC IDs used for
    interrupts. This bit appears to be ignored by the sockets, but
    it avoids the conflict in the hub.

    Signed-off-by: Dimitri Sivanich
    LKML-Reference:
    Signed-off-by: Ingo Molnar
    ___

    arch/x86/include/asm/uv/uv_hub.h | 4 ++++
    arch/x86/include/asm/uv/uv_mmrs.h | 19 ++++++++++++++++++-
    arch/x86/kernel/apic/x2apic_uv_x.c | 25 +++++++++++++++++++++++--
    arch/x86/platform/uv/tlb_uv.c | 2 +-
    arch/x86/platform/uv/uv_time.c | 4 +++-
    5 files changed, 49 insertions(+), 5 deletions(-)

    Dimitri Sivanich
     

10 Nov, 2010

1 commit

  • A new version of the SGI UV hub node controller is being
    developed. A few of the MMRs (control registers) that exist on
    the current hub no longer exist on the new hub. Fortunately,
    there are alternate MMRs that are are functionally equivalent
    and that exist on both hubs.

    This patch changes the UV code to use MMRs that exist in BOTH
    versions of the hub node controller.

    Signed-off-by: Jack Steiner
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Jack Steiner
     

29 Oct, 2010

1 commit


27 Oct, 2010

1 commit

  • Enable Westmere support on SGI UV. The UV initialization code is dependent on
    the APICID bits. Westmere-EX uses different APIC bit mapping than Nehalem-EX.
    This code reads the apic shift value from a UV MMR to do the proper bit
    decoding to determint the pnode.

    Signed-off-by: Russ Anderson
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Russ Anderson
     

10 Sep, 2010

1 commit


22 Jul, 2010

1 commit

  • UV NMI callback's should not write stack dumps when a kdump is to be written.

    When invoking the crash kernel to write a dump, kdump_nmi_shootdown_cpus()
    uses NMI's to get all the cpu's to save their register context and halt.

    But the NMI interrupt handler runs a callback list. This patch sets a flag
    to prevent any of those callbacks from interfering with the halt of the cpu.

    For UV, which currently has the only callback to which this is relevant, the
    uv_handle_nmi() callback should not do dumping of stacks.

    The 'in_crash_kexec' flag is defined as an extern in kdebug.h firstly
    because x2apic_uv_x.c includes it. Secondly because some future callback
    might need the flag to know that it should not enter the debugger.
    (Such a scenario was in fact present in the 2.6.32 kernel, SuSE distribution,
    where a call to kdb needed to be avoided.)

    Signed-off-by: Cliff Wickman
    LKML-Reference:
    Signed-off-by: H. Peter Anvin

    Cliff Wickman
     

19 May, 2010

1 commit


30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

18 Mar, 2010

1 commit


14 Mar, 2010

1 commit


12 Mar, 2010

1 commit

  • target_cpu() should initially target all cpus, not just cpu 0.
    Otherwise systems with lots of disks can exhaust the interrupt
    vectors on cpu 0 if a large number of disks are discovered
    before the irq balancer is running.

    Note: UV code only...

    Signed-off-by: Jack Steiner
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Jack Steiner
     

01 Mar, 2010

1 commit


27 Feb, 2010

1 commit

  • Enable NMI on all cpus in UV system and add an NMI handler
    to dump_stack on each cpu.

    By default on x86 all the cpus except the boot cpu have NMI
    masked off. This patch enables NMI on all cpus in UV system
    and adds an NMI handler to dump_stack on each cpu. This
    way if a system hangs we can NMI the machine and get a
    backtrace from all the cpus.

    Version 2: Use x86_platform driver mechanism for nmi init, per
    Ingo's suggestion.

    Version 3: Clean up Ingo's nits.

    Signed-off-by: Russ Anderson
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Russ Anderson
     

06 Feb, 2010

1 commit


16 Jan, 2010

1 commit