Skip to contentSkip to conversation

ACPI based PCI/PCIe bridge hotplug

DISCUSSION Guenter Roeck 3 participants 6 messages Feb 28, 2013 1 message not in the archive PCI

lore
Share & tools
lore
#0 lore raw

Hi all,

we had a discussion about ACPI hotplug today at work. Someone claimed that ACPI would not support PCI/PCIe bridge hotplug.

I don't know much about ACPI, but that seemed like a surprising limitation to me. After a little research, I found that the ACPI hotplug code seems to support it, and Microsoft was talking about adding it to Vista back in 2003.

So ... just for my education, I have a couple of questions: Does ACPI support PCI/PCIe bridge hotplug or not ? And if it does, are there any limitations ?

Thanks,
Guenter

#1 lore raw
Quoted 11 lines · Guenter Roeck

Hi all,

we had a discussion about ACPI hotplug today at work. Someone claimed that ACPI would not support PCI/PCIe bridge hotplug.

I don't know much about ACPI, but that seemed like a surprising limitation to me. After a little research, I found that the ACPI hotplug code seems to support it, and Microsoft was talking about adding it to Vista back in 2003.

So ... just for my education, I have a couple of questions: Does ACPI support PCI/PCIe bridge hotplug or not ? And if it does, are there any limitations ?

Yes, Linux kernel support that via acpiphp.

but that will more rely on bios do the right job in ACPI DSDT.

Also need to make sure BIOS have leave enough bus number range and io/mmio range.

Kernel also have pciehp for pcie hotplug.

Current kernel have some problem with loading sequence of acpiphp and pciehp, but it will be solved.

Thanks

Yinghai

#2 lore raw
Quoted 13 lines · Yinghai Lu
Quoted 11 lines · Guenter Roeck

Hi all,

we had a discussion about ACPI hotplug today at work. Someone claimed that ACPI would not support PCI/PCIe bridge hotplug.

I don't know much about ACPI, but that seemed like a surprising limitation to me. After a little research, I found that the ACPI hotplug code seems to support it, and Microsoft was talking about adding it to Vista back in 2003.

So ... just for my education, I have a couple of questions: Does ACPI support PCI/PCIe bridge hotplug or not ? And if it does, are there any limitations ?

Quoted 9 lines

Yes, Linux kernel support that via acpiphp.

but that will more rely on bios do the right job in ACPI DSDT.

Also need to make sure BIOS have leave enough bus number range and io/mmio range.

Kernel also have pciehp for pcie hotplug.

Exactly what I thought.

Thanks a lot for the clarification.

Guenter

[ Bjorn, sorry I dropped you from the Cc:, but my e-mail provider and Google
still don't like each other ]

#3 lore raw
Quoted 2 lines · Guenter Roeck

[ Bjorn, sorry I dropped you from the Cc:, but my e-mail provider and Google
still don't like each other ]

I also observe that emails from Bjorn often end up in gmail's SPAM folder while lots of other emails coming also from linux-pci, lkml, etc. do get through into Inbox. Don't know why. Just to let you know. Moving them out of SPAM folder into Inbox does not seem to teach gmail.

Martin
[Bjorn in Bcc:] ;-)

#4 lore raw
Quoted 10 lines · Martin Mokrejs
Quoted 2 lines · Guenter Roeck

[ Bjorn, sorry I dropped you from the Cc:, but my e-mail provider and Google
still don't like each other ]

I also observe that emails from Bjorn often end up in gmail's SPAM folder while lots of other emails coming also from linux-pci, lkml, etc. do get through into Inbox. Don't know why. Just to let you know. Moving them out of SPAM folder into Inbox does not seem to teach gmail.

That isn't the problem here. Goole's e-mail server either considers my e-mail address to be a spam source, or it considers my e-mail provider's IP address to be a spam source, and rejects acceptance of e-mails immediately with a 550 error. I can not even send it and get

msmtp: recipient address [email protected] not accepted by the server
msmtp: server message: 550 sorry, no mailbox here by that name (#5.1.1)
msmtp: could not send mail (account default from /etc/msmtprc)

immediately when I try. That happens with all e-mail I send to google.com.

Guenter

#6 lore raw
In reply to a message not in the archive
Quoted 8 lines · Wei Yang
Quoted 7 lines · Yinghai Lu

Yes, Linux kernel support that via acpiphp.

but that will more rely on bios do the right job in ACPI DSDT.

Also need to make sure BIOS have leave enough bus number range and io/mmio range.

Quoted 8 lines
Quoted 1 line

Kernel also have pciehp for pcie hotplug.

In the function named register_slot, device_is_managed_by_native_pciehp() is called.

Does this means pciehp and acpiphp are two drivers who has the same functionality? They couldn't work at the same time? For acpiphp I guess the hot-plug events is generated by ACPI. While how about the pciehp?

Yes. for pcie devices, if BIOS have complete hotplug support in ACPI code.

BIOS _OSC implementation has various problems.

So several years ago, Rafael change code with pci root bus to set OSC at same time for aer, pme, pciehp.

That causes problem that acpiphp can not get enabled because device_is_managed_by_native_pciehp()
will stop that to hold device for pciehp.
Need user to specify some command line to disable _OSC setting for the whole root bus.

We already know some chipset (silicon) has problem with pciehp, because it does not report
surprise removal/ present change correctly.

Quoted 3 lines

Also they seems to use the same interface in /sys/bus/pci/slots to represents the hot-plugable nodes.

yes, drivers/acpi/pci_slot.c will present that interface too, and it have reference count.
and when acpiphp or pciehp is loaded later, it could change slot name there.

Thanks

Yinghai