gpllib: share PAGE_SIZE definition with cpuid.h
authorPierre-Alexandre Meyer <pierre@mouraf.org>
Tue, 1 Sep 2009 21:02:42 +0000 (14:02 -0700)
committerPierre-Alexandre Meyer <pierre@mouraf.org>
Tue, 1 Sep 2009 21:02:42 +0000 (14:02 -0700)
swsusp detection needs PAGE_SIZE. cpuid.h is actually already defining it.
Since both swsusp and cpuid are taken from the Linux kernel, it is a good idea to
share it (they really need to be equal).

We are going to rely on cpuid.h. Creating a page.h for this single definition seems
overkilling and the MMU is part of the CPU on x86 anyways.

Impact: fix compiler warning (redefinition).

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
com32/gplinclude/disk/common.h

index c6df2f4..627e94e 100644 (file)
 
 #include <stdint.h>
 
-#define SECTOR 512             /* bytes/sector */
+/* For PAGE_SIZE */
+#include <cpuid.h>
 
-#undef PAGE_SIZE
-#define PAGE_SIZE (1<<12)
+#define SECTOR 512             /* bytes/sector */
 
 struct ebios_dapa {
        uint16_t len;