Commit Graph

2423 Commits

Author SHA1 Message Date
Paul Mackerras
77f543cb46 powerpc: Fix various compile errors with ARCH=ppc, ppc64 and powerpc
This makes ppc use the syscalls.c from arch/powerpc/kernel, exports
copy_and_flush from head_32.S for use by prom_init.c (ARCH=powerpc),
and consolidates the sys_fadvise64_64 implementations for 32-bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-18 14:19:41 +10:00
Stephen Rothwell
81e7009ea4 powerpc: merge ppc signal.c and ppc64 signal32.c
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-18 11:17:58 +10:00
David Gibson
55d363397f [PATCH] powerpc: Another maple merge tree fix
With ARCH=powerpc, a spurious ifdef in prom_init prevented the
seconday hold loop being correctly copied down on Maple.  With this
patch, Maple boots with ARCH=powerpc

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 21:43:12 +10:00
David Gibson
61f684ec07 [PATCH] powerpc: Fix use of LOADBASE in merge tree
The merge-tree version of LOADBASE actually loads the whole given
address from the toc for ppc64.  The matching OFF macro adjust for
this, using an offset of 0 for ppc64, but we weren't using that in
power4_idle.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 21:43:12 +10:00
Kumar Gala
ea703ce206 [PATCH] powerpc: replace use of _GLOBAL with .globl
The _GLOBAL() macro is for text symbols only. Changed to using
.globl for .data symbols.

Signed-off-by: Kumar K. Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 21:43:12 +10:00
Paul Mackerras
5f29675533 powerpc: Make CONFIG_PROC_DEVICETREE independent of CONFIG_PPC_OF
... since all platforms will have a device tree.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 20:14:59 +10:00
Paul Mackerras
dd184343b4 powerpc: Clear the BSS at the start of early_init with ARCH=ppc
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 20:13:47 +10:00
Paul Mackerras
7ac59c6249 ppc: Fix various compile errors resulting from ptrace.c merge
This introduces flush_{fp,altivec,spe}_to_thread and fixes a
branch-too-far error in linking.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 20:12:39 +10:00
Paul Mackerras
3e63b9ec51 ppc: Use the merged of_device.c from arch/powerpc/kernel
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 20:11:03 +10:00
Paul Mackerras
30286ef6e0 powerpc: Merge syscalls.c and sys_ppc32.c.
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 20:10:13 +10:00
Paul Mackerras
30cd4a4e9c powerpc: Initialize btext subsystem later, after prom_init
We were initializing the btext stuff from prom_init(), thus breaking
the rule that all communication between prom_init() and the rest of
the kernel has to be via the flattened device tree.  This removes
the btext initialization calls from prom_init() and initializes it
instead after the device tree is unflattened.  It would be nice to
do it earlier, but that needs some more infrastructure to find the
properties we need in the flattened device tree.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-17 19:20:46 +10:00
Stephen Rothwell
7dffb72028 ppc32: use L1_CACHE_SHIFT/L1_CACHE_BYTES
instead of L1_CACHE_LINE_SIZE and LG_L1_CACHE_LINE_SIZE

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-17 11:50:32 +10:00
Stephen Rothwell
c6d2ea92d1 powerpc: move iSeries/HvCallPci.h to platforms/iseries/call_pci.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 17:16:17 +10:00
Stephen Rothwell
0e29bb1a4e powerpc: move iSeries/HvCallHpt.h to platforms/iseries/call_hpt.h
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 17:09:16 +10:00
Stephen Rothwell
20f48ccfa0 powerpc: eliminate DsaAddr from pci_dn
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 16:49:58 +10:00
Stephen Rothwell
bffa8fc383 powerpc: remove ISERIES_[SUB]BUS macros
This allows us to simplify a couple of things.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 15:06:10 +10:00
Stephen Rothwell
426c1a11a6 powerpc: move iSeries/iSeries_pci.h to platforms/iseries
The only real user of this file outside platforms/iseries was
drivers/net/iseries_veth.c but all it wanted was ISERIES_HV_ADDR()
so we move that to abs_addr.h (and lowercase it).

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-14 14:51:42 +10:00
Stephen Rothwell
190554db7b powerpc: fix uname -m
It will now give ppc64 on 64bit platforms and ppc on 32bit
platforms.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13 16:14:15 +10:00
Stephen Rothwell
e8a30302ab powerpc: merge ptrace.c
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13 15:52:04 +10:00
Stephen Rothwell
eec5ef9098 ppc64: use powerpc of_device.c
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13 15:16:25 +10:00
Stephen Rothwell
ae2752050d ppc64: fix arch/ppc64/kernel/Makefile
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13 14:12:25 +10:00
Stephen Rothwell
d4bf9a7858 ppc64: merge binfmt_elf32.c
and use start_thread for both 32 and 64 bit bineries.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13 13:40:54 +10:00
Stephen Rothwell
0f17d0742f powerpc: make 64 bit binaries work
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13 09:49:56 +10:00
Stephen Rothwell
7062018687 powerpc: create 32 bit LOADADDR macro
and use it in misc_32.S

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13 09:49:51 +10:00
Stephen Rothwell
4920960f57 powerpc: consolidate cputable.c
Also simplify arch/ppc64/kernel/Makefile

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-13 09:49:45 +10:00
Paul Mackerras
5629d41d5c powerpc: Bring in some changes made to arch/ppc and include/asm-ppc64
Recent commits upstream have changed files which are currently
duplicated in arch/powerpc and include/asm-powerpc.  This updates
them with the corresponding changes.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-12 17:01:50 +10:00
Paul Mackerras
3eac8c69d1 powerpc: Move default hash table size calculation to hash_utils_64.c
We weren't computing the size of the hash table correctly on iSeries
because the relevant code in prom.c was #ifdef CONFIG_PPC_PSERIES.
This moves the code to hash_utils_64.c, makes it unconditional, and
cleans it up a bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-12 16:58:53 +10:00
Paul Mackerras
b6ec995a21 Merge from Linus' tree 2005-10-12 14:43:32 +10:00
Stephen Rothwell
3a5f8c5f78 powerpc: make iSeries boot again
On ARCH=ppc64 we were getting htab_hash_mask recalculated
to the correct value for our particular machine by accident.
In the merge tree, that code was commented out, so htab_hash_mask
was being corrupted.

