05 May, 2009

1 commit


03 May, 2009

2 commits

  • The powerpc kernel always requires an Open Firmware like device tree
    to supply device information. On systems without OF, this comes from
    a flattened device tree blob. This blob is usually generated by dtc,
    a tool which compiles a text description of the device tree into the
    flattened format used by the kernel. Sometimes, the bootwrapper makes
    small changes to the pre-compiled device tree blob (e.g. filling in
    the size of RAM). To do this it uses the libfdt library.

    Because these are only used on powerpc, the code for both these tools
    is included under arch/powerpc/boot (these were imported and are
    periodically updated from the upstream dtc tree).

    However, the microblaze architecture, currently being prepared for
    merging to mainline also uses dtc to produce device tree blobs. A few
    other archs have also mentioned some interest in using dtc.
    Therefore, this patch moves dtc and libfdt from arch/powerpc into
    scripts, where it can be used by any architecture.

    The vast bulk of this patch is a literal move, the rest is adjusting
    the various Makefiles to use dtc and libfdt correctly from their new
    locations.

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

    David Gibson
     
  • Some drivers using of_register_platform_driver() wrapper break on sparc
    because the wrapper isn't in the header file. This patch moves it from
    Microblaze and PowerPC implementations and makes it common code.

    Fixes this sparc64 allmodconfig build error (at least):

    drivers/leds/leds-gpio.c: In function `gpio_led_init':
    drivers/leds/leds-gpio.c:295: error: implicit declaration of function `of_register_platform_driver'
    drivers/leds/leds-gpio.c: In function `gpio_led_exit':
    drivers/leds/leds-gpio.c:311: error: implicit declaration of function `of_unregister_platform_driver'

    Signed-off-by: Grant Likely
    Acked-by: David S. Miller
    Cc: Michal Simek
    Cc: Benjamin Herrenschmidt
    Cc: Stephen Rothwell
    Cc: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Grant Likely
     

01 May, 2009

2 commits

  • commit 2657dd4e301d4841ed67a4fac7d145ad8f3e1b28 introduced a
    bug where we would now always override the "real" oprofile CPU
    type with the "compatible" one provided by a pseudo-PVR in the
    device-tree which is incorrect and breaks oprofile on all current
    configs since the "compatible" ones aren't yet recognized.

    This fixes it.

    Signed-off-by: Benjamin Herrenschmidt

    Benjamin Herrenschmidt
     
  • Oprofile is changing the naming it is using for the compatibility modes.
    Instead of having compat-power, oprofile will go to family naming
    convention and use ibm-compat-v. Currently only ibm-compat-v1 will
    be defined.
    The notion of compatibility events just started with POWER6. So there is
    no way that any other tool could exist that is using these
    oprofile_cpu_type strings we want to change.

    Signed-off-by: Mike Wolf
    Signed-off-by: Benjamin Herrenschmidt

    Michael Wolf
     

29 Apr, 2009

2 commits

  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    powerpc/ps3: Fix build error on UP
    powerpc/cell: Select PCI for IBM_CELL_BLADE AND CELLEB
    powerpc: ppc32 needs elf_read_implies_exec()
    powerpc/86xx: Add device_type entry to soc for ppc9a
    powerpc/44x: Correct memory size calculation for denali-based boards
    maintainers: Fix PowerPC 4xx git tree
    powerpc: fix for long standing bug noticed by gcc 4.4.0
    Revert "powerpc: Add support for early tlbilx opcode"

    Linus Torvalds
     
  • Commit edada399 broke the build on 64-bit powerpc because it moved the
    __ftr_alt_* sections of a file away from the .text section, causing
    link failures due to relative conditional branch targets being too far
    away from the branch instructions. This happens on pretty much all
    64-bit powerpc configs.

    This change reverts commit edada399 while preserving the update from
    the *.refok sections to .ref.text that has happened since.

    Signed-off-by: Tim Abbott
    Requested-by: Paul Mackerras
    Signed-off-by: Linus Torvalds

    Tim Abbott
     

28 Apr, 2009

