diff options
| -rw-r--r-- | arch/openrisc/mm/init.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c index 79dea9740a3c..e7fdc50c4bf0 100644 --- a/arch/openrisc/mm/init.c +++ b/arch/openrisc/mm/init.c | |||
| @@ -167,15 +167,26 @@ void __init paging_init(void) | |||
| 167 | unsigned long *dtlb_vector = __va(0x900); | 167 | unsigned long *dtlb_vector = __va(0x900); |
| 168 | unsigned long *itlb_vector = __va(0xa00); | 168 | unsigned long *itlb_vector = __va(0xa00); |
| 169 | 169 | ||
| 170 | printk(KERN_INFO "itlb_miss_handler %p\n", &itlb_miss_handler); | ||
| 171 | *itlb_vector = ((unsigned long)&itlb_miss_handler - | ||
| 172 | (unsigned long)itlb_vector) >> 2; | ||
| 173 | |||
| 174 | /* Soft ordering constraint to ensure that dtlb_vector is | ||
| 175 | * the last thing updated | ||
| 176 | */ | ||
| 177 | barrier(); | ||
| 178 | |||
| 170 | printk(KERN_INFO "dtlb_miss_handler %p\n", &dtlb_miss_handler); | 179 | printk(KERN_INFO "dtlb_miss_handler %p\n", &dtlb_miss_handler); |
| 171 | *dtlb_vector = ((unsigned long)&dtlb_miss_handler - | 180 | *dtlb_vector = ((unsigned long)&dtlb_miss_handler - |
| 172 | (unsigned long)dtlb_vector) >> 2; | 181 | (unsigned long)dtlb_vector) >> 2; |
| 173 | 182 | ||
| 174 | printk(KERN_INFO "itlb_miss_handler %p\n", &itlb_miss_handler); | ||
| 175 | *itlb_vector = ((unsigned long)&itlb_miss_handler - | ||
| 176 | (unsigned long)itlb_vector) >> 2; | ||
| 177 | } | 183 | } |
| 178 | 184 | ||
| 185 | /* Soft ordering constraint to ensure that cache invalidation and | ||
| 186 | * TLB flush really happen _after_ code has been modified. | ||
| 187 | */ | ||
| 188 | barrier(); | ||
| 189 | |||
| 179 | /* Invalidate instruction caches after code modification */ | 190 | /* Invalidate instruction caches after code modification */ |
| 180 | mtspr(SPR_ICBIR, 0x900); | 191 | mtspr(SPR_ICBIR, 0x900); |
| 181 | mtspr(SPR_ICBIR, 0xa00); | 192 | mtspr(SPR_ICBIR, 0xa00); |
