openwrt/staging/blogic.git
17 years ago[POWERPC] Stop using ppc_sys for Xilinx Virtex boards
Grant Likely [Fri, 27 Apr 2007 19:50:02 +0000 (05:50 +1000)]
[POWERPC] Stop using ppc_sys for Xilinx Virtex boards

The arch/ppc/syslib/ppc_sys.c infrastructure does not work well for the
virtex ports.  Move the ml300 and ml403 board ports over to use the new
virtex_devices infrastructure.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices
Grant Likely [Fri, 27 Apr 2007 19:50:01 +0000 (05:50 +1000)]
[POWERPC] New registration for common Xilinx Virtex ppc405 platform devices

Currently virtex support in mainline make use of the infrastructure in
arch/ppc/syslib/ppc_sys.c for registering common devices on virtex ppc405
platforms.  The ppc_sys.c code is not well suited to the dynamic nature of
FPGA designs and makes adding new board ports more complex.  This patch
adds a new listing of common devices which does not depend on the ppc_sys.c
infrastructure.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Merge common virtex header files
Grant Likely [Fri, 27 Apr 2007 19:50:00 +0000 (05:50 +1000)]
[POWERPC] Merge common virtex header files

The header files for the ml403 and ml300 are virtually identical, merge
them into a single file.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform
Grant Likely [Fri, 27 Apr 2007 19:49:59 +0000 (05:49 +1000)]
[POWERPC] Rework Kconfig dependancies for Xilinx Virtex ppc405 platform

Reverse dependency order for Xilinx Virtex parts.  For these parts, It
makes more sense for boards/chips to specify which features they
provide instead of the features listing the parts they are implemented
in.  I think it also makes adding new board ports simpler.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Clean up cpufreq Kconfig dependencies
Olof Johansson [Fri, 27 Apr 2007 05:52:43 +0000 (15:52 +1000)]
[POWERPC] Clean up cpufreq Kconfig dependencies

Shuffle Kconfig order, making the platform drivers menu depend on the global
option instead of each driver being dependent on it.

Also fix dependency of PPC_PMAC on the G5 one.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoRevert "[POWERPC] Autodetect serial console on efika"
Paul Mackerras [Mon, 30 Apr 2007 00:24:24 +0000 (10:24 +1000)]
Revert "[POWERPC] Autodetect serial console on efika"

This reverts commit 9414715a7bbb45450015e9bc2676d85d919d08d4,
at Olaf Hering's request:

> Paul, please discard this patch. The optional graphics card may have
> also device_type 'serial' if it is in VGA mode.
> I will send an updated patch later.

17 years ago[POWERPC] Generic check_legacy_ioport
Olaf Hering [Wed, 25 Apr 2007 20:36:56 +0000 (06:36 +1000)]
[POWERPC] Generic check_legacy_ioport

check_legacy_ioport makes only sense on PREP, CHRP and pSeries.
They may have an isa node with PS/2, parport, floppy and serial ports.

Remove the check_legacy_ioport call from ppc_md, it's not needed
anymore.  Hardware capabilities come from the device-tree.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Prepare for splitting up mmu.h by MMU type
David Gibson [Fri, 27 Apr 2007 01:53:52 +0000 (11:53 +1000)]
[POWERPC] Prepare for splitting up mmu.h by MMU type

Currently asm-powerpc/mmu.h has definitions for the 64-bit hash based
MMU.  If CONFIG_PPC64 is not set, it instead includes asm-ppc/mmu.h
which contains a particularly horrible mess of #ifdefs giving the
definitions for all the various 32-bit MMUs.

It would be nice to have the low level definitions for each MMU type
neatly in their own separate files.  It would also be good to wean
arch/powerpc off dependence on the old asm-ppc/mmu.h.

This patch makes a start on such a cleanup by moving the definitions
for the 64-bit hash MMU to their own file, asm-powerpc/mmu_hash64.h.
Definitions for the other MMUs still all come from asm-ppc/mmu.h,
however each MMU type can now be one-by-one moved over to their own
file, in the process cleaning them up stripping them of cruft no
longer necessary in arch/powerpc.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: cuboot-83xx: Exclude upper 1MB from heap.
Scott Wood [Thu, 26 Apr 2007 17:19:31 +0000 (03:19 +1000)]
[POWERPC] bootwrapper: cuboot-83xx: Exclude upper 1MB from heap.

The uppermost part of memory is where u-boot puts the stack, so don't
include that in the heap.  It's not currently causing problems, as the
current code allocates from the bottom of the heap, but this will keep
things from potentially breaking if a future implementation were to
allocate from the top.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: cuImage for 85xx
Scott Wood [Thu, 26 Apr 2007 17:09:01 +0000 (03:09 +1000)]
[POWERPC] bootwrapper: cuImage for 85xx

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Fix array handling in dt_xlate_reg().
Scott Wood [Thu, 26 Apr 2007 17:08:13 +0000 (03:08 +1000)]
[POWERPC] bootwrapper: Fix array handling in dt_xlate_reg().

This fixes a few bugs in how dt_xlate_reg() handles address arrays:

