linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: <suravee.suthikulpanit@amd.com>
To: <bhelgaas@google.com>, <linux-pci@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Borislav Petkov <bp@suse.de>, "Robert Richter" <rric@kernel.org>,
	Daniel J Blueman <daniel@numascale.com>,
	Andreas Herrmann <herrmann.der.user@googlemail.com>,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
	Myron Stowe <myron.stowe@redhat.com>
Subject: [PATCH V4 1/4] x86/PCI: Fix PCI root numa_node info on AMD family15h
Date: Thu, 8 May 2014 11:44:18 -0500	[thread overview]
Message-ID: <1399567461-15928-2-git-send-email-suravee.suthikulpanit@amd.com> (raw)
In-Reply-To: <1399567461-15928-1-git-send-email-suravee.suthikulpanit@amd.com>

From: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>

This patch fixes the numa_node information in sysfs for PCI root
on AMD family15h platforms (currently showing -1) by adding
the hostbridge in the list of probed devices to be used for initializing
pci_root_info structue.

Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
Tested-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Robert Richter <rric@kernel.org>
Cc: Daniel J Blueman <daniel@numascale.com>
Cc: Andreas Herrmann <herrmann.der.user@googlemail.com>
---
 arch/x86/pci/amd_bus.c | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/arch/x86/pci/amd_bus.c b/arch/x86/pci/amd_bus.c
index e88f4c5..330dbfe 100644
--- a/arch/x86/pci/amd_bus.c
+++ b/arch/x86/pci/amd_bus.c
@@ -24,10 +24,11 @@ struct pci_hostbridge_probe {
 };
 
 static struct pci_hostbridge_probe pci_probes[] __initdata = {
-	{ 0, 0x18, PCI_VENDOR_ID_AMD, 0x1100 },
-	{ 0, 0x18, PCI_VENDOR_ID_AMD, 0x1200 },
-	{ 0xff, 0, PCI_VENDOR_ID_AMD, 0x1200 },
-	{ 0, 0x18, PCI_VENDOR_ID_AMD, 0x1300 },
+	{ 0, 0x18, PCI_VENDOR_ID_AMD, 0x1100 }, /* K8 */
+	{ 0, 0x18, PCI_VENDOR_ID_AMD, 0x1200 }, /* Fam10h */
+	{ 0xff, 0, PCI_VENDOR_ID_AMD, 0x1200 }, /* Fam10h */
+	{ 0, 0x18, PCI_VENDOR_ID_AMD, 0x1300 }, /* Fam11h */
+	{ 0, 0x18, PCI_VENDOR_ID_AMD, 0x1600 }, /* Fam15h */
 };
 
 #define RANGE_NUM 16
@@ -113,6 +114,13 @@ static int __init early_fill_mp_bus_info(void)
 		info = alloc_pci_root_info(min_bus, max_bus, node, link);
 	}
 
+	/*
+	 * The following code is only supported until Fam11h.
+	 * Newer processors will depend on ACPI MCFG table instead.
+	 */
+	if (boot_cpu_data.x86 > 0x11)
+		return 0;
+
 	/* get the default node and link for left over res */
 	reg = read_pci_config(bus, slot, 0, 0x60);
 	def_node = (reg >> 8) & 0x07;
-- 
1.9.0


  reply	other threads:[~2014-05-08 16:44 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08 16:44 [PATCH V4 0/4] x86/pci Fix numa_node info for AMD hostbridge and misc clean up suravee.suthikulpanit
2014-05-08 16:44 ` suravee.suthikulpanit [this message]
2014-05-08 16:44 ` [PATCH V4 2/4] x86/PCI: Clean up and mark early_root_info_init as deprecated suravee.suthikulpanit
2014-05-08 16:44 ` [PATCH V4 3/4] ACPI/PCI: Warn if we have to "guess" host bridge node information suravee.suthikulpanit
2014-05-08 16:44 ` [PATCH V4 4/4] X86/PCI: Remove unnecessary 'quirk_amd_nb_node' suravee.suthikulpanit
2014-05-14  5:54 ` [PATCH V4 0/4] x86/pci Fix numa_node info for AMD hostbridge and misc clean up Suravee Suthikulpanit
2014-05-14 13:11   ` Bjorn Helgaas
2014-05-21 23:17 ` [PATCH V5 " Bjorn Helgaas
2014-05-21 23:18   ` [PATCH V5 1/4] x86/PCI: Warn if we have to "guess" host bridge node information Bjorn Helgaas
2014-05-21 23:18   ` [PATCH V5 2/4] x86/PCI: Work around AMD Fam15h BIOSes that fail to provide _PXM Bjorn Helgaas
2014-05-21 23:18   ` [PATCH V5 3/4] x86/PCI: Stop enabling ECS for AMD CPUs after Fam16h Bjorn Helgaas
2014-05-21 23:38     ` Borislav Petkov
2014-05-22 17:56       ` Bjorn Helgaas
2014-05-22 19:17         ` Borislav Petkov
2014-05-22 20:20           ` Bjorn Helgaas
2014-05-22 21:00             ` Borislav Petkov
2014-05-22 23:39             ` Suravee Suthikulanit
2014-05-23  2:54               ` Bjorn Helgaas
2014-05-23 11:56                 ` Robert Richter
2014-05-23 13:01                   ` Bjorn Helgaas
2014-05-23 15:05                     ` Robert Richter
2014-05-23 21:36                   ` Suravee Suthikulanit
2014-05-24  0:31                 ` Suravee Suthikulanit
2014-05-28 16:02                   ` Bjorn Helgaas
2014-05-21 23:18   ` [PATCH V5 4/4] x86/PCI: Clean up and mark early_root_info_init() as deprecated Bjorn Helgaas
2014-05-23  0:43   ` [PATCH V5 0/4] x86/pci Fix numa_node info for AMD hostbridge and misc clean up Suravee Suthikulanit
2014-05-23  0:49   ` Suravee Suthikulanit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399567461-15928-2-git-send-email-suravee.suthikulpanit@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=bhelgaas@google.com \
    --cc=bp@suse.de \
    --cc=daniel@numascale.com \
    --cc=herrmann.der.user@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=myron.stowe@redhat.com \
    --cc=rric@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).