Procházet zdrojové kódy

avr32: Fix broken pte dump code in do_page_fault()

The per-task page tables only cover the first 2GiB of the address
space. For kernel addresses, we need to do the lookup in init's page
tables.

This is a temporary workaround until we modify the per-task page
tables to cover the whole 4GiB address space.

Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Haavard Skinnemoen před 18 roky
rodič
revize
32019828d9
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      arch/avr32/mm/fault.c

+ 2 - 0
arch/avr32/mm/fault.c

@@ -189,6 +189,8 @@ no_context:
 
 
 	page = sysreg_read(PTBR);
 	page = sysreg_read(PTBR);
 	printk(KERN_ALERT "ptbr = %08lx", page);
 	printk(KERN_ALERT "ptbr = %08lx", page);
+	if (address >= TASK_SIZE)
+		page = (unsigned long)swapper_pg_dir;
 	if (page) {
 	if (page) {
 		page = ((unsigned long *)page)[address >> 22];
 		page = ((unsigned long *)page)[address >> 22];
 		printk(" pgd = %08lx", page);
 		printk(" pgd = %08lx", page);