From ef0a6f47920a4fb245f35f1b2e4bcaa7305819cd Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 6 Feb 2023 12:32:50 +0000 Subject: [ioapi] Move PAGE_SHIFT to bits/io.h The PAGE_SHIFT definition is an architectural property, rather than an aspect of a particular I/O API implementation (of which, in theory, there may be more than one per architecture). Reflect this by moving the definition to the top-level bits/io.h for each architecture. Signed-off-by: Michael Brown --- src/arch/arm/include/bits/io.h | 3 +++ src/arch/arm/include/ipxe/arm_io.h | 3 --- src/arch/x86/include/bits/io.h | 3 +++ src/arch/x86/include/ipxe/x86_io.h | 3 --- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/arch/arm/include/bits/io.h b/src/arch/arm/include/bits/io.h index 90f6455..272ec12 100644 --- a/src/arch/arm/include/bits/io.h +++ b/src/arch/arm/include/bits/io.h @@ -9,6 +9,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); +/** Page shift */ +#define PAGE_SHIFT 12 + #include #endif /* _BITS_IO_H */ diff --git a/src/arch/arm/include/ipxe/arm_io.h b/src/arch/arm/include/ipxe/arm_io.h index 105f22b..046cbdb 100644 --- a/src/arch/arm/include/ipxe/arm_io.h +++ b/src/arch/arm/include/ipxe/arm_io.h @@ -20,9 +20,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); * */ -/** Page shift */ -#define PAGE_SHIFT 12 - /* * Physical<->Bus address mappings * diff --git a/src/arch/x86/include/bits/io.h b/src/arch/x86/include/bits/io.h index 60c2e3e..95673ad 100644 --- a/src/arch/x86/include/bits/io.h +++ b/src/arch/x86/include/bits/io.h @@ -9,6 +9,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); +/** Page shift */ +#define PAGE_SHIFT 12 + #include #endif /* _BITS_IO_H */ diff --git a/src/arch/x86/include/ipxe/x86_io.h b/src/arch/x86/include/ipxe/x86_io.h index a6ebe1f..eeb3f84 100644 --- a/src/arch/x86/include/ipxe/x86_io.h +++ b/src/arch/x86/include/ipxe/x86_io.h @@ -28,9 +28,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); * */ -/** Page shift */ -#define PAGE_SHIFT 12 - /* * Physical<->Bus address mappings * -- cgit v1.1