All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rui Wang <rui.y.wang@intel.com>
To: bhelgaas@google.com, tglx@linutronix.de, rjw@rjwysocki.net,
	mingo@kernel.org, bp@alien8.de
Cc: torvalds@linux-foundation.org, peterz@infradead.org,
	helgaas@kernel.org, linux-acpi@vger.kernel.org,
	linux-pci@vger.kernel.org, tony.luck@intel.com, x86@kernel.org,
	linux-kernel@vger.kernel.org, rui.y.wang@intel.com
Subject: [PATCH] x86/ioapic: Ignore root bridges without a companion ACPI device
Date: Sat, 10 Sep 2016 23:40:45 +0800	[thread overview]
Message-ID: <1473522046-31329-1-git-send-email-rui.y.wang@intel.com> (raw)

Some PCI root bridges don't have a corresponding ACPI device.
This can be the case on some old platforms. Don't call acpi_ioapic_add()
on these bridges because they can't support ioapic hotplug.

v2: Per Boris's review, removed the unnecessary local var; refined comment

Signed-off-by: Rui Wang <rui.y.wang@intel.com>
Reviewed-by: Borislav Petkov <bp@alien8.de>
---
 drivers/pci/setup-bus.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index ec538d3..8b4e231 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -1855,7 +1855,10 @@ void __init pci_assign_unassigned_resources(void)
 
 	list_for_each_entry(root_bus, &pci_root_buses, node) {
 		pci_assign_unassigned_root_bus_resources(root_bus);
-		acpi_ioapic_add(ACPI_HANDLE(root_bus->bridge));
+
+		/* make sure the root bridge has a companion ACPI device */
+		if (ACPI_HANDLE(root_bus->bridge))
+			acpi_ioapic_add(ACPI_HANDLE(root_bus->bridge));
 	}
 }
 
-- 
1.8.3.1

             reply	other threads:[~2016-09-10 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-10 15:40 Rui Wang [this message]
2016-09-10 17:27 ` [PATCH] x86/ioapic: Ignore root bridges without a companion ACPI device Borislav Petkov
2016-09-10 18:34 ` [tip:x86/apic] " tip-bot for Rui Wang
2016-09-12 21:25 ` [PATCH] " Jon Derrick
2016-09-12 21:43   ` Luck, Tony
2016-09-12 21:46     ` Jon Derrick

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=1473522046-31329-1-git-send-email-rui.y.wang@intel.com \
    --to=rui.y.wang@intel.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=helgaas@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.