From: Michael Brown Date: Mon, 6 Feb 2023 12:32:50 +0000 (+0000) Subject: [ioapi] Move PAGE_SHIFT to bits/io.h X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef0a6f47920a4fb245f35f1b2e4bcaa7305819cd;p=thirdparty%2Fipxe.git [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 --- diff --git a/src/arch/arm/include/bits/io.h b/src/arch/arm/include/bits/io.h index 90f6455ec..272ec12bf 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 105f22bfb..046cbdb06 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 60c2e3edf..95673ad8d 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 a6ebe1f4c..eeb3f8454 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 *