13 Jun, 2012

1 commit

  • Pull omapdss build problem fix from Tomi Valkeinen:
    "Small fixes for omapdss driver. Most importantly, fixes a build
    problem when debugfs or omapdss debug support is turned off, and fixes
    a suspend related crash."

    This has apparently been annoying rmk for a while..

    * tag 'omapdss-for-3.5-rc2' of git://gitorious.org/linux-omap-dss2/linux:
    OMAPDSS: fix registration of DPI and SDI devices
    OMAPDSS: DSI: Fix bug when calculating LP command interleaving parameters
    OMAPDSS: fix bogus WARN_ON in dss_runtime_put()
    OMAPDSS: Taal: fix compilation warning
    OMAPDSS: fix build when DEBUG_FS or DSS_DEBUG_SUPPORT disabled

    Linus Torvalds
     

12 Jun, 2012

6 commits

  • Pull m68knommu from Greg Ungerer:
    "This contains five fixes. Four fix build problems introduced by
    recent clean up and merging of the m68k timer and ptrace code. The
    other fixes the 528x ColdFire CPU QSPI base address definition, missed
    in the ColdFire QSPI cleanup."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68k: make syscall_trace_enter/leave exist for non-MMU classic m68k types
    m68knommu: fix 68360 local setting of timer interrupt handler
    m68knommu: fix 68328 local setting of timer interrupt handler
    m68k: fix inclusion of arch_gettimeoffset for non-MMU 68k classic CPU types
    m68knommu: m528x qspi definition fix

    Linus Torvalds
     
  • The assembler entry code calls directly to the syscall_trace_enter() and
    syscall_trace_leave() functions. But currently they are conditionaly
    compiled out for the non-MMU classic m68k CPU types (so 68328 for example),
    resulting in a link error:

    LD vmlinux
    arch/m68k/platform/68328/built-in.o: In function `do_trace':
    (.text+0x1c): undefined reference to `syscall_trace_enter'
    arch/m68k/platform/68328/built-in.o: In function `do_trace':
    (.text+0x4c): undefined reference to `syscall_trace_leave'

    Change the conditional check that includes these functions to be true for
    the !defined(CONFIG_MMU) case as well.

    Signed-off-by: Greg Ungerer
    Acked-by: Geert Uytterhoeven

    Greg Ungerer
     
  • Compiling for 68360 based targets fails with:

    arch/m68k/platform/68360/config.c: In function ‘hw_tick’:
    arch/m68k/platform/68360/config.c:55:2: error: implicit declaration of function ‘arch_timer_interrupt’
    arch/m68k/platform/68360/config.c: At top level:
    arch/m68k/platform/68360/config.c:64:6: error: conflicting types for ‘hw_timer_init’
    arch/m68k/include/asm/machdep.h:36:13: note: previous declaration of ‘hw_timer_init’ was here

    Changes made to hw_timer_init() didn't get updated in the 68328 timer code.
    So process and call the "handler" arg that is now passed into that
    hw_timer_init() function.

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • Compiling for 68328 based targets fails with:

    arch/m68k/platform/68328/timers.c: In function ‘hw_tick’:
    arch/m68k/platform/68328/timers.c:65:2: error: implicit declaration of function ‘arch_timer_interrupt’
    arch/m68k/platform/68328/timers.c: At top level:
    arch/m68k/platform/68328/timers.c:102:6: error: conflicting types for ‘hw_timer_init’
    arch/m68k/include/asm/machdep.h:36:13: note: previous declaration of ‘hw_timer_init’ was here

    Changes made to hw_timer_init() didn't get updated in the 68328 timer code.
    So process and call the "handler" arg that is now passed into that
    hw_timer_init() function.

    Signed-off-by: Greg Ungerer

    Greg Ungerer
     
  • When building for non-MMU based classic 68k CPU types (like the 68328 for
    example) you get a compilation error:

    CC arch/m68k/kernel/time.o
    arch/m68k/kernel/time.c:91:5: error: redefinition of ‘arch_gettimeoffset’
    include/linux/time.h:145:19: note: previous definition of ‘arch_gettimeoffset’ was here

    The arch_gettimeoffset() code is included when building for these CPU types,
    but it shouldn't be. Those machine types do not have
    CONFIG_ARCH_USES_GETTIMEOFFSET set.

    The fix is simply to conditionally include the arch_gettimeoffset() code on
    that same config setting that specifies its use or not.

    Signed-off-by: Greg Ungerer
    Acked-by: Geert Uytterhoeven

    Greg Ungerer
     
  • The consolidation of the qspi code missed a definition for 528x.

    Signed-off-by: Steven King
    Signed-off-by: Greg Ungerer

    Steven King
     