7 commits

  • A non-SMP version of smp_send_stop() is now included in smp.h.
    Remove the unneeded definition in the PS3 smp.c.

    Fixes build errors like these when CONFIG_SMP=n:

    arch/powerpc/platforms/ps3/setup.c:49: error: redefinition of 'smp_send_stop'
    include/linux/smp.h:125: error: previous definition of 'smp_send_stop' was here

    Reported-by: Subrata Modak
    Signed-off-by: Geoff Levand
    Signed-off-by: Paul Mackerras

    Geoff Levand
     
  • Currently PPC_CELL_NATIVE selects PPC_OF_PLATFORM_PCI, but does not
    select PCI. This can lead to a config with the former and the latter
    disabled, which does not build.

    To fix this PPC_CELL_NATIVE should select PCI. However, that would
    force PCI on for QPACE, which also selects PPC_CELL_NATIVE. So
    instead move the select of PPC_OF_PLATFORM_PCI and PCI under both
    IBM_CELL_BLADE and CELLEB.

    Signed-off-by: Michael Ellerman
    Acked-by: Arnd Bergmann
    Signed-off-by: Paul Mackerras

    Michael Ellerman
     
  • On ppc64 we implemented elf_read_implies_exec() for 32-bit binaries
    because old toolchains had bugs where they didn't mark program
    segments executable that needed to be. For some reason we didn't do
    this on ppc32 builds. This hadn't been an issue until commit 8d30c14c
    ("powerpc/mm: Rework I$/D$ coherency (v3)"), which had as a side
    effect that we are now enforcing execute permissions to some extent on
    32-bit 4xx and Book E processors.

    This fixes it by defining elf_read_implies_exec on 32-bit to turn on
    the read-implies-exec behaviour on programs that are sufficiently old
    that they don't have a PT_GNU_STACK program header.

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

    Kumar Gala
     
  • The section .text.init.refok is deprecated and __REF (.ref.text)
    should be used in assembly files instead. This patch cleans up a few
    uses of .text.init.refok in the powerpc architecture.

    Signed-off-by: Tim Abbott
    Cc: Benjamin Herrenschmidt
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • Rather than adding .ref.text to the powerpc linker script so that we
    can use __REF on the powerpc architecture, it seems simpler to switch
    to using the generic TEXT_TEXT macro.

    Signed-off-by: Tim Abbott
    Cc: Benjamin Herrenschmidt
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     
  • Paul Mackerras
     
  • The 'device_type = "soc";' line *is* needed in the DTS for get_immrbase()
    to return the correct address.

    Signed-off-by: Martyn Welch
    Signed-off-by: Kumar Gala

    Martyn Welch
     

27 Apr, 2009

1 commit

  • This has the consequence of changing the section name use for head
    code from ".text.head" to ".head.text". Since this commit changes all
    users in the architecture, this change should be harmless.

    Signed-off-by: Tim Abbott
    Cc: Benjamin Herrenschmidt
    Acked-by: Sam Ravnborg
    Signed-off-by: Linus Torvalds

    Tim Abbott
     

24 Apr, 2009

