64bit resource patches for 2.6.17
Subsystems (37)
PATCH 1/1 64bit resource patches for 2.6.17
Here is a set of patches for 2.6.17 that move the resource size to be 64bits. This patch series has gone though many different iterations, by many different people, and been tested heavily in the -mm tree for quite some time (so Andrew says it's finally time to send it to you.)
The main reason someone finally implemented it was to fix some issues with kexec and kdump on 32bit machines with large amounts of memory. That fix is the last one in this series and only came to 2 lines of code.
The majority of the changes in this series is fixing up the odd places where people were printing the resource start and end values to the kernel log. If it weren't for noisy drivers, this series would be much smaller :)
Please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/ or if master.kernel.org hasn't synced up yet: master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6.git/
The full patches will be sent to the linux-kernel mailing list, if anyone wants to see them.
thanks,
greg k-h
arch/alpha/kernel/pci.c | 4 +- arch/arm/kernel/bios32.c | 6 ++- arch/arm/kernel/setup.c | 42 +++++++++++++++++++---- arch/cris/arch-v32/drivers/pci/bios.c | 4 +- arch/frv/mb93090-mb00/pci-frv.c | 4 +- arch/i386/Kconfig | 1 + arch/i386/kernel/efi.c | 6 ++- arch/i386/kernel/setup.c | 2 + 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 | 47 +++++++++++++------------ arch/powerpc/kernel/pci_64.c | 4 +- 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 | 52 ++++++++++++++++------------ 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/ioport.c | 8 +++- 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/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/ide/pci/aec62xx.c | 3 +- drivers/ide/pci/cmd64x.c | 3 +- drivers/ide/pci/hpt34x.c | 2 + drivers/ide/pci/pdc202xx_new.c | 4 +- drivers/ide/pci/pdc202xx_old.c | 4 +- drivers/ieee1394/ohci1394.c | 17 +++++---- 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/hfc_pci.c | 2 + drivers/isdn/hisax/telespci.c | 5 ++- drivers/macintosh/macio_asic.c | 4 +- drivers/media/video/bt8xx/bttv-driver.c | 10 +++-- drivers/media/video/cx88/cx88-alsa.c | 8 ++-- drivers/media/video/cx88/cx88-core.c | 4 +- drivers/media/video/cx88/cx88-mpeg.c | 4 +- drivers/media/video/cx88/cx88-video.c | 4 +- drivers/media/video/saa7134/saa7134-core.c | 8 ++-- 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 | 5 ++- drivers/net/3c59x.c | 6 ++- drivers/net/8139cp.c | 11 +++--- drivers/net/8139too.c | 6 ++- drivers/net/e100.c | 4 +- drivers/net/skge.c | 4 +- drivers/net/sky2.c | 6 ++- drivers/net/tulip/de2104x.c | 9 +++-- drivers/net/tulip/tulip_core.c | 6 ++- drivers/net/typhoon.c | 5 ++- drivers/net/wan/dscc4.c | 12 +++--- drivers/net/wan/pc300_drv.c | 4 +- drivers/pci/bus.c | 10 +++-- 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-sysfs.c | 4 +- drivers/pci/pci.c | 6 ++- drivers/pci/pci.h | 6 ++- drivers/pci/proc.c | 20 ++++------- drivers/pci/rom.c | 10 +++-- drivers/pci/setup-bus.c | 6 ++- drivers/pci/setup-res.c | 34 +++++++++++------- drivers/pcmcia/i82365.c | 5 ++- drivers/pcmcia/pd6729.c | 3 +- drivers/pcmcia/rsrc_nonstatic.c | 26 ++++++++------ drivers/pcmcia/tcic.c | 5 ++- drivers/pnp/interface.c | 8 ++-- drivers/pnp/manager.c | 15 +++++--- 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/asm-arm/mach/pci.h | 2 + include/asm-powerpc/pci.h | 2 + include/asm-ppc/pci.h | 2 + include/linux/ioport.h | 27 +++++++++------ include/linux/pci.h | 13 ++++--- include/linux/pnp.h | 7 +++- include/linux/types.h | 7 ++++ kernel/resource.c | 52 +++++++++++++++------------- mm/Kconfig | 6 +++ sound/arm/aaci.c | 5 ++- sound/drivers/mpu401/mpu401.c | 5 ++- sound/isa/es18xx.c | 3 +- sound/isa/gus/interwave.c | 8 ++-- sound/isa/sb/sb16.c | 3 +- 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 | 4 +- 115 files changed, 527 insertions(+), 391 deletions(-)
---------------
Greg Kroah-Hartman:
64bit resource: C99 changes for struct resource declarations
64bit resource: fix up printks for resources in sound drivers
64bit resource: fix up printks for resources in networks drivers 64bit resource: fix up printks for resources in pci core and hotplug drivers 64bit resource: fix up printks for resources in mtd drivers
64bit resource: fix up printks for resources in ide drivers
64bit resource: fix up printks for resources in video drivers
64bit resource: fix up printks for resources in pcmcia drivers
64bit resource: fix up printks for resources in arch and core code 64bit resource: fix up printks for resources in misc drivers
64bit resource: introduce resource_size_t for the start and end of struct resource 64bit resource: change resource core to use resource_size_t
64bit resource: change pci core and arch code to use resource_size_t 64bit resource: change pnp core to use resource_size_t
64bit Resource: convert a few remaining drivers to use resource_size_t where needed 64bit Resource: finally enable 64bit resource sizes
Vivek Goyal:
i386: export memory more than 4G through /proc/iomem
PATCH 1/17 64bit resource: C99 changes for struct resource declarations
From: Greg Kroah-Hartman <[email protected]>
Based on an original patch from Ralf Baechle <[email protected]> and Vivek Goyal <[email protected]>. This is needed in order to prepare for changing the size of resources.
--- arch/arm/kernel/setup.c | 42 ++++++++++++++++++++++++++++++++++------ drivers/video/console/vgacon.c | 12 ++++++----- 2 files changed, 42 insertions(+), 12 deletions(-)
arch/arm/kernel/setup.c +36 -6
@@ -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 @@ #define kernel_code mem_res[1]#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]
drivers/video/console/vgacon.c +6 -6
@@ -390,7 +390,7 @@ #endif 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_size =0x8000 ; display_desc ="EGA+" ;
@@ -398,9 +398,9 @@ #endif &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_size =0x2000 ; display_desc ="*MDA" ;
@@ -423,14 +423,14 @@ #endifif (!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,
@@ -474,7 +474,7 @@ #endif } }else {static struct resource cga_console_resource = - {"cga" ,0x3D4 ,0x3D5 }; + { .name ="cga" , .start =0x3D4 , .end =0x3D5 }; vga_video_type =VIDEO_TYPE_CGA ; vga_vram_size =0x2000 ; display_desc ="*CGA" ;
Signature · 1 line
1.4.0
PATCH 2/17 64bit resource: fix up printks for resources in sound drivers
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]>
--- sound/arm/aaci.c | 5 +++-- sound/drivers/mpu401/mpu401.c | 5 +++-- sound/isa/es18xx.c | 3 ++- sound/isa/gus/interwave.c | 8 ++++---- sound/isa/sb/sb16.c | 3 ++- 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 | 4 ++-- 11 files changed, 34 insertions(+), 26 deletions(-)
sound/arm/aaci.c +3 -2
@@ -779,8 +779,9 @@ static struct aaci * __devinit aaci_initstrlcpy (card->driver,DRIVER_NAME ,sizeof (card->driver));strlcpy (card->shortname,"ARM AC'97 Interface" ,sizeof (card->shortname));snprintf (card->longname,sizeof (card->longname), -"%s at 0x%08lx, irq %d" , - card->shortname, dev->res.start, dev->irq[0 ]); +"%s at 0x%016llx, irq %d" , + card->shortname, (unsigned long long )dev->res.start, + dev->irq[0 ]); aaci = card->private_data;mutex_init (&aaci->ac97_sem);
sound/drivers/mpu401/mpu401.c +3 -2
@@ -160,8 +160,9 @@ static int __devinit snd_mpu401_pnp(intreturn -ENODEV ; }if (pnp_port_len (device,0 ) <IO_EXTENT ) { -snd_printk (KERN_ERR "PnP port length is %ld, expected %d\n" , -pnp_port_len (device,0 ),IO_EXTENT ); +snd_printk (KERN_ERR "PnP port length is %llu, expected %d\n" , + (unsigned long long )pnp_port_len (device,0 ), +IO_EXTENT );return -ENODEV ; } port[dev] =pnp_port_start (device,0 );
sound/isa/es18xx.c +2 -1
@@ -2088,7 +2088,8 @@ static int __devinit snd_audiodrive_pnp(kfree (cfg);return -EAGAIN ; } -snd_printdd ("pnp: port=0x%lx\n" ,pnp_port_start (acard->devc,0 )); +snd_printdd ("pnp: port=0x%llx\n" , + (unsigned long long )pnp_port_start (acard->devc,0 ));/* PnP initialization */ pdev = acard->dev;pnp_init_resource_table (cfg);
sound/isa/gus/interwave.c +4 -4
@@ -611,10 +611,10 @@ #endifif (dma2[dev] >=0 ) dma2[dev] =pnp_dma (pdev,1 ); irq[dev] =pnp_irq (pdev,0 ); -snd_printdd ("isapnp IW: sb port=0x%lx, gf1 port=0x%lx, codec port=0x%lx\n" , -pnp_port_start (pdev,0 ), -pnp_port_start (pdev,1 ), -pnp_port_start (pdev,2 )); +snd_printdd ("isapnp IW: sb port=0x%llx, gf1 port=0x%llx, codec port=0x%llx\n" , + (unsigned long long )pnp_port_start (pdev,0 ), + (unsigned long long )pnp_port_start (pdev,1 ), + (unsigned long long )pnp_port_start (pdev,2 ));snd_printdd ("isapnp IW: dma1=%i, dma2=%i, irq=%i\n" , dma1[dev], dma2[dev], irq[dev]);#ifdef SNDRV_STB /* Tone Control initialization */
sound/isa/sb/sb16.c +2 -1
@@ -327,7 +327,8 @@ #ifdef SNDRV_SBAWE_EMU8000 goto __wt_error; } awe_port[dev] =pnp_port_start (pdev,0 ); -snd_printdd ("pnp SB16: wavetable port=0x%lx\n" ,pnp_port_start (pdev,0 )); +snd_printdd ("pnp SB16: wavetable port=0x%llx\n" , + (unsigned long long )pnp_port_start (pdev,0 )); }else { __wt_error:if (pdev) {
sound/oss/forte.c +3 -2
@@ -2035,8 +2035,9 @@ forte_probe (struct pci_dev *pci_dev, copci_set_drvdata (pci_dev, chip); - printk (KERN_INFO PFX "FM801 chip found at 0x%04lX-0x%04lX IRQ %u\n", - chip->iobase, pci_resource_end (pci_dev, 0), chip->irq); + printk (KERN_INFO PFX "FM801 chip found at 0x%04lX-0x%16llX IRQ %u\n", + chip->iobase, (unsigned long long )pci_resource_end (pci_dev,0 ), + chip->irq);/* Power it up */ if ((ret =forte_chip_init (chip)) ==0 )
sound/pci/bt87x.c +3 -2
@@ -888,8 +888,9 @@ static int __devinit snd_bt87x_probe(strstrcpy (card->driver,"Bt87x" );sprintf (card->shortname,"Brooktree Bt%x" , pci->device); -sprintf (card->longname,"%s at %#lx, irq %i" , - card->shortname,pci_resource_start (pci,0 ), chip->irq); +sprintf (card->longname,"%s at %#llx, irq %i" , + card->shortname, (unsigned long long )pci_resource_start (pci,0 ), + chip->irq);strcpy (card->mixername,"Bt87x" ); err =snd_card_register (card);
sound/pci/sonicvibes.c +2 -2
@@ -1441,10 +1441,10 @@ static int __devinit snd_sonic_probe(strstrcpy (card->driver,"SonicVibes" );strcpy (card->shortname,"S3 SonicVibes" ); -sprintf (card->longname,"%s rev %i at 0x%lx, irq %i" , +sprintf (card->longname,"%s rev %i at 0x%llx, irq %i" , card->shortname, sonic->revision, -pci_resource_start (pci,1 ), + (unsigned long long )pci_resource_start (pci,1 ), sonic->irq);if ((err =snd_sonicvibes_pcm (sonic,0 ,NULL )) <0 ) {
sound/ppc/pmac.c +8 -6
@@ -1170,9 +1170,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%016lx:%016lx)\n" , + i, rnames[i], + (unsigned long long )chip->rsrc[i].start, + (unsigned long long )chip->rsrc[i].end); err = -ENODEV ; goto __error; }
@@ -1201,9 +1202,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; }
sound/sparc/cs4231.c +2 -2
@@ -2037,10 +2037,10 @@ static int __init cs4231_sbus_attach(strif (err)return err; -sprintf (card->longname,"%s at 0x%02lx:0x%08lx, irq %d" , +sprintf (card->longname,"%s at 0x%02lx:0x%016lx, irq %d" , card->shortname, rp->flags &0xffL , - rp->start, + (unsigned long long )rp->start, sdev->irqs[0 ]);if ((err =snd_cs4231_sbus_create (card, sdev, dev, &cp)) <0 ) {
sound/sparc/dbri.c +2 -2
@@ -2645,9 +2645,9 @@ static int __init dbri_attach(int prom_nstrcpy (card->driver,"DBRI" );strcpy (card->shortname,"Sun DBRI" ); rp = &sdev->resource[0 ]; -sprintf (card->longname,"%s at 0x%02lx:0x%08lx, irq %d" , +sprintf (card->longname,"%s at 0x%02lx:0x%016lx, irq %d" , card->shortname, - rp->flags &0xffL , rp->start, irq.pri); + rp->flags &0xffL , (unsigned long long )rp->start, irq.pri);if ((err =snd_dbri_create (card, sdev, &irq, dev)) <0 ) {snd_card_free (card);
Signature · 1 line
1.4.0
PATCH 3/17 64bit resource: fix up printks for resources in networks drivers
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]>
--- drivers/net/3c59x.c | 6 ++++-- drivers/net/8139cp.c | 9 +++++---- drivers/net/8139too.c | 6 +++--- drivers/net/e100.c | 4 ++-- drivers/net/skge.c | 4 ++-- drivers/net/sky2.c | 6 +++--- drivers/net/tulip/de2104x.c | 9 +++++---- drivers/net/tulip/tulip_core.c | 6 +++--- drivers/net/typhoon.c | 5 +++-- drivers/net/wan/dscc4.c | 12 ++++++------ drivers/net/wan/pc300_drv.c | 4 ++-- 11 files changed, 38 insertions(+), 33 deletions(-)
drivers/net/3c59x.c +4 -2
@@ -1408,8 +1408,10 @@ static int __devinit vortex_probe1(struc }if (print_info) { -printk (KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n" , - print_name,pci_resource_start (pdev,2 ), +printk (KERN_INFO "%s: CardBus functions mapped " +"%16.16llx->%p\n" , + print_name, + (unsigned long long )pci_resource_start (pdev,2 ), vp->cb_fn_base); }EL3WINDOW (2 );
drivers/net/8139cp.c +5 -4
@@ -1883,8 +1883,8 @@ #endif }if (pci_resource_len (pdev,1 ) <CP_REGS_SIZE ) { rc = -EIO ; - printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n", - pci_resource_len(pdev, 1), pci_name(pdev)); + printk(KERN_ERR PFX "MMIO resource (%llx) too small on pci dev %s\n", + (unsigned long long)pci_resource_len(pdev, 1), pci_name(pdev)); goto err_out_res; }
@@ -1916,8 +1916,9 @@ #endif regs =ioremap (pciaddr,CP_REGS_SIZE );if (!regs) { rc = -EIO ; - printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n", - pci_resource_len(pdev, 1), pciaddr, pci_name(pdev)); + printk(KERN_ERR PFX "Cannot map PCI MMIO (%llx@%llx) on pci dev %s\n", + (unsigned long long )pci_resource_len (pdev,1 ), + (unsigned long long)pciaddr, pci_name(pdev)); goto err_out_res; } dev->base_addr = (unsigned long ) regs;
drivers/net/8139too.c +3 -3
@@ -1341,9 +1341,9 @@ static int rtl8139_open (struct net_devinetif_start_queue (dev);if (netif_msg_ifup (tp)) -printk (KERN_DEBUG "%s: rtl8139_open() ioaddr %#lx IRQ %d" -" GP Pins %2.2x %s-duplex.\n" , - dev->name,pci_resource_start (tp->pci_dev,1 ), +printk (KERN_DEBUG "%s: rtl8139_open() ioaddr %#llx IRQ %d" +" GP Pins %2.2x %s-duplex.\n" , dev->name, + (unsigned long long )pci_resource_start (tp->pci_dev,1 ), dev->irq,RTL_R8 (MediaStatus), tp->mii.full_duplex ?"full" :"half" );
drivers/net/e100.c +2 -2
@@ -2678,9 +2678,9 @@ #endif goto err_out_free; } -DPRINTK (PROBE ,INFO ,"addr 0x%lx, irq %d, " +DPRINTK (PROBE ,INFO ,"addr 0x%llx, irq %d, " "MAC addr %02X:%02X:%02X:%02X:%02X:%02X\n" , -pci_resource_start (pdev,0 ), pdev->irq, + (unsigned long long )pci_resource_start (pdev,0 ), pdev->irq, netdev->dev_addr[0 ], netdev->dev_addr[1 ], netdev->dev_addr[2 ], netdev->dev_addr[3 ], netdev->dev_addr[4 ], netdev->dev_addr[5 ]);
drivers/net/skge.c +2 -2
@@ -3354,8 +3354,8 @@ #endifif (err) goto err_out_free_irq; - printk(KERN_INFO PFX DRV_VERSION " addr 0x%lx irq %d chip %s rev %d\n", -pci_resource_start (pdev,0 ), pdev->irq, + printk(KERN_INFO PFX DRV_VERSION " addr 0x%llx irq %d chip %s rev %d\n", + (unsigned long long )pci_resource_start (pdev,0 ), pdev->irq, skge_board_name(hw), hw->chip_rev);if ((dev =skge_devinit (hw,0 , using_dac)) ==NULL )
drivers/net/sky2.c +3 -3
@@ -3311,9 +3311,9 @@ #endifif (err) goto err_out_iounmap; - printk(KERN_INFO PFX "v%s addr 0x%lx irq %d Yukon-%s (0x%x) rev %d\n", -DRV_VERSION ,pci_resource_start (pdev,0 ), pdev->irq, - yukon2_name[hw->chip_id -CHIP_ID_YUKON_XL ], + printk(KERN_INFO PFX "v%s addr 0x%llx irq %d Yukon-%s (0x%x) rev %d\n", +DRV_VERSION , (unsigned long long )pci_resource_start (pdev,0 ), + pdev->irq, yukon2_name[hw->chip_id -CHIP_ID_YUKON_XL ], hw->chip_id, hw->chip_rev); dev =sky2_init_netdev (hw,0 , using_dac);
drivers/net/tulip/de2104x.c +5 -4
@@ -2007,8 +2007,8 @@ #endif }if (pci_resource_len (pdev,1 ) <DE_REGS_SIZE ) { rc = -EIO ; - printk(KERN_ERR PFX "MMIO resource (%lx) too small on pci dev %s\n", - pci_resource_len(pdev, 1), pci_name(pdev)); + printk(KERN_ERR PFX "MMIO resource (%llx) too small on pci dev %s\n", + (unsigned long long)pci_resource_len(pdev, 1), pci_name(pdev)); goto err_out_res; }
@@ -2016,8 +2016,9 @@ #endif regs =ioremap_nocache (pciaddr,DE_REGS_SIZE );if (!regs) { rc = -EIO ; - printk(KERN_ERR PFX "Cannot map PCI MMIO (%lx@%lx) on pci dev %s\n", - pci_resource_len(pdev, 1), pciaddr, pci_name(pdev)); + printk(KERN_ERR PFX "Cannot map PCI MMIO (%llx@%lx) on pci dev %s\n", + (unsigned long long )pci_resource_len (pdev,1 ), + pciaddr, pci_name(pdev)); goto err_out_res; } dev->base_addr = (unsigned long ) regs;
drivers/net/tulip/tulip_core.c +3 -3
@@ -1350,10 +1350,10 @@ #endifSET_MODULE_OWNER (dev);SET_NETDEV_DEV (dev, &pdev->dev);if (pci_resource_len (pdev,0 ) < tulip_tbl[chip_idx].io_size) { - printk (KERN_ERR PFX "%s: I/O region (0x%lx@0x%lx) too small, " + printk (KERN_ERR PFX "%s: I/O region (0x%llx@0x%llx) too small, ""aborting\n" ,pci_name (pdev), -pci_resource_len (pdev,0 ), - pci_resource_start (pdev, 0)); + (unsigned long long )pci_resource_len (pdev,0 ), + (unsigned long long)pci_resource_start (pdev, 0)); goto err_out_free_netdev; }
drivers/net/typhoon.c +3 -2
@@ -2568,9 +2568,10 @@ typhoon_init_one(struct pci_dev *pdev, cpci_set_drvdata (pdev, dev); -printk (KERN_INFO "%s: %s at %s 0x%lx, " , +printk (KERN_INFO "%s: %s at %s 0x%llx, " , dev->name, typhoon_card_info[card_id].name, - use_mmio ?"MMIO" :"IO" ,pci_resource_start (pdev, use_mmio)); + use_mmio ?"MMIO" :"IO" , + (unsigned long long )pci_resource_start (pdev, use_mmio));for (i =0 ; i <5 ; i++)printk ("%2.2x:" , dev->dev_addr[i]);printk ("%2.2x\n" , dev->dev_addr[i]);
drivers/net/wan/dscc4.c +6 -6
@@ -732,15 +732,15 @@ static int __devinit dscc4_init_one(stru ioaddr =ioremap (pci_resource_start (pdev,0 ),pci_resource_len (pdev,0 ));if (!ioaddr) { -printk (KERN_ERR "%s: cannot remap MMIO region %lx @ %lx\n" , -DRV_NAME ,pci_resource_len (pdev,0 ), -pci_resource_start (pdev,0 )); +printk (KERN_ERR "%s: cannot remap MMIO region %llx @ %llx\n" , +DRV_NAME , (unsigned long long )pci_resource_len (pdev,0 ), + (unsigned long long )pci_resource_start (pdev,0 )); rc = -EIO ; goto err_free_mmio_regions_2; } -printk (KERN_DEBUG "Siemens DSCC4, MMIO at %#lx (regs), %#lx (lbi), IRQ %d\n" , -pci_resource_start (pdev,0 ), -pci_resource_start (pdev,1 ), pdev->irq); +printk (KERN_DEBUG "Siemens DSCC4, MMIO at %#llx (regs), %#llx (lbi), IRQ %d\n" , + (unsigned long long )pci_resource_start (pdev,0 ), + (unsigned long long )pci_resource_start (pdev,1 ), pdev->irq);/* Cf errata DS5 p.2 */ pci_write_config_byte (pdev,PCI_LATENCY_TIMER ,0xf8 );
drivers/net/wan/pc300_drv.c +2 -2
@@ -3445,9 +3445,9 @@ #endif card = (pc300_t *)kmalloc (sizeof (pc300_t),GFP_KERNEL );if (card ==NULL ) { -printk ("PC300 found at RAM 0x%08lx, " +printk ("PC300 found at RAM 0x%016llx, " "but could not allocate card structure.\n" , -pci_resource_start (pdev,3 )); + (unsigned long long )pci_resource_start (pdev,3 )); err = -ENOMEM ; goto err_disable_dev; }
Signature · 1 line
1.4.0
PATCH 4/17 64bit resource: fix up printks for resources in pci core and hotplug drivers
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]>
--- 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/proc.c | 16 +++++----------- drivers/pci/setup-bus.c | 6 ++++-- drivers/pci/setup-res.c | 28 +++++++++++++++++----------- 8 files changed, 55 insertions(+), 43 deletions(-)
drivers/pci/hotplug/cpcihp_zt5550.c +5 -4
@@ -95,8 +95,8 @@ static int zt5550_hc_config(struct pci_d hc_dev = pdev;dbg ("hc_dev = %p" , hc_dev); -dbg ("pci resource start %lx" ,pci_resource_start (hc_dev,1 )); -dbg ("pci resource len %lx" ,pci_resource_len (hc_dev,1 )); +dbg ("pci resource start %llx" , (unsigned long long )pci_resource_start (hc_dev,1 )); +dbg ("pci resource len %llx" , (unsigned long long )pci_resource_len (hc_dev,1 ));if (!request_mem_region (pci_resource_start (hc_dev,1 ),pci_resource_len (hc_dev,1 ),MY_NAME )) {
@@ -108,8 +108,9 @@ static int zt5550_hc_config(struct pci_d hc_registers =ioremap (pci_resource_start (hc_dev,1 ),pci_resource_len (hc_dev,1 ));if (!hc_registers) { -err ("cannot remap MMIO region %lx @ %lx" , -pci_resource_len (hc_dev,1 ),pci_resource_start (hc_dev,1 )); +err ("cannot remap MMIO region %llx @ %llx" , + (unsigned long long )pci_resource_len (hc_dev,1 ), + (unsigned long long )pci_resource_start (hc_dev,1 )); ret = -ENODEV ; goto exit_release_region; }
drivers/pci/hotplug/cpqphp_core.c +5 -5
@@ -1089,8 +1089,8 @@ static int cpqhpc_probe(struct pci_dev * }dbg ("pdev = %p\n" , pdev); -dbg ("pci resource start %lx\n" ,pci_resource_start (pdev,0 )); -dbg ("pci resource len %lx\n" ,pci_resource_len (pdev,0 )); +dbg ("pci resource start %llx\n" , (unsigned long long )pci_resource_start (pdev,0 )); +dbg ("pci resource len %llx\n" , (unsigned long long )pci_resource_len (pdev,0 ));if (!request_mem_region (pci_resource_start (pdev,0 ),pci_resource_len (pdev,0 ),MY_NAME )) {
@@ -1102,9 +1102,9 @@ static int cpqhpc_probe(struct pci_dev * ctrl->hpc_reg =ioremap (pci_resource_start (pdev,0 ),pci_resource_len (pdev,0 ));if (!ctrl->hpc_reg) { -err ("cannot remap MMIO region %lx @ %lx\n" , -pci_resource_len (pdev,0 ), -pci_resource_start (pdev,0 )); +err ("cannot remap MMIO region %llx @ %llx\n" , + (unsigned long long )pci_resource_len (pdev,0 ), + (unsigned long long )pci_resource_start (pdev,0 )); rc = -ENODEV ; goto err_free_mem_region; }
drivers/pci/hotplug/pciehp_hpc.c +3 -2
@@ -1398,8 +1398,9 @@ int pcie_init(struct controller * ctrl,for ( rc =0 ; rc <DEVICE_COUNT_RESOURCE ; rc++)if (pci_resource_len (pdev, rc) >0 ) -dbg ("pci resource[%d] start=0x%lx(len=0x%lx)\n" , rc, -pci_resource_start (pdev, rc),pci_resource_len (pdev, rc)); +dbg ("pci resource[%d] start=0x%llx(len=0x%llx)\n" , rc, + (unsigned long long )pci_resource_start (pdev, rc), + (unsigned long long )pci_resource_len (pdev, rc));info ("HPC vendor_id %x device_id %x ss_vid %x ss_did %x\n" , pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device);
drivers/pci/hotplug/shpchp_sysfs.c +12 -6
@@ -51,8 +51,10 @@ static ssize_t show_ctrl (struct device res = bus->resource[index];if (res && (res->flags &IORESOURCE_MEM ) && !(res->flags &IORESOURCE_PREFETCH )) { - out +=sprintf (out,"start = %8.8lx, length = %8.8lx\n" , - res->start, (res->end - res->start)); + out +=sprintf (out,"start = %8.8llx, " +"length = %8.8llx\n" , + (unsigned long long )res->start, + (unsigned long long )(res->end - res->start)); } } out +=sprintf (out,"Free resources: prefetchable memory\n" );
@@ -60,16 +62,20 @@ static ssize_t show_ctrl (struct device res = bus->resource[index];if (res && (res->flags &IORESOURCE_MEM ) && (res->flags &IORESOURCE_PREFETCH )) { - out +=sprintf (out,"start = %8.8lx, length = %8.8lx\n" , - res->start, (res->end - res->start)); + out +=sprintf (out,"start = %8.8llx, " +"length = %8.8llx\n" , + (unsigned long long )res->start, + (unsigned long long )(res->end - res->start)); } } out +=sprintf (out,"Free resources: IO\n" );for (index =0 ; index <PCI_BUS_NUM_RESOURCES ; index++) { res = bus->resource[index];if (res && (res->flags &IORESOURCE_IO )) { - out +=sprintf (out,"start = %8.8lx, length = %8.8lx\n" , - res->start, (res->end - res->start)); + out +=sprintf (out,"start = %8.8llx, " +"length = %8.8llx\n" , + (unsigned long long )res->start, + (unsigned long long )(res->end - res->start)); } } out +=sprintf (out,"Free resources: bus numbers\n" );
drivers/pci/pci.c +4 -2
@@ -691,10 +691,12 @@ int pci_request_region(struct pci_dev *preturn 0 ; err_out: -printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%lx@%lx for device %s\n" , +printk (KERN_WARNING "PCI: Unable to reserve %s region #%d:%llx@%llx " +"for device %s\n" ,pci_resource_flags (pdev, bar) &IORESOURCE_IO ?"I/O" :"mem" , bar +1 ,/* PCI BAR # */ -pci_resource_len (pdev, bar),pci_resource_start (pdev, bar), + (unsigned long long )pci_resource_len (pdev, bar), + (unsigned long long )pci_resource_start (pdev, bar),pci_name (pdev));return -EBUSY ; }
drivers/pci/proc.c +5 -11
@@ -302,12 +302,6 @@ #endif /* HAVE_ARCH_PCI_GET_UNMAPPED_ARE#endif /* HAVE_PCI_MMAP */ }; -#if BITS_PER_LONG ==32 -#define LONG_FORMAT "\t%08lx" -#else -#define LONG_FORMAT "\t%16lx" -#endif -/* iterator */ static void *pci_seq_start (struct seq_file *m,loff_t *pos) {
@@ -358,16 +352,16 @@ static int show_device(struct seq_file *for (i=0 ; i<7 ; i++) {u64 start, end;pci_resource_to_user (dev, i, &dev->resource[i], &start, &end); -seq_printf (m,LONG_FORMAT , - ((unsigned long )start) | - (dev->resource[i].flags &PCI_REGION_FLAG_MASK )); +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;pci_resource_to_user (dev, i, &dev->resource[i], &start, &end); -seq_printf (m,LONG_FORMAT , +seq_printf (m,"\t%16llx" , dev->resource[i].start < dev->resource[i].end ? - (unsigned long )(end - start) +1 :0 ); + (unsigned long long )(end - start) +1 :0 ); }seq_putc (m,'\t' );if (drv)
drivers/pci/setup-bus.c +4 -2
@@ -357,8 +357,10 @@ pbus_size_mem(struct pci_bus *bus, unsig order =__ffs (align) -20 ;if (order >11 ) {printk (KERN_WARNING "PCI: region %s/%d " -"too large: %lx-%lx\n" , -pci_name (dev), i, r->start, r->end); +"too large: %llx-%llx\n" , +pci_name (dev), i, + (unsigned long long )r->start, + (unsigned long long )r->end); r->flags =0 ;continue ; }
drivers/pci/setup-res.c +17 -11
@@ -40,8 +40,9 @@ pci_update_resource(struct pci_dev *dev,pcibios_resource_to_bus (dev, ®ion, res); -pr_debug (" got res [%lx:%lx] bus [%lx:%lx] flags %lx for " -"BAR %d of %s\n" , res->start, res->end, +pr_debug (" got res [%llx:%llx] bus [%lx:%lx] flags %lx for " +"BAR %d of %s\n" , (unsigned long long )res->start, + (unsigned long long )res->end, region.start, region.end, res->flags, resno,pci_name (dev)); new = region.start | (res->flags &PCI_REGION_FLAG_MASK );
@@ -104,10 +105,12 @@ pci_claim_resource(struct pci_dev *dev, err =insert_resource (root, res);if (err) { -printk (KERN_ERR "PCI: %s region %d of %s %s [%lx:%lx]\n" , - root ?"Address space collision on" : -"No parent found for" , - resource, dtype,pci_name (dev), res->start, res->end); +printk (KERN_ERR "PCI: %s region %d of %s %s [%llx:%llx]\n" , + root ?"Address space collision on" : +"No parent found for" , + resource, dtype,pci_name (dev), + (unsigned long long )res->start, + (unsigned long long )res->end); }return err;
@@ -145,9 +148,11 @@ int pci_assign_resource(struct pci_dev * }if (ret) { -printk (KERN_ERR "PCI: Failed to allocate %s resource #%d:%lx@%lx for %s\n" , - res->flags &IORESOURCE_IO ?"I/O" :"mem" , - resno, size, res->start,pci_name (dev)); +printk (KERN_ERR "PCI: Failed to allocate %s resource " +"#%d:%llx@%llx for %s\n" , + res->flags &IORESOURCE_IO ?"I/O" :"mem" , + resno, (unsigned long long )size, + (unsigned long long )res->start,pci_name (dev)); }else if (resno <PCI_BRIDGE_RESOURCES ) {pci_update_resource (dev, res, resno); }
@@ -213,8 +218,9 @@ pdev_sort_resources(struct pci_dev *dev,continue ;if (!r_align) {printk (KERN_WARNING "PCI: Ignore bogus resource %d " -"[%lx:%lx] of %s\n" , - i, r->start, r->end,pci_name (dev)); +"[%llx:%llx] of %s\n" , + i, (unsigned long long )r->start, + (unsigned long long )r->end,pci_name (dev));continue ; } r_align = (i <PCI_BRIDGE_RESOURCES ) ? r_align +1 : r->start;
Signature · 1 line
1.4.0
PATCH 5/17 64bit resource: fix up printks for resources in mtd drivers
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]>
--- 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 | 5 +++-- 5 files changed, 16 insertions(+), 12 deletions(-)
drivers/mtd/devices/pmc551.c +4 -4
@@ -551,11 +551,11 @@ #ifdef CONFIG_MTD_PMC551_DEBUG/* * 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
drivers/mtd/maps/amd76xrom.c +3 -2
@@ -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
drivers/mtd/maps/ichxrom.c +3 -2
@@ -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. */
drivers/mtd/maps/scx200_docflash.c +3 -2
@@ -164,8 +164,9 @@ static int __init init_scx200_docflash(voutl (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 )
drivers/mtd/maps/sun_uflash.c +3 -2
@@ -62,9 +62,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 [email protected]\n" , - dp->full_name, res->start, edev->num_addrs); + dp->full_name, (unsigned long long )res->start, + edev->num_addrs);return -ENODEV ; }
Signature · 1 line
1.4.0
PATCH 6/17 64bit resource: fix up printks for resources in ide drivers
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]>
--- drivers/ide/pci/aec62xx.c | 3 ++- drivers/ide/pci/cmd64x.c | 3 ++- drivers/ide/pci/hpt34x.c | 2 +- drivers/ide/pci/pdc202xx_new.c | 4 ++-- drivers/ide/pci/pdc202xx_old.c | 4 ++-- 5 files changed, 9 insertions(+), 7 deletions(-)
drivers/ide/pci/aec62xx.c +2 -1
@@ -254,7 +254,8 @@ static unsigned int __devinit init_chipsif (dev->resource[PCI_ROM_RESOURCE ].start) {pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE ); -printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , name, dev->resource[PCI_ROM_RESOURCE ].start); +printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , name, + (unsigned long )dev->resource[PCI_ROM_RESOURCE ].start); }if (bus_speed <=33 )
drivers/ide/pci/cmd64x.c +2 -1
@@ -609,7 +609,8 @@ static unsigned int __devinit init_chips#ifdef __i386__if (dev->resource[PCI_ROM_RESOURCE ].start) {pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE ); -printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , name, dev->resource[PCI_ROM_RESOURCE ].start); +printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , name, + (unsigned long )dev->resource[PCI_ROM_RESOURCE ].start); }#endif
drivers/ide/pci/hpt34x.c +1 -1
@@ -176,7 +176,7 @@ static unsigned int __devinit init_chipspci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE );printk (KERN_INFO "HPT345: ROM enabled at 0x%08lx\n" , - dev->resource[PCI_ROM_RESOURCE ].start); + (unsigned long )dev->resource[PCI_ROM_RESOURCE ].start); }pci_write_config_byte (dev,PCI_LATENCY_TIMER ,0xF0 ); }else {
drivers/ide/pci/pdc202xx_new.c +2 -2
@@ -313,8 +313,8 @@ static unsigned int __devinit init_chipsif (dev->resource[PCI_ROM_RESOURCE ].start) {pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE ); -printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , - name, dev->resource[PCI_ROM_RESOURCE ].start); +printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , name, + (unsigned long )dev->resource[PCI_ROM_RESOURCE ].start); }#ifdef CONFIG_PPC_PMAC
drivers/ide/pci/pdc202xx_old.c +2 -2
@@ -544,8 +544,8 @@ static unsigned int __devinit init_chipsif (dev->resource[PCI_ROM_RESOURCE ].start) {pci_write_config_dword (dev,PCI_ROM_ADDRESS , dev->resource[PCI_ROM_RESOURCE ].start |PCI_ROM_ADDRESS_ENABLE ); -printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , - name, dev->resource[PCI_ROM_RESOURCE ].start); +printk (KERN_INFO "%s: ROM enabled at 0x%08lx\n" , name, + (unsigned long )dev->resource[PCI_ROM_RESOURCE ].start); }/*
Signature · 1 line
1.4.0
PATCH 7/17 64bit resource: fix up printks for resources in video drivers
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]>
--- drivers/media/video/bt8xx/bttv-driver.c | 10 ++++++---- drivers/media/video/cx88/cx88-alsa.c | 8 ++++---- drivers/media/video/cx88/cx88-core.c | 4 ++-- drivers/media/video/cx88/cx88-mpeg.c | 4 ++-- drivers/media/video/cx88/cx88-video.c | 4 ++-- drivers/media/video/saa7134/saa7134-core.c | 8 ++++---- 6 files changed, 20 insertions(+), 18 deletions(-)
drivers/media/video/bt8xx/bttv-driver.c +6 -4
@@ -4019,8 +4019,9 @@ static int __devinit bttv_probe(struct pif (!request_mem_region (pci_resource_start (dev,0 ),pci_resource_len (dev,0 ), btv->c.name)) { -printk (KERN_WARNING "bttv%d: can't request iomem (0x%lx).\n" , - btv->c.nr,pci_resource_start (dev,0 )); +printk (KERN_WARNING "bttv%d: can't request iomem (0x%llx).\n" , + btv->c.nr, + (unsigned long long )pci_resource_start (dev,0 ));return -EBUSY ; }pci_set_master (dev);
@@ -4031,8 +4032,9 @@ static int __devinit bttv_probe(struct ppci_read_config_byte (dev,PCI_LATENCY_TIMER , &lat);printk (KERN_INFO "bttv%d: Bt%d (rev %d) at %s, " , bttv_num,btv->id, btv->revision,pci_name (dev)); -printk ("irq: %d, latency: %d, mmio: 0x%lx\n" , - btv->c.pci->irq, lat,pci_resource_start (dev,0 )); +printk ("irq: %d, latency: %d, mmio: 0x%llx\n" , + btv->c.pci->irq, lat, + (unsigned long long )pci_resource_start (dev,0 ));schedule (); btv->bt848_mmio=ioremap (pci_resource_start (dev,0 ),0x1000 );
drivers/media/video/cx88/cx88-alsa.c +4 -4
@@ -712,9 +712,9 @@ static int __devinit snd_cx88_create(strpci_read_config_byte (pci,PCI_LATENCY_TIMER , &chip->pci_lat);dprintk (1 ,"ALSA %s/%i: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%lx\n" , core->name, devno, +"latency: %d, mmio: 0x%llx\n" , core->name, devno,pci_name (pci), chip->pci_rev, pci->irq, - chip->pci_lat,pci_resource_start (pci,0 )); + chip->pci_lat,(unsigned long long )pci_resource_start (pci,0 )); chip->irq = pci->irq;synchronize_irq (chip->irq);
@@ -766,8 +766,8 @@ static int __devinit cx88_audio_initdev(strcpy (card->driver,"CX88x" );sprintf (card->shortname,"Conexant CX%x" , pci->device); -sprintf (card->longname,"%s at %#lx" , - card->shortname,pci_resource_start (pci,0 )); +sprintf (card->longname,"%s at %#llx" , + card->shortname,(unsigned long long )pci_resource_start (pci,0 ));strcpy (card->mixername,"CX88" ); dprintk (0, "%s/%i: ALSA support for cx2388x boards\n",
drivers/media/video/cx88/cx88-core.c +2 -2
@@ -1031,8 +1031,8 @@ static int get_ressources(struct cx88_co pci_resource_len(pci,0), core->name))return 0 ; -printk (KERN_ERR "%s: can't get MMIO memory @ 0x%lx\n" , - core->name,pci_resource_start (pci,0 )); +printk (KERN_ERR "%s: can't get MMIO memory @ 0x%llx\n" , + core->name,(unsigned long long )pci_resource_start (pci,0 ));return -EBUSY ; }
drivers/media/video/cx88/cx88-mpeg.c +2 -2
@@ -420,9 +420,9 @@ int cx8802_init_common(struct cx8802_devpci_read_config_byte (dev->pci,PCI_CLASS_REVISION , &dev->pci_rev);pci_read_config_byte (dev->pci,PCI_LATENCY_TIMER , &dev->pci_lat);printk (KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%lx\n" , dev->core->name, +"latency: %d, mmio: 0x%llx\n" , dev->core->name,pci_name (dev->pci), dev->pci_rev, dev->pci->irq, - dev->pci_lat,pci_resource_start (dev->pci,0 )); + dev->pci_lat,(unsigned long long )pci_resource_start (dev->pci,0 ));/* initialize driver struct */ spin_lock_init (&dev->slock);
drivers/media/video/cx88/cx88-video.c +2 -2
@@ -1847,9 +1847,9 @@ static int __devinit cx8800_initdev(strupci_read_config_byte (pci_dev,PCI_CLASS_REVISION , &dev->pci_rev);pci_read_config_byte (pci_dev,PCI_LATENCY_TIMER , &dev->pci_lat);printk (KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%lx\n" , core->name, +"latency: %d, mmio: 0x%llx\n" , core->name,pci_name (pci_dev), dev->pci_rev, pci_dev->irq, - dev->pci_lat,pci_resource_start (pci_dev,0 )); + dev->pci_lat,(unsigned long long )pci_resource_start (pci_dev,0 ));pci_set_master (pci_dev);if (!pci_dma_supported (pci_dev,0xffffffff )) {
drivers/media/video/saa7134/saa7134-core.c +4 -4
@@ -871,9 +871,9 @@ #endifpci_read_config_byte (pci_dev,PCI_CLASS_REVISION , &dev->pci_rev);pci_read_config_byte (pci_dev,PCI_LATENCY_TIMER , &dev->pci_lat);printk (KERN_INFO "%s: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%lx\n" , dev->name, +"latency: %d, mmio: 0x%llx\n" , dev->name,pci_name (pci_dev), dev->pci_rev, pci_dev->irq, - dev->pci_lat,pci_resource_start (pci_dev,0 )); + dev->pci_lat,(unsigned long long )pci_resource_start (pci_dev,0 ));pci_set_master (pci_dev);if (!pci_dma_supported (pci_dev,DMA_32BIT_MASK )) {printk ("%s: Oops: no 32bit PCI DMA ???\n" ,dev->name);
@@ -905,8 +905,8 @@ #endif pci_resource_len(pci_dev,0), dev->name)) { err = -EBUSY ; -printk (KERN_ERR "%s: can't get MMIO memory @ 0x%lx\n" , - dev->name,pci_resource_start (pci_dev,0 )); +printk (KERN_ERR "%s: can't get MMIO memory @ 0x%llx\n" , + dev->name,(unsigned long long )pci_resource_start (pci_dev,0 )); goto fail1; } dev->lmmio =ioremap (pci_resource_start (pci_dev,0 ),0x1000 );
Signature · 1 line
1.4.0
PATCH 8/17 64bit resource: fix up printks for resources in pcmcia drivers
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]>
--- drivers/pcmcia/i82365.c | 5 +++-- drivers/pcmcia/pd6729.c | 3 ++- drivers/pcmcia/rsrc_nonstatic.c | 12 ++++++++---- drivers/pcmcia/tcic.c | 5 +++-- 4 files changed, 16 insertions(+), 9 deletions(-)
drivers/pcmcia/i82365.c +3 -2
@@ -1084,9 +1084,10 @@ static int i365_set_mem_map(u_short socku_short base, i;u_char map; -debug (1 ,"SetMemMap(%d, %d, %#2.2x, %d ns, %#lx-%#lx, " +debug (1 ,"SetMemMap(%d, %d, %#2.2x, %d ns, %#llx-%#llx, " "%#x)\n" , sock, mem->map, mem->flags, mem->speed, - mem->res->start, mem->res->end, mem->card_start); + (unsigned long long )mem->res->start, + (unsigned long long )mem->res->end, mem->card_start); map = mem->map; if ((map > 4) || (mem->card_start > 0x3ffffff) ||
drivers/pcmcia/pd6729.c +2 -1
@@ -642,7 +642,8 @@ static int __devinit pd6729_pci_probe(st goto err_out_free_mem;printk (KERN_INFO "pd6729: Cirrus PD6729 PCI to PCMCIA Bridge " -"at 0x%lx on irq %d\n" ,pci_resource_start (dev,0 ), dev->irq); +"at 0x%llx on irq %d\n" , + (unsigned long long )pci_resource_start (dev,0 ), dev->irq);/* * Since we have no memory BARs some firmware may not * have had PCI_COMMAND_MEMORY enabled, yet the device needs it.
drivers/pcmcia/rsrc_nonstatic.c +8 -4
@@ -808,8 +808,10 @@ #endifif (res->flags &IORESOURCE_IO ) {if (res == &ioport_resource)continue ; -printk (KERN_INFO "pcmcia: parent PCI bridge I/O window: 0x%lx - 0x%lx\n" , - res->start, res->end); +printk (KERN_INFO "pcmcia: parent PCI bridge I/O " +"window: 0x%llx - 0x%llx\n" , + (unsigned long long )res->start, + (unsigned long long )res->end);if (!adjust_io (s,ADD_MANAGED_RESOURCE , res->start, res->end)) done |=IORESOURCE_IO ;
@@ -818,8 +820,10 @@ #endifif (res->flags &IORESOURCE_MEM ) {if (res == &iomem_resource)continue ; -printk (KERN_INFO "pcmcia: parent PCI bridge Memory window: 0x%lx - 0x%lx\n" , - res->start, res->end); +printk (KERN_INFO "pcmcia: parent PCI bridge Memory " +"window: 0x%llx - 0x%llx\n" , + (unsigned long long )res->start, + (unsigned long long )res->end);if (!adjust_memory (s,ADD_MANAGED_RESOURCE , res->start, res->end)) done |=IORESOURCE_MEM ; }
drivers/pcmcia/tcic.c +3 -2
@@ -756,8 +756,9 @@ static int tcic_set_mem_map(struct pcmciu_long base, len, mmap;debug (1 ,"SetMemMap(%d, %d, %#2.2x, %d ns, " -"%#lx-%#lx, %#x)\n" , psock, mem->map, mem->flags, - mem->speed, mem->res->start, mem->res->end, mem->card_start); +"%#llx-%#llx, %#x)\n" , psock, mem->map, mem->flags, + mem->speed, (unsigned long long )mem->res->start, + (unsigned long long )mem->res->end, mem->card_start);if ((mem->map >3 ) || (mem->card_start >0x3ffffff ) || (mem->res->start >0xffffff ) || (mem->res->end >0xffffff ) || (mem->res->start > mem->res->end) || (mem->speed >1000 ))
Signature · 1 line
1.4.0
PATCH 9/17 64bit resource: fix up printks for resources in arch and core code
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]> and Andrew Morton.
(tweaked by Andy Isaacson <[email protected]>)
--- 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(-)
arch/i386/kernel/efi.c +4 -2
@@ -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.
arch/powerpc/kernel/pci_32.c +19 -18
@@ -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_busDBG ("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 +1224,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,
@@ -1574,8 +1575,8 @@ static pgprot_t __pci_mmap_set_pgprot(stelse 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); }
arch/powerpc/platforms/83xx/pci.c +3 -2
@@ -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);
arch/powerpc/platforms/85xx/pci.c +3 -2
@@ -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);
arch/powerpc/platforms/chrp/pci.c +2 -2
@@ -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 ();
arch/powerpc/platforms/maple/pci.c +3 -2
@@ -376,9 +376,10 @@ static void __init maple_fixup_phb_resouunsigned 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); } }
arch/powerpc/platforms/powermac/pci.c +3 -2
@@ -939,9 +939,10 @@ #ifdef CONFIG_PPC32 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",
arch/ppc/kernel/pci.c +25 -17
92 lines not on this page · raw message
arch/sparc/kernel/ioport.c +3 -1
@@ -819,7 +819,9 @@ _sparc_io_get_info(char *buf, char **staif (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;
kernel/resource.c +6 -4
@@ -83,10 +83,10 @@ static int r_show(struct seq_file *m, vofor (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 *pwrite_unlock (&resource_lock); -printk (KERN_WARNING "Trying to free nonexistent resource <%08lx-%08lx>\n" , start, end); +printk (KERN_WARNING "Trying to free nonexistent resource " +"<%016llx-%016llx>\n" , (unsigned long long )start, + (unsigned long long )end); }EXPORT_SYMBOL (__release_region);
Signature · 1 line
1.4.0
PATCH 10/17 64bit resource: fix up printks for resources in misc drivers
From: Greg Kroah-Hartman <[email protected]>
This is needed if we wish to change the size of the resource structures.
Based on an original patch from Vivek Goyal <[email protected]>
--- 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(-)
drivers/amba/bus.c +3 -2
@@ -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
drivers/atm/ambassador.c +2 -1
@@ -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
drivers/atm/firestream.c +3 -2
@@ -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));
drivers/block/sx8.c +3 -2
@@ -1694,9 +1694,10 @@ #endifDPRINTK ("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);
drivers/char/applicom.c +6 -3
@@ -209,13 +209,16 @@ static 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 );
drivers/ieee1394/ohci1394.c +8 -7
@@ -590,11 +590,11 @@ static void ohci_initialize(struct ti_oh buf =reg_read (ohci, OHCI1394_Version);sprintf (irq_buf,"%d" , ohci->dev->irq);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);
@@ -3270,15 +3270,16 @@ #endif* 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 ) -KERN_WARNING ,"PCI resource length of %lx too small!" , -pci_resource_len (dev,0 )); +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 ;
drivers/infiniband/hw/ipath/ipath_driver.c +4 -4
@@ -460,10 +460,10 @@ static int __devinit ipath_init_one(strufor (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) {
drivers/infiniband/hw/mthca/mthca_main.c +3 -2
@@ -172,8 +172,9 @@ static int __devinit mthca_dev_lim(strucif (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 ; }
drivers/input/serio/ct82c710.c +3 -3
@@ -189,7 +189,7 @@ static int __devinit ct82c710_probe(strustrlcpy (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 ;
drivers/isdn/hisax/telespci.c +3 -2
@@ -311,8 +311,9 @@ #ifdef CONFIG_PCI } 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 );
drivers/macintosh/macio_asic.c +2 -2
@@ -428,10 +428,10 @@ #endif/* 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
drivers/message/i2o/iop.c +8 -6
@@ -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); } }
drivers/mmc/mmci.c +2 -2
@@ -546,9 +546,9 @@ static int mmci_probe(struct amba_devicemmc_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;
drivers/scsi/sata_via.c +4 -4
@@ -335,10 +335,10 @@ static int svia_init_one (struct pci_devif ((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; }
Signature · 1 line
1.4.0
PATCH 11/17 64bit resource: introduce resource_size_t for the start and end of struct resource
From: Greg Kroah-Hartman <[email protected]>
But do not change it from what it currently is (unsigned long)
Based on a patch series originally from Vivek Goyal <[email protected]>
--- include/linux/ioport.h | 4 +++- include/linux/types.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletions(-)
include/linux/ioport.h +3 -1
@@ -9,13 +9,15 @@ #ifndef _LINUX_IOPORT_H#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; };
include/linux/types.h +2 -0
@@ -177,6 +177,8 @@ #endif#ifdef __KERNEL__typedef unsigned __bitwise__ gfp_t ; + +typedef unsigned long resource_size_t ;#endif struct ustat {
Signature · 1 line
1.4.0
PATCH 12/17 64bit resource: change resource core to use resource_size_t
From: Greg Kroah-Hartman <[email protected]>
Based on a patch series originally from Vivek Goyal <[email protected]>
--- arch/sparc/kernel/ioport.c | 4 ++-- include/linux/ioport.h | 23 +++++++++++++---------- kernel/resource.c | 34 ++++++++++++++++++---------------- 3 files changed, 33 insertions(+), 28 deletions(-)
arch/sparc/kernel/ioport.c +2 -2
@@ -208,7 +208,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); }/*
@@ -325,7 +325,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);
include/linux/ioport.h +13 -10
@@ -98,31 +98,34 @@ extern struct resource * ____request_resextern 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, +resource_size_t size,resource_size_t min, +resource_size_t max,resource_size_t align,void (*alignf)(void *,struct resource *, -unsigned long ,unsigned long ), +resource_size_t ,resource_size_t ),void *alignf_data); -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);/* 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 *, +resource_size_t start, +resource_size_t 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 *,resource_size_t ,resource_size_t ); +extern void __release_region (struct resource *,resource_size_t , +resource_size_t ); -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); }
kernel/resource.c +18 -16
@@ -151,8 +151,8 @@ #endif /* CONFIG_PROC_FS *//* 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; +resource_size_t start = new->start; +resource_size_t end = new->end;struct resource *tmp, **p;if (end < start)
@@ -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, -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 *, -unsigned long ,unsigned long ), +resource_size_t ,resource_size_t ),void *alignf_data) {struct resource *this = root->child;
@@ -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, -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 *, -unsigned long ,unsigned long ), +resource_size_t ,resource_size_t ),void *alignf_data) {int err;
@@ -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,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; -unsigned long end = start + size -1 ; +resource_size_t end = start + size -1 ;int result = -EBUSY ;write_lock (&resource_lock);
@@ -428,7 +426,9 @@ 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, +resource_size_t start,resource_size_t n, +const char *name) {struct resource *res =kzalloc (sizeof (*res),GFP_KERNEL );
@@ -464,7 +464,8 @@ struct resource * __request_region(strucEXPORT_SYMBOL (__request_region); -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 +480,11 @@ int __check_region(struct resource *pareEXPORT_SYMBOL (__check_region); -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; -unsigned long end; +resource_size_t end; p = &parent->child; end = start + n -1 ;
Signature · 1 line
1.4.0
PATCH 13/17 64bit resource: change pci core and arch code to use resource_size_t
From: Greg Kroah-Hartman <[email protected]>
Based on a patch series originally from Vivek Goyal <[email protected]>
--- 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 | 10 +++++----- 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, 76 insertions(+), 74 deletions(-)
arch/alpha/kernel/pci.c +2 -2
@@ -124,12 +124,12 @@ #define GB (1024*MB)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 */
arch/arm/kernel/bios32.c +3 -3
@@ -304,7 +304,7 @@ static inline int pdev_bad_for_parity(ststatic 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 ;
arch/cris/arch-v32/drivers/pci/bios.c +2 -2
@@ -43,10 +43,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 ;
arch/frv/mb93090-mb00/pci-frv.c +2 -2
@@ -64,10 +64,10 @@ #endif*/ 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 ;
arch/i386/pci/i386.c +2 -2
@@ -48,10 +48,10 @@ #include "pci.h"*/ 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 ;
arch/ia64/pci/pci.c +1 -1
@@ -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) { }
arch/m68knommu/kernel/comempci.c +2 -1
@@ -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) { }
arch/mips/pci/pci.c +2 -2
@@ -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 */
arch/mips/pmc-sierra/yosemite/ht.c +2 -2
@@ -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
arch/parisc/kernel/pci.c +1 -1
@@ -289,7 +289,7 @@ #endif* 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;
arch/powerpc/kernel/pci_32.c +5 -5
@@ -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 ) {
@@ -1756,7 +1756,7 @@ #endif /* CONFIG_PPC_PMAC */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 ;
arch/powerpc/kernel/pci_64.c +2 -2
@@ -138,11 +138,11 @@ #endif* 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 ) {
arch/ppc/kernel/pci.c +6 -6
@@ -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(stelse 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); }
@@ -1130,7 +1130,7 @@ long sys_pciconfig_iobase(long which, unvoid 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 ;
arch/sh/boards/mpc1211/pci.c +2 -2
@@ -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 ) {
arch/sh/boards/overdrive/galileo.c +1 -1
@@ -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) { }
arch/sh/drivers/pci/pci.c +3 -3
@@ -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 ;
arch/sh64/kernel/pcibios.c +2 -2
@@ -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 ;
arch/sparc/kernel/pcic.c +1 -1
@@ -860,7 +860,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) { }
arch/sparc64/kernel/pci.c +1 -1
@@ -357,7 +357,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) { }
arch/v850/kernel/rte_mb_a_pci.c +1 -1
@@ -329,7 +329,7 @@ void pcibios_fixup_bus(struct pci_bus *bvoid pcibios_align_resource (void *data,struct resource *res, -unsigned long size,unsigned long align) +resource_size_t size,resource_size_t align) { }
arch/xtensa/kernel/pci.c +3 -3
@@ -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"
drivers/pci/bus.c +5 -5
@@ -34,11 +34,11 @@ #include "pci.h"*/ 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 ;
drivers/pci/pci-sysfs.c +2 -2
@@ -87,7 +87,7 @@ resource_show(struct device * dev, strucchar * str = buf;int i;int max =7 ; -u64 start, end; +resource_size_t start, end;if (pci_dev->subordinate) max =DEVICE_COUNT_RESOURCE ;
@@ -365,7 +365,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++)
drivers/pci/pci.h +3 -3
@@ -6,10 +6,10 @@ extern int pci_create_sysfs_dev_files(stextern 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);
drivers/pci/proc.c +2 -2
@@ -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 ?
drivers/pci/rom.c +5 -5
@@ -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 pcreturn 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 ;
drivers/pci/setup-res.c +3 -3
@@ -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 ;
@@ -209,7 +209,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;
@@ -225,7 +225,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;
include/asm-arm/mach/pci.h +1 -1
@@ -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 */
include/asm-powerpc/pci.h +1 -1
@@ -242,7 +242,7 @@ #if defined(CONFIG_PPC_MULTIPLATFORM) ||#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__ */
include/asm-ppc/pci.h +1 -1
@@ -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__ */
include/linux/pci.h +7 -6
@@ -404,8 +404,8 @@ int pcibios_enable_device(struct pci_devchar *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 */
@@ -532,10 +532,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);
@@ -730,7 +730,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;
Signature · 1 line
1.4.0
PATCH 14/17 64bit resource: change pnp core to use resource_size_t
From: Greg Kroah-Hartman <[email protected]>
Based on a patch series originally from Vivek Goyal <[email protected]>
--- 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(-)
drivers/pnp/interface.c +4 -4
@@ -264,7 +264,7 @@ static ssize_t pnp_show_current_resourceif (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_resourceif (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_resourceif (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_resourceif (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)); } }
drivers/pnp/manager.c +10 -5
@@ -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_destatic 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_devstatic 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_devstatic 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 ;
drivers/pnp/resource.c +4 -4
@@ -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))
include/linux/pnp.h +5 -2
@@ -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 pstatic 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 ; }
Signature · 1 line
1.4.0
PATCH 15/17 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
From: Greg Kroah-Hartman <[email protected]>
Based on a patch series originally from Vivek Goyal <[email protected]>
--- 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(-)
drivers/ieee1394/ohci1394.c +1 -1
@@ -3217,7 +3217,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" );
drivers/isdn/hisax/hfc_pci.c +1 -1
@@ -1688,7 +1688,7 @@ #ifdef CONFIG_PCIprintk (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" );
drivers/net/8139cp.c +1 -1
@@ -1823,7 +1823,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;
drivers/pcmcia/rsrc_nonstatic.c +7 -7
@@ -72,7 +72,7 @@ #define MEM_PROBE_HIGH (1 << 1)======================================================================*/ 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;
drivers/serial/8250_pci.c +2 -2
@@ -594,8 +594,8 @@ pci_default_setup(struct serial_privateelse 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 ;
drivers/usb/host/sl811-hcd.c +7 -3
@@ -1684,9 +1684,13 @@ sl811h_probe(struct platform_device *devif (!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 ) {
Signature · 1 line
1.4.0
PATCH 16/17 64bit Resource: finally enable 64bit resource sizes
From: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
--- arch/i386/Kconfig | 1 + include/linux/types.h | 7 ++++++- kernel/resource.c | 8 +++----- mm/Kconfig | 6 ++++++ 4 files changed, 16 insertions(+), 6 deletions(-)
arch/i386/Kconfig +1 -0
@@ -529,6 +529,7 @@ config X86_PAE bool depends on HIGHMEM64G default y + select RESOURCES_64BIT # Common NUMA Features config NUMA
include/linux/types.h +6 -1
@@ -178,9 +178,14 @@ #endif#ifdef __KERNEL__typedef unsigned __bitwise__ gfp_t ; -typedef unsigned long resource_size_t ; +#ifdef CONFIG_RESOURCES_64BIT +typedef u64 resource_size_t ; +#else +typedef u32 resource_size_t ;#endif +#endif /* __KERNEL__ */ +struct ustat {__kernel_daddr_t f_tfree;__kernel_ino_t f_tinode;
kernel/resource.c +3 -5
@@ -23,20 +23,18 @@ #include <asm/io.h>struct resource ioport_resource = { .name ="PCI IO" , - .start =0x0000 , + .start =0 , .end =IO_SPACE_LIMIT , .flags =IORESOURCE_IO , }; -EXPORT_SYMBOL (ioport_resource);struct resource iomem_resource = { .name ="PCI mem" , - .start =0UL , - .end = ~0UL , + .start =0 , + .end =-1 , .flags =IORESOURCE_MEM , }; -EXPORT_SYMBOL (iomem_resource);static DEFINE_RWLOCK (resource_lock);
mm/Kconfig +6 -0
@@ -145,3 +145,9 @@ config MIGRATION while the virtual addresses are not changed. This is useful for example on NUMA systems to put pages nearer to the processors accessing the page. + +config RESOURCES_64BIT + bool "64 bit Memory and IO resources (EXPERIMENTAL)" if (!64BIT && EXPERIMENTAL) + default 64BIT + help + This option allows memory and IO resources to be 64 bit.
Signature · 1 line
1.4.0
PATCH 17/17 i386: export memory more than 4G through /proc/iomem
From: Vivek Goyal <[email protected]>
Currently /proc/iomem exports physical memory also apart from io device memory. But on i386, it truncates any memory more than 4GB. This leads to problems for kexec/kdump.
Kexec reads /proc/iomem to determine the system memory layout and prepares a memory map based on that and passes it to the kernel being kexeced. Given the fact that memory more than 4GB has been truncated, new kernel never gets to see and use that memory.
Kdump also reads /proc/iomem to determine the physical memory layout of the system and encodes this informaiton in ELF headers. After a crash new kernel parses these ELF headers being used by previous kernel and vmcore is prepared accordingly. As memory more than 4GB has been truncated, kdump never sees that memory and never prepares ELF headers for it. Hence vmcore is truncated and limited to 4GB even if there is more physical memory in the system.
This patch exports memory more than 4GB through /proc/iomem on i386.
--- arch/i386/kernel/setup.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/i386/kernel/setup.c +2 -0
@@ -1314,8 +1314,10 @@ legacy_init_iomem_resources(struct resouprobe_roms ();for (i =0 ; i < e820.nr_map; i++) {struct resource *res; +#ifndef CONFIG_RESOURCES_64BIT if (e820.map[i].addr + e820.map[i].size >0x100000000ULL )continue ; +#endif res =kzalloc (sizeof (struct resource ),GFP_ATOMIC );switch (e820.map[i].type) {case E820_RAM : res->name ="System RAM" ;break ;
Signature · 1 line
1.4.0