11 Jun, 2012

1 commit


09 Jun, 2012

4 commits

  • Pull scheduler fixes from Ingo Molnar.

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched: Fix the relax_domain_level boot parameter
    sched: Validate assumptions in sched_init_numa()
    sched: Always initialize cpu-power
    sched: Fix domain iteration
    sched/rt: Fix lockdep annotation within find_lock_lowest_rq()
    sched/numa: Load balance between remote nodes
    sched/x86: Calculate booted cores after construction of sibling_mask

    Linus Torvalds
     
  • Pull powerpc fixes from Paul Mackerras:
    "Two small fixes for powerpc:
    - a fix for a regression since 3.2 that causes 4-second (or longer)
    pauses
    - a fix for a potential oops when loading kernel modules on 32-bit
    embedded systems."

    * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    powerpc: Fix kernel panic during kernel module load
    powerpc/time: Sanity check of decrementer expiration is necessary

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar.

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/nmi: Fix section mismatch warnings on 32-bit
    x86/uv: Fix UV2 BAU legacy mode
    x86/mm: Only add extra pages count for the first memory range during pre-allocation early page table space
    x86, efi stub: Add .reloc section back into image
    x86/ioapic: Fix NULL pointer dereference on CPU hotplug after disabling irqs
    x86/reboot: Fix a warning message triggered by stop_other_cpus()
    x86/intel/moorestown: Change intel_scu_devices_create() to __devinit
    x86/numa: Set numa_nodes_parsed at acpi_numa_memory_affinity_init()
    x86/gart: Fix kmemleak warning
    x86: mce: Add the dropped timer interval init back
    x86/mce: Fix the MCE poll timer logic

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "A bit larger than what I'd wish for - half of it is due to hw driver
    updates to Intel Ivy-Bridge which info got recently released,
    cycles:pp should work there now too, amongst other things. (but we
    are generally making exceptions for hardware enablement of this type.)

    There are also callchain fixes in it - responding to mostly
    theoretical (but valid) concerns. The tooling side sports perf.data
    endianness/portability fixes which did not make it for the merge
    window - and various other fixes as well."

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (26 commits)
    perf/x86: Check user address explicitly in copy_from_user_nmi()
    perf/x86: Check if user fp is valid
    perf: Limit callchains to 127
    perf/x86: Allow multiple stacks
    perf/x86: Update SNB PEBS constraints
    perf/x86: Enable/Add IvyBridge hardware support
    perf/x86: Implement cycles:p for SNB/IVB
    perf/x86: Fix Intel shared extra MSR allocation
    x86/decoder: Fix bsr/bsf/jmpe decoding with operand-size prefix
    perf: Remove duplicate invocation on perf_event_for_each
    perf uprobes: Remove unnecessary check before strlist__delete
    perf symbols: Check for valid dso before creating map
    perf evsel: Fix 32 bit values endianity swap for sample_id_all header
    perf session: Handle endianity swap on sample_id_all header data
    perf symbols: Handle different endians properly during symbol load
    perf evlist: Pass third argument to ioctl explicitly
    perf tools: Update ioctl documentation for PERF_IOC_FLAG_GROUP
    perf tools: Make --version show kernel version instead of pull req tag
    perf tools: Check if callchain is corrupted
    perf callchain: Make callchain cursors TLS
    ...

    Linus Torvalds
     

