diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 19:54:33 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-28 19:54:33 -0500 |
| commit | 3c92ec8ae91ecf59d88c798301833d7cf83f2179 (patch) | |
| tree | 08a38cd3523c42bd49882f17cd501fd879e7ca1c /arch/powerpc/include/asm/highmem.h | |
| parent | c4c9f0183b7c4e97836e8fecbb67898b06c47e78 (diff) | |
| parent | ca9153a3a2a7556d091dfe080e42b0e67881fff6 (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (144 commits)
powerpc/44x: Support 16K/64K base page sizes on 44x
powerpc: Force memory size to be a multiple of PAGE_SIZE
powerpc/32: Wire up the trampoline code for kdump
powerpc/32: Add the ability for a classic ppc kernel to be loaded at 32M
powerpc/32: Allow __ioremap on RAM addresses for kdump kernel
powerpc/32: Setup OF properties for kdump
powerpc/32/kdump: Implement crash_setup_regs() using ppc_save_regs()
powerpc: Prepare xmon_save_regs for use with kdump
powerpc: Remove default kexec/crash_kernel ops assignments
powerpc: Make default kexec/crash_kernel ops implicit
powerpc: Setup OF properties for ppc32 kexec
powerpc/pseries: Fix cpu hotplug
powerpc: Fix KVM build on ppc440
powerpc/cell: add QPACE as a separate Cell platform
powerpc/cell: fix build breakage with CONFIG_SPUFS disabled
powerpc/mpc5200: fix error paths in PSC UART probe function
powerpc/mpc5200: add rts/cts handling in PSC UART driver
powerpc/mpc5200: Make PSC UART driver update serial errors counters
powerpc/mpc5200: Remove obsolete code from mpc5200 MDIO driver
powerpc/mpc5200: Add MDMA/UDMA support to MPC5200 ATA driver
...
Fix trivial conflict in drivers/char/Makefile as per Paul's directions
Diffstat (limited to 'arch/powerpc/include/asm/highmem.h')
| -rw-r--r-- | arch/powerpc/include/asm/highmem.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/arch/powerpc/include/asm/highmem.h b/arch/powerpc/include/asm/highmem.h index 91c589520c0a..04e4a620952e 100644 --- a/arch/powerpc/include/asm/highmem.h +++ b/arch/powerpc/include/asm/highmem.h | |||
| @@ -38,9 +38,24 @@ extern pte_t *pkmap_page_table; | |||
| 38 | * easily, subsequent pte tables have to be allocated in one physical | 38 | * easily, subsequent pte tables have to be allocated in one physical |
| 39 | * chunk of RAM. | 39 | * chunk of RAM. |
| 40 | */ | 40 | */ |
| 41 | #define LAST_PKMAP (1 << PTE_SHIFT) | 41 | /* |
| 42 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) | 42 | * We use one full pte table with 4K pages. And with 16K/64K pages pte |
| 43 | * table covers enough memory (32MB and 512MB resp.) that both FIXMAP | ||
| 44 | * and PKMAP can be placed in single pte table. We use 1024 pages for | ||
| 45 | * PKMAP in case of 16K/64K pages. | ||
| 46 | */ | ||
| 47 | #ifdef CONFIG_PPC_4K_PAGES | ||
| 48 | #define PKMAP_ORDER PTE_SHIFT | ||
| 49 | #else | ||
| 50 | #define PKMAP_ORDER 10 | ||
| 51 | #endif | ||
| 52 | #define LAST_PKMAP (1 << PKMAP_ORDER) | ||
| 53 | #ifndef CONFIG_PPC_4K_PAGES | ||
| 54 | #define PKMAP_BASE (FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1)) | ||
| 55 | #else | ||
| 43 | #define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK) | 56 | #define PKMAP_BASE ((FIXADDR_START - PAGE_SIZE*(LAST_PKMAP + 1)) & PMD_MASK) |
| 57 | #endif | ||
| 58 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) | ||
| 44 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) | 59 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) |
| 45 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) | 60 | #define PKMAP_ADDR(nr) (PKMAP_BASE + ((nr) << PAGE_SHIFT)) |
| 46 | 61 | ||
| @@ -85,7 +100,7 @@ static inline void *kmap_atomic_prot(struct page *page, enum km_type type, pgpro | |||
| 85 | BUG_ON(!pte_none(*(kmap_pte-idx))); | 100 | BUG_ON(!pte_none(*(kmap_pte-idx))); |
| 86 | #endif | 101 | #endif |
| 87 | __set_pte_at(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot)); | 102 | __set_pte_at(&init_mm, vaddr, kmap_pte-idx, mk_pte(page, prot)); |
| 88 | flush_tlb_page(NULL, vaddr); | 103 | local_flush_tlb_page(NULL, vaddr); |
| 89 | 104 | ||
| 90 | return (void*) vaddr; | 105 | return (void*) vaddr; |
| 91 | } | 106 | } |
| @@ -113,7 +128,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type) | |||
| 113 | * this pte without first remap it | 128 | * this pte without first remap it |
| 114 | */ | 129 | */ |
| 115 | pte_clear(&init_mm, vaddr, kmap_pte-idx); | 130 | pte_clear(&init_mm, vaddr, kmap_pte-idx); |
| 116 | flush_tlb_page(NULL, vaddr); | 131 | local_flush_tlb_page(NULL, vaddr); |
| 117 | #endif | 132 | #endif |
| 118 | pagefault_enable(); | 133 | pagefault_enable(); |
| 119 | } | 134 | } |
