Commit 378e515c authored by Al Viro's avatar Al Viro Committed by David S. Miller

[SPARC32]: Make PAGE_SHARED a read-mostly variable.

same scheme as for sparc64, same rationale
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0f516813
...@@ -308,6 +308,9 @@ extern void sun4c_paging_init(void); ...@@ -308,6 +308,9 @@ extern void sun4c_paging_init(void);
extern void srmmu_paging_init(void); extern void srmmu_paging_init(void);
extern void device_scan(void); extern void device_scan(void);
pgprot_t PAGE_SHARED __read_mostly;
EXPORT_SYMBOL(PAGE_SHARED);
void __init paging_init(void) void __init paging_init(void)
{ {
switch(sparc_cpu_model) { switch(sparc_cpu_model) {
......
...@@ -2154,7 +2154,7 @@ void __init ld_mmu_srmmu(void) ...@@ -2154,7 +2154,7 @@ void __init ld_mmu_srmmu(void)
BTFIXUPSET_SIMM13(ptrs_per_pgd, SRMMU_PTRS_PER_PGD); BTFIXUPSET_SIMM13(ptrs_per_pgd, SRMMU_PTRS_PER_PGD);
BTFIXUPSET_INT(page_none, pgprot_val(SRMMU_PAGE_NONE)); BTFIXUPSET_INT(page_none, pgprot_val(SRMMU_PAGE_NONE));
BTFIXUPSET_INT(page_shared, pgprot_val(SRMMU_PAGE_SHARED)); PAGE_SHARED = pgprot_val(SRMMU_PAGE_SHARED);
BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY)); BTFIXUPSET_INT(page_copy, pgprot_val(SRMMU_PAGE_COPY));
BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY)); BTFIXUPSET_INT(page_readonly, pgprot_val(SRMMU_PAGE_RDONLY));
BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL)); BTFIXUPSET_INT(page_kernel, pgprot_val(SRMMU_PAGE_KERNEL));
......
...@@ -2155,7 +2155,7 @@ void __init ld_mmu_sun4c(void) ...@@ -2155,7 +2155,7 @@ void __init ld_mmu_sun4c(void)
BTFIXUPSET_SIMM13(user_ptrs_per_pgd, KERNBASE / SUN4C_PGDIR_SIZE); BTFIXUPSET_SIMM13(user_ptrs_per_pgd, KERNBASE / SUN4C_PGDIR_SIZE);
BTFIXUPSET_INT(page_none, pgprot_val(SUN4C_PAGE_NONE)); BTFIXUPSET_INT(page_none, pgprot_val(SUN4C_PAGE_NONE));
BTFIXUPSET_INT(page_shared, pgprot_val(SUN4C_PAGE_SHARED)); PAGE_SHARED = pgprot_val(SUN4C_PAGE_SHARED);
BTFIXUPSET_INT(page_copy, pgprot_val(SUN4C_PAGE_COPY)); BTFIXUPSET_INT(page_copy, pgprot_val(SUN4C_PAGE_COPY));
BTFIXUPSET_INT(page_readonly, pgprot_val(SUN4C_PAGE_READONLY)); BTFIXUPSET_INT(page_readonly, pgprot_val(SUN4C_PAGE_READONLY));
BTFIXUPSET_INT(page_kernel, pgprot_val(SUN4C_PAGE_KERNEL)); BTFIXUPSET_INT(page_kernel, pgprot_val(SUN4C_PAGE_KERNEL));
......
...@@ -46,7 +46,6 @@ BTFIXUPDEF_SIMM13(user_ptrs_per_pgd) ...@@ -46,7 +46,6 @@ BTFIXUPDEF_SIMM13(user_ptrs_per_pgd)
#define pgd_ERROR(e) __builtin_trap() #define pgd_ERROR(e) __builtin_trap()
BTFIXUPDEF_INT(page_none) BTFIXUPDEF_INT(page_none)
BTFIXUPDEF_INT(page_shared)
BTFIXUPDEF_INT(page_copy) BTFIXUPDEF_INT(page_copy)
BTFIXUPDEF_INT(page_readonly) BTFIXUPDEF_INT(page_readonly)
BTFIXUPDEF_INT(page_kernel) BTFIXUPDEF_INT(page_kernel)
...@@ -66,7 +65,7 @@ BTFIXUPDEF_INT(page_kernel) ...@@ -66,7 +65,7 @@ BTFIXUPDEF_INT(page_kernel)
#define PTE_SIZE (PTRS_PER_PTE*4) #define PTE_SIZE (PTRS_PER_PTE*4)
#define PAGE_NONE __pgprot(BTFIXUP_INT(page_none)) #define PAGE_NONE __pgprot(BTFIXUP_INT(page_none))
#define PAGE_SHARED __pgprot(BTFIXUP_INT(page_shared)) extern pgprot_t PAGE_SHARED;
#define PAGE_COPY __pgprot(BTFIXUP_INT(page_copy)) #define PAGE_COPY __pgprot(BTFIXUP_INT(page_copy))
#define PAGE_READONLY __pgprot(BTFIXUP_INT(page_readonly)) #define PAGE_READONLY __pgprot(BTFIXUP_INT(page_readonly))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment