Commit Graph

703 Commits

Author SHA1 Message Date
Paul Mackerras
a00428f5b1 Merge ../powerpc-merge 2006-02-24 14:05:47 +11:00
Segher Boessenkool
4558f417f4 [PATCH] powerpc: Don't re-assign PCI resources on Maple
Maple firmware does not need PCI resource allocation, and in fact, it
can cause problems in some strange cases.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:39 +11:00
Segher Boessenkool
72b138198c [PATCH] powerpc: Fix some MPIC + HT APIC buglets
Do disable, not enable, the HT APIC IRQ in the function that is
supposed to.
Enable the MPIC IRQ before enabling the downstream APIC IRQ, avoids
potentially losing an interrupt.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:37 +11:00
Olof Johansson
7c375b9aba [PATCH] powerpc: Update {g5,pseries,ppc64}_defconfig
Update defconfigs for g5, pseries and generic ppc64. Default choices
for everything, with the following exceptions:

 * Enable WINDFARM_PM112 on g5 and ppc64.
 * Increase CONFIG_NR_CPUS to 4 in g5_defconfig
 * CONFIG_TIGON3=y instead of =m in g5_defconfig

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:35 +11:00
Anton Blanchard
f1870f772c [PATCH] powerpc64: remove broken/bitrotted HMT support
HMT support is currently broken and needs to be reworked to play nicely
with the SMT scheduler. Remove the bit rotten bits for the time being.

I also updated an incorrect comment, we enter __secondary_hold with the
physical cpu id in r3.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:33 +11:00
Anton Blanchard
cb2c9b2741 [PATCH] powerpc: Fix runlatch performance issues
The runlatch SPR can take a lot of time to write. My original runlatch
code would set it on every exception entry even though most of the time
this was not required. It would also continually set it in the idle
loop, which is an issue on an SMT capable processor.

Now we cache the runlatch value in a threadinfo bit, and only check for
it in decrementer and hardware interrupt exceptions as well as the idle
loop. Boot on POWER3, POWER5 and iseries, and compile tested on pmac32.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:31 +11:00
R Sharada
47f78a4920 [PATCH] powerpc64: fix spinlock recursion in native_hpte_clear
native_hpte_clear has a spinlock recursion problem with the native_tlbie_lock
being called twice, once in native_hpte_clear() and once within tlbie().
Fix the problem by changing the call to tlbie() in native_hpte_clear() to
__tlbie(). It still supports only 4k pages for now.

Signed-off-by: R Sharada <sharada@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:29 +11:00
Kelly Daly
611ae59c62 [PATCH] powerpc: disable OProfile for iSeries
Disable OProfile in Kconfig for iSeries to prevent hangs.  OProfile
was not originally intended to work with legacy iSeries.

Signed-off-by: Kelly Daly <kelly@au.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:27 +11:00
Alan Curry
f1434a4854 [PATCH] powerpc: fix altivec_unavailable_exception Oopses
altivec_unavailable_exception is called without setting r3... it looks like
the r3 that actually gets passed in as struct pt_regs *regs is the
undisturbed value of r3 at the time the altivec instruction was encountered.
The user actually gets to choose the pt_regs printed in the Oops!

This fixes the oops by passing the correct pt_regs pointer to
altivec_unavailable_exception.

Signed-off-by: Alan Curry <pacman@TheWorld.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:23 +11:00
Haren Myneni
01aaed9d43 [PATCH] powerpc: Trivial fix to set the proper timeout value for kdump
The panic CPU is waiting forever due to some large timeout value if some
CPU is not responding to an IPI.
This patch fixes the problem - the maximum waiting period will be
10 seconds and then the kdump boot will go ahead.

Signed-off-by: Haren Myneni <haren@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:21 +11:00
Michael Ellerman
337a7128db [PATCH] powerpc: Only calculate htab_size in one place for kexec
For kexec we need to know the size of the MMU hash table.

Currently we calculate the size once in the htab code, and then twice more in
the kexec code, once using htab_hash_mask and once using ppc64_pft_size.
On some machines the ppc64_pft_size calculation is broken because
ppc64_pft_size is not set.

