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


Groups > linux.kernel > #1313248

Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code.

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device companion assignment to core code.
Date Wed, 20 Jan 2016 15:30:02 +0100
Message-ID <qT1VM-7Ky-15@gated-at.bofh.it> (permalink)
References <qQtES-hT-3@gated-at.bofh.it> <qQtET-hT-41@gated-at.bofh.it> <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>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.21 (2010-09-15)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 32
Organization linux.* mail to news gateway
X-Original-Cc bhelgaas@google.com, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rjw@rjwysocki.net, hanjun.guo@linaro.org, okaya@codeaurora.org, jiang.liu@linux.intel.com, Stefano.Stabellini@eu.citrix.com, robert.richter@caviumnetworks.com, mw@semihalf.com, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, tglx@linutronix.de, wangyijing@huawei.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, jchandra@broadcom.com, jcm@redhat.com
X-Original-Date Wed, 20 Jan 2016 14:22:43 +0000
X-Original-Message-ID <20160120142243.GB13437@red-moon>
X-Original-References <1452691267-32240-1-git-send-email-tn@semihalf.com> <1452691267-32240-12-git-send-email-tn@semihalf.com> <20160119160224.GD5276@red-moon> <569F6D67.5000000@semihalf.com> <20160120123849.GA13437@red-moon> <569F8E38.5030101@semihalf.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1313248

Show key headers only | View raw


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.

Thanks,
Lorenzo

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


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