11 Sep, 2010

2 commits


10 Sep, 2010

12 commits


09 Sep, 2010

6 commits


08 Sep, 2010

12 commits

  • Dave Hylands reports:
    | We've observed a problem with dma_alloc_writecombine when the system
    | is under heavy load (heavy bus traffic). We've managed to reduce the
    | problem to the following snippet, which is run from a kthread in a
    | continuous loop:
    |
    | void *virtAddr;
    | dma_addr_t physAddr;
    | unsigned int numBytes = 256;
    |
    | for (;;) {
    | virtAddr = dma_alloc_writecombine(NULL,
    | numBytes, &physAddr, GFP_KERNEL);
    | if (virtAddr == NULL) {
    | printk(KERN_ERR "Running out of memory\n");
    | break;
    | }
    |
    | /* access DMA memory allocated */
    | tmp = virtAddr;
    | *tmp = 0x77;
    |
    | /* free DMA memory */
    | dma_free_writecombine(NULL,
    | numBytes, virtAddr, physAddr);
    |
    | ...sleep here...
    | }
    |
    | By itself, the code will run forever with no issues. However, as we
    | increase our bus traffic (typically using DMA) then the *tmp = 0x77
    | line will eventually cause a page fault. If we add a small delay (a
    | few microseconds) before the *tmp = 0x77, then we don't see a page
    | fault, even under heavy load.

    A dsb() is required after modifying the PTE entries to ensure that they
    will always be visible. Add this dsb().

    Reported-by: Dave Hylands
    Tested-by: Dave Hylands
    Signed-off-by: Russell King

    Russell King
     
  • Commit 7cfe24947 ("ARM: AMBA: Add pclk support to AMBA bus
    infrastructure") changed AMBA bus to handle the PCLK automatically.
    However, in EP93xx clock initialization is arch_initcall which is done
    later than AMBA device identification. This causes
    amba_get_enable_pclk() to fail resulting device where UARTs are not
    functional.

    So change ep93xx_clock_init() to be postcore_initcall.

    Signed-off-by: Mika Westerberg
    Acked-by: H Hartley Sweeten
    Signed-off-by: Russell King

    Mika Westerberg
     
  • This reverts commit 4fa5518, which causes a compilation regression for
    IXP4xx platforms.

    Reported-by: Richard Cochran
    Acked-by: Eric Miao
    Signed-off-by: Russell King

    Russell King
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI: bus speed strings should be const
    PCI hotplug: Fix build with CONFIG_ACPI unset
    PCI: PCIe: Remove the port driver module exit routine
    PCI: PCIe: Move PCIe PME code to the pcie directory
    PCI: PCIe: Disable PCIe port services during port initialization
    PCI: PCIe: Ask BIOS for control of all native services at once
    ACPI/PCI: Negotiate _OSC control bits before requesting them
    ACPI/PCI: Do not preserve _OSC control bits returned by a query
    ACPI/PCI: Make acpi_pci_query_osc() return control bits
    ACPI/PCI: Reorder checks in acpi_pci_osc_control_set()
    PCI: PCIe: Introduce commad line switch for disabling port services
    PCI: PCIe AER: Introduce pci_aer_available()
    x86/PCI: only define pci_domain_nr if PCI and PCI_DOMAINS are set
    PCI: provide stub pci_domain_nr function for !CONFIG_PCI configs

    Linus Torvalds
     
  • * 'for-linus' of git://android.kernel.org/kernel/tegra:
    [ARM] tegra: Add ZRELADDR default for ARCH_TEGRA

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mattst88/alpha-2.6:
    alpha: Fix printk format errors
    alpha: convert perf_event to use local_t
    Fix call to replaced SuperIO functions
    alpha: remove homegrown L1_CACHE_ALIGN macro

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
    powerpc/pseries: Correct rtas_data_buf locking in dlpar code
    powerpc/85xx: Add P1021 PCI IDs and quirks
    arch/powerpc/sysdev/qe_lib/qe.c: Add of_node_put to avoid memory leak
    arch/powerpc/platforms/83xx/mpc837x_mds.c: Add missing iounmap
    fsl_rio: fix compile errors
    powerpc/85xx: Fix compile issue with p1022_ds due to lmb rename to memblock
    powerpc/85xx: Fix compilation of mpc85xx_mds.c
    powerpc: Don't use kernel stack with translation off
    powerpc/perf_event: Reduce latency of calling perf_event_do_pending
    powerpc/kexec: Adds correct calling convention for kexec purgatory

    Linus Torvalds
     
  • Recent changes to linker segments that hold per-cpu data broke linking
    for m68knommu targets:

    LD vmlinux
    /usr/local/bin/m68k-uclinux-ld.real: error: no memory region specified for loadable section `.data..shared_aligned'

    Add missing segments into the m68knommu linker script.

    Signed-off-by: Greg Ungerer
    Signed-off-by: Linus Torvalds

    Greg Ungerer
     
  • Fix missing consts in h8300's kernel_execve():

    arch/h8300/kernel/sys_h8300.c: In function 'kernel_execve':
    arch/h8300/kernel/sys_h8300.c:59: warning: initialization from incompatible pointer type
    arch/h8300/kernel/sys_h8300.c:60: warning: initialization from incompatible pointer type

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Fix h8300's die() to take care of a number of problems:

    CC arch/h8300/kernel/traps.o
    In file included from arch/h8300/include/asm/bitops.h:10,
    from include/linux/bitops.h:22,
    from include/linux/kernel.h:17,
    from include/linux/sched.h:54,
    from arch/h8300/kernel/traps.c:18:
    arch/h8300/include/asm/system.h:136: warning: 'struct pt_regs' declared inside parameter list
    arch/h8300/include/asm/system.h:136: warning: its scope is only this definition or declaration, which is probably not what you want
    arch/h8300/kernel/traps.c:100: error: conflicting types for 'die'
    arch/h8300/include/asm/system.h:136: error: previous declaration of 'die' was here
    make[2]: *** [arch/h8300/kernel/traps.o] Error 1

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Fix h8300's asm/atomic.h to store the IRQ flags in an unsigned long to deal
    with warnings of the following type:

    arch/h8300/include/asm/atomic.h: In function 'atomic_add_return':
    arch/h8300/include/asm/atomic.h:22: warning: comparison of distinct pointer types lacks a cast
    arch/h8300/include/asm/atomic.h:24: warning: comparison of distinct pointer types lacks a cast

    Signed-off-by: David Howells
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Reported-by: Dan Liang
    Signed-off-by: Nicolas Ferre

    Nicolas Ferre
     

05 Sep, 2010

2 commits

  • kobject_add_internal failed for threshold_bank2 with -EEXIST,
    don't try to register things with the same name in the same
    directory:

    Pid: 1, comm: swapper Tainted: G W 2.6.31 #1
    Call Trace:
    [] ? kobject_add_internal+0x156/0x180
    [] ? kobject_add+0x66/0x6b
    [] ? kobject_init+0x42/0x82
    [] ? kobject_create_and_add+0x34/0x63
    [] ? threshold_create_bank+0x14f/0x259
    [] ? mce_create_device+0x8d/0x1b8
    [] ? threshold_init_device+0x3f/0x80
    [] ? threshold_init_device+0x0/0x80
    [] ? do_one_initcall+0x4f/0x143
    [] ? kernel_init+0x14c/0x1a2
    [] ? child_rip+0xa/0x20
    [] ? kernel_init+0x0/0x1a2
    [] ? child_rip+0x0/0x20
    kobject_create_and_add: kobject_add error: -17

    (Probably the for_each_cpu loop should be entirely removed.)

    Signed-off-by: Andreas Herrmann
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Andreas Herrmann
     
  • This patch fixes the sparse warnings when the return pointer of
    iomap_atomic_prot_pfn() is used as an argument of iowrite32()
    and friends.

    Signed-off-by: Francisco Jerez
    LKML-Reference:
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar

    Francisco Jerez
     

03 Sep, 2010

3 commits

  • When the PMU is enabled it is valid to have unhandled nmis, two
    events could trigger 'simultaneously' raising two back-to-back
    NMIs. If the first NMI handles both, the latter will be empty
    and daze the CPU.

    The solution to avoid an 'unknown nmi' massage in this case was
    simply to stop the nmi handler chain when the PMU is enabled by
    stating the nmi was handled. This has the drawback that a) we
    can not detect unknown nmis anymore, and b) subsequent nmi
    handlers are not called.

    This patch addresses this. Now, we check this unknown NMI if it
    could be a PMU back-to-back NMI. Otherwise we pass it and let
    the kernel handle the unknown nmi.

    This is a debug log:

    cpu #6, nmi #32333, skip_nmi #32330, handled = 1, time = 1934364430
    cpu #6, nmi #32334, skip_nmi #32330, handled = 1, time = 1934704616
    cpu #6, nmi #32335, skip_nmi #32336, handled = 2, time = 1936032320
    cpu #6, nmi #32336, skip_nmi #32336, handled = 0, time = 1936034139
    cpu #6, nmi #32337, skip_nmi #32336, handled = 1, time = 1936120100
    cpu #6, nmi #32338, skip_nmi #32336, handled = 1, time = 1936404607
    cpu #6, nmi #32339, skip_nmi #32336, handled = 1, time = 1937983416
    cpu #6, nmi #32340, skip_nmi #32341, handled = 2, time = 1938201032
    cpu #6, nmi #32341, skip_nmi #32341, handled = 0, time = 1938202830
    cpu #6, nmi #32342, skip_nmi #32341, handled = 1, time = 1938443743
    cpu #6, nmi #32343, skip_nmi #32341, handled = 1, time = 1939956552
    cpu #6, nmi #32344, skip_nmi #32341, handled = 1, time = 1940073224
    cpu #6, nmi #32345, skip_nmi #32341, handled = 1, time = 1940485677
    cpu #6, nmi #32346, skip_nmi #32347, handled = 2, time = 1941947772
    cpu #6, nmi #32347, skip_nmi #32347, handled = 1, time = 1941949818
    cpu #6, nmi #32348, skip_nmi #32347, handled = 0, time = 1941951591
    Uhhuh. NMI received for unknown reason 00 on CPU 6.
    Do you have a strange power saving mode enabled?
    Dazed and confused, but trying to continue

    Deltas:

    nmi #32334 340186
    nmi #32335 1327704
    nmi #32336 1819 <<<< back-to-back nmi [1]
    nmi #32337 85961
    nmi #32338 284507
    nmi #32339 1578809
    nmi #32340 217616
    nmi #32341 1798 <<<< back-to-back nmi [2]
    nmi #32342 240913
    nmi #32343 1512809
    nmi #32344 116672
    nmi #32345 412453
    nmi #32346 1462095 <<<< 1st nmi (standard) handling 2 counters
    nmi #32347 2046 <<<< 2nd nmi (back-to-back) handling one
    counter nmi #32348 1773 <<<< 3rd nmi (back-to-back)
    handling no counter! [3]

    For back-to-back nmi detection there are the following rules:

    The PMU nmi handler was handling more than one counter and no
    counter was handled in the subsequent nmi (see [1] and [2]
    above).

    There is another case if there are two subsequent back-to-back
    nmis [3]. The 2nd is detected as back-to-back because the first
    handled more than one counter. If the second handles one counter
    and the 3rd handles nothing, we drop the 3rd nmi because it
    could be a back-to-back nmi.

    Signed-off-by: Robert Richter
    Signed-off-by: Peter Zijlstra
    [ renamed nmi variable to pmu_nmi to avoid clash with .nmi in entry.S ]
    Signed-off-by: Don Zickus
    Cc: peterz@infradead.org
    Cc: gorcunov@gmail.com
    Cc: fweisbec@gmail.com
    Cc: ying.huang@intel.com
    Cc: ming.m.lin@intel.com
    Cc: eranian@google.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Robert Richter
     
  • Now that we rely on the number of handled overflows, ensure all
    handle_irq implementations actually return the right number.

    Signed-off-by: Peter Zijlstra
    Signed-off-by: Don Zickus
    Cc: peterz@infradead.org
    Cc: robert.richter@amd.com
    Cc: gorcunov@gmail.com
    Cc: fweisbec@gmail.com
    Cc: ying.huang@intel.com
    Cc: ming.m.lin@intel.com
    Cc: eranian@google.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • During testing of a patch to stop having the perf subsytem
    swallow nmis, it was uncovered that Nehalem boxes were randomly
    getting unknown nmis when using the perf tool.

    Moving the ack'ing of the PMI closer to when we get the status
    allows the hardware to properly re-set the PMU bit signaling
    another PMI was triggered during the processing of the first
    PMI. This allows the new logic for dealing with the
    shortcomings of multiple PMIs to handle the extra NMI by
    'eat'ing it later.

    Now one can wonder why are we getting a second PMI when we
    disable all the PMUs in the begining of the NMI handler to
    prevent such a case, for that I do not know. But I know the fix
    below helps deal with this quirk.

    Tested on multiple Nehalems where the problem was occuring.
    With the patch, the code now loops a second time to handle the
    second PMI (whereas before it was not).

    Signed-off-by: Don Zickus
    Cc: peterz@infradead.org
    Cc: robert.richter@amd.com
    Cc: gorcunov@gmail.com
    Cc: fweisbec@gmail.com
    Cc: ying.huang@intel.com
    Cc: ming.m.lin@intel.com
    Cc: eranian@google.com
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Don Zickus
     

02 Sep, 2010

3 commits

  • The validate_event function in the ARM perf events backend has the
    following problems:

    1.) Events that are disabled count towards the cost.
    2.) Events associated with other PMUs [for example, software events or
    breakpoints] do not count towards the cost, but do fail validation,
    causing the group to fail.

    This patch changes validate_event so that it ignores events in the
    PERF_EVENT_STATE_OFF state or that are scheduled for other PMUs.

    Reported-by: Pawel Moll
    Acked-by: Jamie Iles
    Signed-off-by: Will Deacon
    Signed-off-by: Russell King

    Will Deacon
     
  • CPU_32v6K is selected by CPU_V7 but it only depends on CPU_V6.

    Signed-off-by: Catalin Marinas
    Acked-by: Uwe Kleine-König
    Signed-off-by: Russell King

    Catalin Marinas
     
  • The dlpar code can cause a deadlock to occur when making the RTAS
    configure-connector call. This occurs because we make kmalloc calls,
    which can block, while parsing the rtas_data_buf and holding the
    rtas_data_buf_lock. This an cause issues if someone else attempts
    to grab the rtas_data_bug_lock.

    This patch alleviates this issue by copying the contents of the rtas_data_buf
    to a local buffer before parsing. This allows us to only hold the
    rtas_data_buf_lock around the RTAS configure-connector calls.

    Signed-off-by: Nathan Fontenot
    Signed-off-by: Benjamin Herrenschmidt

    Nathan Fontenot