]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[ioapi] Move PAGE_SHIFT to bits/io.h
authorMichael Brown <mcb30@ipxe.org>
Mon, 6 Feb 2023 12:32:50 +0000 (12:32 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 6 Feb 2023 12:34:21 +0000 (12:34 +0000)
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 <mcb30@ipxe.org>
src/arch/arm/include/bits/io.h
src/arch/arm/include/ipxe/arm_io.h
src/arch/x86/include/bits/io.h
src/arch/x86/include/ipxe/x86_io.h

index 90f6455ec5bfe0f6700a50a418cf3d15dd2ddf91..272ec12bfb9544c9a3841f3b4d0c78395012ac80 100644 (file)
@@ -9,6 +9,9 @@
 
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
 
+/** Page shift */
+#define PAGE_SHIFT 12
+
 #include <ipxe/arm_io.h>
 
 #endif /* _BITS_IO_H */
index 105f22bfbf85270366b224661b2a2ff10074411e..046cbdb06bb764c0912c922b73912f73ecd8fc0d 100644 (file)
@@ -20,9 +20,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  *
  */
 
-/** Page shift */
-#define PAGE_SHIFT 12
-
 /*
  * Physical<->Bus address mappings
  *
index 60c2e3edf42624422e4ec0d9c4d0e088d162434a..95673ad8d2c974c539652d754d46934efd3f5641 100644 (file)
@@ -9,6 +9,9 @@
 
 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
 
+/** Page shift */
+#define PAGE_SHIFT 12
+
 #include <ipxe/x86_io.h>
 
 #endif /* _BITS_IO_H */
index a6ebe1f4ce5fb4d7da5081a5d4f4d4f6e49aa989..eeb3f8454620cb5b2902e423e9f6f34c59f9aae9 100644 (file)
@@ -28,9 +28,6 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
  *
  */
 
-/** Page shift */
-#define PAGE_SHIFT 12
-
 /*
  * Physical<->Bus address mappings
  *