1. copy_val() was copying into the wrong end of the array, resulting
in random stack garbage at the other end.
2. dt_xlate_reg() was getting the result from the wrong end of the array.
3. add_reg() and sub_reg() were treating the arrays as
little-endian rather than big-endian.
4. add_reg() only returned an error on a carry out of the entire
array, rather than out of the naddr portion.
5. The requested reg resource was checked to see if it exceeded
the size of the reg property, but not to see if it exceeded the
size of the buffer.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] boot: More verbose gunzip error message
Milton Miller [Wed, 11 Apr 2007 08:32:36 +0000 (18:32 +1000)]
[POWERPC] boot: More verbose gunzip error message

Change the error message in gunzip_exactly to be more verbose.

Besides the identifier being unrelated to the current function name,
the user had no indication if the corruption was near the beginning
or the end.

Signed-off-by: Milton Miller <miltonm@bga.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Enable make install
Akinobu Mita [Tue, 10 Apr 2007 11:05:31 +0000 (21:05 +1000)]
[POWERPC] Enable make install

make help on powerpc says make install is available.
But it failed due to no rule to make install.

This patch enables make install to work.

Signed-off-by: Akinobu Mita <mita@fixstars.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Always use -mno-string
Benjamin Herrenschmidt [Thu, 22 Mar 2007 06:23:44 +0000 (17:23 +1100)]
[POWERPC] Always use -mno-string

The string load/store instructions are unimplemented on some processors
and slow (microcoded) on some others.  It's simplest to just not use
them at all.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix WARN_ON when entering xmon
Anton Blanchard [Tue, 20 Mar 2007 14:48:34 +0000 (01:48 +1100)]
[POWERPC] Fix WARN_ON when entering xmon

Whenever we enter xmon we get a WARN_ON out of the rtas code since it
thinks interrupts are still on:

Unable to handle kernel paging request for data at address 0x00000000
Faulting instruction address: 0xd000000000080008
cpu 0x3: Vector: 300 (Data Access) at [c0000000075dba00]
    pc: d000000000080008: .doit+0x8/0x40 [oopser]
    lr: c000000000077704: .sys_init_module+0x1664/0x1824
    sp: c0000000075dbc80
   msr: 9000000000009032
   dar: 0
 dsisr: 42000000
  current = 0xc000000003fa64b0
  paca    = 0xc000000000694280
    pid   = 2260, comm = insmod

------------[ cut here ]------------
Badness at arch/powerpc/kernel/entry_64.S:651
Call Trace:
[C0000000075DAE70] [C00000000000EB64] .show_stack+0x68/0x1b0 (unreliable)
[C0000000075DAF10] [C000000000216254] .report_bug+0x94/0xe8
[C0000000075DAFA0] [C00000000047B140] __kprobes_text_start+0x178/0x584
[C0000000075DB040] [C0000000000044F4] program_check_common+0xf4/0x100

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Replace if-then-else with a switch statement
Will Schmidt [Mon, 12 Mar 2007 19:21:16 +0000 (06:21 +1100)]
[POWERPC] Replace if-then-else with a switch statement

Convert a compound if-else blob to a switch statement.
This better fits the kernel coding style.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix typos in booting-without-of.txt
Domen Puncer [Fri, 2 Mar 2007 10:44:45 +0000 (21:44 +1100)]
[POWERPC] Fix typos in booting-without-of.txt

Fix typos + some cosmetic changes.

Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Cpufreq driver
Olof Johansson [Fri, 27 Apr 2007 05:46:01 +0000 (15:46 +1000)]
[POWERPC] pasemi: Cpufreq driver

Cpufreq driver for PA Semi PWRficient processors.

Signed-off-by: Egor Martovetsky <egor@pasemi.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Kconfig for gpio_mdio
Olof Johansson [Tue, 24 Apr 2007 23:17:33 +0000 (09:17 +1000)]
[POWERPC] pasemi: Kconfig for gpio_mdio

arch/powerpc/platforms/pasemi/gpio_mdio.c really depends on CONFIG_PHYLIB.
Add a config option for it, allow for it to be disabled if needed and fix
the dependency.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Remove build warning
Olof Johansson [Tue, 24 Apr 2007 18:01:34 +0000 (04:01 +1000)]
[POWERPC] pasemi: Remove build warning

arch/powerpc/platforms/pasemi/setup.c: In function 'pasemi_publish_devices':
arch/powerpc/platforms/pasemi/setup.c:220: warning: implicit declaration of function 'of_platform_bus_probe'

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Partially revert a7edd0e676d51145ae634a2acf7a447e319200fa
Stephen Rothwell [Fri, 27 Apr 2007 04:32:37 +0000 (14:32 +1000)]
[POWERPC] Partially revert a7edd0e676d51145ae634a2acf7a447e319200fa

Due to conflicts with the network drivers tree.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Rename get_property to of_get_property: partial drivers
Stephen Rothwell [Fri, 27 Apr 2007 03:41:15 +0000 (13:41 +1000)]
[POWERPC] Rename get_property to of_get_property: partial drivers

This does drivers/machintosh and the hvc code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoRevert "[POWERPC] Rename get_property to of_get_property: drivers"
Paul Mackerras [Thu, 26 Apr 2007 12:24:31 +0000 (22:24 +1000)]
Revert "[POWERPC] Rename get_property to of_get_property: drivers"

This reverts commit d05c7a80cf39ae7d0f8d0c3e47c93d51fcd393d3,
which included changes which should go via other subsystem
maintainers.

17 years agoRevert "[POWERPC] DMA 4GB boundary protection"
Paul Mackerras [Thu, 26 Apr 2007 07:01:04 +0000 (17:01 +1000)]
Revert "[POWERPC] DMA 4GB boundary protection"

This reverts commit 618d3adc351a24c4c48437c767befb88ca2d199d, because
it is superseded by 569975591c5530fdc9c7a3c45122e5e46f075a74.

17 years ago[POWERPC] via-pmu: Switch to ref counting PCI API
Alan Cox [Mon, 23 Apr 2007 13:56:01 +0000 (14:56 +0100)]
[POWERPC] via-pmu: Switch to ref counting PCI API

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pci_32.c: Switch to ref counting PCI API
Alan Cox [Mon, 23 Apr 2007 13:47:59 +0000 (14:47 +0100)]
[POWERPC] pci_32.c: Switch to ref counting PCI API

pci_find_slot isn't hot-plug safe.  Move this code to the pci hotplug
safe equivalent and hold a refcount properly while doing
make_one_node_map.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Abolish PHYS_FMT macro from arch/powerpc
David Gibson [Tue, 24 Apr 2007 05:05:18 +0000 (15:05 +1000)]
[POWERPC] Abolish PHYS_FMT macro from arch/powerpc

32-bit powerpc systems define a macro, PHYS_FMT, giving a printf
format string fragment for displaying physical addresses, since most
32-bit powerpc platforms use 32-bit physical addresses but a few use
64-bit physical addresses.

This macro is used in exactly one place, a rare error message, where
we can solve the problem more simply by just unconditionally casting
the address up to 64-bit quantity before formatting it.

This patch does so, meaning that as we bring MMU definitions from
asm-ppc over to asm-powerpc, cleaning them up in the process, we don't
need to implement this ugly macro (which additionally has a very bad
name for something global).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove old interface find_devices
Stephen Rothwell [Tue, 24 Apr 2007 03:53:04 +0000 (13:53 +1000)]
[POWERPC] Remove old interface find_devices

Replace uses with of_find_node_by_name and for_each_node_by_name.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove old interface find_type_devices
Stephen Rothwell [Tue, 24 Apr 2007 03:51:59 +0000 (13:51 +1000)]
[POWERPC] Remove old interface find_type_devices

Replaced by of_find_node_by_type.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove old interface find_path_device
Stephen Rothwell [Tue, 24 Apr 2007 03:50:55 +0000 (13:50 +1000)]
[POWERPC] Remove old interface find_path_device

Replaced by of_find_node_by_path.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove find_all_nodes
Stephen Rothwell [Tue, 24 Apr 2007 03:49:47 +0000 (13:49 +1000)]
[POWERPC] Remove find_all_nodes

This old interface has no more users.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Remove find_compatible_devices
Stephen Rothwell [Tue, 24 Apr 2007 03:48:41 +0000 (13:48 +1000)]
[POWERPC] Remove find_compatible_devices

This is an old interface and is replaced by of_find_compatible_node.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Cleanup and fix breakage in tlbflush.h
David Gibson [Tue, 24 Apr 2007 03:09:12 +0000 (13:09 +1000)]
[POWERPC] Cleanup and fix breakage in tlbflush.h

BenH's commit a741e67969577163a4cfc78d7fd2753219087ef1 in powerpc.git,
although (AFAICT) only intended to affect ppc64, also has side-effects
which break 44x.  I think 40x, 8xx and Freescale Book E are also
affected, though I haven't tested them.

The problem lies in unconditionally removing flush_tlb_pending() from
the versions of flush_tlb_mm(), flush_tlb_range() and
flush_tlb_kernel_range() used on ppc64 - which are also used the
embedded platforms mentioned above.

The patch below cleans up the convoluted #ifdef logic in tlbflush.h,
in the process restoring the necessary flushes for the software TLB
platforms.  There are three sets of definitions for the flushing
hooks: the software TLB versions (revised to avoid using names which
appear to related to TLB batching), the 32-bit hash based versions
(external functions) amd the 64-bit hash based versions (which
implement batching).

It also moves the declaration of update_mmu_cache() to always be in
tlbflush.h (previously it was in tlbflush.h except for PPC64, where it
was in pgtable.h).

Booted on Ebony (440GP) and compiled for 64-bit and 32-bit
multiplatform.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Save trap number in bad_stack
Olof Johansson [Mon, 23 Apr 2007 15:11:55 +0000 (01:11 +1000)]
[POWERPC] Save trap number in bad_stack

Save the trap number in the case of getting a bad stack in an exception
handler. It is sometimes useful to know what exception it was that caused
this to happen. Without this, no trap number is reported.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Rename MPIC_BROKEN_U3 to MPIC_U3_HT_IRQS
Michael Ellerman [Mon, 23 Apr 2007 08:47:08 +0000 (18:47 +1000)]
[POWERPC] Rename MPIC_BROKEN_U3 to MPIC_U3_HT_IRQS

Rename MPIC_BROKEN_U3 to something a little more descriptive. Its
effect is to enable support for HT irqs behind the PCI-X/HT bridge on
U3/U4 (aka. CPC9x5) parts.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix comment typo in Kurobox device tree
Grant Likely [Sat, 21 Apr 2007 21:24:04 +0000 (07:24 +1000)]
[POWERPC] Fix comment typo in Kurobox device tree

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Use `unsigned long' for malloc sizes
Geert Uytterhoeven [Wed, 18 Apr 2007 09:24:12 +0000 (19:24 +1000)]
[POWERPC] bootwrapper: Use `unsigned long' for malloc sizes

