forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
powerpc/fsl-booke: Move loadcam_entry back to asm code to fix SMP ftrace
When we build with ftrace enabled its possible that loadcam_entry would have used the stack pointer (even though the code doesn't need it). We call loadcam_entry in __secondary_start before the stack is setup. To ensure that loadcam_entry doesn't use the stack pointer the easiest solution is to just have it in asm code. Signed-off-by: Kumar Gala <[email protected]>
- Loading branch information
Showing
4 changed files
with
48 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* Modifications by Kumar Gala ([email protected]) to support | ||
* E500 Book E processors. | ||
* | ||
* Copyright 2004 Freescale Semiconductor, Inc | ||
* Copyright 2004,2010 Freescale Semiconductor, Inc. | ||
* | ||
* This file contains the routines for initializing the MMU | ||
* on the 4xx series of chips. | ||
|
@@ -56,19 +56,13 @@ | |
|
||
unsigned int tlbcam_index; | ||
|
||
#define NUM_TLBCAMS (64) | ||
|
||
#if defined(CONFIG_LOWMEM_CAM_NUM_BOOL) && (CONFIG_LOWMEM_CAM_NUM >= NUM_TLBCAMS) | ||
#error "LOWMEM_CAM_NUM must be less than NUM_TLBCAMS" | ||
#endif | ||
|
||
struct tlbcam { | ||
u32 MAS0; | ||
u32 MAS1; | ||
unsigned long MAS2; | ||
u32 MAS3; | ||
u32 MAS7; | ||
} TLBCAM[NUM_TLBCAMS]; | ||
#define NUM_TLBCAMS (64) | ||
struct tlbcam TLBCAM[NUM_TLBCAMS]; | ||
|
||
struct tlbcamrange { | ||
unsigned long start; | ||
|
@@ -109,19 +103,6 @@ unsigned long p_mapped_by_tlbcam(phys_addr_t pa) | |
return 0; | ||
} | ||
|
||
void loadcam_entry(int idx) | ||
{ | ||
mtspr(SPRN_MAS0, TLBCAM[idx].MAS0); | ||
mtspr(SPRN_MAS1, TLBCAM[idx].MAS1); | ||
mtspr(SPRN_MAS2, TLBCAM[idx].MAS2); | ||
mtspr(SPRN_MAS3, TLBCAM[idx].MAS3); | ||
|
||
if (mmu_has_feature(MMU_FTR_BIG_PHYS)) | ||
mtspr(SPRN_MAS7, TLBCAM[idx].MAS7); | ||
|
||
asm volatile("isync;tlbwe;isync" : : : "memory"); | ||
} | ||
|
||
/* | ||
* Set up one of the I/D BAT (block address translation) register pairs. | ||
* The parameters are not checked; in particular size must be a power | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters