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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <546B1CA6.1030300@linaro.org>
Date:	Tue, 18 Nov 2014 11:17:10 +0100
From:	Tomasz Nowicki <tomasz.nowicki@...aro.org>
To:	Arnd Bergmann <arnd@...db.de>, linaro-acpi@...ts.linaro.org
CC:	linux-arm-kernel@...ts.infradead.org, rjw@...ysocki.net,
	linux-pci@...r.kernel.org, catalin.marinas@....com, x86@...nel.org,
	Liviu.Dudau@....com, linux-kernel@...r.kernel.org,
	will.deacon@....com, linux-acpi@...r.kernel.org, mingo@...hat.com,
	hpa@...or.com, bhelgaas@...gle.com, tglx@...utronix.de
Subject: Re: [Linaro-acpi] [RFC PATCH 4/4] arm64, acpi, pci: Provide arch-specific
 calls for PCI host bridge dirver (PNP0A03).

On 14.11.2014 15:53, Arnd Bergmann wrote:
> On Friday 14 November 2014 15:10:12 Tomasz Nowicki wrote:
>> On 07.11.2014 15:24, Arnd Bergmann wrote:
>>> On Friday 07 November 2014 14:27:56 Tomasz Nowicki wrote:
>>>>
>>>>    #ifdef CONFIG_PCI
>>>> +struct pci_controller {
>>>> +	struct acpi_device *companion;
>>>> +	int segment;
>>>> +	int node;		/* nearest node with memory or NUMA_NO_NODE for global allocation */
>>>> +};
>>>> +
>>>> +#define PCI_CONTROLLER(busdev) ((struct pci_controller *) busdev->sysdata)
>>>> +
>>>
>>> Don't use busdev->sysdata in architecture specific code, it belongs to the
>>> host bridge driver with the new model. For ACPI you don't have a host bridge
>>> driver, but it's better to keep these separate.
>>>
>>> The segment is always the same as the domain number, so just use that.
>>> The node and companion members here can get added to struct pci_host_bridge.
>>
>> The reason why I put segment field to struct pci_controller is to
>> initialize domain_nr of struct pci_bus being in pci_create_root_bus(),
>> domain_nr can be used later on though. Correct me I am wrong.
>>
>> Honestly I do not see the way to create root bus without e.g.
>> sysdata.segment here.
>
> See the patches that Liviu and Lorenzo have been posting recently. This
> should be straightforward in 3.19.

Hi Arnd,

I have been looking into patch (if that what you meant) :
[RFC PATCH v2] drivers: pci: move PCI domain assignment to generic PCI code

This is not enough for me since it gets domain number from its OF parent 
or just uses sequential increased domain number. In my case, I do not 
have parent so I need to get segment from ACPI node which is not 
available there.

On the other hand, patch set posted by Wang Yijing:
[RFC PATCH 00/16] Refine PCI host bridge scan interfaces
tends to solve that issue.

What would be the best way for this patch, keep busdev->sysdata usage 
and rebase once Wang Yijing patch set will be accepted?

Regards,
Tomasz



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