Use `unsigned long' for malloc sizes, to match common practice and types used
by most callers and callees.
Also use `unsigned long' for integers representing pointers in simple_alloc.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@eu.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Add arch/powerpc driver for UIC, PPC4xx interrupt controller
David Gibson [Wed, 18 Apr 2007 06:36:26 +0000 (16:36 +1000)]
[POWERPC] Add arch/powerpc driver for UIC, PPC4xx interrupt controller

This patch adds a driver to arch/powerpc/sysdev for the UIC, the
on-chip interrupt controller from IBM/AMCC 4xx chips.  It uses the new
irq host mapping infrastructure.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Re-organize Kconfig code for 4xx in arch/powerpc
David Gibson [Wed, 18 Apr 2007 06:36:26 +0000 (16:36 +1000)]
[POWERPC] Re-organize Kconfig code for 4xx in arch/powerpc

Now that we always take a device tree in arch/powerpc, there's no good
reason not to allow a single kernel to support multiple embedded 4xx
boards - the correct platform code can be selected based on the device
tree information.

Therefore, this patch re-arranges the 4xx Kconfig code to allow this.
In addition we:
- use "select" instead of depends to configure the correct
  config options for specific 4xx CPUs and workarounds, which
  makes the information about specific boards and CPUs less
  scattered.
- Some old, unused (in arch/powerpc) config options are
  removed: WANT_EARLY_SERIAL, IBM_OCP, etc.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] kprobes: Eliminate sstep exception if instruction can be emulated
Ananth N Mavinakayanahalli [Wed, 18 Apr 2007 05:57:51 +0000 (15:57 +1000)]
[POWERPC] kprobes: Eliminate sstep exception if instruction can be emulated

For cases when probes are placed on instructions that can be emulated,
don't take the single-step exception.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Emulate more instructions in software
Ananth N Mavinakayanahalli [Wed, 18 Apr 2007 05:56:38 +0000 (15:56 +1000)]
[POWERPC] Emulate more instructions in software

Emulate a few more instructions in software - especially useful during
singlestepping (xmon/kprobes).

Instructions emulated with this patch are mfcr/mtcr rX, mfxer/mtxer rX,
mflr/mtlr rX, mfctr/mtctr rX and mr rA,rB.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: cuboot for 83xx
Scott Wood [Mon, 16 Apr 2007 23:25:55 +0000 (09:25 +1000)]
[POWERPC] bootwrapper: cuboot for 83xx

This adds cuboot support for MPC83xx platforms.

A device tree used with this must have linux,stdout-path in /chosen and
linux,network-index in any network device nodes that need mac addresses
assigned.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Add ppcboot.h
Scott Wood [Mon, 16 Apr 2007 23:25:53 +0000 (09:25 +1000)]
[POWERPC] bootwrapper: Add ppcboot.h

This file describes the bd_t struct, which is used by old versions of
U-boot to pass information to the kernel.  Platform code that needs to
interoperate with such firmware can use this; it should not be used for
anything new.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Add a cuboot platform and a cuImage target
Scott Wood [Mon, 16 Apr 2007 23:25:50 +0000 (09:25 +1000)]
[POWERPC] bootwrapper: Add a cuboot platform and a cuImage target

The cuImage target will build a uImage with bootwrapper code and a device
tree.  The default device tree and platform file are determined by the
kernel configuration.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] bootwrapper: Add CONFIG_DEVICE_TREE
Scott Wood [Mon, 16 Apr 2007 23:24:51 +0000 (09:24 +1000)]
[POWERPC] bootwrapper: Add CONFIG_DEVICE_TREE

This provides a way to tell the bootwrapper makefile which device tree to
include by default.  The wrapper can still be invoked standalone to wrap
with a different device tree without reconfiguring the kernel, if that is
desired.

The user will only be asked to provide a device tree if the platform
selects CONFIG_WANT_DEVICE_TREE.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: GPIO MDIO of_platform driver
Olof Johansson [Wed, 18 Apr 2007 06:39:54 +0000 (16:39 +1000)]
[POWERPC] pasemi: GPIO MDIO of_platform driver

MDIO driver for PHY's connected via GPIO as on the PA Semi Electra
eval board.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: PA6T oprofile support
Olof Johansson [Wed, 18 Apr 2007 06:38:21 +0000 (16:38 +1000)]
[POWERPC] pasemi: PA6T oprofile support

Oprofile support for PA6T, kernel side.

Also rename the PA6T_SPRN.* defines to SPRN_PA6T.*.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Reset mpic on boot
Olof Johansson [Mon, 16 Apr 2007 06:28:38 +0000 (16:28 +1000)]
[POWERPC] pasemi: Reset mpic on boot

Reset MPIC on boot to clear some timer state that firmware might
leave configured.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Enable one more hid bit
Olof Johansson [Mon, 16 Apr 2007 06:27:45 +0000 (16:27 +1000)]
[POWERPC] pasemi: Enable one more hid bit

Minor HID change. Firmware can't know that we want this set so we have
to set it in the kernel.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] pasemi: Allow 8KB config space for I/O bridge
Olof Johansson [Mon, 16 Apr 2007 06:26:34 +0000 (16:26 +1000)]
[POWERPC] pasemi: Allow 8KB config space for I/O bridge

Device 0 function 0 on the root bus is really a two-function bus agent,
but only the first function is visible. Because of this, we need to
allow config accesses into the second range. Modify the check for valid
offsets accordingly.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Fix PowerPC 750CL and 750GX CPU features
Josh Boyer [Thu, 12 Apr 2007 18:33:25 +0000 (04:33 +1000)]
[POWERPC] Fix PowerPC 750CL and 750GX CPU features

PowerPC 750CL has high BATs.  The patch below adds a CPU_FTRS_750CL that
includes that.  Without it, the original firmware mappings in the high BATs
aren't cleared which continue to override the linux translations.

It also adds CPU_FTR_COMMON to CPU_FTRS_750GX for completeness.

Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] hvc_console: Typo fixes
will schmidt [Tue, 17 Apr 2007 14:54:51 +0000 (00:54 +1000)]
[POWERPC] hvc_console: Typo fixes

Fix a handful of comment typos for hvc_console.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] hvc_console: Polling mode timer backoff
Will Schmidt [Tue, 17 Apr 2007 14:44:46 +0000 (00:44 +1000)]
[POWERPC] hvc_console: Polling mode timer backoff

Add a back-off mechanism to hvc_console's polling logic.   This change
drops the timers/second ratio from ~90 to ~1/2 while the console is
idle.
This change is most noticeable when watching /proc/timer_stats output.

This only affects when the hvc_console is running in poll mode, i.e.
power4 and cell systems.

I've tested on Power4, Michael Ellerman has both contributed to the
patch and tested on cell.

Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
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>
17 years ago[POWERPC] Rename last get_property calls
Stephen Rothwell [Fri, 13 Apr 2007 07:14:22 +0000 (17:14 +1000)]
[POWERPC] Rename last get_property calls

These got added recently.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Partially revert "Add correct interrupt property for pegasos ide"
Paul Mackerras [Tue, 24 Apr 2007 03:57:12 +0000 (13:57 +1000)]
[POWERPC] Partially revert "Add correct interrupt property for pegasos ide"

It turns out that commit e48059225c2edc6f1e5a2008261f1efdf606f247
breaks some existing systems that use the via82cxxx driver.  This
reverts the change to via82cxxx.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years agoMerge branch 'for-2.6.22' of master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell...
Paul Mackerras [Tue, 24 Apr 2007 01:46:09 +0000 (11:46 +1000)]
Merge branch 'for-2.6.22' of /linux/kernel/git/arnd/cell-2.6 into for-2.6.22

17 years agoMerge branch 'spufs' of master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6...
Paul Mackerras [Tue, 24 Apr 2007 01:45:03 +0000 (11:45 +1000)]
Merge branch 'spufs' of /linux/kernel/git/arnd/cell-2.6 into for-2.6.22

17 years agoMerge branch 'kconfig' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc...
Paul Mackerras [Mon, 23 Apr 2007 22:42:11 +0000 (08:42 +1000)]
Merge branch 'kconfig' of /linux/kernel/git/galak/powerpc into for-2.6.22

17 years ago[POWERPC] update cell_defconfig
Arnd Bergmann [Mon, 23 Apr 2007 19:35:48 +0000 (21:35 +0200)]
[POWERPC] update cell_defconfig

Sync with the Kconfig changes, and enable some options for celleb

Cc: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Jens Osterkamp <jens@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] cell: enable RTAS-based PTCAL for Cell XDR memory
Jeremy Kerr [Mon, 23 Apr 2007 19:35:47 +0000 (21:35 +0200)]
[POWERPC] cell: enable RTAS-based PTCAL for Cell XDR memory

Enable Periodic Recalibration (PTCAL) support for Cell XDR memory,
using the new ibm,cbe-start-ptcal and ibm,cbe-stop-ptcal RTAS calls.

Tested on QS20 and QS21 (by Thomas Huth). It seems that SLOF has
problems disabling, at least on QS20; this patch should only be
used once these problems have been addressed.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] cell: add support for proper device-tree
Christian Krafft [Mon, 23 Apr 2007 19:35:46 +0000 (21:35 +0200)]
[POWERPC] cell: add support for proper device-tree

This patch adds support for a proper device-tree.
A porper device-tree on cell contains be nodes
for each CBE containg nodes for SPEs and all the
other special devices on it.
Ofcourse oldschool devicetree is still supported.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] add of_iomap function
Christian Krafft [Mon, 23 Apr 2007 19:35:45 +0000 (21:35 +0200)]
[POWERPC] add of_iomap function

The of_iomap function maps memory for a given
device_node and returns a pointer to that memory.
This is used at some places, so it makes sense to
a seperate function.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] pmi probe device by device-type
Christian Krafft [Mon, 23 Apr 2007 19:35:44 +0000 (21:35 +0200)]
[POWERPC] pmi probe device by device-type

At the moment the pmi device driver is probing for devices with
a given type and a given name. As there may be devices of
the same type but with a different name, probing should be
done also for device type only.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] add check for initialized driver data to pmi driver
Christian Krafft [Mon, 23 Apr 2007 19:35:43 +0000 (21:35 +0200)]
[POWERPC] add check for initialized driver data to pmi driver

This patch adds a check for the private driver data to be initialized.
The bug showed up, as the caller found a pmi device by it's type.
Whereas the pmi driver probes for the type and the name.
Since the name was not as the driver expected, it did not initialize.
A more relaxed probing will be supplied with an extra patch, too.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] cell: use pmi in cpufreq driver
Christian Krafft [Mon, 23 Apr 2007 19:35:42 +0000 (21:35 +0200)]
[POWERPC] cell: use pmi in cpufreq driver

The new PMI driver was added in order to support
cpufreq on blades that require the frequency to
be controlled by the service processor, so use it
on those.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] cbe_thermal: add throttling attributes to cpu and spu nodes
Christian Krafft [Mon, 23 Apr 2007 19:35:41 +0000 (21:35 +0200)]
[POWERPC] cbe_thermal: add throttling attributes to cpu and spu nodes

This patch adds some attributes the cpu and spu nodes:
/sys/devices/system/[c|s]pu/[c|s]pu*/thermal/throttle_begin
/sys/devices/system/[c|s]pu/[c|s]pu*/thermal/throttle_end
/sys/devices/system/[c|s]pu/[c|s]pu*/thermal/throttle_full_stop

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] cbe_thermal: clean up computation of temperature
Christian Krafft [Mon, 23 Apr 2007 19:35:40 +0000 (21:35 +0200)]
[POWERPC] cbe_thermal: clean up computation of temperature

This patch introduces a little function for transforming
register values into temperature.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] cell: add cbe_node_to_cpu function
Christian Krafft [Mon, 23 Apr 2007 19:35:39 +0000 (21:35 +0200)]
[POWERPC] cell: add cbe_node_to_cpu function

This patch adds code to deal with conversion of
logical cpu to cbe nodes. It removes code that
assummed there were two logical CPUs per CBE.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spu_base: fix initialisation on systems with no SPEs
Jeremy Kerr [Mon, 23 Apr 2007 19:08:29 +0000 (21:08 +0200)]
[POWERPC] spu_base: fix initialisation on systems with no SPEs

This change fixes the case where spu_base and spufs are initialised on a
system with no SPEs - unconditionally create the spu_lists so spu_alloc
doesn't explode, and check for spu_management ops before starting spufs.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
 arch/powerpc/platforms/cell/spu_base.c    |    7 ++++---
 arch/powerpc/platforms/cell/spufs/inode.c |    5 +++++
 2 files changed, 9 insertions(+), 3 deletions(-)

17 years ago[POWERPC] spu_base: remove cleanup_spu_base
Christoph Hellwig [Mon, 23 Apr 2007 19:08:28 +0000 (21:08 +0200)]
[POWERPC] spu_base: remove cleanup_spu_base

spu_base.c is always built into the kernel image, so there is no need
for a cleanup function.  And some of the things it does are in the
way for my following patches, so I'd rather get rid of it ASAP.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: various run.c cleanups
Christoph Hellwig [Mon, 23 Apr 2007 19:08:27 +0000 (21:08 +0200)]
[POWERPC] spufs: various run.c cleanups

 - remove the spu_acquire_runnable from spu_run_init.  I need to
   opencode it in spufs_run_spu in the next patch
 - remove various inline attributes, we don't really want to inline
   long functions with multiple callsites
 - cleanup return values and runcntl_write calls in spu_run_init
 - use normal kernel codingstyle in spu_reacquire_runnable

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: enable SPU coredump for kernel-builtin spufs
Akinobu Mita [Mon, 23 Apr 2007 19:08:26 +0000 (21:08 +0200)]
[POWERPC] spufs: enable SPU coredump for kernel-builtin spufs

spu_coredump_calls.owner is NULL in case of a builtin spufs,
so the checks in here break.
Check for the availability of the spu_coredump_calls variable
instead.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: fix memory leak on coredump
Arnd Bergmann [Mon, 23 Apr 2007 19:08:25 +0000 (21:08 +0200)]
[POWERPC] spufs: fix memory leak on coredump

Dynamically allocated read/write buffer in spufs_arch_write_note() will
not be freed. Convert it to get_free_page at the same time.

Cc: Akinobu Mita <mita@fixstars.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: Minor cleanup of spu_wait
Jeremy Kerr [Mon, 23 Apr 2007 19:08:24 +0000 (21:08 +0200)]
[POWERPC] spufs: Minor cleanup of spu_wait

Change the loop in spu_wait to be a little more straightforward.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: add mode= mount option
Jeremy Kerr [Mon, 23 Apr 2007 19:08:23 +0000 (21:08 +0200)]
[POWERPC] spufs: add mode= mount option

Add a 'mode=' option to spufs mount arguments. This allows more
control over access to the top-level spufs directory.

Tested on Cell.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: use memcpy_fromio() to copy from local store
Akinobu Mita [Mon, 23 Apr 2007 19:08:22 +0000 (21:08 +0200)]
[POWERPC] spufs: use memcpy_fromio() to copy from local store

GCC may generates inline copy loop to handle memcpy() function
instead of kernel defined memcpy(). But this inlined version of memcpy()
causes an alignment interrupt when copying from local store.

This patch uses memcpy_fromio() and memcpy_toio to copy local store
to prevent memcpy() being inlined.

Signed-off-by: Akinobu Mita <mita@fixstars.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: avoid spurious memory barriers
Christoph Hellwig [Mon, 23 Apr 2007 19:08:21 +0000 (21:08 +0200)]
[POWERPC] spufs: avoid spurious memory barriers

