Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1313263
| From | Tomasz Nowicki <tn@semihalf.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code. |
| Date | 2016-01-20 15:50 +0100 |
| Message-ID | <qT2f7-7Ty-1@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <qSH11-1Nb-37@gated-at.bofh.it> <qSZ7z-5Eb-5@gated-at.bofh.it> <qT0dl-6mw-37@gated-at.bofh.it> <qT1j4-7c8-11@gated-at.bofh.it> <qT1VM-7Ky-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 20.01.2016 15:22, Lorenzo Pieralisi wrote: > On Wed, Jan 20, 2016 at 02:40:08PM +0100, Tomasz Nowicki wrote: > > [...] > >>>>>> + /* Root bridge device needs to be sure of parent ACPI type */ >>>>>> + ACPI_COMPANION_SET(&device->dev, device); >>>>> >>>>> I do not understand why the code above is needed, can you elaborate >>>>> please ? >>>>> >>>> >>>> This makes sure that device->dev can be identified as ACPI device, >>>> so we can use to_acpi_device_node() and assign companion safely >>>> below. >>> >>> I do not follow. If you refer to the fwnode handle type, that is >>> already set by ACPI core code (before acpi_pci_root_add() is called, >>> in acpi_init_device_object()). >> >> acpi_init_device_object() sets ACPI fwnode handle type only for >> "device", but not for "device->dev" which is what is passed as an >> argument to pci_create_root_bus(). >> >> Without ACPI_COMPANION_SET(&device->dev, device) here, no one can be >> sure if we have ACPI device in pci_create_root_bus(). > > Ok, got it. The question is whether this should be done in ACPI > core instead (is there a reason why it should *not* be done ?), but I > now understand your point. > I am not able to answer that question, but I see lots of changes in this area made by Rafael. Rafael, can you please shed some light on this? Thanks, Tomasz
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code. Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-01-19 17:10 +0100
Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code. Tomasz Nowicki <tn@semihalf.com> - 2016-01-20 12:30 +0100
Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code. Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-01-20 13:40 +0100
Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code. Tomasz Nowicki <tn@semihalf.com> - 2016-01-20 14:50 +0100
Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code. Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-01-20 15:30 +0100
Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code. Tomasz Nowicki <tn@semihalf.com> - 2016-01-20 15:50 +0100
Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code. Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2016-01-27 18:50 +0100
csiph-web