Skip to contentSkip to conversation

pci: fix merging left out for BAR print out v2

PATCH In review Yinghai Lu 3 participants 8 messages Sep 9, 2008 – Sep 11, 2008 PCI

lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 pci: fix merging left out for BAR print out v2

print out for Device BAR address before kernel try to update them.

also change it to KERN_DEBUG instead...

v2: update to linux-pci next
also add (unsigned long long) cast

drivers/pci/probe.c +11 -4
index d8d3f90..e3bddc5 100644
@@ -304,6 +304,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
 		} else {
 			res->start = l64;
 			res->end = l64 + sz64;
+			printk(KERN_DEBUG "PCI: %s reg %x 64bit mmio: [%llx, %llx]\n",
+				pci_name(dev), pos, (unsigned long long)res->start,
+				(unsigned long long)res->end);
 		}
 	} else {
 		sz = pci_size(l, sz, mask);
@@ -313,6 +316,9 @@ static int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type,
 
 		res->start = l;
 		res->end = l + sz;
+		printk(KERN_DEBUG "PCI: %s reg %x %s: [%llx, %llx]\n", pci_name(dev),
+			pos, (res->flags & IORESOURCE_IO) ? "io port":"32bit mmio",
+			(unsigned long long)res->start, (unsigned long long)res->end);
 	}
 
  out:
@@ -383,7 +389,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
 			res->start = base;
 		if (!res->end)
 			res->end = limit + 0xfff;
-		printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n",
+		printk(KERN_DEBUG "PCI: bridge %s io port: [%llx, %llx]\n",
 			pci_name(dev), (unsigned long long) res->start,
 			(unsigned long long) res->end);
 	}
@@ -397,8 +403,9 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
 		res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM;
 		res->start = base;
 		res->end = limit + 0xfffff;
-		printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev),
-			(unsigned long long) res->start, (unsigned long long) res->end);
+		printk(KERN_DEBUG "PCI: bridge %s 32bit mmio: [%llx, %llx]\n",
+			pci_name(dev), (unsigned long long) res->start,
+			(unsigned long long) res->end);
 	}
 
 	res = child->resource[2];
@@ -434,7 +441,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
 		res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH;
 		res->start = base;
 		res->end = limit + 0xfffff;
-		printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n",
+		printk(KERN_DEBUG "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n",
 			pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64) ? "64" : "32",
 			(unsigned long long) res->start, (unsigned long long) res->end);
 	}
#1 lore raw
Quoted 8 lines · Yinghai Lu

print out for Device BAR address before kernel try to update them.

also change it to KERN_DEBUG instead...

v2: update to linux-pci next
also add (unsigned long long) cast

Jesse, if you want to pick it up, could we please do this via git methods (git-pull and stuff)? The commit below is the one in -tip - should i separate it out?

Ingo

----------->
commit ca81beb4a340ee690803fcb1498f863d0e68843f

Author: Yinghai Lu <[email protected]>
Date:   Thu Sep 4 20:57:15 2008 +0200

pci: fix BAR print out

print out device BAR address before kernel tries to update them.

also change it to KERN_DEBUG instead...

#2 lore raw
Quoted 5 lines · Ingo Molnar
Quoted 4 lines · Yinghai Lu

print out for Device BAR address before kernel try to update them.

also change it to KERN_DEBUG instead...

Quoted 8 lines
Quoted 4 lines

v2: update to linux-pci next
also add (unsigned long long) cast

Jesse, if you want to pick it up, could we please do this via git methods (git-pull and stuff)? The commit below is the one in -tip - should i separate it out?

Sure, though I'm not sure why I shouldn't just be applying this stuff to my tree first... Seems weird to pull from you only to then ask Linus to pull.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
author
#3 lore raw
Quoted 9 lines · Jesse Barnes
Quoted 8 lines · Ingo Molnar
Quoted 7 lines · Yinghai Lu

print out for Device BAR address before kernel try to update them.

also change it to KERN_DEBUG instead...

v2: update to linux-pci next
also add (unsigned long long) cast

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Jesse, if you want to pick it up, could we please do this via git methods (git-pull and stuff)? The commit below is the one in -tip - should i separate it out?

Sure, though I'm not sure why I shouldn't just be applying this stuff to my tree first... Seems weird to pull from you only to then ask Linus to pull.

there is another patch applied to linux-pci next for cast some resource_t to unsigned-long-long...

anyway, v2 could be applied to linux-pci cleanly.

YH

#4 lore raw
In reply to Jesse Barnes
Quoted 11 lines · Jesse Barnes
Quoted 10 lines · Ingo Molnar
Quoted 8 lines · Yinghai Lu

print out for Device BAR address before kernel try to update them.

also change it to KERN_DEBUG instead...

v2: update to linux-pci next
also add (unsigned long long) cast

Quoted 7 lines
Quoted 3 lines

Jesse, if you want to pick it up, could we please do this via git methods (git-pull and stuff)? The commit below is the one in -tip - should i separate it out?

Sure, though I'm not sure why I shouldn't just be applying this stuff to my tree first... Seems weird to pull from you only to then ask Linus to pull.

sure - it's just that it all happened weeks ago so it's intermixed. As long as you dont mind the duplicate commit (git will sort it out fine) we can apply it to both trees.

Ingo

#5 lore raw
Quoted 16 lines · Ingo Molnar
Quoted 15 lines · Jesse Barnes
Quoted 13 lines · Ingo Molnar
Quoted 8 lines · Yinghai Lu

print out for Device BAR address before kernel try to update them.

also change it to KERN_DEBUG instead...

v2: update to linux-pci next
also add (unsigned long long) cast

Jesse, if you want to pick it up, could we please do this via git methods (git-pull and stuff)? The commit below is the one in -tip - should i separate it out?

Quoted 7 lines
Quoted 3 lines

Sure, though I'm not sure why I shouldn't just be applying this stuff to my tree first... Seems weird to pull from you only to then ask Linus to pull.

sure - it's just that it all happened weeks ago so it's intermixed. As long as you dont mind the duplicate commit (git will sort it out fine) we can apply it to both trees.

Ah I see, sure I can pull your bits. /me gets out his breadcrumbs in preparation for entering the x86 forest. Does your -tip just contain stuff you're sending to Linus for 2.6.27?

Thanks,

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#6 lore raw
Quoted 21 lines · Jesse Barnes
Quoted 20 lines · Ingo Molnar
Quoted 18 lines · Jesse Barnes
Quoted 5 lines · Ingo Molnar
Quoted 4 lines · Yinghai Lu

print out for Device BAR address before kernel try to update them.

also change it to KERN_DEBUG instead...

Quoted 8 lines
Quoted 4 lines

v2: update to linux-pci next
also add (unsigned long long) cast

Jesse, if you want to pick it up, could we please do this via git methods (git-pull and stuff)? The commit below is the one in -tip - should i separate it out?

Sure, though I'm not sure why I shouldn't just be applying this stuff to my tree first... Seems weird to pull from you only to then ask Linus to pull.

Quoted 7 lines
Quoted 3 lines

sure - it's just that it all happened weeks ago so it's intermixed. As long as you dont mind the duplicate commit (git will sort it out fine) we can apply it to both trees.

Ah I see, sure I can pull your bits. /me gets out his breadcrumbs in preparation for entering the x86 forest. Does your -tip just contain stuff you're sending to Linus for 2.6.27?

no, the .27 buckets of -tip are almost completely emptied - we are in the final stages of .27 stabilization. -tip includes all the v2.6.28 bits. (which this patch would be too IMHO)

anyway, there's no big issue here i think, upstream -git is fine i think, please apply the patch to your tree (it only changes printouts), it should not cause any big conflicts.

Ingo

#7 lore raw
Quoted 11 lines · Ingo Molnar
Quoted 3 lines

Ah I see, sure I can pull your bits. /me gets out his breadcrumbs in preparation for entering the x86 forest. Does your -tip just contain stuff you're sending to Linus for 2.6.27?

no, the .27 buckets of -tip are almost completely emptied - we are in the final stages of .27 stabilization. -tip includes all the v2.6.28 bits. (which this patch would be too IMHO)

anyway, there's no big issue here i think, upstream -git is fine i think, please apply the patch to your tree (it only changes printouts), it should not cause any big conflicts.

I was thinking it would be good to have this in 2.6.27 since it's a regression vs. earlier kernels. Anyway I'll apply the patch and let git sort out the duplication.

Thanks,

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center