01 Feb, 2010

2 commits


29 Jan, 2010

5 commits


25 Jan, 2010

1 commit


15 Jan, 2010

13 commits

  • Benjamin Herrenschmidt
     
  • Benjamin Herrenschmidt
     
  • Move the defintion and lock helper routines for the cpu hotplug driver
    lock from pseries to powerpc code to avoid build breaks for platforms
    other than pseries that use cpu hotplug.

    Signed-off-by: Nathan Fontenot
    Acked-by: Michael Ellerman
    Signed-off-by: Benjamin Herrenschmidt

    Nathan Fontenot
     
  • It looks like the previous patch sent out to move RTAS and
    other items from /proc/ppc64 to /proc/powerpc missed a few
    files needed for RAS and DLPAR functionality.

    Original Patch here:
    http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-September/076096.html

    This patch updates the remaining files to be created under /proc/powerpc.

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

    Nathan Fontenot
     
  • The newly added fixup for buggy dcbX insn's has
    a bug that always trigger a kernel TLB walk so a user space
    dcbX insn will cause a Kernel Machine Check if it hits DTLB error.

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: Benjamin Herrenschmidt

    Joakim Tjernlund
     
  • We noticed that recent kernels didn't boot on our 1GHz Canyonlands 460EX
    boards anymore. As it seems, patch 8d165db1 [powerpc: Improve
    decrementer accuracy] introduced this problem. The routine div_sc()
    overflows with shift = 32 resulting in this incorrect setup:

    time_init: decrementer frequency = 1000.000012 MHz
    time_init: processor frequency = 1000.000012 MHz
    clocksource: timebase mult[400000] shift[22] registered
    clockevent: decrementer mult[33] shift[32] cpu[0]

    This patch now introduces a local div_dc64() version of this function
    so that this overflow doesn't happen anymore.

    Signed-off-by: Stefan Roese
    Cc: Benjamin Herrenschmidt
    Cc: Detlev Zundel
    Signed-off-by: Benjamin Herrenschmidt

    Stefan Roese
     
  • get_viotape_info() declares a vio_waitevent on the stack, which
    contains a completion, but never initialises the completion.

    I have no idea how this ever worked, and on recent kernels it causes
    an oops in handle_tape_event() when we access the non-initialised
    completion.

    Signed-off-by: Michael Ellerman
    Acked-by: Stephen Rothwell
    Signed-off-by: Benjamin Herrenschmidt

    Michael Ellerman
     
  • Make sure compiler won't do weird things with limits. E.g. fetching
    them twice may return 2 different values after writable limits are
    implemented.

    I.e. either use rlimit helpers added in
    3e10e716abf3c71bdb5d86b8f507f9e72236c9cd
    or ACCESS_ONCE if not applicable.

    Signed-off-by: Jiri Slaby
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: linuxppc-dev@ozlabs.org
    Signed-off-by: Benjamin Herrenschmidt

    Jiri Slaby
     
  • pcibus_to_node can return -1 if we cannot determine which node a pci bus
    is on. If passed -1, cpumask_of_node will negatively index the lookup array
    and pull in random data:

    # cat /sys/devices/pci0000:00/0000:00:01.0/local_cpus
    00000000,00000003,00000000,00000000
    # cat /sys/devices/pci0000:00/0000:00:01.0/local_cpulist
    64-65

    Change cpumask_of_node to check for -1 and return cpu_all_mask in this
    case:

    # cat /sys/devices/pci0000:00/0000:00:01.0/local_cpus
    ffffffff,ffffffff,ffffffff,ffffffff
    # cat /sys/devices/pci0000:00/0000:00:01.0/local_cpulist
    0-127

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

    Anton Blanchard
     
  • cc1: warnings being treated as errors
    arch/powerpc/platforms/pseries/dlpar.c: In function 'dlpar_attach_node':
    arch/powerpc/platforms/pseries/dlpar.c:239: error: unused variable 'ent'
    arch/powerpc/platforms/pseries/dlpar.c: In function 'dlpar_detach_node':
    arch/powerpc/platforms/pseries/dlpar.c:271: error: unused variable 'prop'
    arch/powerpc/platforms/pseries/dlpar.c:270: error: unused variable 'parent'
    make[3]: *** [arch/powerpc/platforms/pseries/dlpar.o] Error 1

    Signed-off-by: FUJITA Tomonori
    Signed-off-by: Benjamin Herrenschmidt

    FUJITA Tomonori
     
  • Commit 57b150cce8e004ddd36330490a68bfb59b7271e9 (irq: only update affinity if
    ->set_affinity() is sucessfull) broke xics irq affinity.

    We need to use the cpumask passed in, instead of accessing ->affinity directly.

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

    Anton Blanchard
     
  • It seems there is a thinko in the TLB invalidation code that makes the
    tlbie in the loop executed just once. The intended check was probably
    'gt', not 'lt'.

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

    Anton Vorontsov
     
  • Various kernel asm modifies SRR0/SRR1 just before executing
    a rfi. If such code crosses a page boundary you risk a TLB miss
    which will clobber SRR0/SRR1. Avoid this by always pinning
    kernel instruction TLB space.

    Signed-off-by: Joakim Tjernlund
    Signed-off-by: Benjamin Herrenschmidt

    Joakim Tjernlund
     

