dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

63 Commits

Author SHA1 Message Date
David Gibson 6cb7bfebb1 [PATCH] powerpc: Merge thread_info.h
Merge ppc32 and ppc64 versions of thread_info.h.  They were pretty
similar already, the chief changes are:

	- Instead of inline asm to implement current_thread_info(),
which needs to be different for ppc32 and ppc64, we use C with an
asm("r1") register variable.  gcc turns it into the same asm as we
used to have for both platforms.
	- We replace ppc32's 'local_flags' with the ppc64
'syscall_noerror' field.  The noerror flag was in fact the only thing
in the local_flags field anyway, so the ppc64 approach is simpler, and
means we only need a load-immediate/store instead of load/mask/store
when clearing the flag.
	- In readiness for 64k pages, when THREAD_SIZE will be less
than a page, ppc64 used kmalloc() rather than get_free_pages() to
allocate the kernel stack.  With this patch we do the same for ppc32,
since there's no strong reason not to.
	- For ppc64, we no longer export THREAD_SHIFT and THREAD_SIZE
via asm-offsets, thread_info.h can now be safely included in asm, as
on ppc32.

Built and booted on G4 Powerbook (ARCH=ppc and ARCH=powerpc) and
Power5 (ARCH=ppc64 and ARCH=powerpc).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-21 22:47:23 +10:00
Paul Mackerras 5d14a18d59 powerpc: Fix some bugs in the new merged time code
I had the sense of the test for when to use the old 601-style RTC
registers inverted.  pmac_calibrate_decr and via_calibrate_decr
weren't setting ppc_tb_freq, on which all the further calculations
depended.  Lastly, update_gtod was losing the top 32 bits of
the new tb_to_xs value.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 22:33:06 +10:00
Paul Mackerras 374e99d450 powerpc: Move some calculations from xxx_calibrate_decr to time_init
Previously the individual xxx_calibrate_decr functions would each
print the timebase and cpu frequency and calculate several values
such as tb_to_us and tb_to_xs.  This moves those printks and
calculations into time_init just after the call to the platform's
calibrate_decr function.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 21:04:51 +10:00
Paul Mackerras 0458060c1c ppc64: Move init_boot_text call and conswitchp init into setup_arch
This way they get done in one place for all platforms, and it is
more consistent with what ppc32 does.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 21:00:20 +10:00
Paul Mackerras 0dd194d02d powerpc: Fix places where ppc_md.show_[per]cpuinfo was treated as int
I missed a few places where ppc code was still assuming that the
ppc_md.show_[per]cpuinfo functions returned int.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 20:48:19 +10:00
Paul Mackerras d8699e65c6 ppc64: Change ppc_md.get_cpuinfo to ppc_md.show_cpuinfo
... for consistency with ppc32; also add in ppc32's show_percpuinfo
function.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 17:02:01 +10:00
David Gibson f7f6f4fea6 [PATCH] powerpc: Merge ppc64 pmc.[ch] with ppc32 perfmon.[ch]
This patches the ppc32 and ppc64 versions of the headers and .c files
with helper functions for manipulating the performance counting
hardware.  As a side effect, it removes use of the term "perfmon" from
ppc32, thus avoiding confusion with the unrelated performance counter
interface from HP Labs also called "perfmon".

Built, but not booted, for g5, pSeries, iSeries, and 32-bit Powermac
with both ARCH=powerpc and ARCH=ppc{,64} as appropriate.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 16:22:24 +10:00
Paul Mackerras a4bcc95a3a powerpc: Fix a branch-too-far link error for 32-bit targets
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:24:18 +10:00
Paul Mackerras f2783c1500 powerpc: Merge time.c and asm/time.h.
We now use the merged time.c for both 32-bit and 64-bit compilation
with ARCH=powerpc, and for ARCH=ppc64, but not for ARCH=ppc32.
This removes setup_default_decr (folds its function into time_init)
and moves wakeup_decrementer into time.c.  This also makes an
asm-powerpc/rtc.h.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:23:26 +10:00
Paul Mackerras b123923d48 powerpc: Move ptrace32.c from arch/ppc64 to arch/powerpc
Also corrected my email address in ptrace.c and updated the comments
at the top of ptrace32.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-20 09:11:29 +10:00
Paul Mackerras 9b7cf8b49d powerpc: Eliminate a compile warning in signal_32.c
The second argument of get_sigset_t needed to have the const keyword.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-19 23:13:04 +10:00
Paul Mackerras 46aab8c584 Merge rsync://oak/kernels/iseries/work/ 2005-10-18 14:53:41 +10:00
Stephen Rothwell b09a4913b1 powerpc: change sys32_ to compat_sys_
This allows us to get rid of one type of entry in systbl.S.

In passing we remove the duplicate compat_sys_getdents and
compat_sys_utimes for which there are generic versions.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
2005-10-18 14:51:57 +10:00
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 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 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 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 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 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 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 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
Paul Mackerras e574d238ab powerpc: Fix compilation for 32-bit configs
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:58:10 +10:00
Paul Mackerras c5200c90db powerpc: Fix off-by-one error in prom_init.c
This was preventing us from recognizing that we did actually
instantiate RTAS successfully on pSeries.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:57:03 +10:00
Paul Mackerras 40ef8cbc6d powerpc: Get 64-bit configs to compile with ARCH=powerpc
This is a bunch of mostly small fixes that are needed to get
ARCH=powerpc to compile for 64-bit.  This adds setup_64.c from
arch/ppc64/kernel/setup.c and locks.c from arch/ppc64/lib/locks.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:50:37 +10:00
Paul Mackerras bc6f8a4b19 powerpc: move lparmap.c to arch/powerpc/kernel
Since lparmap.s gets included in arch/powerpc/kernel/head_64.S,
this avoids depending on a file in another directory.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:45:07 +10:00
Paul Mackerras 5a408329ed powerpc: Fix bug caused by negation of 64-bit reloc_offset value
Although both ppc32 and ppc64 have a reloc_offset function, the ppc64
one produced the opposite sign to the ppc32 one.  This standardizes
on the ppc32 sign and fixes the merged 64-bit code to account for that.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:41:25 +10:00
Paul Mackerras 4a2885630b powerpc: Reduce the 32/64-bit diffs in vmlinux.lds.S
Also adds the definition of the _sdata symbol to the ppc64 vmlinux.lds.S.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:38:46 +10:00
Paul Mackerras 8641778049 powerpc: Reduce the 32/64-bit differences in traps.c
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:37:57 +10:00
Paul Mackerras b42b661745 powerpc: Make prom_init.c suitable for both 32-bit and 64-bit
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:37:16 +10:00
Paul Mackerras 9994a33865 powerpc: Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S
The system call table has been consolidated into systbl.S.  We have
separate 32-bit and 64-bit versions of entry.S and misc.S since the
code is mostly sufficiently different to be not worth merging.
There are some common bits that will be extracted in future.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:36:14 +10:00
Paul Mackerras 06d67d5474 powerpc: make process.c suitable for both 32-bit and 64-bit
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:29:05 +10:00
Paul Mackerras b3b8dc6c07 powerpc: Use reg.h instead of processor.h when we just want reg names
Now that the register names and bit definitions are all in reg.h,
use that instead of processor.h in assembly code in a few places.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 22:20:10 +10:00
Paul Mackerras 70d64ceaa1 powerpc: Rename files to have consistent _32/_64 suffixes
This doesn't change any code, just renames things so we consistently
have foo_32.c and foo_64.c where we have separate 32- and 64-bit
versions.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 21:52:43 +10:00
Paul Mackerras b5bbeb2373 powerpc: Use SPRN_xxx rather than xxx for SPR numbers
This changes symbols like HID0, SPRG3, SRR0, SRR1 etc. that refer to
special purpose registers to SPRN_HID0, SPRN_SPRG3, etc.  Using the
SPRN_ symbols clutters the namespace less, and the forthcoming merge
of asm/processor.h and asm/reg.h is going to remove the non-SPRN_
versions.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-10 14:01:07 +10:00
Paul Mackerras c16ff7e448 powerpc: Define a _sdata symbol
This is needed by arch/powerpc/mm/mem.c now.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-06 13:28:31 +10:00
Paul Mackerras 8dad3f9257 powerpc: Merge traps.c a bit more
This reduces the differences between ppc32 and ppc64 in
arch/powerpc/kernel/traps.c a bit further.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-06 13:27:05 +10:00
Paul Mackerras b3491269f5 powerpc: Use the merged of_device.c with ARCH=powerpc
Also compile btext.c with -fPIC; this was missed before.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-06 13:24:50 +10:00
Paul Mackerras 2e686bc3bf powerpc: Merge of_device.c and of_device.h
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-06 13:22:17 +10:00
Paul Mackerras 187a00679a powerpc: Remove 64-bit cpu support from ppc32.
These days there is no good reason to run a ppc32 kernel on a 64-bit
cpu, rather than a ppc64 kernel, so remove the config option and a
bunch of code (and ifdefs) from head.S.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-10-06 12:49:05 +10:00