07 Feb, 2011

1 commit

  • Spinlocks on shared processor partitions use H_YIELD to notify the
    hypervisor we are waiting on another virtual CPU. Unfortunately this means
    the hcall tracepoints can recurse.

    The patch below adds a percpu depth and checks it on both the entry and
    exit hcall tracepoints.

    Signed-off-by: Anton Blanchard
    Acked-by: Steven Rostedt
    Signed-off-by: Benjamin Herrenschmidt
    CC: stable@kernel.org

    Anton Blanchard
     

22 Jan, 2011

2 commits

  • * 'devicetree/merge' of git://git.secretlab.ca/git/linux-2.6:
    powerpc/83xx: fix build failures on dt compatible list.

    Linus Torvalds
     
  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (34 commits)
    powerpc/mpic: Fix mask/unmask timeout message
    powerpc/pseries: Add BNX2=m to defconfig
    powerpc: Enable 64kB pages and 1024 threads in pseries config
    powerpc: Disable mcount tracers in pseries defconfig
    powerpc/boot/dts: Install dts from the right directory
    powerpc: machine_check_generic is wrong on 64bit
    powerpc: Check RTAS extended log flag before checking length
    powerpc: Fix corruption when grabbing FWNMI data
    powerpc: Rework pseries machine check handler
    powerpc: Don't silently handle machine checks from userspace
    powerpc: Remove duplicate debugger hook in machine_check_exception
    powerpc: Never halt RTAS error logging after receiving an unrecoverable machine check
    powerpc: Don't force MSR_RI in machine_check_exception
    powerpc: Print 32 bits of DSISR in show_regs
    powerpc/kdump: Disable ftrace during kexec
    powerpc/kdump: Move crash_kexec_stop_spus to kdump crash handler
    powerpc/kexec: Remove empty ppc_md.machine_kexec_prepare
    powerpc/kexec: Don't initialise kexec hooks to default handlers
    powerpc/kdump: Remove ppc_md.machine_crash_shutdown
    powerpc/kexec: Remove ppc_md.machine_kexec
    ...

    Linus Torvalds
     

21 Jan, 2011

11 commits

  • The FWNMI code uses a global buffer without any locks to read the RTAS error
    information. If two CPUs take a machine check at once then we will corrupt
    this buffer.

    Since most FWNMI rtas messages are not of the extended type, we can create a
    64bit percpu buffer and use it where possible. If we do receive an extended
    RTAS log then we fall back to the old behaviour of using the global buffer.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • Rework pseries machine check handler:

    - If MSR_RI isn't set, we cannot recover even if the machine check was fully
    recovered

    - Rename nonfatal to recovered

    - Handle RTAS_DISP_LIMITED_RECOVERY

    - Use BUS_MCEERR_AR instead of BUS_ADRERR

    - Don't check all the RTAS error log fields when receiving a synchronous
    machine check. Recent versions of the pseries firmware do not fill them
    in during a machine check and instead send a follow up error log with
    the detailed information. If we see a synchronous machine check, and we
    came from userspace then kill the task.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • Newer versions of the System p firwmare send a partial RTAS error log in the
    machine check handler with a more detailed response appearing sometime later
    via check event.

    This means at machine check time we do not have enough information to
    ascertain exactly what went on. Furthermore, I have found the RTAS error
    logs in the machine check handler contain no useful information, so halting on
    them makes little sense. If we want to halt it would make more sense to do
    it following the error log received sometime later via check event.

    In light of this, never halt the error log in the pseries machine
    check handler.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • Use the crash handler hooks to run the SPU stop code, just like we do for
    ehea and cell RAS code.

    While I'm here I noticed "CPUSs reliabally"

    so fix the spelling MISTAKESs reliabally.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • We check for a valid handler before calling ppc_md.machine_kexec_prepare
    so we can just remove these empty handlers.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • There's no need to initialise ppc_md.machine_kexec and
    ppc_md.machine_kexec_prepare to the default handlers.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • No one uses ppc_md.machine_crash_shutdown, so remove it.

    Signed-off-by: Anton Blanchard
    Signed-off-by: Benjamin Herrenschmidt

    Anton Blanchard
     
  • With cmwq, there's no reason to use a separate workqueue in
    cpufreq_spudemand. Use system_wq instead. The work items are already
    sync canceled on stop, so it's already guaranteed that no work is
    running when spu_gov_exit() is entered.

    Signed-off-by: Tejun Heo
    Cc: Arnd Bergmann
    Cc: linuxppc-dev@lists.ozlabs.org
    Cc: Dave Jones
    Cc: cpufreq@vger.kernel.org
    Signed-off-by: Benjamin Herrenschmidt

    Tejun Heo
     
  • Simplify several write fileoperations for spufs by using
    simple_write_to_buffer().

    Signed-off-by: Akinobu Mita
    Acked-by: Arnd Bergmann
    Signed-off-by: Benjamin Herrenschmidt

    Akinobu Mita
     
  • The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
    is used to configure any non-standard kernel with a much larger scope than
    only small devices.

    This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
    references to the option throughout the kernel. A new CONFIG_EMBEDDED
    option is added that automatically selects CONFIG_EXPERT when enabled and
    can be used in the future to isolate options that should only be
    considered for embedded systems (RISC architectures, SLOB, etc).

    Calling the option "EXPERT" more accurately represents its intention: only
    expert users who understand the impact of the configuration changes they
    are making should enable it.

    Reviewed-by: Ingo Molnar
    Acked-by: David Woodhouse
    Signed-off-by: David Rientjes
    Cc: Greg KH
    Cc: "David S. Miller"
    Cc: Jens Axboe
    Cc: Arnd Bergmann
    Cc: Robin Holt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     
  • Benjamin Herrenschmidt
     

20 Jan, 2011

1 commit


14 Jan, 2011

1 commit

  • * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
    Documentation/trace/events.txt: Remove obsolete sched_signal_send.
    writeback: fix global_dirty_limits comment runtime -> real-time
    ppc: fix comment typo singal -> signal
    drivers: fix comment typo diable -> disable.
    m68k: fix comment typo diable -> disable.
    wireless: comment typo fix diable -> disable.
    media: comment typo fix diable -> disable.
    remove doc for obsolete dynamic-printk kernel-parameter
    remove extraneous 'is' from Documentation/iostats.txt
    Fix spelling milisec -> ms in snd_ps3 module parameter description
    Fix spelling mistakes in comments
    Revert conflicting V4L changes
    i7core_edac: fix typos in comments
    mm/rmap.c: fix comment
    sound, ca0106: Fix assignment to 'channel'.
    hrtimer: fix a typo in comment
    init/Kconfig: fix typo
    anon_inodes: fix wrong function name in comment
    fix comment typos concerning "consistent"
    poll: fix a typo in comment
    ...

    Fix up trivial conflicts in:
    - drivers/net/wireless/iwlwifi/iwl-core.c (moved to iwl-legacy.c)
    - fs/ext4/ext4.h

    Also fix missed 'diabled' typo in drivers/net/bnx2x/bnx2x.h while at it.

    Linus Torvalds
     

13 Jan, 2011

1 commit

  • MPC8308 has ULPI pin muxing settings in SICRH register, bits 17-18
    which is different from both MPC8313 and MPC8315.
    Also MPC8308 doesn't have REFSEL, UTMI_PHY_EN and OTG_PORT fields
    in the USB DR controller CONTROL register.

    Signed-off-by: Ilya Yanok
    Tested-by: Wolfgang Denk
    Acked-by: Wolfgang Denk
    Signed-off-by: Kumar Gala

    Ilya Yanok
     

