hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/mips/mm/c-r3k.c
....@@ -16,7 +16,6 @@
1616 #include <linux/mm.h>
1717
1818 #include <asm/page.h>
19
-#include <asm/pgtable.h>
2019 #include <asm/mmu_context.h>
2120 #include <asm/isadep.h>
2221 #include <asm/io.h>
....@@ -240,8 +239,6 @@
240239 unsigned long kaddr = KSEG0ADDR(pfn << PAGE_SHIFT);
241240 int exec = vma->vm_flags & VM_EXEC;
242241 struct mm_struct *mm = vma->vm_mm;
243
- pgd_t *pgdp;
244
- pud_t *pudp;
245242 pmd_t *pmdp;
246243 pte_t *ptep;
247244
....@@ -252,10 +249,8 @@
252249 if (cpu_context(smp_processor_id(), mm) == 0)
253250 return;
254251
255
- pgdp = pgd_offset(mm, addr);
256
- pudp = pud_offset(pgdp, addr);
257
- pmdp = pmd_offset(pudp, addr);
258
- ptep = pte_offset(pmdp, addr);
252
+ pmdp = pmd_off(mm, addr);
253
+ ptep = pte_offset_kernel(pmdp, addr);
259254
260255 /* Invalid => no such page in the cache. */
261256 if (!(pte_val(*ptep) & _PAGE_PRESENT))
....@@ -272,30 +267,6 @@
272267
273268 static void r3k_flush_data_cache_page(unsigned long addr)
274269 {
275
-}
276
-
277
-static void r3k_flush_cache_sigtramp(unsigned long addr)
278
-{
279
- unsigned long flags;
280
-
281
- pr_debug("csigtramp[%08lx]\n", addr);
282
-
283
- flags = read_c0_status();
284
-
285
- write_c0_status(flags&~ST0_IEC);
286
-
287
- /* Fill the TLB to avoid an exception with caches isolated. */
288
- asm( "lw\t$0, 0x000(%0)\n\t"
289
- "lw\t$0, 0x004(%0)\n\t"
290
- : : "r" (addr) );
291
-
292
- write_c0_status((ST0_ISC|ST0_SWC|flags)&~ST0_IEC);
293
-
294
- asm( "sb\t$0, 0x000(%0)\n\t"
295
- "sb\t$0, 0x004(%0)\n\t"
296
- : : "r" (addr) );
297
-
298
- write_c0_status(flags);
299270 }
300271
301272 static void r3k_flush_kernel_vmap_range(unsigned long vaddr, int size)
....@@ -331,7 +302,6 @@
331302
332303 __flush_kernel_vmap_range = r3k_flush_kernel_vmap_range;
333304
334
- flush_cache_sigtramp = r3k_flush_cache_sigtramp;
335305 local_flush_data_cache_page = local_r3k_flush_data_cache_page;
336306 flush_data_cache_page = r3k_flush_data_cache_page;
337307
....@@ -339,9 +309,9 @@
339309 _dma_cache_wback = r3k_dma_cache_wback_inv;
340310 _dma_cache_inv = r3k_dma_cache_wback_inv;
341311
342
- printk("Primary instruction cache %ldkB, linesize %ld bytes.\n",
312
+ pr_info("Primary instruction cache %ldkB, linesize %ld bytes.\n",
343313 icache_size >> 10, icache_lsize);
344
- printk("Primary data cache %ldkB, linesize %ld bytes.\n",
314
+ pr_info("Primary data cache %ldkB, linesize %ld bytes.\n",
345315 dcache_size >> 10, dcache_lsize);
346316
347317 build_clear_page();