So we need to fix the second calculation, but better still we should just
calculate the size once and use it everywhere else.

Tested on Power5 LPAR, Power4 non-LPAR and Power3.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-24 11:36:18 +11:00
Michael Ellerman
bd6ef57e08 [PATCH] powerpc: Initialise hvlpevent_queue.lock correctly
When I changed the hvlpevent_queue code to use a spinlock instead of a
custom atomic (719d1cd867) I didn't
initialise the lock anywhere, oops.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-23 21:44:19 +11:00
Linus Torvalds
6bd25e7821 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2006-02-20 20:05:45 -08:00
Benjamin Herrenschmidt
c8b8b1f2e0 [PATCH] powermac: Fix loss of ethernet PHY on sleep
Some recent PowerBook models tend to lose the ethernet PHY on
suspend/resume.  It -seems- that they use a combo ethernet-firewire PHY
chip and the firewire PHY seems to die the same way when that happens.  Not
trying to toggle the firewire cable power appears to fix it.  So this patch
disables changes to the firewire cable power control GPIO on those models.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-20 20:00:11 -08:00
Michael Ellerman
496b7a5159 [PATCH] powerpc: Fix bug in spinup of renumbered secondary threads
If the logical and physical cpu ids of a secondary thread don't match, we will
fail to spin the thread up on pSeries machines due to a bug in pseries/smp.c

We call the RTAS "start-cpu" method with the physical cpu id, the address of
pSeries_secondary_smp_init and the value to pass that function in r3. Currently
we pass "lcpu", the logical cpu id, but pSeries_secondary_smp_init expects
the physical cpu id in r3.

We should be passing pcpu instead.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-20 12:03:37 +11:00
Michael Ellerman
8fca92705e [PATCH] powerpc: Make UP -> SMP kexec work again
For UP to SMP kexec to work we need to jump into pSeries_secondary_smp_init
event on a UP + KEXEC kernel. The secondary cpus will not find their hw_cpu_id
in the paca and so they'll jump into kexec_wait, ready for a kexec.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-20 12:03:36 +11:00
Michael Ellerman
f018b36f3e [PATCH] powerpc: Don't start secondary CPUs in a UP && KEXEC kernel
Because smp_release_cpus() is built for SMP || KEXEC, it's not safe to
unconditionally call it from setup_system(). On a UP && KEXEC kernel we'll
start up the secondary CPUs which will then go beserk and we die.

Simple fix is to conditionally call smp_release_cpus() in setup_system(). With
that in place we don't need the dummy definition of smp_release_cpus() because
all call sites are #ifdef'ed either SMP or KEXEC.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-20 12:03:34 +11:00
Olof Johansson
2b9a32edba [PATCH] powerpc: Fix OOPS in lparcfg on G5
Fallback gracefully when reading /proc/ppc64/lparcfg when the /rtas
device node can't be found.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-20 10:44:34 +11:00
Olaf Hering
0728a2f99e [PATCH] powerpc: remove duplicate exports
A few symbols are exported twice, remove them from ppc_ksyms.c
Remove users of sys_ctrler in arch/ppc/

WARNING: vmlinux: duplicate symbol '__delay' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol '__up' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol '__down' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol '__down_interruptible' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'sys_ctrler' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'strncat' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'strncmp' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'strchr' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'strrchr' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'strnlen' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'strpbrk' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'memscan' previous definition was in vmlinux
WARNING: vmlinux: duplicate symbol 'strstr' previous definition was in vmlinux

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-20 10:44:31 +11:00
Paul Mackerras
092b8f3488 powerpc: Keep xtime and gettimeofday in sync
This fixes a regression which was introduced by moving ppc32 to use
the same sort of lockless gettimeofday as ppc64 has been using for
some time.  This involves getting the timebase and performing some
simple arithmetic to convert it to seconds and microseconds.  However,
the factor and offset used there weren't being updated when NTP
varied the tick length using adjtimex.  64-bit didn't notice the
problem because it had a hook in the 32-bit adjtimex compat routine
that attempted to work out what the generic timekeeping code would
do and alter the factor and offset to match.  However, that code
was very complex and it wasn't clear that it still matched what the
generic code would do.

