01 Oct, 2008

1 commit


26 Sep, 2008

1 commit

  • On the x86 arch, user space single step exceptions should be ignored
    if they occur in the kernel space, such as ptrace stepping through a
    system call.

    First check if it is kgdb that is executing a single step, then ensure
    it is not an accidental traversal into the user space, while in kgdb,
    any other time the TIF_SINGLESTEP is set, kgdb should ignore the
    exception.

    On x86, arm, mips and powerpc, the kgdb_contthread usage was
    inconsistent with the way single stepping is implemented in the kgdb
    core. The arch specific stub should always set the
    kgdb_cpu_doing_single_step correctly if it is single stepping. This
    allows kgdb to correctly process an instruction steps if ptrace
    happens to be requesting an instruction step over a system call.

    Signed-off-by: Jason Wessel

    Jason Wessel
     

25 Sep, 2008

1 commit


18 Sep, 2008

2 commits

  • Commit deac93df26b20cf8438339b5935b5f5643bc30c9 ("lib: Correct printk
    %pF to work on all architectures") broke the non modular builds by
    moving an essential function into modules.c. Fix this by moving it
    out again and into asm/sections.h as an inline. To do this, the
    definition of struct ppc64_opd_entry has been lifted out of modules.c
    and put in asm/elf.h where it belongs.

    Signed-off-by: James Bottomley
    Signed-off-by: Paul Mackerras

    James Bottomley
     
  • One of the changes in the bootwrapper makefile introduced the dtbImage
    targets for boards that need a simple zImage with a DTB embedded in
    them (595be948cce574ff2d5dde5d0426a636a4363c70, "[POWERPC]
    bootwrapper: Build multiple cuImages"). When this was done, it broke
    booting on the Holly board as the zImage.holly wrapper did not get the
    DTB embedded properly.

    This changes the target for the Holly board to a dtbImage so that the
    wrapper includes the vmlinux, wrapper bits, and DTB.

    Signed-off-by: Josh Boyer
    Signed-off-by: Paul Mackerras

    Josh Boyer
     

17 Sep, 2008

1 commit

  • For Freescale 8xxx devices that use an MPIC, the interrupt numbers in
    the device tree must be 16 greater than the values documented in the
    reference manual. In these chips, the MPIC is wired to use the first
    16 numbers for external interrupts, but the documentation numbers
    internal interrupts from 0.

    In the MPC8610 HPCD device tree, the interrupt properties for the DMA
    channels for DMA2 were not the adjusted values. This fixes that.

    Signed-off-by: Timur Tabi
    Signed-off-by: Kumar Gala
    Signed-off-by: Paul Mackerras

    Timur Tabi
     

10 Sep, 2008

1 commit

  • It was introduced by "vsprintf: add support for '%pS' and '%pF' pointer
    formats" in commit 0fe1ef24f7bd0020f29ffe287dfdb9ead33ca0b2. However,
    the current way its coded doesn't work on parisc64. For two reasons: 1)
    parisc isn't in the #ifdef and 2) parisc has a different format for
    function descriptors

    Make dereference_function_descriptor() more accommodating by allowing
    architecture overrides. I put the three overrides (for parisc64, ppc64
    and ia64) in arch/kernel/module.c because that's where the kernel
    internal linker which knows how to deal with function descriptors sits.

    Signed-off-by: James Bottomley
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Tony Luck
    Acked-by: Kyle McMartin
    Signed-off-by: Linus Torvalds

    James Bottomley
     

08 Sep, 2008

2 commits

  • A make -j20 powerpc kernel build broke a couple of months ago saying:
    In file included from arch/powerpc/boot/gunzip_util.h:13,
    from arch/powerpc/boot/prpmc2800.c:21:
    arch/powerpc/boot/zlib.h:85: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘*’ token
    arch/powerpc/boot/zlib.h:630: warning: type defaults to ‘int’ in declaration of ‘Byte’
    arch/powerpc/boot/zlib.h:630: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token

    It happened again yesterday: too rare for me to confirm the fix, but
    it looks like the list of dependants on gunzip_util.h was incomplete.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Paul Mackerras

    Hugh Dickins
     
  • We currently have a race when scheduling a context to a SPE -
    after we have found a runnable context in spusched_tick, the same
    context may have been scheduled by spu_activate().

    This may result in a panic if we try to unschedule a context that has
    been freed in the meantime.

    This change exits spu_schedule() if the context has already been
    scheduled, so we don't end up scheduling it twice.

    Signed-off-by: Andre Detsch
    Signed-off-by: Jeremy Kerr

    Andre Detsch
     

05 Sep, 2008

3 commits

  • Currently, there are two different fields in the
    mv643xx_eth_platform_data struct that together describe the PHY
    address -- one field (phy_addr) has the address of the PHY, but if
    that address is zero, a second field (force_phy_addr) needs to be
    set to distinguish the actual address zero from a zero due to not
    having filled in the PHY address explicitly (which should mean
    'use the default PHY address').

    If we are a bit smarter about the encoding of the phy_addr field,
    we can avoid the need for a second field -- this patch does that.

    Signed-off-by: Lennert Buytenhek

    Lennert Buytenhek
     
  • We currently have a race for a free SPE. With one thread doing a
    spu_yield(), and another doing a spu_activate():

    thread 1 thread 2
    spu_yield(oldctx) spu_activate(ctx)
    __spu_deactivate(oldctx)
    spu_unschedule(oldctx, spu)
    spu->alloc_state = SPU_FREE
    spu = spu_get_idle(ctx)
    - searches for a SPE in
    state SPU_FREE, gets
    the context just
    freed by thread 1
    spu_schedule(ctx, spu)
    spu->alloc_state = SPU_USED
    spu_schedule(newctx, spu)
    - assumes spu is still free
    - tries to schedule context on
    already-used spu

    This change introduces a 'free_spu' flag to spu_unschedule, to indicate
    whether or not the function should free the spu after descheduling the
    context. We only set this flag if we're not going to re-schedule
    another context on this SPU.

    Add a comment to document this behaviour.

    Signed-off-by: Jeremy Kerr

    Jeremy Kerr
     
  • Commit 8d5636fbca202f61fdb808fc9e20c0142291d802 introduced a reference
    count on SPU contexts during find_victim, but this may cause a leak in
    the reference count if we later find a better contender for a context to
    unschedule.

    Change the reference to after we've found our victim context, so we
    don't do the extra get_spu_context().

    Signed-off-by: Jeremy Kerr

    Jeremy Kerr
     

03 Sep, 2008

6 commits

  • The calculation to get TI_CPU based off of SPRG3 was just plain wrong,
    meaning that we were getting garbage for the CPU number on 6xx/G3/G4
    based SMP boxes in this code.

    Just offset off the stack pointer (to get to thread_info) like all the
    other references to TI_CPU do.

    This was pointed out by Chen Gong

    [paulus@samba.org - use rlwinm r12,r11,... instead of
    rlwinm r12,r1,...; tophys()]

    Signed-off-by: Kumar Gala
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Kumar Gala
     
  • HAVE_ARCH_UNMAPPED_AREA and HAVE_ARCH_UNMAPPED_AREA_TOPDOWN must
    be defined whenever CONFIG_PPC_MM_SLICES is enabled, not just when
    CONFIG_HUGETLB_PAGE is. They used to be always defined together but
    this is no longer the case since 3a8247cc2c856930f34eafce33f6a039227ee175
    ("powerpc: Only demote individual slices rather than whole process").

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • This bug is causing random crashes
    (http://bugzilla.kernel.org/show_bug.cgi?id=11414).

    -fno-omit-frame-pointer is only needed on powerpc when -pg is also
    supplied, and there is a gcc bug that causes incorrect code generation
    on 32-bit powerpc when -fno-omit-frame-pointer is used---it uses stack
    locations below the stack pointer, which is not allowed by the ABI
    because those locations can and sometimes do get corrupted by an
    interrupt.

    This ensures that CONFIG_FRAME_POINTER is only selected by ftrace.
    When CONFIG_FTRACE is enabled we also pass -mno-sched-epilog to work
    around the gcc codegen bug.

    Patch based on work by:
    Andreas Schwab
    Segher Boessenkool

    Signed-off-by: Tony Breeds
    Signed-off-by: Paul Mackerras

    Tony Breeds
     
  • This makes core_kernel_text() (and therefore kernel_text_address())
    return the correct result. Currently all the __devinit routines (at
    least) will not be considered to be kernel text.

    This is just a quick fix for 2.6.27 - hopefully we will be able to fix
    this better in 2.6.28.

    Signed-off-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Stephen Rothwell
     
  • Commit bc033b63bbfeb6c4b4eb0a1d083c650e4a0d2af8 ("powerpc/mm: Fix
    attribute confusion with htab_bolt_mapping()") moved the check for
    whether we should make pages of the linear mapping executable from
    htab_bolt_mapping into its callers, including htab_initialize.
    A side-effect of this is that the decision is now made once for
    each contiguous section in the LMB array rather than for each page
    individually. This can often mean that the whole of the linear
    mapping ends up being executable.

    This reverts to the previous behaviour, where individual pages are
    checked for being part of the kernel text or not, by moving the check
    back down into htab_bolt_mapping.

    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Paul Mackerras
     
  • This fixes an uninitialised variable in the VSX alignment code. It can
    cause warnings from GCC (noticed with gcc-4.1.1). Gcc is actually
    correct in this instance, and this bug could cause the alignment
    interrupt handler to send a SIGSEGV to the process on a legitimate
    access.

    Signed-off-by: Michael Neuling
    Signed-off-by: Paul Mackerras

    Michael Neuling
     

28 Aug, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (55 commits)
    sctp: fix random memory dereference with SCTP_HMAC_IDENT option.
    sctp: correct bounds check in sctp_setsockopt_auth_key
    wan: Missing capability checks in sbni_ioctl()
    e100, fix iomap read
    qeth: preallocated header account offset
    qeth: l2 write unicast list to hardware
    qeth: use -EOPNOTSUPP instead of -ENOTSUPP.
    ibm_newemac: Don't call dev_mc_add() before device is registered
    net: don't grab a mutex within a timer context in gianfar
    forcedeth: fix checksum flag
    net/usb/mcs7830: add set_mac_address
    net/usb/mcs7830: new device IDs
    [netdrvr] smc91x: fix resource removal (null ptr deref)
    ibmveth: fix bad UDP checksums
    [netdrvr] hso: dev_kfree_skb crash fix
    [netdrvr] hso: icon 322 detection fix
    atl1: disable TSO by default
    atl1e: multistatement if missing braces
    igb: remove 82576 quad adapter
    drivers/net/skfp/ess.c: fix compile warnings
    ...

    Linus Torvalds
     

27 Aug, 2008

2 commits


26 Aug, 2008

5 commits

  • Signed-off-by: Paul Mackerras

    Paul Mackerras
     
  • This fixes an error building powerpc allmodconfig:

    ERROR: "CMO_PageSize" [arch/powerpc/platforms/pseries/cmm.ko] undefined!

    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Paul Mackerras

    Andrew Morton
     
  • Fix the ioremap of the spu shadow regs on the PS3.

    The current PS3 hypervisor requires the spu shadow regs to be
    mapped with the PTE page protection bits set as read-only (PP=3).
    This implementation uses the low level __ioremap() to bypass the
    page protection settings inforced by ioremap_flags() to get the
    needed PTE bits set for the shadow regs.

    This fixes a runtime failure on the PS3 introduced by the powerpc
    ioremap_prot rework of commit a1f242ff460e4b50a045fa237c3c56cce9eabf83
    ("powerpc ioremap_prot").

    Signed-off-by: Masakazu Mokuno
    CC: Benjamin Herrenschmidt
    Signed-off-by: Geoff Levand
    Signed-off-by: Paul Mackerras

    Masakazu Mokuno
     
  • Rework the PS3 MMU hash table code to remove the need to ioremap the
    hash table by using the HV calls lv1_insert_htab_entry() and
    lv1_read_htab_entries().

    This fixes a runtime failure on the PS3 introduced by the powerpc
    ioremap_prot rework of commit a1f242ff460e4b50a045fa237c3c56cce9eabf83
    ("powerpc ioremap_prot").

    Signed-off-by: Masakazu Mokuno
    CC: Benjamin Herrenschmidt
    Signed-off-by: Geoff Levand
    Signed-off-by: Paul Mackerras

    Masakazu Mokuno
     
  • Update ps3_defconfig.

    Signed-off-by: Geoff Levand
    Signed-off-by: Paul Mackerras

    Geoff Levand
     

24 Aug, 2008

1 commit


21 Aug, 2008

6 commits


20 Aug, 2008

5 commits

  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    powerpc: Fix vio_bus_probe oops on probe error
    powerpc/ibmebus: Restore "name" sysfs attribute on ibmebus devices
    powerpc: Fix /dev/oldmem interface for kdump
    powerpc/spufs: Remove invalid semicolon after if statement
    powerpc/spufs: reference context while dropping state mutex in scheduler
    powerpc/spufs: fix npc setting for NOSCHED contexts

    Linus Torvalds
     
  • When CMO is enabled and booted on a non CMO system and the VIO
    device's probe function fails, an oops can result since
    vio_cmo_bus_remove is called when it should not. This fixes it by
    avoiding the vio_cmo_bus_remove call on platforms that don't implement
    CMO.

    cpu 0x0: Vector: 300 (Data Access) at [c00000000e13b3d0]
    pc: c000000000020d34: .vio_cmo_bus_remove+0xc0/0x1f4
    lr: c000000000020ca4: .vio_cmo_bus_remove+0x30/0x1f4
    sp: c00000000e13b650
    msr: 8000000000009032
    dar: 0
    dsisr: 40000000
    current = 0xc00000000e0566c0
    paca = 0xc0000000006f9b80
    pid = 2428, comm = modprobe
    enter ? for help
    [c00000000e13b6e0] c000000000021d94 .vio_bus_probe+0x2f8/0x33c
    [c00000000e13b7a0] c00000000029fc88 .driver_probe_device+0x13c/0x200
    [c00000000e13b830] c00000000029fdac .__driver_attach+0x60/0xa4
    [c00000000e13b8c0] c00000000029f050 .bus_for_each_dev+0x80/0xd8
    [c00000000e13b980] c00000000029f9ec .driver_attach+0x28/0x40
    [c00000000e13ba00] c00000000029f630 .bus_add_driver+0xd4/0x284
    [c00000000e13baa0] c0000000002a01bc .driver_register+0xc4/0x198
    [c00000000e13bb50] c00000000002168c .vio_register_driver+0x40/0x5c
    [c00000000e13bbe0] d0000000003b3f1c .ibmvfc_module_init+0x70/0x109c [ibmvfc]
    [c00000000e13bc70] c0000000000acf08 .sys_init_module+0x184c/0x1a10
    [c00000000e13be30] c000000000008748 syscall_exit+0x0/0x40

    Signed-off-by: Brian King
    Signed-off-by: Paul Mackerras

    Brian King
     
  • Recent of_platform changes made of_bus_type_init() overwrite the bus
    type's .dev_attrs list, meaning that the "name" attribute that ibmebus
    devices previously had is no longer present. This is a user-visible
    regression which breaks the userspace eHCA support, since the eHCA
    userspace driver relies on the name attribute to check for valid
    adapters.

    This fixes it by providing the "name" attribute in the generic OF
    device code instead. Tested on POWER.

    Signed-off-by: Joachim Fenkes
    Signed-off-by: Paul Mackerras

    Joachim Fenkes
     
  • A change to __ioremap() broke reading /dev/oldmem because we're no
    longer able to ioremap pfn 0 (d177c207, "[PATCH] powerpc: IOMMU: don't
    ioremap null addresses").

    We actually don't need to ioremap for anything that's part of the linear
    mapping, so just read it directly.

    Also make sure we're only reading one page or less at a time.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Sachin Sant
    Signed-off-by: Paul Mackerras

    Michael Ellerman
     
  • Paul Mackerras
     

19 Aug, 2008

2 commits