12 Jan, 2011

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (72 commits)
    powerpc/pseries: Fix build of topology stuff without CONFIG_NUMA
    powerpc/pseries: Fix VPHN build errors on non-SMP systems
    powerpc/83xx: add mpc8308_p1m DMA controller device-tree node
    powerpc/83xx: add DMA controller to mpc8308 device-tree node
    powerpc/512x: try to free dma descriptors in case of allocation failure
    powerpc/512x: add MPC8308 dma support
    powerpc/512x: fix the hanged dma transfer issue
    powerpc/512x: scatter/gather dma fix
    powerpc/powermac: Make auto-loading of therm_pm72 possible
    of/address: Use propper endianess in get_flags
    powerpc/pci: Use printf extension %pR for struct resource
    powerpc: Remove unnecessary casts of void ptr
    powerpc: Disable VPHN polling during a suspend operation
    powerpc/pseries: Poll VPA for topology changes and update NUMA maps
    powerpc: iommu: Add device name to iommu error printks
    powerpc: Record vma->phys_addr in ioremap()
    powerpc: Update compat_arch_ptrace
    powerpc: Fix PPC_PTRACE_SETHWDEBUG on PPC_BOOK3S
    powerpc/time: printk time stamp init not correct
    powerpc: Minor cleanups for machdep.h
    ...

    Linus Torvalds
     

11 Jan, 2011

3 commits

  • Benjamin Herrenschmidt
     
  • * 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
    of/flattree: forward declare struct device_node in of_fdt.h
    ipmi: explicitly include of_address.h and of_irq.h
    sparc: explicitly cast negative phandle checks to s32
    powerpc/405: Fix missing #{address,size}-cells in i2c node
    powerpc/5200: dts: refactor dts files
    powerpc/5200: dts: Change combatible strings on localbus
    powerpc/5200: dts: remove unused properties
    powerpc/5200: dts: rename nodes to prepare for refactoring dts files
    of/flattree: Update dtc to current mainline.
    of/device: Don't register disabled devices
    powerpc/dts: fix syntax bugs in bluestone.dts
    of: Fixes for OF probing on little endian systems
    of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
    of/flattree: Add of_flat_dt_match() helper function
    of_serial: explicitly include of_irq.h
    of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
    of/flattree: Reorder unflatten_dt_node
    of/flattree: Refactor unflatten_dt_node
    of/flattree: Add non-boottime device tree functions
    of/flattree: Add Kconfig for EARLY_FLATTREE
    ...

    Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.

    Linus Torvalds
     
  • Remove kobject.h from files which don't need it, notably,
    sched.h and fs.h.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

07 Jan, 2011

5 commits

  • RCU free the struct inode. This will allow:

    - Subsequent store-free path walking patch. The inode must be consulted for
    permissions when walking, so an RCU inode reference is a must.
    - sb_inode_list_lock to be moved inside i_lock because sb list walkers who want
    to take i_lock no longer need to take sb_inode_list_lock to walk the list in
    the first place. This will simplify and optimize locking.
    - Could remove some nested trylock loops in dcache code
    - Could potentially simplify things a bit in VM land. Do not need to take the
    page lock to follow page->mapping.

    The downsides of this is the performance cost of using RCU. In a simple
    creat/unlink microbenchmark, performance drops by about 10% due to inability to
    reuse cache-hot slab objects. As iterations increase and RCU freeing starts
    kicking over, this increases to about 20%.

    In cases where inode lifetimes are longer (ie. many inodes may be allocated
    during the average life span of a single inode), a lot of this cache reuse is
    not applicable, so the regression caused by this patch is smaller.

    The cache-hot regression could largely be avoided by using SLAB_DESTROY_BY_RCU,
    however this adds some complexity to list walking and store-free path walking,
    so I prefer to implement this at a later date, if it is shown to be a win in
    real situations. I haven't found a regression in any non-micro benchmark so I
    doubt it will be a problem.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • dget_locked was a shortcut to avoid the lazy lru manipulation when we already
    held dcache_lock (lru manipulation was relatively cheap at that point).
    However, how that the lru lock is an innermost one, we never hold it at any
    caller, so the lock cost can now be avoided. We already have well working lazy
    dcache LRU, so it should be fine to defer LRU manipulations to scan time.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • dcache_lock no longer protects anything. remove it.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Protect d_unhashed(dentry) condition with d_lock. This means keeping
    DCACHE_UNHASHED bit in synch with hash manipulations.

    Signed-off-by: Nick Piggin

    Nick Piggin
     
  • Make d_count non-atomic and protect it with d_lock. This allows us to ensure a
    0 refcount dentry remains 0 without dcache_lock. It is also fairly natural when
    we start protecting many other dentry members with d_lock.

    Signed-off-by: Nick Piggin

    Nick Piggin
     

