Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1381538 > unrolled thread

[RFC v6 01/10] PCI: Ignore resource_alignment if PCI_PROBE_ONLY was set

Started byYongji Xie <xyjxie@linux.vnet.ibm.com>
First post2016-04-18 13:00 +0200
Last post2016-04-18 13:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [RFC v6 01/10] PCI: Ignore resource_alignment if PCI_PROBE_ONLY was set Yongji Xie <xyjxie@linux.vnet.ibm.com> - 2016-04-18 13:00 +0200

#1381538 — [RFC v6 01/10] PCI: Ignore resource_alignment if PCI_PROBE_ONLY was set

FromYongji Xie <xyjxie@linux.vnet.ibm.com>
Date2016-04-18 13:00 +0200
Subject[RFC v6 01/10] PCI: Ignore resource_alignment if PCI_PROBE_ONLY was set
Message-ID<rpf4m-46M-15@gated-at.bofh.it>
The resource_alignment will releases memory resources allocated
by firmware so that kernel can reassign new resources later on.
But this will cause the problem that no resources can be
allocated by kernel if PCI_PROBE_ONLY was set, e.g. on pSeries
platform because PCI_PROBE_ONLY force kernel to use firmware
setup and not to reassign any resources.

To solve this problem, this patch ignores resource_alignment
if PCI_PROBE_ONLY was set.

Signed-off-by: Yongji Xie <xyjxie@linux.vnet.ibm.com>
---
 drivers/pci/pci.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 602eb42..77b7494 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4607,6 +4607,12 @@ static resource_size_t pci_specified_resource_alignment(struct pci_dev *dev)
 	spin_lock(&resource_alignment_lock);
 	p = resource_alignment_param;
 	while (*p) {
+		if (pci_has_flag(PCI_PROBE_ONLY)) {
+			printk(KERN_ERR "PCI: Ignore resource_alignment parameter: %s with PCI_PROBE_ONLY set\n",
+					p);
+			*p = 0;
+			break;
+		}
 		count = 0;
 		if (sscanf(p, "%d%n", &align_order, &count) == 1 &&
 							p[count] == '@') {
-- 
1.7.9.5

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web