linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic
@ 2017-06-14 16:37 Lorenzo Pieralisi
  2017-06-14 16:37 ` [PATCH 2/2] ACPI/IORT: Remove iort_node_match() Lorenzo Pieralisi
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Lorenzo Pieralisi @ 2017-06-14 16:37 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-acpi, Lorenzo Pieralisi, Will Deacon, Hanjun Guo,
	Catalin Marinas, Marc Zyngier, Rafael J. Wysocki

ACPI IORT is an ACPI addendum to describe the connection topology of
devices with IOMMUs and interrupt controllers on ARM64 ACPI systems.

Currently the ACPI IORT Kbuild symbol is selected whenever the Kbuild
symbol ARM_GIC_V3_ITS is enabled, which in turn is selected by ARM64
Kbuild defaults. This makes the logic behind ACPI_IORT selection a bit
twisted and not easy to follow. On ARM64 systems enabling ACPI the
kbuild symbol ACPI_IORT should always be selected in that it is a kernel
layer provided to the ARM64 arch code to parse and enable ACPI firmware
bindings.

Make the ACPI_IORT selection explicit in ARM64 Kbuild and remove the
selection from ARM_GIC_V3_ITS entry, making the ACPI_IORT selection
logic clearer to follow.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Hanjun Guo <hanjun.guo@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Marc Zyngier <marc.zyngier@arm.com>
---
 arch/arm64/Kconfig      | 1 +
 drivers/irqchip/Kconfig | 1 -
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b2024db..2424fb4 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -3,6 +3,7 @@ config ARM64
 	select ACPI_CCA_REQUIRED if ACPI
 	select ACPI_GENERIC_GSI if ACPI
 	select ACPI_GTDT if ACPI
+	select ACPI_IORT if ACPI
 	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
 	select ACPI_MCFG if ACPI
 	select ACPI_SPCR_TABLE if ACPI
diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 478f8ac..4a57b8f 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -39,7 +39,6 @@ config ARM_GIC_V3_ITS
 	bool
 	depends on PCI
 	depends on PCI_MSI
-	select ACPI_IORT if ACPI
 
 config ARM_NVIC
 	bool
-- 
2.10.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ACPI/IORT: Remove iort_node_match()
  2017-06-14 16:37 [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic Lorenzo Pieralisi
@ 2017-06-14 16:37 ` Lorenzo Pieralisi
  2017-06-15  4:01   ` Hanjun Guo
  2017-06-15  3:59 ` [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic Hanjun Guo
  2017-06-15  7:28 ` Marc Zyngier
  2 siblings, 1 reply; 5+ messages in thread
From: Lorenzo Pieralisi @ 2017-06-14 16:37 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: linux-acpi, Lorenzo Pieralisi, Hanjun Guo, Will Deacon,
	Catalin Marinas, Rafael J. Wysocki, Marc Zyngier

Commit 316ca8804ea8 ("ACPI/IORT: Remove linker section for IORT entries
probing") removed the linker section for IORT entries probing.

Since those IORT entries were the only iort_node_match() interface
users, the iort_node_match() became obsolete and can then be removed.

Remove the ACPI IORT iort_node_match() interface from the kernel.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Hanjun Guo <hanjun.guo@linaro.org>
---
 drivers/acpi/arm64/iort.c | 15 ---------------
 include/linux/acpi_iort.h |  2 --
 2 files changed, 17 deletions(-)

diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c
index 797b28d..d048f72 100644
--- a/drivers/acpi/arm64/iort.c
+++ b/drivers/acpi/arm64/iort.c
@@ -234,21 +234,6 @@ static struct acpi_iort_node *iort_scan_node(enum acpi_iort_node_type type,
 	return NULL;
 }
 
-static acpi_status
-iort_match_type_callback(struct acpi_iort_node *node, void *context)
-{
-	return AE_OK;
-}
-
-bool iort_node_match(u8 type)
-{
-	struct acpi_iort_node *node;
-
-	node = iort_scan_node(type, iort_match_type_callback, NULL);
-
-	return node != NULL;
-}
-
 static acpi_status iort_match_node_callback(struct acpi_iort_node *node,
 					    void *context)
 {
diff --git a/include/linux/acpi_iort.h b/include/linux/acpi_iort.h
index 3ff9ace..8379d40 100644
--- a/include/linux/acpi_iort.h
+++ b/include/linux/acpi_iort.h
@@ -31,7 +31,6 @@ void iort_deregister_domain_token(int trans_id);
 struct fwnode_handle *iort_find_domain_token(int trans_id);
 #ifdef CONFIG_ACPI_IORT
 void acpi_iort_init(void);
-bool iort_node_match(u8 type);
 u32 iort_msi_map_rid(struct device *dev, u32 req_id);
 struct irq_domain *iort_get_device_domain(struct device *dev, u32 req_id);
 void acpi_configure_pmsi_domain(struct device *dev);
@@ -41,7 +40,6 @@ void iort_set_dma_mask(struct device *dev);
 const struct iommu_ops *iort_iommu_configure(struct device *dev);
 #else
 static inline void acpi_iort_init(void) { }
-static inline bool iort_node_match(u8 type) { return false; }
 static inline u32 iort_msi_map_rid(struct device *dev, u32 req_id)
 { return req_id; }
 static inline struct irq_domain *iort_get_device_domain(struct device *dev,
-- 
2.10.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic
  2017-06-14 16:37 [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic Lorenzo Pieralisi
  2017-06-14 16:37 ` [PATCH 2/2] ACPI/IORT: Remove iort_node_match() Lorenzo Pieralisi
@ 2017-06-15  3:59 ` Hanjun Guo
  2017-06-15  7:28 ` Marc Zyngier
  2 siblings, 0 replies; 5+ messages in thread
From: Hanjun Guo @ 2017-06-15  3:59 UTC (permalink / raw)
  To: Lorenzo Pieralisi, linux-arm-kernel
  Cc: Marc Zyngier, linux-acpi, Rafael J. Wysocki, Will Deacon,
	Catalin Marinas

On 2017/6/15 0:37, Lorenzo Pieralisi wrote:
> ACPI IORT is an ACPI addendum to describe the connection topology of
> devices with IOMMUs and interrupt controllers on ARM64 ACPI systems.
> 
> Currently the ACPI IORT Kbuild symbol is selected whenever the Kbuild
> symbol ARM_GIC_V3_ITS is enabled, which in turn is selected by ARM64
> Kbuild defaults. This makes the logic behind ACPI_IORT selection a bit
> twisted and not easy to follow. On ARM64 systems enabling ACPI the
> kbuild symbol ACPI_IORT should always be selected in that it is a kernel
> layer provided to the ARM64 arch code to parse and enable ACPI firmware
> bindings.
> 
> Make the ACPI_IORT selection explicit in ARM64 Kbuild and remove the
> selection from ARM_GIC_V3_ITS entry, making the ACPI_IORT selection
> logic clearer to follow.
> 
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Hanjun Guo <hanjun.guo@linaro.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
> ---
>   arch/arm64/Kconfig      | 1 +
>   drivers/irqchip/Kconfig | 1 -
>   2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b2024db..2424fb4 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -3,6 +3,7 @@ config ARM64
>   	select ACPI_CCA_REQUIRED if ACPI
>   	select ACPI_GENERIC_GSI if ACPI
>   	select ACPI_GTDT if ACPI
> +	select ACPI_IORT if ACPI
>   	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
>   	select ACPI_MCFG if ACPI
>   	select ACPI_SPCR_TABLE if ACPI
> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
> index 478f8ac..4a57b8f 100644
> --- a/drivers/irqchip/Kconfig
> +++ b/drivers/irqchip/Kconfig
> @@ -39,7 +39,6 @@ config ARM_GIC_V3_ITS
>   	bool
>   	depends on PCI
>   	depends on PCI_MSI
> -	select ACPI_IORT if ACPI

Make sense to me, IORT also describe SMMU+IO topology. I
give this patch a light test with CONFIG combination compile
test, and see no issues,

Acked-by: Hanjun Guo <hanjun.guo@linaro.org>

Thanks
Hanjun

>   
>   config ARM_NVIC
>   	bool
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] ACPI/IORT: Remove iort_node_match()
  2017-06-14 16:37 ` [PATCH 2/2] ACPI/IORT: Remove iort_node_match() Lorenzo Pieralisi
@ 2017-06-15  4:01   ` Hanjun Guo
  0 siblings, 0 replies; 5+ messages in thread
From: Hanjun Guo @ 2017-06-15  4:01 UTC (permalink / raw)
  To: Lorenzo Pieralisi, linux-arm-kernel
  Cc: Rafael J. Wysocki, linux-acpi, Will Deacon, Marc Zyngier,
	Catalin Marinas

On 2017/6/15 0:37, Lorenzo Pieralisi wrote:
> Commit 316ca8804ea8 ("ACPI/IORT: Remove linker section for IORT entries
> probing") removed the linker section for IORT entries probing.
> 
> Since those IORT entries were the only iort_node_match() interface
> users, the iort_node_match() became obsolete and can then be removed.
> 
> Remove the ACPI IORT iort_node_match() interface from the kernel.
> 
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Hanjun Guo <hanjun.guo@linaro.org>

Nice catch,

Acked-by: Hanjun Guo <hanjun.guo@linaro.org>

Thanks
Hanjun

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic
  2017-06-14 16:37 [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic Lorenzo Pieralisi
  2017-06-14 16:37 ` [PATCH 2/2] ACPI/IORT: Remove iort_node_match() Lorenzo Pieralisi
  2017-06-15  3:59 ` [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic Hanjun Guo
@ 2017-06-15  7:28 ` Marc Zyngier
  2 siblings, 0 replies; 5+ messages in thread
From: Marc Zyngier @ 2017-06-15  7:28 UTC (permalink / raw)
  To: Lorenzo Pieralisi, linux-arm-kernel
  Cc: linux-acpi, Will Deacon, Hanjun Guo, Catalin Marinas,
	Rafael J. Wysocki

On 14/06/17 17:37, Lorenzo Pieralisi wrote:
> ACPI IORT is an ACPI addendum to describe the connection topology of
> devices with IOMMUs and interrupt controllers on ARM64 ACPI systems.
> 
> Currently the ACPI IORT Kbuild symbol is selected whenever the Kbuild
> symbol ARM_GIC_V3_ITS is enabled, which in turn is selected by ARM64
> Kbuild defaults. This makes the logic behind ACPI_IORT selection a bit
> twisted and not easy to follow. On ARM64 systems enabling ACPI the
> kbuild symbol ACPI_IORT should always be selected in that it is a kernel
> layer provided to the ARM64 arch code to parse and enable ACPI firmware
> bindings.
> 
> Make the ACPI_IORT selection explicit in ARM64 Kbuild and remove the
> selection from ARM_GIC_V3_ITS entry, making the ACPI_IORT selection
> logic clearer to follow.
> 
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Hanjun Guo <hanjun.guo@linaro.org>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Marc Zyngier <marc.zyngier@arm.com>

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
-- 
Jazz is not dead. It just smells funny...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-15  7:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-14 16:37 [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic Lorenzo Pieralisi
2017-06-14 16:37 ` [PATCH 2/2] ACPI/IORT: Remove iort_node_match() Lorenzo Pieralisi
2017-06-15  4:01   ` Hanjun Guo
2017-06-15  3:59 ` [PATCH 1/2] ARM64/irqchip: Update ACPI_IORT symbol selection logic Hanjun Guo
2017-06-15  7:28 ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).