2 commits

  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    powerpc: Fix modular build of ide-pmac when mediabay is built in
    powerpc/pasemi: Fix build error on UP
    powerpc: Make macintosh/mediabay driver depend on CONFIG_BLOCK
    maintainers: Fix PS3 patterns
    powerpc/ps3: Fix CONFIG_PS3_FLASH=n build warning
    powerpc/32: Don't clobber personality flags on exec
    powerpc: Fix crash on CPU hotplug
    powerpc/85xx: Remove defconfigs that mpc85xx_{smp_}defconfig cover
    powerpc/85xx: Added SMP defconfig
    powerpc/85xx: Enabled a bunch of FSL specific drivers/options
    powerpc/85xx: Updated generic mpc85xx_defconfig
    powerpc: don't disable SATA interrupts on Freescale MPC8610 HPCD
    fsl_rio: Pass the proper device to dma mapping routines
    powerpc: Fix of_node_put() exit path in of_irq_map_one()
    powerpc/5200: defconfig updates
    powerpc/5200: Add FLASH nodes to lite5200 device tree
    powerpc/device-tree: Document MTD nodes with multiple "reg" tuples
    powerpc/of-device-tree: Factor MTD physmap bindings out of booting-without-of
    powerpc/5200: Bring the legacy fsl_spi_platform_data hooks back

    Linus Torvalds
     
  • Some U-Boot versions incorrectly set the number of chipselects to two
    for Sequoia/Rainier boards while they only have one chipselect hardwired.
    This patch adds a workaround for this, hardcoding the number of chipselects
    to one for sequioa/rainer board models and reading the actual value from
    the memory controller register DDR0_10 otherwise.

    It also fixes another error in the way ibm4xx_denali_fixup_memsize
    calculates memory size. When testing the DDR_REDUC bit, the polarity is
    backwards. A "1" implies 32-bit wide memory while a "0" implies 64-bit
    wide memory.

    Signed-off-by: Mikhail Zolotaryov
    Signed-off-by: Valentine Barshak
    Signed-off-by: Steven A. Falco
    Acked-by: Stefan Roese
    Signed-off-by: Josh Boyer

    Valentine Barshak
     

23 Apr, 2009

2 commits


22 Apr, 2009