14 Jan, 2010

1 commit

  • Commit ac4c2a3bbe5db5fc570b1d0ee1e474db7cb22585 broke the build
    of all powerpc boot wrappers.

    It attempts to add an include of autoconf.h but used the wrong
    path for it. It also adds -D__KERNEL__ to our boot wrapper, both
    things that we pretty much didn't do on purpose so far.

    We want our boot wrapper to remain independent enough of the kernel
    for various reasons, one of them being that you can "wrap" an existing
    kernel at distro install time which allows to ship one kernel image
    and a set of boot wrappers for different platforms, the wrappers
    don't have to be built out of the same kernel build tree.

    It's also incorrect to do what the patch does in our boot environment
    since we may not have a proper alignment exception handler which means
    we may not be able to fixup the few cases where an unaligned access will
    need SW emulation (depends on the core variant, could be when crossing
    page or segment boundaries for example).

    This patch fixes it by putting the old code back in and using the
    new "fancy" variant only when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
    is set, which happens not to be set on powerpc since we don't include
    autoconf.h. It also reverts the changes to our boot wrapper Makefile.

    This means that x86 should, afaik, keep the optimisations since its
    boot wrapper does include autoconf.h and define __KERNEL__ (though I
    doubt they make that much different outside of slow embedded processors).

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Linus Torvalds

    Benjamin Herrenschmidt
     

12 Jan, 2010

1 commit

  • JFFS2 uses lesser compression ratio and inflate always ends up in "copy
    direct from output" case.

    This patch tries to optimize the direct copy procedure. Uses
    get_unaligned() but only in one place.

    The copy loop just above this one can also use this optimization, but I
    havn't done so as I have not tested if it is a win there too.

    On my MPC8321 this is about 17% faster on my JFFS2 root FS than the
    original.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Joakim Tjernlund
    Cc: Roel Kluin
    Cc: Richard Purdie
    Cc: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joakim Tjernlund
     

06 Jan, 2010

1 commit


04 Jan, 2010

2 commits


31 Dec, 2009

3 commits

  • mkuboot.sh provides a basic wrapper for the 'mkimage' utility. Using
    mkuboot.sh provides clearer error reporting and allows a toolchain to
    use its own 'mkimage' executable specified by ${CROSS_COMPILE}mkimage.
    Additionally, this brings PowerPC in line with other architectures
    which already call mkimage via mkuboot.sh.

    Signed-off-by: Peter Tyser
    Signed-off-by: Grant Likely

    Peter Tyser
     
  • Signed-off-by: Grant Likely

    Grant Likely
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
    PCI/cardbus: Add a fixup hook and fix powerpc
    PCI: change PCI nomenclature in drivers/pci/ (non-comment changes)
    PCI: change PCI nomenclature in drivers/pci/ (comment changes)
    PCI: fix section mismatch on update_res()
    PCI: add Intel 82599 Virtual Function specific reset method
    PCI: add Intel USB specific reset method
    PCI: support device-specific reset methods
    PCI: Handle case when no pci device can provide cache line size hint
    PCI/PM: Propagate wake-up enable for PCIe devices too
    vgaarbiter: fix a typo in the vgaarbiter Documentation

    Linus Torvalds
     

27 Dec, 2009

1 commit

  • We were shifting the Ks/Kp/N bits one bit too far on mtsrin. It took
    me some time to figure that out, so I also put in some debugging and a
    comment explaining the conversion.

    This fixes current OpenBIOS boot on PPC64 KVM.

    Signed-off-by: Alexander Graf
    Signed-off-by: Avi Kivity

    Alexander Graf
     

21 Dec, 2009