We now set ppc64_pft_size instead which gets htab_has_mask
calculated correctly for us later.  We should put an
ibm,pft-size property in the device tree at some point.

Also set -mno-minimal-toc in some makefiles.
Allow iSeries to configure PROC_DEVICETREE.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-12 10:58:00 +10:00
Stephen Rothwell
f255f0dd1b powerpc: pci_dn's should point to their device_node's
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-12 10:57:45 +10:00
Linus Torvalds
da64c6ee6b Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-10-11 16:39:24 -07:00
David S. Miller
b1b510aa28 [SPARC64]: Fix net booting on Ultra5
We were not doing alignment properly when remapping the kernel image.

What we want is a 4MB aligned physical address to map at KERNBASE.
Mistakedly we were 4MB aligning the virtual address where the kernel
initially sits, that's wrong.

Instead, we should PAGE align the virtual address, then 4MB align the
physical address result the prom gives to us.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-10-11 15:45:16 -07:00
Peter Bergner
9149ccfa35 [PATCH] ppc64: Add R_PPC64_TOC16 module reloc
Newer gcc's are generating this relocation, so the module loader needs to
handle it.

Signed-off-by: Peter Bergner <bergner@vnet.ibm.com>
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-11 09:46:54 -07:00
Hirokazu Takata
9de11aab1c [PATCH] m32r: trap handler code for illegal traps
This patch prevents illegal traps from causing m32r kernel's infinite loop
execution.

Signed-off-by: Naoto Sugai <sugai@isl.melco.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-11 09:46:54 -07:00
Paolo Galtieri
a0c111c631 [PATCH] ppc highmem fix
I've noticed that the calculations for seg_size and nr_segs in
__dma_sync_page_highmem() (arch/ppc/kernel/dma-mapping.c) are wrong.  The
incorrect calculations can result in either an oops or a panic when running
fsck depending on the size of the partition.

The problem with the seg_size calculation is that it can result in a
negative number if size is offset > size.  The problem with the nr_segs
caculation is returns the wrong number of segments, e.g.  it returns 1 when
size is 200 and offset is 4095, when it should return 2 or more.

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-11 09:46:54 -07:00
Anton Blanchard
e4314bf496 [PATCH] ppc64: Fix PCI hotplug
pSeries_irq_bus_setup is marked __devinit but references s7a_workaround
which is marked __initdata.

Depending on who got the memory for s7a_workaround (and if the value was
now positive), it was possible for PCI hotplugged devices to have 3
subtracted from their interrupt number.  This would happen randomly and
caused me much confusion :)

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-11 09:46:53 -07:00
Paul Mackerras
f696012330 ppc64: compile fix - define execve in misc.S
This used to be inline in include/asm-ppc64/unistd.h, but isn't
inline in the merged include/asm-powerpc/unistd.h, so we need a
definition here.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11 22:10:49 +10:00
Paul Mackerras
3abec857a0 ppc64: Use merged versions of init_task.c and process.c.
These two files are now built in arch/powerpc/kernel instead of
arch/ppc64/kernel.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11 22:09:48 +10:00
Paul Mackerras
fd582ec88e ppc: Various minor compile fixes
This fixes up a variety of minor problems in compiling with ARCH=ppc
arising from using the merged versions of various header files.
A lot of the changes are just adding #include <asm/machdep.h> to
files that use ppc_md or smp_ops_t.

