diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-10-23 21:29:01 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-11-01 12:46:09 -0500 |
commit | 242954b5aa8e5ec84f46a84637daf08ee4247c6e (patch) | |
tree | 7fb896349b377f5f819d4050bb92eeee05598571 /include | |
parent | 4b1c46a383aafc137bc91a0f9698bfc11e062d1b (diff) |
[MIPS] 16K & 64K page size fixes
Derived from Peter Watkins <treestem@gmail.com>'s work.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/asm.h | 2 | ||||
-rw-r--r-- | include/asm-mips/pgalloc.h | 2 | ||||
-rw-r--r-- | include/asm-mips/pgtable-64.h | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-mips/asm.h b/include/asm-mips/asm.h index e3038a4599ee..838eb3144d81 100644 --- a/include/asm-mips/asm.h +++ b/include/asm-mips/asm.h | |||
@@ -344,6 +344,7 @@ symbol = value | |||
344 | #define PTR_L lw | 344 | #define PTR_L lw |
345 | #define PTR_S sw | 345 | #define PTR_S sw |
346 | #define PTR_LA la | 346 | #define PTR_LA la |
347 | #define PTR_LI li | ||
347 | #define PTR_SLL sll | 348 | #define PTR_SLL sll |
348 | #define PTR_SLLV sllv | 349 | #define PTR_SLLV sllv |
349 | #define PTR_SRL srl | 350 | #define PTR_SRL srl |
@@ -368,6 +369,7 @@ symbol = value | |||
368 | #define PTR_L ld | 369 | #define PTR_L ld |
369 | #define PTR_S sd | 370 | #define PTR_S sd |
370 | #define PTR_LA dla | 371 | #define PTR_LA dla |
372 | #define PTR_LI dli | ||
371 | #define PTR_SLL dsll | 373 | #define PTR_SLL dsll |
372 | #define PTR_SLLV dsllv | 374 | #define PTR_SLLV dsllv |
373 | #define PTR_SRL dsrl | 375 | #define PTR_SRL dsrl |
diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h index 582c1fe6cc4a..af121c67dc71 100644 --- a/include/asm-mips/pgalloc.h +++ b/include/asm-mips/pgalloc.h | |||
@@ -48,7 +48,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) | |||
48 | 48 | ||
49 | ret = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER); | 49 | ret = (pgd_t *) __get_free_pages(GFP_KERNEL, PGD_ORDER); |
50 | if (ret) { | 50 | if (ret) { |
51 | init = pgd_offset(&init_mm, 0); | 51 | init = pgd_offset(&init_mm, 0UL); |
52 | pgd_init((unsigned long)ret); | 52 | pgd_init((unsigned long)ret); |
53 | memcpy(ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD, | 53 | memcpy(ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD, |
54 | (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); | 54 | (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); |
diff --git a/include/asm-mips/pgtable-64.h b/include/asm-mips/pgtable-64.h index d05fb6f38aa7..7e7320300aa3 100644 --- a/include/asm-mips/pgtable-64.h +++ b/include/asm-mips/pgtable-64.h | |||
@@ -174,7 +174,7 @@ static inline void pud_clear(pud_t *pudp) | |||
174 | #define __pmd_offset(address) pmd_index(address) | 174 | #define __pmd_offset(address) pmd_index(address) |
175 | 175 | ||
176 | /* to find an entry in a kernel page-table-directory */ | 176 | /* to find an entry in a kernel page-table-directory */ |
177 | #define pgd_offset_k(address) pgd_offset(&init_mm, 0) | 177 | #define pgd_offset_k(address) pgd_offset(&init_mm, 0UL) |
178 | 178 | ||
179 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) | 179 | #define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) |
180 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) | 180 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) |