| .. | .. |
|---|
| 16 | 16 | #include <linux/mm.h> |
|---|
| 17 | 17 | |
|---|
| 18 | 18 | #include <asm/page.h> |
|---|
| 19 | | -#include <asm/pgtable.h> |
|---|
| 20 | 19 | #include <asm/mmu_context.h> |
|---|
| 21 | 20 | #include <asm/isadep.h> |
|---|
| 22 | 21 | #include <asm/io.h> |
|---|
| .. | .. |
|---|
| 240 | 239 | unsigned long kaddr = KSEG0ADDR(pfn << PAGE_SHIFT); |
|---|
| 241 | 240 | int exec = vma->vm_flags & VM_EXEC; |
|---|
| 242 | 241 | struct mm_struct *mm = vma->vm_mm; |
|---|
| 243 | | - pgd_t *pgdp; |
|---|
| 244 | | - pud_t *pudp; |
|---|
| 245 | 242 | pmd_t *pmdp; |
|---|
| 246 | 243 | pte_t *ptep; |
|---|
| 247 | 244 | |
|---|
| .. | .. |
|---|
| 252 | 249 | if (cpu_context(smp_processor_id(), mm) == 0) |
|---|
| 253 | 250 | return; |
|---|
| 254 | 251 | |
|---|
| 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); |
|---|
| 259 | 254 | |
|---|
| 260 | 255 | /* Invalid => no such page in the cache. */ |
|---|
| 261 | 256 | if (!(pte_val(*ptep) & _PAGE_PRESENT)) |
|---|
| .. | .. |
|---|
| 272 | 267 | |
|---|
| 273 | 268 | static void r3k_flush_data_cache_page(unsigned long addr) |
|---|
| 274 | 269 | { |
|---|
| 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); |
|---|
| 299 | 270 | } |
|---|
| 300 | 271 | |
|---|
| 301 | 272 | static void r3k_flush_kernel_vmap_range(unsigned long vaddr, int size) |
|---|
| .. | .. |
|---|
| 331 | 302 | |
|---|
| 332 | 303 | __flush_kernel_vmap_range = r3k_flush_kernel_vmap_range; |
|---|
| 333 | 304 | |
|---|
| 334 | | - flush_cache_sigtramp = r3k_flush_cache_sigtramp; |
|---|
| 335 | 305 | local_flush_data_cache_page = local_r3k_flush_data_cache_page; |
|---|
| 336 | 306 | flush_data_cache_page = r3k_flush_data_cache_page; |
|---|
| 337 | 307 | |
|---|
| .. | .. |
|---|
| 339 | 309 | _dma_cache_wback = r3k_dma_cache_wback_inv; |
|---|
| 340 | 310 | _dma_cache_inv = r3k_dma_cache_wback_inv; |
|---|
| 341 | 311 | |
|---|
| 342 | | - printk("Primary instruction cache %ldkB, linesize %ld bytes.\n", |
|---|
| 312 | + pr_info("Primary instruction cache %ldkB, linesize %ld bytes.\n", |
|---|
| 343 | 313 | 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", |
|---|
| 345 | 315 | dcache_size >> 10, dcache_lsize); |
|---|
| 346 | 316 | |
|---|
| 347 | 317 | build_clear_page(); |
|---|