4 commits

  • Fix the following build failures:

    arch/powerpc/platforms/embedded6xx/flipper-pic.c: In function 'flipper_pic_map':
    arch/powerpc/platforms/embedded6xx/flipper-pic.c:105: error: implicit declaration of function 'get_irq_desc'

    arch/powerpc/platforms/embedded6xx/hlwd-pic.c: In function 'hlwd_pic_map':
    arch/powerpc/platforms/embedded6xx/hlwd-pic.c:98: error: implicit declaration of function 'get_irq_desc'

    These failures are caused by the changes introduced in commit
    "powerpc: Remove get_irq_desc()". The reason these drivers were not
    updated is that they weren't merged yet.

    Signed-off-by: Albert Herranz
    Signed-off-by: Benjamin Herrenschmidt

    Albert Herranz
     
  • Fix the following build failures:

    arch/powerpc/platforms/embedded6xx/hlwd-pic.c: In function 'hlwd_pic_irq_cascade':
    arch/powerpc/platforms/embedded6xx/hlwd-pic.c:135: error: passing argument 1 of 'spin_lock' from incompatible pointer type
    arch/powerpc/platforms/embedded6xx/hlwd-pic.c:137: error: passing argument 1 of 'spin_unlock' from incompatible pointer type
    arch/powerpc/platforms/embedded6xx/hlwd-pic.c:145: error: passing argument 1 of 'spin_lock' from incompatible pointer type
    arch/powerpc/platforms/embedded6xx/hlwd-pic.c:149: error: passing argument 1 of 'spin_unlock' from incompatible pointer type

    These failures are caused by the changes introduced in commit
    "genirq: Convert irq_desc.lock to raw_spinlock". The reason this driver
    was not updated is that it wasn't merged yet.

    Signed-off-by: Albert Herranz
    Signed-off-by: Benjamin Herrenschmidt

    Albert Herranz
     
  • Benjamin Herrenschmidt
     
  • Benjamin Herrenschmidt
     

18 Dec, 2009

6 commits

  • The retry logic in ug_putc() is broken.

    If the TX fifo is not ready and the counter runs out it will have a
    value of -1 and no transfer should be attempted. Also, a counter
    with a value of 0 means that the TX fifo got ready in the last try
    and the transfer should be attempted.

    Reported-by: "Juha Leppanen"
    Signed-off-by: "Juha Leppanen"
    Signed-off-by: Albert Herranz
    Signed-off-by: Benjamin Herrenschmidt

    Albert Herranz
     
  • Since commit 57b150cce8e004ddd36330490a68bfb59b7271e9, desc->affinity
    of an irq is changed after calling desc->chip->set_affinity.
    Therefore we need to fix the irq_choose_cpu() not to depend on the
    desc->affinity for new mask.

    Signed-off-by: Jiajun Wu
    Signed-off-by: Li Yang
    Signed-off-by: Benjamin Herrenschmidt

    Yang Li
     
  • Commit d28513bc7f675d28b479db666d572e078ecf182d ("Fix bug in pagetable
    cache cleanup with CONFIG_PPC_SUBPAGE_PROT"), itself a fix for
    breakage caused by an earlier clean up patch of mine, contains a
    stupid bug. I changed the parameters of the subpage_protection()
    function, but failed to update one of the callers.

    This patch fixes it, and replaces a void * with a typed pointer so
    that the compiler will warn on such an error in future.

    Signed-off-by: David Gibson
    Signed-off-by: Benjamin Herrenschmidt

    David Gibson
     
  • The _ONSTACK variant should be used for on-stack completion,
    otherwise it will break lockdep.

    Signed-off-by: Yong Zhang
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: linuxppc-dev@ozlabs.org
    Signed-off-by: Benjamin Herrenschmidt

    Yong Zhang
     
  • On machines using the Apple U4 bridge (AKA IBM CPC945) PCIe interface such
    as the latest generation G5 machines x16 slot or the x16 slot of the
    PowerStation, MSIs are currently broken (and will oops when enabling).

    This fixes the oops and implements proper support for those. Instead of
    using the PCIe HT bridge conversion, on such slots we need to use
    a bunch of magic registers in the bridge as the MSI target, encoding
    the interrupt number in the low bits of the address itself

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • This patch fixes the handling of VSX alignment faults in little-endian
    mode (the current code assumes the processor is in big-endian mode).

    The patch also makes the handlers clear the top 8 bytes of the register
    when handling an 8 byte VSX load.

    This is based on 2.6.32.

    Signed-off-by: Neil Campbell
    Cc:
    Acked-by: Michael Neuling
    Signed-off-by: Benjamin Herrenschmidt

    Neil Campbell