1
0
Fork 0
Commit Graph

951 Commits (164a460d467a43e9f403cd4b76cec626dff99779)

Author SHA1 Message Date
Geert Uytterhoeven fbdb3e5be3 [PATCH] ps3: Preallocate bootmem memory for ps3fb
Preallocate bootmem memory for the PS3 frame buffer device, which needs a
large block of physically-contiguous memory. The size of this memory block is
configurable:
  - The config option CONFIG_FB_PS3_DEFAULT_SIZE_M allows to specify the
    default amount of memory (in MiB) allocated to the virtual frame buffer.
  - The early boot parameter `ps3fb=xxx' allows to override the default value.
    It will be rounded up to a multiple of 1 MiB, if needed.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:44 -08:00
Geert Uytterhoeven 11227fd192 [PATCH] ps3: AV Settings Driver
Add the PS3 AV Settings Driver.

The AV Settings driver is used to control Audio and Video settings.  It
communicates with the policy manager through the virtual uart.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:44 -08:00
Alon Bar-Lev b8757b21f7 [PATCH] Dynamic kernel command-line: powerpc
Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-12 09:48:38 -08:00
Alexey Dobriyan b653d081c1 [PATCH] proc: remove useless (and buggy) ->nlink settings
Bug: pnx8550 code creates directory but resets ->nlink to 1.

create_proc_entry() et al will correctly set ->nlink for you.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Corey Minyard <minyard@acm.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Greg KH <greg@kroah.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:32 -08:00
Kumar Gala 8f68abbfd9 Merge branch '85xx' into for_paulus 2007-02-09 11:42:11 -06:00
Guennadi Liakhovetski 8500adc79b [POWERPC] Update to linkstation / kurobox support
Linkstation systems capable of running mainline kernels use u-boot as a
bootloader, so, specifying a suitable kernel command is not a problem.
Don't guess. Also extend linkstation_defconfig to support the linkstation HS
model with a IT8212 IDE controller and kuroboxHD/HD-HLAN linkstation
models with a tulip ethernet chip. The latter also require a slightly
different .dts file, which is also included with this patch.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-09 11:41:18 -06:00
Kumar Gala 49baa91d68 [POWERPC] 83xx: Updated and renamed MPC834x SYS to MPC834x MDS
The MPC834x SYS board has always been called the MPC834x MDS since its public
release.  Removed all references to SYS and replaced with MDS.  Additionally
renamed the .dts to match the defconfig (mpc834x_mds*).

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-09 11:39:46 -06:00
Al Viro f1fda89522 [PATCH] powerpc: celleb trivial endianness and iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:14:08 -08:00
Al Viro 9340b0d356 [PATCH] arch/powerpc trivial annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:14:06 -08:00
Al Viro 9288f5c3f1 [PATCH] ps3: missing exports
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 08:28:48 -08:00
Kumar Gala 27630bec94 [POWERPC] 85xx: Marked functions static
Marked a number of functions in 85xx board code as static.  Also, some minor
whitespace cleanup

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-09 09:30:45 -06:00
Kumar Gala 135637aa78 Merge branch 'master' into 83xx 2007-02-08 00:41:56 -06:00
Li Yang c161698287 [POWERPC] 83xx: Add USB setup code for MPC8349E MDS-PB
Add board specific initialization code for USB to work in both MPH and DR
mode for MPC8349E MDS-PB board.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-08 00:40:56 -06:00
Kim Phillips b359049f27 [POWERPC] 83xx: Add base support for the MPC8313E RDB
Add support for the MPC8313E Reference Development Board (RDB).  The board
is a mini-ITX reference board with 128M DDR2, 8M flash, 32M NAND, USB, PCI,
gigabit ethernet, and serial.

Signed-off-by: Wilson Lo <Wilson.Lo@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-07 23:44:05 -06:00
Grant Likely f42963f864 [POWERPC] Add mpc52xx/lite5200 PCI support
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-08 15:29:22 +11:00
Paul Mackerras 12e86f92fc [POWERPC] Only use H_BULK_REMOVE if the firmware supports it
The previous patch changing pSeries to use H_BULK_REMOVE broke the
JS20 blade, where the firmware doesn't support H_BULK_REMOVE.  This
adds a firmware check so that on machines that don't have H_BULK_REMOVE,
we just use the H_REMOVE call as before.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-08 15:02:35 +11:00
Paul Mackerras f03e64f2ca [POWERPC] Make pSeries use the H_BULK_REMOVE hypervisor call
H_BULK_REMOVE lets us remove 4 entries from the MMU hash table with one
hypervisor call.  This uses it in pSeries_lpar_hpte_invalidate so we
can tear down mappings with fewer hypervisor calls.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:23 +11:00
Nathan Lynch 4297c9869b [POWERPC] Maple: use mmio nvram
Some systems supported by the maple platform (e.g. JS2x blades running
SLOF) are able to use the mmio_nvram backend for reading and writing
nvram.  This is an improvement over the current situation -- no nvram
access from userspace at all.

Select MMIO_NVRAM for the maple platform.

Initialize the mmio_nvram backend from maple setup code.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:23 +11:00
Olof Johansson 31c56d820e [POWERPC] pasemi: iommu support
I/O TLB support for PA6T-1682M.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:22 +11:00
Olof Johansson f9fba5b72d [POWERPC] pasemi: Configure DMA controller interrupts
The DMA controller on PWRficient is somewhat special -- has a PCI header
so it looks like it's on the root PCI (-Express) root bus, but it uses
more than the default number of interrupts (and they are hardwired).

We need to wire up all interrupts for the DMA controller. The generic
IRQ code will only map the primary interrupt from the PCI header (128),
so add 129->211 by hand.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:22 +11:00
Olof Johansson c388cfebbf [POWERPC] pasemi: SMP timebase sync
Timebase update is simple on PA6T, since global updates can be done from
one core by writing to an SPR.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:22 +11:00
Olof Johansson f620be99e9 [POWERPC] pasemi: Implement restart
Implement reset on platforms/pasemi. Default is just to reset the
cpu using the SDC registers.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:22 +11:00
Olof Johansson 1199919b69 [POWERPC] pasemi: Idle loops
Powersave support on PA6T. Right now it only uses 'doze' mode, and
will default to no savings (spin).

Signed-off-by: Olof Johansson <olof@lixom.net>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:22 +11:00
Olof Johansson bfed9d32d9 [POWERPC] pasemi: Machine check handler
Print out decoded machine check information on PA6T.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:22 +11:00
Ishizaki Kou c347b7989e [POWERPC] Celleb: basic support
This patch adds base support for Celleb platform.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ishizaki Kou e107931956 [POWERPC] Celleb: support spu priv1 ops
SPU support routines for Celleb platform.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ishizaki Kou c9868fe0e0 [POWERPC] Celleb: consolidate spu management ops
Spu management ops in arch/platforms/cell/spu_priv1_mmio.h can be used
commonly in of based platform. This patch separates spu management ops
from native cell code and uses on celleb platform.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ishizaki Kou d7480a9fea [POWERPC] Celleb: support udbg
This patch adds udbg support for Celleb platform.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ishizaki Kou fe4a0cf1c2 [POWERPC] Celleb: htab routines
Adds htab routines for Celleb platform.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ishizaki Kou 97a9b58409 [POWERPC] Celleb: support iommu
This patch creates Celleb platform dependent file to support iommu.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ishizaki Kou 7163c7c9d2 [POWERPC] Celleb: setup usb host controller in SCC
USB host controller in SCC requires enable sequence. It should be done
before USB host drivers start.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ishizaki Kou 32f39b055f [POWERPC] Celleb: support interrupts
This patch creates Celleb platform dependent files to support interrupts.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Ishizaki Kou b8a590c496 [POWERPC] Celleb: interfaces to the hypervisor
This patch creates Celleb platform dependent files which add
interfaces to call hypervisor.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:21 +11:00
Jiri Kosina c23ef29c1e [POWERPC] powermac: local_irq_disable() is redundant after local_irq_save()
arch/powerpc/platforms/powermac/smp.c::smp_core99_kick_cpu() contains
local_irq_disable() call after local_irq_save(). This looks
redundant.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:20 +11:00
Jiri Kosina f79ce995d0 [POWERPC] 86xx: local_irq_disable() is redundant after local_irq_save()
arch/powerpc/platforms/86xx/mpc86xx_smp.c::smp_86xx_kick_cpu() contains
local_irq_disable() call after local_irq_save(). This looks
redundant.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:20 +11:00
Vitaly Bordug 5427828e83 [POWERPC] Fix kernel build errors for mpc8272ads and mpc8560ads
Recent update of asm-powerpc/io.h caused cpm-related stuff to break in the
current kernel. Current patch fixes it, as well as other inconsistencies
expressed, that do not permit targets from working properly:

- Updated dts with a chosen node with interrupt controller,
- fixed messed device IDs among CPM2 SoC devices,
- corrected odd header name and fixed type in defines,
- Added 82xx subdir to the powerpc/platforms Makefile, missed during
  initial commit,
- new solely-powerpc header file for 8260 family (was using one from
  arch/ppc, this one cleaned up from the extra stuff), in fact for now
  a placeholder to get the board-specific includes for stuff not yet
  capable to live with devicetree peeks only
- Fixed couple of misprints in reference mpc8272 dts.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:20 +11:00
Geoff Levand 35063bb2ea [POWERPC] PS3: Fix DMA scatter-gather
Add the missing pieces to support DMA scatter-gather on the PS3 system bus.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:20 +11:00
Geoff Levand 2a08ea69a3 [POWERPC] PS3: Move system bus to platform directory
Move the PS3 system bus routines from drivers/ps3 to
arch/powerpc/platforms/ps3.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:19 +11:00
Olof Johansson 7df2457db8 [POWERPC] MPIC: support more than 256 sources
Allow more than the default 256 MPIC sources. Allocates a new flag
(MPIC_LARGE_VECTORS) to be used by platform code when instantiating
the mpic.

I picked 11 bits worth right now since it would cover the number of
sources on any hardware I have seen. It can always be increased later
if needed.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:19 +11:00
Geert Uytterhoeven 098e274427 [POWERPC] ps3: get av_multi_out params
Allow the PS3 AV settings driver to access the default video mode stored in
the OS area.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geoff Levand 66b44954f8 [POWERPC] ps3: get firmware version
Add a new routine ps3_get_firmware_version() and use it to output the firmware
version to dmesg.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geoff Levand 73d976b339 [POWERPC] ps3: remove cpuinfo
Remove the unneded routine ps3_show_cpuinfo().  The common platform code now
prints the same information.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geoff Levand 577157659f [POWERPC] ps3: fix interrupt bmp
Add a comment and a preprocessor macro to help clearify the alignment
needs of the PS3 interrupt bitmap.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geert Uytterhoeven b1eeb38e45 [POWERPC] ps3: add interrupt alloc for outlets
PS3 interrupt core update:
  - Add ps3_alloc_irq() and ps3_free_irq(), to allocate a virtual interrupt
    number for an interrupt outlet, which is needed by the PS3 GPU frame
    buffer device and audio drivers

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geoff Levand 861be32ce7 [POWERPC] ps3: bind interrupt to cpu
Change the PS3 irq allocation routines to take an argument indicating which
cpu (processor thread) the interrupt should be serviced on.

The current system configuration favors device interrupts that are serviced
on cpu0, so that is used as the default.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Benjamin Herrenschmidt 9cf9e19667 [POWERPC] ps3: cleanup interrupt bmp routines
Change the PS3 interrupt bitmask routines to be lockless.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geoff Levand 407e24a0c7 [POWERPC] ps3: smp interrupt fixes
PS3 fixups for interrups on SMP.

Fixes the alignment of the interrupt status bitmap, changes the hypervisor
interrupt calls to the '_ext' versions that take an explicit processor
thread ID.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geoff Levand 9633ac8d17 [POWERPC] ps3: rename interrupt symbols
Rename some PS3 interrupt symbols to avoid name clashes and aid debugging.
No change to code.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geoff Levand a8229a9e52 [POWERPC] ps3: fix struct alignment attributes
Remove incorrect alignment attributes in PS3 platform code for
struct spe_shadow, struct os_area_header, and struct os_area_params.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:18 +11:00
Geert Uytterhoeven 6c7be7d385 [POWERPC] ps3: repository storage support
Handle storage-related repository data:
  - Add missing implementations of ps3_repository_read_stor_*() repository
    accessors.
  - Dump storage properties in debug mode
  - Add PS3_DEV_TYPE_STOR_{DISK,ROM,FLASH} device types (which are identical to
    the corresponding SCSI device types) to enum ps3_dev_type

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:17 +11:00
Geoff Levand eebb81c13a [POWERPC] ps3: repository misc fixes
Various fixes for the PS3 repository code:

  - Sync signatures of function prototypes and implementations (enum vs.
    unsigned int)
  - Correct references to `regions' as `registers':
      o Correct enum ps3_region_type as enum ps3_reg_type,
      o Correct PS3_REGION_TYPE_* as PS3_REG_TYPE_*,
      o Correct ps3_repository_find_region() as ps3_repository_find_reg().
  - Correct function name in pr_debug() call
  - Minor error condition improvements.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:17 +11:00
Linas Vepstas 25c4a46f0e [POWERPC] pSeries: EEH improperly enabled for some Power4 systems
It appears that EEH is improperly enabled for some Power4 systems.
On these systems, the ibm,set-eeh-option returns a value of success
even when EEH is not supported on the given node. Thus, an explicit
check for support is required.

During boot, on power4, without this patch, one sees messages
similar to:

EEH: event on unsupported device, rc=0 dn=/pci@400000000110/IBM,sp@1
EEH: event on unsupported device, rc=0 dn=/pci@400000000110/pci@2
EEH: event on unsupported device, rc=0 dn=/pci@400000000110/pci@2,2
etc.

The patch makes these go away.

Without this patch, EEH recovery does seem to work correctly for
at least some devices (I tested ethernet e1000), but fails to
recover others (the Emulex LightPulse LPFC, most notably).
Off the top of my head, I don't remember why some devices are
affected, but not others.

The PAPR indicates that the correct way to test for EEH is as
done in this patch; its not clear to me if this was in the PAPR
all along, or recently added; if it was there all along, its not
clear to me why this hadn't been fixed long ago. I suspect only
certain firmware levels are affected.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:17 +11:00
Nathan Lynch 59eaef9dae [POWERPC] Maple: don't override bus-range supplied by firmware
This workaround was copy-pasted from the powermac code.  It's not
necessary for maple.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:17 +11:00
Vitaly Bordug 29f1530f19 [POWERPC] Add mpc866ads board-specific bits to arch/powerpc
This add support of the Freescale mpc86xads reference board to
arch/powerpc. Supported SMC1 and SMC2 (UART and serial console), FEC
100Mbps Ethernet, SCC1 Ethernet (10Mbps hdx)

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:17 +11:00
Vitaly Bordug df34403dca [POWERPC] 8xx: Add mpc885ads support and common mpc8xx files
This adds the core 8xx stuff and specifically mpc885ads board-specific
bits to arch/powerpc. Respective Kconfig has been cleaned up from the stuff
not yet ported over to avoid confusion. Updated and cleaned version.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-07 14:03:17 +11:00
Li Yang 3b6eb6af5f [POWERPC] 83xx: Fix compiler warnings on 836x and 832x
Some prototypes are separated from of_device.h into of_platform.h.  Add
the new include to fix warning.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-30 00:36:57 -06:00
Kumar Gala e60bd7f14d [POWERPC] 83xx: Make platform *_init_IRQ() static
Make the various 83xx *_init_IRQ() functions static

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-26 00:41:57 -06:00
Kumar Gala c75f902b93 [POWERPC] 83xx: Don't call ioremap in the reset function
It's possibly that we get an reset requestion when interrupts are disabled.
(For example an oops in an interrupt handler).  Therefor, we can't call
ioremap in the reset function.  Moving the ioremap of the registers we
need access to an arch_initcall helps the problem.

However we still have a window between boot and the arch_initcall in
which the register pointer will not be setup and thus we spin if the reset
function is called.  If one needs to ensure even this case is covered, look
at use of the watchdog provided on 83xx to reset the processor.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-01-26 00:37:11 -06:00
Ishizaki Kou 8b629a1f01 [POWERPC] Celleb: setup sio in SCC
This patch setup serial interfaces in SCC to work with serial_txx9
driver.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:36:02 +11:00
Ishizaki Kou 551a3d8785 [POWERPC] Celleb: Support PCI bus and base of I/O
This patch includes support for pci buses, base of Celleb specific
devices, and etc. It works on of_platform bus.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:35:45 +11:00
Ishizaki Kou 983e3f6027 [POWERPC] Celleb: Cell SCC definitions
Adds Cell SCC(Super Companion Chip) definitions.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:35:32 +11:00
Ishizaki Kou ca58b8eb93 [POWERPC] Celleb: hypervisor call numbers
This patch creates Celleb platform dependent file to define Beat
hypervisor call numbers.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:13:59 +11:00
Ishizaki Kou 3650cfe2e5 [POWERPC] spufs: Add SPU register lock
spu->register_lock should be held before accessing registers.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:13:59 +11:00
Adrian Bunk c53653130f [POWERPC] Remove the broken Gemini support
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:13:58 +11:00
Paul Gortmaker 0e47e3cca1 [POWERPC] Select DEFAULT_UIMAGE for HPC-NET/8641
I suspect this was meant to be added like it was to a whole slew of
other u-boot based boards, but probably just fell through the cracks.

Add "select DEFAULT_UIMAGE" for the 8641/HPC-NET.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:13:58 +11:00
Olaf Hering 0bcace3b8b [POWERPC] Update fixup_winbond_82c105 comment
Note all POWER3/POWER4 systems where fixup_winbond_82c105 will run.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:13:58 +11:00
Nathan Lynch f1f003330b [POWERPC] maple: improve CPC9x5 host bridge detection
Identify CPC9x5 PCI Express, AGP, and HT host bridges using
device_type and compatible properties, which is a more flexible method
than using the name property (which can differ between firmwares and
models).

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:13:58 +11:00
Linas Vepstas a885902de3 [POWERPC] Clarify EEH error message
Clarify error message re EEH permanent failure.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:13:56 +11:00
Geert Uytterhoeven ded84bcb24 [POWERPC] ps3_free_io_irq: Fix inverted error check
ps3_free_io_irq: Fix inverted error check after calling
lv1_destruct_io_irq_outlet().

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:08:14 +11:00
Geert Uytterhoeven 63ea9c1710 [POWERPC] PS3: Fix uniprocessor kernel build
Allow to build a uniprocessor kernel for PS3.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-24 21:08:13 +11:00
Li Yang 06cd939677 [POWERPC] Fix OF node refcnt underflow in 836x and 832x platform code
Incorrect use of of_find_node_by_name() causes of_node_put()
on a node which has already been put.  It causes the refcount of
the node to underflow, which triggers the WARN_ON in kref_get
for 836x and 832x.  This fixes it.

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-22 21:27:35 +11:00
Linas Vepstas 77319254f1 [POWERPC] Fix broken DMA on non-LPAR pSeries
It appears that the iommu table address is never stored, and thus
never found, on non-lpar systems. Thus, for example, during boot:

<7>[   93.067916] PCI: Scanning bus 0001:41
<7>[   93.068542] PCI: Found 0001:41:01.0 [8086/100f] 000200 00
<7>[   93.068550] PCI: Calling quirk c0000000007822e0 for 0001:41:01.0
<7>[   93.069815] PCI: Fixups for bus 0001:41
<4>[   93.070167] iommu: Device 0001:41:01.0 has no iommu table
<7>[   93.070251] PCI: Bus scan for 0001:41 returning with max=41

No iommu table? How can that be? Well, circa line 471 of
arch/powerpc/platforms/pseries/iommu.c we see the code:

   while (dn && PCI_DN(dn) && PCI_DN(dn)->iommu_table == NULL)
      dn = dn->parent;

and a few lines later is the surprising print statement about
the missing table.  Seems that this loop ran unto the end, never
once finding a non-null PCI_DN(dn)->iommu_table.

The problem can be found a few lines earlier: it sems that the
value of PCI_DN(dn)->iommu_table is never ever set. Thus, the
patch sets it.

The patch was tested on a Power4 system running in full system
partition mode, which is where I saw the problem. It works; I've
not done any wider testing. Had a brief discussion on this on irc.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-22 21:27:35 +11:00
Anton Blanchard dc40127ca5 [POWERPC] Fix bugs in the hypervisor call stats code
There were a few issues with the HCALL_STATS code:

- PURR cpu feature checks were backwards
- We iterated one entry off the end of the hcall_stats array
- Remove dead update_hcall_stats() function prototype

I noticed one thing while debugging, and that is we call H_ENTER (to set
up the MMU hashtable in early init) before we have done the cpu fixups.
This means we will execute the PURR SPR reads even on a CPU that isnt
capable of it. I wonder if we can move the CPU feature fixups earlier.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:03 +11:00
Anton Blanchard ab87e8dc88 [POWERPC] Fix corruption in hcall9
It looks to me like we are corrupting r12 in the hcall9 function.
Although we have r0 free we cant use offsets against it, so save
away r12 in there instead.  r12 holds the ninth return value from
the hypervisor call, so without this fix, the caller will see the
wrong value for the ninth element in the array that gets the return
values.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:03 +11:00
Stephen Rothwell e75b171768 [POWERPC] iSeries: fix setup initcall
Clearing the progress indicator should only be done if we are running
on legacy iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:03 +11:00
Stephen Rothwell e9966ff850 [POWERPC] iSeries: fix viopath initialisation
/proc/iSeries/config should only be created if we are running on legacy
iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:03 +11:00
Stephen Rothwell 13d2c9bbb0 [POWERPC] iSeries: fix lpevents initialisation
/proc/iSeries/lpevents should only be created if we are running
on legacy iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:03 +11:00
Stephen Rothwell 8404e65430 [POWERPC] iSeries: fix proc/iSeries initialisation
These proc files should only be created if we are running on legacy
iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:03 +11:00
Stephen Rothwell d9523aa157 [POWERPC] iSeries: fix mf proc initialisation
This proc file should only be created if we are running on legacy
iSeries.  Since we can now run the same kernel on legacy iSeries and
other machines, we currently get the /proc/iSeries directory and the
files in it on non-iSeries machines, and accessing them causes an oops
in some cases.  This and the following patches make sure that these
files are not created on non-iSeries machines, thus avoiding the oops.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:03 +11:00
Sylvain Munaut 5c334eed6e [POWERPC] 52xx: Don't use device_initcall to probe of_platform_bus
Using device_initcall makes it happen for every platform that
compiles this file in. This is really bad, for obvious reasons.

Instead, we use the .init field of the machine description. If
the platform needs the hook to do something specific it can provides
its own function and call mpc52xx_declare_of_platform_devices from
there. If not, the mpc52xx_declare_of_platform_devices function can
directly be used as the init hook.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:02 +11:00
Michal Ostrowski 673aeb76d0 [POWERPC] Avoid calling get_irq_server() with a real, not virtual irq.
We can use default_server when masking an interrupt vector.
get_irq_server() assumes a virtual irq, so badness may happen if we
give it a real one.

Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:01 +11:00
Nathan Lynch 5e264a5215 [POWERPC] Fix unbalanced uses of of_node_put
The (maple|pasemi)_init_IRQ functions call of_node_put(root) once more
than they should, causing the refcount of the root node to underflow,
which triggers the WARN_ON in kref_get.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-01-09 17:03:01 +11:00
David Woodhouse 3f245e2a1e [POWERPC] Probe Efika platform before CHRP.
The Efika matches chrp_probe() too, so put its own probe first to make
sure we get it right in a multiplatform build.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-20 16:37:48 +11:00
Stephen Rothwell ba3ba887c3 [POWERPC] iSeries: fix CONFIG_VIOPATH dependency
This is a long standing typo.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-20 16:37:48 +11:00
Arnd Bergmann ccb4911598 [POWERPC] spufs: fix assignment of node numbers
The difference between 'nid' and 'node' fields in an
spu structure was used incorrectly. The common 'node'
number now reflects the NUMA node, and it is used
in other places in the code as well.

