lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160120123849.GA13437@red-moon>
Date:	Wed, 20 Jan 2016 12:38:49 +0000
From:	Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To:	Tomasz Nowicki <tn@...ihalf.com>
Cc:	bhelgaas@...gle.com, arnd@...db.de, will.deacon@....com,
	catalin.marinas@....com, rjw@...ysocki.net, hanjun.guo@...aro.org,
	okaya@...eaurora.org, jiang.liu@...ux.intel.com,
	Stefano.Stabellini@...citrix.com,
	robert.richter@...iumnetworks.com, mw@...ihalf.com,
	Liviu.Dudau@....com, ddaney@...iumnetworks.com, tglx@...utronix.de,
	wangyijing@...wei.com, Suravee.Suthikulpanit@....com,
	msalter@...hat.com, linux-pci@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org, linaro-acpi@...ts.linaro.org,
	jchandra@...adcom.com, jcm@...hat.com
Subject: Re: [PATCH V3 11/21] pci, acpi: Move ACPI host bridge device
 companion assignment to core code.

On Wed, Jan 20, 2016 at 12:20:07PM +0100, Tomasz Nowicki wrote:
> On 19.01.2016 17:02, Lorenzo Pieralisi wrote:
> >On Wed, Jan 13, 2016 at 02:20:57PM +0100, Tomasz Nowicki wrote:
> [...]
> >>device via pci_create_root_bus parameter (as the ACPI device type)
> >
> >I do not understand what you mean by "as the ACPI device type".
> 
> See below.
> 
> >
> >>and using ACPI_COMPANION_SET in core code for ACPI boot method.
> >>ACPI_COMPANION_SET is safe to run for all cases DT, ACPI and DT&ACPI.
> >>
> >>Suggested-by: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
> >>Signed-off-by: Tomasz Nowicki <tn@...ihalf.com>
> >>---
> >>  drivers/acpi/pci_root.c | 5 ++++-
> >>  drivers/pci/probe.c     | 2 ++
> >>  2 files changed, 6 insertions(+), 1 deletion(-)
> >>
> >>diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
> >>index ae3fe4e..a65c8c2 100644
> >>--- a/drivers/acpi/pci_root.c
> >>+++ b/drivers/acpi/pci_root.c
> >>@@ -846,7 +846,10 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
> >>
> >>  	pci_acpi_root_add_resources(info);
> >>  	pci_add_resource(&info->resources, &root->secondary);
> >>-	bus = pci_create_root_bus(NULL, busnum, ops->pci_ops,
> >>+
> >>+	/* 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()).

Did you add the code above to solve a real issue you encountered ?

Thanks,
Lorenzo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