We now have proper locking around assignets of the mapping pointers,
and the spin_unlock implies enough of a barrier to get rid of the
explicit one.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: fix memory leak on spufs reloading
Akinobu Mita [Mon, 23 Apr 2007 19:08:20 +0000 (21:08 +0200)]
[POWERPC] spufs: fix memory leak on spufs reloading

When SPU isolation mode enabled, isolated_loader would be
allocated by spufs_init_isolated_loader() on module_init().
But anyone do not free it.

This patch introduces spufs_exit_isolated_loader() which is
the opposite of spufs_init_isolated_loader() and called on
module_exit().

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Akinobu Mita <mita@fixstars.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: fix missing error handling in module_init()
Akinobu Mita [Mon, 23 Apr 2007 19:08:19 +0000 (21:08 +0200)]
[POWERPC] spufs: fix missing error handling in module_init()

spufs module_init forgot to call a few cleanup functions
on error path. This patch also includes cosmetic changes in
spu_sched_init() (identation fix and return error code).

[modified by hch to apply ontop of the latest schedule changes]

Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Akinobu Mita <mita@fixstars.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: check spu_acquire_runnable() return value
Akinobu Mita [Mon, 23 Apr 2007 19:08:18 +0000 (21:08 +0200)]
[POWERPC] spufs: check spu_acquire_runnable() return value

This patch checks return value of spu_acquire_runnable() in
spufs_mfc_write().

Signed-off-by: Akinobu Mita <mita@fixstars.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: turn run_sema into run_mutex
Christoph Hellwig [Mon, 23 Apr 2007 19:08:17 +0000 (21:08 +0200)]
[POWERPC] spufs: turn run_sema into run_mutex

There is no reason for run_sema to be a struct semaphore.  Changing
it to a mutex and rename it accordingly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: provide siginfo for SPE faults
Jeremy Kerr [Mon, 23 Apr 2007 19:08:16 +0000 (21:08 +0200)]
[POWERPC] spufs: provide siginfo for SPE faults

This change populates a siginfo struct for SPE application exceptions
(ie, invalid DMAs and illegal instructions).

Tested on an IBM Cell Blade.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: make spu page faults not block scheduling
Arnd Bergmann [Mon, 23 Apr 2007 19:08:15 +0000 (21:08 +0200)]
[POWERPC] spufs: make spu page faults not block scheduling

Until now, we have always entered the spu page fault handler
with a mutex for the spu context held. This has multiple
bad side-effects:
- it becomes impossible to suspend the context during
  page faults
- if an spu program attempts to access its own mmio
  areas through DMA, we get an immediate livelock when
  the nopage function tries to acquire the same mutex

This patch makes the page fault logic operate on a
struct spu_context instead of a struct spu, and moves it
from spu_base.c to a new file fault.c inside of spufs.

We now also need to copy the dar and dsisr contents
of the last fault into the saved context to have it
accessible in case we schedule out the context before
activating the page fault handler.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spu_base: move spu_init_channels out of spu_mutex
Christoph Hellwig [Mon, 23 Apr 2007 19:08:14 +0000 (21:08 +0200)]
[POWERPC] spu_base: move spu_init_channels out of spu_mutex

There is no reason to execute spu_init_channels under spu_mutex
after the spu has been taken off the freelist it's ours.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spu sched: make addition to stop_wq and runque atomic vs wakeup
Luke Browning [Mon, 23 Apr 2007 19:08:13 +0000 (21:08 +0200)]
[POWERPC] spu sched: make addition to stop_wq and runque atomic vs wakeup

Addition to stop_wq needs to happen before adding to the runqeueue and
under the same lock so that we don't have a race window for a lost
wake up in the spu scheduler.

Signed-off-by: Luke Browning <lukebrowning@us.ibm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: streamline locking for isolated spu setup
Christoph Hellwig [Mon, 23 Apr 2007 19:08:12 +0000 (21:08 +0200)]
[POWERPC] spufs: streamline locking for isolated spu setup

For quite a while now spu state is protected by a simple mutex instead
of the old rw_semaphore, and this means we can simplify the locking
around spu_setup_isolated a lot.

Instead of doing an spu_release before entering spu_setup_isolated and
then calling the complicated spu_acquire_exclusive we can now simply
enter the function locked an in guaranteed runnable state, so that the
only bit of spu_acquire_exclusive that's left is the call to
spu_unmap_mappings.

Similarly there's no more need to unlock and reacquire the state_mutex
when spu_setup_isolated is done, but we can always return with the
lock held and only drop it in spu_run_init in the failure case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: remove woken threads from the runqueue early
Christoph Hellwig [Mon, 23 Apr 2007 19:08:11 +0000 (21:08 +0200)]
[POWERPC] spufs: remove woken threads from the runqueue early

A single context should only be woken once, and we should not have
more wakeups for a given priority than the number of contexts on
that runqueue position.

Also add some asserts to trap future problems in this area more
easily.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: add memory barriers after set_bit
Arnd Bergmann [Mon, 23 Apr 2007 19:08:10 +0000 (21:08 +0200)]
[POWERPC] spufs: add memory barriers after set_bit

set_bit does not guarantee ordering on powerpc, so using it
for communication between threads requires explicit
mb() calls.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spu sched: ensure preempted threads are put back on the runqueue, part2
Christoph Hellwig [Mon, 23 Apr 2007 19:08:09 +0000 (21:08 +0200)]
[POWERPC] spu sched: ensure preempted threads are put back on the runqueue, part2

