aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/proc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-06-12 18:14:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-27 12:23:58 -0400
commit1396a8c3f7cec9f5e0d00bd089be21fc468f0f1c (patch)
treeb96018459e26a24e20221f0bb7d5bb25d6608147 /drivers/pci/proc.c
parent7c7459d1f91abdf1e31ef80cad526e83e8b8ba4e (diff)
[PATCH] 64bit resource: fix up printks for resources in pci core and hotplug drivers
This is needed if we wish to change the size of the resource structures. Based on an original patch from Vivek Goyal <vgoyal@in.ibm.com> Cc: Vivek Goyal <vgoyal@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/proc.c')
-rw-r--r--drivers/pci/proc.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 54b2ebc9c91a..20dfd77bd8c2 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -302,12 +302,6 @@ static struct file_operations proc_bus_pci_operations = {
302#endif /* HAVE_PCI_MMAP */ 302#endif /* HAVE_PCI_MMAP */
303}; 303};
304 304
305#if BITS_PER_LONG == 32
306#define LONG_FORMAT "\t%08lx"
307#else
308#define LONG_FORMAT "\t%16lx"
309#endif
310
311/* iterator */ 305/* iterator */
312static void *pci_seq_start(struct seq_file *m, loff_t *pos) 306static void *pci_seq_start(struct seq_file *m, loff_t *pos)
313{ 307{
@@ -358,16 +352,16 @@ static int show_device(struct seq_file *m, void *v)
358 for (i=0; i<7; i++) { 352 for (i=0; i<7; i++) {
359 u64 start, end; 353 u64 start, end;
360 pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); 354 pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
361 seq_printf(m, LONG_FORMAT, 355 seq_printf(m, "\t%16llx",
362 ((unsigned long)start) | 356 (unsigned long long)(start |
363 (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); 357 (dev->resource[i].flags & PCI_REGION_FLAG_MASK)));
364 } 358 }
365 for (i=0; i<7; i++) { 359 for (i=0; i<7; i++) {
366 u64 start, end; 360 u64 start, end;
367 pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); 361 pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
368 seq_printf(m, LONG_FORMAT, 362 seq_printf(m, "\t%16llx",
369 dev->resource[i].start < dev->resource[i].end ? 363 dev->resource[i].start < dev->resource[i].end ?
370 (unsigned long)(end - start) + 1 : 0); 364 (unsigned long long)(end - start) + 1 : 0);
371 } 365 }
372 seq_putc(m, '\t'); 366 seq_putc(m, '\t');
373 if (drv) 367 if (drv)