git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'intx' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6
[pandora-kernel.git]
/
arch
/
powerpc
/
kernel
/
head_64.S
diff --git
a/arch/powerpc/kernel/head_64.S
b/arch/powerpc/kernel/head_64.S
index
d289005
..
71b1fe5
100644
(file)
--- a/
arch/powerpc/kernel/head_64.S
+++ b/
arch/powerpc/kernel/head_64.S
@@
-72,13
+72,11
@@
.text
.globl _stext
_stext:
.text
.globl _stext
_stext:
-#ifdef CONFIG_PPC_MULTIPLATFORM
_GLOBAL(__start)
/* NOP this out unconditionally */
BEGIN_FTR_SECTION
b .__start_initialization_multiplatform
END_FTR_SECTION(0, 1)
_GLOBAL(__start)
/* NOP this out unconditionally */
BEGIN_FTR_SECTION
b .__start_initialization_multiplatform
END_FTR_SECTION(0, 1)
-#endif /* CONFIG_PPC_MULTIPLATFORM */
/* Catch branch to 0 in real mode */
trap
/* Catch branch to 0 in real mode */
trap
@@
-505,7
+503,7
@@
BEGIN_FTR_SECTION
rlwimi r13,r12,16,0x20
mfcr r12
cmpwi r13,0x2c
rlwimi r13,r12,16,0x20
mfcr r12
cmpwi r13,0x2c
- beq
.
do_stab_bolted_pSeries
+ beq do_stab_bolted_pSeries
mtcrf 0x80,r12
mfspr r12,SPRN_SPRG2
END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
mtcrf 0x80,r12
mfspr r12,SPRN_SPRG2
END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
@@
-635,7
+633,7
@@
masked_interrupt:
b .
.align 7
b .
.align 7
-_GLOBAL(do_stab_bolted_pSeries)
+do_stab_bolted_pSeries:
mtcrf 0x80,r12
mfspr r12,SPRN_SPRG2
EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted)
mtcrf 0x80,r12
mfspr r12,SPRN_SPRG2
EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted)
@@
-827,7
+825,7
@@
system_reset_iSeries:
cmpwi 0,r23,0
beq iSeries_secondary_smp_loop /* Loop until told to go */
cmpwi 0,r23,0
beq iSeries_secondary_smp_loop /* Loop until told to go */
- bne
.__secondary_start
/* Loop until told to go */
+ bne
__secondary_start
/* Loop until told to go */
iSeries_secondary_smp_loop:
/* Let the Hypervisor know we are alive */
/* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */
iSeries_secondary_smp_loop:
/* Let the Hypervisor know we are alive */
/* 8002 is a call to HvCallCfg::getLps, a harmless Hypervisor function */
@@
-848,7
+846,6
@@
iSeries_secondary_smp_loop:
b 1b /* If SMP not configured, secondaries
* loop forever */
b 1b /* If SMP not configured, secondaries
* loop forever */
- .globl decrementer_iSeries_masked
decrementer_iSeries_masked:
/* We may not have a valid TOC pointer in here. */
li r11,1
decrementer_iSeries_masked:
/* We may not have a valid TOC pointer in here. */
li r11,1
@@
-859,7
+856,6
@@
decrementer_iSeries_masked:
mtspr SPRN_DEC,r12
/* fall through */
mtspr SPRN_DEC,r12
/* fall through */
- .globl hardware_interrupt_iSeries_masked
hardware_interrupt_iSeries_masked:
mtcrf 0x80,r9 /* Restore regs */
ld r12,PACALPPACAPTR(r13)
hardware_interrupt_iSeries_masked:
mtcrf 0x80,r9 /* Restore regs */
ld r12,PACALPPACAPTR(r13)
@@
-1090,7
+1086,7
@@
slb_miss_fault:
li r5,0
std r4,_DAR(r1)
std r5,_DSISR(r1)
li r5,0
std r4,_DAR(r1)
std r5,_DSISR(r1)
- b
.
handle_page_fault
+ b handle_page_fault
unrecov_user_slb:
EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
unrecov_user_slb:
EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
@@
-1218,12
+1214,13
@@
program_check_common:
.globl fp_unavailable_common
fp_unavailable_common:
EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
.globl fp_unavailable_common
fp_unavailable_common:
EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
- bne
.load_up_fpu
/* if from user, just load it up */
+ bne
1f
/* if from user, just load it up */
bl .save_nvgprs
addi r3,r1,STACK_FRAME_OVERHEAD
ENABLE_INTS
bl .kernel_fp_unavailable_exception
BUG_OPCODE
bl .save_nvgprs
addi r3,r1,STACK_FRAME_OVERHEAD
ENABLE_INTS
bl .kernel_fp_unavailable_exception
BUG_OPCODE
+1: b .load_up_fpu
.align 7
.globl altivec_unavailable_common
.align 7
.globl altivec_unavailable_common
@@
-1323,10
+1320,10
@@
_GLOBAL(do_hash_page)
std r4,_DSISR(r1)
andis. r0,r4,0xa450 /* weird error? */
std r4,_DSISR(r1)
andis. r0,r4,0xa450 /* weird error? */
- bne-
.handle_page_fault
/* if not, try to insert a HPTE */
+ bne-
handle_page_fault
/* if not, try to insert a HPTE */
BEGIN_FTR_SECTION
andis. r0,r4,0x0020 /* Is it a segment table fault? */
BEGIN_FTR_SECTION
andis. r0,r4,0x0020 /* Is it a segment table fault? */
- bne-
.do_ste_alloc
/* If so handle it */
+ bne-
do_ste_alloc
/* If so handle it */
END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
/*
END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
/*
@@
-1368,7
+1365,7
@@
BEGIN_FW_FTR_SECTION
* because ret_from_except_lite will check for and handle pending
* interrupts if necessary.
*/
* because ret_from_except_lite will check for and handle pending
* interrupts if necessary.
*/
- beq
.ret_from_except_lite
+ beq
13f
END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
#endif
BEGIN_FW_FTR_SECTION
END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
#endif
BEGIN_FW_FTR_SECTION
@@
-1392,14
+1389,14
@@
END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISERIES)
b 11f
/* Here we have a page fault that hash_page can't handle. */
b 11f
/* Here we have a page fault that hash_page can't handle. */
-_GLOBAL(handle_page_fault)
+handle_page_fault:
ENABLE_INTS
11: ld r4,_DAR(r1)
ld r5,_DSISR(r1)
addi r3,r1,STACK_FRAME_OVERHEAD
bl .do_page_fault
cmpdi r3,0
ENABLE_INTS
11: ld r4,_DAR(r1)
ld r5,_DSISR(r1)
addi r3,r1,STACK_FRAME_OVERHEAD
bl .do_page_fault
cmpdi r3,0
- beq+
.ret_from_except_lite
+ beq+
13f
bl .save_nvgprs
mr r5,r3
addi r3,r1,STACK_FRAME_OVERHEAD
bl .save_nvgprs
mr r5,r3
addi r3,r1,STACK_FRAME_OVERHEAD
@@
-1407,6
+1404,8
@@
_GLOBAL(handle_page_fault)
bl .bad_page_fault
b .ret_from_except
bl .bad_page_fault
b .ret_from_except
+13: b .ret_from_except_lite
+
/* We have a page fault that hash_page could handle but HV refused
* the PTE insertion
*/
/* We have a page fault that hash_page could handle but HV refused
* the PTE insertion
*/
@@
-1417,11
+1416,11
@@
_GLOBAL(handle_page_fault)
b .ret_from_except
/* here we have a segment miss */
b .ret_from_except
/* here we have a segment miss */
-_GLOBAL(do_ste_alloc)
+do_ste_alloc:
bl .ste_allocate /* try to insert stab entry */
cmpdi r3,0
bl .ste_allocate /* try to insert stab entry */
cmpdi r3,0
- b
eq+ fast_exception_return
- b
.handle_page_fault
+ b
ne- handle_page_fault
+ b
fast_exception_return
/*
* r13 points to the PACA, r9 contains the saved CR,
/*
* r13 points to the PACA, r9 contains the saved CR,
@@
-1603,7
+1602,7
@@
_GLOBAL(generic_secondary_smp_init)
ld r1,PACAEMERGSP(r13)
subi r1,r1,STACK_FRAME_OVERHEAD
ld r1,PACAEMERGSP(r13)
subi r1,r1,STACK_FRAME_OVERHEAD
- b
.
__secondary_start
+ b __secondary_start
#endif
#ifdef CONFIG_PPC_ISERIES
#endif
#ifdef CONFIG_PPC_ISERIES
@@
-1626,11
+1625,6
@@
_STATIC(__start_initialization_iSeries)
li r0,0
stdu r0,-STACK_FRAME_OVERHEAD(r1)
li r0,0
stdu r0,-STACK_FRAME_OVERHEAD(r1)
- LOAD_REG_IMMEDIATE(r3,cpu_specs)
- LOAD_REG_IMMEDIATE(r4,cur_cpu_spec)
- li r5,0
- bl .identify_cpu
-
LOAD_REG_IMMEDIATE(r2,__toc_start)
addi r2,r2,0x4000
addi r2,r2,0x4000
LOAD_REG_IMMEDIATE(r2,__toc_start)
addi r2,r2,0x4000
addi r2,r2,0x4000
@@
-1643,7
+1637,6
@@
_STATIC(__start_initialization_iSeries)
b .start_here_common
#endif /* CONFIG_PPC_ISERIES */
b .start_here_common
#endif /* CONFIG_PPC_ISERIES */
-#ifdef CONFIG_PPC_MULTIPLATFORM
_STATIC(__mmu_off)
mfmsr r3
_STATIC(__mmu_off)
mfmsr r3
@@
-1669,13
+1662,11
@@
_STATIC(__mmu_off)
*
*/
_GLOBAL(__start_initialization_multiplatform)
*
*/
_GLOBAL(__start_initialization_multiplatform)
-#ifdef CONFIG_PPC_MULTIPLATFORM
/*
* Are we booted from a PROM Of-type client-interface ?
*/
cmpldi cr0,r5,0
bne .__boot_from_prom /* yes -> prom */
/*
* Are we booted from a PROM Of-type client-interface ?
*/
cmpldi cr0,r5,0
bne .__boot_from_prom /* yes -> prom */
-#endif
/* Save parameters */
mr r31,r3
/* Save parameters */
mr r31,r3
@@
-1692,6
+1683,8
@@
_GLOBAL(__start_initialization_multiplatform)
cmpwi r0,0x3c /* 970FX */
beq 1f
cmpwi r0,0x44 /* 970MP */
cmpwi r0,0x3c /* 970FX */
beq 1f
cmpwi r0,0x44 /* 970MP */
+ beq 1f
+ cmpwi r0,0x45 /* 970GX */
bne 2f
1: bl .__cpu_preinit_ppc970
2:
bne 2f
1: bl .__cpu_preinit_ppc970
2:
@@
-1702,7
+1695,6
@@
_GLOBAL(__start_initialization_multiplatform)
bl .__mmu_off
b .__after_prom_start
bl .__mmu_off
b .__after_prom_start
-#ifdef CONFIG_PPC_MULTIPLATFORM
_STATIC(__boot_from_prom)
/* Save parameters */
mr r31,r3
_STATIC(__boot_from_prom)
/* Save parameters */
mr r31,r3
@@
-1742,7
+1734,6
@@
_STATIC(__boot_from_prom)
bl .prom_init
/* We never return */
trap
bl .prom_init
/* We never return */
trap
-#endif
/*
* At this point, r3 contains the physical address we are running at,
/*
* At this point, r3 contains the physical address we are running at,
@@
-1798,8
+1789,6
@@
_STATIC(__after_prom_start)
bl .copy_and_flush /* copy the rest */
b .start_here_multiplatform
bl .copy_and_flush /* copy the rest */
b .start_here_multiplatform
-#endif /* CONFIG_PPC_MULTIPLATFORM */
-
/*
* Copy routine used to copy the kernel to start at physical address 0
* and flush and invalidate the caches as needed.
/*
* Copy routine used to copy the kernel to start at physical address 0
* and flush and invalidate the caches as needed.
@@
-1882,7
+1871,7
@@
_GLOBAL(pmac_secondary_start)
ld r1,PACAEMERGSP(r13)
subi r1,r1,STACK_FRAME_OVERHEAD
ld r1,PACAEMERGSP(r13)
subi r1,r1,STACK_FRAME_OVERHEAD
- b
.
__secondary_start
+ b __secondary_start
#endif /* CONFIG_PPC_PMAC */
#endif /* CONFIG_PPC_PMAC */
@@
-1899,7
+1888,7
@@
_GLOBAL(pmac_secondary_start)
* r13 = paca virtual address
* SPRG3 = paca virtual address
*/
* r13 = paca virtual address
* SPRG3 = paca virtual address
*/
-_
GLOBAL(__secondary_start)
+_
_secondary_start:
/* Set thread priority to MEDIUM */
HMT_MEDIUM
/* Set thread priority to MEDIUM */
HMT_MEDIUM
@@
-1964,7
+1953,6
@@
_GLOBAL(enable_64b_mode)
isync
blr
isync
blr
-#ifdef CONFIG_PPC_MULTIPLATFORM
/*
* This is where the main kernel code starts.
*/
/*
* This is where the main kernel code starts.
*/
@@
-2015,13
+2003,6
@@
_STATIC(start_here_multiplatform)
addi r2,r2,0x4000
add r2,r2,r26
addi r2,r2,0x4000
add r2,r2,r26
- LOAD_REG_IMMEDIATE(r3, cpu_specs)
- add r3,r3,r26
- LOAD_REG_IMMEDIATE(r4,cur_cpu_spec)
- add r4,r4,r26
- mr r5,r26
- bl .identify_cpu
-
/* Do very early kernel initializations, including initial hash table,
* stab and slb setup before we turn on relocation. */
/* Do very early kernel initializations, including initial hash table,
* stab and slb setup before we turn on relocation. */
@@
-2035,7
+2016,6
@@
_STATIC(start_here_multiplatform)
mtspr SPRN_SRR1,r4
rfid
b . /* prevent speculative execution */
mtspr SPRN_SRR1,r4
rfid
b . /* prevent speculative execution */
-#endif /* CONFIG_PPC_MULTIPLATFORM */
/* This is where all platforms converge execution */
_STATIC(start_here_common)
/* This is where all platforms converge execution */
_STATIC(start_here_common)
@@
-2051,13
+2031,6
@@
_STATIC(start_here_common)
li r0,0
stdu r0,-STACK_FRAME_OVERHEAD(r1)
li r0,0
stdu r0,-STACK_FRAME_OVERHEAD(r1)
- /* Apply the CPUs-specific fixups (nop out sections not relevant
- * to this CPU
- */
- li r3,0
- bl .do_cpu_ftr_fixups
- bl .do_fw_ftr_fixups
-
/* ptr to current */
LOAD_REG_IMMEDIATE(r4, init_task)
std r4,PACACURRENT(r13)
/* ptr to current */
LOAD_REG_IMMEDIATE(r4, init_task)
std r4,PACACURRENT(r13)