Now we use the generic current_tick_length() routine that was recently
added to check that the current tick will be as long as we expect; if
not we recompute the factor and offset.  This keeps gettimeofday and
xtime in sync.  In addition we check that gettimeofday hasn't got ahead
of xtime on each timer interrupt; if it has, we resync.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-20 10:38:56 +11:00
Linus Torvalds
d6c662d4f1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2006-02-10 14:52:31 -08:00
Andreas Gruenbacher
705672935f [PATCH] Fix building external modules on ppc32
We are setting up sources for building external modules like this:

  /usr/src/linux-obj> # create a .config file
  /usr/src/linux-obj> make -C /usr/src/linux O=$PWD oldconfig
  /usr/src/linux-obj> make -C /usr/src/linux O=$PWD prepare
  /usr/src/linux-obj> make -C /usr/src/linux O=$PWD scripts
  /usr/src/linux-obj> make -C /usr/src/linux O=$PWD clean

After that, external modules can be built with:

  /usr/src/module> make -C /usr/src/linux-obj M=$PWD

This fails for ppc32 because the `make clean' removes the
arch/powerpc/include directory.  This should be done in archmrproper
instead of in archclean.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-10 08:13:12 -08:00
Kumar Gala
00adbf62bd [PATCH] powerpc: Add CONFIG_DEFAULT_UIMAGE for embedded boards
Embedded boards that u-boot require a kernel image in the uImage format.
This allows a given board to specify it wants a uImage built by default.

This also fixes a warning at config time, as this symbol is referred
to in arch/powerpc/platforms/83xx/Kconfig.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 17:15:01 +11:00
Geoff Levand
774fee58c4 [PATCH] powerpc: Add missing vmlinux.bin target
With this patch 'make vmlinux.bin' works.  This is needed by
some embedded platforms.  Kumar already added the routines
to actually build the image in arch/powerpc/boot/Makefile.

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:59:53 +11:00
Jon Mason
2ef9481e66 [PATCH] powerpc: trivial: modify comments to refer to new location of files
This patch removes all self references and fixes references to files
in the now defunct arch/ppc64 tree.  I think this accomplises
everything wanted, though there might be a few references I missed.

Signed-off-by: Jon Mason <jdmason@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:53:51 +11:00
Michael Ellerman
1965746bce [PATCH] powerpc: Move pSeries firmware feature setup into platforms/pseries
Currently we have some stuff in firmware.h and kernel/firmware.c that is
#ifdef CONFIG_PPC_PSERIES. Move it all into platforms/pseries.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:52:03 +11:00
Michael Ellerman
0941d57aa7 [PATCH] powerpc: Clean up pSeries firmware feature initialisation
Clean up fw_feature_init in platforms/pseries/setup.c. Clean up white space
and replace the while loop with a for loop - which seems clearer to me.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:52:02 +11:00
Becky Bruce
a7cb03375d [PATCH] powerpc/ppc: Add missing isyncs in head_fsl_booke.S
The e500 core reference manual indicates that isync is required
after mtmsr(DE bit) and mtspr DBCR0.  Add isyncs to make the code
conform to the spec.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:52:00 +11:00
Becky Bruce
fbc94e7c3d [PATCH] powerpc: lindent 85xx platform code
Ran arch/powerpc/platforms/85xx through Lindent

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:51:57 +11:00
Becky Bruce
e19217d42e [PATCH] powerpc: rename mpc85xx.c to misc.c
Rename mpc85xx.c to misc.c to match the pattern established by the
8349 port - consistency is a good thing.  Also run Lindent on the
file to clean it up.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:51:56 +11:00
Becky Bruce
46ed55f647 [PATCH] powerpc: mpc85xx_ads.c include file cleanup
Cut-and-paste from the old platform code in arch/ppc resulted in
arch/powerpc/platforms/85xx/mpc85xx_ads.c having way too many
header files included.  Clean this up.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:51:53 +11:00
Becky Bruce
66f2d025e2 [PATCH] powerpc: Fix Kernel FP unavail exception for BookE
Updated FP unavailable exception to refer to the correct
function in traps.c. head_booke.h was using the old name, KernelFP,
instead of kernel_fp_unavailable_exception.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:51:50 +11:00
Paul Mackerras
d6d93856cb Merge ../powerpc-merge 2006-02-10 16:51:29 +11:00
JANAK DESAI
b37ce281d7 [PATCH] powerpc: unshare system call registration
Registers system call for the powerpc architecture.

Signed-off-by: Janak Desai <janak@us.ibm.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Michael Kerrisk <mtk-manpages@gmx.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:34:54 +11:00
Paul Mackerras
8568daa490 ppc: Use the system call table from arch/powerpc/kernel/systbl.S
With this, new system calls only have to be wired up in one place
for ARCH=ppc and ARCH=powerpc, rather than 2.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-10 16:02:20 +11:00
Al Viro
6fa2ffe901 [PATCH] fix iomem annotations in dart_iommu
it's int __iomem *, not int * __iomem...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-08 01:04:30 -05:00
Al Viro
29e646df78 [PATCH] powerpc signal __user annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-08 01:03:46 -05:00
Al Viro
de125bf395 [PATCH] powermac pci iomem annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-08 01:03:33 -05:00
Linus Torvalds
fe69102188 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2006-02-07 20:32:13 -08:00
Al Viro
1d0bd717c8 [PATCH] bogus extern in low_i2c.c
extern in function definition is an odd thing..

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07 20:58:39 -05:00
Al Viro
d04e4e115b [PATCH] eeh_driver NULL noise removal
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07 20:58:33 -05:00
Al Viro
4fb7d9827e [PATCH] drive_info removal outside of arch/i386
drive_info is used only by hd.c and that happens under #ifdef __i386__.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-02-07 20:56:47 -05:00
Paul Mackerras
8f75015f33 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2006-02-08 09:43:08 +11:00
Kumar Gala
e060e084e7 [PATCH] powerpc: Lindent platforms/83xx
Ran arch/powerpc/platforms/83xx through Lindent

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 22:38:44 +11:00
Kumar Gala
30f5933657 [PATCH] powerpc: Cleanup MPC83xx platform support
Moved some code around so its usable by more systems than just
the MPC834x SYS.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 22:38:42 +11:00
Kumar Gala
4b10cfd40e [PATCH] powerpc: Add platform support for MPC834x USB controllers
Setup the platform devices needed by the Freescale EHCI USB
host controllers based on a flat device tree

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 22:38:41 +11:00
Olaf Hering
158daa4cc8 [PATCH] powerpc: remove check for ELF offset in powerpc bootimage
Do not check for offset, it is always set.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 22:38:39 +11:00
Michael Ellerman
3b9331dac1 [PATCH] powerpc: Move LMB_ALLOC_ANYWHERE out of lmb.h
LMB_ALLOC_ANYWHERE doesn't need to be part of the API, it's only used in
lmb.c - so move it out of the header file.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 22:38:36 +11:00
Michael Ellerman
d7a5b2ffa1 [PATCH] powerpc: Always panic if lmb_alloc() fails
Currently most callers of lmb_alloc() don't check if it worked or not, if it
ever does weird bad things will probably happen. The few callers who do check
just panic or BUG_ON.

So make lmb_alloc() panic internally, to catch bugs at the source. The few
callers who did check the result no longer need to.

The only caller that did anything interesting with the return result was
careful_allocation(). For it we create __lmb_alloc_base() which _doesn't_ panic
automatically, a little messy, but passable.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 22:38:34 +11:00
Kumar Gala
2fb07d776b [PATCH] powerpc: cleaned up fsl_soc.c
Cleaned up fsl_soc.c based on comments from Olof Johansson.  Ran through
Lindent, and split gfar_mdio init into its own function.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-02-07 22:38:32 +11:00