| .. | .. |
|---|
| 3 | 3 | #include <linux/kernel.h> |
|---|
| 4 | 4 | #include <linux/slab.h> |
|---|
| 5 | 5 | #include <linux/mm_types.h> |
|---|
| 6 | +#include <linux/pgtable.h> |
|---|
| 6 | 7 | |
|---|
| 7 | 8 | #include <asm/cputype.h> |
|---|
| 8 | 9 | #include <asm/idmap.h> |
|---|
| 10 | +#include <asm/hwcap.h> |
|---|
| 9 | 11 | #include <asm/pgalloc.h> |
|---|
| 10 | | -#include <asm/pgtable.h> |
|---|
| 11 | 12 | #include <asm/sections.h> |
|---|
| 12 | 13 | #include <asm/system_info.h> |
|---|
| 13 | 14 | |
|---|
| .. | .. |
|---|
| 67 | 68 | static void idmap_add_pud(pgd_t *pgd, unsigned long addr, unsigned long end, |
|---|
| 68 | 69 | unsigned long prot) |
|---|
| 69 | 70 | { |
|---|
| 70 | | - pud_t *pud = pud_offset(pgd, addr); |
|---|
| 71 | + p4d_t *p4d = p4d_offset(pgd, addr); |
|---|
| 72 | + pud_t *pud = pud_offset(p4d, addr); |
|---|
| 71 | 73 | unsigned long next; |
|---|
| 72 | 74 | |
|---|
| 73 | 75 | do { |
|---|
| .. | .. |
|---|
| 110 | 112 | __idmap_text_end, 0); |
|---|
| 111 | 113 | |
|---|
| 112 | 114 | /* Flush L1 for the hardware to see this page table content */ |
|---|
| 113 | | - flush_cache_louis(); |
|---|
| 115 | + if (!(elf_hwcap & HWCAP_LPAE)) |
|---|
| 116 | + flush_cache_louis(); |
|---|
| 114 | 117 | |
|---|
| 115 | 118 | return 0; |
|---|
| 116 | 119 | } |
|---|