Skip to contentSkip to conversation

use correct register names in arch/ppc/kernel/relocate_kernel.S

PATCH In review Olaf Hering 3 participants 3 messages Jun 29, 2005 – Jun 30, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 use correct register names in arch/ppc/kernel/relocate_kernel.S

CONFIG_KEXEC=y doesnt work:

arch/ppc/kernel/relocate_kernel.S:37: Error: unsupported relocation against SRR1 arch/ppc/kernel/relocate_kernel.S:39: Error: unsupported relocation against SRR0

arch/ppc/kernel/relocate_kernel.S +2 -2
Index: linux-2.6.13-rc1/arch/ppc/kernel/relocate_kernel.S
===================================================================
@@ -34,9 +34,9 @@ relocate_new_kernel:
 
 	mr	r8, r0
 	ori     r8, r8, MSR_RI|MSR_ME
-	mtspr	SRR1, r8
+	mtspr	SPRN_SRR1, r8
 	addi	r8, r4, 1f - relocate_new_kernel
-	mtspr	SRR0, r8
+	mtspr	SPRN_SRR0, r8
 	sync
 	rfi
 
#1 lore raw

arch/ppc/kernel/relocate_kernel.S relocate_new_kernel: · line 41

Quoted 13 lines
arch/ppc/kernel/relocate_kernel.S +2 -2
@@ -34,9 +34,9 @@ relocate_new_kernel:
 
 	mr	r8, r0
 	ori     r8, r8, MSR_RI|MSR_ME
-	mtspr	SRR1, r8
+	mtspr	SPRN_SRR1, r8
 	addi	r8, r4, 1f - relocate_new_kernel
-	mtspr	SRR0, r8
+	mtspr	SPRN_SRR0, r8
 	sync
 	rfi

Or just mtsrr0 c.q. mtsrr1.

Segher

#2 lore raw
Quoted 4 lines · Segher Boessenkool
Quoted 4 lines
arch/ppc/kernel/relocate_kernel.S +0 -0
@@ -34,9 +34,9 @@ relocate_new_kernel:
 
Quoted 11 lines

arch/ppc/kernel/relocate_kernel.S relocate_new_kernel: · line 41

Quoted 9 lines
arch/ppc/kernel/relocate_kernel.S +2 -2
 	mr	r8, r0
 	ori     r8, r8, MSR_RI|MSR_ME
-	mtspr	SRR1, r8
+	mtspr	SPRN_SRR1, r8
 	addi	r8, r4, 1f - relocate_new_kernel
-	mtspr	SRR0, r8
+	mtspr	SPRN_SRR0, r8
 	sync
 	rfi

Or just mtsrr0 c.q. mtsrr1

They are lovely but shits me when I grep for SPRN_SRR0 :) I tend to prefer consistency here and so if we start using mtsrr0/1, then we should change the whole kernel at once and not have a mix of SPRN_* and mt*

Ben.