12 commits

  • A non-SMP version of smp_send_stop() is now included in smp.h.
    Remove the unneeded definition in the pasemi setup.c.

    Fixes build errors like these when CONFIG_SMP=n:

    arch/powerpc/platforms/pasemi/setup.c:48: error: redefinition of ‘smp_send_stop’
    include/linux/smp.h:125: error: previous definition of 'smp_send_stop' was here

    Reported-by: subrata@linux.vnet.ibm.com
    Signed-off-by: Geoff Levand
    Acked-by: Olof Johansson
    Signed-off-by: Paul Mackerras

    Geoff Levand
     
  • Fix build warnings like these when CONFIG_PS3_FLASH=n:

    arch/powerpc/platforms/ps3/os-area.c: warning: 'update_flash_db' defined but not used

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

    Geoff Levand
     
  • Now that ppc32 implements address randomization it also wants to inherit
    personality flags like ADDR_NO_RANDOMIZE across exec, for things like
    `setarch ppc -R' to work. But the ppc32 version of SET_PERSONALITY
    forcefully sets PER_LINUX, clearing all personality flags. So be
    careful about preserving the flags.

    Signed-off-by: Andreas Schwab
    Signed-off-by: Paul Mackerras

    Andreas Schwab
     
  • early_init_mmu_secondary() is called at CPU hotplug time, so it
    must be marked as __cpuinit, not __init.

    Caused by 757c74d2 ("powerpc/mm: Introduce early_init_mmu() on 64-bit").

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

    Michael Ellerman
     
  • Paul Mackerras
     
  • Signed-off-by: Kumar Gala

    Kumar Gala
     
  • Since the vast majority of 85xx platforms are UP we introduce a new SMP
    config for the few platforms that have more than one core. Beyond
    CONFIG_SMP=y and its dependencies this should be identical to
    mpc85xx_defconfig.

    Signed-off-by: Kumar Gala

    Kumar Gala
     
  • * Add new 85xx boards
    * Added QE/FSL gpio
    * Enabled PHY drivers that exist on various boards
    * Enabled FS_ENET & UCC ethernet drivers (CPM2 & QE)
    * FSL HW Crypto Engine
    * CPM I2C
    * QE Serial

    Signed-off-by: Kumar Gala

    Kumar Gala
     
  • Signed-off-by: Kumar Gala

    Kumar Gala
     
  • Pass clocksource pointer to the read() callback for clocksources. This
    allows us to share the callback between multiple instances.

    [hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods]
    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: Magnus Damm
    Acked-by: John Stultz
    Cc: Thomas Gleixner
    Signed-off-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     
  • The ULI 1575 PCI quirk function for the Freescale MPC8610 HPCD was disabling
    the SATA INTx interrupt, even when SATA support was enabled. This was safe,
    because the SATA driver re-enabled it. But with commit a5bfc471 ("ahci: drop
    intx manipulation on msi enable"), the driver no longer does this, and so SATA
    support on the 8610 HPCD is broken.

    The original quirk function disabled INTx because it caused some other
    interrupt problem during early development on this board, but no one remembers
    any more what that problem was, and it doesn't seem to occur any more.

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

    Timur Tabi
     
  • The driver should pass a device that specifies internal DMA ops, but
    currently NULL pointer is passed, therefore following bug appears
    during boot up:

    ------------[ cut here ]------------
    Kernel BUG at c0018a7c [verbose debug info unavailable]
    Oops: Exception in kernel mode, sig: 5 [#1]
    [...]
    NIP [c0018a7c] fsl_rio_doorbell_init+0x34/0x60
    LR [c0018a70] fsl_rio_doorbell_init+0x28/0x60
    Call Trace:
    [ef82bda0] [c0018a70] fsl_rio_doorbell_init+0x28/0x60 (unreliable)
    [ef82bdc0] [c0019160] fsl_rio_setup+0x6b8/0x84c
    [ef82be20] [c02d28ac] fsl_of_rio_rpn_probe+0x30/0x50
    [ef82be40] [c0234f20] of_platform_device_probe+0x5c/0x84
    [...]
    ---[ end trace 561bb236c800851f ]---

    This patch fixes the issue.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Kumar Gala

    Anton Vorontsov
     

21 Apr, 2009

2 commits


17 Apr, 2009

1 commit


15 Apr, 2009

5 commits

  • * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
    powerpc: pseries/dtl.c should include asm/firmware.h
    powerpc: Fix data-corrupting bug in __futex_atomic_op
    powerpc/pseries: Set error_state to pci_channel_io_normal in eeh_report_reset()
    powerpc: Allow 256kB pages with SHMEM
    powerpc: Document new FSL I2C bindings and cleanup
    powerpc/mm: Fix compile warning
    powerpc/85xx: TQM8548: update defconfig
    powerpc/85xx: TQM8548: use proper phy-handles for enet2 and enet3
    powerpc/85xx: TQM85xx: correct address of LM75 I2C device nodes
    powerpc: Add support for early tlbilx opcode
    powerpc: Fix tlbilx opcode

    Linus Torvalds
     
  • A randconfig build on powerpc failed with:

    dtl.c: In function 'dtl_init':
    dtl.c:238: error: implicit declaration of function 'firmware_has_feature'
    dtl.c:238: error: 'FW_FEATURE_SPLPAR' undeclared (first use in this function)

    - We need firmware.h for these definitions.

    Signed-off-by: Sachin Sant
    Signed-off-by: Jeremy Kerr
    Signed-off-by: Paul Mackerras

    Sachin Sant
     
  • Richard Henderson pointed out that the powerpc __futex_atomic_op has a
    bug: it will write the wrong value if the stwcx. fails and it has to
    retry the lwarx/stwcx. loop, since 'oparg' will have been overwritten
    by the result from the first time around the loop. This happens
    because it uses the same register for 'oparg' (an input) as it uses
    for the result.

    This fixes it by using separate registers for 'oparg' and 'ret'.

    Cc: stable@kernel.org
    Signed-off-by: Paul Mackerras

    Paul Mackerras
     
  • While adding native EEH support to Emulex and Qlogic drivers, it was
    discovered that dev->error_state was set to pci_io_channel_normal too
    late in the recovery process. These drivers rely on error_state to
    determine if they can access the device in their slot_reset callback,
    thus error_state needs to be set to pci_io_channel_normal in
    eeh_report_reset(). Below is a detailed explanation (courtesy of Richard
    Lary) as to why this is necessary.

    Background:
    PCI MMIO or DMA accesses to a frozen slot generate additional EEH
    errors. If the number of additional EEH errors exceeds EEH_MAX_FAILS the
    adapter will be shutdown. To avoid triggering excessive EEH errors and
    an undesirable adapter shutdown, some drivers use the
    pci_channel_offline(dev) wrapper function to return a Boolean value
    based on the value of pci_dev->error_state to determine if PCI MMIO or
    DMA accesses are safe. If the wrapper returns TRUE, drivers must not
    make PCI MMIO or DMA access to their hardware.

    The pci_dev structure member error_state reflects one of three values,
    1) pci_channel_io_normal, 2) pci_channel_io_frozen, 3)
    pci_channel_io_perm_failure. Function pci_channel_offline(dev) returns
    TRUE if error_state is pci_channel_io_frozen or pci_channel_io_perm_failure.

    The EEH driver sets pci_dev->error_state to pci_channel_io_frozen at the
    point where the PCI slot is frozen. Currently, the EEH driver restores
    dev->error_state to pci_channel_io_normal in eeh_report_resume() before
    calling the driver's resume callback. However, when the EEH driver calls
    the driver's slot_reset callback() from eeh_report_reset(), it
    incorrectly indicates the error state is still pci_channel_io_frozen.

    Waiting until eeh_report_resume() to restore dev->error_state to
    pci_channel_io_normal is too late for Emulex and QLogic FC drivers and
    any other drivers which are designed to use common code paths in these
    two cases: i) those called after the driver's slot_reset callback() and
    ii) those called after the PCI slot is frozen but before the driver's
    slot_reset callback is called. Case i) all driver paths executed to
    reinitialize the hardware after a reset and case ii) all code paths
    executed by driver kernel threads that run asynchronous to the main
    driver thread, such as interrupt handlers and worker threads to process
    driver work queues.

    Emulex and QLogic FC drivers are designed with common code paths which
    require that pci_channel_offline(dev) reflect the true state of the
    hardware. The state transitions that the hardware takes from Normal
    Operations to Slot Frozen to Reset to Normal Operations are documented
    in the Power Architecture™ Platform Requirements+ (PAPR+) in Table 75.
    PE State Control.

    PAPR defines the following 3 states:

    0 -- Not reset, Not EEH stopped, MMIO load/store allowed, DMA allowed
    (Normal Operations)
    1 -- Reset, Not EEH stopped, MMIO load/store disabled, DMA disabled
    2 -- Not reset, EEH stopped, MMIO load/store disabled, DMA disabled
    (Slot Frozen)

    An EEH error places the slot in state 2 (Frozen) and the adapter driver
    is notified that an EEH error was detected. If the adapter driver
    returns PCI_ERS_RESULT_NEED_RESET, the EEH driver calls
    eeh_reset_device() to place the slot into state 1 (Reset) and
    eeh_reset_device completes by placing the slot into State 0 (Normal
    Operations). Upon return from eeh_reset_device(), the EEH driver calls
    eeh_report_reset, which then calls the adapter's slot_reset callback. At
    the time the adapter's slot_reset callback is called, the true state of
    the hardware is Normal Operations and should be accurately reflected by
    setting dev->error_state to pci_channel_io_normal.

    The current implementation of EEH driver does not do so and requires
    this change to correct this deficiency.

    Signed-off-by: Mike Mason
    Acked-by: Linas Vepstas
    Signed-off-by: Paul Mackerras

    Mike Mason
     
  • Now that shmem's divisions by zero and SHMEM_MAX_BYTES are fixed,
    let powerpc 256kB pages coexist with CONFIG_SHMEM again.

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

    Hugh Dickins
     

14 Apr, 2009

1 commit

  • In commit 51dcdfec6a274afc1c6fce180d582add9ff512c0 ("parport: Use the
    PCI IRQ if offered") parport_pc_probe_port() gained an irqflags arg.
    This isn't being supplied on powerpc. This patch make powerpc fallback
    to the old behaviour, that is using "0" for irqflags.

    Fixes build failure:

    In file included from drivers/parport/parport_pc.c:68:
    arch/powerpc/include/asm/parport.h: In function 'parport_pc_find_nonpci_ports':
    arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
    arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
    arch/powerpc/include/asm/parport.h:32: error: too few arguments to function 'parport_pc_probe_port'
    make[3]: *** [drivers/parport/parport_pc.o] Error 1

    Signed-off-by: Tony Breeds
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Tony Breeds