This also arranges for us to use semaphore.c, vecemu.c, vector.S and
fpu.S from arch/powerpc/kernel when compiling with ARCH=ppc.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11 22:08:12 +10:00
Paul Mackerras
35d81a4bfe ppc: Adapt to asm-powerpc/irq.h irq_canonicalize changes
Now instead of having a ppc_md function, we just have a variable
which says whether to do the i8259 irq canonicalization or not,
and set that variable on the platforms that need that.  It looks
to me that radstone_ppc7d was trying to use irq canonicalization
for something else in a broken kind of way - it will need to be
fixed properly.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11 22:03:09 +10:00
Paul Mackerras
cc5aa206d2 powerpc: Remove debug messages from setup_64.c
A bunch of printks were left in arch/powerpc/kernel/setup_64.c from
when I was chasing a bug.  This removes them.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11 17:35:20 +10:00
David S. Miller
08eb8f124f [SPARC32]: Revert IOMAP change eb98129eec
Breakage noted by Al Viro.

It breaks non-PCI builds, it's probably better to have a more
direct implementation on sparc32, and which driver actually
needs this is still questionable.

We can resolve this in 2.6.15

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-10-10 21:02:26 -07:00
Paul Mackerras
abc244dd85 powerpc: Remove xmon.h include from arch/powerpc/platforms/powermac/pic.c
... since it isn't needed.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11 10:00:07 +10:00
Paul Mackerras
8d66912c3d powerpc: Remove 83xx from arch/powerpc/platforms/Makefile for now
Since we don't have an 83xx directory or a 83xx/Makefile, having
83xx in causes make clean to fail.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11 09:59:53 +10:00
Paul Mackerras
20f629549b powerpc: Make building the boot image work for both 32-bit and 64-bit
At the moment we don't have a merged arch/powerpc/boot, so we build the
boot images in arch/ppc/boot and arch/ppc64/boot.  Unfortunately the
makefile targets are different in those two directories, so this makes
a change to accommodate both for the moment.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-11 09:59:32 +10:00
Andi Kleen
3c92c2ba33 [PATCH] i386: Don't discard upper 32bits of HWCR on K8
Need to use long long, not long when RMWing a MSR. I think
it's harmless right now, but still should be better fixed
if AMD adds any bits in the upper 32bit of HWCR.

Bug was introduced with the TLB flush filter fix for i386

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-10 16:34:09 -07:00
Andi Kleen
421c7ce6d0 [PATCH] x86_64: Allocate cpu local data for all possible CPUs
CPU hotplug fills up the possible map to NR_CPUs, but it did that after
setting up per CPU data. This lead to CPU data not getting allocated
for all possible CPUs, which lead to various side effects.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-10 16:33:25 -07:00
Linus Torvalds
af74c3a61d Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-10-10 16:32:32 -07:00
David S. Miller
5d8e1b181c [SPARC64]: Fix Ultra5, Ultra60, et al. boot failures.
On the boot processor, we need to do the move onto the Linux trap
table a little bit differently else we'll take unhandlable faults in
the firmware address space.

Previously we would do the following:

1) Disable PSTATE_IE in %pstate.
2) Set %tba by hand to sparc64_ttable_tl0
3) Initialize alternate, mmu, and interrupt global
   trap registers.
4) Call prom_set_traptable()

That doesn't work very well actually with the way we boot the kernel
VM these days.  It worked by luck on many systems because the firmware
accesses for the prom_set_traptable() call happened to be loaded into
the TLB already, something we cannot assume.

So the new scheme is this:

1) Clear PSTATE_IE in %pstate and set %pil to 15
2) Call prom_set_traptable()
3) Initialize alternate, mmu, and interrupt global
   trap registers.

and this works quite well.  This sequence has been moved into a
callable function in assembler named setup-trap_table().  The idea is
that eventually trampoline.S can use this code as well.  That isn't
possible currently due to some complications, but eventually we should
be able to do it.

Thanks to Meelis Roos for the Ultra5 boot failure report.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-10-10 16:12:13 -07:00
Andi Kleen
094804c5a1 [PATCH] x86_64: Fix change_page_attr cache flushing
Noticed by Terence Ripperda

Undo wrong change in global_flush_tlb. We need to flush the caches in all
cases, not just when pages were reverted. This was a bogus optimization
added earlier, but it was wrong.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-10 16:10:33 -07:00