]> err.no Git - linux-2.6/commitdiff
[PATCH] 64bit Resource: finally enable 64bit resource sizes
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 13 Jun 2006 00:11:31 +0000 (17:11 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 27 Jun 2006 16:24:00 +0000 (09:24 -0700)
Introduce the Kconfig entry and actually switch to a 64bit value, if
wanted, for resource_size_t.

Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>

Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/i386/Kconfig
include/linux/types.h
kernel/resource.c
mm/Kconfig

index 47c08bcd9b24f313e2216d88b97e7e2e58958078..7e46ad7a7b693f773b39689b672a52c0d11ce73b 100644 (file)
@@ -529,6 +529,7 @@ config X86_PAE
        bool
        depends on HIGHMEM64G
        default y
+       select RESOURCES_64BIT
 
 # Common NUMA Features
 config NUMA
index a021e1577336f33831e4e5c1d343dc1d2e1043cc..3f235660a3cd6a76c4fa0480e649deaa5a4077d3 100644 (file)
@@ -178,9 +178,14 @@ typedef __u64 __bitwise __be64;
 #ifdef __KERNEL__
 typedef unsigned __bitwise__ gfp_t;
 
-typedef unsigned long resource_size_t;
+#ifdef CONFIG_RESOURCES_64BIT
+typedef u64 resource_size_t;
+#else
+typedef u32 resource_size_t;
 #endif
 
+#endif /* __KERNEL__ */
+
 struct ustat {
        __kernel_daddr_t        f_tfree;
        __kernel_ino_t          f_tinode;
index 54835c02ab37038c2ad4f5bd35d344240013437f..cc73029088a785d941e3281e0f147829b752cf9f 100644 (file)
 
 struct resource ioport_resource = {
        .name   = "PCI IO",
-       .start  = 0x0000,
+       .start  = 0,
        .end    = IO_SPACE_LIMIT,
        .flags  = IORESOURCE_IO,
 };
-
 EXPORT_SYMBOL(ioport_resource);
 
 struct resource iomem_resource = {
        .name   = "PCI mem",
-       .start  = 0UL,
-       .end    = ~0UL,
+       .start  = 0,
+       .end    = -1,
        .flags  = IORESOURCE_MEM,
 };
-
 EXPORT_SYMBOL(iomem_resource);
 
 static DEFINE_RWLOCK(resource_lock);
index 66e65ab3942651e86f2fbbadcf914fd600e41600..e3644b0062b119f552cafd769cbd87cd35ac50bc 100644 (file)
@@ -145,3 +145,9 @@ config MIGRATION
          while the virtual addresses are not changed. This is useful for
          example on NUMA systems to put pages nearer to the processors accessing
          the page.
+
+config RESOURCES_64BIT
+       bool "64 bit Memory and IO resources (EXPERIMENTAL)" if (!64BIT && EXPERIMENTAL)
+       default 64BIT
+       help
+         This option allows memory and IO resources to be 64 bit.