diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-26 03:05:24 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-26 03:05:24 -0400 |
commit | 033ef338b6e007dc081c6282a4f2a9dd761f8cd2 (patch) | |
tree | 3c77fad71c3d9ba04ddcdaea33063aaf7520ddb0 /arch/powerpc/kernel/entry_32.S | |
parent | f9bd170a87948a9e077149b70fb192c563770fdf (diff) |
powerpc: Merge rtas.c into arch/powerpc/kernel
This splits arch/ppc64/kernel/rtas.c into arch/powerpc/kernel/rtas.c,
which contains generic RTAS functions useful on any CHRP platform,
and arch/powerpc/platforms/pseries/rtas-fw.[ch], which contain
some pSeries-specific firmware flashing bits. The parts of rtas.c
that are to do with pSeries-specific error logging are protected
by a new CONFIG_RTAS_ERROR_LOGGING symbol. The inclusion of rtas.o
is controlled by the CONFIG_PPC_RTAS symbol, and the relevant
platforms select that.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/entry_32.S')
-rw-r--r-- | arch/powerpc/kernel/entry_32.S | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S index 37b4396ca978..960da7bea043 100644 --- a/arch/powerpc/kernel/entry_32.S +++ b/arch/powerpc/kernel/entry_32.S | |||
@@ -954,7 +954,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_601) | |||
954 | * here so it's easy to add arch-specific sections later. | 954 | * here so it's easy to add arch-specific sections later. |
955 | * -- Cort | 955 | * -- Cort |
956 | */ | 956 | */ |
957 | #ifdef CONFIG_PPC_OF | 957 | #ifdef CONFIG_PPC_RTAS |
958 | /* | 958 | /* |
959 | * On CHRP, the Run-Time Abstraction Services (RTAS) have to be | 959 | * On CHRP, the Run-Time Abstraction Services (RTAS) have to be |
960 | * called with the MMU off. | 960 | * called with the MMU off. |
@@ -963,14 +963,13 @@ _GLOBAL(enter_rtas) | |||
963 | stwu r1,-INT_FRAME_SIZE(r1) | 963 | stwu r1,-INT_FRAME_SIZE(r1) |
964 | mflr r0 | 964 | mflr r0 |
965 | stw r0,INT_FRAME_SIZE+4(r1) | 965 | stw r0,INT_FRAME_SIZE+4(r1) |
966 | lis r4,rtas_data@ha | 966 | LOADADDR(r4, rtas) |
967 | lwz r4,rtas_data@l(r4) | ||
968 | lis r6,1f@ha /* physical return address for rtas */ | 967 | lis r6,1f@ha /* physical return address for rtas */ |
969 | addi r6,r6,1f@l | 968 | addi r6,r6,1f@l |
970 | tophys(r6,r6) | 969 | tophys(r6,r6) |
971 | tophys(r7,r1) | 970 | tophys(r7,r1) |
972 | lis r8,rtas_entry@ha | 971 | lwz r8,RTASENTRY(r4) |
973 | lwz r8,rtas_entry@l(r8) | 972 | lwz r4,RTASBASE(r4) |
974 | mfmsr r9 | 973 | mfmsr r9 |
975 | stw r9,8(r1) | 974 | stw r9,8(r1) |
976 | LOAD_MSR_KERNEL(r0,MSR_KERNEL) | 975 | LOAD_MSR_KERNEL(r0,MSR_KERNEL) |
@@ -978,7 +977,6 @@ _GLOBAL(enter_rtas) | |||
978 | MTMSRD(r0) /* don't get trashed */ | 977 | MTMSRD(r0) /* don't get trashed */ |
979 | li r9,MSR_KERNEL & ~(MSR_IR|MSR_DR) | 978 | li r9,MSR_KERNEL & ~(MSR_IR|MSR_DR) |
980 | mtlr r6 | 979 | mtlr r6 |
981 | CLR_TOP32(r7) | ||
982 | mtspr SPRN_SPRG2,r7 | 980 | mtspr SPRN_SPRG2,r7 |
983 | mtspr SPRN_SRR0,r8 | 981 | mtspr SPRN_SRR0,r8 |
984 | mtspr SPRN_SRR1,r9 | 982 | mtspr SPRN_SRR1,r9 |
@@ -999,4 +997,4 @@ machine_check_in_rtas: | |||
999 | twi 31,0,0 | 997 | twi 31,0,0 |
1000 | /* XXX load up BATs and panic */ | 998 | /* XXX load up BATs and panic */ |
1001 | 999 | ||
1002 | #endif /* CONFIG_PPC_OF */ | 1000 | #endif /* CONFIG_PPC_RTAS */ |