03 Jan, 2011

1 commit


02 Jan, 2011

1 commit


30 Dec, 2010

1 commit


24 Dec, 2010

1 commit

  • Fix build errors like these (from a randconfig and my defconfig for a custom board):

    src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:549: error: dereferencing pointer to incomplete type: 1 errors in 1 logs
    src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:636: error: implicit declaration of function 'nonseekable_open': 1 errors in 1 logs
    src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:657: error: variable 'mpc52xx_wdt_fops' has initializer but incomplete type: 1 errors in 1 logs
    src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:658: error: excess elements in struct initializer: 1 errors in 1 logs
    src/arch/powerpc/platforms/52xx/mpc52xx_gpt.c:658: error: unknown field 'owner' specified in initializer: 1 errors in 1 logs
    ...

    Reported-by: Geert Uytterhoeven
    Signed-off-by: Wolfram Sang
    Cc: Grant Likely
    Cc: Benjamin Herrenschmidt
    Cc: Andrew Morton
    Signed-off-by: Grant Likely

    Wolfram Sang
     

23 Dec, 2010

1 commit


09 Dec, 2010

7 commits

  • The therm_pm72 driver, used on the PowerMac G5 range, cannot be
    auto-loaded, since the driver itself creates both the device node
    and the driver instance.

    Moving the device node creation to the platform setup code and
    adding the necessary MODULE_DEVICE_TABLE() information allows the
    driver to be automatically loaded by udev on any semi-modern
    distribution.

    It "fixes" a major source of problem on G5 machines where the
    driver wasn't explicitely loaded by default, and the system
    would automatically shutdown under load.

    Tested on an Xserve G5.

    Signed-off-by: Marc Zyngier
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Benjamin Herrenschmidt

    Marc Zyngier
     
  • iommu_table_setparms_lpar needs either the phb or the subbusnumber
    (not both), pass the phb to make it similar to iommu_table_setparms.

    Note: In cases where a caller was passing bus->number previously to
    iommu_table_setparms_lpar() rather than phb->bus->number, this can lead
    to a different value in tbl->it_busno. The only example of this was the
    removed pci_dma_dev_setup_pSeriesLP(), removed in "ppc/iommu: remove
    unneeded pci_dma_dev_setup_pSeriesLP".

    [BenH: You updated only one of the two callers. Fixed that for you]

    Signed-off-by: Milton Miller
    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • The block in pci_dma_dev_setup_pSeriesLP for dma_window == NULL can be
    removed because we will only teminate the loop if we had already allocated
    a iommu table for that node or we found a window. While there may be
    no window for the device, the intresting part is if we are reusing a
    table or creating it for the first device under it.

    Signed-off-by: Milton Miller
    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt

    Nishanth Aravamudan
     
  • The device tree root is never a pci bus, and will not have a
    PCI_DN(pdn), so the check for PCI_DN added in
    650f7b3b2f0ead0673e90452cf3dedde97c537ba makes the check for pdn->parent
    redundant and it can be removed.

    Signed-off-by: Milton Miller
    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt

    Nishanth Aravamudan
     
  • The iommu_table pointer in the pci auxiliary struct of device_node has
    not been used by the iommu ops since the dma refactor of
    12d04eef927bf61328af2c7cbe756c96f98ac3bf, however this code still uses
    it to find tables for dlpar. By only setting the PCI_DN iommu_table
    pointer on nodes with dma window properties, we will be able to quickly
    find the node for later checks, and can remove the table without looking
    for the the dma window property on dlpar remove.

    Signed-off-by: Milton Miller
    Signed-off-by: Nishanth Aravamudan
    Signed-off-by: Benjamin Herrenschmidt

    Nishanth Aravamudan
     
  • Benjamin Herrenschmidt
     
  • Benjamin Herrenschmidt
     

30 Nov, 2010

2 commits