To not lose a spu thread we need to make sure it always gets put back
on the runqueue.  In find_victim aswell as in the scheduler tick as done
in the previous patch.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spu sched: ensure preempted threads are put back on the runqueue
Christoph Hellwig [Mon, 23 Apr 2007 19:08:08 +0000 (21:08 +0200)]
[POWERPC] spu sched: ensure preempted threads are put back on the runqueue

To not lose a spu thread we need to make sure it always gets put back
on the runqueue.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: clear mapping pointers after last close
Christoph Hellwig [Mon, 23 Apr 2007 19:08:07 +0000 (21:08 +0200)]
[POWERPC] spufs: clear mapping pointers after last close

Make sure the pointers to various mappings are cleared once the last
user stopped using them.  This avoids accessing freed memory when
tearing down the gang directory aswell as optimizing away
pte invalidations if no one uses these.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] spufs: use cancel_rearming_delayed_workqueue when stopping spu contexts
Christoph Hellwig [Mon, 23 Apr 2007 19:08:06 +0000 (21:08 +0200)]
[POWERPC] spufs: use cancel_rearming_delayed_workqueue when stopping spu contexts

The scheduler workqueue may rearm itself and deadlock when we try to stop
it.  Put a flag in place to avoid skip the work if we're tearing down
the context.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
17 years ago[POWERPC] Fix detection of loader-supplied initrd on OF platforms
Paul Mackerras [Fri, 13 Apr 2007 00:46:21 +0000 (10:46 +1000)]
[POWERPC] Fix detection of loader-supplied initrd on OF platforms

Commit 79c8541924a220964f9f2cbed31eaa9fdb042eab introduced code to move
the initrd if it was in a place where it would get overwritten by the
kernel image.  Unfortunately this exposed the fact that the code that
checks whether the values passed in r3 and r4 are intended to indicate
the start address and size of an initrd image was not as thorough as the
kernel's checks.  The symptom is that on OF-based platforms, the
bootwrapper can cause an exception which causes the system to drop back
into OF.

Previously it didn't matter so much if the code incorrectly thought that
there was an initrd, since the values for start and size were just passed
through to the kernel.  Now the bootwrapper needs to apply the same checks
as the kernel since it is now using the initrd data itself (in the process
of copying it if necessary).  This adds the code to do that.

Signed-off-by: Paul Mackerras <paulus@samba.org>
17 years ago[POWERPC] Miscellaneous arch/powerpc Kconfig and platform/Kconfig cleanup
Kumar Gala [Thu, 12 Apr 2007 23:01:34 +0000 (18:01 -0500)]
[POWERPC] Miscellaneous arch/powerpc Kconfig and platform/Kconfig cleanup

* Cleaned up some whitespace in arch/powerpc/Kconfig
* Moved sourcing of platforms/embedded6xx/Kconfig into platform/Kconfig
* Moved sourcing of platforms/4xx/Kconfig into platform/Kconfig and disabled it
* Removed EMBEDDEDBOOT since its not supported in arch/powerpc
* Removed PC_KEYBOARD since its not used anywhere
* Moved a few CONFIG options around in platform/Kconfig
* Moved interrupt controllers into platform/Kconfig out of bus section

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Convert 85xx platform to unified platform Kconfig
Kumar Gala [Thu, 12 Apr 2007 22:44:07 +0000 (17:44 -0500)]
[POWERPC] Convert 85xx platform to unified platform Kconfig

Moved 85xx platform Kconfig over to being sourced by the unified
arch/powerpc/platforms/Kconfig.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Convert 8xx platform to unified platform Kconfig
Kumar Gala [Thu, 12 Apr 2007 22:35:54 +0000 (17:35 -0500)]
[POWERPC] Convert 8xx platform to unified platform Kconfig

Moved 8xx platform Kconfig over to being sourced by the unified
arch/powerpc/platforms/Kconfig.  Also, cleaned up whitespace issues in 8xx
Kconfig.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Convert 82xx platform to unified platform Kconfig
Kumar Gala [Thu, 12 Apr 2007 21:53:32 +0000 (16:53 -0500)]
[POWERPC] Convert 82xx platform to unified platform Kconfig

Moved 82xx platform Kconfig over to being sourced by the unified
arch/powerpc/platforms/Kconfig.  Also, cleaned up whitespace issues in 82xx
Kconfig.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Convert 83xx platform to unified platform Kconfig
Kumar Gala [Thu, 12 Apr 2007 20:46:21 +0000 (15:46 -0500)]
[POWERPC] Convert 83xx platform to unified platform Kconfig

Moved 83xx platform Kconfig over to being sourced by the unified
arch/powerpc/platforms/Kconfig.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Convert 86xx platform to unified platform Kconfig
Kumar Gala [Thu, 12 Apr 2007 20:41:26 +0000 (15:41 -0500)]
[POWERPC] Convert 86xx platform to unified platform Kconfig

Moved 86xx platform Kconfig over to being sourced by the unified
arch/powerpc/platforms/Kconfig.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
17 years ago[POWERPC] Ensure platform CONFIG options have correct dependencies
Kumar Gala [Thu, 12 Apr 2007 20:35:50 +0000 (15:35 -0500)]
[POWERPC] Ensure platform CONFIG options have correct dependencies

We currently support TAU and CPU frequency scaling only on discrete
(non-SOC) processors.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>