aboutsummaryrefslogtreecommitdiffstats
path: root/pci
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-12 17:35:02 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-12 17:35:02 -0700
commit65e21f5eba4ed9795bcf8368cf713f974e45cb14 (patch)
tree74d1ca27fe4cf75209e8f0021dd16e4a371eb791 /pci
parent7abbce6847b730d28e1b3071267a6ba9f56b11d8 (diff)
downloadpatches-65e21f5eba4ed9795bcf8368cf713f974e45cb14.tar.gz
reworked 64bit resource changes
Diffstat (limited to 'pci')
-rw-r--r--pci/64bit-resource-c99-changes-for-struct-resource-declarations.patch (renamed from pci/pci-64-bit-resource-drivers-mips-changes.patch)129
-rw-r--r--pci/64bit-resource-change-pci-core-and-arch-code-to-use-resource_size_t.patch630
-rw-r--r--pci/64bit-resource-change-pnp-core-to-use-resource_size_t.patch169
-rw-r--r--pci/64bit-resource-change-resource-core-to-use-resource_size_t.patch (renamed from pci/kconfigurable-resources-core-changes.patch)177
-rw-r--r--pci/64bit-resource-convert-a-few-remaining-drivers-to-use-resource_size_t-where-needed.patch131
-rw-r--r--pci/64bit-resource-finally-enable-64bit-resource-sizes.patch359
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-arch-and-core-code.patch395
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-ide-drivers.patch (renamed from pci/pci-64-bit-resources-drivers-ide-changes.patch)25
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-misc-drivers.patch289
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-mtd-drivers.patch119
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-networks-drivers.patch (renamed from pci/pci-64-bit-resources-drivers-net-changes.patch)39
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-pci-core-and-hotplug-drivers.patch (renamed from pci/pci-64-bit-resources-drivers-pci-changes.patch)153
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-pcmcia-drivers.patch (renamed from pci/pci-64-bit-resources-drivers-pcmcia-changes.patch)76
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-sound-drivers.patch (renamed from pci/pci-64-bit-resources-sound-changes.patch)56
-rw-r--r--pci/64bit-resource-fix-up-printks-for-resources-in-video-drivers.patch (renamed from pci/pci-64-bit-resources-drivers-media-changes.patch)23
-rw-r--r--pci/64bit-resource-introduce-resource_size_t-for-the-start-and-end-of-struct-resource.patch48
-rw-r--r--pci/kconfigurable-resources-arch-dependent-changes-arch-q-z.patch228
-rw-r--r--pci/kconfigurable-resources-arch-dependent-changes-arch.patch316
-rw-r--r--pci/kconfigurable-resources-arch-dependent-changes.patch207
-rw-r--r--pci/kconfigurable-resources-driver-others-changes.patch219
-rw-r--r--pci/kconfigurable-resources-driver-pci-changes.patch165
-rw-r--r--pci/pci-64-bit-resource-fix-amba-build-warning.patch32
-rw-r--r--pci/pci-64-bit-resource-fixup-pci-resource-dbg-code-to-handle-size-change.patch148
-rw-r--r--pci/pci-64-bit-resources-arch-changes.patch287
-rw-r--r--pci/pci-64-bit-resources-arch-powerpc-changes-update.patch46
-rw-r--r--pci/pci-64-bit-resources-arch-powerpc-changes.patch152
-rw-r--r--pci/pci-64-bit-resources-core-changes.patch222
-rw-r--r--pci/pci-64-bit-resources-drivers-others-changes.patch585
-rw-r--r--pci/pci-64-bit-resources-drivers-pci-changes-sparc32-fix.patch33
-rw-r--r--pci/pci-64-bit-resources-fix-pnp-sysfs-interface.patch63
-rw-r--r--pci/pci-64-bit-resources-more-drivers-others-changes.patch37
-rw-r--r--pci/pci-64-bit-resources-more-sound-changes.patch51
-rw-r--r--pci/pci-legacy-i-o-port-free-driver-changes-to-generic-pci-code.patch8
33 files changed, 2420 insertions, 3197 deletions
diff --git a/pci/pci-64-bit-resource-drivers-mips-changes.patch b/pci/64bit-resource-c99-changes-for-struct-resource-declarations.patch
index 0d7c21c663afb..1922ae3bb4c52 100644
--- a/pci/pci-64-bit-resource-drivers-mips-changes.patch
+++ b/pci/64bit-resource-c99-changes-for-struct-resource-declarations.patch
@@ -1,20 +1,19 @@
-From ralf@linux-mips.org Sun Jun 4 15:01:18 2006
-Date: Sun, 4 Jun 2006 23:00:54 +0100
-From: Ralf Baechle <ralf@linux-mips.org>
-To: akpm@osdl.org
-Cc: greg@kroah.com, vgoyal@in.ibm.com
-Subject: PCI: 64 bit resource drivers mips changes
-Message-ID: <20060604220054.GA17873@linux-mips.org>
-Content-Disposition: inline
+From bf523ba45f86154493ee1bbc4cbcf0e1b35ab8a3 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 14:47:06 -0700
+Subject: [PATCH 01/16] 64bit resource: C99 changes for struct resource declarations
+Based on an original patch from Ralf Baechle <ralf@linux-mips.org> and
+Vivek Goyal <vgoyal@in.ibm.com>. This is needed in order to prepare for
+changing the size of resources.
+Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
---
+ arch/arm/kernel/setup.c | 42 ++++++++-
arch/mips/au1000/common/pci.c | 16 +--
arch/mips/cobalt/setup.c | 41 +++++++--
arch/mips/ddb5xxx/ddb5476/setup.c | 37 ++++++--
@@ -31,8 +30,67 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/mips/philips/pnx8550/common/setup.c | 25 ++++-
arch/mips/sni/setup.c | 126 +++++++++++++++++++++++-----
arch/mips/tx4938/toshiba_rbtx4938/setup.c | 5 -
- 16 files changed, 388 insertions(+), 143 deletions(-)
+ drivers/video/console/vgacon.c | 12 +-
+ 18 files changed, 430 insertions(+), 155 deletions(-)
+--- gregkh-2.6.orig/arch/arm/kernel/setup.c
++++ gregkh-2.6/arch/arm/kernel/setup.c
+@@ -119,9 +119,24 @@ DEFINE_PER_CPU(struct cpuinfo_arm, cpu_d
+ * Standard memory resources
+ */
+ static struct resource mem_res[] = {
+- { "Video RAM", 0, 0, IORESOURCE_MEM },
+- { "Kernel text", 0, 0, IORESOURCE_MEM },
+- { "Kernel data", 0, 0, IORESOURCE_MEM }
++ {
++ .name = "Video RAM",
++ .start = 0,
++ .end = 0,
++ .flags = IORESOURCE_MEM
++ },
++ {
++ .name = "Kernel text",
++ .start = 0,
++ .end = 0,
++ .flags = IORESOURCE_MEM
++ },
++ {
++ .name = "Kernel data",
++ .start = 0,
++ .end = 0,
++ .flags = IORESOURCE_MEM
++ }
+ };
+
+ #define video_ram mem_res[0]
+@@ -129,9 +144,24 @@ static struct resource mem_res[] = {
+ #define kernel_data mem_res[2]
+
+ static struct resource io_res[] = {
+- { "reserved", 0x3bc, 0x3be, IORESOURCE_IO | IORESOURCE_BUSY },
+- { "reserved", 0x378, 0x37f, IORESOURCE_IO | IORESOURCE_BUSY },
+- { "reserved", 0x278, 0x27f, IORESOURCE_IO | IORESOURCE_BUSY }
++ {
++ .name = "reserved",
++ .start = 0x3bc,
++ .end = 0x3be,
++ .flags = IORESOURCE_IO | IORESOURCE_BUSY
++ },
++ {
++ .name = "reserved",
++ .start = 0x378,
++ .end = 0x37f,
++ .flags = IORESOURCE_IO | IORESOURCE_BUSY
++ },
++ {
++ .name = "reserved",
++ .start = 0x278,
++ .end = 0x27f,
++ .flags = IORESOURCE_IO | IORESOURCE_BUSY
++ }
+ };
+
+ #define lp0 io_res[0]
--- gregkh-2.6.orig/arch/mips/au1000/common/pci.c
+++ gregkh-2.6/arch/mips/au1000/common/pci.c
@@ -40,17 +40,17 @@
@@ -779,3 +837,52 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
};
void __init tx4938_board_setup(void)
+--- gregkh-2.6.orig/drivers/video/console/vgacon.c
++++ gregkh-2.6/drivers/video/console/vgacon.c
+@@ -389,7 +389,7 @@ static const char __init *vgacon_startup
+ vga_video_port_val = VGA_CRT_DM;
+ if ((ORIG_VIDEO_EGA_BX & 0xff) != 0x10) {
+ static struct resource ega_console_resource =
+- { "ega", 0x3B0, 0x3BF };
++ { .name = "ega", .start = 0x3B0, .end = 0x3BF };
+ vga_video_type = VIDEO_TYPE_EGAM;
+ vga_vram_end = 0xb8000;
+ display_desc = "EGA+";
+@@ -397,9 +397,9 @@ static const char __init *vgacon_startup
+ &ega_console_resource);
+ } else {
+ static struct resource mda1_console_resource =
+- { "mda", 0x3B0, 0x3BB };
++ { .name = "mda", .start = 0x3B0, .end = 0x3BB };
+ static struct resource mda2_console_resource =
+- { "mda", 0x3BF, 0x3BF };
++ { .name = "mda", .start = 0x3BF, .end = 0x3BF };
+ vga_video_type = VIDEO_TYPE_MDA;
+ vga_vram_end = 0xb2000;
+ display_desc = "*MDA";
+@@ -422,14 +422,14 @@ static const char __init *vgacon_startup
+
+ if (!ORIG_VIDEO_ISVGA) {
+ static struct resource ega_console_resource
+- = { "ega", 0x3C0, 0x3DF };
++ = { .name = "ega", .start = 0x3C0, .end = 0x3DF };
+ vga_video_type = VIDEO_TYPE_EGAC;
+ display_desc = "EGA";
+ request_resource(&ioport_resource,
+ &ega_console_resource);
+ } else {
+ static struct resource vga_console_resource
+- = { "vga+", 0x3C0, 0x3DF };
++ = { .name = "vga+", .start = 0x3C0, .end = 0x3DF };
+ vga_video_type = VIDEO_TYPE_VGAC;
+ display_desc = "VGA+";
+ request_resource(&ioport_resource,
+@@ -473,7 +473,7 @@ static const char __init *vgacon_startup
+ }
+ } else {
+ static struct resource cga_console_resource =
+- { "cga", 0x3D4, 0x3D5 };
++ { .name = "cga", .start = 0x3D4, .end = 0x3D5 };
+ vga_video_type = VIDEO_TYPE_CGA;
+ vga_vram_end = 0xba000;
+ display_desc = "*CGA";
diff --git a/pci/64bit-resource-change-pci-core-and-arch-code-to-use-resource_size_t.patch b/pci/64bit-resource-change-pci-core-and-arch-code-to-use-resource_size_t.patch
new file mode 100644
index 0000000000000..620192f2a18bb
--- /dev/null
+++ b/pci/64bit-resource-change-pci-core-and-arch-code-to-use-resource_size_t.patch
@@ -0,0 +1,630 @@
+From 7669de406da122119159553a9327a56db329cad2 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 17:06:02 -0700
+Subject: [PATCH 15/16] 64bit resource: change pci core and arch code to use resource_size_t
+
+Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/alpha/kernel/pci.c | 4 ++--
+ arch/arm/kernel/bios32.c | 6 +++---
+ arch/cris/arch-v32/drivers/pci/bios.c | 4 ++--
+ arch/frv/mb93090-mb00/pci-frv.c | 4 ++--
+ arch/i386/pci/i386.c | 4 ++--
+ arch/ia64/pci/pci.c | 2 +-
+ arch/m68knommu/kernel/comempci.c | 3 ++-
+ arch/mips/pci/pci.c | 4 ++--
+ arch/mips/pmc-sierra/yosemite/ht.c | 4 ++--
+ arch/parisc/kernel/pci.c | 2 +-
+ arch/powerpc/kernel/pci_32.c | 22 +++++++++++++++-------
+ arch/powerpc/kernel/pci_64.c | 4 ++--
+ arch/ppc/kernel/pci.c | 12 ++++++------
+ arch/sh/boards/mpc1211/pci.c | 4 ++--
+ arch/sh/boards/overdrive/galileo.c | 2 +-
+ arch/sh/drivers/pci/pci.c | 6 +++---
+ arch/sh64/kernel/pcibios.c | 4 ++--
+ arch/sparc/kernel/pcic.c | 2 +-
+ arch/sparc64/kernel/pci.c | 2 +-
+ arch/v850/kernel/rte_mb_a_pci.c | 2 +-
+ arch/xtensa/kernel/pci.c | 6 +++---
+ drivers/pci/bus.c | 10 +++++-----
+ drivers/pci/pci-sysfs.c | 4 ++--
+ drivers/pci/pci.h | 6 +++---
+ drivers/pci/proc.c | 4 ++--
+ drivers/pci/rom.c | 10 +++++-----
+ drivers/pci/setup-res.c | 6 +++---
+ include/asm-arm/mach/pci.h | 2 +-
+ include/asm-powerpc/pci.h | 2 +-
+ include/asm-ppc/pci.h | 2 +-
+ include/linux/pci.h | 13 +++++++------
+ 31 files changed, 86 insertions(+), 76 deletions(-)
+
+--- gregkh-2.6.orig/arch/alpha/kernel/pci.c
++++ gregkh-2.6/arch/alpha/kernel/pci.c
+@@ -124,12 +124,12 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_
+
+ void
+ pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ struct pci_dev *dev = data;
+ struct pci_controller *hose = dev->sysdata;
+ unsigned long alignto;
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (res->flags & IORESOURCE_IO) {
+ /* Make sure we start at our min on all hoses */
+--- gregkh-2.6.orig/arch/arm/kernel/bios32.c
++++ gregkh-2.6/arch/arm/kernel/bios32.c
+@@ -304,7 +304,7 @@ static inline int pdev_bad_for_parity(st
+ static void __devinit
+ pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
+ {
+- unsigned long offset;
++ resource_size_t offset;
+ int i;
+
+ for (i = 0; i < PCI_NUM_RESOURCES; i++) {
+@@ -634,9 +634,9 @@ char * __init pcibios_setup(char *str)
+ * which might be mirrored at 0x0100-0x03ff..
+ */
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (res->flags & IORESOURCE_IO && start & 0x300)
+ start = (start + 0x3ff) & ~0x3ff;
+--- gregkh-2.6.orig/arch/cris/arch-v32/drivers/pci/bios.c
++++ gregkh-2.6/arch/cris/arch-v32/drivers/pci/bios.c
+@@ -45,10 +45,10 @@ int pci_mmap_page_range(struct pci_dev *
+
+ void
+ pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (start & 0x300) {
+ start = (start + 0x3ff) & ~0x3ff;
+--- gregkh-2.6.orig/arch/frv/mb93090-mb00/pci-frv.c
++++ gregkh-2.6/arch/frv/mb93090-mb00/pci-frv.c
+@@ -64,10 +64,10 @@ pcibios_update_resource(struct pci_dev *
+ */
+ void
+ pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (start & 0x300) {
+ start = (start + 0x3ff) & ~0x3ff;
+--- gregkh-2.6.orig/arch/i386/pci/i386.c
++++ gregkh-2.6/arch/i386/pci/i386.c
+@@ -48,10 +48,10 @@
+ */
+ void
+ pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (start & 0x300) {
+ start = (start + 0x3ff) & ~0x3ff;
+--- gregkh-2.6.orig/arch/ia64/pci/pci.c
++++ gregkh-2.6/arch/ia64/pci/pci.c
+@@ -568,7 +568,7 @@ pcibios_disable_device (struct pci_dev *
+
+ void
+ pcibios_align_resource (void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ }
+
+--- gregkh-2.6.orig/arch/m68knommu/kernel/comempci.c
++++ gregkh-2.6/arch/m68knommu/kernel/comempci.c
+@@ -357,7 +357,8 @@ void pcibios_fixup_bus(struct pci_bus *b
+
+ /*****************************************************************************/
+
+-void pcibios_align_resource(void *data, struct resource *res, unsigned long size, unsigned long align)
++void pcibios_align_resource(void *data, struct resource *res,
++ resource_size_t size, resource_size_t align)
+ {
+ }
+
+--- gregkh-2.6.orig/arch/mips/pci/pci.c
++++ gregkh-2.6/arch/mips/pci/pci.c
+@@ -51,11 +51,11 @@ unsigned long PCIBIOS_MIN_MEM = 0;
+ */
+ void
+ pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ struct pci_dev *dev = data;
+ struct pci_controller *hose = dev->sysdata;
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (res->flags & IORESOURCE_IO) {
+ /* Make sure we start at our min on all hoses */
+--- gregkh-2.6.orig/arch/mips/pmc-sierra/yosemite/ht.c
++++ gregkh-2.6/arch/mips/pmc-sierra/yosemite/ht.c
+@@ -383,12 +383,12 @@ void pcibios_update_resource(struct pci_
+
+
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ struct pci_dev *dev = data;
+
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ /* We need to avoid collisions with `mirrored' VGA ports
+ and other strange ISA hardware, so we always want the
+--- gregkh-2.6.orig/arch/parisc/kernel/pci.c
++++ gregkh-2.6/arch/parisc/kernel/pci.c
+@@ -289,7 +289,7 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
+ * than res->start.
+ */
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long alignment)
++ resource_size_t size, resource_size_t alignment)
+ {
+ unsigned long mask, align;
+
+--- gregkh-2.6.orig/arch/powerpc/kernel/pci_32.c
++++ gregkh-2.6/arch/powerpc/kernel/pci_32.c
+@@ -173,18 +173,18 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
+ * but we want to try to avoid allocating at 0x2900-0x2bff
+ * which might have be mirrored at 0x0100-0x03ff..
+ */
+-void pcibios_align_resource(void *data, struct resource *res, unsigned long size,
+- unsigned long align)
++void pcibios_align_resource(void *data, struct resource *res,
++ resource_size_t size, resource_size_t align)
+ {
+ struct pci_dev *dev = data;
+
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (size > 0x100) {
+ printk(KERN_ERR "PCI: I/O Region %s/%d too large"
+ " (%lld bytes)\n", pci_name(dev),
+- dev->resource - res, size);
++ dev->resource - res, (unsigned long long)size);
+ }
+
+ if (start & 0x300) {
+@@ -1114,8 +1114,16 @@ check_for_io_childs(struct pci_bus *bus,
+ int i;
+ int rc = 0;
+
+-#define push_end(res, size) do { unsigned long __sz = (size) ; \
+- res->end = ((res->end + __sz) / (__sz + 1)) * (__sz + 1) + __sz; \
++ /*
++ * Assuming mask is a power of two - 1, push_end
++ * moves res->end to the end of the next
++ * mask-aligned boundary.
++ * e.g. res->end of 0x1fff moves to 0x2fff
++ */
++#define push_end(res, mask) do { \
++ BUG_ON(((mask+1) & mask) != 0); \
++ res->end = -(-res->end & ~(unsigned long)mask); \
++ res->end += mask; \
+ } while (0)
+
+ list_for_each_entry(dev, &bus->devices, bus_list) {
+@@ -1756,7 +1764,7 @@ long sys_pciconfig_iobase(long which, un
+
+ void pci_resource_to_user(const struct pci_dev *dev, int bar,
+ const struct resource *rsrc,
+- u64 *start, u64 *end)
++ resource_size_t *start, resource_size_t *end)
+ {
+ struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
+ unsigned long offset = 0;
+--- gregkh-2.6.orig/arch/powerpc/kernel/pci_64.c
++++ gregkh-2.6/arch/powerpc/kernel/pci_64.c
+@@ -146,11 +146,11 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
+ * which might have be mirrored at 0x0100-0x03ff..
+ */
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ struct pci_dev *dev = data;
+ struct pci_controller *hose = pci_bus_to_host(dev->bus);
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+ unsigned long alignto;
+
+ if (res->flags & IORESOURCE_IO) {
+--- gregkh-2.6.orig/arch/ppc/kernel/pci.c
++++ gregkh-2.6/arch/ppc/kernel/pci.c
+@@ -171,13 +171,13 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
+ * but we want to try to avoid allocating at 0x2900-0x2bff
+ * which might have be mirrored at 0x0100-0x03ff..
+ */
+-void pcibios_align_resource(void *data, struct resource *res, unsigned long size,
+- unsigned long align)
++void pcibios_align_resource(void *data, struct resource *res,
++ resource_size_t size, resource_size_t align)
+ {
+ struct pci_dev *dev = data;
+
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (size > 0x100) {
+ printk(KERN_ERR "PCI: I/O Region %s/%d too large"
+@@ -960,8 +960,8 @@ static pgprot_t __pci_mmap_set_pgprot(st
+ else
+ prot |= _PAGE_GUARDED;
+
+- printk("PCI map for %s:%llx, prot: %llx\n", pci_name(dev), rp->start,
+- prot);
++ printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev),
++ (unsigned long long)rp->start, prot);
+
+ return __pgprot(prot);
+ }
+@@ -1131,7 +1131,7 @@ long sys_pciconfig_iobase(long which, un
+
+ void pci_resource_to_user(const struct pci_dev *dev, int bar,
+ const struct resource *rsrc,
+- u64 *start, u64 *end)
++ resource_size_t *start, resource_size_t *end)
+ {
+ struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
+ unsigned long offset = 0;
+--- gregkh-2.6.orig/arch/sh/boards/mpc1211/pci.c
++++ gregkh-2.6/arch/sh/boards/mpc1211/pci.c
+@@ -273,9 +273,9 @@ void __init pcibios_fixup_irqs(void)
+ }
+
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (res->flags & IORESOURCE_IO) {
+ if (start >= 0x10000UL) {
+--- gregkh-2.6.orig/arch/sh/boards/overdrive/galileo.c
++++ gregkh-2.6/arch/sh/boards/overdrive/galileo.c
+@@ -536,7 +536,7 @@ void __init pcibios_fixup_bus(struct pci
+ }
+
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size)
++ resource_size_t size)
+ {
+ }
+
+--- gregkh-2.6.orig/arch/sh/drivers/pci/pci.c
++++ gregkh-2.6/arch/sh/drivers/pci/pci.c
+@@ -75,7 +75,7 @@ pcibios_update_resource(struct pci_dev *
+ }
+
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ __attribute__ ((weak));
+
+ /*
+@@ -85,10 +85,10 @@ void pcibios_align_resource(void *data,
+ * modulo 0x400.
+ */
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (start & 0x300) {
+ start = (start + 0x3ff) & ~0x3ff;
+--- gregkh-2.6.orig/arch/sh64/kernel/pcibios.c
++++ gregkh-2.6/arch/sh64/kernel/pcibios.c
+@@ -69,10 +69,10 @@ pcibios_update_resource(struct pci_dev *
+ * modulo 0x400.
+ */
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (start & 0x300) {
+ start = (start + 0x3ff) & ~0x3ff;
+--- gregkh-2.6.orig/arch/sparc/kernel/pcic.c
++++ gregkh-2.6/arch/sparc/kernel/pcic.c
+@@ -859,7 +859,7 @@ char * __init pcibios_setup(char *str)
+ }
+
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ }
+
+--- gregkh-2.6.orig/arch/sparc64/kernel/pci.c
++++ gregkh-2.6/arch/sparc64/kernel/pci.c
+@@ -390,7 +390,7 @@ void pcibios_update_irq(struct pci_dev *
+ }
+
+ void pcibios_align_resource(void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ }
+
+--- gregkh-2.6.orig/arch/v850/kernel/rte_mb_a_pci.c
++++ gregkh-2.6/arch/v850/kernel/rte_mb_a_pci.c
+@@ -329,7 +329,7 @@ void pcibios_fixup_bus(struct pci_bus *b
+
+ void
+ pcibios_align_resource (void *data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ }
+
+--- gregkh-2.6.orig/arch/xtensa/kernel/pci.c
++++ gregkh-2.6/arch/xtensa/kernel/pci.c
+@@ -71,13 +71,13 @@ static int pci_bus_count;
+ * which might have be mirrored at 0x0100-0x03ff..
+ */
+ void
+-pcibios_align_resource(void *data, struct resource *res, unsigned long size,
+- unsigned long align)
++pcibios_align_resource(void *data, struct resource *res, resource_size_t size,
++ resource_size_t align)
+ {
+ struct pci_dev *dev = data;
+
+ if (res->flags & IORESOURCE_IO) {
+- unsigned long start = res->start;
++ resource_size_t start = res->start;
+
+ if (size > 0x100) {
+ printk(KERN_ERR "PCI: I/O Region %s/%d too large"
+--- gregkh-2.6.orig/drivers/pci/bus.c
++++ gregkh-2.6/drivers/pci/bus.c
+@@ -34,11 +34,11 @@
+ */
+ int
+ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
+- unsigned long size, unsigned long align, unsigned long min,
+- unsigned int type_mask,
+- void (*alignf)(void *, struct resource *,
+- unsigned long, unsigned long),
+- void *alignf_data)
++ resource_size_t size, resource_size_t align,
++ resource_size_t min, unsigned int type_mask,
++ void (*alignf)(void *, struct resource *, resource_size_t,
++ resource_size_t),
++ void *alignf_data)
+ {
+ int i, ret = -ENOMEM;
+
+--- gregkh-2.6.orig/drivers/pci/pci-sysfs.c
++++ gregkh-2.6/drivers/pci/pci-sysfs.c
+@@ -64,7 +64,7 @@ resource_show(struct device * dev, struc
+ char * str = buf;
+ int i;
+ int max = 7;
+- u64 start, end;
++ resource_size_t start, end;
+
+ if (pci_dev->subordinate)
+ max = DEVICE_COUNT_RESOURCE;
+@@ -320,7 +320,7 @@ pci_mmap_resource(struct kobject *kobj,
+ struct device, kobj));
+ struct resource *res = (struct resource *)attr->private;
+ enum pci_mmap_state mmap_type;
+- u64 start, end;
++ resource_size_t start, end;
+ int i;
+
+ for (i = 0; i < PCI_ROM_RESOURCE; i++)
+--- gregkh-2.6.orig/drivers/pci/pci.h
++++ gregkh-2.6/drivers/pci/pci.h
+@@ -6,10 +6,10 @@ extern int pci_create_sysfs_dev_files(st
+ extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
+ extern void pci_cleanup_rom(struct pci_dev *dev);
+ extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
+- unsigned long size, unsigned long align,
+- unsigned long min, unsigned int type_mask,
++ resource_size_t size, resource_size_t align,
++ resource_size_t min, unsigned int type_mask,
+ void (*alignf)(void *, struct resource *,
+- unsigned long, unsigned long),
++ resource_size_t, resource_size_t),
+ void *alignf_data);
+ /* Firmware callbacks */
+ extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
+--- gregkh-2.6.orig/drivers/pci/proc.c
++++ gregkh-2.6/drivers/pci/proc.c
+@@ -350,14 +350,14 @@ static int show_device(struct seq_file *
+ dev->irq);
+ /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */
+ for (i=0; i<7; i++) {
+- u64 start, end;
++ resource_size_t start, end;
+ pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
+ seq_printf(m, "\t%16llx",
+ (unsigned long long)(start |
+ (dev->resource[i].flags & PCI_REGION_FLAG_MASK)));
+ }
+ for (i=0; i<7; i++) {
+- u64 start, end;
++ resource_size_t start, end;
+ pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
+ seq_printf(m, "\t%16llx",
+ dev->resource[i].start < dev->resource[i].end ?
+--- gregkh-2.6.orig/drivers/pci/rom.c
++++ gregkh-2.6/drivers/pci/rom.c
+@@ -80,8 +80,8 @@ void __iomem *pci_map_rom(struct pci_dev
+ } else {
+ if (res->flags & IORESOURCE_ROM_COPY) {
+ *size = pci_resource_len(pdev, PCI_ROM_RESOURCE);
+- return (void __iomem *)pci_resource_start(pdev,
+- PCI_ROM_RESOURCE);
++ return (void __iomem *)(unsigned long)
++ pci_resource_start(pdev, PCI_ROM_RESOURCE);
+ } else {
+ /* assign the ROM an address if it doesn't have one */
+ if (res->parent == NULL &&
+@@ -170,11 +170,11 @@ void __iomem *pci_map_rom_copy(struct pc
+ return rom;
+
+ res->end = res->start + *size;
+- memcpy_fromio((void*)res->start, rom, *size);
++ memcpy_fromio((void*)(unsigned long)res->start, rom, *size);
+ pci_unmap_rom(pdev, rom);
+ res->flags |= IORESOURCE_ROM_COPY;
+
+- return (void __iomem *)res->start;
++ return (void __iomem *)(unsigned long)res->start;
+ }
+
+ /**
+@@ -227,7 +227,7 @@ void pci_cleanup_rom(struct pci_dev *pde
+ {
+ struct resource *res = &pdev->resource[PCI_ROM_RESOURCE];
+ if (res->flags & IORESOURCE_ROM_COPY) {
+- kfree((void*)res->start);
++ kfree((void*)(unsigned long)res->start);
+ res->flags &= ~IORESOURCE_ROM_COPY;
+ res->start = 0;
+ res->end = 0;
+--- gregkh-2.6.orig/drivers/pci/setup-res.c
++++ gregkh-2.6/drivers/pci/setup-res.c
+@@ -121,7 +121,7 @@ int pci_assign_resource(struct pci_dev *
+ {
+ struct pci_bus *bus = dev->bus;
+ struct resource *res = dev->resource + resno;
+- unsigned long size, min, align;
++ resource_size_t size, min, align;
+ int ret;
+
+ size = res->end - res->start + 1;
+@@ -169,7 +169,7 @@ pdev_sort_resources(struct pci_dev *dev,
+ for (i = 0; i < PCI_NUM_RESOURCES; i++) {
+ struct resource *r;
+ struct resource_list *list, *tmp;
+- unsigned long r_align;
++ resource_size_t r_align;
+
+ r = &dev->resource[i];
+ r_align = r->end - r->start;
+@@ -185,7 +185,7 @@ pdev_sort_resources(struct pci_dev *dev,
+ }
+ r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start;
+ for (list = head; ; list = list->next) {
+- unsigned long align = 0;
++ resource_size_t align = 0;
+ struct resource_list *ln = list->next;
+ int idx;
+
+--- gregkh-2.6.orig/include/asm-arm/mach/pci.h
++++ gregkh-2.6/include/asm-arm/mach/pci.h
+@@ -28,7 +28,7 @@ struct hw_pci {
+ struct pci_sys_data {
+ struct list_head node;
+ int busnr; /* primary bus number */
+- unsigned long mem_offset; /* bus->cpu memory mapping offset */
++ u64 mem_offset; /* bus->cpu memory mapping offset */
+ unsigned long io_offset; /* bus->cpu IO mapping offset */
+ struct pci_bus *bus; /* PCI bus */
+ struct resource *resource[3]; /* Primary PCI bus resources */
+--- gregkh-2.6.orig/include/asm-powerpc/pci.h
++++ gregkh-2.6/include/asm-powerpc/pci.h
+@@ -242,7 +242,7 @@ extern pgprot_t pci_phys_mem_access_prot
+ #define HAVE_ARCH_PCI_RESOURCE_TO_USER
+ extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
+ const struct resource *rsrc,
+- u64 *start, u64 *end);
++ resource_size_t *start, resource_size_t *end);
+ #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */
+
+ #endif /* __KERNEL__ */
+--- gregkh-2.6.orig/include/asm-ppc/pci.h
++++ gregkh-2.6/include/asm-ppc/pci.h
+@@ -133,7 +133,7 @@ extern pgprot_t pci_phys_mem_access_prot
+ #define HAVE_ARCH_PCI_RESOURCE_TO_USER
+ extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
+ const struct resource *rsrc,
+- u64 *start, u64 *end);
++ resource_size_t *start, resource_size_t *end);
+
+
+ #endif /* __KERNEL__ */
+--- gregkh-2.6.orig/include/linux/pci.h
++++ gregkh-2.6/include/linux/pci.h
+@@ -402,8 +402,8 @@ int pcibios_enable_device(struct pci_dev
+ char *pcibios_setup (char *str);
+
+ /* Used only when drivers/pci/setup.c is used */
+-void pcibios_align_resource(void *, struct resource *,
+- unsigned long, unsigned long);
++void pcibios_align_resource(void *, struct resource *, resource_size_t,
++ resource_size_t);
+ void pcibios_update_irq(struct pci_dev *, int irq);
+
+ /* Generic PCI functions used internally */
+@@ -528,10 +528,10 @@ void pci_release_region(struct pci_dev *
+
+ /* drivers/pci/bus.c */
+ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
+- unsigned long size, unsigned long align,
+- unsigned long min, unsigned int type_mask,
++ resource_size_t size, resource_size_t align,
++ resource_size_t min, unsigned int type_mask,
+ void (*alignf)(void *, struct resource *,
+- unsigned long, unsigned long),
++ resource_size_t, resource_size_t),
+ void *alignf_data);
+ void pci_enable_bridges(struct pci_bus *bus);
+
+@@ -725,7 +725,8 @@ static inline char *pci_name(struct pci_
+ */
+ #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER
+ static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
+- const struct resource *rsrc, u64 *start, u64 *end)
++ const struct resource *rsrc, resource_size_t *start,
++ resource_size_t *end)
+ {
+ *start = rsrc->start;
+ *end = rsrc->end;
diff --git a/pci/64bit-resource-change-pnp-core-to-use-resource_size_t.patch b/pci/64bit-resource-change-pnp-core-to-use-resource_size_t.patch
new file mode 100644
index 0000000000000..a1c8f1f06117d
--- /dev/null
+++ b/pci/64bit-resource-change-pnp-core-to-use-resource_size_t.patch
@@ -0,0 +1,169 @@
+From fdbdfd2477f61edfa92f3f6582d84e34c3d31d74 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 17:07:07 -0700
+Subject: [PATCH 14/16] 64bit resource: change pnp core to use resource_size_t
+
+Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/pnp/interface.c | 8 ++++----
+ drivers/pnp/manager.c | 15 ++++++++++-----
+ drivers/pnp/resource.c | 8 ++++----
+ include/linux/pnp.h | 7 +++++--
+ 4 files changed, 23 insertions(+), 15 deletions(-)
+
+--- gregkh-2.6.orig/drivers/pnp/interface.c
++++ gregkh-2.6/drivers/pnp/interface.c
+@@ -264,7 +264,7 @@ static ssize_t pnp_show_current_resource
+ if (pnp_port_flags(dev, i) & IORESOURCE_DISABLED)
+ pnp_printf(buffer," disabled\n");
+ else
+- pnp_printf(buffer," 0x%lx-0x%lx\n",
++ pnp_printf(buffer," 0x%llx-0x%llx\n",
+ pnp_port_start(dev, i),
+ pnp_port_end(dev, i));
+ }
+@@ -275,7 +275,7 @@ static ssize_t pnp_show_current_resource
+ if (pnp_mem_flags(dev, i) & IORESOURCE_DISABLED)
+ pnp_printf(buffer," disabled\n");
+ else
+- pnp_printf(buffer," 0x%lx-0x%lx\n",
++ pnp_printf(buffer," 0x%llx-0x%llx\n",
+ pnp_mem_start(dev, i),
+ pnp_mem_end(dev, i));
+ }
+@@ -286,7 +286,7 @@ static ssize_t pnp_show_current_resource
+ if (pnp_irq_flags(dev, i) & IORESOURCE_DISABLED)
+ pnp_printf(buffer," disabled\n");
+ else
+- pnp_printf(buffer," %ld\n",
++ pnp_printf(buffer," %lld\n",
+ pnp_irq(dev, i));
+ }
+ }
+@@ -296,7 +296,7 @@ static ssize_t pnp_show_current_resource
+ if (pnp_dma_flags(dev, i) & IORESOURCE_DISABLED)
+ pnp_printf(buffer," disabled\n");
+ else
+- pnp_printf(buffer," %ld\n",
++ pnp_printf(buffer," %lld\n",
+ pnp_dma(dev, i));
+ }
+ }
+--- gregkh-2.6.orig/drivers/pnp/manager.c
++++ gregkh-2.6/drivers/pnp/manager.c
+@@ -20,7 +20,8 @@ DECLARE_MUTEX(pnp_res_mutex);
+
+ static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
+ {
+- unsigned long *start, *end, *flags;
++ resource_size_t *start, *end;
++ unsigned long *flags;
+
+ if (!dev || !rule)
+ return -EINVAL;
+@@ -63,7 +64,8 @@ static int pnp_assign_port(struct pnp_de
+
+ static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
+ {
+- unsigned long *start, *end, *flags;
++ resource_size_t *start, *end;
++ unsigned long *flags;
+
+ if (!dev || !rule)
+ return -EINVAL;
+@@ -116,7 +118,8 @@ static int pnp_assign_mem(struct pnp_dev
+
+ static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx)
+ {
+- unsigned long *start, *end, *flags;
++ resource_size_t *start, *end;
++ unsigned long *flags;
+ int i;
+
+ /* IRQ priority: this table is good for i386 */
+@@ -168,7 +171,8 @@ static int pnp_assign_irq(struct pnp_dev
+
+ static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
+ {
+- unsigned long *start, *end, *flags;
++ resource_size_t *start, *end;
++ unsigned long *flags;
+ int i;
+
+ /* DMA priority: this table is good for i386 */
+@@ -582,7 +586,8 @@ int pnp_disable_dev(struct pnp_dev *dev)
+ * @size: size of region
+ *
+ */
+-void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size)
++void pnp_resource_change(struct resource *resource, resource_size_t start,
++ resource_size_t size)
+ {
+ if (resource == NULL)
+ return;
+--- gregkh-2.6.orig/drivers/pnp/resource.c
++++ gregkh-2.6/drivers/pnp/resource.c
+@@ -241,7 +241,7 @@ int pnp_check_port(struct pnp_dev * dev,
+ {
+ int tmp;
+ struct pnp_dev *tdev;
+- unsigned long *port, *end, *tport, *tend;
++ resource_size_t *port, *end, *tport, *tend;
+ port = &dev->res.port_resource[idx].start;
+ end = &dev->res.port_resource[idx].end;
+
+@@ -297,7 +297,7 @@ int pnp_check_mem(struct pnp_dev * dev,
+ {
+ int tmp;
+ struct pnp_dev *tdev;
+- unsigned long *addr, *end, *taddr, *tend;
++ resource_size_t *addr, *end, *taddr, *tend;
+ addr = &dev->res.mem_resource[idx].start;
+ end = &dev->res.mem_resource[idx].end;
+
+@@ -358,7 +358,7 @@ int pnp_check_irq(struct pnp_dev * dev,
+ {
+ int tmp;
+ struct pnp_dev *tdev;
+- unsigned long * irq = &dev->res.irq_resource[idx].start;
++ resource_size_t * irq = &dev->res.irq_resource[idx].start;
+
+ /* if the resource doesn't exist, don't complain about it */
+ if (cannot_compare(dev->res.irq_resource[idx].flags))
+@@ -423,7 +423,7 @@ int pnp_check_dma(struct pnp_dev * dev,
+ #ifndef CONFIG_IA64
+ int tmp;
+ struct pnp_dev *tdev;
+- unsigned long * dma = &dev->res.dma_resource[idx].start;
++ resource_size_t * dma = &dev->res.dma_resource[idx].start;
+
+ /* if the resource doesn't exist, don't complain about it */
+ if (cannot_compare(dev->res.dma_resource[idx].flags))
+--- gregkh-2.6.orig/include/linux/pnp.h
++++ gregkh-2.6/include/linux/pnp.h
+@@ -389,7 +389,8 @@ int pnp_start_dev(struct pnp_dev *dev);
+ int pnp_stop_dev(struct pnp_dev *dev);
+ int pnp_activate_dev(struct pnp_dev *dev);
+ int pnp_disable_dev(struct pnp_dev *dev);
+-void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size);
++void pnp_resource_change(struct resource *resource, resource_size_t start,
++ resource_size_t size);
+
+ /* protocol helpers */
+ int pnp_is_active(struct pnp_dev * dev);
+@@ -434,7 +435,9 @@ static inline int pnp_start_dev(struct p
+ static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
+ static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
+ static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
+-static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { }
++static inline void pnp_resource_change(struct resource *resource,
++ resource_size_t start,
++ resource_size_t size) { }
+
+ /* protocol helpers */
+ static inline int pnp_is_active(struct pnp_dev * dev) { return 0; }
diff --git a/pci/kconfigurable-resources-core-changes.patch b/pci/64bit-resource-change-resource-core-to-use-resource_size_t.patch
index 7924fd1799ff6..d336eb8af4f04 100644
--- a/pci/kconfigurable-resources-core-changes.patch
+++ b/pci/64bit-resource-change-resource-core-to-use-resource_size_t.patch
@@ -1,60 +1,57 @@
-From vivek@in.ibm.com Fri May 5 10:29:02 2006
-Date: Fri, 5 May 2006 13:28:47 -0400
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Greg KH <gregkh@suse.de>, Morton Andrew Morton <akpm@osdl.org>
-Subject: kconfigurable resources core changes
-Message-ID: <20060505172847.GC6450@in.ibm.com>
-Content-Disposition: inline
+From 97fcb5be4e3835f75a84b6ad3141fd3f3110ae62 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 16:09:23 -0700
+Subject: [PATCH 12/16] 64bit resource: change resource core to use resource_size_t
+Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>
-
-o Core changes for Kconfigurable memory and IO resources. By default resources
- are 64bit until chosen to be 32bit.
-
-o Last time I posted the patches for 64bit memory resources but it raised
- the concerns regarding code bloat on 32bit systems who use 32 bit
- resources.
-
-o This patch-set allows resources to be kconfigurable.
-
-o I have done cross compilation on i386, x86_64, ppc, powerpc, sparc, sparc64
- ia64 and alpha.
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
- include/linux/ioport.h | 25 ++++++++++++++-----------
- include/linux/types.h | 7 +++++++
- kernel/resource.c | 43 +++++++++++++++++++++++++++----------------
- 3 files changed, 48 insertions(+), 27 deletions(-)
+ arch/sparc/kernel/ioport.c | 4 ++--
+ include/linux/ioport.h | 23 +++++++++++++----------
+ kernel/resource.c | 34 ++++++++++++++++++----------------
+ 3 files changed, 33 insertions(+), 28 deletions(-)
+--- gregkh-2.6.orig/arch/sparc/kernel/ioport.c
++++ gregkh-2.6/arch/sparc/kernel/ioport.c
+@@ -206,7 +206,7 @@ _sparc_ioremap(struct resource *res, u32
+ pa &= PAGE_MASK;
+ sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1);
+
+- return (void __iomem *) (res->start + offset);
++ return (void __iomem *)(unsigned long)(res->start + offset);
+ }
+
+ /*
+@@ -279,7 +279,7 @@ void *sbus_alloc_consistent(struct sbus_
+ res->name = sdev->prom_name;
+ }
+
+- return (void *)res->start;
++ return (void *)(unsigned long)res->start;
+
+ err_noiommu:
+ release_resource(res);
--- gregkh-2.6.orig/include/linux/ioport.h
+++ gregkh-2.6/include/linux/ioport.h
-@@ -15,7 +15,7 @@
- * nesting etc..
- */
- struct resource {
-- u64 start, end;
-+ resource_size_t start, end;
- const char *name;
- unsigned long flags;
- struct resource *parent, *sibling, *child;
-@@ -97,31 +97,34 @@ extern struct resource * ____request_res
+@@ -98,31 +98,34 @@ extern struct resource * ____request_res
extern int release_resource(struct resource *new);
extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new);
extern int allocate_resource(struct resource *root, struct resource *new,
-- u64 size,
-- u64 min, u64 max,
-- u64 align,
+- unsigned long size,
+- unsigned long min, unsigned long max,
+- unsigned long align,
+ resource_size_t size, resource_size_t min,
+ resource_size_t max, resource_size_t align,
void (*alignf)(void *, struct resource *,
-- u64, u64),
+- unsigned long, unsigned long),
+ resource_size_t, resource_size_t),
void *alignf_data);
--int adjust_resource(struct resource *res, u64 start,
-- u64 size);
+-int adjust_resource(struct resource *res, unsigned long start,
+- unsigned long size);
+int adjust_resource(struct resource *res, resource_size_t start,
+ resource_size_t size);
@@ -63,7 +60,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
#define rename_region(region, newname) do { (region)->name = (newname); } while (0)
--extern struct resource * __request_region(struct resource *, u64 start, u64 n, const char *name);
+-extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name);
+extern struct resource * __request_region(struct resource *,
+ resource_size_t start,
+ resource_size_t n, const char *name);
@@ -73,149 +70,105 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
--extern int __check_region(struct resource *, u64, u64);
--extern void __release_region(struct resource *, u64, u64);
+-extern int __check_region(struct resource *, unsigned long, unsigned long);
+-extern void __release_region(struct resource *, unsigned long, unsigned long);
+extern int __check_region(struct resource *, resource_size_t, resource_size_t);
+extern void __release_region(struct resource *, resource_size_t,
+ resource_size_t);
--static inline int __deprecated check_region(u64 s, u64 n)
+-static inline int __deprecated check_region(unsigned long s, unsigned long n)
+static inline int __deprecated check_region(resource_size_t s,
+ resource_size_t n)
{
return __check_region(&ioport_resource, s, n);
}
---- gregkh-2.6.orig/include/linux/types.h
-+++ gregkh-2.6/include/linux/types.h
-@@ -178,8 +178,15 @@ typedef __u64 __bitwise __be64;
-
- #ifdef __KERNEL__
- typedef unsigned __bitwise__ gfp_t;
-+
-+#ifdef CONFIG_RESOURCES_32BIT
-+typedef __u32 resource_size_t;
-+#else
-+typedef __u64 resource_size_t;
- #endif
-
-+#endif /* __KERNEL__ */
-+
- struct ustat {
- __kernel_daddr_t f_tfree;
- __kernel_ino_t f_tinode;
--- gregkh-2.6.orig/kernel/resource.c
+++ gregkh-2.6/kernel/resource.c
-@@ -23,7 +23,11 @@
-
- struct resource ioport_resource = {
- .name = "PCI IO",
-+#ifdef CONFIG_RESOURCES_32BIT
-+ .start = 0x0000UL,
-+#else
- .start = 0x0000ULL,
-+#endif
- .end = IO_SPACE_LIMIT,
- .flags = IORESOURCE_IO,
- };
-@@ -32,8 +36,13 @@ EXPORT_SYMBOL(ioport_resource);
-
- struct resource iomem_resource = {
- .name = "PCI mem",
-+#ifdef CONFIG_RESOURCES_32BIT
-+ .start = 0UL,
-+ .end = ~0UL,
-+#else
- .start = 0ULL,
- .end = ~0ULL,
-+#endif
- .flags = IORESOURCE_MEM,
- };
-
-@@ -151,8 +160,8 @@ __initcall(ioresources_init);
+@@ -151,8 +151,8 @@ __initcall(ioresources_init);
/* Return the conflict entry if you can't request it */
static struct resource * __request_resource(struct resource *root, struct resource *new)
{
-- u64 start = new->start;
-- u64 end = new->end;
+- unsigned long start = new->start;
+- unsigned long end = new->end;
+ resource_size_t start = new->start;
+ resource_size_t end = new->end;
struct resource *tmp, **p;
if (end < start)
-@@ -236,11 +245,10 @@ EXPORT_SYMBOL(release_resource);
+@@ -236,11 +236,10 @@ EXPORT_SYMBOL(release_resource);
* Find empty slot in the resource tree given range and alignment.
*/
static int find_resource(struct resource *root, struct resource *new,
-- u64 size,
-- u64 min, u64 max,
-- u64 align,
+- unsigned long size,
+- unsigned long min, unsigned long max,
+- unsigned long align,
+ resource_size_t size, resource_size_t min,
+ resource_size_t max, resource_size_t align,
void (*alignf)(void *, struct resource *,
-- u64, u64),
+- unsigned long, unsigned long),
+ resource_size_t, resource_size_t),
void *alignf_data)
{
struct resource *this = root->child;
-@@ -282,11 +290,10 @@ static int find_resource(struct resource
+@@ -282,11 +281,10 @@ static int find_resource(struct resource
* Allocate empty slot in the resource tree given range and alignment.
*/
int allocate_resource(struct resource *root, struct resource *new,
-- u64 size,
-- u64 min, u64 max,
-- u64 align,
+- unsigned long size,
+- unsigned long min, unsigned long max,
+- unsigned long align,
+ resource_size_t size, resource_size_t min,
+ resource_size_t max, resource_size_t align,
void (*alignf)(void *, struct resource *,
-- u64, u64),
+- unsigned long, unsigned long),
+ resource_size_t, resource_size_t),
void *alignf_data)
{
int err;
-@@ -378,10 +385,10 @@ EXPORT_SYMBOL(insert_resource);
+@@ -378,10 +376,10 @@ EXPORT_SYMBOL(insert_resource);
* arguments. Returns -EBUSY if it can't fit. Existing children of
* the resource are assumed to be immutable.
*/
--int adjust_resource(struct resource *res, u64 start, u64 size)
+-int adjust_resource(struct resource *res, unsigned long start, unsigned long size)
+int adjust_resource(struct resource *res, resource_size_t start, resource_size_t size)
{
struct resource *tmp, *parent = res->parent;
-- u64 end = start + size - 1;
+- unsigned long end = start + size - 1;
+ resource_size_t end = start + size - 1;
int result = -EBUSY;
write_lock(&resource_lock);
-@@ -428,7 +435,9 @@ EXPORT_SYMBOL(adjust_resource);
+@@ -428,7 +426,9 @@ EXPORT_SYMBOL(adjust_resource);
*
* Release-region releases a matching busy region.
*/
--struct resource * __request_region(struct resource *parent, u64 start, u64 n, const char *name)
+-struct resource * __request_region(struct resource *parent, unsigned long start, unsigned long n, const char *name)
+struct resource * __request_region(struct resource *parent,
+ resource_size_t start, resource_size_t n,
+ const char *name)
{
struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
-@@ -464,7 +473,8 @@ struct resource * __request_region(struc
+@@ -464,7 +464,8 @@ struct resource * __request_region(struc
EXPORT_SYMBOL(__request_region);
--int __check_region(struct resource *parent, u64 start, u64 n)
+-int __check_region(struct resource *parent, unsigned long start, unsigned long n)
+int __check_region(struct resource *parent, resource_size_t start,
+ resource_size_t n)
{
struct resource * res;
-@@ -479,10 +489,11 @@ int __check_region(struct resource *pare
+@@ -479,10 +480,11 @@ int __check_region(struct resource *pare
EXPORT_SYMBOL(__check_region);
--void __release_region(struct resource *parent, u64 start, u64 n)
+-void __release_region(struct resource *parent, unsigned long start, unsigned long n)
+void __release_region(struct resource *parent, resource_size_t start,
+ resource_size_t n)
{
struct resource **p;
-- u64 end;
+- unsigned long end;
+ resource_size_t end;
p = &parent->child;
diff --git a/pci/64bit-resource-convert-a-few-remaining-drivers-to-use-resource_size_t-where-needed.patch b/pci/64bit-resource-convert-a-few-remaining-drivers-to-use-resource_size_t-where-needed.patch
new file mode 100644
index 0000000000000..ea4832c8c77c4
--- /dev/null
+++ b/pci/64bit-resource-convert-a-few-remaining-drivers-to-use-resource_size_t-where-needed.patch
@@ -0,0 +1,131 @@
+From 57f2f6f5f7ecb281719f6012406990854ec5b7a3 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 17:07:52 -0700
+Subject: [PATCH 15/16] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
+
+Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/ieee1394/ohci1394.c | 2 +-
+ drivers/isdn/hisax/hfc_pci.c | 2 +-
+ drivers/net/8139cp.c | 2 +-
+ drivers/pcmcia/rsrc_nonstatic.c | 14 +++++++-------
+ drivers/serial/8250_pci.c | 4 ++--
+ drivers/usb/host/sl811-hcd.c | 10 +++++++---
+ 6 files changed, 19 insertions(+), 15 deletions(-)
+
+--- gregkh-2.6.orig/drivers/ieee1394/ohci1394.c
++++ gregkh-2.6/drivers/ieee1394/ohci1394.c
+@@ -3210,7 +3210,7 @@ static int __devinit ohci1394_pci_probe(
+ {
+ struct hpsb_host *host;
+ struct ti_ohci *ohci; /* shortcut to currently handled device */
+- unsigned long ohci_base;
++ resource_size_t ohci_base;
+
+ if (pci_enable_device(dev))
+ FAIL(-ENXIO, "Failed to enable OHCI hardware");
+--- gregkh-2.6.orig/drivers/isdn/hisax/hfc_pci.c
++++ gregkh-2.6/drivers/isdn/hisax/hfc_pci.c
+@@ -1688,7 +1688,7 @@ setup_hfcpci(struct IsdnCard *card)
+ printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n");
+ return (0);
+ }
+- cs->hw.hfcpci.pci_io = (char *) dev_hfcpci->resource[ 1].start;
++ cs->hw.hfcpci.pci_io = (char *)(unsigned long)dev_hfcpci->resource[1].start;
+ printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
+ } else {
+ printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
+--- gregkh-2.6.orig/drivers/net/8139cp.c
++++ gregkh-2.6/drivers/net/8139cp.c
+@@ -1668,7 +1668,7 @@ static int cp_init_one (struct pci_dev *
+ struct cp_private *cp;
+ int rc;
+ void __iomem *regs;
+- long pciaddr;
++ resource_size_t pciaddr;
+ unsigned int addr_len, i, pci_using_dac;
+ u8 pci_rev;
+
+--- gregkh-2.6.orig/drivers/pcmcia/rsrc_nonstatic.c
++++ gregkh-2.6/drivers/pcmcia/rsrc_nonstatic.c
+@@ -72,7 +72,7 @@ static DEFINE_MUTEX(rsrc_mutex);
+ ======================================================================*/
+
+ static struct resource *
+-make_resource(unsigned long b, unsigned long n, int flags, char *name)
++make_resource(resource_size_t b, resource_size_t n, int flags, char *name)
+ {
+ struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
+
+@@ -86,8 +86,8 @@ make_resource(unsigned long b, unsigned
+ }
+
+ static struct resource *
+-claim_region(struct pcmcia_socket *s, unsigned long base, unsigned long size,
+- int type, char *name)
++claim_region(struct pcmcia_socket *s, resource_size_t base,
++ resource_size_t size, int type, char *name)
+ {
+ struct resource *res, *parent;
+
+@@ -519,10 +519,10 @@ struct pcmcia_align_data {
+
+ static void
+ pcmcia_common_align(void *align_data, struct resource *res,
+- unsigned long size, unsigned long align)
++ resource_size_t size, resource_size_t align)
+ {
+ struct pcmcia_align_data *data = align_data;
+- unsigned long start;
++ resource_size_t start;
+ /*
+ * Ensure that we have the correct start address
+ */
+@@ -533,8 +533,8 @@ pcmcia_common_align(void *align_data, st
+ }
+
+ static void
+-pcmcia_align(void *align_data, struct resource *res,
+- unsigned long size, unsigned long align)
++pcmcia_align(void *align_data, struct resource *res, resource_size_t size,
++ resource_size_t align)
+ {
+ struct pcmcia_align_data *data = align_data;
+ struct resource_map *m;
+--- gregkh-2.6.orig/drivers/serial/8250_pci.c
++++ gregkh-2.6/drivers/serial/8250_pci.c
+@@ -594,8 +594,8 @@ pci_default_setup(struct serial_private
+ else
+ offset += idx * board->uart_offset;
+
+- maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) /
+- (8 << board->reg_shift);
++ maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
++ (board->reg_shift + 3);
+
+ if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
+ return 1;
+--- gregkh-2.6.orig/drivers/usb/host/sl811-hcd.c
++++ gregkh-2.6/drivers/usb/host/sl811-hcd.c
+@@ -1684,9 +1684,13 @@ sl811h_probe(struct platform_device *dev
+ if (!addr || !data)
+ return -ENODEV;
+ ioaddr = 1;
+-
+- addr_reg = (void __iomem *) addr->start;
+- data_reg = (void __iomem *) data->start;
++ /*
++ * NOTE: 64-bit resource->start is getting truncated
++ * to avoid compiler warning, assuming that ->start
++ * is always 32-bit for this case
++ */
++ addr_reg = (void __iomem *) (unsigned long) addr->start;
++ data_reg = (void __iomem *) (unsigned long) data->start;
+ } else {
+ addr_reg = ioremap(addr->start, 1);
+ if (addr_reg == NULL) {
diff --git a/pci/64bit-resource-finally-enable-64bit-resource-sizes.patch b/pci/64bit-resource-finally-enable-64bit-resource-sizes.patch
new file mode 100644
index 0000000000000..d82154d7da790
--- /dev/null
+++ b/pci/64bit-resource-finally-enable-64bit-resource-sizes.patch
@@ -0,0 +1,359 @@
+From 21aca233bc773de3254e9ea6847ba467a48a0f19 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 17:11:31 -0700
+Subject: [PATCH 16/16] 64bit Resource: finally enable 64bit resource sizes
+
+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>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/arm/Kconfig | 7 +++++++
+ arch/arm26/Kconfig | 7 +++++++
+ arch/cris/Kconfig | 7 +++++++
+ arch/frv/Kconfig | 7 +++++++
+ arch/i386/Kconfig | 7 +++++++
+ arch/m32r/Kconfig | 7 +++++++
+ arch/m68k/Kconfig | 7 +++++++
+ arch/m68knommu/Kconfig | 7 +++++++
+ arch/mips/Kconfig | 8 ++++++++
+ arch/parisc/Kconfig | 8 ++++++++
+ arch/powerpc/Kconfig | 8 ++++++++
+ arch/ppc/Kconfig | 7 +++++++
+ arch/s390/Kconfig | 8 ++++++++
+ arch/sh/Kconfig | 7 +++++++
+ arch/sparc/Kconfig | 7 +++++++
+ arch/v850/Kconfig | 7 +++++++
+ arch/xtensa/Kconfig | 7 +++++++
+ include/linux/types.h | 7 ++++++-
+ kernel/resource.c | 11 ++++++++++-
+ 19 files changed, 139 insertions(+), 2 deletions(-)
+
+--- gregkh-2.6.orig/arch/arm/Kconfig
++++ gregkh-2.6/arch/arm/Kconfig
+@@ -518,6 +518,13 @@ config NODES_SHIFT
+
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ config LEDS
+ bool "Timer and CPU usage LEDs"
+ depends on ARCH_CDB89712 || ARCH_CO285 || ARCH_EBSA110 || \
+--- gregkh-2.6.orig/arch/arm26/Kconfig
++++ gregkh-2.6/arch/arm26/Kconfig
+@@ -187,6 +187,13 @@ config CMDLINE
+
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ endmenu
+
+ source "net/Kconfig"
+--- gregkh-2.6.orig/arch/cris/Kconfig
++++ gregkh-2.6/arch/cris/Kconfig
+@@ -80,6 +80,13 @@ config PREEMPT
+
+ source mm/Kconfig
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ endmenu
+
+ menu "Hardware setup"
+--- gregkh-2.6.orig/arch/frv/Kconfig
++++ gregkh-2.6/arch/frv/Kconfig
+@@ -80,6 +80,13 @@ config HIGHPTE
+
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ choice
+ prompt "uClinux kernel load address"
+ depends on !MMU
+--- gregkh-2.6.orig/arch/i386/Kconfig
++++ gregkh-2.6/arch/i386/Kconfig
+@@ -754,6 +754,13 @@ config PHYSICAL_START
+
+ Don't change this unless you know what you are doing.
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL && !X86_PAE
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ config HOTPLUG_CPU
+ bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
+ depends on SMP && HOTPLUG && EXPERIMENTAL && !X86_VOYAGER
+--- gregkh-2.6.orig/arch/m32r/Kconfig
++++ gregkh-2.6/arch/m32r/Kconfig
+@@ -188,6 +188,13 @@ config ARCH_DISCONTIGMEM_ENABLE
+
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ config IRAM_START
+ hex "Internal memory start address (hex)"
+ default "00f00000" if !CHIP_M32104
+--- gregkh-2.6.orig/arch/m68k/Kconfig
++++ gregkh-2.6/arch/m68k/Kconfig
+@@ -368,6 +368,13 @@ config 060_WRITETHROUGH
+
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ endmenu
+
+ menu "General setup"
+--- gregkh-2.6.orig/arch/m68knommu/Kconfig
++++ gregkh-2.6/arch/m68knommu/Kconfig
+@@ -605,6 +605,13 @@ endchoice
+
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ endmenu
+
+ config ISA_DMA_API
+--- gregkh-2.6.orig/arch/mips/Kconfig
++++ gregkh-2.6/arch/mips/Kconfig
+@@ -1653,6 +1653,14 @@ config NR_CPUS
+
+ source "kernel/Kconfig.preempt"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ depends on 32BIT
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ config RTC_DS1742
+ bool "DS1742 BRAM/RTC support"
+ depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927
+--- gregkh-2.6.orig/arch/parisc/Kconfig
++++ gregkh-2.6/arch/parisc/Kconfig
+@@ -217,6 +217,14 @@ source "kernel/Kconfig.preempt"
+ source "kernel/Kconfig.hz"
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ depends on !64BIT
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ config COMPAT
+ def_bool y
+ depends on 64BIT
+--- gregkh-2.6.orig/arch/powerpc/Kconfig
++++ gregkh-2.6/arch/powerpc/Kconfig
+@@ -626,6 +626,14 @@ config CRASH_DUMP
+
+ Don't change this unless you know what you are doing.
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ depends on PPC32
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ config EMBEDDEDBOOT
+ bool
+ depends on 8xx || 8260
+--- gregkh-2.6.orig/arch/ppc/Kconfig
++++ gregkh-2.6/arch/ppc/Kconfig
+@@ -953,6 +953,13 @@ source kernel/Kconfig.hz
+ source kernel/Kconfig.preempt
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ source "fs/Kconfig.binfmt"
+
+ config PREP_RESIDUAL
+--- gregkh-2.6.orig/arch/s390/Kconfig
++++ gregkh-2.6/arch/s390/Kconfig
+@@ -218,6 +218,14 @@ config WARN_STACK_SIZE
+
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ depends on !64BIT
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ comment "I/O subsystem configuration"
+
+ config MACHCHK_WARNING
+--- gregkh-2.6.orig/arch/sh/Kconfig
++++ gregkh-2.6/arch/sh/Kconfig
+@@ -532,6 +532,13 @@ config NODES_SHIFT
+ default "1"
+ depends on NEED_MULTIPLE_NODES
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ endmenu
+
+ menu "Boot options"
+--- gregkh-2.6.orig/arch/sparc/Kconfig
++++ gregkh-2.6/arch/sparc/Kconfig
+@@ -67,6 +67,13 @@ config SPARC32
+ maintains both the SPARC32 and SPARC64 ports; its web page is
+ available at <http://www.ultralinux.org/>.
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ # Global things across all Sun machines.
+ config ISA
+ bool
+--- gregkh-2.6.orig/arch/v850/Kconfig
++++ gregkh-2.6/arch/v850/Kconfig
+@@ -235,6 +235,13 @@ menu "Processor type and features"
+
+ source "mm/Kconfig"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ endmenu
+
+
+--- gregkh-2.6.orig/arch/xtensa/Kconfig
++++ gregkh-2.6/arch/xtensa/Kconfig
+@@ -99,6 +99,13 @@ config MATH_EMULATION
+ config HIGHMEM
+ bool "High memory support"
+
++config RESOURCES_32BIT
++ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ By default resources are 64 bit. This option allows memory and IO
++ resources to be 32 bit to optimize code size.
++
+ endmenu
+
+ menu "Platform options"
+--- gregkh-2.6.orig/include/linux/types.h
++++ gregkh-2.6/include/linux/types.h
+@@ -179,9 +179,14 @@ typedef __u64 __bitwise __be64;
+ #ifdef __KERNEL__
+ typedef unsigned __bitwise__ gfp_t;
+
+-typedef unsigned long resource_size_t;
++#ifdef CONFIG_RESOURCES_32BIT
++typedef __u32 resource_size_t;
++#else
++typedef __u64 resource_size_t;
+ #endif
+
++#endif /* __KERNEL__ */
++
+ struct ustat {
+ __kernel_daddr_t f_tfree;
+ __kernel_ino_t f_tinode;
+--- gregkh-2.6.orig/kernel/resource.c
++++ gregkh-2.6/kernel/resource.c
+@@ -23,7 +23,11 @@
+
+ struct resource ioport_resource = {
+ .name = "PCI IO",
+- .start = 0x0000,
++#ifdef CONFIG_RESOURCES_32BIT
++ .start = 0x0000UL,
++#else
++ .start = 0x0000ULL,
++#endif
+ .end = IO_SPACE_LIMIT,
+ .flags = IORESOURCE_IO,
+ };
+@@ -32,8 +36,13 @@ EXPORT_SYMBOL(ioport_resource);
+
+ struct resource iomem_resource = {
+ .name = "PCI mem",
++#ifdef CONFIG_RESOURCES_32BIT
+ .start = 0UL,
+ .end = ~0UL,
++#else
++ .start = 0ULL,
++ .end = ~0ULL,
++#endif
+ .flags = IORESOURCE_MEM,
+ };
+
diff --git a/pci/64bit-resource-fix-up-printks-for-resources-in-arch-and-core-code.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-arch-and-core-code.patch
new file mode 100644
index 0000000000000..59096efac0cba
--- /dev/null
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-arch-and-core-code.patch
@@ -0,0 +1,395 @@
+From 651121fbbfe26011beacba085ad9a6c566956c83 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:18:31 -0700
+Subject: [PATCH 09/16] 64bit resource: fix up printks for resources in arch and core code
+
+This is needed if we wish to change the size of the resource structures.
+
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ arch/i386/kernel/efi.c | 6 +++-
+ arch/powerpc/kernel/pci_32.c | 37 +++++++++++++++--------------
+ arch/powerpc/platforms/83xx/pci.c | 5 ++--
+ arch/powerpc/platforms/85xx/pci.c | 5 ++--
+ arch/powerpc/platforms/chrp/pci.c | 4 +--
+ arch/powerpc/platforms/maple/pci.c | 5 ++--
+ arch/powerpc/platforms/powermac/pci.c | 5 ++--
+ arch/ppc/kernel/pci.c | 42 ++++++++++++++++++++--------------
+ arch/sparc/kernel/ioport.c | 4 ++-
+ kernel/resource.c | 10 ++++----
+ 10 files changed, 71 insertions(+), 52 deletions(-)
+
+--- gregkh-2.6.orig/arch/i386/kernel/efi.c
++++ gregkh-2.6/arch/i386/kernel/efi.c
+@@ -601,8 +601,10 @@ efi_initialize_iomem_resources(struct re
+ res->end = res->start + ((md->num_pages << EFI_PAGE_SHIFT) - 1);
+ res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+ if (request_resource(&iomem_resource, res) < 0)
+- printk(KERN_ERR PFX "Failed to allocate res %s : 0x%lx-0x%lx\n",
+- res->name, res->start, res->end);
++ printk(KERN_ERR PFX "Failed to allocate res %s : "
++ "0x%llx-0x%llx\n", res->name,
++ (unsigned long long)res->start,
++ (unsigned long long)res->end);
+ /*
+ * We don't know which region contains kernel data so we try
+ * it repeatedly and let the resource manager test it.
+--- gregkh-2.6.orig/arch/powerpc/kernel/pci_32.c
++++ gregkh-2.6/arch/powerpc/kernel/pci_32.c
+@@ -99,7 +99,7 @@ pcibios_fixup_resources(struct pci_dev *
+ if (!res->flags)
+ continue;
+ if (res->end == 0xffffffff) {
+- DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n",
++ DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
+ pci_name(dev), i, res->start, res->end);
+ res->end -= res->start;
+ res->start = 0;
+@@ -117,7 +117,7 @@ pcibios_fixup_resources(struct pci_dev *
+ res->start += offset;
+ res->end += offset;
+ #ifdef DEBUG
+- printk("Fixup res %d (%lx) of dev %s: %lx -> %lx\n",
++ printk("Fixup res %d (%lx) of dev %s: %llx -> %llx\n",
+ i, res->flags, pci_name(dev),
+ res->start - offset, res->start);
+ #endif
+@@ -183,7 +183,7 @@ void pcibios_align_resource(void *data,
+
+ if (size > 0x100) {
+ printk(KERN_ERR "PCI: I/O Region %s/%d too large"
+- " (%ld bytes)\n", pci_name(dev),
++ " (%lld bytes)\n", pci_name(dev),
+ dev->resource - res, size);
+ }
+
+@@ -255,8 +255,8 @@ pcibios_allocate_bus_resources(struct li
+ }
+ }
+
+- DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n",
+- res->start, res->end, res->flags, pr);
++ DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
++ res->start, res->end, res->flags, pr);
+ if (pr) {
+ if (request_resource(pr, res) == 0)
+ continue;
+@@ -306,7 +306,7 @@ reparent_resources(struct resource *pare
+ *pp = NULL;
+ for (p = res->child; p != NULL; p = p->sibling) {
+ p->parent = res;
+- DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n",
++ DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
+ p->name, p->start, p->end, res->name);
+ }
+ return 0;
+@@ -362,13 +362,14 @@ pci_relocate_bridge_resource(struct pci_
+ try = conflict->start - 1;
+ }
+ if (request_resource(pr, res)) {
+- DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n",
++ DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
+ res->start, res->end);
+ return -1; /* "can't happen" */
+ }
+ update_bridge_base(bus, i);
+- printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n",
+- bus->number, i, res->start, res->end);
++ printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
++ bus->number, i, (unsigned long long)res->start,
++ (unsigned long long)res->end);
+ return 0;
+ }
+
+@@ -479,14 +480,14 @@ static inline void alloc_resource(struct
+ {
+ struct resource *pr, *r = &dev->resource[idx];
+
+- DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n",
++ DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
+ pci_name(dev), idx, r->start, r->end, r->flags);
+ pr = pci_find_parent_resource(dev, r);
+ if (!pr || request_resource(pr, r) < 0) {
+ printk(KERN_ERR "PCI: Cannot allocate resource region %d"
+ " of device %s\n", idx, pci_name(dev));
+ if (pr)
+- DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n",
++ DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
+ pr, pr->start, pr->end, pr->flags);
+ /* We'll assign a new address later */
+ r->flags |= IORESOURCE_UNSET;
+@@ -956,7 +957,7 @@ pci_process_bridge_OF_ranges(struct pci_
+ res = &hose->io_resource;
+ res->flags = IORESOURCE_IO;
+ res->start = ranges[2];
+- DBG("PCI: IO 0x%lx -> 0x%lx\n",
++ DBG("PCI: IO 0x%llx -> 0x%llx\n",
+ res->start, res->start + size - 1);
+ break;
+ case 2: /* memory space */
+@@ -978,7 +979,7 @@ pci_process_bridge_OF_ranges(struct pci_
+ if(ranges[0] & 0x40000000)
+ res->flags |= IORESOURCE_PREFETCH;
+ res->start = ranges[na+2];
+- DBG("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno,
++ DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno,
+ res->start, res->start + size - 1);
+ }
+ break;
+@@ -1074,7 +1075,7 @@ do_update_p2p_io_resource(struct pci_bus
+ DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
+ res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
+ res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
+- DBG(" IO window: %08lx-%08lx\n", res.start, res.end);
++ DBG(" IO window: %016llx-%016llx\n", res.start, res.end);
+
+ /* Set up the top and bottom of the PCI I/O segment for this bus. */
+ pci_read_config_dword(bridge, PCI_IO_BASE, &l);
+@@ -1222,8 +1223,8 @@ do_fixup_p2p_level(struct pci_bus *bus)
+ continue;
+ if ((r->flags & IORESOURCE_IO) == 0)
+ continue;
+- DBG("Trying to allocate from %08lx, size %08lx from parent"
+- " res %d: %08lx -> %08lx\n",
++ DBG("Trying to allocate from %016llx, size %016llx from parent"
++ " res %d: %016llx -> %016llx\n",
+ res->start, res->end, i, r->start, r->end);
+
+ if (allocate_resource(r, res, res->end + 1, res->start, max,
+@@ -1573,8 +1574,8 @@ static pgprot_t __pci_mmap_set_pgprot(st
+ else
+ prot |= _PAGE_GUARDED;
+
+- printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start,
+- prot);
++ printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev),
++ (unsigned long long)rp->start, prot);
+
+ return __pgprot(prot);
+ }
+--- gregkh-2.6.orig/arch/powerpc/platforms/83xx/pci.c
++++ gregkh-2.6/arch/powerpc/platforms/83xx/pci.c
+@@ -91,9 +91,10 @@ int __init add_bridge(struct device_node
+ mpc83xx_pci2_busno = hose->first_busno;
+ }
+
+- printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. "
++ printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
+ "Firmware bus number: %d->%d\n",
+- rsrc.start, hose->first_busno, hose->last_busno);
++ (unsigned long long)rsrc.start, hose->first_busno,
++ hose->last_busno);
+
+ DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
+ hose, hose->cfg_addr, hose->cfg_data);
+--- gregkh-2.6.orig/arch/powerpc/platforms/85xx/pci.c
++++ gregkh-2.6/arch/powerpc/platforms/85xx/pci.c
+@@ -79,9 +79,10 @@ int __init add_bridge(struct device_node
+ mpc85xx_pci2_busno = hose->first_busno;
+ }
+
+- printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. "
++ printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. "
+ "Firmware bus number: %d->%d\n",
+- rsrc.start, hose->first_busno, hose->last_busno);
++ (unsigned long long)rsrc.start, hose->first_busno,
++ hose->last_busno);
+
+ DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
+ hose, hose->cfg_addr, hose->cfg_data);
+--- gregkh-2.6.orig/arch/powerpc/platforms/chrp/pci.c
++++ gregkh-2.6/arch/powerpc/platforms/chrp/pci.c
+@@ -143,7 +143,7 @@ hydra_init(void)
+ if (np == NULL || of_address_to_resource(np, 0, &r))
+ return 0;
+ Hydra = ioremap(r.start, r.end-r.start);
+- printk("Hydra Mac I/O at %lx\n", r.start);
++ printk("Hydra Mac I/O at %llx\n", (unsigned long long)r.start);
+ printk("Hydra Feature_Control was %x",
+ in_le32(&Hydra->Feature_Control));
+ out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN |
+@@ -267,7 +267,7 @@ chrp_find_bridges(void)
+ bus_range[0], bus_range[1]);
+ printk(" controlled by %s", dev->type);
+ if (!is_longtrail)
+- printk(" at %lx", r.start);
++ printk(" at %llx", (unsigned long long)r.start);
+ printk("\n");
+
+ hose = pcibios_alloc_controller();
+--- gregkh-2.6.orig/arch/powerpc/platforms/maple/pci.c
++++ gregkh-2.6/arch/powerpc/platforms/maple/pci.c
+@@ -376,9 +376,10 @@ static void __init maple_fixup_phb_resou
+ unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
+ hose->io_resource.start += offset;
+ hose->io_resource.end += offset;
+- printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n",
++ printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n",
+ hose->global_number,
+- hose->io_resource.start, hose->io_resource.end);
++ (unsigned long long)hose->io_resource.start,
++ (unsigned long long)hose->io_resource.end);
+ }
+ }
+
+--- gregkh-2.6.orig/arch/powerpc/platforms/powermac/pci.c
++++ gregkh-2.6/arch/powerpc/platforms/powermac/pci.c
+@@ -939,9 +939,10 @@ static int __init add_bridge(struct devi
+ disp_name = "Chaos";
+ primary = 0;
+ }
+- printk(KERN_INFO "Found %s PCI host bridge at 0x%08lx. "
++ printk(KERN_INFO "Found %s PCI host bridge at 0x%016llx. "
+ "Firmware bus number: %d->%d\n",
+- disp_name, rsrc.start, hose->first_busno, hose->last_busno);
++ disp_name, (unsigned long long)rsrc.start, hose->first_busno,
++ hose->last_busno);
+ #endif /* CONFIG_PPC32 */
+
+ DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
+--- gregkh-2.6.orig/arch/ppc/kernel/pci.c
++++ gregkh-2.6/arch/ppc/kernel/pci.c
+@@ -95,8 +95,10 @@ pcibios_fixup_resources(struct pci_dev *
+ if (!res->flags)
+ continue;
+ if (res->end == 0xffffffff) {
+- DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n",
+- pci_name(dev), i, res->start, res->end);
++ DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
++ pci_name(dev), i,
++ (unsigned long long)res->start,
++ (unsigned long long)res->end);
+ res->end -= res->start;
+ res->start = 0;
+ res->flags |= IORESOURCE_UNSET;
+@@ -179,8 +181,8 @@ void pcibios_align_resource(void *data,
+
+ if (size > 0x100) {
+ printk(KERN_ERR "PCI: I/O Region %s/%d too large"
+- " (%ld bytes)\n", pci_name(dev),
+- dev->resource - res, size);
++ " (%lld bytes)\n", pci_name(dev),
++ dev->resource - res, (unsigned long long)size);
+ }
+
+ if (start & 0x300) {
+@@ -251,8 +253,9 @@ pcibios_allocate_bus_resources(struct li
+ }
+ }
+
+- DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n",
+- res->start, res->end, res->flags, pr);
++ DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
++ (unsigned long long)res->start,
++ (unsigned long long)res->end, res->flags, pr);
+ if (pr) {
+ if (request_resource(pr, res) == 0)
+ continue;
+@@ -302,8 +305,9 @@ reparent_resources(struct resource *pare
+ *pp = NULL;
+ for (p = res->child; p != NULL; p = p->sibling) {
+ p->parent = res;
+- DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n",
+- p->name, p->start, p->end, res->name);
++ DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
++ p->name, (unsigned long long)p->start,
++ (unsigned long long)p->end, res->name);
+ }
+ return 0;
+ }
+@@ -358,13 +362,15 @@ pci_relocate_bridge_resource(struct pci_
+ try = conflict->start - 1;
+ }
+ if (request_resource(pr, res)) {
+- DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n",
+- res->start, res->end);
++ DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
++ (unsigned long long)res->start,
++ (unsigned long long)res->end);
+ return -1; /* "can't happen" */
+ }
+ update_bridge_base(bus, i);
+- printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n",
+- bus->number, i, res->start, res->end);
++ printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
++ bus->number, i, (unsigned long long)res->start,
++ (unsigned long long)res->end);
+ return 0;
+ }
+
+@@ -475,15 +481,17 @@ static inline void alloc_resource(struct
+ {
+ struct resource *pr, *r = &dev->resource[idx];
+
+- DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n",
+- pci_name(dev), idx, r->start, r->end, r->flags);
++ DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
++ pci_name(dev), idx, (unsigned long long)r->start,
++ (unsigned long long)r->end, r->flags);
+ pr = pci_find_parent_resource(dev, r);
+ if (!pr || request_resource(pr, r) < 0) {
+ printk(KERN_ERR "PCI: Cannot allocate resource region %d"
+ " of device %s\n", idx, pci_name(dev));
+ if (pr)
+- DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n",
+- pr, pr->start, pr->end, pr->flags);
++ DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
++ pr, (unsigned long long)pr->start,
++ (unsigned long long)pr->end, pr->flags);
+ /* We'll assign a new address later */
+ r->flags |= IORESOURCE_UNSET;
+ r->end -= r->start;
+@@ -952,7 +960,7 @@ static pgprot_t __pci_mmap_set_pgprot(st
+ else
+ prot |= _PAGE_GUARDED;
+
+- printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start,
++ printk("PCI map for %s:%llx, prot: %llx\n", pci_name(dev), rp->start,
+ prot);
+
+ return __pgprot(prot);
+--- gregkh-2.6.orig/arch/sparc/kernel/ioport.c
++++ gregkh-2.6/arch/sparc/kernel/ioport.c
+@@ -690,7 +690,9 @@ _sparc_io_get_info(char *buf, char **sta
+ if (p + 32 >= e) /* Better than nothing */
+ break;
+ if ((nm = r->name) == 0) nm = "???";
+- p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm);
++ p += sprintf(p, "%016llx-%016llx: %s\n",
++ (unsigned long long)r->start,
++ (unsigned long long)r->end, nm);
+ }
+
+ return p-buf;
+--- gregkh-2.6.orig/kernel/resource.c
++++ gregkh-2.6/kernel/resource.c
+@@ -83,10 +83,10 @@ static int r_show(struct seq_file *m, vo
+ for (depth = 0, p = r; depth < MAX_IORES_LEVEL; depth++, p = p->parent)
+ if (p->parent == root)
+ break;
+- seq_printf(m, "%*s%0*lx-%0*lx : %s\n",
++ seq_printf(m, "%*s%0*llx-%0*llx : %s\n",
+ depth * 2, "",
+- width, r->start,
+- width, r->end,
++ width, (unsigned long long) r->start,
++ width, (unsigned long long) r->end,
+ r->name ? r->name : "<BAD>");
+ return 0;
+ }
+@@ -511,7 +511,9 @@ void __release_region(struct resource *p
+
+ write_unlock(&resource_lock);
+
+- printk(KERN_WARNING "Trying to free nonexistent resource <%08lx-%08lx>\n", start, end);
++ printk(KERN_WARNING "Trying to free nonexistent resource "
++ "<%16llx-%16llx>\n", (unsigned long long)start,
++ (unsigned long long) end);
+ }
+
+ EXPORT_SYMBOL(__release_region);
diff --git a/pci/pci-64-bit-resources-drivers-ide-changes.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-ide-drivers.patch
index 632aab0c35268..f574b7bc5a425 100644
--- a/pci/pci-64-bit-resources-drivers-ide-changes.patch
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-ide-drivers.patch
@@ -1,21 +1,14 @@
-From vivek@in.ibm.com Fri Mar 24 06:43:24 2006
-Date: Fri, 24 Mar 2006 09:43:07 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-To: Alan Cox <alan@lxorguk.ukuu.org.uk>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 3/10] PCI: 64 bit resources drivers ide changes
-Message-ID: <20060324144307.GB4406@in.ibm.com>
-Content-Disposition: inline
+From 3e70602fd51f0cae13058d1647d752ad7953f145 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:15:59 -0700
+Subject: [PATCH 06/16] 64bit resource: fix up printks for resources in ide drivers
-o Changes required under drivers/ide/* for 64bit resources.
+This is needed if we wish to change the size of the resource structures.
-Signed-off-by: Dave Jiang <dave.jiang@gmail.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
diff --git a/pci/64bit-resource-fix-up-printks-for-resources-in-misc-drivers.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-misc-drivers.patch
new file mode 100644
index 0000000000000..1c638511c2914
--- /dev/null
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-misc-drivers.patch
@@ -0,0 +1,289 @@
+From 35a044c6c47fe5e6c8807dd868b7adef54d5eda9 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:20:16 -0700
+Subject: [PATCH 10/16] 64bit resource: fix up printks for resources in misc drivers
+
+This is needed if we wish to change the size of the resource structures.
+
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/amba/bus.c | 5 +++--
+ drivers/atm/ambassador.c | 3 ++-
+ drivers/atm/firestream.c | 5 +++--
+ drivers/block/sx8.c | 5 +++--
+ drivers/char/applicom.c | 9 ++++++---
+ drivers/ieee1394/ohci1394.c | 15 ++++++++-------
+ drivers/infiniband/hw/ipath/ipath_driver.c | 8 ++++----
+ drivers/infiniband/hw/mthca/mthca_main.c | 5 +++--
+ drivers/input/serio/ct82c710.c | 6 +++---
+ drivers/isdn/hisax/telespci.c | 5 +++--
+ drivers/macintosh/macio_asic.c | 4 ++--
+ drivers/message/i2o/iop.c | 14 ++++++++------
+ drivers/mmc/mmci.c | 4 ++--
+ drivers/scsi/sata_via.c | 8 ++++----
+ 14 files changed, 54 insertions(+), 42 deletions(-)
+
+--- gregkh-2.6.orig/drivers/amba/bus.c
++++ gregkh-2.6/drivers/amba/bus.c
+@@ -180,8 +180,9 @@ static DEVICE_ATTR(name, S_IRUGO, show_#
+ amba_attr(id, "%08x\n", dev->periphid);
+ amba_attr(irq0, "%u\n", dev->irq[0]);
+ amba_attr(irq1, "%u\n", dev->irq[1]);
+-amba_attr(resource, "\t%08lx\t%08lx\t%08lx\n",
+- dev->res.start, dev->res.end, dev->res.flags);
++amba_attr(resource, "\t%016llx\t%016llx\t%016lx\n",
++ (unsigned long long)dev->res.start, (unsigned long long)dev->res.end,
++ dev->res.flags);
+
+ /**
+ * amba_device_register - register an AMBA device
+--- gregkh-2.6.orig/drivers/atm/ambassador.c
++++ gregkh-2.6/drivers/atm/ambassador.c
+@@ -2257,7 +2257,8 @@ static int __devinit amb_probe(struct pc
+ }
+
+ PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at"
+- " IO %lx, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1),
++ " IO %llx, IRQ %u, MEM %p",
++ (unsigned long long)pci_resource_start(pci_dev, 1),
+ irq, bus_to_virt(pci_resource_start(pci_dev, 0)));
+
+ // check IO region
+--- gregkh-2.6.orig/drivers/atm/firestream.c
++++ gregkh-2.6/drivers/atm/firestream.c
+@@ -1657,9 +1657,10 @@ static int __devinit fs_init (struct fs_
+ func_enter ();
+ pci_dev = dev->pci_dev;
+
+- printk (KERN_INFO "found a FireStream %d card, base %08lx, irq%d.\n",
++ printk (KERN_INFO "found a FireStream %d card, base %16llx, irq%d.\n",
+ IS_FS50(dev)?50:155,
+- pci_resource_start(pci_dev, 0), dev->pci_dev->irq);
++ (unsigned long long)pci_resource_start(pci_dev, 0),
++ dev->pci_dev->irq);
+
+ if (fs_debug & FS_DEBUG_INIT)
+ my_hd ((unsigned char *) dev, sizeof (*dev));
+--- gregkh-2.6.orig/drivers/block/sx8.c
++++ gregkh-2.6/drivers/block/sx8.c
+@@ -1694,9 +1694,10 @@ static int carm_init_one (struct pci_dev
+ DPRINTK("waiting for probe_comp\n");
+ wait_for_completion(&host->probe_comp);
+
+- printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n",
++ printk(KERN_INFO "%s: pci %s, ports %d, io %llx, irq %u, major %d\n",
+ host->name, pci_name(pdev), (int) CARM_MAX_PORTS,
+- pci_resource_start(pdev, 0), pdev->irq, host->major);
++ (unsigned long long)pci_resource_start(pdev, 0),
++ pdev->irq, host->major);
+
+ carm_host_id++;
+ pci_set_drvdata(pdev, host);
+--- gregkh-2.6.orig/drivers/char/applicom.c
++++ gregkh-2.6/drivers/char/applicom.c
+@@ -215,13 +215,16 @@ int __init applicom_init(void)
+ RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO);
+
+ if (!RamIO) {
+- printk(KERN_INFO "ac.o: Failed to ioremap PCI memory space at 0x%lx\n", dev->resource[0].start);
++ printk(KERN_INFO "ac.o: Failed to ioremap PCI memory "
++ "space at 0x%llx\n",
++ (unsigned long long)dev->resource[0].start);
+ pci_disable_device(dev);
+ return -EIO;
+ }
+
+- printk(KERN_INFO "Applicom %s found at mem 0x%lx, irq %d\n",
+- applicom_pci_devnames[dev->device-1], dev->resource[0].start,
++ printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n",
++ applicom_pci_devnames[dev->device-1],
++ (unsigned long long)dev->resource[0].start,
+ dev->irq);
+
+ boardno = ac_register_board(dev->resource[0].start, RamIO,0);
+--- gregkh-2.6.orig/drivers/ieee1394/ohci1394.c
++++ gregkh-2.6/drivers/ieee1394/ohci1394.c
+@@ -592,11 +592,11 @@ static void ohci_initialize(struct ti_oh
+ sprintf (irq_buf, "%s", __irq_itoa(ohci->dev->irq));
+ #endif
+ PRINT(KERN_INFO, "OHCI-1394 %d.%d (PCI): IRQ=[%s] "
+- "MMIO=[%lx-%lx] Max Packet=[%d] IR/IT contexts=[%d/%d]",
++ "MMIO=[%llx-%llx] Max Packet=[%d] IR/IT contexts=[%d/%d]",
+ ((((buf) >> 16) & 0xf) + (((buf) >> 20) & 0xf) * 10),
+ ((((buf) >> 4) & 0xf) + ((buf) & 0xf) * 10), irq_buf,
+- pci_resource_start(ohci->dev, 0),
+- pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
++ (unsigned long long)pci_resource_start(ohci->dev, 0),
++ (unsigned long long)pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
+ ohci->max_packet_size,
+ ohci->nb_iso_rcv_ctx, ohci->nb_iso_xmit_ctx);
+
+@@ -3263,15 +3263,16 @@ static int __devinit ohci1394_pci_probe(
+ * clearly says it's 2kb, so this shouldn't be a problem. */
+ ohci_base = pci_resource_start(dev, 0);
+ if (pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE)
+- PRINT(KERN_WARNING, "PCI resource length of %lx too small!",
+- pci_resource_len(dev, 0));
++ PRINT(KERN_WARNING, "PCI resource length of 0x%llx too small!",
++ (unsigned long long)pci_resource_len(dev, 0));
+
+ /* Seems PCMCIA handles this internally. Not sure why. Seems
+ * pretty bogus to force a driver to special case this. */
+ #ifndef PCMCIA
+ if (!request_mem_region (ohci_base, OHCI1394_REGISTER_SIZE, OHCI1394_DRIVER_NAME))
+- FAIL(-ENOMEM, "MMIO resource (0x%lx - 0x%lx) unavailable",
+- ohci_base, ohci_base + OHCI1394_REGISTER_SIZE);
++ FAIL(-ENOMEM, "MMIO resource (0x%llx - 0x%llx) unavailable",
++ (unsigned long long)ohci_base,
++ (unsigned long long)ohci_base + OHCI1394_REGISTER_SIZE);
+ #endif
+ ohci->init_state = OHCI_INIT_HAVE_MEM_REGION;
+
+--- gregkh-2.6.orig/drivers/infiniband/hw/ipath/ipath_driver.c
++++ gregkh-2.6/drivers/infiniband/hw/ipath/ipath_driver.c
+@@ -460,10 +460,10 @@ static int __devinit ipath_init_one(stru
+ for (j = 0; j < 6; j++) {
+ if (!pdev->resource[j].start)
+ continue;
+- ipath_cdbg(VERBOSE, "BAR %d start %lx, end %lx, len %lx\n",
+- j, pdev->resource[j].start,
+- pdev->resource[j].end,
+- pci_resource_len(pdev, j));
++ ipath_cdbg(VERBOSE, "BAR %d start %llx, end %llx, len %llx\n",
++ j, (unsigned long long)pdev->resource[j].start,
++ (unsigned long long)pdev->resource[j].end,
++ (unsigned long long)pci_resource_len(pdev, j));
+ }
+
+ if (!addr) {
+--- gregkh-2.6.orig/drivers/infiniband/hw/mthca/mthca_main.c
++++ gregkh-2.6/drivers/infiniband/hw/mthca/mthca_main.c
+@@ -172,8 +172,9 @@ static int __devinit mthca_dev_lim(struc
+
+ if (dev_lim->uar_size > pci_resource_len(mdev->pdev, 2)) {
+ mthca_err(mdev, "HCA reported UAR size of 0x%x bigger than "
+- "PCI resource 2 size of 0x%lx, aborting.\n",
+- dev_lim->uar_size, pci_resource_len(mdev->pdev, 2));
++ "PCI resource 2 size of 0x%llx, aborting.\n",
++ dev_lim->uar_size,
++ (unsigned long long)pci_resource_len(mdev->pdev, 2));
+ return -ENODEV;
+ }
+
+--- gregkh-2.6.orig/drivers/input/serio/ct82c710.c
++++ gregkh-2.6/drivers/input/serio/ct82c710.c
+@@ -189,7 +189,7 @@ static int __devinit ct82c710_probe(stru
+ strlcpy(ct82c710_port->name, "C&T 82c710 mouse port",
+ sizeof(ct82c710_port->name));
+ snprintf(ct82c710_port->phys, sizeof(ct82c710_port->phys),
+- "isa%04lx/serio0", CT82C710_DATA);
++ "isa%16llx/serio0", (unsigned long long)CT82C710_DATA);
+
+ serio_register_port(ct82c710_port);
+
+@@ -241,8 +241,8 @@ static int __init ct82c710_init(void)
+
+ serio_register_port(ct82c710_port);
+
+- printk(KERN_INFO "serio: C&T 82c710 mouse port at %#lx irq %d\n",
+- CT82C710_DATA, CT82C710_IRQ);
++ printk(KERN_INFO "serio: C&T 82c710 mouse port at %#llx irq %d\n",
++ (unsigned long long)CT82C710_DATA, CT82C710_IRQ);
+
+ return 0;
+
+--- gregkh-2.6.orig/drivers/isdn/hisax/telespci.c
++++ gregkh-2.6/drivers/isdn/hisax/telespci.c
+@@ -311,8 +311,9 @@ setup_telespci(struct IsdnCard *card)
+ }
+ cs->hw.teles0.membase = ioremap(pci_resource_start(dev_tel, 0),
+ PAGE_SIZE);
+- printk(KERN_INFO "Found: Zoran, base-address: 0x%lx, irq: 0x%x\n",
+- pci_resource_start(dev_tel, 0), dev_tel->irq);
++ printk(KERN_INFO "Found: Zoran, base-address: 0x%llx, irq: 0x%x\n",
++ (unsigned long long)pci_resource_start(dev_tel, 0),
++ dev_tel->irq);
+ } else {
+ printk(KERN_WARNING "TelesPCI: No PCI card found\n");
+ return(0);
+--- gregkh-2.6.orig/drivers/macintosh/macio_asic.c
++++ gregkh-2.6/drivers/macintosh/macio_asic.c
+@@ -428,10 +428,10 @@ static struct macio_dev * macio_add_one_
+
+ /* MacIO itself has a different reg, we use it's PCI base */
+ if (np == chip->of_node) {
+- sprintf(dev->ofdev.dev.bus_id, "%1d.%08lx:%.*s",
++ sprintf(dev->ofdev.dev.bus_id, "%1d.%016llx:%.*s",
+ chip->lbus.index,
+ #ifdef CONFIG_PCI
+- pci_resource_start(chip->lbus.pdev, 0),
++ (unsigned long long)pci_resource_start(chip->lbus.pdev, 0),
+ #else
+ 0, /* NuBus may want to do something better here */
+ #endif
+--- gregkh-2.6.orig/drivers/message/i2o/iop.c
++++ gregkh-2.6/drivers/message/i2o/iop.c
+@@ -683,9 +683,10 @@ static int i2o_iop_systab_set(struct i2o
+ c->mem_alloc = 1;
+ sb->current_mem_size = 1 + res->end - res->start;
+ sb->current_mem_base = res->start;
+- osm_info("%s: allocated %ld bytes of PCI memory at "
+- "0x%08lX.\n", c->name,
+- 1 + res->end - res->start, res->start);
++ osm_info("%s: allocated %llu bytes of PCI memory at "
++ "0x%016llX.\n", c->name,
++ (unsigned long long)(1 + res->end - res->start),
++ (unsigned long long)res->start);
+ }
+ }
+
+@@ -704,9 +705,10 @@ static int i2o_iop_systab_set(struct i2o
+ c->io_alloc = 1;
+ sb->current_io_size = 1 + res->end - res->start;
+ sb->current_mem_base = res->start;
+- osm_info("%s: allocated %ld bytes of PCI I/O at 0x%08lX"
+- ".\n", c->name, 1 + res->end - res->start,
+- res->start);
++ osm_info("%s: allocated %llu bytes of PCI I/O at "
++ "0x%016llX.\n", c->name,
++ (unsigned long long)(1 + res->end - res->start),
++ (unsigned long long)res->start);
+ }
+ }
+
+--- gregkh-2.6.orig/drivers/mmc/mmci.c
++++ gregkh-2.6/drivers/mmc/mmci.c
+@@ -546,9 +546,9 @@ static int mmci_probe(struct amba_device
+
+ mmc_add_host(mmc);
+
+- printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%08lx irq %d,%d\n",
++ printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%016llx irq %d,%d\n",
+ mmc_hostname(mmc), amba_rev(dev), amba_config(dev),
+- dev->res.start, dev->irq[0], dev->irq[1]);
++ (unsigned long long)dev->res.start, dev->irq[0], dev->irq[1]);
+
+ init_timer(&host->timer);
+ host->timer.data = (unsigned long)host;
+--- gregkh-2.6.orig/drivers/scsi/sata_via.c
++++ gregkh-2.6/drivers/scsi/sata_via.c
+@@ -333,10 +333,10 @@ static int svia_init_one (struct pci_dev
+ if ((pci_resource_start(pdev, i) == 0) ||
+ (pci_resource_len(pdev, i) < bar_sizes[i])) {
+ dev_printk(KERN_ERR, &pdev->dev,
+- "invalid PCI BAR %u (sz 0x%lx, val 0x%lx)\n",
+- i,
+- pci_resource_start(pdev, i),
+- pci_resource_len(pdev, i));
++ "invalid PCI BAR %u (sz 0x%llx, val 0x%llx)\n",
++ i,
++ (unsigned long long)pci_resource_start(pdev, i),
++ (unsigned long long)pci_resource_len(pdev, i));
+ rc = -ENODEV;
+ goto err_out_regions;
+ }
diff --git a/pci/64bit-resource-fix-up-printks-for-resources-in-mtd-drivers.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-mtd-drivers.patch
new file mode 100644
index 0000000000000..44a86f7f78fdc
--- /dev/null
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-mtd-drivers.patch
@@ -0,0 +1,119 @@
+From d16e65fc50425f074f7c448f5c0cd0efb23189cd Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:15:17 -0700
+Subject: [PATCH 05/16] 64bit resource: fix up printks for resources in mtd drivers
+
+This is needed if we wish to change the size of the resource structures.
+
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/mtd/devices/pmc551.c | 8 ++++----
+ drivers/mtd/maps/amd76xrom.c | 5 +++--
+ drivers/mtd/maps/ichxrom.c | 5 +++--
+ drivers/mtd/maps/scx200_docflash.c | 5 +++--
+ drivers/mtd/maps/sun_uflash.c | 10 ++++++----
+ 5 files changed, 19 insertions(+), 14 deletions(-)
+
+--- gregkh-2.6.orig/drivers/mtd/devices/pmc551.c
++++ gregkh-2.6/drivers/mtd/devices/pmc551.c
+@@ -551,11 +551,11 @@ static u32 fixup_pmc551 (struct pci_dev
+ /*
+ * Some screen fun
+ */
+- printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at 0x%lx\n",
++ printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at 0x%llx\n",
+ (size<1024)?size:(size<1048576)?size>>10:size>>20,
+ (size<1024)?'B':(size<1048576)?'K':'M',
+ size, ((dcmd&(0x1<<3)) == 0)?"non-":"",
+- (dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK );
++ (unsigned long long)((dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK));
+
+ /*
+ * Check to see the state of the memory
+@@ -685,8 +685,8 @@ static int __init init_pmc551(void)
+ break;
+ }
+
+- printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%lX\n",
+- PCI_Device->resource[0].start);
++ printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%llx\n",
++ (unsigned long long)PCI_Device->resource[0].start);
+
+ /*
+ * The PMC551 device acts VERY weird if you don't init it
+--- gregkh-2.6.orig/drivers/mtd/maps/amd76xrom.c
++++ gregkh-2.6/drivers/mtd/maps/amd76xrom.c
+@@ -123,9 +123,10 @@ static int __devinit amd76xrom_init_one
+ window->rsrc.parent = NULL;
+ printk(KERN_ERR MOD_NAME
+ " %s(): Unable to register resource"
+- " 0x%.08lx-0x%.08lx - kernel bug?\n",
++ " 0x%.16llx-0x%.16llx - kernel bug?\n",
+ __func__,
+- window->rsrc.start, window->rsrc.end);
++ (unsigned long long)window->rsrc.start,
++ (unsigned long long)window->rsrc.end);
+ }
+
+ #if 0
+--- gregkh-2.6.orig/drivers/mtd/maps/ichxrom.c
++++ gregkh-2.6/drivers/mtd/maps/ichxrom.c
+@@ -177,9 +177,10 @@ static int __devinit ichxrom_init_one (s
+ window->rsrc.parent = NULL;
+ printk(KERN_DEBUG MOD_NAME
+ ": %s(): Unable to register resource"
+- " 0x%.08lx-0x%.08lx - kernel bug?\n",
++ " 0x%.16llx-0x%.16llx - kernel bug?\n",
+ __func__,
+- window->rsrc.start, window->rsrc.end);
++ (unsigned long long)window->rsrc.start,
++ (unsigned long long)window->rsrc.end);
+ }
+
+ /* Map the firmware hub into my address space. */
+--- gregkh-2.6.orig/drivers/mtd/maps/scx200_docflash.c
++++ gregkh-2.6/drivers/mtd/maps/scx200_docflash.c
+@@ -164,8 +164,9 @@ static int __init init_scx200_docflash(v
+ outl(pmr, scx200_cb_base + SCx200_PMR);
+ }
+
+- printk(KERN_INFO NAME ": DOCCS mapped at 0x%lx-0x%lx, width %d\n",
+- docmem.start, docmem.end, width);
++ printk(KERN_INFO NAME ": DOCCS mapped at 0x%llx-0x%llx, width %d\n",
++ (unsigned long long)docmem.start,
++ (unsigned long long)docmem.end, width);
+
+ scx200_docflash_map.size = size;
+ if (width == 8)
+--- gregkh-2.6.orig/drivers/mtd/maps/sun_uflash.c
++++ gregkh-2.6/drivers/mtd/maps/sun_uflash.c
+@@ -74,9 +74,10 @@ int uflash_devinit(struct linux_ebus_dev
+ /* Non-CFI userflash device-- once I find one we
+ * can work on supporting it.
+ */
+- printk("%s: unsupported device at 0x%lx (%d regs): " \
++ printk("%s: unsupported device at 0x%llx (%d regs): " \
+ "email ebrower@usa.net\n",
+- UFLASH_DEVNAME, edev->resource[0].start, nregs);
++ UFLASH_DEVNAME,
++ (unsigned long long)edev->resource[0].start, nregs);
+ return -ENODEV;
+ }
+
+@@ -132,8 +133,9 @@ static int __init uflash_init(void)
+ for_each_ebusdev(edev, ebus) {
+ if (!strcmp(edev->prom_name, UFLASH_OBPNAME)) {
+ if(0 > prom_getproplen(edev->prom_node, "user")) {
+- DEBUG(2, "%s: ignoring device at 0x%lx\n",
+- UFLASH_DEVNAME, edev->resource[0].start);
++ DEBUG(2, "%s: ignoring device at 0x%llx\n",
++ UFLASH_DEVNAME,
++ (unsigned long long)edev->resource[0].start);
+ } else {
+ uflash_devinit(edev);
+ }
diff --git a/pci/pci-64-bit-resources-drivers-net-changes.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-networks-drivers.patch
index 17c16e7f7b07d..56b2dbef6688b 100644
--- a/pci/pci-64-bit-resources-drivers-net-changes.patch
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-networks-drivers.patch
@@ -1,27 +1,19 @@
-From vivek@in.ibm.com Thu Mar 23 12:05:04 2006
-Date: Thu, 23 Mar 2006 15:04:51 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 5/10] PCI: 64 bit resources drivers net changes
-Message-ID: <20060323200451.GI7175@in.ibm.com>
-Content-Disposition: inline
+From e9c57da82d46a063ebdf7df71aeecfee114fc4d5 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:13:08 -0700
+Subject: [PATCH 03/16] 64bit resource: fix up printks for resources in networks drivers
-o Changes required under drivers/net/* for 64bit resources.
+This is needed if we wish to change the size of the resource structures.
-Signed-off-by: Dave Jiang <dave.jiang@gmail.com>
-Signed-off-by: Murali M Chakravarthy <muralim@in.ibm.com>
-Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/3c59x.c | 6 ++++--
- drivers/net/8139cp.c | 11 ++++++-----
+ drivers/net/8139cp.c | 9 +++++----
drivers/net/8139too.c | 6 +++---
drivers/net/e100.c | 4 ++--
drivers/net/skge.c | 4 ++--
@@ -31,7 +23,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/typhoon.c | 5 +++--
drivers/net/wan/dscc4.c | 12 ++++++------
drivers/net/wan/pc300_drv.c | 4 ++--
- 11 files changed, 39 insertions(+), 34 deletions(-)
+ 11 files changed, 38 insertions(+), 33 deletions(-)
--- gregkh-2.6.orig/drivers/net/3c59x.c
+++ gregkh-2.6/drivers/net/3c59x.c
@@ -50,15 +42,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
EL3WINDOW(2);
--- gregkh-2.6.orig/drivers/net/8139cp.c
+++ gregkh-2.6/drivers/net/8139cp.c
-@@ -1668,7 +1668,7 @@ static int cp_init_one (struct pci_dev *
- struct cp_private *cp;
- int rc;
- void __iomem *regs;
-- long pciaddr;
-+ u64 pciaddr;
- unsigned int addr_len, i, pci_using_dac;
- u8 pci_rev;
-
@@ -1728,8 +1728,8 @@ static int cp_init_one (struct pci_dev *
}
if (pci_resource_len(pdev, 1) < CP_REGS_SIZE) {
diff --git a/pci/pci-64-bit-resources-drivers-pci-changes.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-pci-core-and-hotplug-drivers.patch
index c0222db05be82..697ad3098f09d 100644
--- a/pci/pci-64-bit-resources-drivers-pci-changes.patch
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-pci-core-and-hotplug-drivers.patch
@@ -1,55 +1,27 @@
-From vivek@in.ibm.com Thu Mar 23 12:01:34 2006
-Date: Thu, 23 Mar 2006 15:01:19 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 2/10] PCI: 64 bit resources drivers pci changes
-Message-ID: <20060323200119.GF7175@in.ibm.com>
-Content-Disposition: inline
+From 9773efec218d306e6171ee8a8bf81c94901a6a18 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:14:29 -0700
+Subject: [PATCH 04/16] 64bit resource: fix up printks for resources in pci core and hotplug drivers
+This is needed if we wish to change the size of the resource structures.
-o Changes required in drivers/pci/* to support 64bit resources.
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Dave Jiang <dave.jiang@gmail.com>
-Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
---
- drivers/pci/bus.c | 4 ++--
drivers/pci/hotplug/cpcihp_zt5550.c | 9 +++++----
drivers/pci/hotplug/cpqphp_core.c | 10 +++++-----
drivers/pci/hotplug/pciehp_hpc.c | 5 +++--
drivers/pci/hotplug/shpchp_sysfs.c | 18 ++++++++++++------
drivers/pci/pci.c | 6 ++++--
- drivers/pci/pci.h | 6 +++---
drivers/pci/proc.c | 16 +++++-----------
- drivers/pci/rom.c | 10 +++++-----
drivers/pci/setup-bus.c | 6 ++++--
- drivers/pci/setup-res.c | 34 ++++++++++++++++++++--------------
- include/linux/pci.h | 8 ++++----
- 12 files changed, 72 insertions(+), 60 deletions(-)
+ drivers/pci/setup-res.c | 28 +++++++++++++++++-----------
+ 8 files changed, 55 insertions(+), 43 deletions(-)
---- gregkh-2.6.orig/drivers/pci/bus.c
-+++ gregkh-2.6/drivers/pci/bus.c
-@@ -34,10 +34,10 @@
- */
- int
- pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
-- unsigned long size, unsigned long align, unsigned long min,
-+ u64 size, u64 align, u64 min,
- unsigned int type_mask,
- void (*alignf)(void *, struct resource *,
-- unsigned long, unsigned long),
-+ u64, u64),
- void *alignf_data)
- {
- int i, ret = -ENOMEM;
--- gregkh-2.6.orig/drivers/pci/hotplug/cpcihp_zt5550.c
+++ gregkh-2.6/drivers/pci/hotplug/cpcihp_zt5550.c
@@ -95,8 +95,8 @@ static int zt5550_hc_config(struct pci_d
@@ -157,7 +129,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
out += sprintf(out, "Free resources: bus numbers\n");
--- gregkh-2.6.orig/drivers/pci/pci.c
+++ gregkh-2.6/drivers/pci/pci.c
-@@ -693,10 +693,12 @@ int pci_request_region(struct pci_dev *p
+@@ -680,10 +680,12 @@ int pci_request_region(struct pci_dev *p
return 0;
err_out:
@@ -172,22 +144,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
pci_name(pdev));
return -EBUSY;
}
---- gregkh-2.6.orig/drivers/pci/pci.h
-+++ gregkh-2.6/drivers/pci/pci.h
-@@ -6,10 +6,10 @@ extern int pci_create_sysfs_dev_files(st
- extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
- extern void pci_cleanup_rom(struct pci_dev *dev);
- extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
-- unsigned long size, unsigned long align,
-- unsigned long min, unsigned int type_mask,
-+ u64 size, u64 align,
-+ u64 min, unsigned int type_mask,
- void (*alignf)(void *, struct resource *,
-- unsigned long, unsigned long),
-+ u64, u64),
- void *alignf_data);
- /* Firmware callbacks */
- extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
--- gregkh-2.6.orig/drivers/pci/proc.c
+++ gregkh-2.6/drivers/pci/proc.c
@@ -302,12 +302,6 @@ static struct file_operations proc_bus_p
@@ -225,42 +181,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
seq_putc(m, '\t');
if (drv)
---- gregkh-2.6.orig/drivers/pci/rom.c
-+++ gregkh-2.6/drivers/pci/rom.c
-@@ -80,8 +80,8 @@ void __iomem *pci_map_rom(struct pci_dev
- } else {
- if (res->flags & IORESOURCE_ROM_COPY) {
- *size = pci_resource_len(pdev, PCI_ROM_RESOURCE);
-- return (void __iomem *)pci_resource_start(pdev,
-- PCI_ROM_RESOURCE);
-+ return (void __iomem *)(unsigned long)
-+ pci_resource_start(pdev, PCI_ROM_RESOURCE);
- } else {
- /* assign the ROM an address if it doesn't have one */
- if (res->parent == NULL &&
-@@ -170,11 +170,11 @@ void __iomem *pci_map_rom_copy(struct pc
- return rom;
-
- res->end = res->start + *size;
-- memcpy_fromio((void*)res->start, rom, *size);
-+ memcpy_fromio((void*)(unsigned long)res->start, rom, *size);
- pci_unmap_rom(pdev, rom);
- res->flags |= IORESOURCE_ROM_COPY;
-
-- return (void __iomem *)res->start;
-+ return (void __iomem *)(unsigned long)res->start;
- }
-
- /**
-@@ -227,7 +227,7 @@ void pci_cleanup_rom(struct pci_dev *pde
- {
- struct resource *res = &pdev->resource[PCI_ROM_RESOURCE];
- if (res->flags & IORESOURCE_ROM_COPY) {
-- kfree((void*)res->start);
-+ kfree((void*)(unsigned long)res->start);
- res->flags &= ~IORESOURCE_ROM_COPY;
- res->start = 0;
- res->end = 0;
--- gregkh-2.6.orig/drivers/pci/setup-bus.c
+++ gregkh-2.6/drivers/pci/setup-bus.c
@@ -356,8 +356,10 @@ pbus_size_mem(struct pci_bus *bus, unsig
@@ -307,15 +227,6 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
return err;
-@@ -118,7 +121,7 @@ int pci_assign_resource(struct pci_dev *
- {
- struct pci_bus *bus = dev->bus;
- struct resource *res = dev->resource + resno;
-- unsigned long size, min, align;
-+ u64 size, min, align;
- int ret;
-
- size = res->end - res->start + 1;
@@ -145,9 +148,11 @@ int pci_assign_resource(struct pci_dev *
}
@@ -331,16 +242,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
} else if (resno < PCI_BRIDGE_RESOURCES) {
pci_update_resource(dev, res, resno);
}
-@@ -164,7 +169,7 @@ pdev_sort_resources(struct pci_dev *dev,
- for (i = 0; i < PCI_NUM_RESOURCES; i++) {
- struct resource *r;
- struct resource_list *list, *tmp;
-- unsigned long r_align;
-+ u64 r_align;
-
- r = &dev->resource[i];
- r_align = r->end - r->start;
-@@ -173,13 +178,14 @@ pdev_sort_resources(struct pci_dev *dev,
+@@ -173,8 +178,9 @@ pdev_sort_resources(struct pci_dev *dev,
continue;
if (!r_align) {
printk(KERN_WARNING "PCI: Ignore bogus resource %d "
@@ -352,34 +254,3 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
continue;
}
r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start;
- for (list = head; ; list = list->next) {
-- unsigned long align = 0;
-+ u64 align = 0;
- struct resource_list *ln = list->next;
- int idx;
-
---- gregkh-2.6.orig/include/linux/pci.h
-+++ gregkh-2.6/include/linux/pci.h
-@@ -404,7 +404,7 @@ char *pcibios_setup (char *str);
-
- /* Used only when drivers/pci/setup.c is used */
- void pcibios_align_resource(void *, struct resource *,
-- unsigned long, unsigned long);
-+ u64, u64);
- void pcibios_update_irq(struct pci_dev *, int irq);
-
- /* Generic PCI functions used internally */
-@@ -530,10 +530,10 @@ void pci_release_region(struct pci_dev *
-
- /* drivers/pci/bus.c */
- int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
-- unsigned long size, unsigned long align,
-- unsigned long min, unsigned int type_mask,
-+ u64 size, u64 align,
-+ u64 min, unsigned int type_mask,
- void (*alignf)(void *, struct resource *,
-- unsigned long, unsigned long),
-+ u64, u64),
- void *alignf_data);
- void pci_enable_bridges(struct pci_bus *bus);
-
diff --git a/pci/pci-64-bit-resources-drivers-pcmcia-changes.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-pcmcia-drivers.patch
index c9794d617f49e..9560c1eea0f39 100644
--- a/pci/pci-64-bit-resources-drivers-pcmcia-changes.patch
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-pcmcia-drivers.patch
@@ -1,29 +1,22 @@
-From vivek@in.ibm.com Thu Mar 23 12:06:23 2006
-Date: Thu, 23 Mar 2006 15:06:10 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 6/10] PCI: 64 bit resources drivers pcmcia changes
-Message-ID: <20060323200610.GJ7175@in.ibm.com>
-Content-Disposition: inline
+From 782b15ec4dacef757a92a0087afc1e55b40fcd83 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:17:34 -0700
+Subject: [PATCH 08/16] 64bit resource: fix up printks for resources in pcmcia drivers
-o Changes required in drivers/pcmcia/* to support 64 bit resources.
+This is needed if we wish to change the size of the resource structures.
-Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pcmcia/i82365.c | 5 +++--
drivers/pcmcia/pd6729.c | 3 ++-
- drivers/pcmcia/rsrc_nonstatic.c | 25 +++++++++++++------------
+ drivers/pcmcia/rsrc_nonstatic.c | 12 ++++++++----
drivers/pcmcia/tcic.c | 5 +++--
- 4 files changed, 21 insertions(+), 17 deletions(-)
+ 4 files changed, 16 insertions(+), 9 deletions(-)
--- gregkh-2.6.orig/drivers/pcmcia/i82365.c
+++ gregkh-2.6/drivers/pcmcia/i82365.c
@@ -54,50 +47,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* have had PCI_COMMAND_MEMORY enabled, yet the device needs it.
--- gregkh-2.6.orig/drivers/pcmcia/rsrc_nonstatic.c
+++ gregkh-2.6/drivers/pcmcia/rsrc_nonstatic.c
-@@ -72,7 +72,7 @@ static DEFINE_MUTEX(rsrc_mutex);
- ======================================================================*/
-
- static struct resource *
--make_resource(unsigned long b, unsigned long n, int flags, char *name)
-+make_resource(u64 b, u64 n, int flags, char *name)
- {
- struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
-
-@@ -86,8 +86,7 @@ make_resource(unsigned long b, unsigned
- }
-
- static struct resource *
--claim_region(struct pcmcia_socket *s, unsigned long base, unsigned long size,
-- int type, char *name)
-+claim_region(struct pcmcia_socket *s, u64 base, u64 size, int type, char *name)
- {
- struct resource *res, *parent;
-
-@@ -518,11 +517,10 @@ struct pcmcia_align_data {
- };
-
- static void
--pcmcia_common_align(void *align_data, struct resource *res,
-- unsigned long size, unsigned long align)
-+pcmcia_common_align(void *align_data, struct resource *res, u64 size, u64 align)
- {
- struct pcmcia_align_data *data = align_data;
-- unsigned long start;
-+ u64 start;
- /*
- * Ensure that we have the correct start address
- */
-@@ -533,8 +531,7 @@ pcmcia_common_align(void *align_data, st
- }
-
- static void
--pcmcia_align(void *align_data, struct resource *res,
-- unsigned long size, unsigned long align)
-+pcmcia_align(void *align_data, struct resource *res, u64 size, u64 align)
- {
- struct pcmcia_align_data *data = align_data;
- struct resource_map *m;
-@@ -808,8 +805,10 @@ static int nonstatic_autoadd_resources(s
+@@ -808,8 +808,10 @@ static int nonstatic_autoadd_resources(s
if (res->flags & IORESOURCE_IO) {
if (res == &ioport_resource)
continue;
@@ -110,7 +60,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (!adjust_io(s, ADD_MANAGED_RESOURCE, res->start, res->end))
done |= IORESOURCE_IO;
-@@ -818,8 +817,10 @@ static int nonstatic_autoadd_resources(s
+@@ -818,8 +820,10 @@ static int nonstatic_autoadd_resources(s
if (res->flags & IORESOURCE_MEM) {
if (res == &iomem_resource)
continue;
diff --git a/pci/pci-64-bit-resources-sound-changes.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-sound-drivers.patch
index 67e4934ee6b8a..8fe1dfeb98123 100644
--- a/pci/pci-64-bit-resources-sound-changes.patch
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-sound-drivers.patch
@@ -1,23 +1,16 @@
-From vivek@in.ibm.com Thu Mar 23 12:09:17 2006
-Date: Thu, 23 Mar 2006 15:09:02 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 8/10] PCI: 64 bit resources sound changes
-Message-ID: <20060323200902.GL7175@in.ibm.com>
-Content-Disposition: inline
+From 02100ab3ed6e20a2701f072db14d825bc9ba1663 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 14:50:27 -0700
+Subject: [PATCH 02/16] 64bit resource: fix up printks for resources in sound drivers
+This is needed if we wish to change the size of the resource structures.
-o Changes required in sound/* to support 64bit resources.
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
---
sound/arm/aaci.c | 5 +++--
sound/drivers/mpu401/mpu401.c | 5 +++--
@@ -27,9 +20,10 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/oss/forte.c | 5 +++--
sound/pci/bt87x.c | 5 +++--
sound/pci/sonicvibes.c | 4 ++--
+ sound/ppc/pmac.c | 14 ++++++++------
sound/sparc/cs4231.c | 4 ++--
sound/sparc/dbri.c | 5 +++--
- 10 files changed, 27 insertions(+), 20 deletions(-)
+ 11 files changed, 35 insertions(+), 26 deletions(-)
--- gregkh-2.6.orig/sound/arm/aaci.c
+++ gregkh-2.6/sound/arm/aaci.c
@@ -143,6 +137,36 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sonic->irq);
if ((err = snd_sonicvibes_pcm(sonic, 0, NULL)) < 0) {
+--- gregkh-2.6.orig/sound/ppc/pmac.c
++++ gregkh-2.6/sound/ppc/pmac.c
+@@ -1198,9 +1198,10 @@ int __init snd_pmac_new(struct snd_card
+ chip->rsrc[i].start + 1,
+ rnames[i]) == NULL) {
+ printk(KERN_ERR "snd: can't request rsrc "
+- " %d (%s: 0x%08lx:%08lx)\n",
+- i, rnames[i], chip->rsrc[i].start,
+- chip->rsrc[i].end);
++ " %d (%s: 0x%016llx:%016llx)\n",
++ i, rnames[i],
++ (unsigned long long)chip->rsrc[i].start,
++ (unsigned long long)chip->rsrc[i].end);
+ err = -ENODEV;
+ goto __error;
+ }
+@@ -1229,9 +1230,10 @@ int __init snd_pmac_new(struct snd_card
+ chip->rsrc[i].start + 1,
+ rnames[i]) == NULL) {
+ printk(KERN_ERR "snd: can't request rsrc "
+- " %d (%s: 0x%08lx:%08lx)\n",
+- i, rnames[i], chip->rsrc[i].start,
+- chip->rsrc[i].end);
++ " %d (%s: 0x%016llx:%016llx)\n",
++ i, rnames[i],
++ (unsigned long long)chip->rsrc[i].start,
++ (unsigned long long)chip->rsrc[i].end);
+ err = -ENODEV;
+ goto __error;
+ }
--- gregkh-2.6.orig/sound/sparc/cs4231.c
+++ gregkh-2.6/sound/sparc/cs4231.c
@@ -2038,10 +2038,10 @@ static int __init cs4231_sbus_attach(str
diff --git a/pci/pci-64-bit-resources-drivers-media-changes.patch b/pci/64bit-resource-fix-up-printks-for-resources-in-video-drivers.patch
index e205671d147ea..c0e802ea49a8f 100644
--- a/pci/pci-64-bit-resources-drivers-media-changes.patch
+++ b/pci/64bit-resource-fix-up-printks-for-resources-in-video-drivers.patch
@@ -1,21 +1,14 @@
-From vivek@in.ibm.com Thu Mar 23 12:03:57 2006
-Date: Thu, 23 Mar 2006 15:03:42 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 4/10] PCI: 64 bit resources drivers media changes
-Message-ID: <20060323200342.GH7175@in.ibm.com>
-Content-Disposition: inline
+From 9f81a4876d2079fa336a8df4ada9cd1f3a55c827 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:16:52 -0700
+Subject: [PATCH 07/16] 64bit resource: fix up printks for resources in video drivers
+This is needed if we wish to change the size of the resource structures.
-o Changes required under drivers/media/* for 64bit resources.
+Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Murali M Chakravarthy <muralim@in.ibm.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
diff --git a/pci/64bit-resource-introduce-resource_size_t-for-the-start-and-end-of-struct-resource.patch b/pci/64bit-resource-introduce-resource_size_t-for-the-start-and-end-of-struct-resource.patch
new file mode 100644
index 0000000000000..94f034270ff18
--- /dev/null
+++ b/pci/64bit-resource-introduce-resource_size_t-for-the-start-and-end-of-struct-resource.patch
@@ -0,0 +1,48 @@
+From 2d647f7aa0acf1aa8eda4a30a90e26e67d547fc2 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 12 Jun 2006 15:49:31 -0700
+Subject: [PATCH 11/16] 64bit resource: introduce resource_size_t for the start and end of struct resource
+
+But do not change it from what it currently is (unsigned long)
+
+Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>
+
+Cc: Vivek Goyal <vgoyal@in.ibm.com>
+Cc: Andrew Morton <akpm@osdl.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ include/linux/ioport.h | 4 +++-
+ include/linux/types.h | 2 ++
+ 2 files changed, 5 insertions(+), 1 deletion(-)
+
+--- gregkh-2.6.orig/include/linux/ioport.h
++++ gregkh-2.6/include/linux/ioport.h
+@@ -9,13 +9,15 @@
+ #define _LINUX_IOPORT_H
+
+ #include <linux/compiler.h>
++#include <linux/types.h>
+ /*
+ * Resources are tree-like, allowing
+ * nesting etc..
+ */
+ struct resource {
++ resource_size_t start;
++ resource_size_t end;
+ const char *name;
+- unsigned long start, end;
+ unsigned long flags;
+ struct resource *parent, *sibling, *child;
+ };
+--- gregkh-2.6.orig/include/linux/types.h
++++ gregkh-2.6/include/linux/types.h
+@@ -178,6 +178,8 @@ typedef __u64 __bitwise __be64;
+
+ #ifdef __KERNEL__
+ typedef unsigned __bitwise__ gfp_t;
++
++typedef unsigned long resource_size_t;
+ #endif
+
+ struct ustat {
diff --git a/pci/kconfigurable-resources-arch-dependent-changes-arch-q-z.patch b/pci/kconfigurable-resources-arch-dependent-changes-arch-q-z.patch
deleted file mode 100644
index f6368ce598e92..0000000000000
--- a/pci/kconfigurable-resources-arch-dependent-changes-arch-q-z.patch
+++ /dev/null
@@ -1,228 +0,0 @@
-From vivek@in.ibm.com Fri May 5 10:36:20 2006
-Date: Fri, 5 May 2006 13:36:06 -0400
-From: Vivek Goyal <vgoyal@in.ibm.com>
-To: linux kernel mailing list <linux-kernel@vger.kernel.org>
-Cc: Greg KH <gregkh@suse.de>, Morton Andrew Morton <akpm@osdl.org>
-Subject: kconfigurable resources arch dependent changes arch/q-z
-Message-ID: <20060505173606.GH6450@in.ibm.com>
-Content-Disposition: inline
-
-o Changes to arch specific code for kconfigurable resources. This
- patch contains changes for arch/[q-z]*
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- arch/s390/Kconfig | 8 ++++++++
- arch/sh/Kconfig | 7 +++++++
- arch/sh/boards/mpc1211/pci.c | 4 ++--
- arch/sh/boards/overdrive/galileo.c | 2 +-
- arch/sh/drivers/pci/pci.c | 6 +++---
- arch/sh64/kernel/pcibios.c | 4 ++--
- arch/sparc/Kconfig | 7 +++++++
- arch/sparc/kernel/pcic.c | 2 +-
- arch/sparc64/kernel/pci.c | 2 +-
- arch/v850/Kconfig | 7 +++++++
- arch/v850/kernel/rte_mb_a_pci.c | 2 +-
- arch/xtensa/Kconfig | 7 +++++++
- arch/xtensa/kernel/pci.c | 6 +++---
- 13 files changed, 50 insertions(+), 14 deletions(-)
-
---- gregkh-2.6.orig/arch/s390/Kconfig
-+++ gregkh-2.6/arch/s390/Kconfig
-@@ -218,6 +218,14 @@ config WARN_STACK_SIZE
-
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ depends on !64BIT
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- comment "I/O subsystem configuration"
-
- config MACHCHK_WARNING
---- gregkh-2.6.orig/arch/sh/Kconfig
-+++ gregkh-2.6/arch/sh/Kconfig
-@@ -532,6 +532,13 @@ config NODES_SHIFT
- default "1"
- depends on NEED_MULTIPLE_NODES
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- endmenu
-
- menu "Boot options"
---- gregkh-2.6.orig/arch/sh/boards/mpc1211/pci.c
-+++ gregkh-2.6/arch/sh/boards/mpc1211/pci.c
-@@ -273,9 +273,9 @@ void __init pcibios_fixup_irqs(void)
- }
-
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- if (res->flags & IORESOURCE_IO) {
- if (start >= 0x10000UL) {
---- gregkh-2.6.orig/arch/sh/boards/overdrive/galileo.c
-+++ gregkh-2.6/arch/sh/boards/overdrive/galileo.c
-@@ -536,7 +536,7 @@ void __init pcibios_fixup_bus(struct pci
- }
-
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size)
-+ resource_size_t size)
- {
- }
-
---- gregkh-2.6.orig/arch/sh/drivers/pci/pci.c
-+++ gregkh-2.6/arch/sh/drivers/pci/pci.c
-@@ -75,7 +75,7 @@ pcibios_update_resource(struct pci_dev *
- }
-
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- __attribute__ ((weak));
-
- /*
-@@ -85,10 +85,10 @@ void pcibios_align_resource(void *data,
- * modulo 0x400.
- */
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- if (start & 0x300) {
- start = (start + 0x3ff) & ~0x3ff;
---- gregkh-2.6.orig/arch/sh64/kernel/pcibios.c
-+++ gregkh-2.6/arch/sh64/kernel/pcibios.c
-@@ -69,10 +69,10 @@ pcibios_update_resource(struct pci_dev *
- * modulo 0x400.
- */
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- if (start & 0x300) {
- start = (start + 0x3ff) & ~0x3ff;
---- gregkh-2.6.orig/arch/sparc/Kconfig
-+++ gregkh-2.6/arch/sparc/Kconfig
-@@ -67,6 +67,13 @@ config SPARC32
- maintains both the SPARC32 and SPARC64 ports; its web page is
- available at <http://www.ultralinux.org/>.
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- # Global things across all Sun machines.
- config ISA
- bool
---- gregkh-2.6.orig/arch/sparc/kernel/pcic.c
-+++ gregkh-2.6/arch/sparc/kernel/pcic.c
-@@ -859,7 +859,7 @@ char * __init pcibios_setup(char *str)
- }
-
- void pcibios_align_resource(void *data, struct resource *res,
-- u64 size, u64 align)
-+ resource_size_t size, resource_size_t align)
- {
- }
-
---- gregkh-2.6.orig/arch/sparc64/kernel/pci.c
-+++ gregkh-2.6/arch/sparc64/kernel/pci.c
-@@ -390,7 +390,7 @@ void pcibios_update_irq(struct pci_dev *
- }
-
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- }
-
---- gregkh-2.6.orig/arch/v850/Kconfig
-+++ gregkh-2.6/arch/v850/Kconfig
-@@ -235,6 +235,13 @@ menu "Processor type and features"
-
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- endmenu
-
-
---- gregkh-2.6.orig/arch/v850/kernel/rte_mb_a_pci.c
-+++ gregkh-2.6/arch/v850/kernel/rte_mb_a_pci.c
-@@ -329,7 +329,7 @@ void pcibios_fixup_bus(struct pci_bus *b
-
- void
- pcibios_align_resource (void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- }
-
---- gregkh-2.6.orig/arch/xtensa/Kconfig
-+++ gregkh-2.6/arch/xtensa/Kconfig
-@@ -99,6 +99,13 @@ config MATH_EMULATION
- config HIGHMEM
- bool "High memory support"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- endmenu
-
- menu "Platform options"
---- gregkh-2.6.orig/arch/xtensa/kernel/pci.c
-+++ gregkh-2.6/arch/xtensa/kernel/pci.c
-@@ -71,13 +71,13 @@ static int pci_bus_count;
- * which might have be mirrored at 0x0100-0x03ff..
- */
- void
--pcibios_align_resource(void *data, struct resource *res, unsigned long size,
-- unsigned long align)
-+pcibios_align_resource(void *data, struct resource *res, resource_size_t size,
-+ resource_size_t align)
- {
- struct pci_dev *dev = data;
-
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- if (size > 0x100) {
- printk(KERN_ERR "PCI: I/O Region %s/%d too large"
diff --git a/pci/kconfigurable-resources-arch-dependent-changes-arch.patch b/pci/kconfigurable-resources-arch-dependent-changes-arch.patch
deleted file mode 100644
index 98730e0eb3d20..0000000000000
--- a/pci/kconfigurable-resources-arch-dependent-changes-arch.patch
+++ /dev/null
@@ -1,316 +0,0 @@
-From vivek@in.ibm.com Fri May 5 10:34:48 2006
-Date: Fri, 5 May 2006 13:34:34 -0400
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Greg KH <gregkh@suse.de>, Morton Andrew Morton <akpm@osdl.org>
-Subject: kconfigurable resources arch dependent changes arch/[j-p]
-Message-ID: <20060505173434.GG6450@in.ibm.com>
-Content-Disposition: inline
-
-
-o Changes to arch specific code for kconfigurable resources. This
- patch contains changes for arch/[j-p]*
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- arch/m32r/Kconfig | 7 +++++++
- arch/m68k/Kconfig | 7 +++++++
- arch/m68knommu/Kconfig | 7 +++++++
- arch/m68knommu/kernel/comempci.c | 3 ++-
- arch/mips/Kconfig | 8 ++++++++
- arch/mips/pci/pci.c | 4 ++--
- arch/mips/pmc-sierra/yosemite/ht.c | 4 ++--
- arch/parisc/Kconfig | 8 ++++++++
- arch/parisc/kernel/pci.c | 2 +-
- arch/powerpc/Kconfig | 8 ++++++++
- arch/powerpc/kernel/pci_32.c | 10 +++++-----
- arch/powerpc/kernel/pci_64.c | 4 ++--
- arch/ppc/Kconfig | 7 +++++++
- arch/ppc/kernel/pci.c | 12 ++++++------
- include/asm-powerpc/pci.h | 2 +-
- include/asm-ppc/pci.h | 2 +-
- 16 files changed, 74 insertions(+), 21 deletions(-)
-
---- gregkh-2.6.orig/arch/m32r/Kconfig
-+++ gregkh-2.6/arch/m32r/Kconfig
-@@ -188,6 +188,13 @@ config ARCH_DISCONTIGMEM_ENABLE
-
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- config IRAM_START
- hex "Internal memory start address (hex)"
- default "00f00000" if !CHIP_M32104
---- gregkh-2.6.orig/arch/m68k/Kconfig
-+++ gregkh-2.6/arch/m68k/Kconfig
-@@ -368,6 +368,13 @@ config 060_WRITETHROUGH
-
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- endmenu
-
- menu "General setup"
---- gregkh-2.6.orig/arch/m68knommu/Kconfig
-+++ gregkh-2.6/arch/m68knommu/Kconfig
-@@ -605,6 +605,13 @@ endchoice
-
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- endmenu
-
- config ISA_DMA_API
---- gregkh-2.6.orig/arch/m68knommu/kernel/comempci.c
-+++ gregkh-2.6/arch/m68knommu/kernel/comempci.c
-@@ -357,7 +357,8 @@ void pcibios_fixup_bus(struct pci_bus *b
-
- /*****************************************************************************/
-
--void pcibios_align_resource(void *data, struct resource *res, unsigned long size, unsigned long align)
-+void pcibios_align_resource(void *data, struct resource *res,
-+ resource_size_t size, resource_size_t align)
- {
- }
-
---- gregkh-2.6.orig/arch/mips/Kconfig
-+++ gregkh-2.6/arch/mips/Kconfig
-@@ -1653,6 +1653,14 @@ config NR_CPUS
-
- source "kernel/Kconfig.preempt"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ depends on 32BIT
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- config RTC_DS1742
- bool "DS1742 BRAM/RTC support"
- depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927
---- gregkh-2.6.orig/arch/mips/pci/pci.c
-+++ gregkh-2.6/arch/mips/pci/pci.c
-@@ -51,11 +51,11 @@ unsigned long PCIBIOS_MIN_MEM = 0;
- */
- void
- pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- struct pci_dev *dev = data;
- struct pci_controller *hose = dev->sysdata;
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- if (res->flags & IORESOURCE_IO) {
- /* Make sure we start at our min on all hoses */
---- gregkh-2.6.orig/arch/mips/pmc-sierra/yosemite/ht.c
-+++ gregkh-2.6/arch/mips/pmc-sierra/yosemite/ht.c
-@@ -383,12 +383,12 @@ void pcibios_update_resource(struct pci_
-
-
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- struct pci_dev *dev = data;
-
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- /* We need to avoid collisions with `mirrored' VGA ports
- and other strange ISA hardware, so we always want the
---- gregkh-2.6.orig/arch/parisc/Kconfig
-+++ gregkh-2.6/arch/parisc/Kconfig
-@@ -217,6 +217,14 @@ source "kernel/Kconfig.preempt"
- source "kernel/Kconfig.hz"
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ depends on !64BIT
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- config COMPAT
- def_bool y
- depends on 64BIT
---- gregkh-2.6.orig/arch/parisc/kernel/pci.c
-+++ gregkh-2.6/arch/parisc/kernel/pci.c
-@@ -289,7 +289,7 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
- * than res->start.
- */
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long alignment)
-+ resource_size_t size, resource_size_t alignment)
- {
- unsigned long mask, align;
-
---- gregkh-2.6.orig/arch/powerpc/Kconfig
-+++ gregkh-2.6/arch/powerpc/Kconfig
-@@ -626,6 +626,14 @@ config CRASH_DUMP
-
- Don't change this unless you know what you are doing.
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ depends on PPC32
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- config EMBEDDEDBOOT
- bool
- depends on 8xx || 8260
---- gregkh-2.6.orig/arch/powerpc/kernel/pci_32.c
-+++ gregkh-2.6/arch/powerpc/kernel/pci_32.c
-@@ -173,18 +173,18 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
- * but we want to try to avoid allocating at 0x2900-0x2bff
- * which might have be mirrored at 0x0100-0x03ff..
- */
--void pcibios_align_resource(void *data, struct resource *res, u64 size,
-- u64 align)
-+void pcibios_align_resource(void *data, struct resource *res,
-+ resource_size_t size, resource_size_t align)
- {
- struct pci_dev *dev = data;
-
- if (res->flags & IORESOURCE_IO) {
-- u64 start = res->start;
-+ resource_size_t start = res->start;
-
- if (size > 0x100) {
- printk(KERN_ERR "PCI: I/O Region %s/%d too large"
- " (%lld bytes)\n", pci_name(dev),
-- dev->resource - res, size);
-+ dev->resource - res, (unsigned long long)size);
- }
-
- if (start & 0x300) {
-@@ -1764,7 +1764,7 @@ long sys_pciconfig_iobase(long which, un
-
- void pci_resource_to_user(const struct pci_dev *dev, int bar,
- const struct resource *rsrc,
-- u64 *start, u64 *end)
-+ resource_size_t *start, resource_size_t *end)
- {
- struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
- unsigned long offset = 0;
---- gregkh-2.6.orig/arch/powerpc/kernel/pci_64.c
-+++ gregkh-2.6/arch/powerpc/kernel/pci_64.c
-@@ -146,11 +146,11 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
- * which might have be mirrored at 0x0100-0x03ff..
- */
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- struct pci_dev *dev = data;
- struct pci_controller *hose = pci_bus_to_host(dev->bus);
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
- unsigned long alignto;
-
- if (res->flags & IORESOURCE_IO) {
---- gregkh-2.6.orig/arch/ppc/Kconfig
-+++ gregkh-2.6/arch/ppc/Kconfig
-@@ -953,6 +953,13 @@ source kernel/Kconfig.hz
- source kernel/Kconfig.preempt
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- source "fs/Kconfig.binfmt"
-
- config PREP_RESIDUAL
---- gregkh-2.6.orig/arch/ppc/kernel/pci.c
-+++ gregkh-2.6/arch/ppc/kernel/pci.c
-@@ -171,13 +171,13 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
- * but we want to try to avoid allocating at 0x2900-0x2bff
- * which might have be mirrored at 0x0100-0x03ff..
- */
--void pcibios_align_resource(void *data, struct resource *res, u64 size,
-- u64 align)
-+void pcibios_align_resource(void *data, struct resource *res,
-+ resource_size_t size, resource_size_t align)
- {
- struct pci_dev *dev = data;
-
- if (res->flags & IORESOURCE_IO) {
-- u64 start = res->start;
-+ resource_size_t start = res->start;
-
- if (size > 0x100) {
- printk(KERN_ERR "PCI: I/O Region %s/%d too large"
-@@ -960,8 +960,8 @@ static pgprot_t __pci_mmap_set_pgprot(st
- else
- prot |= _PAGE_GUARDED;
-
-- printk("PCI map for %s:%llx, prot: %llx\n", pci_name(dev), rp->start,
-- prot);
-+ printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev),
-+ (unsigned long long)rp->start, prot);
-
- return __pgprot(prot);
- }
-@@ -1131,7 +1131,7 @@ long sys_pciconfig_iobase(long which, un
-
- void pci_resource_to_user(const struct pci_dev *dev, int bar,
- const struct resource *rsrc,
-- u64 *start, u64 *end)
-+ resource_size_t *start, resource_size_t *end)
- {
- struct pci_controller *hose = pci_bus_to_hose(dev->bus->number);
- unsigned long offset = 0;
---- gregkh-2.6.orig/include/asm-powerpc/pci.h
-+++ gregkh-2.6/include/asm-powerpc/pci.h
-@@ -242,7 +242,7 @@ extern pgprot_t pci_phys_mem_access_prot
- #define HAVE_ARCH_PCI_RESOURCE_TO_USER
- extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
- const struct resource *rsrc,
-- u64 *start, u64 *end);
-+ resource_size_t *start, resource_size_t *end);
- #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */
-
- #endif /* __KERNEL__ */
---- gregkh-2.6.orig/include/asm-ppc/pci.h
-+++ gregkh-2.6/include/asm-ppc/pci.h
-@@ -133,7 +133,7 @@ extern pgprot_t pci_phys_mem_access_prot
- #define HAVE_ARCH_PCI_RESOURCE_TO_USER
- extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
- const struct resource *rsrc,
-- u64 *start, u64 *end);
-+ resource_size_t *start, resource_size_t *end);
-
-
- #endif /* __KERNEL__ */
diff --git a/pci/kconfigurable-resources-arch-dependent-changes.patch b/pci/kconfigurable-resources-arch-dependent-changes.patch
deleted file mode 100644
index ce47f102eef3d..0000000000000
--- a/pci/kconfigurable-resources-arch-dependent-changes.patch
+++ /dev/null
@@ -1,207 +0,0 @@
-From vivek@in.ibm.com Fri May 5 10:33:41 2006
-Date: Fri, 5 May 2006 13:33:26 -0400
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Greg KH <gregkh@suse.de>, Morton Andrew Morton <akpm@osdl.org>
-Subject: kconfigurable resources arch dependent changes (arch/[a-i]*)
-Message-ID: <20060505173326.GF6450@in.ibm.com>
-Content-Disposition: inline
-
-
-
-o Changes to arch specific code for kconfigurable resources. This
- patch contains changes for arch/[a-i]*
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
-
----
- arch/alpha/kernel/pci.c | 4 ++--
- arch/arm/Kconfig | 7 +++++++
- arch/arm/kernel/bios32.c | 6 +++---
- arch/arm26/Kconfig | 7 +++++++
- arch/cris/Kconfig | 7 +++++++
- arch/cris/arch-v32/drivers/pci/bios.c | 4 ++--
- arch/frv/Kconfig | 7 +++++++
- arch/frv/mb93090-mb00/pci-frv.c | 4 ++--
- arch/i386/Kconfig | 7 +++++++
- arch/i386/pci/i386.c | 4 ++--
- arch/ia64/pci/pci.c | 2 +-
- 11 files changed, 47 insertions(+), 12 deletions(-)
-
---- gregkh-2.6.orig/arch/alpha/kernel/pci.c
-+++ gregkh-2.6/arch/alpha/kernel/pci.c
-@@ -124,12 +124,12 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_
-
- void
- pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- struct pci_dev *dev = data;
- struct pci_controller *hose = dev->sysdata;
- unsigned long alignto;
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- if (res->flags & IORESOURCE_IO) {
- /* Make sure we start at our min on all hoses */
---- gregkh-2.6.orig/arch/arm/Kconfig
-+++ gregkh-2.6/arch/arm/Kconfig
-@@ -518,6 +518,13 @@ config NODES_SHIFT
-
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- config LEDS
- bool "Timer and CPU usage LEDs"
- depends on ARCH_CDB89712 || ARCH_CO285 || ARCH_EBSA110 || \
---- gregkh-2.6.orig/arch/arm/kernel/bios32.c
-+++ gregkh-2.6/arch/arm/kernel/bios32.c
-@@ -304,7 +304,7 @@ static inline int pdev_bad_for_parity(st
- static void __devinit
- pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
- {
-- u64 offset;
-+ resource_size_t offset;
- int i;
-
- for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-@@ -634,9 +634,9 @@ char * __init pcibios_setup(char *str)
- * which might be mirrored at 0x0100-0x03ff..
- */
- void pcibios_align_resource(void *data, struct resource *res,
-- u64 size, u64 align)
-+ resource_size_t size, resource_size_t align)
- {
-- u64 start = res->start;
-+ resource_size_t start = res->start;
-
- if (res->flags & IORESOURCE_IO && start & 0x300)
- start = (start + 0x3ff) & ~0x3ff;
---- gregkh-2.6.orig/arch/arm26/Kconfig
-+++ gregkh-2.6/arch/arm26/Kconfig
-@@ -187,6 +187,13 @@ config CMDLINE
-
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- endmenu
-
- source "net/Kconfig"
---- gregkh-2.6.orig/arch/cris/Kconfig
-+++ gregkh-2.6/arch/cris/Kconfig
-@@ -80,6 +80,13 @@ config PREEMPT
-
- source mm/Kconfig
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- endmenu
-
- menu "Hardware setup"
---- gregkh-2.6.orig/arch/cris/arch-v32/drivers/pci/bios.c
-+++ gregkh-2.6/arch/cris/arch-v32/drivers/pci/bios.c
-@@ -45,10 +45,10 @@ int pci_mmap_page_range(struct pci_dev *
-
- void
- pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- if (start & 0x300) {
- start = (start + 0x3ff) & ~0x3ff;
---- gregkh-2.6.orig/arch/frv/Kconfig
-+++ gregkh-2.6/arch/frv/Kconfig
-@@ -80,6 +80,13 @@ config HIGHPTE
-
- source "mm/Kconfig"
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- choice
- prompt "uClinux kernel load address"
- depends on !MMU
---- gregkh-2.6.orig/arch/frv/mb93090-mb00/pci-frv.c
-+++ gregkh-2.6/arch/frv/mb93090-mb00/pci-frv.c
-@@ -64,10 +64,10 @@ pcibios_update_resource(struct pci_dev *
- */
- void
- pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ resource_size_t start = res->start;
-
- if (start & 0x300) {
- start = (start + 0x3ff) & ~0x3ff;
---- gregkh-2.6.orig/arch/i386/Kconfig
-+++ gregkh-2.6/arch/i386/Kconfig
-@@ -754,6 +754,13 @@ config PHYSICAL_START
-
- Don't change this unless you know what you are doing.
-
-+config RESOURCES_32BIT
-+ bool "32 bit Memory and IO resources (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL && !X86_PAE
-+ help
-+ By default resources are 64 bit. This option allows memory and IO
-+ resources to be 32 bit to optimize code size.
-+
- config HOTPLUG_CPU
- bool "Support for hot-pluggable CPUs (EXPERIMENTAL)"
- depends on SMP && HOTPLUG && EXPERIMENTAL && !X86_VOYAGER
---- gregkh-2.6.orig/arch/i386/pci/i386.c
-+++ gregkh-2.6/arch/i386/pci/i386.c
-@@ -48,10 +48,10 @@
- */
- void
- pcibios_align_resource(void *data, struct resource *res,
-- u64 size, u64 align)
-+ resource_size_t size, resource_size_t align)
- {
- if (res->flags & IORESOURCE_IO) {
-- u64 start = res->start;
-+ resource_size_t start = res->start;
-
- if (start & 0x300) {
- start = (start + 0x3ff) & ~0x3ff;
---- gregkh-2.6.orig/arch/ia64/pci/pci.c
-+++ gregkh-2.6/arch/ia64/pci/pci.c
-@@ -568,7 +568,7 @@ pcibios_disable_device (struct pci_dev *
-
- void
- pcibios_align_resource (void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ resource_size_t size, resource_size_t align)
- {
- }
-
diff --git a/pci/kconfigurable-resources-driver-others-changes.patch b/pci/kconfigurable-resources-driver-others-changes.patch
deleted file mode 100644
index 1118937846e58..0000000000000
--- a/pci/kconfigurable-resources-driver-others-changes.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-From vivek@in.ibm.com Fri May 5 10:31:16 2006
-Date: Fri, 5 May 2006 13:31:02 -0400
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Greg KH <gregkh@suse.de>, Morton Andrew Morton <akpm@osdl.org>
-Subject: kconfigurable resources driver others changes
-Message-ID: <20060505173102.GE6450@in.ibm.com>
-Content-Disposition: inline
-
-
-
-o Changes to files under driver/* except driver/pci/* which is covered in a
- separate patch.
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/ieee1394/ohci1394.c | 2 +-
- drivers/infiniband/hw/ipath/ipath_driver.c | 8 ++++----
- drivers/net/8139cp.c | 2 +-
- drivers/pcmcia/rsrc_nonstatic.c | 13 ++++++++-----
- drivers/pnp/manager.c | 11 ++++++-----
- drivers/pnp/resource.c | 8 ++++----
- include/linux/pnp.h | 7 +++++--
- 7 files changed, 29 insertions(+), 22 deletions(-)
-
---- gregkh-2.6.orig/drivers/ieee1394/ohci1394.c
-+++ gregkh-2.6/drivers/ieee1394/ohci1394.c
-@@ -3210,7 +3210,7 @@ static int __devinit ohci1394_pci_probe(
- {
- struct hpsb_host *host;
- struct ti_ohci *ohci; /* shortcut to currently handled device */
-- u64 ohci_base;
-+ resource_size_t ohci_base;
-
- if (pci_enable_device(dev))
- FAIL(-ENXIO, "Failed to enable OHCI hardware");
---- gregkh-2.6.orig/drivers/infiniband/hw/ipath/ipath_driver.c
-+++ gregkh-2.6/drivers/infiniband/hw/ipath/ipath_driver.c
-@@ -460,10 +460,10 @@ static int __devinit ipath_init_one(stru
- for (j = 0; j < 6; j++) {
- if (!pdev->resource[j].start)
- continue;
-- ipath_cdbg(VERBOSE, "BAR %d start %lx, end %lx, len %lx\n",
-- j, pdev->resource[j].start,
-- pdev->resource[j].end,
-- pci_resource_len(pdev, j));
-+ ipath_cdbg(VERBOSE, "BAR %d start %llx, end %llx, len %llx\n",
-+ j, (unsigned long long)pdev->resource[j].start,
-+ (unsigned long long)pdev->resource[j].end,
-+ (unsigned long long)pci_resource_len(pdev, j));
- }
-
- if (!addr) {
---- gregkh-2.6.orig/drivers/net/8139cp.c
-+++ gregkh-2.6/drivers/net/8139cp.c
-@@ -1668,7 +1668,7 @@ static int cp_init_one (struct pci_dev *
- struct cp_private *cp;
- int rc;
- void __iomem *regs;
-- u64 pciaddr;
-+ resource_size_t pciaddr;
- unsigned int addr_len, i, pci_using_dac;
- u8 pci_rev;
-
---- gregkh-2.6.orig/drivers/pcmcia/rsrc_nonstatic.c
-+++ gregkh-2.6/drivers/pcmcia/rsrc_nonstatic.c
-@@ -72,7 +72,7 @@ static DEFINE_MUTEX(rsrc_mutex);
- ======================================================================*/
-
- static struct resource *
--make_resource(u64 b, u64 n, int flags, char *name)
-+make_resource(resource_size_t b, resource_size_t n, int flags, char *name)
- {
- struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
-
-@@ -86,7 +86,8 @@ make_resource(u64 b, u64 n, int flags, c
- }
-
- static struct resource *
--claim_region(struct pcmcia_socket *s, u64 base, u64 size, int type, char *name)
-+claim_region(struct pcmcia_socket *s, resource_size_t base,
-+ resource_size_t size, int type, char *name)
- {
- struct resource *res, *parent;
-
-@@ -517,10 +518,11 @@ struct pcmcia_align_data {
- };
-
- static void
--pcmcia_common_align(void *align_data, struct resource *res, u64 size, u64 align)
-+pcmcia_common_align(void *align_data, struct resource *res,
-+ resource_size_t size, resource_size_t align)
- {
- struct pcmcia_align_data *data = align_data;
-- u64 start;
-+ resource_size_t start;
- /*
- * Ensure that we have the correct start address
- */
-@@ -531,7 +533,8 @@ pcmcia_common_align(void *align_data, st
- }
-
- static void
--pcmcia_align(void *align_data, struct resource *res, u64 size, u64 align)
-+pcmcia_align(void *align_data, struct resource *res, resource_size_t size,
-+ resource_size_t align)
- {
- struct pcmcia_align_data *data = align_data;
- struct resource_map *m;
---- gregkh-2.6.orig/drivers/pnp/manager.c
-+++ gregkh-2.6/drivers/pnp/manager.c
-@@ -20,7 +20,7 @@ DECLARE_MUTEX(pnp_res_mutex);
-
- static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
- {
-- u64 *start, *end;
-+ resource_size_t *start, *end;
- unsigned long *flags;
-
- if (!dev || !rule)
-@@ -64,7 +64,7 @@ static int pnp_assign_port(struct pnp_de
-
- static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
- {
-- u64 *start, *end;
-+ resource_size_t *start, *end;
- unsigned long *flags;
-
- if (!dev || !rule)
-@@ -118,7 +118,7 @@ static int pnp_assign_mem(struct pnp_dev
-
- static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx)
- {
-- u64 *start, *end;
-+ resource_size_t *start, *end;
- unsigned long *flags;
- int i;
-
-@@ -171,7 +171,7 @@ static int pnp_assign_irq(struct pnp_dev
-
- static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
- {
-- u64 *start, *end;
-+ resource_size_t *start, *end;
- unsigned long *flags;
- int i;
-
-@@ -586,7 +586,8 @@ int pnp_disable_dev(struct pnp_dev *dev)
- * @size: size of region
- *
- */
--void pnp_resource_change(struct resource *resource, u64 start, u64 size)
-+void pnp_resource_change(struct resource *resource, resource_size_t start,
-+ resource_size_t size)
- {
- if (resource == NULL)
- return;
---- gregkh-2.6.orig/drivers/pnp/resource.c
-+++ gregkh-2.6/drivers/pnp/resource.c
-@@ -241,7 +241,7 @@ int pnp_check_port(struct pnp_dev * dev,
- {
- int tmp;
- struct pnp_dev *tdev;
-- u64 *port, *end, *tport, *tend;
-+ resource_size_t *port, *end, *tport, *tend;
- port = &dev->res.port_resource[idx].start;
- end = &dev->res.port_resource[idx].end;
-
-@@ -297,7 +297,7 @@ int pnp_check_mem(struct pnp_dev * dev,
- {
- int tmp;
- struct pnp_dev *tdev;
-- u64 *addr, *end, *taddr, *tend;
-+ resource_size_t *addr, *end, *taddr, *tend;
- addr = &dev->res.mem_resource[idx].start;
- end = &dev->res.mem_resource[idx].end;
-
-@@ -358,7 +358,7 @@ int pnp_check_irq(struct pnp_dev * dev,
- {
- int tmp;
- struct pnp_dev *tdev;
-- u64 * irq = &dev->res.irq_resource[idx].start;
-+ resource_size_t * irq = &dev->res.irq_resource[idx].start;
-
- /* if the resource doesn't exist, don't complain about it */
- if (cannot_compare(dev->res.irq_resource[idx].flags))
-@@ -423,7 +423,7 @@ int pnp_check_dma(struct pnp_dev * dev,
- #ifndef CONFIG_IA64
- int tmp;
- struct pnp_dev *tdev;
-- u64 * dma = &dev->res.dma_resource[idx].start;
-+ resource_size_t * dma = &dev->res.dma_resource[idx].start;
-
- /* if the resource doesn't exist, don't complain about it */
- if (cannot_compare(dev->res.dma_resource[idx].flags))
---- gregkh-2.6.orig/include/linux/pnp.h
-+++ gregkh-2.6/include/linux/pnp.h
-@@ -389,7 +389,8 @@ int pnp_start_dev(struct pnp_dev *dev);
- int pnp_stop_dev(struct pnp_dev *dev);
- int pnp_activate_dev(struct pnp_dev *dev);
- int pnp_disable_dev(struct pnp_dev *dev);
--void pnp_resource_change(struct resource *resource, u64 start, u64 size);
-+void pnp_resource_change(struct resource *resource, resource_size_t start,
-+ resource_size_t size);
-
- /* protocol helpers */
- int pnp_is_active(struct pnp_dev * dev);
-@@ -434,7 +435,9 @@ static inline int pnp_start_dev(struct p
- static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
- static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
- static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
--static inline void pnp_resource_change(struct resource *resource, u64 start, u64 size) { }
-+static inline void pnp_resource_change(struct resource *resource,
-+ resource_size_t start,
-+ resource_size_t size) { }
-
- /* protocol helpers */
- static inline int pnp_is_active(struct pnp_dev * dev) { return 0; }
diff --git a/pci/kconfigurable-resources-driver-pci-changes.patch b/pci/kconfigurable-resources-driver-pci-changes.patch
deleted file mode 100644
index 570ffee610d83..0000000000000
--- a/pci/kconfigurable-resources-driver-pci-changes.patch
+++ /dev/null
@@ -1,165 +0,0 @@
-From vivek@in.ibm.com Fri May 5 10:30:21 2006
-Date: Fri, 5 May 2006 13:30:02 -0400
-From: Vivek Goyal <vgoyal@in.ibm.com>
-To: linux kernel mailing list <linux-kernel@vger.kernel.org>
-Cc: Greg KH <gregkh@suse.de>, Morton Andrew Morton <akpm@osdl.org>
-Subject: kconfigurable resources driver pci changes
-Message-ID: <20060505173002.GD6450@in.ibm.com>
-Content-Disposition: inline
-
-
-
-o Changes to drivers/pci/* for kconfigurable resources.
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/pci/bus.c | 10 +++++-----
- drivers/pci/pci-sysfs.c | 4 ++--
- drivers/pci/pci.h | 6 +++---
- drivers/pci/proc.c | 4 ++--
- drivers/pci/setup-res.c | 6 +++---
- include/linux/pci.h | 13 +++++++------
- 6 files changed, 22 insertions(+), 21 deletions(-)
-
---- gregkh-2.6.orig/drivers/pci/bus.c
-+++ gregkh-2.6/drivers/pci/bus.c
-@@ -34,11 +34,11 @@
- */
- int
- pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
-- u64 size, u64 align, u64 min,
-- unsigned int type_mask,
-- void (*alignf)(void *, struct resource *,
-- u64, u64),
-- void *alignf_data)
-+ resource_size_t size, resource_size_t align,
-+ resource_size_t min, unsigned int type_mask,
-+ void (*alignf)(void *, struct resource *, resource_size_t,
-+ resource_size_t),
-+ void *alignf_data)
- {
- int i, ret = -ENOMEM;
-
---- gregkh-2.6.orig/drivers/pci/pci-sysfs.c
-+++ gregkh-2.6/drivers/pci/pci-sysfs.c
-@@ -64,7 +64,7 @@ resource_show(struct device * dev, struc
- char * str = buf;
- int i;
- int max = 7;
-- u64 start, end;
-+ resource_size_t start, end;
-
- if (pci_dev->subordinate)
- max = DEVICE_COUNT_RESOURCE;
-@@ -320,7 +320,7 @@ pci_mmap_resource(struct kobject *kobj,
- struct device, kobj));
- struct resource *res = (struct resource *)attr->private;
- enum pci_mmap_state mmap_type;
-- u64 start, end;
-+ resource_size_t start, end;
- int i;
-
- for (i = 0; i < PCI_ROM_RESOURCE; i++)
---- gregkh-2.6.orig/drivers/pci/pci.h
-+++ gregkh-2.6/drivers/pci/pci.h
-@@ -6,10 +6,10 @@ extern int pci_create_sysfs_dev_files(st
- extern void pci_remove_sysfs_dev_files(struct pci_dev *pdev);
- extern void pci_cleanup_rom(struct pci_dev *dev);
- extern int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
-- u64 size, u64 align,
-- u64 min, unsigned int type_mask,
-+ resource_size_t size, resource_size_t align,
-+ resource_size_t min, unsigned int type_mask,
- void (*alignf)(void *, struct resource *,
-- u64, u64),
-+ resource_size_t, resource_size_t),
- void *alignf_data);
- /* Firmware callbacks */
- extern int (*platform_pci_choose_state)(struct pci_dev *dev, pm_message_t state);
---- gregkh-2.6.orig/drivers/pci/proc.c
-+++ gregkh-2.6/drivers/pci/proc.c
-@@ -350,14 +350,14 @@ static int show_device(struct seq_file *
- dev->irq);
- /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */
- for (i=0; i<7; i++) {
-- u64 start, end;
-+ resource_size_t start, end;
- pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
- seq_printf(m, "\t%16llx",
- (unsigned long long)(start |
- (dev->resource[i].flags & PCI_REGION_FLAG_MASK)));
- }
- for (i=0; i<7; i++) {
-- u64 start, end;
-+ resource_size_t start, end;
- pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
- seq_printf(m, "\t%16llx",
- dev->resource[i].start < dev->resource[i].end ?
---- gregkh-2.6.orig/drivers/pci/setup-res.c
-+++ gregkh-2.6/drivers/pci/setup-res.c
-@@ -121,7 +121,7 @@ int pci_assign_resource(struct pci_dev *
- {
- struct pci_bus *bus = dev->bus;
- struct resource *res = dev->resource + resno;
-- u64 size, min, align;
-+ resource_size_t size, min, align;
- int ret;
-
- size = res->end - res->start + 1;
-@@ -169,7 +169,7 @@ pdev_sort_resources(struct pci_dev *dev,
- for (i = 0; i < PCI_NUM_RESOURCES; i++) {
- struct resource *r;
- struct resource_list *list, *tmp;
-- u64 r_align;
-+ resource_size_t r_align;
-
- r = &dev->resource[i];
- r_align = r->end - r->start;
-@@ -185,7 +185,7 @@ pdev_sort_resources(struct pci_dev *dev,
- }
- r_align = (i < PCI_BRIDGE_RESOURCES) ? r_align + 1 : r->start;
- for (list = head; ; list = list->next) {
-- u64 align = 0;
-+ resource_size_t align = 0;
- struct resource_list *ln = list->next;
- int idx;
-
---- gregkh-2.6.orig/include/linux/pci.h
-+++ gregkh-2.6/include/linux/pci.h
-@@ -403,8 +403,8 @@ int pcibios_enable_device(struct pci_dev
- char *pcibios_setup (char *str);
-
- /* Used only when drivers/pci/setup.c is used */
--void pcibios_align_resource(void *, struct resource *,
-- u64, u64);
-+void pcibios_align_resource(void *, struct resource *, resource_size_t,
-+ resource_size_t);
- void pcibios_update_irq(struct pci_dev *, int irq);
-
- /* Generic PCI functions used internally */
-@@ -530,10 +530,10 @@ void pci_release_region(struct pci_dev *
-
- /* drivers/pci/bus.c */
- int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
-- u64 size, u64 align,
-- u64 min, unsigned int type_mask,
-+ resource_size_t size, resource_size_t align,
-+ resource_size_t min, unsigned int type_mask,
- void (*alignf)(void *, struct resource *,
-- u64, u64),
-+ resource_size_t, resource_size_t),
- void *alignf_data);
- void pci_enable_bridges(struct pci_bus *bus);
-
-@@ -727,7 +727,8 @@ static inline char *pci_name(struct pci_
- */
- #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER
- static inline void pci_resource_to_user(const struct pci_dev *dev, int bar,
-- const struct resource *rsrc, u64 *start, u64 *end)
-+ const struct resource *rsrc, resource_size_t *start,
-+ resource_size_t *end)
- {
- *start = rsrc->start;
- *end = rsrc->end;
diff --git a/pci/pci-64-bit-resource-fix-amba-build-warning.patch b/pci/pci-64-bit-resource-fix-amba-build-warning.patch
deleted file mode 100644
index 80a2729ab3f1f..0000000000000
--- a/pci/pci-64-bit-resource-fix-amba-build-warning.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From akpm@osdl.org Tue Apr 18 21:07:33 2006
-Message-Id: <200604190407.k3J47TZa008130@shell0.pdx.osdl.net>
-Subject: PCI: 64 bit resource: fix amba build warning
-To: greg@kroah.com
-Cc: akpm@osdl.org
-From: akpm@osdl.org
-Date: Tue, 18 Apr 2006 21:06:47 -0700
-
-
-From: Andrew Morton <akpm@osdl.org>
-
-drivers/amba/bus.c: In function `show_resource':
-drivers/amba/bus.c:183: warning: long long unsigned int format, different type arg (arg 5)
-
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/amba/bus.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- gregkh-2.6.orig/drivers/amba/bus.c
-+++ gregkh-2.6/drivers/amba/bus.c
-@@ -180,7 +180,7 @@ static DEVICE_ATTR(name, S_IRUGO, show_#
- amba_attr(id, "%08x\n", dev->periphid);
- amba_attr(irq0, "%u\n", dev->irq[0]);
- amba_attr(irq1, "%u\n", dev->irq[1]);
--amba_attr(resource, "\t%016llx\t%016llx\t%016llx\n",
-+amba_attr(resource, "\t%016llx\t%016llx\t%016lx\n",
- (unsigned long long)dev->res.start, (unsigned long long)dev->res.end,
- dev->res.flags);
-
diff --git a/pci/pci-64-bit-resource-fixup-pci-resource-dbg-code-to-handle-size-change.patch b/pci/pci-64-bit-resource-fixup-pci-resource-dbg-code-to-handle-size-change.patch
deleted file mode 100644
index 9a3f7a2631d49..0000000000000
--- a/pci/pci-64-bit-resource-fixup-pci-resource-dbg-code-to-handle-size-change.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From akpm@osdl.org Tue Apr 18 21:07:42 2006
-Message-Id: <200604190407.k3J47VX3008139@shell0.pdx.osdl.net>
-Subject: PCI: 64 bit resource: fixup pci resource DBG code to handle size change
-To: greg@kroah.com
-Cc: akpm@osdl.org, galak@kernel.crashing.org
-From: akpm@osdl.org
-Date: Tue, 18 Apr 2006 21:06:50 -0700
-
-
-From: Kumar Gala <galak@kernel.crashing.org>
-
-A number of DBG() calls needed to be fixed up to properly handle the size
-change in struct resource
-
-Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
----
-
----
- arch/powerpc/kernel/pci_32.c | 28 ++++++++++++++--------------
- arch/ppc/kernel/pci.c | 2 +-
- 2 files changed, 15 insertions(+), 15 deletions(-)
-
---- gregkh-2.6.orig/arch/powerpc/kernel/pci_32.c
-+++ gregkh-2.6/arch/powerpc/kernel/pci_32.c
-@@ -99,7 +99,7 @@ pcibios_fixup_resources(struct pci_dev *
- if (!res->flags)
- continue;
- if (res->end == 0xffffffff) {
-- DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n",
-+ DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
- pci_name(dev), i, res->start, res->end);
- res->end -= res->start;
- res->start = 0;
-@@ -117,7 +117,7 @@ pcibios_fixup_resources(struct pci_dev *
- res->start += offset;
- res->end += offset;
- #ifdef DEBUG
-- printk("Fixup res %d (%lx) of dev %s: %lx -> %lx\n",
-+ printk("Fixup res %d (%lx) of dev %s: %llx -> %llx\n",
- i, res->flags, pci_name(dev),
- res->start - offset, res->start);
- #endif
-@@ -179,7 +179,7 @@ void pcibios_align_resource(void *data,
- struct pci_dev *dev = data;
-
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ u64 start = res->start;
-
- if (size > 0x100) {
- printk(KERN_ERR "PCI: I/O Region %s/%d too large"
-@@ -255,8 +255,8 @@ pcibios_allocate_bus_resources(struct li
- }
- }
-
-- DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n",
-- res->start, res->end, res->flags, pr);
-+ DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
-+ res->start, res->end, res->flags, pr);
- if (pr) {
- if (request_resource(pr, res) == 0)
- continue;
-@@ -306,7 +306,7 @@ reparent_resources(struct resource *pare
- *pp = NULL;
- for (p = res->child; p != NULL; p = p->sibling) {
- p->parent = res;
-- DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n",
-+ DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
- p->name, p->start, p->end, res->name);
- }
- return 0;
-@@ -362,7 +362,7 @@ pci_relocate_bridge_resource(struct pci_
- try = conflict->start - 1;
- }
- if (request_resource(pr, res)) {
-- DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n",
-+ DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
- res->start, res->end);
- return -1; /* "can't happen" */
- }
-@@ -480,14 +480,14 @@ static inline void alloc_resource(struct
- {
- struct resource *pr, *r = &dev->resource[idx];
-
-- DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n",
-+ DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
- pci_name(dev), idx, r->start, r->end, r->flags);
- pr = pci_find_parent_resource(dev, r);
- if (!pr || request_resource(pr, r) < 0) {
- printk(KERN_ERR "PCI: Cannot allocate resource region %d"
- " of device %s\n", idx, pci_name(dev));
- if (pr)
-- DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n",
-+ DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
- pr, pr->start, pr->end, pr->flags);
- /* We'll assign a new address later */
- r->flags |= IORESOURCE_UNSET;
-@@ -957,7 +957,7 @@ pci_process_bridge_OF_ranges(struct pci_
- res = &hose->io_resource;
- res->flags = IORESOURCE_IO;
- res->start = ranges[2];
-- DBG("PCI: IO 0x%lx -> 0x%lx\n",
-+ DBG("PCI: IO 0x%llx -> 0x%llx\n",
- res->start, res->start + size - 1);
- break;
- case 2: /* memory space */
-@@ -979,7 +979,7 @@ pci_process_bridge_OF_ranges(struct pci_
- if(ranges[0] & 0x40000000)
- res->flags |= IORESOURCE_PREFETCH;
- res->start = ranges[na+2];
-- DBG("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno,
-+ DBG("PCI: MEM[%d] 0x%llx -> 0x%llx\n", memno,
- res->start, res->start + size - 1);
- }
- break;
-@@ -1075,7 +1075,7 @@ do_update_p2p_io_resource(struct pci_bus
- DBG("Remapping Bus %d, bridge: %s\n", bus->number, pci_name(bridge));
- res.start -= ((unsigned long) hose->io_base_virt - isa_io_base);
- res.end -= ((unsigned long) hose->io_base_virt - isa_io_base);
-- DBG(" IO window: %08lx-%08lx\n", res.start, res.end);
-+ DBG(" IO window: %016llx-%016llx\n", res.start, res.end);
-
- /* Set up the top and bottom of the PCI I/O segment for this bus. */
- pci_read_config_dword(bridge, PCI_IO_BASE, &l);
-@@ -1223,8 +1223,8 @@ do_fixup_p2p_level(struct pci_bus *bus)
- continue;
- if ((r->flags & IORESOURCE_IO) == 0)
- continue;
-- DBG("Trying to allocate from %08lx, size %08lx from parent"
-- " res %d: %08lx -> %08lx\n",
-+ DBG("Trying to allocate from %016llx, size %016llx from parent"
-+ " res %d: %016llx -> %016llx\n",
- res->start, res->end, i, r->start, r->end);
-
- if (allocate_resource(r, res, res->end + 1, res->start, max,
---- gregkh-2.6.orig/arch/ppc/kernel/pci.c
-+++ gregkh-2.6/arch/ppc/kernel/pci.c
-@@ -960,7 +960,7 @@ static pgprot_t __pci_mmap_set_pgprot(st
- else
- prot |= _PAGE_GUARDED;
-
-- printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start,
-+ printk("PCI map for %s:%llx, prot: %llx\n", pci_name(dev), rp->start,
- prot);
-
- return __pgprot(prot);
diff --git a/pci/pci-64-bit-resources-arch-changes.patch b/pci/pci-64-bit-resources-arch-changes.patch
deleted file mode 100644
index ef989d5981257..0000000000000
--- a/pci/pci-64-bit-resources-arch-changes.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-From vivek@in.ibm.com Thu Mar 23 12:10:51 2006
-Date: Thu, 23 Mar 2006 15:10:18 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 9/10] PCI: 64 bit resources arch changes
-Message-ID: <20060323201018.GM7175@in.ibm.com>
-Content-Disposition: inline
-
-o Changes required for various arch/, for 64 bit resources.
-
-Signed-off-by: Dave Jiang <dave.jiang@gmail.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- arch/arm/kernel/bios32.c | 6 ++---
- arch/arm/kernel/setup.c | 42 +++++++++++++++++++++++++++++++++++------
- arch/i386/kernel/efi.c | 6 +++--
- arch/i386/pci/i386.c | 4 +--
- arch/ppc/kernel/pci.c | 46 ++++++++++++++++++++++++++-------------------
- arch/sparc/kernel/ioport.c | 8 ++++---
- include/asm-arm/mach/pci.h | 2 -
- 7 files changed, 78 insertions(+), 36 deletions(-)
-
---- gregkh-2.6.orig/arch/arm/kernel/bios32.c
-+++ gregkh-2.6/arch/arm/kernel/bios32.c
-@@ -304,7 +304,7 @@ static inline int pdev_bad_for_parity(st
- static void __devinit
- pdev_fixup_device_resources(struct pci_sys_data *root, struct pci_dev *dev)
- {
-- unsigned long offset;
-+ u64 offset;
- int i;
-
- for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-@@ -634,9 +634,9 @@ char * __init pcibios_setup(char *str)
- * which might be mirrored at 0x0100-0x03ff..
- */
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ u64 size, u64 align)
- {
-- unsigned long start = res->start;
-+ u64 start = res->start;
-
- if (res->flags & IORESOURCE_IO && start & 0x300)
- start = (start + 0x3ff) & ~0x3ff;
---- gregkh-2.6.orig/arch/arm/kernel/setup.c
-+++ gregkh-2.6/arch/arm/kernel/setup.c
-@@ -119,9 +119,24 @@ DEFINE_PER_CPU(struct cpuinfo_arm, cpu_d
- * Standard memory resources
- */
- static struct resource mem_res[] = {
-- { "Video RAM", 0, 0, IORESOURCE_MEM },
-- { "Kernel text", 0, 0, IORESOURCE_MEM },
-- { "Kernel data", 0, 0, IORESOURCE_MEM }
-+ {
-+ .name = "Video RAM",
-+ .start = 0,
-+ .end = 0,
-+ .flags = IORESOURCE_MEM
-+ },
-+ {
-+ .name = "Kernel text",
-+ .start = 0,
-+ .end = 0,
-+ .flags = IORESOURCE_MEM
-+ },
-+ {
-+ .name = "Kernel data",
-+ .start = 0,
-+ .end = 0,
-+ .flags = IORESOURCE_MEM
-+ }
- };
-
- #define video_ram mem_res[0]
-@@ -129,9 +144,24 @@ static struct resource mem_res[] = {
- #define kernel_data mem_res[2]
-
- static struct resource io_res[] = {
-- { "reserved", 0x3bc, 0x3be, IORESOURCE_IO | IORESOURCE_BUSY },
-- { "reserved", 0x378, 0x37f, IORESOURCE_IO | IORESOURCE_BUSY },
-- { "reserved", 0x278, 0x27f, IORESOURCE_IO | IORESOURCE_BUSY }
-+ {
-+ .name = "reserved",
-+ .start = 0x3bc,
-+ .end = 0x3be,
-+ .flags = IORESOURCE_IO | IORESOURCE_BUSY
-+ },
-+ {
-+ .name = "reserved",
-+ .start = 0x378,
-+ .end = 0x37f,
-+ .flags = IORESOURCE_IO | IORESOURCE_BUSY
-+ },
-+ {
-+ .name = "reserved",
-+ .start = 0x278,
-+ .end = 0x27f,
-+ .flags = IORESOURCE_IO | IORESOURCE_BUSY
-+ }
- };
-
- #define lp0 io_res[0]
---- gregkh-2.6.orig/arch/i386/kernel/efi.c
-+++ gregkh-2.6/arch/i386/kernel/efi.c
-@@ -601,8 +601,10 @@ efi_initialize_iomem_resources(struct re
- res->end = res->start + ((md->num_pages << EFI_PAGE_SHIFT) - 1);
- res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
- if (request_resource(&iomem_resource, res) < 0)
-- printk(KERN_ERR PFX "Failed to allocate res %s : 0x%lx-0x%lx\n",
-- res->name, res->start, res->end);
-+ printk(KERN_ERR PFX "Failed to allocate res %s : "
-+ "0x%llx-0x%llx\n", res->name,
-+ (unsigned long long)res->start,
-+ (unsigned long long)res->end);
- /*
- * We don't know which region contains kernel data so we try
- * it repeatedly and let the resource manager test it.
---- gregkh-2.6.orig/arch/i386/pci/i386.c
-+++ gregkh-2.6/arch/i386/pci/i386.c
-@@ -48,10 +48,10 @@
- */
- void
- pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ u64 size, u64 align)
- {
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ u64 start = res->start;
-
- if (start & 0x300) {
- start = (start + 0x3ff) & ~0x3ff;
---- gregkh-2.6.orig/arch/ppc/kernel/pci.c
-+++ gregkh-2.6/arch/ppc/kernel/pci.c
-@@ -95,8 +95,10 @@ pcibios_fixup_resources(struct pci_dev *
- if (!res->flags)
- continue;
- if (res->end == 0xffffffff) {
-- DBG("PCI:%s Resource %d [%08lx-%08lx] is unassigned\n",
-- pci_name(dev), i, res->start, res->end);
-+ DBG("PCI:%s Resource %d [%016llx-%016llx] is unassigned\n",
-+ pci_name(dev), i,
-+ (unsigned long long)res->start,
-+ (unsigned long long)res->end);
- res->end -= res->start;
- res->start = 0;
- res->flags |= IORESOURCE_UNSET;
-@@ -169,18 +171,18 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
- * but we want to try to avoid allocating at 0x2900-0x2bff
- * which might have be mirrored at 0x0100-0x03ff..
- */
--void pcibios_align_resource(void *data, struct resource *res, unsigned long size,
-- unsigned long align)
-+void pcibios_align_resource(void *data, struct resource *res, u64 size,
-+ u64 align)
- {
- struct pci_dev *dev = data;
-
- if (res->flags & IORESOURCE_IO) {
-- unsigned long start = res->start;
-+ u64 start = res->start;
-
- if (size > 0x100) {
- printk(KERN_ERR "PCI: I/O Region %s/%d too large"
-- " (%ld bytes)\n", pci_name(dev),
-- dev->resource - res, size);
-+ " (%lld bytes)\n", pci_name(dev),
-+ dev->resource - res, (unsigned long long)size);
- }
-
- if (start & 0x300) {
-@@ -251,8 +253,9 @@ pcibios_allocate_bus_resources(struct li
- }
- }
-
-- DBG("PCI: bridge rsrc %lx..%lx (%lx), parent %p\n",
-- res->start, res->end, res->flags, pr);
-+ DBG("PCI: bridge rsrc %llx..%llx (%lx), parent %p\n",
-+ (unsigned long long)res->start,
-+ (unsigned long long)res->end, res->flags, pr);
- if (pr) {
- if (request_resource(pr, res) == 0)
- continue;
-@@ -302,8 +305,9 @@ reparent_resources(struct resource *pare
- *pp = NULL;
- for (p = res->child; p != NULL; p = p->sibling) {
- p->parent = res;
-- DBG(KERN_INFO "PCI: reparented %s [%lx..%lx] under %s\n",
-- p->name, p->start, p->end, res->name);
-+ DBG(KERN_INFO "PCI: reparented %s [%llx..%llx] under %s\n",
-+ p->name, (unsigned long long)p->start,
-+ (unsigned long long)p->end, res->name);
- }
- return 0;
- }
-@@ -358,13 +362,15 @@ pci_relocate_bridge_resource(struct pci_
- try = conflict->start - 1;
- }
- if (request_resource(pr, res)) {
-- DBG(KERN_ERR "PCI: huh? couldn't move to %lx..%lx\n",
-- res->start, res->end);
-+ DBG(KERN_ERR "PCI: huh? couldn't move to %llx..%llx\n",
-+ (unsigned long long)res->start,
-+ (unsigned long long)res->end);
- return -1; /* "can't happen" */
- }
- update_bridge_base(bus, i);
-- printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n",
-- bus->number, i, res->start, res->end);
-+ printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
-+ bus->number, i, (unsigned long long)res->start,
-+ (unsigned long long)res->end);
- return 0;
- }
-
-@@ -475,15 +481,17 @@ static inline void alloc_resource(struct
- {
- struct resource *pr, *r = &dev->resource[idx];
-
-- DBG("PCI:%s: Resource %d: %08lx-%08lx (f=%lx)\n",
-- pci_name(dev), idx, r->start, r->end, r->flags);
-+ DBG("PCI:%s: Resource %d: %016llx-%016llx (f=%lx)\n",
-+ pci_name(dev), idx, (unsigned long long)r->start,
-+ (unsigned long long)r->end, r->flags);
- pr = pci_find_parent_resource(dev, r);
- if (!pr || request_resource(pr, r) < 0) {
- printk(KERN_ERR "PCI: Cannot allocate resource region %d"
- " of device %s\n", idx, pci_name(dev));
- if (pr)
-- DBG("PCI: parent is %p: %08lx-%08lx (f=%lx)\n",
-- pr, pr->start, pr->end, pr->flags);
-+ DBG("PCI: parent is %p: %016llx-%016llx (f=%lx)\n",
-+ pr, (unsigned long long)pr->start,
-+ (unsigned long long)pr->end, pr->flags);
- /* We'll assign a new address later */
- r->flags |= IORESOURCE_UNSET;
- r->end -= r->start;
---- gregkh-2.6.orig/arch/sparc/kernel/ioport.c
-+++ gregkh-2.6/arch/sparc/kernel/ioport.c
-@@ -206,7 +206,7 @@ _sparc_ioremap(struct resource *res, u32
- pa &= PAGE_MASK;
- sparc_mapiorange(bus, pa, res->start, res->end - res->start + 1);
-
-- return (void __iomem *) (res->start + offset);
-+ return (void __iomem *)(unsigned long)(res->start + offset);
- }
-
- /*
-@@ -279,7 +279,7 @@ void *sbus_alloc_consistent(struct sbus_
- res->name = sdev->prom_name;
- }
-
-- return (void *)res->start;
-+ return (void *)(unsigned long)res->start;
-
- err_noiommu:
- release_resource(res);
-@@ -690,7 +690,9 @@ _sparc_io_get_info(char *buf, char **sta
- if (p + 32 >= e) /* Better than nothing */
- break;
- if ((nm = r->name) == 0) nm = "???";
-- p += sprintf(p, "%08lx-%08lx: %s\n", r->start, r->end, nm);
-+ p += sprintf(p, "%016llx-%016llx: %s\n",
-+ (unsigned long long)r->start,
-+ (unsigned long long)r->end, nm);
- }
-
- return p-buf;
---- gregkh-2.6.orig/include/asm-arm/mach/pci.h
-+++ gregkh-2.6/include/asm-arm/mach/pci.h
-@@ -28,7 +28,7 @@ struct hw_pci {
- struct pci_sys_data {
- struct list_head node;
- int busnr; /* primary bus number */
-- unsigned long mem_offset; /* bus->cpu memory mapping offset */
-+ u64 mem_offset; /* bus->cpu memory mapping offset */
- unsigned long io_offset; /* bus->cpu IO mapping offset */
- struct pci_bus *bus; /* PCI bus */
- struct resource *resource[3]; /* Primary PCI bus resources */
diff --git a/pci/pci-64-bit-resources-arch-powerpc-changes-update.patch b/pci/pci-64-bit-resources-arch-powerpc-changes-update.patch
deleted file mode 100644
index 83b1b9a60ccfa..0000000000000
--- a/pci/pci-64-bit-resources-arch-powerpc-changes-update.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From akpm@osdl.org Mon May 29 15:50:49 2006
-Message-Id: <200605292250.k4TMoSCr020768@shell0.pdx.osdl.net>
-From: Mel Gorman <mel@csn.ul.ie>
-Subject: PCI: 64-bit-resources-arch-powerpc-changes update
-To: mel@csn.ul.ie, greg@kroah.com, segher@kernel.crashing.org,
- vgoyal@in.ibm.com, mm-commits@vger.kernel.org
-Date: Mon, 29 May 2006 15:54:48 -0700
-
-The 64-bit resource change ended up causing us to do a 64-bit divide and
-ppc32 won't link (missing __udivdi3).
-
-The following patch has been successfully boot tested on the same
-machine with 64 bit resource_size_t. Because the mask is assumed to be a
-power-of-two - 1, I added a comment and a BUG_ON() to be sure.
-
-Signed-off-by: Mel Gorman <mel@csn.ul.ie>
-Cc: Segher Boessenkool <segher@kernel.crashing.org>
-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/powerpc/kernel/pci_32.c | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
---- gregkh-2.6.orig/arch/powerpc/kernel/pci_32.c
-+++ gregkh-2.6/arch/powerpc/kernel/pci_32.c
-@@ -1114,8 +1114,16 @@ check_for_io_childs(struct pci_bus *bus,
- int i;
- int rc = 0;
-
--#define push_end(res, size) do { unsigned long __sz = (size) ; \
-- res->end = ((res->end + __sz) / (__sz + 1)) * (__sz + 1) + __sz; \
-+ /*
-+ * Assuming mask is a power of two - 1, push_end
-+ * moves res->end to the end of the next
-+ * mask-aligned boundary.
-+ * e.g. res->end of 0x1fff moves to 0x2fff
-+ */
-+#define push_end(res, mask) do { \
-+ BUG_ON(((mask+1) & mask) != 0); \
-+ res->end = -(-res->end & ~(unsigned long)mask); \
-+ res->end += mask; \
- } while (0)
-
- list_for_each_entry(dev, &bus->devices, bus_list) {
diff --git a/pci/pci-64-bit-resources-arch-powerpc-changes.patch b/pci/pci-64-bit-resources-arch-powerpc-changes.patch
deleted file mode 100644
index d2e1726a2de0c..0000000000000
--- a/pci/pci-64-bit-resources-arch-powerpc-changes.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From akpm@osdl.org Tue Mar 28 14:47:47 2006
-Message-Id: <200603282247.k2SMladA029564@shell0.pdx.osdl.net>
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Subject: PCI: 64 bit resources arch powerpc changes
-To: vgoyal@in.ibm.com, greg@kroah.com, mm-commits@vger.kernel.org
-Date: Tue, 28 Mar 2006 14:47:30 -0800
-
-From: Vivek Goyal <vgoyal@in.ibm.com>
-
-- powerpc cross-compilation with CONFIG_PPC=32 resulted in more warnings for
- 64bit resources. This patch fixes it.
-
-- Contains changes for arch/powerpc/* dir.
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- arch/powerpc/kernel/pci_32.c | 15 ++++++++-------
- arch/powerpc/platforms/83xx/pci.c | 5 +++--
- arch/powerpc/platforms/85xx/pci.c | 5 +++--
- arch/powerpc/platforms/chrp/pci.c | 4 ++--
- arch/powerpc/platforms/maple/pci.c | 5 +++--
- arch/powerpc/platforms/powermac/pci.c | 5 +++--
- 6 files changed, 22 insertions(+), 17 deletions(-)
-
---- gregkh-2.6.orig/arch/powerpc/kernel/pci_32.c
-+++ gregkh-2.6/arch/powerpc/kernel/pci_32.c
-@@ -173,8 +173,8 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
- * but we want to try to avoid allocating at 0x2900-0x2bff
- * which might have be mirrored at 0x0100-0x03ff..
- */
--void pcibios_align_resource(void *data, struct resource *res, unsigned long size,
-- unsigned long align)
-+void pcibios_align_resource(void *data, struct resource *res, u64 size,
-+ u64 align)
- {
- struct pci_dev *dev = data;
-
-@@ -183,7 +183,7 @@ void pcibios_align_resource(void *data,
-
- if (size > 0x100) {
- printk(KERN_ERR "PCI: I/O Region %s/%d too large"
-- " (%ld bytes)\n", pci_name(dev),
-+ " (%lld bytes)\n", pci_name(dev),
- dev->resource - res, size);
- }
-
-@@ -367,8 +367,9 @@ pci_relocate_bridge_resource(struct pci_
- return -1; /* "can't happen" */
- }
- update_bridge_base(bus, i);
-- printk(KERN_INFO "PCI: bridge %d resource %d moved to %lx..%lx\n",
-- bus->number, i, res->start, res->end);
-+ printk(KERN_INFO "PCI: bridge %d resource %d moved to %llx..%llx\n",
-+ bus->number, i, (unsigned long long)res->start,
-+ (unsigned long long)res->end);
- return 0;
- }
-
-@@ -1573,8 +1574,8 @@ static pgprot_t __pci_mmap_set_pgprot(st
- else
- prot |= _PAGE_GUARDED;
-
-- printk("PCI map for %s:%lx, prot: %lx\n", pci_name(dev), rp->start,
-- prot);
-+ printk("PCI map for %s:%llx, prot: %lx\n", pci_name(dev),
-+ (unsigned long long)rp->start, prot);
-
- return __pgprot(prot);
- }
---- gregkh-2.6.orig/arch/powerpc/platforms/83xx/pci.c
-+++ gregkh-2.6/arch/powerpc/platforms/83xx/pci.c
-@@ -91,9 +91,10 @@ int __init add_bridge(struct device_node
- mpc83xx_pci2_busno = hose->first_busno;
- }
-
-- printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%08lx. "
-+ printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. "
- "Firmware bus number: %d->%d\n",
-- rsrc.start, hose->first_busno, hose->last_busno);
-+ (unsigned long long)rsrc.start, hose->first_busno,
-+ hose->last_busno);
-
- DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
- hose, hose->cfg_addr, hose->cfg_data);
---- gregkh-2.6.orig/arch/powerpc/platforms/85xx/pci.c
-+++ gregkh-2.6/arch/powerpc/platforms/85xx/pci.c
-@@ -79,9 +79,10 @@ int __init add_bridge(struct device_node
- mpc85xx_pci2_busno = hose->first_busno;
- }
-
-- printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%08lx. "
-+ printk(KERN_INFO "Found MPC85xx PCI host bridge at 0x%016llx. "
- "Firmware bus number: %d->%d\n",
-- rsrc.start, hose->first_busno, hose->last_busno);
-+ (unsigned long long)rsrc.start, hose->first_busno,
-+ hose->last_busno);
-
- DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
- hose, hose->cfg_addr, hose->cfg_data);
---- gregkh-2.6.orig/arch/powerpc/platforms/chrp/pci.c
-+++ gregkh-2.6/arch/powerpc/platforms/chrp/pci.c
-@@ -143,7 +143,7 @@ hydra_init(void)
- if (np == NULL || of_address_to_resource(np, 0, &r))
- return 0;
- Hydra = ioremap(r.start, r.end-r.start);
-- printk("Hydra Mac I/O at %lx\n", r.start);
-+ printk("Hydra Mac I/O at %llx\n", (unsigned long long)r.start);
- printk("Hydra Feature_Control was %x",
- in_le32(&Hydra->Feature_Control));
- out_le32(&Hydra->Feature_Control, (HYDRA_FC_SCC_CELL_EN |
-@@ -267,7 +267,7 @@ chrp_find_bridges(void)
- bus_range[0], bus_range[1]);
- printk(" controlled by %s", dev->type);
- if (!is_longtrail)
-- printk(" at %lx", r.start);
-+ printk(" at %llx", (unsigned long long)r.start);
- printk("\n");
-
- hose = pcibios_alloc_controller();
---- gregkh-2.6.orig/arch/powerpc/platforms/maple/pci.c
-+++ gregkh-2.6/arch/powerpc/platforms/maple/pci.c
-@@ -376,9 +376,10 @@ static void __init maple_fixup_phb_resou
- unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
- hose->io_resource.start += offset;
- hose->io_resource.end += offset;
-- printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n",
-+ printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n",
- hose->global_number,
-- hose->io_resource.start, hose->io_resource.end);
-+ (unsigned long long)hose->io_resource.start,
-+ (unsigned long long)hose->io_resource.end);
- }
- }
-
---- gregkh-2.6.orig/arch/powerpc/platforms/powermac/pci.c
-+++ gregkh-2.6/arch/powerpc/platforms/powermac/pci.c
-@@ -939,9 +939,10 @@ static int __init add_bridge(struct devi
- disp_name = "Chaos";
- primary = 0;
- }
-- printk(KERN_INFO "Found %s PCI host bridge at 0x%08lx. "
-+ printk(KERN_INFO "Found %s PCI host bridge at 0x%016llx. "
- "Firmware bus number: %d->%d\n",
-- disp_name, rsrc.start, hose->first_busno, hose->last_busno);
-+ disp_name, (unsigned long long)rsrc.start, hose->first_busno,
-+ hose->last_busno);
- #endif /* CONFIG_PPC32 */
-
- DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n",
diff --git a/pci/pci-64-bit-resources-core-changes.patch b/pci/pci-64-bit-resources-core-changes.patch
deleted file mode 100644
index 1cf9a3c15f574..0000000000000
--- a/pci/pci-64-bit-resources-core-changes.patch
+++ /dev/null
@@ -1,222 +0,0 @@
-From vivek@in.ibm.com Thu Mar 23 12:00:14 2006
-Date: Thu, 23 Mar 2006 14:59:44 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 1/10] PCI: 64 bit resources core changes
-Message-ID: <20060323195944.GE7175@in.ibm.com>
-Content-Disposition: inline
-
-
-
-o Core changes for 64bit resources. Changes start and end field to u64
- from unsigned long.
-
-Signed-off-by: Dave Jiang <dave.jiang@gmail.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- include/linux/ioport.h | 23 ++++++++++++-----------
- kernel/resource.c | 48 +++++++++++++++++++++++++-----------------------
- 2 files changed, 37 insertions(+), 34 deletions(-)
-
---- gregkh-2.6.orig/include/linux/ioport.h
-+++ gregkh-2.6/include/linux/ioport.h
-@@ -9,13 +9,14 @@
- #define _LINUX_IOPORT_H
-
- #include <linux/compiler.h>
-+#include <linux/types.h>
- /*
- * Resources are tree-like, allowing
- * nesting etc..
- */
- struct resource {
-+ u64 start, end;
- const char *name;
-- unsigned long start, end;
- unsigned long flags;
- struct resource *parent, *sibling, *child;
- };
-@@ -96,31 +97,31 @@ extern struct resource * ____request_res
- extern int release_resource(struct resource *new);
- extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new);
- extern int allocate_resource(struct resource *root, struct resource *new,
-- unsigned long size,
-- unsigned long min, unsigned long max,
-- unsigned long align,
-+ u64 size,
-+ u64 min, u64 max,
-+ u64 align,
- void (*alignf)(void *, struct resource *,
-- unsigned long, unsigned long),
-+ u64, u64),
- void *alignf_data);
--int adjust_resource(struct resource *res, unsigned long start,
-- unsigned long size);
-+int adjust_resource(struct resource *res, u64 start,
-+ u64 size);
-
- /* Convenience shorthand with allocation */
- #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name))
- #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name))
- #define rename_region(region, newname) do { (region)->name = (newname); } while (0)
-
--extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name);
-+extern struct resource * __request_region(struct resource *, u64 start, u64 n, const char *name);
-
- /* Compatibility cruft */
- #define release_region(start,n) __release_region(&ioport_resource, (start), (n))
- #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
- #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
-
--extern int __check_region(struct resource *, unsigned long, unsigned long);
--extern void __release_region(struct resource *, unsigned long, unsigned long);
-+extern int __check_region(struct resource *, u64, u64);
-+extern void __release_region(struct resource *, u64, u64);
-
--static inline int __deprecated check_region(unsigned long s, unsigned long n)
-+static inline int __deprecated check_region(u64 s, u64 n)
- {
- return __check_region(&ioport_resource, s, n);
- }
---- gregkh-2.6.orig/kernel/resource.c
-+++ gregkh-2.6/kernel/resource.c
-@@ -23,7 +23,7 @@
-
- struct resource ioport_resource = {
- .name = "PCI IO",
-- .start = 0x0000,
-+ .start = 0x0000ULL,
- .end = IO_SPACE_LIMIT,
- .flags = IORESOURCE_IO,
- };
-@@ -32,8 +32,8 @@ EXPORT_SYMBOL(ioport_resource);
-
- struct resource iomem_resource = {
- .name = "PCI mem",
-- .start = 0UL,
-- .end = ~0UL,
-+ .start = 0ULL,
-+ .end = ~0ULL,
- .flags = IORESOURCE_MEM,
- };
-
-@@ -83,10 +83,10 @@ static int r_show(struct seq_file *m, vo
- for (depth = 0, p = r; depth < MAX_IORES_LEVEL; depth++, p = p->parent)
- if (p->parent == root)
- break;
-- seq_printf(m, "%*s%0*lx-%0*lx : %s\n",
-+ seq_printf(m, "%*s%0*llx-%0*llx : %s\n",
- depth * 2, "",
-- width, r->start,
-- width, r->end,
-+ width, (unsigned long long) r->start,
-+ width, (unsigned long long) r->end,
- r->name ? r->name : "<BAD>");
- return 0;
- }
-@@ -151,8 +151,8 @@ __initcall(ioresources_init);
- /* Return the conflict entry if you can't request it */
- static struct resource * __request_resource(struct resource *root, struct resource *new)
- {
-- unsigned long start = new->start;
-- unsigned long end = new->end;
-+ u64 start = new->start;
-+ u64 end = new->end;
- struct resource *tmp, **p;
-
- if (end < start)
-@@ -236,11 +236,11 @@ EXPORT_SYMBOL(release_resource);
- * Find empty slot in the resource tree given range and alignment.
- */
- static int find_resource(struct resource *root, struct resource *new,
-- unsigned long size,
-- unsigned long min, unsigned long max,
-- unsigned long align,
-+ u64 size,
-+ u64 min, u64 max,
-+ u64 align,
- void (*alignf)(void *, struct resource *,
-- unsigned long, unsigned long),
-+ u64, u64),
- void *alignf_data)
- {
- struct resource *this = root->child;
-@@ -282,11 +282,11 @@ static int find_resource(struct resource
- * Allocate empty slot in the resource tree given range and alignment.
- */
- int allocate_resource(struct resource *root, struct resource *new,
-- unsigned long size,
-- unsigned long min, unsigned long max,
-- unsigned long align,
-+ u64 size,
-+ u64 min, u64 max,
-+ u64 align,
- void (*alignf)(void *, struct resource *,
-- unsigned long, unsigned long),
-+ u64, u64),
- void *alignf_data)
- {
- int err;
-@@ -378,10 +378,10 @@ EXPORT_SYMBOL(insert_resource);
- * arguments. Returns -EBUSY if it can't fit. Existing children of
- * the resource are assumed to be immutable.
- */
--int adjust_resource(struct resource *res, unsigned long start, unsigned long size)
-+int adjust_resource(struct resource *res, u64 start, u64 size)
- {
- struct resource *tmp, *parent = res->parent;
-- unsigned long end = start + size - 1;
-+ u64 end = start + size - 1;
- int result = -EBUSY;
-
- write_lock(&resource_lock);
-@@ -428,7 +428,7 @@ EXPORT_SYMBOL(adjust_resource);
- *
- * Release-region releases a matching busy region.
- */
--struct resource * __request_region(struct resource *parent, unsigned long start, unsigned long n, const char *name)
-+struct resource * __request_region(struct resource *parent, u64 start, u64 n, const char *name)
- {
- struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
-
-@@ -464,7 +464,7 @@ struct resource * __request_region(struc
-
- EXPORT_SYMBOL(__request_region);
-
--int __check_region(struct resource *parent, unsigned long start, unsigned long n)
-+int __check_region(struct resource *parent, u64 start, u64 n)
- {
- struct resource * res;
-
-@@ -479,10 +479,10 @@ int __check_region(struct resource *pare
-
- EXPORT_SYMBOL(__check_region);
-
--void __release_region(struct resource *parent, unsigned long start, unsigned long n)
-+void __release_region(struct resource *parent, u64 start, u64 n)
- {
- struct resource **p;
-- unsigned long end;
-+ u64 end;
-
- p = &parent->child;
- end = start + n - 1;
-@@ -511,7 +511,9 @@ void __release_region(struct resource *p
-
- write_unlock(&resource_lock);
-
-- printk(KERN_WARNING "Trying to free nonexistent resource <%08lx-%08lx>\n", start, end);
-+ printk(KERN_WARNING "Trying to free nonexistent resource "
-+ "<%16llx-%16llx>\n", (unsigned long long)start,
-+ (unsigned long long) end);
- }
-
- EXPORT_SYMBOL(__release_region);
diff --git a/pci/pci-64-bit-resources-drivers-others-changes.patch b/pci/pci-64-bit-resources-drivers-others-changes.patch
deleted file mode 100644
index 0e6176a08e1af..0000000000000
--- a/pci/pci-64-bit-resources-drivers-others-changes.patch
+++ /dev/null
@@ -1,585 +0,0 @@
-From vivek@in.ibm.com Thu Mar 23 12:08:00 2006
-Date: Thu, 23 Mar 2006 15:07:44 -0500
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Cc: Linus Torvalds <torvalds@osdl.org>,
- Morton Andrew Morton <akpm@osdl.org>,
- "Eric W. Biederman" <ebiederm@xmission.com>,
- galak@kernel.crashing.org, gregkh@suse.de, bcrl@kvack.org,
- Dave Jiang <dave.jiang@gmail.com>, arjan@infradead.org,
- Maneesh Soni <maneesh@in.ibm.com>, Murali <muralim@in.ibm.com>
-Subject: [PATCH 7/10] PCI: 64 bit resources drivers others changes
-Message-ID: <20060323200744.GK7175@in.ibm.com>
-Content-Disposition: inline
-
-o various drivers/* changes required to support 64 bit resources. This
- excludes the changes to drivers/ide/*, drivers/media/*, drivers/net/*,
- drivers/pci/* drivers/pcmcia/*, which have been covered in separate patches
-
-Signed-off-by: Dave Jiang <dave.jiang@gmail.com>
-Signed-off-by: Maneesh Soni <maneesh@in.ibm.com>
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- drivers/amba/bus.c | 5 +++--
- drivers/atm/ambassador.c | 3 ++-
- drivers/atm/firestream.c | 5 +++--
- drivers/block/sx8.c | 5 +++--
- drivers/char/applicom.c | 9 ++++++---
- drivers/ieee1394/ohci1394.c | 17 +++++++++--------
- drivers/infiniband/hw/mthca/mthca_main.c | 5 +++--
- drivers/input/serio/ct82c710.c | 6 +++---
- drivers/isdn/hisax/hfc_pci.c | 2 +-
- drivers/isdn/hisax/telespci.c | 5 +++--
- drivers/message/i2o/iop.c | 14 ++++++++------
- drivers/mmc/mmci.c | 4 ++--
- drivers/mtd/devices/pmc551.c | 8 ++++----
- drivers/mtd/maps/amd76xrom.c | 5 +++--
- drivers/mtd/maps/ichxrom.c | 5 +++--
- drivers/mtd/maps/scx200_docflash.c | 5 +++--
- drivers/mtd/maps/sun_uflash.c | 10 ++++++----
- drivers/pnp/manager.c | 14 +++++++++-----
- drivers/pnp/resource.c | 8 ++++----
- drivers/scsi/sata_via.c | 8 ++++----
- drivers/serial/8250_pci.c | 4 ++--
- drivers/usb/host/sl811-hcd.c | 10 +++++++---
- drivers/video/console/vgacon.c | 12 ++++++------
- include/linux/pnp.h | 4 ++--
- 24 files changed, 99 insertions(+), 74 deletions(-)
-
---- gregkh-2.6.orig/drivers/amba/bus.c
-+++ gregkh-2.6/drivers/amba/bus.c
-@@ -180,8 +180,9 @@ static DEVICE_ATTR(name, S_IRUGO, show_#
- amba_attr(id, "%08x\n", dev->periphid);
- amba_attr(irq0, "%u\n", dev->irq[0]);
- amba_attr(irq1, "%u\n", dev->irq[1]);
--amba_attr(resource, "\t%08lx\t%08lx\t%08lx\n",
-- dev->res.start, dev->res.end, dev->res.flags);
-+amba_attr(resource, "\t%016llx\t%016llx\t%016llx\n",
-+ (unsigned long long)dev->res.start, (unsigned long long)dev->res.end,
-+ dev->res.flags);
-
- /**
- * amba_device_register - register an AMBA device
---- gregkh-2.6.orig/drivers/atm/ambassador.c
-+++ gregkh-2.6/drivers/atm/ambassador.c
-@@ -2257,7 +2257,8 @@ static int __devinit amb_probe(struct pc
- }
-
- PRINTD (DBG_INFO, "found Madge ATM adapter (amb) at"
-- " IO %lx, IRQ %u, MEM %p", pci_resource_start(pci_dev, 1),
-+ " IO %llx, IRQ %u, MEM %p",
-+ (unsigned long long)pci_resource_start(pci_dev, 1),
- irq, bus_to_virt(pci_resource_start(pci_dev, 0)));
-
- // check IO region
---- gregkh-2.6.orig/drivers/atm/firestream.c
-+++ gregkh-2.6/drivers/atm/firestream.c
-@@ -1657,9 +1657,10 @@ static int __devinit fs_init (struct fs_
- func_enter ();
- pci_dev = dev->pci_dev;
-
-- printk (KERN_INFO "found a FireStream %d card, base %08lx, irq%d.\n",
-+ printk (KERN_INFO "found a FireStream %d card, base %16llx, irq%d.\n",
- IS_FS50(dev)?50:155,
-- pci_resource_start(pci_dev, 0), dev->pci_dev->irq);
-+ (unsigned long long)pci_resource_start(pci_dev, 0),
-+ dev->pci_dev->irq);
-
- if (fs_debug & FS_DEBUG_INIT)
- my_hd ((unsigned char *) dev, sizeof (*dev));
---- gregkh-2.6.orig/drivers/block/sx8.c
-+++ gregkh-2.6/drivers/block/sx8.c
-@@ -1694,9 +1694,10 @@ static int carm_init_one (struct pci_dev
- DPRINTK("waiting for probe_comp\n");
- wait_for_completion(&host->probe_comp);
-
-- printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n",
-+ printk(KERN_INFO "%s: pci %s, ports %d, io %llx, irq %u, major %d\n",
- host->name, pci_name(pdev), (int) CARM_MAX_PORTS,
-- pci_resource_start(pdev, 0), pdev->irq, host->major);
-+ (unsigned long long)pci_resource_start(pdev, 0),
-+ pdev->irq, host->major);
-
- carm_host_id++;
- pci_set_drvdata(pdev, host);
---- gregkh-2.6.orig/drivers/char/applicom.c
-+++ gregkh-2.6/drivers/char/applicom.c
-@@ -215,13 +215,16 @@ int __init applicom_init(void)
- RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO);
-
- if (!RamIO) {
-- printk(KERN_INFO "ac.o: Failed to ioremap PCI memory space at 0x%lx\n", dev->resource[0].start);
-+ printk(KERN_INFO "ac.o: Failed to ioremap PCI memory "
-+ "space at 0x%llx\n",
-+ (unsigned long long)dev->resource[0].start);
- pci_disable_device(dev);
- return -EIO;
- }
-
-- printk(KERN_INFO "Applicom %s found at mem 0x%lx, irq %d\n",
-- applicom_pci_devnames[dev->device-1], dev->resource[0].start,
-+ printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n",
-+ applicom_pci_devnames[dev->device-1],
-+ (unsigned long long)dev->resource[0].start,
- dev->irq);
-
- boardno = ac_register_board(dev->resource[0].start, RamIO,0);
---- gregkh-2.6.orig/drivers/ieee1394/ohci1394.c
-+++ gregkh-2.6/drivers/ieee1394/ohci1394.c
-@@ -592,11 +592,11 @@ static void ohci_initialize(struct ti_oh
- sprintf (irq_buf, "%s", __irq_itoa(ohci->dev->irq));
- #endif
- PRINT(KERN_INFO, "OHCI-1394 %d.%d (PCI): IRQ=[%s] "
-- "MMIO=[%lx-%lx] Max Packet=[%d] IR/IT contexts=[%d/%d]",
-+ "MMIO=[%llx-%llx] Max Packet=[%d] IR/IT contexts=[%d/%d]",
- ((((buf) >> 16) & 0xf) + (((buf) >> 20) & 0xf) * 10),
- ((((buf) >> 4) & 0xf) + ((buf) & 0xf) * 10), irq_buf,
-- pci_resource_start(ohci->dev, 0),
-- pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
-+ (unsigned long long)pci_resource_start(ohci->dev, 0),
-+ (unsigned long long)pci_resource_start(ohci->dev, 0) + OHCI1394_REGISTER_SIZE - 1,
- ohci->max_packet_size,
- ohci->nb_iso_rcv_ctx, ohci->nb_iso_xmit_ctx);
-
-@@ -3210,7 +3210,7 @@ static int __devinit ohci1394_pci_probe(
- {
- struct hpsb_host *host;
- struct ti_ohci *ohci; /* shortcut to currently handled device */
-- unsigned long ohci_base;
-+ u64 ohci_base;
-
- if (pci_enable_device(dev))
- FAIL(-ENXIO, "Failed to enable OHCI hardware");
-@@ -3263,15 +3263,16 @@ static int __devinit ohci1394_pci_probe(
- * clearly says it's 2kb, so this shouldn't be a problem. */
- ohci_base = pci_resource_start(dev, 0);
- if (pci_resource_len(dev, 0) < OHCI1394_REGISTER_SIZE)
-- PRINT(KERN_WARNING, "PCI resource length of %lx too small!",
-- pci_resource_len(dev, 0));
-+ PRINT(KERN_WARNING, "PCI resource length of 0x%llx too small!",
-+ (unsigned long long)pci_resource_len(dev, 0));
-
- /* Seems PCMCIA handles this internally. Not sure why. Seems
- * pretty bogus to force a driver to special case this. */
- #ifndef PCMCIA
- if (!request_mem_region (ohci_base, OHCI1394_REGISTER_SIZE, OHCI1394_DRIVER_NAME))
-- FAIL(-ENOMEM, "MMIO resource (0x%lx - 0x%lx) unavailable",
-- ohci_base, ohci_base + OHCI1394_REGISTER_SIZE);
-+ FAIL(-ENOMEM, "MMIO resource (0x%llx - 0x%llx) unavailable",
-+ (unsigned long long)ohci_base,
-+ (unsigned long long)ohci_base + OHCI1394_REGISTER_SIZE);
- #endif
- ohci->init_state = OHCI_INIT_HAVE_MEM_REGION;
-
---- gregkh-2.6.orig/drivers/infiniband/hw/mthca/mthca_main.c
-+++ gregkh-2.6/drivers/infiniband/hw/mthca/mthca_main.c
-@@ -172,8 +172,9 @@ static int __devinit mthca_dev_lim(struc
-
- if (dev_lim->uar_size > pci_resource_len(mdev->pdev, 2)) {
- mthca_err(mdev, "HCA reported UAR size of 0x%x bigger than "
-- "PCI resource 2 size of 0x%lx, aborting.\n",
-- dev_lim->uar_size, pci_resource_len(mdev->pdev, 2));
-+ "PCI resource 2 size of 0x%llx, aborting.\n",
-+ dev_lim->uar_size,
-+ (unsigned long long)pci_resource_len(mdev->pdev, 2));
- return -ENODEV;
- }
-
---- gregkh-2.6.orig/drivers/input/serio/ct82c710.c
-+++ gregkh-2.6/drivers/input/serio/ct82c710.c
-@@ -189,7 +189,7 @@ static int __devinit ct82c710_probe(stru
- strlcpy(ct82c710_port->name, "C&T 82c710 mouse port",
- sizeof(ct82c710_port->name));
- snprintf(ct82c710_port->phys, sizeof(ct82c710_port->phys),
-- "isa%04lx/serio0", CT82C710_DATA);
-+ "isa%16llx/serio0", (unsigned long long)CT82C710_DATA);
-
- serio_register_port(ct82c710_port);
-
-@@ -241,8 +241,8 @@ static int __init ct82c710_init(void)
-
- serio_register_port(ct82c710_port);
-
-- printk(KERN_INFO "serio: C&T 82c710 mouse port at %#lx irq %d\n",
-- CT82C710_DATA, CT82C710_IRQ);
-+ printk(KERN_INFO "serio: C&T 82c710 mouse port at %#llx irq %d\n",
-+ (unsigned long long)CT82C710_DATA, CT82C710_IRQ);
-
- return 0;
-
---- gregkh-2.6.orig/drivers/isdn/hisax/hfc_pci.c
-+++ gregkh-2.6/drivers/isdn/hisax/hfc_pci.c
-@@ -1688,7 +1688,7 @@ setup_hfcpci(struct IsdnCard *card)
- printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n");
- return (0);
- }
-- cs->hw.hfcpci.pci_io = (char *) dev_hfcpci->resource[ 1].start;
-+ cs->hw.hfcpci.pci_io = (char *)(unsigned long)dev_hfcpci->resource[1].start;
- printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
- } else {
- printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
---- gregkh-2.6.orig/drivers/isdn/hisax/telespci.c
-+++ gregkh-2.6/drivers/isdn/hisax/telespci.c
-@@ -311,8 +311,9 @@ setup_telespci(struct IsdnCard *card)
- }
- cs->hw.teles0.membase = ioremap(pci_resource_start(dev_tel, 0),
- PAGE_SIZE);
-- printk(KERN_INFO "Found: Zoran, base-address: 0x%lx, irq: 0x%x\n",
-- pci_resource_start(dev_tel, 0), dev_tel->irq);
-+ printk(KERN_INFO "Found: Zoran, base-address: 0x%llx, irq: 0x%x\n",
-+ (unsigned long long)pci_resource_start(dev_tel, 0),
-+ dev_tel->irq);
- } else {
- printk(KERN_WARNING "TelesPCI: No PCI card found\n");
- return(0);
---- gregkh-2.6.orig/drivers/message/i2o/iop.c
-+++ gregkh-2.6/drivers/message/i2o/iop.c
-@@ -683,9 +683,10 @@ static int i2o_iop_systab_set(struct i2o
- c->mem_alloc = 1;
- sb->current_mem_size = 1 + res->end - res->start;
- sb->current_mem_base = res->start;
-- osm_info("%s: allocated %ld bytes of PCI memory at "
-- "0x%08lX.\n", c->name,
-- 1 + res->end - res->start, res->start);
-+ osm_info("%s: allocated %llu bytes of PCI memory at "
-+ "0x%016llX.\n", c->name,
-+ (unsigned long long)(1 + res->end - res->start),
-+ (unsigned long long)res->start);
- }
- }
-
-@@ -704,9 +705,10 @@ static int i2o_iop_systab_set(struct i2o
- c->io_alloc = 1;
- sb->current_io_size = 1 + res->end - res->start;
- sb->current_mem_base = res->start;
-- osm_info("%s: allocated %ld bytes of PCI I/O at 0x%08lX"
-- ".\n", c->name, 1 + res->end - res->start,
-- res->start);
-+ osm_info("%s: allocated %llu bytes of PCI I/O at "
-+ "0x%016llX.\n", c->name,
-+ (unsigned long long)(1 + res->end - res->start),
-+ (unsigned long long)res->start);
- }
- }
-
---- gregkh-2.6.orig/drivers/mmc/mmci.c
-+++ gregkh-2.6/drivers/mmc/mmci.c
-@@ -546,9 +546,9 @@ static int mmci_probe(struct amba_device
-
- mmc_add_host(mmc);
-
-- printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%08lx irq %d,%d\n",
-+ printk(KERN_INFO "%s: MMCI rev %x cfg %02x at 0x%016llx irq %d,%d\n",
- mmc_hostname(mmc), amba_rev(dev), amba_config(dev),
-- dev->res.start, dev->irq[0], dev->irq[1]);
-+ (unsigned long long)dev->res.start, dev->irq[0], dev->irq[1]);
-
- init_timer(&host->timer);
- host->timer.data = (unsigned long)host;
---- gregkh-2.6.orig/drivers/mtd/devices/pmc551.c
-+++ gregkh-2.6/drivers/mtd/devices/pmc551.c
-@@ -551,11 +551,11 @@ static u32 fixup_pmc551 (struct pci_dev
- /*
- * Some screen fun
- */
-- printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at 0x%lx\n",
-+ printk(KERN_DEBUG "pmc551: %d%c (0x%x) of %sprefetchable memory at 0x%llx\n",
- (size<1024)?size:(size<1048576)?size>>10:size>>20,
- (size<1024)?'B':(size<1048576)?'K':'M',
- size, ((dcmd&(0x1<<3)) == 0)?"non-":"",
-- (dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK );
-+ (unsigned long long)((dev->resource[0].start)&PCI_BASE_ADDRESS_MEM_MASK));
-
- /*
- * Check to see the state of the memory
-@@ -685,8 +685,8 @@ static int __init init_pmc551(void)
- break;
- }
-
-- printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%lX\n",
-- PCI_Device->resource[0].start);
-+ printk(KERN_NOTICE "pmc551: Found PCI V370PDC at 0x%llx\n",
-+ (unsigned long long)PCI_Device->resource[0].start);
-
- /*
- * The PMC551 device acts VERY weird if you don't init it
---- gregkh-2.6.orig/drivers/mtd/maps/amd76xrom.c
-+++ gregkh-2.6/drivers/mtd/maps/amd76xrom.c
-@@ -123,9 +123,10 @@ static int __devinit amd76xrom_init_one
- window->rsrc.parent = NULL;
- printk(KERN_ERR MOD_NAME
- " %s(): Unable to register resource"
-- " 0x%.08lx-0x%.08lx - kernel bug?\n",
-+ " 0x%.16llx-0x%.16llx - kernel bug?\n",
- __func__,
-- window->rsrc.start, window->rsrc.end);
-+ (unsigned long long)window->rsrc.start,
-+ (unsigned long long)window->rsrc.end);
- }
-
- #if 0
---- gregkh-2.6.orig/drivers/mtd/maps/ichxrom.c
-+++ gregkh-2.6/drivers/mtd/maps/ichxrom.c
-@@ -177,9 +177,10 @@ static int __devinit ichxrom_init_one (s
- window->rsrc.parent = NULL;
- printk(KERN_DEBUG MOD_NAME
- ": %s(): Unable to register resource"
-- " 0x%.08lx-0x%.08lx - kernel bug?\n",
-+ " 0x%.16llx-0x%.16llx - kernel bug?\n",
- __func__,
-- window->rsrc.start, window->rsrc.end);
-+ (unsigned long long)window->rsrc.start,
-+ (unsigned long long)window->rsrc.end);
- }
-
- /* Map the firmware hub into my address space. */
---- gregkh-2.6.orig/drivers/mtd/maps/scx200_docflash.c
-+++ gregkh-2.6/drivers/mtd/maps/scx200_docflash.c
-@@ -164,8 +164,9 @@ static int __init init_scx200_docflash(v
- outl(pmr, scx200_cb_base + SCx200_PMR);
- }
-
-- printk(KERN_INFO NAME ": DOCCS mapped at 0x%lx-0x%lx, width %d\n",
-- docmem.start, docmem.end, width);
-+ printk(KERN_INFO NAME ": DOCCS mapped at 0x%llx-0x%llx, width %d\n",
-+ (unsigned long long)docmem.start,
-+ (unsigned long long)docmem.end, width);
-
- scx200_docflash_map.size = size;
- if (width == 8)
---- gregkh-2.6.orig/drivers/mtd/maps/sun_uflash.c
-+++ gregkh-2.6/drivers/mtd/maps/sun_uflash.c
-@@ -74,9 +74,10 @@ int uflash_devinit(struct linux_ebus_dev
- /* Non-CFI userflash device-- once I find one we
- * can work on supporting it.
- */
-- printk("%s: unsupported device at 0x%lx (%d regs): " \
-+ printk("%s: unsupported device at 0x%llx (%d regs): " \
- "email ebrower@usa.net\n",
-- UFLASH_DEVNAME, edev->resource[0].start, nregs);
-+ UFLASH_DEVNAME,
-+ (unsigned long long)edev->resource[0].start, nregs);
- return -ENODEV;
- }
-
-@@ -132,8 +133,9 @@ static int __init uflash_init(void)
- for_each_ebusdev(edev, ebus) {
- if (!strcmp(edev->prom_name, UFLASH_OBPNAME)) {
- if(0 > prom_getproplen(edev->prom_node, "user")) {
-- DEBUG(2, "%s: ignoring device at 0x%lx\n",
-- UFLASH_DEVNAME, edev->resource[0].start);
-+ DEBUG(2, "%s: ignoring device at 0x%llx\n",
-+ UFLASH_DEVNAME,
-+ (unsigned long long)edev->resource[0].start);
- } else {
- uflash_devinit(edev);
- }
---- gregkh-2.6.orig/drivers/pnp/manager.c
-+++ gregkh-2.6/drivers/pnp/manager.c
-@@ -20,7 +20,8 @@ DECLARE_MUTEX(pnp_res_mutex);
-
- static int pnp_assign_port(struct pnp_dev *dev, struct pnp_port *rule, int idx)
- {
-- unsigned long *start, *end, *flags;
-+ u64 *start, *end;
-+ unsigned long *flags;
-
- if (!dev || !rule)
- return -EINVAL;
-@@ -63,7 +64,8 @@ static int pnp_assign_port(struct pnp_de
-
- static int pnp_assign_mem(struct pnp_dev *dev, struct pnp_mem *rule, int idx)
- {
-- unsigned long *start, *end, *flags;
-+ u64 *start, *end;
-+ unsigned long *flags;
-
- if (!dev || !rule)
- return -EINVAL;
-@@ -116,7 +118,8 @@ static int pnp_assign_mem(struct pnp_dev
-
- static int pnp_assign_irq(struct pnp_dev * dev, struct pnp_irq *rule, int idx)
- {
-- unsigned long *start, *end, *flags;
-+ u64 *start, *end;
-+ unsigned long *flags;
- int i;
-
- /* IRQ priority: this table is good for i386 */
-@@ -168,7 +171,8 @@ static int pnp_assign_irq(struct pnp_dev
-
- static int pnp_assign_dma(struct pnp_dev *dev, struct pnp_dma *rule, int idx)
- {
-- unsigned long *start, *end, *flags;
-+ u64 *start, *end;
-+ unsigned long *flags;
- int i;
-
- /* DMA priority: this table is good for i386 */
-@@ -582,7 +586,7 @@ int pnp_disable_dev(struct pnp_dev *dev)
- * @size: size of region
- *
- */
--void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size)
-+void pnp_resource_change(struct resource *resource, u64 start, u64 size)
- {
- if (resource == NULL)
- return;
---- gregkh-2.6.orig/drivers/pnp/resource.c
-+++ gregkh-2.6/drivers/pnp/resource.c
-@@ -241,7 +241,7 @@ int pnp_check_port(struct pnp_dev * dev,
- {
- int tmp;
- struct pnp_dev *tdev;
-- unsigned long *port, *end, *tport, *tend;
-+ u64 *port, *end, *tport, *tend;
- port = &dev->res.port_resource[idx].start;
- end = &dev->res.port_resource[idx].end;
-
-@@ -297,7 +297,7 @@ int pnp_check_mem(struct pnp_dev * dev,
- {
- int tmp;
- struct pnp_dev *tdev;
-- unsigned long *addr, *end, *taddr, *tend;
-+ u64 *addr, *end, *taddr, *tend;
- addr = &dev->res.mem_resource[idx].start;
- end = &dev->res.mem_resource[idx].end;
-
-@@ -358,7 +358,7 @@ int pnp_check_irq(struct pnp_dev * dev,
- {
- int tmp;
- struct pnp_dev *tdev;
-- unsigned long * irq = &dev->res.irq_resource[idx].start;
-+ u64 * irq = &dev->res.irq_resource[idx].start;
-
- /* if the resource doesn't exist, don't complain about it */
- if (cannot_compare(dev->res.irq_resource[idx].flags))
-@@ -423,7 +423,7 @@ int pnp_check_dma(struct pnp_dev * dev,
- #ifndef CONFIG_IA64
- int tmp;
- struct pnp_dev *tdev;
-- unsigned long * dma = &dev->res.dma_resource[idx].start;
-+ u64 * dma = &dev->res.dma_resource[idx].start;
-
- /* if the resource doesn't exist, don't complain about it */
- if (cannot_compare(dev->res.dma_resource[idx].flags))
---- gregkh-2.6.orig/drivers/scsi/sata_via.c
-+++ gregkh-2.6/drivers/scsi/sata_via.c
-@@ -333,10 +333,10 @@ static int svia_init_one (struct pci_dev
- if ((pci_resource_start(pdev, i) == 0) ||
- (pci_resource_len(pdev, i) < bar_sizes[i])) {
- dev_printk(KERN_ERR, &pdev->dev,
-- "invalid PCI BAR %u (sz 0x%lx, val 0x%lx)\n",
-- i,
-- pci_resource_start(pdev, i),
-- pci_resource_len(pdev, i));
-+ "invalid PCI BAR %u (sz 0x%llx, val 0x%llx)\n",
-+ i,
-+ (unsigned long long)pci_resource_start(pdev, i),
-+ (unsigned long long)pci_resource_len(pdev, i));
- rc = -ENODEV;
- goto err_out_regions;
- }
---- gregkh-2.6.orig/drivers/serial/8250_pci.c
-+++ gregkh-2.6/drivers/serial/8250_pci.c
-@@ -594,8 +594,8 @@ pci_default_setup(struct serial_private
- else
- offset += idx * board->uart_offset;
-
-- maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) /
-- (8 << board->reg_shift);
-+ maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
-+ (board->reg_shift + 3);
-
- if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
- return 1;
---- gregkh-2.6.orig/drivers/usb/host/sl811-hcd.c
-+++ gregkh-2.6/drivers/usb/host/sl811-hcd.c
-@@ -1684,9 +1684,13 @@ sl811h_probe(struct platform_device *dev
- if (!addr || !data)
- return -ENODEV;
- ioaddr = 1;
--
-- addr_reg = (void __iomem *) addr->start;
-- data_reg = (void __iomem *) data->start;
-+ /*
-+ * NOTE: 64-bit resource->start is getting truncated
-+ * to avoid compiler warning, assuming that ->start
-+ * is always 32-bit for this case
-+ */
-+ addr_reg = (void __iomem *) (unsigned long) addr->start;
-+ data_reg = (void __iomem *) (unsigned long) data->start;
- } else {
- addr_reg = ioremap(addr->start, 1);
- if (addr_reg == NULL) {
---- gregkh-2.6.orig/drivers/video/console/vgacon.c
-+++ gregkh-2.6/drivers/video/console/vgacon.c
-@@ -389,7 +389,7 @@ static const char __init *vgacon_startup
- vga_video_port_val = VGA_CRT_DM;
- if ((ORIG_VIDEO_EGA_BX & 0xff) != 0x10) {
- static struct resource ega_console_resource =
-- { "ega", 0x3B0, 0x3BF };
-+ { .name = "ega", .start = 0x3B0, .end = 0x3BF };
- vga_video_type = VIDEO_TYPE_EGAM;
- vga_vram_end = 0xb8000;
- display_desc = "EGA+";
-@@ -397,9 +397,9 @@ static const char __init *vgacon_startup
- &ega_console_resource);
- } else {
- static struct resource mda1_console_resource =
-- { "mda", 0x3B0, 0x3BB };
-+ { .name = "mda", .start = 0x3B0, .end = 0x3BB };
- static struct resource mda2_console_resource =
-- { "mda", 0x3BF, 0x3BF };
-+ { .name = "mda", .start = 0x3BF, .end = 0x3BF };
- vga_video_type = VIDEO_TYPE_MDA;
- vga_vram_end = 0xb2000;
- display_desc = "*MDA";
-@@ -422,14 +422,14 @@ static const char __init *vgacon_startup
-
- if (!ORIG_VIDEO_ISVGA) {
- static struct resource ega_console_resource
-- = { "ega", 0x3C0, 0x3DF };
-+ = { .name = "ega", .start = 0x3C0, .end = 0x3DF };
- vga_video_type = VIDEO_TYPE_EGAC;
- display_desc = "EGA";
- request_resource(&ioport_resource,
- &ega_console_resource);
- } else {
- static struct resource vga_console_resource
-- = { "vga+", 0x3C0, 0x3DF };
-+ = { .name = "vga+", .start = 0x3C0, .end = 0x3DF };
- vga_video_type = VIDEO_TYPE_VGAC;
- display_desc = "VGA+";
- request_resource(&ioport_resource,
-@@ -473,7 +473,7 @@ static const char __init *vgacon_startup
- }
- } else {
- static struct resource cga_console_resource =
-- { "cga", 0x3D4, 0x3D5 };
-+ { .name = "cga", .start = 0x3D4, .end = 0x3D5 };
- vga_video_type = VIDEO_TYPE_CGA;
- vga_vram_end = 0xba000;
- display_desc = "*CGA";
---- gregkh-2.6.orig/include/linux/pnp.h
-+++ gregkh-2.6/include/linux/pnp.h
-@@ -389,7 +389,7 @@ int pnp_start_dev(struct pnp_dev *dev);
- int pnp_stop_dev(struct pnp_dev *dev);
- int pnp_activate_dev(struct pnp_dev *dev);
- int pnp_disable_dev(struct pnp_dev *dev);
--void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size);
-+void pnp_resource_change(struct resource *resource, u64 start, u64 size);
-
- /* protocol helpers */
- int pnp_is_active(struct pnp_dev * dev);
-@@ -434,7 +434,7 @@ static inline int pnp_start_dev(struct p
- static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; }
- static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; }
- static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; }
--static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { }
-+static inline void pnp_resource_change(struct resource *resource, u64 start, u64 size) { }
-
- /* protocol helpers */
- static inline int pnp_is_active(struct pnp_dev * dev) { return 0; }
diff --git a/pci/pci-64-bit-resources-drivers-pci-changes-sparc32-fix.patch b/pci/pci-64-bit-resources-drivers-pci-changes-sparc32-fix.patch
deleted file mode 100644
index a8a182590dc23..0000000000000
--- a/pci/pci-64-bit-resources-drivers-pci-changes-sparc32-fix.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From akpm@osdl.org Tue Apr 4 00:19:26 2006
-Message-Id: <200604040718.k347IxMq018140@shell0.pdx.osdl.net>
-From: Andrew Morton <akpm@osdl.org>
-Subject: PCI: 64 bit resources drivers pci changes sparc32 fix
-To: akpm@osdl.org, greg@kroah.com, vgoyal@in.ibm.com, mm-commits@vger.kernel.org
-Date: Tue, 04 Apr 2006 00:18:09 -0700
-
-
-From: Andrew Morton <akpm@osdl.org>
-
-arch/sparc/kernel/pcic.c:863: error: conflicting types for `pcibios_align_resource'
-include/linux/pci.h:407: error: previous declaration of `pcibios_align_resource'
-
-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/sparc/kernel/pcic.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- gregkh-2.6.orig/arch/sparc/kernel/pcic.c
-+++ gregkh-2.6/arch/sparc/kernel/pcic.c
-@@ -859,7 +859,7 @@ char * __init pcibios_setup(char *str)
- }
-
- void pcibios_align_resource(void *data, struct resource *res,
-- unsigned long size, unsigned long align)
-+ u64 size, u64 align)
- {
- }
-
diff --git a/pci/pci-64-bit-resources-fix-pnp-sysfs-interface.patch b/pci/pci-64-bit-resources-fix-pnp-sysfs-interface.patch
deleted file mode 100644
index 42f6c51ea8321..0000000000000
--- a/pci/pci-64-bit-resources-fix-pnp-sysfs-interface.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From linux-kernel-owner+greg=40kroah.com-S965040AbWD0Psg@vger.kernel.org Thu Apr 27 10:05:09 2006
-From: Matthieu CASTET <castet.matthieu@free.fr>
-Subject: PCI: 64 bit resources: fix pnp sysfs interface
-Date: Thu, 27 Apr 2006 17:47:25 +0200
-Message-ID: <pan.2006.04.27.15.47.20.688183@free.fr>
-
-Hi Andrew,
-
-Le Thu, 27 Apr 2006 01:41:41 -0700, Andrew Morton a =E9crit=A0:
-
-> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.17-rc2/2.6.17-rc2-mm1/
-
-64 bit resources core changes in ioport.h break pnp sysfs interface.
-
-A patch like this is needed.
-
-Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
-Cc: Adam Belay <ambx1@neo.rr.com>
-Cc: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- drivers/pnp/interface.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- gregkh-2.6.orig/drivers/pnp/interface.c
-+++ gregkh-2.6/drivers/pnp/interface.c
-@@ -264,7 +264,7 @@ static ssize_t pnp_show_current_resource
- if (pnp_port_flags(dev, i) & IORESOURCE_DISABLED)
- pnp_printf(buffer," disabled\n");
- else
-- pnp_printf(buffer," 0x%lx-0x%lx\n",
-+ pnp_printf(buffer," 0x%llx-0x%llx\n",
- pnp_port_start(dev, i),
- pnp_port_end(dev, i));
- }
-@@ -275,7 +275,7 @@ static ssize_t pnp_show_current_resource
- if (pnp_mem_flags(dev, i) & IORESOURCE_DISABLED)
- pnp_printf(buffer," disabled\n");
- else
-- pnp_printf(buffer," 0x%lx-0x%lx\n",
-+ pnp_printf(buffer," 0x%llx-0x%llx\n",
- pnp_mem_start(dev, i),
- pnp_mem_end(dev, i));
- }
-@@ -286,7 +286,7 @@ static ssize_t pnp_show_current_resource
- if (pnp_irq_flags(dev, i) & IORESOURCE_DISABLED)
- pnp_printf(buffer," disabled\n");
- else
-- pnp_printf(buffer," %ld\n",
-+ pnp_printf(buffer," %lld\n",
- pnp_irq(dev, i));
- }
- }
-@@ -296,7 +296,7 @@ static ssize_t pnp_show_current_resource
- if (pnp_dma_flags(dev, i) & IORESOURCE_DISABLED)
- pnp_printf(buffer," disabled\n");
- else
-- pnp_printf(buffer," %ld\n",
-+ pnp_printf(buffer," %lld\n",
- pnp_dma(dev, i));
- }
- }
diff --git a/pci/pci-64-bit-resources-more-drivers-others-changes.patch b/pci/pci-64-bit-resources-more-drivers-others-changes.patch
deleted file mode 100644
index 50e785d4fd1a5..0000000000000
--- a/pci/pci-64-bit-resources-more-drivers-others-changes.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From akpm@osdl.org Tue Mar 28 14:47:47 2006
-Message-Id: <200603282247.k2SMlcVG029567@shell0.pdx.osdl.net>
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Subject: PCI: 64 bit resources more drivers others changes
-To: vgoyal@in.ibm.com, greg@kroah.com, mm-commits@vger.kernel.org
-Date: Tue, 28 Mar 2006 14:47:32 -0800
-
-From: Vivek Goyal <vgoyal@in.ibm.com>
-
-- Changes required to fix compilation warnings for drivers/* dir for 64bit
- resources. These changes came up due to cross-compilation on powerpc with
- CONFIG_PPC=32
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
-
----
- drivers/macintosh/macio_asic.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- gregkh-2.6.orig/drivers/macintosh/macio_asic.c
-+++ gregkh-2.6/drivers/macintosh/macio_asic.c
-@@ -428,10 +428,10 @@ static struct macio_dev * macio_add_one_
-
- /* MacIO itself has a different reg, we use it's PCI base */
- if (np == chip->of_node) {
-- sprintf(dev->ofdev.dev.bus_id, "%1d.%08lx:%.*s",
-+ sprintf(dev->ofdev.dev.bus_id, "%1d.%016llx:%.*s",
- chip->lbus.index,
- #ifdef CONFIG_PCI
-- pci_resource_start(chip->lbus.pdev, 0),
-+ (unsigned long long)pci_resource_start(chip->lbus.pdev, 0),
- #else
- 0, /* NuBus may want to do something better here */
- #endif
diff --git a/pci/pci-64-bit-resources-more-sound-changes.patch b/pci/pci-64-bit-resources-more-sound-changes.patch
deleted file mode 100644
index 3afdb0604fe7f..0000000000000
--- a/pci/pci-64-bit-resources-more-sound-changes.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From akpm@osdl.org Tue Mar 28 14:47:55 2006
-Message-Id: <200603282247.k2SMleVc029572@shell0.pdx.osdl.net>
-From: Vivek Goyal <vgoyal@in.ibm.com>
-Subject: PCI: 64 bit resources more sound changes
-To: vgoyal@in.ibm.com, greg@kroah.com, mm-commits@vger.kernel.org
-Date: Tue, 28 Mar 2006 14:47:34 -0800
-
-From: Vivek Goyal <vgoyal@in.ibm.com>
-
-- Changes required to fix compilation warnings for sound/* dir for 64bit
- resources. These changes came up due to cross-compilation on powerpc with
- CONFIG_PPC32=y
-
-Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- sound/ppc/pmac.c | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
---- gregkh-2.6.orig/sound/ppc/pmac.c
-+++ gregkh-2.6/sound/ppc/pmac.c
-@@ -1198,9 +1198,10 @@ int __init snd_pmac_new(struct snd_card
- chip->rsrc[i].start + 1,
- rnames[i]) == NULL) {
- printk(KERN_ERR "snd: can't request rsrc "
-- " %d (%s: 0x%08lx:%08lx)\n",
-- i, rnames[i], chip->rsrc[i].start,
-- chip->rsrc[i].end);
-+ " %d (%s: 0x%016llx:%016llx)\n",
-+ i, rnames[i],
-+ (unsigned long long)chip->rsrc[i].start,
-+ (unsigned long long)chip->rsrc[i].end);
- err = -ENODEV;
- goto __error;
- }
-@@ -1229,9 +1230,10 @@ int __init snd_pmac_new(struct snd_card
- chip->rsrc[i].start + 1,
- rnames[i]) == NULL) {
- printk(KERN_ERR "snd: can't request rsrc "
-- " %d (%s: 0x%08lx:%08lx)\n",
-- i, rnames[i], chip->rsrc[i].start,
-- chip->rsrc[i].end);
-+ " %d (%s: 0x%016llx:%016llx)\n",
-+ i, rnames[i],
-+ (unsigned long long)chip->rsrc[i].start,
-+ (unsigned long long)chip->rsrc[i].end);
- err = -ENODEV;
- goto __error;
- }
diff --git a/pci/pci-legacy-i-o-port-free-driver-changes-to-generic-pci-code.patch b/pci/pci-legacy-i-o-port-free-driver-changes-to-generic-pci-code.patch
index 77f237e23e5f6..047f40039b9d2 100644
--- a/pci/pci-legacy-i-o-port-free-driver-changes-to-generic-pci-code.patch
+++ b/pci/pci-legacy-i-o-port-free-driver-changes-to-generic-pci-code.patch
@@ -106,7 +106,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
if (pci_resource_flags(pdev, bar) & IORESOURCE_IO) {
if (!request_region(pci_resource_start(pdev, bar),
pci_resource_len(pdev, bar), res_name))
-@@ -703,7 +716,8 @@ void pci_release_regions(struct pci_dev
+@@ -705,7 +718,8 @@ void pci_release_regions(struct pci_dev
int i;
for (i = 0; i < 6; i++)
@@ -116,7 +116,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
}
/**
-@@ -724,13 +738,15 @@ int pci_request_regions(struct pci_dev *
+@@ -726,13 +740,15 @@ int pci_request_regions(struct pci_dev *
int i;
for (i = 0; i < 6; i++)
@@ -135,7 +135,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
return -EBUSY;
}
-@@ -905,6 +921,22 @@ pci_set_consistent_dma_mask(struct pci_d
+@@ -907,6 +923,22 @@ pci_set_consistent_dma_mask(struct pci_d
}
#endif
@@ -158,7 +158,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
static int __devinit pci_init(void)
{
struct pci_dev *dev = NULL;
-@@ -962,6 +994,7 @@ EXPORT_SYMBOL(pci_set_dma_mask);
+@@ -964,6 +996,7 @@ EXPORT_SYMBOL(pci_set_dma_mask);
EXPORT_SYMBOL(pci_set_consistent_dma_mask);
EXPORT_SYMBOL(pci_assign_resource);
EXPORT_SYMBOL(pci_find_parent_resource);