Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-16 Thread John Garry
On 16/02/2018 14:42, Andy Shevchenko wrote: On Thu, Feb 15, 2018 at 7:07 PM, John Garry wrote: On 14/02/2018 16:16, Andy Shevchenko wrote: + list_for_each_entry(rentry, _list, node) + resources[count++] = *rentry->res; It has similarities with

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-16 Thread John Garry
On 16/02/2018 14:42, Andy Shevchenko wrote: On Thu, Feb 15, 2018 at 7:07 PM, John Garry wrote: On 14/02/2018 16:16, Andy Shevchenko wrote: + list_for_each_entry(rentry, _list, node) + resources[count++] = *rentry->res; It has similarities with

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-16 Thread Andy Shevchenko
On Thu, Feb 15, 2018 at 7:07 PM, John Garry wrote: > On 14/02/2018 16:16, Andy Shevchenko wrote: > >>> + list_for_each_entry(rentry, _list, node) > >>> + resources[count++] = *rentry->res; >> It has similarities with

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-16 Thread Andy Shevchenko
On Thu, Feb 15, 2018 at 7:07 PM, John Garry wrote: > On 14/02/2018 16:16, Andy Shevchenko wrote: > >>> + list_for_each_entry(rentry, _list, node) > >>> + resources[count++] = *rentry->res; >> It has similarities with acpi_create_platform_device(). >> I

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
On 14/02/2018 16:16, Andy Shevchenko wrote: Another approach is to use ~0UL if that is preferable. >>> + list_for_each_entry(rentry, _list, node) >>> + resources[count++] = *rentry->res; >> It has similarities with acpi_create_platform_device(). >> I guess we can utilize

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
On 14/02/2018 16:16, Andy Shevchenko wrote: Another approach is to use ~0UL if that is preferable. >>> + list_for_each_entry(rentry, _list, node) >>> + resources[count++] = *rentry->res; >> It has similarities with acpi_create_platform_device(). >> I guess we can utilize

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
On 15/02/2018 11:47, Rafael J. Wysocki wrote: On Thu, Feb 15, 2018 at 12:19 PM, John Garry wrote: Nothing apart from only being used by arm64 platforms today, which is circumstantial. I understand you need to find a place to add the: acpi_indirect_io_scan_init() to

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
On 15/02/2018 11:47, Rafael J. Wysocki wrote: On Thu, Feb 15, 2018 at 12:19 PM, John Garry wrote: Nothing apart from only being used by arm64 platforms today, which is circumstantial. I understand you need to find a place to add the: acpi_indirect_io_scan_init() to be called from core

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread Andy Shevchenko
On Thu, Feb 15, 2018 at 2:52 PM, John Garry wrote: > On 15/02/2018 12:22, Andy Shevchenko wrote: >> On Thu, Feb 15, 2018 at 1:19 PM, John Garry wrote: >>> +static const struct acpi_device_id indirect_io_hosts[] = { >>> +{"HISI0191", 0},/*

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread Andy Shevchenko
On Thu, Feb 15, 2018 at 2:52 PM, John Garry wrote: > On 15/02/2018 12:22, Andy Shevchenko wrote: >> On Thu, Feb 15, 2018 at 1:19 PM, John Garry wrote: >>> +static const struct acpi_device_id indirect_io_hosts[] = { >>> +{"HISI0191", 0},/* HiSilicon LPC host */ >>> +{}, >> >> >> Just

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
On 15/02/2018 12:22, Andy Shevchenko wrote: On Thu, Feb 15, 2018 at 1:19 PM, John Garry wrote: Hi Andy, +static const struct acpi_device_id indirect_io_hosts[] = { +{"HISI0191", 0},/* HiSilicon LPC host */ +{}, Just a nit. I noticed that I have this

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
On 15/02/2018 12:22, Andy Shevchenko wrote: On Thu, Feb 15, 2018 at 1:19 PM, John Garry wrote: Hi Andy, +static const struct acpi_device_id indirect_io_hosts[] = { +{"HISI0191", 0},/* HiSilicon LPC host */ +{}, Just a nit. I noticed that I have this in the LLDD also. I

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread Lorenzo Pieralisi
On Thu, Feb 15, 2018 at 12:47:25PM +0100, Rafael J. Wysocki wrote: > On Thu, Feb 15, 2018 at 12:19 PM, John Garry wrote: > >> Nothing apart from only being used by arm64 platforms today, which is > >> circumstantial. > >> > >>> > >>> I understand you need to find a place to

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread Lorenzo Pieralisi
On Thu, Feb 15, 2018 at 12:47:25PM +0100, Rafael J. Wysocki wrote: > On Thu, Feb 15, 2018 at 12:19 PM, John Garry wrote: > >> Nothing apart from only being used by arm64 platforms today, which is > >> circumstantial. > >> > >>> > >>> I understand you need to find a place to add the: > >>> > >>>

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread Andy Shevchenko
On Thu, Feb 15, 2018 at 1:19 PM, John Garry wrote: > +static const struct acpi_device_id indirect_io_hosts[] = { > +{"HISI0191", 0},/* HiSilicon LPC host */ > +{}, Just a nit. It seems lately this happens more often than usual, I mean a comma in the

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread Andy Shevchenko
On Thu, Feb 15, 2018 at 1:19 PM, John Garry wrote: > +static const struct acpi_device_id indirect_io_hosts[] = { > +{"HISI0191", 0},/* HiSilicon LPC host */ > +{}, Just a nit. It seems lately this happens more often than usual, I mean a comma in the terminator line. If we remove

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread Rafael J. Wysocki
On Thu, Feb 15, 2018 at 12:19 PM, John Garry wrote: >> Nothing apart from only being used by arm64 platforms today, which is >> circumstantial. >> >>> >>> I understand you need to find a place to add the: >>> >>> acpi_indirect_io_scan_init() >>> >>> to be called from core

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread Rafael J. Wysocki
On Thu, Feb 15, 2018 at 12:19 PM, John Garry wrote: >> Nothing apart from only being used by arm64 platforms today, which is >> circumstantial. >> >>> >>> I understand you need to find a place to add the: >>> >>> acpi_indirect_io_scan_init() >>> >>> to be called from core ACPI code because ACPI

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
Nothing apart from only being used by arm64 platforms today, which is circumstantial. I understand you need to find a place to add the: acpi_indirect_io_scan_init() to be called from core ACPI code because ACPI can't handle probe dependencies in any other way but other than that this patch

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-15 Thread John Garry
Nothing apart from only being used by arm64 platforms today, which is circumstantial. I understand you need to find a place to add the: acpi_indirect_io_scan_init() to be called from core ACPI code because ACPI can't handle probe dependencies in any other way but other than that this patch

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread John Garry
On 14/02/2018 16:16, Lorenzo Pieralisi wrote: On Wed, Feb 14, 2018 at 01:45:31AM +0800, John Garry wrote: On some platforms (such as arm64-based hip06/hip07), access to legacy ISA/LPC devices through access IO space is required, similar to x86 platforms. As the I/O for these devices are not

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread John Garry
On 14/02/2018 16:16, Lorenzo Pieralisi wrote: On Wed, Feb 14, 2018 at 01:45:31AM +0800, John Garry wrote: On some platforms (such as arm64-based hip06/hip07), access to legacy ISA/LPC devices through access IO space is required, similar to x86 platforms. As the I/O for these devices are not

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread Andy Shevchenko
On Wed, Feb 14, 2018 at 5:33 PM, John Garry wrote: > On 14/02/2018 13:53, Andy Shevchenko wrote: >> On Tue, Feb 13, 2018 at 7:45 PM, John Garry wrote: >>> + sys_port = logic_pio_trans_hwaddr(>fwnode, res->start, >>> len); >>> + if

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread Andy Shevchenko
On Wed, Feb 14, 2018 at 5:33 PM, John Garry wrote: > On 14/02/2018 13:53, Andy Shevchenko wrote: >> On Tue, Feb 13, 2018 at 7:45 PM, John Garry wrote: >>> + sys_port = logic_pio_trans_hwaddr(>fwnode, res->start, >>> len); >>> + if (sys_port == -1UL) >> Wouldn't it be better to

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread Lorenzo Pieralisi
On Wed, Feb 14, 2018 at 01:45:31AM +0800, John Garry wrote: > On some platforms (such as arm64-based hip06/hip07), access to legacy > ISA/LPC devices through access IO space is required, similar to x86 > platforms. As the I/O for these devices are not memory mapped like > PCI/PCIE MMIO host

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread Lorenzo Pieralisi
On Wed, Feb 14, 2018 at 01:45:31AM +0800, John Garry wrote: > On some platforms (such as arm64-based hip06/hip07), access to legacy > ISA/LPC devices through access IO space is required, similar to x86 > platforms. As the I/O for these devices are not memory mapped like > PCI/PCIE MMIO host

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread John Garry
On 14/02/2018 13:53, Andy Shevchenko wrote: On Tue, Feb 13, 2018 at 7:45 PM, John Garry wrote: On some platforms (such as arm64-based hip06/hip07), access to legacy ISA/LPC devices through access IO space is required, similar to x86 platforms. As the I/O for these

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread John Garry
On 14/02/2018 13:53, Andy Shevchenko wrote: On Tue, Feb 13, 2018 at 7:45 PM, John Garry wrote: On some platforms (such as arm64-based hip06/hip07), access to legacy ISA/LPC devices through access IO space is required, similar to x86 platforms. As the I/O for these devices are not memory mapped

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread Andy Shevchenko
On Tue, Feb 13, 2018 at 7:45 PM, John Garry wrote: > On some platforms (such as arm64-based hip06/hip07), access to legacy > ISA/LPC devices through access IO space is required, similar to x86 > platforms. As the I/O for these devices are not memory mapped like > PCI/PCIE

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread Andy Shevchenko
On Tue, Feb 13, 2018 at 7:45 PM, John Garry wrote: > On some platforms (such as arm64-based hip06/hip07), access to legacy > ISA/LPC devices through access IO space is required, similar to x86 > platforms. As the I/O for these devices are not memory mapped like > PCI/PCIE MMIO host bridges, they

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread John Garry
Signed-off-by: John Garry Signed-off-by: Zhichang Yuan Signed-off-by: Gabriele Paoloni Hi Rafael, Thanks for checking again. Just a few minor nits below. --- drivers/acpi/arm64/Makefile | 1 +

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread John Garry
Signed-off-by: John Garry Signed-off-by: Zhichang Yuan Signed-off-by: Gabriele Paoloni Hi Rafael, Thanks for checking again. Just a few minor nits below. --- drivers/acpi/arm64/Makefile | 1 + drivers/acpi/arm64/acpi_indirectio.c | 250 +++

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread Rafael J. Wysocki
On Tue, Feb 13, 2018 at 6:45 PM, John Garry wrote: > On some platforms (such as arm64-based hip06/hip07), access to legacy > ISA/LPC devices through access IO space is required, similar to x86 > platforms. As the I/O for these devices are not memory mapped like > PCI/PCIE

Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-14 Thread Rafael J. Wysocki
On Tue, Feb 13, 2018 at 6:45 PM, John Garry wrote: > On some platforms (such as arm64-based hip06/hip07), access to legacy > ISA/LPC devices through access IO space is required, similar to x86 > platforms. As the I/O for these devices are not memory mapped like > PCI/PCIE MMIO host bridges, they

[PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-13 Thread John Garry
On some platforms (such as arm64-based hip06/hip07), access to legacy ISA/LPC devices through access IO space is required, similar to x86 platforms. As the I/O for these devices are not memory mapped like PCI/PCIE MMIO host bridges, they require special low-level device operations through some

[PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning

2018-02-13 Thread John Garry
On some platforms (such as arm64-based hip06/hip07), access to legacy ISA/LPC devices through access IO space is required, similar to x86 platforms. As the I/O for these devices are not memory mapped like PCI/PCIE MMIO host bridges, they require special low-level device operations through some