[PATCH] pci: fix merging left out for BAR print out v2

Previous thread: [19.666764] Disabling IRQ #23 by Justin Mattock on Tuesday, September 9, 2008 - 12:08 pm. (3 messages)

Next thread: forcedeth: option to disable 100Hz timer (try 2) by Mikhail Kshevetskiy on Tuesday, September 9, 2008 - 12:34 pm. (2 messages)
From: Yinghai Lu
Date: Tuesday, September 9, 2008 - 12:27 pm

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

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index d8d3f90..e3bddc5 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -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 = ...
From: Ingo Molnar
Date: Wednesday, September 10, 2008 - 1:44 am

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 <yhlu.kernel@gmail.com>
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...

--

From: Jesse Barnes
Date: Wednesday, September 10, 2008 - 10:48 am

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.


-- 
Jesse Barnes, Intel Open Source Technology Center
--

From: Yinghai Lu
Date: Wednesday, September 10, 2008 - 11:01 am

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
--

From: Ingo Molnar
Date: Wednesday, September 10, 2008 - 11:08 am

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
--

From: Jesse Barnes
Date: Wednesday, September 10, 2008 - 11:23 am

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,
-- 
Jesse Barnes, Intel Open Source Technology Center
--

From: Ingo Molnar
Date: Thursday, September 11, 2008 - 12:56 am

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
--

From: Jesse Barnes
Date: Thursday, September 11, 2008 - 9:43 am

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,
-- 
Jesse Barnes, Intel Open Source Technology Center
--

Previous thread: [19.666764] Disabling IRQ #23 by Justin Mattock on Tuesday, September 9, 2008 - 12:08 pm. (3 messages)

Next thread: forcedeth: option to disable 100Hz timer (try 2) by Mikhail Kshevetskiy on Tuesday, September 9, 2008 - 12:34 pm. (2 messages)