mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
[PARISC] Kill off ASM_PAGE_SIZE use
We have the macro _AC() generally available now so the calculation of PAGE_SIZE can be made assembler compatible. Introduce use of _AC() and kill all users of ASM_PAGE_SIZE. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
This commit is contained in:
parent
be1b3d8cb1
commit
1c59357109
4 changed files with 16 additions and 14 deletions
|
@ -290,7 +290,6 @@ int main(void)
|
||||||
DEFINE(ASM_PTE_ENTRY_SIZE, PTE_ENTRY_SIZE);
|
DEFINE(ASM_PTE_ENTRY_SIZE, PTE_ENTRY_SIZE);
|
||||||
DEFINE(ASM_PFN_PTE_SHIFT, PFN_PTE_SHIFT);
|
DEFINE(ASM_PFN_PTE_SHIFT, PFN_PTE_SHIFT);
|
||||||
DEFINE(ASM_PT_INITIAL, PT_INITIAL);
|
DEFINE(ASM_PT_INITIAL, PT_INITIAL);
|
||||||
DEFINE(ASM_PAGE_SIZE, PAGE_SIZE);
|
|
||||||
DEFINE(ASM_PAGE_SIZE_DIV64, PAGE_SIZE/64);
|
DEFINE(ASM_PAGE_SIZE_DIV64, PAGE_SIZE/64);
|
||||||
DEFINE(ASM_PAGE_SIZE_DIV128, PAGE_SIZE/128);
|
DEFINE(ASM_PAGE_SIZE_DIV128, PAGE_SIZE/128);
|
||||||
BLANK();
|
BLANK();
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <asm/asm-offsets.h>
|
#include <asm/asm-offsets.h>
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
#include <asm/errno.h>
|
#include <asm/errno.h>
|
||||||
|
#include <asm/page.h>
|
||||||
#include <asm/psw.h>
|
#include <asm/psw.h>
|
||||||
#include <asm/thread_info.h>
|
#include <asm/thread_info.h>
|
||||||
#include <asm/assembly.h>
|
#include <asm/assembly.h>
|
||||||
|
@ -38,7 +39,7 @@
|
||||||
* pointers.
|
* pointers.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.align ASM_PAGE_SIZE
|
.align PAGE_SIZE
|
||||||
ENTRY(linux_gateway_page)
|
ENTRY(linux_gateway_page)
|
||||||
|
|
||||||
/* ADDRESS 0x00 to 0xb0 = 176 bytes / 4 bytes per insn = 44 insns */
|
/* ADDRESS 0x00 to 0xb0 = 176 bytes / 4 bytes per insn = 44 insns */
|
||||||
|
@ -597,7 +598,7 @@ cas_action:
|
||||||
|
|
||||||
|
|
||||||
/* Make sure nothing else is placed on this page */
|
/* Make sure nothing else is placed on this page */
|
||||||
.align ASM_PAGE_SIZE
|
.align PAGE_SIZE
|
||||||
END(linux_gateway_page)
|
END(linux_gateway_page)
|
||||||
ENTRY(end_linux_gateway_page)
|
ENTRY(end_linux_gateway_page)
|
||||||
|
|
||||||
|
@ -608,7 +609,7 @@ ENTRY(end_linux_gateway_page)
|
||||||
|
|
||||||
.section .rodata,"a"
|
.section .rodata,"a"
|
||||||
|
|
||||||
.align ASM_PAGE_SIZE
|
.align PAGE_SIZE
|
||||||
/* Light-weight-syscall table */
|
/* Light-weight-syscall table */
|
||||||
/* Start of lws table. */
|
/* Start of lws table. */
|
||||||
ENTRY(lws_table)
|
ENTRY(lws_table)
|
||||||
|
@ -617,13 +618,13 @@ ENTRY(lws_table)
|
||||||
END(lws_table)
|
END(lws_table)
|
||||||
/* End of lws table */
|
/* End of lws table */
|
||||||
|
|
||||||
.align ASM_PAGE_SIZE
|
.align PAGE_SIZE
|
||||||
ENTRY(sys_call_table)
|
ENTRY(sys_call_table)
|
||||||
#include "syscall_table.S"
|
#include "syscall_table.S"
|
||||||
END(sys_call_table)
|
END(sys_call_table)
|
||||||
|
|
||||||
#ifdef CONFIG_64BIT
|
#ifdef CONFIG_64BIT
|
||||||
.align ASM_PAGE_SIZE
|
.align PAGE_SIZE
|
||||||
ENTRY(sys_call_table64)
|
ENTRY(sys_call_table64)
|
||||||
#define SYSCALL_TABLE_64BIT
|
#define SYSCALL_TABLE_64BIT
|
||||||
#include "syscall_table.S"
|
#include "syscall_table.S"
|
||||||
|
|
|
@ -73,7 +73,7 @@ SECTIONS
|
||||||
* that we can properly leave these
|
* that we can properly leave these
|
||||||
* as writable
|
* as writable
|
||||||
*/
|
*/
|
||||||
. = ALIGN(ASM_PAGE_SIZE);
|
. = ALIGN(PAGE_SIZE);
|
||||||
data_start = .;
|
data_start = .;
|
||||||
. = ALIGN(16);
|
. = ALIGN(16);
|
||||||
/* Exception table */
|
/* Exception table */
|
||||||
|
@ -119,12 +119,12 @@ SECTIONS
|
||||||
/* nosave data is really only used for software suspend...it's here
|
/* nosave data is really only used for software suspend...it's here
|
||||||
* just in case we ever implement it
|
* just in case we ever implement it
|
||||||
*/
|
*/
|
||||||
. = ALIGN(ASM_PAGE_SIZE);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__nosave_begin = .;
|
__nosave_begin = .;
|
||||||
.data_nosave : {
|
.data_nosave : {
|
||||||
*(.data.nosave)
|
*(.data.nosave)
|
||||||
}
|
}
|
||||||
. = ALIGN(ASM_PAGE_SIZE);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__nosave_end = .;
|
__nosave_end = .;
|
||||||
|
|
||||||
/* End of data section */
|
/* End of data section */
|
||||||
|
@ -133,7 +133,7 @@ SECTIONS
|
||||||
/* BSS */
|
/* BSS */
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
/* page table entries need to be PAGE_SIZE aligned */
|
/* page table entries need to be PAGE_SIZE aligned */
|
||||||
. = ALIGN(ASM_PAGE_SIZE);
|
. = ALIGN(PAGE_SIZE);
|
||||||
.data.vmpages : {
|
.data.vmpages : {
|
||||||
*(.data.vm0.pmd)
|
*(.data.vm0.pmd)
|
||||||
*(.data.vm0.pgd)
|
*(.data.vm0.pgd)
|
||||||
|
@ -229,7 +229,7 @@ SECTIONS
|
||||||
*(.exit.data)
|
*(.exit.data)
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_BLK_DEV_INITRD
|
#ifdef CONFIG_BLK_DEV_INITRD
|
||||||
. = ALIGN(ASM_PAGE_SIZE);
|
. = ALIGN(PAGE_SIZE);
|
||||||
.init.ramfs : {
|
.init.ramfs : {
|
||||||
__initramfs_start = .;
|
__initramfs_start = .;
|
||||||
*(.init.ramfs)
|
*(.init.ramfs)
|
||||||
|
@ -237,8 +237,8 @@ SECTIONS
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PERCPU(ASM_PAGE_SIZE)
|
PERCPU(PAGE_SIZE)
|
||||||
. = ALIGN(ASM_PAGE_SIZE);
|
. = ALIGN(PAGE_SIZE);
|
||||||
__init_end = .;
|
__init_end = .;
|
||||||
/* freed after init ends here */
|
/* freed after init ends here */
|
||||||
_end = . ;
|
_end = . ;
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
|
#include <linux/const.h>
|
||||||
|
|
||||||
#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
|
#if defined(CONFIG_PARISC_PAGE_SIZE_4KB)
|
||||||
# define PAGE_SHIFT 12
|
# define PAGE_SHIFT 12
|
||||||
#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
|
#elif defined(CONFIG_PARISC_PAGE_SIZE_16KB)
|
||||||
|
@ -12,7 +14,7 @@
|
||||||
#else
|
#else
|
||||||
# error "unknown default kernel page size"
|
# error "unknown default kernel page size"
|
||||||
#endif
|
#endif
|
||||||
#define PAGE_SIZE (1UL << PAGE_SHIFT)
|
#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
|
||||||
#define PAGE_MASK (~(PAGE_SIZE-1))
|
#define PAGE_MASK (~(PAGE_SIZE-1))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue