Skip to contentSkip to conversation

acpi: apei: Bug fix to enable APEI support for ARMv8

PATCH In review Loc Ho 4 participants 8 messages Jan 21, 2016 – Jan 26, 2016 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Loc Ho

author
#0 lore raw

v4 cover acpi: apei: Bug fix to enable APEI support for ARMv8

v4:
* Update patch commit log for gsi.c patch
* Make change to be 80 column aligned

v3
* Change the title of the patch to reflect the patch
* Completely dropped the driver. Instead, move completely to the FW by accessing the GIC directly.
* Fix a bug with function acpi_gsi_to_irq
* Enable APEI multiple GHES source to share an single external IRQ

v2
* Make all code more generic naming
* Still waiting for comment from Linaro folks on APEI

---
Loc Ho (2):
acpi: Fix proper return code for function acpi_gsi_to_irq
acpi: apei: Enable APEI multiple GHES source to share an single
external IRQ

 drivers/acpi/apei/ghes.c |    3 ++-
 drivers/acpi/gsi.c       |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
author
#1 lore raw

PATCH v4 1/2 acpi: Fix proper return code for function acpi_gsi_to_irq

The function acpi_gsi_to_irq must return 0 on success as the caller ghes_probe expects an 0 for success. This change also matches x86 implementation.

---
 drivers/acpi/gsi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/gsi.c +2 -2
index ee9e0f2..7b109bd 100644
@@ -24,7 +24,7 @@ static struct fwnode_handle *acpi_gsi_domain_id;
  *
  * irq location updated with irq value [>0 on success, 0 on failure]
  *
- * Returns: linux IRQ number on success (>0)
+ * Returns: 0 on success
  *          -EINVAL on failure
  */
 int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
@@ -37,7 +37,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
 	 * *irq == 0 means no mapping, that should
 	 * be reported as a failure
 	 */
-	return (*irq > 0) ? *irq : -EINVAL;
+	return (*irq > 0) ? 0 : -EINVAL;
 }
 EXPORT_SYMBOL_GPL(acpi_gsi_to_irq);
 
Signature · 1 line
1.7.1
author
#2 lore raw

Re: [PATCH v4 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq

Hi,

Quoted 7 lines · Loc Ho

The function acpi_gsi_to_irq must return 0 on success as the caller ghes_probe expects an 0 for success. This change also matches x86 implementation.

Any issue with this version? If not, can this be pulled into 4.5?

-Loc

A message that is not in the archive (sent off-list or not yet received): CAPw-ZTnm5F3Kt+_J6HoNCYbx8R7JVkME5yA9V-hAwRtr8ge9ZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw

Re: [PATCH v4 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq

Loc,

Quoted 8 lines · Loc Ho

Hi,

Quoted 5 lines · Loc Ho

The function acpi_gsi_to_irq must return 0 on success as the caller ghes_probe expects an 0 for success. This change also matches x86 implementation.

Quoted 5 lines
Quoted 2 lines

Any issue with this version? If not, can this be pulled into 4.5?

How is that 4.5 material? Does it fix an observable bug or a regression from a previous? If not, then this is probably to be postponed until 4.6, together with the code that makes use of it.

Thanks,

	M.
Signature · 5 lines
Jazz is not dead. It just smells funny...
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author
#5 lore raw

Re: [PATCH v4 1/2] acpi: Fix proper return code for function acpi_gsi_to_irq

Hi Marc,

Quoted 15 lines · Marc Zyngier

Loc,

Quoted 12 lines · Loc Ho

Hi,

Quoted 7 lines · Loc Ho

The function acpi_gsi_to_irq must return 0 on success as the caller ghes_probe expects an 0 for success. This change also matches x86 implementation.

Quoted 5 lines
Quoted 1 line

Any issue with this version? If not, can this be pulled into 4.5?

How is that 4.5 material? Does it fix an observable bug or a regression from a previous? If not, then this is probably to be postponed until 4.6, together with the code that makes use of it.

Given that this and the other patch are needed for APEI to work with X-Gene, fine with 4.6. Are we just waiting for Rafael to make the final call then?

-Loc

author
#6 lore raw

PATCH v4 2/2 acpi: apei: Enable APEI multiple GHES source to share an single external IRQ

In reply to Loc Ho

This patch allows APEI generic error source table with external IRQ to share an single IRQ.

---
 drivers/acpi/apei/ghes.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/acpi/apei/ghes.c +2 -1
index 3dd9c46..76146c8 100644
@@ -1011,7 +1011,8 @@ static int ghes_probe(struct platform_device *ghes_dev)
 			       generic->header.source_id);
 			goto err_edac_unreg;
 		}
-		rc = request_irq(ghes->irq, ghes_irq_func, 0, "GHES IRQ", ghes);
+		rc = request_irq(ghes->irq, ghes_irq_func, IRQF_SHARED,
+				 "GHES IRQ", ghes);
 		if (rc) {
 			pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n",
 			       generic->header.source_id);
Signature · 1 line
1.7.1

A message that is not in the archive (sent off-list or not yet received): 1453335459-3617-3-git-send-email-lho-qTEPVZfXA3Y@public.gmane.org

#8 lore raw

Re: [PATCH v4 2/2] acpi: apei: Enable APEI multiple GHES source to share an single external IRQ

Hi Borislav,

Quoted 14 lines · Loc Ho

This patch allows APEI generic error source table with external IRQ to share an single IRQ.

---
 drivers/acpi/apei/ghes.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/acpi/apei/ghes.c +0 -0
index 3dd9c46..76146c8 100644

drivers/acpi/apei/ghes.c static int ghes_probe(struct platform_device *ghes_dev) · line 1018

Quoted 9 lines
drivers/acpi/apei/ghes.c +2 -1
@@ -1011,7 +1011,8 @@ static int ghes_probe(struct platform_device *ghes_dev)
                               generic->header.source_id);
                        goto err_edac_unreg;
                }
-               rc = request_irq(ghes->irq, ghes_irq_func, 0, "GHES IRQ", ghes);
+               rc = request_irq(ghes->irq, ghes_irq_func, IRQF_SHARED,
+                                "GHES IRQ", ghes);
                if (rc) {
                        pr_err(GHES_PFX "Failed to register IRQ for generic hardware error source: %d\n",
                               generic->header.source_id);

Can this be pull into 4.5-rcX given that it was already ack'ed week back?

-Loc
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

Re: [PATCH v4 2/2] acpi: apei: Enable APEI multiple GHES source to share an single external IRQ

Quoted 1 line · Loc Ho

Can this be pull into 4.5-rcX given that it was already ack'ed week back?

It is still Rafael's decision, as I've already stated.

Rafael?

Signature · 4 lines
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.