08 Jun, 2012

8 commits

  • It was reported that compiling for 32-bit caused a bunch of
    section mismatch warnings:

    VDSOSYM arch/x86/vdso/vdso32-syms.lds
    LD arch/x86/vdso/built-in.o
    LD arch/x86/built-in.o

    WARNING: arch/x86/built-in.o(.data+0x5af0): Section mismatch in
    reference from the variable test_nmi_ipi_callback_na.10451 to
    the function .init.text:test_nmi_ipi_callback() [...]

    WARNING: arch/x86/built-in.o(.data+0x5b04): Section mismatch in
    reference from the variable nmi_unk_cb_na.10399 to the function
    .init.text:nmi_unk_cb() The variable nmi_unk_cb_na.10399
    references the function __init nmi_unk_cb() [...]

    Both of these are attributed to the internal representation of
    the nmiaction struct created during register_nmi_handler. The
    reason for this is that those structs are not defined in the
    init section whereas the rest of the code in nmi_selftest.c is.

    To resolve this, I created a new #define,
    register_nmi_handler_initonly, that tags the struct as
    __initdata to resolve the mismatch. This #define should only be
    used in rare situations where the register/unregister is called
    during init of the kernel.

    Big thanks to Jan Beulich for decoding this for me as I didn't
    have a clue what was going on.

    Reported-by: Witold Baryluk
    Tested-by: Witold Baryluk
    Cc: Jan Beulich
    Signed-off-by: Don Zickus
    Link: http://lkml.kernel.org/r/1338991542-23000-1-git-send-email-dzickus@redhat.com
    Signed-off-by: Ingo Molnar

    Don Zickus
     
  • This fixes a problem which can causes kernel oopses while loading
    a kernel module.

    According to the PowerPC EABI specification, GPR r11 is assigned
    the dedicated function to point to the previous stack frame.
    In the powerpc-specific kernel module loader, do_plt_call()
    (in arch/powerpc/kernel/module_32.c), GPR r11 is also used
    to generate trampoline code.

    This combination crashes the kernel, in the case where the compiler
    chooses to use a helper function for saving GPRs on entry, and the
    module loader has placed the .init.text section far away from the
    .text section, meaning that it has to generate a trampoline for
    functions in the .init.text section to call the GPR save helper.
    Because the trampoline trashes r11, references to the stack frame
    using r11 can cause an oops.

    The fix just uses GPR r12 instead of GPR r11 for generating the
    trampoline code. According to the statements from Freescale, this is
    safe from an EABI perspective.

    I've tested the fix for kernel 2.6.33 on MPC8541.

    Cc: stable@vger.kernel.org
    Signed-off-by: Steffen Rumler
    [paulus@samba.org: reworded the description]
    Signed-off-by: Paul Mackerras

    Steffen Rumler
     
  • The SGI Altix UV2 BAU (Broadcast Assist Unit) as used for
    tlb-shootdown (selective broadcast mode) always uses UV2
    broadcast descriptor format. There is no need to clear the
    'legacy' (UV1) mode, because the hardware always uses UV2 mode
    for selective broadcast.

    But the BIOS uses general broadcast and legacy mode, and the
    hardware pays attention to the legacy mode bit for general
    broadcast. So the kernel must not clear that mode bit.

    Signed-off-by: Cliff Wickman
    Cc:
    Link: http://lkml.kernel.org/r/E1SccoO-0002Lh-Cb@eag09.americas.sgi.com
    Signed-off-by: Ingo Molnar

    Cliff Wickman
     
  • …ion early page table space

    Robin found this regression:

    | I just tried to boot an 8TB system. It fails very early in boot with:
    | Kernel panic - not syncing: Cannot find space for the kernel page tables

    git bisect commit 722bc6b16771ed80871e1fd81c86d3627dda2ac8.

    A git revert of that commit does boot past that point on the 8TB
    configuration.

    That commit will add up extra pages for all memory range even
    above 4g.

    Try to limit that extra page count adding to first entry only.

    Bisected-by: Robin Holt <holt@sgi.com>
    Tested-by: Robin Holt <holt@sgi.com>
    Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    Cc: WANG Cong <xiyou.wangcong@gmail.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/CAE9FiQUj3wyzQxtq9yzBNc9u220p8JZ1FYHG7t%3DMOzJ%3D9BZMYA@mail.gmail.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Yinghai Lu
     
  • This reverts 68568add2c ("powerpc/time: Remove unnecessary sanity check
    of decrementer expiration"). We do need to check whether we have reached
    the expiration time of the next event, because we sometimes get an early
    decrementer interrupt, most notably when we set the decrementer to 1 in
    arch_irq_work_raise(). The effect of not having the sanity check is that
    if timer_interrupt() gets called early, we leave the decrementer set to
    its maximum value, which means we then don't get any more decrementer
    interrupts for about 4 seconds (or longer, depending on timebase
    frequency). I saw these pauses as a consequence of getting a stray
    hypervisor decrementer interrupt left over from exiting a KVM guest.

    This isn't quite a straight revert because of changes to the surrounding
    code, but it restores the same algorithm as was previously used.

    Cc: stable@vger.kernel.org
    Acked-by: Anton Blanchard
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Paul Mackerras
     
  • Some UEFI firmware will not load a .efi with a .reloc section
    with a size of 0.

    Therefore, we create a .efi image with 4 main areas and 3 sections.
    1. PE/COFF file header
    2. .setup section (covers all setup code following the first sector)
    3. .reloc section (contains 1 dummy reloc entry, created in build.c)
    4. .text section (covers the remaining kernel image)

    To make room for the new .setup section data, the header
    bugger_off_msg had to be shortened.

    Reported-by: Henrik Rydberg
    Signed-off-by: Jordan Justen
    Link: http://lkml.kernel.org/r/1339085121-12760-1-git-send-email-jordan.l.justen@intel.com
    Tested-by: Lee G Rosenbaum
    Tested-by: Henrik Rydberg
    Cc: Matt Fleming
    Signed-off-by: H. Peter Anvin

    Jordan Justen
     
  • Pull PARISC fixes from James Bottomley:
    "This is a set of three bug fixes for minor build breakages that got
    introduced just before 3.5-rc1 was released."

    * tag 'parisc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/parisc-2.6:
    [PARISC] fix code to find libgcc
    [PARISC] fix compile break in use of lib/strncopy_from_user.c
    [PARISC] fix missing TAINT_WARN problem

    Linus Torvalds
     
  • Pull tile fixes from Chris Metcalf:
    "These two minor bug fixes fix build failures from some changes that
    were merged in during the 3.5 merge window."

    * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
    tile: add #include to unbreak build after generic init_task conversion
    tile: remove cpu_idle_on_new_stack

    Linus Torvalds
     

06 Jun, 2012

20 commits

  • Some code was moved from init_task.c to setup.c but the appropriate
    header needed to be moved as well.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • This routine isn't used unless CONFIG_HOMECACHE is enabled, which
    isn't even available as a public configuration option yet.
    Since it no longer links correctly in 3.4, just remove it for now.

    Signed-off-by: Chris Metcalf

    Chris Metcalf
     
  • Signed-off-by: Arun Sharma
    Cc: Linus Torvalds
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1334961696-19580-5-git-send-email-asharma@fb.com
    Signed-off-by: Ingo Molnar

    Arun Sharma
     
  • Signed-off-by: Arun Sharma
    Cc: Linus Torvalds
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1334961696-19580-4-git-send-email-asharma@fb.com
    Signed-off-by: Ingo Molnar

    Arun Sharma
     
  • Without this patch, applications with two different stack
    regions (eg: native stack vs JIT stack) get truncated
    callchains even when RBP chaining is present. GDB shows proper
    stack traces and the frame pointer chaining is intact.

    This patch disables the (fp < RSP) check, hoping that other checks
    in the code save the day for us. In our limited testing, this
    didn't seem to break anything.

    In the long term, we could potentially have userspace advise
    the kernel on the range of valid stack addresses, so we don't
    spend a lot of time unwinding from bogus addresses.

    Signed-off-by: Arun Sharma
    CC: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Stephane Eranian
    Cc: Namhyung Kim
    Cc: Tom Zanussi
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-perf-users@vger.kernel.org
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1334961696-19580-2-git-send-email-asharma@fb.com
    Signed-off-by: Ingo Molnar

    Arun Sharma
     
  • Afaict there's no need to (incompletely) iterate the
    MEM_UOPS_RETIRED.* umask state.

    Signed-off-by: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/r/1338884803.28282.153.camel@twins
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Implement rudimentary IVB perf support. The SDM states its identical
    to SNB with exception of the exact event tables, but a quick look
    suggests they're similar enough.

    Also mark SNB-EP as broken for now.

    Requested-and-tested-by: Linus Torvalds
    Cc: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1338884803.28282.153.camel@twins
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Now that there's finally a chip with working PEBS (IvyBridge), we can
    enable the hardware and implement cycles:p for SNB/IVB.

    Cc: Stephane Eranian
    Requested-and-tested-by: Linus Torvalds
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1338884803.28282.153.camel@twins
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Zheng Yan reported that event group validation can wreck event state
    when Intel extra_reg allocation changes event state.

    Validation shouldn't change any persistent state. Cloning events in
    validate_{event,group}() isn't really pretty either, so add a few
    special cases to avoid modifying the event state.

    The code is restructured to minimize the special case impact.

    Reported-by: Zheng Yan
    Acked-by: Stephane Eranian
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1338903031.28282.175.camel@twins
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Commit 316ad248307fb ("sched/x86: Rewrite set_cpu_sibling_map()")
    broke the booted_cores accounting.

    The problem is that the booted_cores accounting needs all the
    sibling links set up. So restore the second loop and add a comment as
    to why its needed.

    On qemu booted with -smp sockets=1,cores=2,threads=2;
    Before:
    $ grep cores /proc/cpuinfo
    cpu cores : 2
    cpu cores : 1
    cpu cores : 4
    cpu cores : 3

    With the patch:
    $ grep cores /proc/cpuinfo
    cpu cores : 2
    cpu cores : 2
    cpu cores : 2
    cpu cores : 2

    Reported-by: Prarit Bhargava
    Reported-by: Borislav Petkov
    Signed-off-by: Kamalesh Babulal
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120531073738.GH7511@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar

    Kamalesh Babulal
     
  • In current Linux, percpu variable `vector_irq' is not cleared on
    offlined cpus while disabling devices' irqs. If the cpu that has
    the disabled irqs in vector_irq is hotplugged,
    __setup_vector_irq() hits invalid irq vector and may crash.

    This bug can be reproduced as following;

    # echo 0 > /sys/devices/system/cpu/cpu7/online
    # modprobe -r some_driver_using_interrupts # vector_irq@cpu7 uncleared
    # echo 1 > /sys/devices/system/cpu/cpu7/online # kernel may crash

    This patch fixes this bug by clearing vector_irq in
    __clear_irq_vector() even if the cpu is offlined.

    Signed-off-by: Tomoki Sekiyama
    Acked-by: Thomas Gleixner
    Cc: yrl.pp-manager.tt@hitachi.com
    Cc: ltc-kernel@ml.yrl.intra.hitachi.co.jp
    Cc: Suresh Siddha
    Cc: Yinghai Lu
    Cc: Alexander Gordeev
    Link: http://lkml.kernel.org/r/4FC340BE.7080101@hitachi.com
    Signed-off-by: Ingo Molnar

    Tomoki Sekiyama
     
  • When rebooting our 24 CPU Westmere servers with 3.4-rc6, we
    always see this warning msg:

    Restarting system.
    machine restart
    ------------[ cut here ]------------
    WARNING: at arch/x86/kernel/smp.c:125
    native_smp_send_reschedule+0x74/0xa7() Hardware name: X8DTN
    Modules linked in: igb [last unloaded: scsi_wait_scan]
    Pid: 1, comm: systemd-shutdow Not tainted 3.4.0-rc6+ #22
    Call Trace:
    [] warn_slowpath_common+0x7e/0x96
    [] warn_slowpath_null+0x15/0x17
    [] native_smp_send_reschedule+0x74/0xa7
    [] trigger_load_balance+0x279/0x2a6
    [] scheduler_tick+0xe0/0xe9
    [] update_process_times+0x60/0x70
    [] tick_sched_timer+0x68/0x92
    [] __run_hrtimer+0xb3/0x13c
    [] ? tick_nohz_handler+0xd0/0xd0
    [] hrtimer_interrupt+0xdb/0x198
    [] smp_apic_timer_interrupt+0x81/0x94
    [] apic_timer_interrupt+0x67/0x70
    [] ? default_send_IPI_mask_allbutself_phys+0xb4/0xc4
    [] physflat_send_IPI_allbutself+0x12/0x14
    [] native_nmi_stop_other_cpus+0x8a/0xd6
    [] native_machine_shutdown+0x50/0x67
    [] machine_shutdown+0xa/0xc
    [] native_machine_restart+0x20/0x32
    [] machine_restart+0xa/0xc
    [] kernel_restart+0x47/0x4c
    [] sys_reboot+0x13e/0x17c
    [] ? _raw_spin_unlock_bh+0x10/0x12
    [] ? bdi_queue_work+0xcf/0xd8
    [] ? __bdi_start_writeback+0xae/0xb7
    [] ? iterate_supers+0xa3/0xb7
    [] system_call_fastpath+0x16/0x1b
    ---[ end trace 320af5cb1cb60c5b ]---

    The root cause seems to be the
    default_send_IPI_mask_allbutself_phys() takes quite some time (I
    measured it could be several ms) to complete sending NMIs to all
    the other 23 CPUs, and for HZ=250/1000 system, the time is long
    enough for a timer interrupt to happen, which will in turn
    trigger to kick load balance to a stopped CPU and cause this
    warning in native_smp_send_reschedule().

    So disabling the local irq before stop_other_cpu() can fix this
    problem (tested 25 times reboot ok), and it is fine as there
    should be nobody caring the timer interrupt in such reboot
    stage.

    The latest 3.4 kernel slightly changes this behavior by sending
    REBOOT_VECTOR first and only send NMI_VECTOR if the REBOOT_VCTOR
    fails, and this patch is still needed to prevent the problem.

    Signed-off-by: Feng Tang
    Acked-by: Don Zickus
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120530231541.4c13433a@feng-i7
    Signed-off-by: Ingo Molnar

    Feng Tang
     
  • The allmodconfig hits:

    WARNING: vmlinux.o(.text+0x6553d): Section mismatch in
    reference from the function intel_scu_devices_create() to the
    function .devinit.text: spi_register_board_info()
    [...]

    This patch marks intel_scu_devices_create() as devinit because
    it only calls a devinit function, spi_register_board_info().

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: Alan Cox
    Cc: Kirill A. Shutemov
    Cc: Mika Westerberg
    Cc: Samuel Ortiz
    Cc: Feng Tang
    Link: http://lkml.kernel.org/r/20120531212025.GA8519@breakpoint.cc
    Signed-off-by: Ingo Molnar

    Sebastian Andrzej Siewior
     
  • When hot-adding a CPU, the system outputs following messages
    since node_to_cpumask_map[2] was not allocated memory.

    Booting Node 2 Processor 32 APIC 0xc0
    node_to_cpumask_map[2] NULL
    Pid: 0, comm: swapper/32 Tainted: G A 3.3.5-acd #21
    Call Trace:
    [] debug_cpumask_set_cpu+0x155/0x160
    [] ? add_timer_on+0xaa/0x120
    [] numa_add_cpu+0x1e/0x22
    [] identify_cpu+0x1df/0x1e4
    [] identify_econdary_cpu+0x16/0x1d
    [] smp_store_cpu_info+0x3c/0x3e
    [] smp_callin+0x139/0x1be
    [] start_secondary+0x13/0xeb

    The reason is that the bit of node 2 was not set at
    numa_nodes_parsed. numa_nodes_parsed is set by only
    acpi_numa_processor_affinity_init /
    acpi_numa_x2apic_affinity_init. Thus even if hot-added memory
    which is same PXM as hot-added CPU is written in ACPI SRAT
    Table, if the hot-added CPU is not written in ACPI SRAT table,
    numa_nodes_parsed is not set.

    But according to ACPI Spec Rev 5.0, it says about ACPI SRAT
    table as follows: This optional table provides information that
    allows OSPM to associate processors and memory ranges, including
    ranges of memory provided by hot-added memory devices, with
    system localities / proximity domains and clock domains.

    It means that ACPI SRAT table only provides information for CPUs
    present at boot time and for memory including hot-added memory.
    So hot-added memory is written in ACPI SRAT table, but hot-added
    CPU is not written in it. Thus numa_nodes_parsed should be set
    by not only acpi_numa_processor_affinity_init /
    acpi_numa_x2apic_affinity_init but also
    acpi_numa_memory_affinity_init for the case.

    Additionally, if system has cpuless memory node,
    acpi_numa_processor_affinity_init /
    acpi_numa_x2apic_affinity_init cannot set numa_nodes_parseds
    since these functions cannot find cpu description for the node.
    In this case, numa_nodes_parsed needs to be set by
    acpi_numa_memory_affinity_init.

    Signed-off-by: Yasuaki Ishimatsu
    Acked-by: David Rientjes
    Acked-by: KOSAKI Motohiro
    Cc: liuj97@gmail.com
    Cc: kosaki.motohiro@gmail.com
    Link: http://lkml.kernel.org/r/4FCC2098.4030007@jp.fujitsu.com
    [ merged it ]
    Signed-off-by: Ingo Molnar

    Yasuaki Ishimatsu
     
  • aperture_64.c now is using memblock, the previous
    kmemleak_ignore() for alloc_bootmem() should be removed then.

    Otherwise, with kmemleak enabled, kernel will throw warnings
    like:

    [ 0.000000] kmemleak: Trying to color unknown object at 0xffff8800c4000000 as Black
    [ 0.000000] Pid: 0, comm: swapper/0 Not tainted 3.5.0-rc1-next-20120605+ #130
    [ 0.000000] Call Trace:
    [ 0.000000] [] paint_ptr+0x66/0xc0
    [ 0.000000] [] kmemleak_ignore+0x2b/0x60
    [ 0.000000] [] kmemleak_init+0x217/0x2c1
    [ 0.000000] [] start_kernel+0x32d/0x3eb
    [ 0.000000] [] ? repair_env_string+0x5a/0x5a
    [ 0.000000] [] x86_64_start_reservations+0x131/0x135
    [ 0.000000] [] ? early_idt_handlers+0x120/0x120
    [ 0.000000] [] x86_64_start_kernel+0x102/0x111
    [ 0.000000] kmemleak: Early log backtrace:
    [ 0.000000] [] kmemleak_ignore+0x4b/0x60
    [ 0.000000] [] gart_iommu_hole_init+0x3e7/0x547
    [ 0.000000] [] pci_iommu_alloc+0x44/0x6f
    [ 0.000000] [] mem_init+0x19/0xec
    [ 0.000000] [] start_kernel+0x1ea/0x3eb
    [ 0.000000] [] x86_64_start_reservations+0x131/0x135
    [ 0.000000] [] x86_64_start_kernel+0x102/0x111
    [ 0.000000] [] 0xffffffffffffffff

    Signed-off-by: Xiaotian Feng
    Cc: Xiaotian Feng
    Cc: Tejun Heo
    Link: http://lkml.kernel.org/r/1338922831-2847-1-git-send-email-xtfeng@gmail.com
    Signed-off-by: Ingo Molnar

    Xiaotian Feng
     
  • commit 82f7af09 ("x86/mce: Cleanup timer mess) dropped the
    initialization of the per cpu timer interval. Duh :(

    Restore the previous behaviour.

    Reported-by: Chen Gong
    Cc: bp@amd64.org
    Cc: tony.luck@intel.com
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Fix the x86 instruction decoder to decode bsr/bsf/jmpe with
    operand-size prefix (66h). This fixes the test case failure
    reported by Linus, attached below.

    bsf/bsr/jmpe have a special encoding. Opcode map in
    Intel Software Developers Manual vol2 says they have
    TZCNT/LZCNT variants if it has F3h prefix. However, there
    is no information if it has other 66h or F2h prefixes.
    Current instruction decoder supposes that those are
    bad instructions, but it actually accepts at least
    operand-size prefixes.

    H. Peter Anvin further explains:

    " TZCNT/LZCNT are F3 + BSF/BSR exactly because the F2 and
    F3 prefixes have historically been no-ops with most instructions.
    This allows software to unconditionally use the prefixed versions
    and get TZCNT/LZCNT on the processors that have them if they don't
    care about the difference. "

    This fixes errors reported by test_get_len:

    Warning: arch/x86/tools/test_get_len found difference at :ffffffff81036d87
    Warning: ffffffff81036de5: 66 0f bc c2 bsf %dx,%ax
    Warning: objdump says 4 bytes, but insn_get_length() says 3
    Warning: arch/x86/tools/test_get_len found difference at :ffffffff81036ea6
    Warning: ffffffff81036f04: 66 0f bd c2 bsr %dx,%ax
    Warning: objdump says 4 bytes, but insn_get_length() says 3
    Warning: decoded and checked 13298882 instructions with 2 warnings

    Reported-by: Linus Torvalds
    Reported-by: Pekka Enberg
    Signed-off-by: Masami Hiramatsu
    Cc: "H. Peter Anvin"
    Cc:
    Link: http://lkml.kernel.org/r/20120604150911.22338.43296.stgit@localhost.localdomain
    Signed-off-by: Ingo Molnar

    Masami Hiramatsu
     
  • In commit 82f7af09 ("x86/mce: Cleanup timer mess), Thomas just
    forgot the "/ 2" there while cleaning up.

    Signed-off-by: Chen Gong
    Acked-by: Thomas Gleixner
    Cc: bp@amd64.org
    Cc: tony.luck@intel.com
    Link: http://lkml.kernel.org/r/1338863702-9245-1-git-send-email-gong.chen@linux.intel.com
    Signed-off-by: Ingo Molnar

    Chen Gong
     
  • Pull MCE regression fix from Tony Luck:
    "Typo/thinko in a cleanup caused a semantic change. Fix it."

    * tag 'please-pull-mce' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras:
    x86/mce: Fix the MCE poll timer logic

    Linus Torvalds
     
  • Pull arm CMA fix from Marek Szyprowski:
    "This removes the ARMv6+ CMA dependency and lets one use old, well-
    tested dma-mapping implementation also on ARMv6+ systems without the
    need to use EXPERIMENTAL stuff."

    Russell King complained (rightly) about the experimental feature being
    forced on by the ARM config.

    Here CMA is "continuous memory allocator", not "cross-memory attach".
    We really neet to stop using insane TLA's for things that aren't big
    industry standards.

    * 'fixes-for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    ARM: dma-mapping: remove unconditional dependency on CMA

    Linus Torvalds