The 'nid' value is meaningful only in one place, namely
the computation of the interrupt numbers based on the
physical location of an spu.  Consequently, we look it
up directly in the place where it is used now.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-19 15:35:39 +01:00
Benjamin Herrenschmidt 6e22ba63f0 [POWERPC] cell: Fix spufs with "new style" device-tree
Some SPU code was a bit too convoluted and broke when adding support for
the new style device-tree, most notably the struct pages for SPEs no
longer get created. oops...

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-19 15:35:38 +01:00
Jens Osterkamp a24e57be9b [POWERPC] cell: Enable spider workarounds on all PCI buses
Don't limit spider I/O workarounds to the first two buses.
The IBM Cell blade has three of them (one PCI, two PCIe)
and we want to handle them all.

Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-19 15:35:37 +01:00
Robert P. J. Day 5cbded585d [PATCH] getting rid of all casts of k[cmz]alloc() calls
Run this:

	#!/bin/sh
	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
	  echo "De-casting $f..."
	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
	done

And then go through and reinstate those cases where code is casting pointers
to non-pointers.

And then drop a few hunks which conflicted with outstanding work.

Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:58 -08:00
Robert P. J. Day bef1f40261 kconfig: Standardize "depends" -> "depends on" in Kconfig files
Standardize the miniscule percentage of occurrences of "depends" in
Kconfig files to "depends on", and update kconfig-language.txt to
reflect that.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-12-12 20:04:19 +01:00
Linus Torvalds 13d7d84e07 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (36 commits)
  [POWERPC] Generic BUG for powerpc
  [PPC] Fix compile failure do to introduction of PHY_POLL
  [POWERPC] Only export __mtdcr/__mfdcr if CONFIG_PPC_DCR is set
  [POWERPC] Remove old dcr.S
  [POWERPC] Fix SPU coredump code for max_fdset removal
  [POWERPC] Fix irq routing on some 32-bit PowerMacs
  [POWERPC] ps3: Add vuart support
  [POWERPC] Support ibm,dynamic-reconfiguration-memory nodes
  [POWERPC] dont allow pSeries_probe to succeed without initialising MMU
  [POWERPC] micro optimise pSeries_probe
  [POWERPC] Add SPURR SPR to sysfs
  [POWERPC] Add DSCR SPR to sysfs
  [POWERPC] Fix 440SPe CPU table entry
  [POWERPC] Add support for FP emulation for the e300c2 core
  [POWERPC] of_device_register: propagate device_create_file return code
  [POWERPC] Fix mmap of PCI resource with hack for X
  [POWERPC] iSeries: head_64.o needs to depend on lparmap.s
  [POWERPC] cbe_thermal: Fix initialization of sysfs attribute_group
  [POWERPC] Remove QE header files from lite5200.c
  [POWERPC] of_platform_make_bus_id(): make `magic' int
  ...
2006-12-11 18:24:58 -08:00
Paul Mackerras 39f44be375 [POWERPC] Fix SPU coredump code for max_fdset removal
Commit bbea9f6966 removed the max_fdset
element of struct fdtable.  It appears that checking max_fds is
sufficient now.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-11 15:13:37 +11:00
Geoff Levand 74e95d5de9 [POWERPC] ps3: Add vuart support
Adds support for the PS3 virtual UART (vuart).  The vuart provides a
bi-directional byte stream data link between logical partitions.

This is needed for the ps3 graphics driver and the ps3 power
control support to be able to communicate with the lv1 policy
module.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-11 13:49:53 +11:00
Anton Blanchard a223535425 [POWERPC] dont allow pSeries_probe to succeed without initialising MMU
pSeries_probe can decide that we are a pseries but then fail to
initialise the MMU. If an rtas node doesnt exist, we continually fall
out of pSeries_probe_hypertas early and never get to the MMU init code.

While pseries without RTAS is an illegal combination, the way we
currently fail is a pain to track down, and can happen if your flattened
device tree code has issues (like mine did :).

With the following patch we init the MMU, come up and print some
warnings about RTAS not existing, instead of looping on 0x400 exceptions.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-09 11:39:06 +11:00
Anton Blanchard 5773bbcdec [POWERPC] micro optimise pSeries_probe
We find the OF root the line before, we may as well use it.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-09 11:39:06 +11:00
Josef Sipek b4d1ab58c0 [PATCH] struct path: convert powerpc
Signed-off-by: Josef Sipek <jsipek@fsl.cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:48 -08:00
Christian Krafft 22b6e59047 [POWERPC] cbe_thermal: Fix initialization of sysfs attribute_group
This patch adds NULL to the initialization of the attribute_groups.
The spu_attributes and ppe_attributes arrays are arrays of pointers
that need to be terminated with a NULL entry.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 17:21:02 +11:00
Timur Tabi 18414ec0b5 [POWERPC] Remove QE header files from lite5200.c
The MPC 5200 does not have a QUICCEngine (QE), so lite5200.c should not
include the QE header files.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 17:10:23 +11:00
Nathan Lynch 9e254c45fb [POWERPC] maple: Use RTAS for reboot and halt
On maple, use the RTAS "system-reboot" and "power-off" methods if they
are available.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 17:10:22 +11:00
Nathan Lynch 17877116c6 [POWERPC] maple: Match "pcie" name for CPC945
Some firmwares have "pcie" for the "name" property of the CPC945 PCI
Express host bridge.  Check for "pcie" in addition to "pci" so we
don't miss it.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 17:10:22 +11:00
Linas Vepstas d0e70341c0 [POWERPC] EEH recovery tweaks
If one attempts to create a device driver recovery sequence that
does not depend on a hard reset of the device, but simply just
attempts to resume processing, then one discovers that the
recovery sequence implemented on powerpc is not quite right.
This patch fixes this up.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 17:10:18 +11:00
Michael Ellerman 06ba30b6bf [POWERPC] Cleanup pass over platforms/pseries/hotplug-cpu.c
Purely cosmetic.  Change pSeries to pseries inline with other parts of the
kernel, and fix an overly long line.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 15:55:55 +11:00
Michael Ellerman 674fa677c0 [POWERPC] Only enable cpu hotplug via RTAS if the required firmware support is found
To support cpu hotplug on pseries we require two RTAS tokens.  The cpu
hotplug machinery should only be wired up if these tokens are found in
the device tree.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 15:55:55 +11:00
Michael Ellerman 413f7c405a [POWERPC] Move the rest of the hotplug cpu code into platforms/pseries/hotplug-cpu.c
Move the rest of the hotplug cpu code from platforms/pseries/smp.c into
platforms/pseries/hotplug-cpu.c.

Wire up the smp_ops callbacks and the notifier in the hotplug cpu initcall,
rather than in smp_init_pseries().  No change in behaviour.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 15:55:55 +11:00
Michael Ellerman 04da6af960 [POWERPC] Move pSeries_mach_cpu_die() into platforms/pseries/hotplug-cpu.c
Move pSeries_mach_cpu_die() into platforms/pseries/hotplug-cpu.c,
this allows rtas_stop_self() to be static so remove the prototype.

Wire up pSeries_mach_cpu_die() in the initcall, rather than statically
in setup.c, the initcall will still run prior to the cpu hotplug code
being callable, so there should be no change in behaviour.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 15:55:55 +11:00
Michael Ellerman 0332c2d447 [POWERPC] Move rtas_stop_self() into platforms/pseries/hotplug-cpu.c
As the first step in consolidating the pseries hotplug cpu code,
create platforms/pseries/hotplug-cpu.c and move rtas_stop_self()
into it.  Do the rtas token initialisation in a new initcall, rather
than rtas_initialize().

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 15:55:54 +11:00
Stephen Rothwell a081e126e1 [POWERPC] Fix cell pmu initialisation
Make sure that the pmu is not initialised unless we are running on a cell.
Also make the init routine static.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-08 15:55:54 +11:00
Christoph Lameter e18b890bb0 [PATCH] slab: remove kmem_cache_t
Replace all uses of kmem_cache_t with struct kmem_cache.

The patch was generated using the following script:

	#!/bin/sh
	#
	# Replace one string by another in all the kernel sources.
	#

	set -e

	for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
		quilt add $file
		sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
		mv /tmp/$$ $file
		quilt refresh
	done

The script was run like this

	sh replace kmem_cache_t "struct kmem_cache"

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:25 -08:00
Christoph Lameter e94b176609 [PATCH] slab: remove SLAB_KERNEL
SLAB_KERNEL is an alias of GFP_KERNEL.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:24 -08:00
David Howells 6d5aefb8ea WorkQueue: Fix up arch-specific work items where possible
Fix up arch-specific work items where possible to use the new work_struct and
delayed_work structs.

Three places that enqueue bits of their stack and then return have been marked
with #error as this is not permitted.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 19:36:26 +00:00
David Howells 9db7372445 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/ata/libata-scsi.c
	include/linux/libata.h

Futher merge of Linus's head and compilation fixups.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 17:01:28 +00:00
David Howells 4c1ac1b491 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/infiniband/core/iwcm.c
	drivers/net/chelsio/cxgb2.c
	drivers/net/wireless/bcm43xx/bcm43xx_main.c
	drivers/net/wireless/prism54/islpci_eth.c
	drivers/usb/core/hub.h
	drivers/usb/input/hid-core.c
	net/core/netpoll.c

Fix up merge failures with Linus's head and fix new compilation failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 14:37:56 +00:00
Grant Likely d8594d6391 [POWERPC] Add missing EXPORTS for mpc52xx support
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-05 11:34:37 +11:00
Yan Burman f8485350c2 [POWERPC] Replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc.

Signed-off-by: Yan Burman <burman.yan@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:42:09 +11:00
Guennadi Liakhovetski 04d76b937b [POWERPC] Linkstation / kurobox support
Support for the Kurobox(HG)/LinkStation-I NAS systems by Buffalo
Technology, should be also applicable to the PPC TeraStation family.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:42:08 +11:00
Stephen Rothwell 4eab0e65bd [POWERPC] iSeries: stop dt_mod.o being rebuilt unnecessarily
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:42:01 +11:00
Stephen Rothwell 0470466dba [POWERPC] Fix cputable.h for combined build
Remove CPU_FTR_16M_PAGE from the cupfeatures mask at runtime on iSeries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:59 +11:00
Grant Likely 6b64253139 [POWERPC] Add lite5200 board support to arch/powerpc
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:44 +11:00
Grant Likely 6065170cf7 [POWERPC] Add common routines for 52xx support in arch/powerpc
Adds utility routines used by 52xx device drivers and board support
code.  Main functionality is to add device nodes to the of_platform_bus,
retrieve the IPB bus frequency, and find+ioremap device registers.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:42 +11:00
Sylvain Munaut e65fdfd6ca [POWERPC] Separate IRQ config / register set from main header
There is no need to expose these settings outside the scope
of the interrupt controller code itself.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:41 +11:00
Grant Likely b9cf5d8e2e [POWERPC] Move Efika support files into platforms/52xx
The Efika board isn't different enough from other 52xx based boards to
justify a separate platform.  This patch merges it with the support
code for all other 52xx based boards.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:39 +11:00
Grant Likely d4150248fc [POWERPC] Put mpc52xx support file in platforms/52xx
platforms/embedded6xx is probably going away, and 52xx boards need
some extra support the 52xx interrupt controller and DMA engine
anyway.  It makes sense to group all the 52xx bits into a single path.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:37 +11:00
Grant Likely 39d074b2e4 [POWERPC] Move MPC52xx PIC driver into arch/powerpc/platforms/52xx
No other chips use this device, it belongs in a 52xx-specific path.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:36 +11:00
Mohan Kumar M a5715d6dfc [POWERPC] pSeries/kexec: Fix for interrupt distribution
This allows any secondary CPU thread also to become boot cpu for
POWER5.  The patch is required to solve kdump boot issue when the
kdump kernel is booted with parameter "maxcpus=1".  XICS init code
tries to match the current boot cpu id with "reg" property in each CPU
node in the device tree.  But CPU node is created only for primary
thread CPU ids and "reg" property only reflects primary CPU ids.  So
when a kernel is booted on a secondary cpu thread above condition will
never meet and the default distribution server is left as zero.  This
leads to route the interrupts to CPU 0, but which is not online at
this time.

We use ibm,ppc-interrupt-server#s to check for both primary and
secondary CPU ids.  Accordingly default distribution server value is
initialized from "ibm,ppc-interrupt-gserver#s" property.  We loop
through ibm,ppc-interrupt-gserver#s property to find the global
distribution server from the last entry that matches with boot cpuid.

Signed-off-by: Mohan Kumar M <mohan@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:22 +11:00
Arnd Bergmann e22ba7e381 [POWERPC] ps3: multiplatform build fixes
A few code paths need to check whether or not they are running
on the PS3's LV1 hypervisor before making hcalls. This introduces
a new firmware feature bit for this, FW_FEATURE_PS3_LV1.

Now when both PS3 and IBM_CELL_BLADE are enabled, but not PSERIES,
FW_FEATURE_PS3_LV1 and FW_FEATURE_LPAR get enabled at compile time,
which is a bug. The same problem can also happen for (PPC_ISERIES &&
!PPC_PSERIES && PPC_SOMETHING_ELSE). In order to solve this, I
introduce a new CONFIG_PPC_NATIVE option that is set when at least
one platform is selected that can run without a hypervisor and then
turns the firmware feature check into a run-time option.

The new cell oprofile support that was recently merged does not
work on hypervisor based platforms like the PS3, therefore make
it depend on PPC_CELL_NATIVE instead of PPC_CELL. This may change
if we get oprofile support for PS3.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:41:16 +11:00
Geert Uytterhoeven eb30c72026 [POWERPC] ps3: Missed renames of CONFIG_PS3 to CONFIG_PPC_PS3
When renaming CONFIG_PS3 to CONFIG_PPC_PS3, a few occurrences have been
missed.

I also fixed up the alignment in arch/powerpc/platforms/Makefile.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:41:14 +11:00
Stephen Rothwell da06aa08d9 [POWERPC] spufs: we should only execute init_spu_base on cell
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:41:11 +11:00
Arnd Bergmann c2b2226c7e [POWERPC] spufs: always send sigtrap on breakpoint
Currently, we only send a sigtrap if the current task is being ptraced.
This is somewhat inconsistant, and it breaks utrace support in fedora.
Removing the check should do the right thing in all cases.

Cc: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:41:09 +11:00
Jeremy Kerr bd2e5f829e [POWERPC] spufs: return an error in spu_create is isolated create isnt supported
This changes the spu_create system call to return an error (-ENODEV) if
and isolated spu context is requested on hardware that doesn't support
isolated mode.

Tested on systemsim with and without isolation support

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:41:07 +11:00
Nicolas DET aa668d6aac [POWERPC] Fix compile issue for Efika platform
This patch fixes a compile issue for the Efika platform recently
introduced by API changes.

Signed-off-by: Nicolas DET <nd@bplan-gmbh.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:41:06 +11:00
Geoff Levand de91a53429 [POWERPC] ps3: add spu support
Adds spu support for the PS3 platform.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:56 +11:00
Geoff Levand 00a3e2e93c [POWERPC] ps3: add OS params support
Adds support for early access to the parameter data from the PS3 'Other OS'
flash memory area.  The parameter data mainly holds user preferences like
static ip address.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:54 +11:00
Geoff Levand 261efc3f17 [POWERPC] ps3: add lpar addressing
Adds some needed bits for a config option PS3_USE_LPAR_ADDR that disables
the PS3 lpar address translation mechanism.  This is a currently needed
workaround for limitations in the design of the generic cell spu support.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:52 +11:00
Geoff Levand 2832a81df7 [POWERPC] ps3: add interrupt support
Adds routines to interface with the PS3 interrupt services.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:51 +11:00
Geoff Levand 6e74b38a7f [POWERPC] ps3: add repository support
Adds support for the PS3 repository.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:49 +11:00
Geoff Levand c6cec72b7c [POWERPC] ps3: add htab routines
Adds pagetable management routines for the PS3.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:47 +11:00
Geoff Levand 1e4ed915d1 [POWERPC] ps3: add lv1 hvcalls
Adds the PS3 hvcalls.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:44 +11:00
Geoff Levand f58a9d171a [POWERPC] ps3: add support for ps3 platform
Adds the core platform support for the PS3 game console and other devices
using the PS3 hypervisor.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:42 +11:00
Geoff Levand e28b003136 [POWERPC] cell: abstract spu management routines
This adds a platform specific spu management abstraction and the coresponding
routines to support the IBM Cell Blade.  It also removes the hypervisor only
resources that were included in struct spu.

Three new platform specific routines are introduced, spu_enumerate_spus(),
spu_create_spu() and spu_destroy_spu().  The underlying design uses a new
type, struct spu_management_ops, to hold function pointers that the platform
setup code is expected to initialize to instances appropriate to that platform.

For the IBM Cell Blade support, I put the hypervisor only resources that were
in struct spu into a platform specific data structure struct spu_pdata.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:39 +11:00
Benjamin Herrenschmidt 5850dd8f6d [POWERPC] cell: hard disable interrupts in power_save()
With soft-disabled interrupts in power_save, we can
still get external exceptions on Cell, even if we are
in pause(0) a.k.a. sleep state.

When the CPU really wakes up through the 0x100 (system reset)
vector, while we have already started processing the 0x500
(external) exception, we get a panic in unrecoverable_exception()
because of the lost state.

This occurred in Systemsim for Cell, but as far as I can see,
it can theoretically occur on any machine that uses the
system reset exception to get out of sleep state.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:21 +11:00
Dwayne Grant McConnell bf1ab978be [POWERPC] coredump: Add SPU elf notes to coredump.
This patch adds SPU elf notes to the coredump. It creates a separate note
for each of /regs, /fpcr, /lslr, /decr, /decr_status, /mem, /signal1,
/signal1_type, /signal2, /signal2_type, /event_mask, /event_status,
/mbox_info, /ibox_info, /wbox_info, /dma_info, /proxydma_info, /object-id.

A new macro, ARCH_HAVE_EXTRA_NOTES, was created for architectures to
specify they have extra elf core notes.

A new macro, ELF_CORE_EXTRA_NOTES_SIZE, was created so the size of the
additional notes could be calculated and added to the notes phdr entry.

A new macro, ELF_CORE_WRITE_EXTRA_NOTES, was created so the new notes
would be written after the existing notes.

The SPU coredump code resides in spufs. Stub functions are provided in the
kernel which are hooked into the spufs code which does the actual work via
register_arch_coredump_calls().

A new set of __spufs_<file>_read/get() functions was provided to allow the
coredump code to read from the spufs files without having to lock the
SPU context for each file read from.

Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Dwayne Grant McConnell <decimal@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2006-12-04 20:40:19 +11:00
Paul Mackerras 974a76f513 [POWERPC] Distinguish POWER6 partition modes and tell userspace
This adds code to look at the properties firmware puts in the device
tree to determine what compatibility mode the partition is in on
POWER6 machines, and set the ELF aux vector AT_HWCAP and AT_PLATFORM
entries appropriately.

Specifically, we look at the cpu-version property in the cpu node(s).
If that contains a "logical" PVR value (of the form 0x0f00000x), we
call identify_cpu again with this PVR value.  A value of 0x0f000001
indicates the partition is in POWER5+ compatibility mode, and a value
of 0x0f000002 indicates "POWER6 architected" mode, with various
extensions disabled.  We also look for various other properties:
ibm,dfp, ibm,purr and ibm,spurr.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:16 +11:00
Maynard Johnson 18f2190d79 [POWERPC] cell: Add oprofile support
Add PPU event-based and cycle-based profiling support to Oprofile for Cell.

Oprofile is expected to collect data on all CPUs simultaneously.
However, there is one set of performance counters per node.  There are
two hardware threads or virtual CPUs on each node.  Hence, OProfile must
multiplex in time the performance counter collection on the two virtual
CPUs.

The multiplexing of the performance counters is done by a virtual
counter routine.  Initially, the counters are configured to collect data
on the even CPUs in the system, one CPU per node.  In order to capture
the PC for the virtual CPU when the performance counter interrupt occurs
(the specified number of events between samples has occurred), the even
processors are configured to handle the performance counter interrupts
for their node.  The virtual counter routine is called via a kernel
timer after the virtual sample time.  The routine stops the counters,
saves the current counts, loads the last counts for the other virtual
CPU on the node, sets interrupts to be handled by the other virtual CPU
and restarts the counters, the virtual timer routine is scheduled to run
again.  The virtual sample time is kept relatively small to make sure
sampling occurs on both CPUs on the node with a relatively small
granularity.  Whenever the counters overflow, the performance counter
interrupt is called to collect the PC for the CPU where data is being
collected.

The oprofile driver relies on a firmware RTAS call to setup the debug bus
to route the desired signals to the performance counter hardware to be
counted.  The RTAS call must set the routing registers appropriately in
each of the islands to pass the signals down the debug bus as well as
routing the signals from a particular island onto the bus.  There is a
second firmware RTAS call to reset the debug bus to the non pass thru
state when the counters are not in use.

Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Maynard Johnson <mpjohn@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:14 +11:00
Kevin Corry 0443bbd3d8 [POWERPC] cell: Add routines for managing PMU interrupts
The following routines are added to arch/powerpc/platforms/cell/pmu.c:
 cbe_clear_pm_interrupts()
 cbe_enable_pm_interrupts()
 cbe_disable_pm_interrupts()
 cbe_query_pm_interrupts()
 cbe_pm_irq()
 cbe_init_pm_irq()

This also adds a routine in arch/powerpc/platforms/cell/interrupt.c and
some macros in cbe_regs.h to manipulate the IIC_IR register:
 iic_set_interrupt_routing()

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:12 +11:00
Kevin Corry e4f6948cfc [POWERPC] cell: Move PMU-related stuff to include/asm-powerpc/cell-pmu.h
Move some PMU-related macros and function prototypes from cbe_regs.h
and pmu.h in arch/powerpc/platforms/cell/ to a new header at
include/asm-powerpc/cell-pmu.h

This is cleaner to use from the oprofile code, since that sits in
arch/powerpc/oprofile, not in the cell platform directory.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:11 +11:00
Kevin Corry c93dfa0766 [POWERPC] cell: PMU register macros
More macros for manipulating bits in the Cell PMU control registers.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:09 +11:00
Arnd Bergmann 5231800c6f [POWERPC] cell: Add symbol exports for oprofile
Add symbol-exports for the new routines in arch/powerpc/platforms/cell/pmu.c.
They are needed for Oprofile, which can be built as a module.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:07 +11:00
Jeremy Kerr c6730ed4c2 [POWERPC] spufs: Load isolation kernel from spu_run
In order to fit with the "don't-run-spus-outside-of-spu_run" model, this
patch starts the isolated-mode loader in spu_run, rather than
spu_create. If spu_run is passed an isolated-mode context that isn't in
isolated mode state, it will run the loader.

This fixes potential races with the isolated SPE app doing a
stop-and-signal before the PPE has called spu_run: bugzilla #29111.
Also (in conjunction with a mambo patch), this addresses #28565, as we
always set the runcntrl register when entering spu_run.

It is up to libspe to ensure that isolated-mode apps are cleaned up
after running to completion - ie, put the app through the "ISOLATE EXIT"
state (see Ch11 of the CBEA).

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:06 +11:00
Jeremy Kerr 3960c26020 [POWERPC] spufs: Add runcntrl read accessors
This change adds a read accessor for the SPE problem-state run control
register.

This is required for for applying (userspace) changes made to the run
control register while the SPE is stopped - simply asserting the master
run control bit is not sufficient. My next patch for isolated-mode
setup requires this.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:04 +11:00
Arnd Bergmann ee2d7340cb [POWERPC] spufs: Use SPU master control to prevent wild SPU execution
When the user changes the runcontrol register, an SPU might be
running without a process being attached to it and waiting for
events. In order to prevent this, make sure we always disable
the priv1 master control when we're not inside of spu_run.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:02 +11:00
Masato Noguchi 3692dc6614 [POWERPC] spufs: Fix return value of spufs_mfc_write
This patch changes spufs_mfc_write() to return
correct size instead of 0.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-12-04 20:40:01 +11:00