From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>, Andrew Morton <akpm@osdl.org>
Subject: [PATCH 16/17] [PATCH] 64bit Resource: finally enable 64bit resource sizes
Date: Tue, 27 Jun 2006 09:33:52 -0700 [thread overview]
Message-ID: <11514260871162-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11514260843959-git-send-email-greg@kroah.com>
From: Greg Kroah-Hartman <gregkh@suse.de>
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 | 1 +
include/linux/types.h | 7 ++++++-
kernel/resource.c | 8 +++-----
mm/Kconfig | 6 ++++++
4 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 47c08bc..7e46ad7 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -529,6 +529,7 @@ config X86_PAE
bool
depends on HIGHMEM64G
default y
+ select RESOURCES_64BIT
# Common NUMA Features
config NUMA
diff --git a/include/linux/types.h b/include/linux/types.h
index a021e15..3f23566 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -178,9 +178,14 @@ #endif
#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;
diff --git a/kernel/resource.c b/kernel/resource.c
index 54835c0..cc73029 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -23,20 +23,18 @@ #include <asm/io.h>
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);
diff --git a/mm/Kconfig b/mm/Kconfig
index 66e65ab..e3644b0 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -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.
--
1.4.0
next prev parent reply other threads:[~2006-06-27 16:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-27 16:33 [GIT PATCH] 64bit resource patches for 2.6.17 Greg KH
2006-06-27 16:33 ` [PATCH 1/17] [PATCH] 64bit resource: C99 changes for struct resource declarations Greg KH
2006-06-27 16:33 ` [PATCH 2/17] [PATCH] 64bit resource: fix up printks for resources in sound drivers Greg KH
2006-06-27 16:33 ` [PATCH 3/17] [PATCH] 64bit resource: fix up printks for resources in networks drivers Greg KH
2006-06-27 16:33 ` [PATCH 4/17] [PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers Greg KH
2006-06-27 16:33 ` [PATCH 5/17] [PATCH] 64bit resource: fix up printks for resources in mtd drivers Greg KH
2006-06-27 16:33 ` [PATCH 6/17] [PATCH] 64bit resource: fix up printks for resources in ide drivers Greg KH
2006-06-27 16:33 ` [PATCH 7/17] [PATCH] 64bit resource: fix up printks for resources in video drivers Greg KH
2006-06-27 16:33 ` [PATCH 8/17] [PATCH] 64bit resource: fix up printks for resources in pcmcia drivers Greg KH
2006-06-27 16:33 ` [PATCH 9/17] [PATCH] 64bit resource: fix up printks for resources in arch and core code Greg KH
2006-06-27 16:33 ` [PATCH 10/17] [PATCH] 64bit resource: fix up printks for resources in misc drivers Greg KH
2006-06-27 16:33 ` [PATCH 11/17] [PATCH] 64bit resource: introduce resource_size_t for the start and end of struct resource Greg KH
2006-06-27 16:33 ` [PATCH 12/17] [PATCH] 64bit resource: change resource core to use resource_size_t Greg KH
2006-06-27 16:33 ` [PATCH 13/17] [PATCH] 64bit resource: change pci core and arch code " Greg KH
2006-06-27 16:33 ` [PATCH 14/17] [PATCH] 64bit resource: change pnp core " Greg KH
2006-06-27 16:33 ` [PATCH 15/17] [PATCH] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed Greg KH
2006-06-27 16:33 ` Greg KH [this message]
2006-06-27 16:33 ` [PATCH 17/17] [PATCH] i386: export memory more than 4G through /proc/iomem Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11514260871162-git-send-email-greg@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox