[V2] acpi:apei:handle GSIV and GPIO notification types

Message ID 86258A5CC0A3704780874CF6004BA8A62DCBFF56@lhreml502-mbs
State New
Headers show

Commit Message

Shiju Jose March 16, 2017, 4:08 p.m.
System Controller Interrupts are received by ACPI's error device,
which in turn notifies the GHES code. The same is true of
APEI's GSIV and GPIO notification types.
Add support for GSIV and GPIO sharing the SCI
register/unregister/notifier code.Rename the list and notifier
to show this is no longer just SCI, but anything from the
Hardware Error Device.

Signed-off-by: Shiju Jose <shiju.jose@huawei.com>

[james.morse@arm.com: rewrote commit log]
Signed-off-by: James Morse <james.morse@arm.com>

CC: James Morse <james.morse@arm.com>
CC: Hanjun Guo <guohanjun@huawei.com>
Reviewed-by: James Morse <james.morse@arm.com>

---
 drivers/acpi/apei/ghes.c | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

-- 
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Rafael J. Wysocki April 18, 2017, 2:41 p.m. | #1
On Thursday, March 16, 2017 04:08:17 PM Shiju Jose wrote:
> System Controller Interrupts are received by ACPI's error device,

> which in turn notifies the GHES code. The same is true of

> APEI's GSIV and GPIO notification types.

> Add support for GSIV and GPIO sharing the SCI

> register/unregister/notifier code.Rename the list and notifier

> to show this is no longer just SCI, but anything from the

> Hardware Error Device.

> 

> Signed-off-by: Shiju Jose <shiju.jose@huawei.com>

> [james.morse@arm.com: rewrote commit log]

> Signed-off-by: James Morse <james.morse@arm.com>

> CC: James Morse <james.morse@arm.com>

> CC: Hanjun Guo <guohanjun@huawei.com>

> Reviewed-by: James Morse <james.morse@arm.com>


Boris, Tony, any concerns?

If not, do you want to route this through the RAS tree?

> ---

>  drivers/acpi/apei/ghes.c | 28 +++++++++++++++++-----------

>  1 file changed, 17 insertions(+), 11 deletions(-)

> 

> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c

> index b192b42..fd39929 100644

> --- a/drivers/acpi/apei/ghes.c

> +++ b/drivers/acpi/apei/ghes.c

> @@ -89,14 +89,14 @@

>  module_param_named(disable, ghes_disable, bool, 0);

>  

>  /*

> - * All error sources notified with SCI shares one notifier function,

> + * All error sources notified with HED shares one notifier function,

>   * so they need to be linked and checked one by one.  This is applied

>   * to NMI too.

>   *

>   * RCU is used for these lists, so ghes_list_mutex is only used for

>   * list changing, not for traversing.

>   */

> -static LIST_HEAD(ghes_sci);

> +static LIST_HEAD(ghes_hed);

>  static DEFINE_MUTEX(ghes_list_mutex);

>  

>  /*

> @@ -702,14 +702,14 @@ static irqreturn_t ghes_irq_func(int irq, void *data)

>  	return IRQ_HANDLED;

>  }

>  

> -static int ghes_notify_sci(struct notifier_block *this,

> +static int ghes_notify_hed(struct notifier_block *this,

>  				  unsigned long event, void *data)

>  {

>  	struct ghes *ghes;

>  	int ret = NOTIFY_DONE;

>  

>  	rcu_read_lock();

> -	list_for_each_entry_rcu(ghes, &ghes_sci, list) {

> +	list_for_each_entry_rcu(ghes, &ghes_hed, list) {

>  		if (!ghes_proc(ghes))

>  			ret = NOTIFY_OK;

>  	}

> @@ -718,8 +718,8 @@ static int ghes_notify_sci(struct notifier_block *this,

>  	return ret;

>  }

>  

> -static struct notifier_block ghes_notifier_sci = {

> -	.notifier_call = ghes_notify_sci,

> +static struct notifier_block ghes_notifier_hed = {

> +	.notifier_call = ghes_notify_hed,

>  };

>  

>  #ifdef CONFIG_HAVE_ACPI_APEI_NMI

> @@ -966,6 +966,8 @@ static int ghes_probe(struct platform_device *ghes_dev)

>  	case ACPI_HEST_NOTIFY_POLLED:

>  	case ACPI_HEST_NOTIFY_EXTERNAL:

>  	case ACPI_HEST_NOTIFY_SCI:

> +	case ACPI_HEST_NOTIFY_GSIV:

> +	case ACPI_HEST_NOTIFY_GPIO:

>  		break;

>  	case ACPI_HEST_NOTIFY_NMI:

>  		if (!IS_ENABLED(CONFIG_HAVE_ACPI_APEI_NMI)) {

> @@ -1026,10 +1028,12 @@ static int ghes_probe(struct platform_device *ghes_dev)

>  		}

>  		break;

>  	case ACPI_HEST_NOTIFY_SCI:

> +	case ACPI_HEST_NOTIFY_GSIV:

> +	case ACPI_HEST_NOTIFY_GPIO:

>  		mutex_lock(&ghes_list_mutex);

> -		if (list_empty(&ghes_sci))

> -			register_acpi_hed_notifier(&ghes_notifier_sci);

> -		list_add_rcu(&ghes->list, &ghes_sci);

> +		if (list_empty(&ghes_hed))

> +			register_acpi_hed_notifier(&ghes_notifier_hed);

> +		list_add_rcu(&ghes->list, &ghes_hed);

>  		mutex_unlock(&ghes_list_mutex);

>  		break;

>  	case ACPI_HEST_NOTIFY_NMI:

> @@ -1068,10 +1072,12 @@ static int ghes_remove(struct platform_device *ghes_dev)

>  		free_irq(ghes->irq, ghes);

>  		break;

>  	case ACPI_HEST_NOTIFY_SCI:

> +	case ACPI_HEST_NOTIFY_GSIV:

> +	case ACPI_HEST_NOTIFY_GPIO:

>  		mutex_lock(&ghes_list_mutex);

>  		list_del_rcu(&ghes->list);

> -		if (list_empty(&ghes_sci))

> -			unregister_acpi_hed_notifier(&ghes_notifier_sci);

> +		if (list_empty(&ghes_hed))

> +			unregister_acpi_hed_notifier(&ghes_notifier_hed);

>  		mutex_unlock(&ghes_list_mutex);

>  		break;

>  	case ACPI_HEST_NOTIFY_NMI:

> 


--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Borislav Petkov April 18, 2017, 4:35 p.m. | #2
Just nitpicks below.

On Thu, Mar 16, 2017 at 04:08:17PM +0000, Shiju Jose wrote:
> System Controller Interrupts are received by ACPI's error device,

> which in turn notifies the GHES code. The same is true of

> APEI's GSIV and GPIO notification types.

> Add support for GSIV and GPIO sharing the SCI

> register/unregister/notifier code.Rename the list and notifier

> to show this is no longer just SCI, but anything from the

> Hardware Error Device.

> 

> Signed-off-by: Shiju Jose <shiju.jose@huawei.com>

> [james.morse@arm.com: rewrote commit log]

> Signed-off-by: James Morse <james.morse@arm.com>

> CC: James Morse <james.morse@arm.com>

> CC: Hanjun Guo <guohanjun@huawei.com>

> Reviewed-by: James Morse <james.morse@arm.com>

> ---

>  drivers/acpi/apei/ghes.c | 28 +++++++++++++++++-----------

>  1 file changed, 17 insertions(+), 11 deletions(-)

> 

> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c

> index b192b42..fd39929 100644

> --- a/drivers/acpi/apei/ghes.c

> +++ b/drivers/acpi/apei/ghes.c

> @@ -89,14 +89,14 @@

>  module_param_named(disable, ghes_disable, bool, 0);

>  

>  /*

> - * All error sources notified with SCI shares one notifier function,

> + * All error sources notified with HED shares one notifier function,


s/shares one notifier function/share a single notifier callback/

Also, let's write out here what HED stands for.

>   * so they need to be linked and checked one by one.  This is applied

>   * to NMI too.


This sentence wants to say "This holds true for NMIs too." I presume?

>   *

>   * RCU is used for these lists, so ghes_list_mutex is only used for

>   * list changing, not for traversing.

>   */

> -static LIST_HEAD(ghes_sci);

> +static LIST_HEAD(ghes_hed);

>  static DEFINE_MUTEX(ghes_list_mutex);

>  

>  /*

> @@ -702,14 +702,14 @@ static irqreturn_t ghes_irq_func(int irq, void *data)

>  	return IRQ_HANDLED;

>  }

>  

> -static int ghes_notify_sci(struct notifier_block *this,

> +static int ghes_notify_hed(struct notifier_block *this,

>  				  unsigned long event, void *data)


Align args at opening brace.

>  {

>  	struct ghes *ghes;

>  	int ret = NOTIFY_DONE;

>  

>  	rcu_read_lock();

> -	list_for_each_entry_rcu(ghes, &ghes_sci, list) {

> +	list_for_each_entry_rcu(ghes, &ghes_hed, list) {

>  		if (!ghes_proc(ghes))

>  			ret = NOTIFY_OK;

>  	}

> @@ -718,8 +718,8 @@ static int ghes_notify_sci(struct notifier_block *this,

>  	return ret;

>  }

>  

> -static struct notifier_block ghes_notifier_sci = {

> -	.notifier_call = ghes_notify_sci,

> +static struct notifier_block ghes_notifier_hed = {

> +	.notifier_call = ghes_notify_hed,

>  };

>  

>  #ifdef CONFIG_HAVE_ACPI_APEI_NMI

> @@ -966,6 +966,8 @@ static int ghes_probe(struct platform_device *ghes_dev)

>  	case ACPI_HEST_NOTIFY_POLLED:

>  	case ACPI_HEST_NOTIFY_EXTERNAL:

>  	case ACPI_HEST_NOTIFY_SCI:

> +	case ACPI_HEST_NOTIFY_GSIV:

> +	case ACPI_HEST_NOTIFY_GPIO:

>  		break;


<-- \n here for readability.

>  	case ACPI_HEST_NOTIFY_NMI:

>  		if (!IS_ENABLED(CONFIG_HAVE_ACPI_APEI_NMI)) {

> @@ -1026,10 +1028,12 @@ static int ghes_probe(struct platform_device *ghes_dev)

>  		}

>  		break;


ditto.

>  	case ACPI_HEST_NOTIFY_SCI:

> +	case ACPI_HEST_NOTIFY_GSIV:

> +	case ACPI_HEST_NOTIFY_GPIO:

>  		mutex_lock(&ghes_list_mutex);

> -		if (list_empty(&ghes_sci))

> -			register_acpi_hed_notifier(&ghes_notifier_sci);

> -		list_add_rcu(&ghes->list, &ghes_sci);

> +		if (list_empty(&ghes_hed))

> +			register_acpi_hed_notifier(&ghes_notifier_hed);

> +		list_add_rcu(&ghes->list, &ghes_hed);

>  		mutex_unlock(&ghes_list_mutex);

>  		break;


ditto.

>  	case ACPI_HEST_NOTIFY_NMI:

> @@ -1068,10 +1072,12 @@ static int ghes_remove(struct platform_device *ghes_dev)

>  		free_irq(ghes->irq, ghes);

>  		break;

>  	case ACPI_HEST_NOTIFY_SCI:

> +	case ACPI_HEST_NOTIFY_GSIV:

> +	case ACPI_HEST_NOTIFY_GPIO:

>  		mutex_lock(&ghes_list_mutex);

>  		list_del_rcu(&ghes->list);

> -		if (list_empty(&ghes_sci))

> -			unregister_acpi_hed_notifier(&ghes_notifier_sci);

> +		if (list_empty(&ghes_hed))

> +			unregister_acpi_hed_notifier(&ghes_notifier_hed);

>  		mutex_unlock(&ghes_list_mutex);

>  		break;


ditto.

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imend├Ârffer, Jane Smithard, Graham Norton, HRB 21284 (AG N├╝rnberg)
-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Shiju Jose April 19, 2017, 9:25 a.m. | #3
SGkgQm9yaXMsDQoNClRoYW5rcyBmb3IgeW91ciBjb21tZW50cy4NCkkgd2lsbCBhZGRyZXNzIHRo
ZSBjb21tZW50cyBpbiB0aGUgbmV4dCB2ZXJzaW9uLg0KDQo+IC0tLS0tT3JpZ2luYWwgTWVzc2Fn
ZS0tLS0tDQo+IEZyb206IGxpbnV4LWFjcGktb3duZXJAdmdlci5rZXJuZWwub3JnIFttYWlsdG86
bGludXgtYWNwaS0NCj4gb3duZXJAdmdlci5rZXJuZWwub3JnXSBPbiBCZWhhbGYgT2YgQm9yaXNs
YXYgUGV0a292DQo+IFNlbnQ6IDE4IEFwcmlsIDIwMTcgMTc6MzUNCj4gVG86IFNoaWp1IEpvc2UN
Cj4gQ2M6IHJqd0Byand5c29ja2kubmV0OyBsZW5iQGtlcm5lbC5vcmc7IG1pbmdvQGtlcm5lbC5v
cmc7DQo+IHByYXJpdEByZWRoYXQuY29tOyB0YmFpY2FyQGNvZGVhdXJvcmEub3JnOyBwdW5pdC5h
Z3Jhd2FsQGFybS5jb207DQo+IGxpbnV4LWFjcGlAdmdlci5rZXJuZWwub3JnOyBqYW1lcy5tb3Jz
ZUBhcm0uY29tOyBmdS53ZWlAbGluYXJvLm9yZzsNCj4gR3VvaGFuanVuIChIYW5qdW4gR3VvKTsg
R2FicmllbGUgUGFvbG9uaTsgSm9obiBHYXJyeTsgeHV3ZWkgKE8pOw0KPiBaaGVuZ3FpYW5nICh0
dXJpbmcpDQo+IFN1YmplY3Q6IFJlOiBbUEFUQ0ggVjJdIGFjcGk6YXBlaTpoYW5kbGUgR1NJViBh
bmQgR1BJTyBub3RpZmljYXRpb24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hlZF9ub3RpZmllcigmZ2hlc19ub3RpZmllcl9oZWQpOw0KPiA+
ICAJCW11dGV4X3VubG9jaygmZ2hlc19saXN0X211dGV4KTsNCj4gPiAgCQlicmVhazsNCj4gDQo+
IGRpdHRvLg0KDQpPayBJIHdpbGwgYWRkIG5ldyBsaW5lIGhlcmUuDQoNCj4gDQo+IC0tDQo+IFJl
Z2FyZHMvR3J1c3MsDQo+ICAgICBCb3Jpcy4NCj4NCg0KVGhhbmtzLA0KU2hpanUNCiANCj4gU1VT
RSBMaW51eCBHbWJILCBHRjogRmVsaXggSW1lbmTDtnJmZmVyLCBKYW5lIFNtaXRoYXJkLCBHcmFo
YW0gTm9ydG9uLA0KPiBIUkIgMjEyODQgKEFHIE7DvHJuYmVyZykNCj4gLS0NCj4gLS0NCj4gVG8g
dW5zdWJzY3JpYmUgZnJvbSB0aGlzIGxpc3Q6IHNlbmQgdGhlIGxpbmUgInVuc3Vic2NyaWJlIGxp
bnV4LWFjcGkiDQo+IGluIHRoZSBib2R5IG9mIGEgbWVzc2FnZSB0byBtYWpvcmRvbW9Admdlci5r
ZXJuZWwub3JnIE1vcmUgbWFqb3Jkb21vDQo+IGluZm8gYXQgIGh0dHA6Ly92Z2VyLmtlcm5lbC5v
cmcvbWFqb3Jkb21vLWluZm8uaHRtbA0K
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index b192b42..fd39929 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -89,14 +89,14 @@ 
 module_param_named(disable, ghes_disable, bool, 0);
 
 /*
- * All error sources notified with SCI shares one notifier function,
+ * All error sources notified with HED shares one notifier function,
  * so they need to be linked and checked one by one.  This is applied
  * to NMI too.
  *
  * RCU is used for these lists, so ghes_list_mutex is only used for
  * list changing, not for traversing.
  */
-static LIST_HEAD(ghes_sci);
+static LIST_HEAD(ghes_hed);
 static DEFINE_MUTEX(ghes_list_mutex);
 
 /*
@@ -702,14 +702,14 @@  static irqreturn_t ghes_irq_func(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static int ghes_notify_sci(struct notifier_block *this,
+static int ghes_notify_hed(struct notifier_block *this,
 				  unsigned long event, void *data)
 {
 	struct ghes *ghes;
 	int ret = NOTIFY_DONE;
 
 	rcu_read_lock();
-	list_for_each_entry_rcu(ghes, &ghes_sci, list) {
+	list_for_each_entry_rcu(ghes, &ghes_hed, list) {
 		if (!ghes_proc(ghes))
 			ret = NOTIFY_OK;
 	}
@@ -718,8 +718,8 @@  static int ghes_notify_sci(struct notifier_block *this,
 	return ret;
 }
 
-static struct notifier_block ghes_notifier_sci = {
-	.notifier_call = ghes_notify_sci,
+static struct notifier_block ghes_notifier_hed = {
+	.notifier_call = ghes_notify_hed,
 };
 
 #ifdef CONFIG_HAVE_ACPI_APEI_NMI
@@ -966,6 +966,8 @@  static int ghes_probe(struct platform_device *ghes_dev)
 	case ACPI_HEST_NOTIFY_POLLED:
 	case ACPI_HEST_NOTIFY_EXTERNAL:
 	case ACPI_HEST_NOTIFY_SCI:
+	case ACPI_HEST_NOTIFY_GSIV:
+	case ACPI_HEST_NOTIFY_GPIO:
 		break;
 	case ACPI_HEST_NOTIFY_NMI:
 		if (!IS_ENABLED(CONFIG_HAVE_ACPI_APEI_NMI)) {
@@ -1026,10 +1028,12 @@  static int ghes_probe(struct platform_device *ghes_dev)
 		}
 		break;
 	case ACPI_HEST_NOTIFY_SCI:
+	case ACPI_HEST_NOTIFY_GSIV:
+	case ACPI_HEST_NOTIFY_GPIO:
 		mutex_lock(&ghes_list_mutex);
-		if (list_empty(&ghes_sci))
-			register_acpi_hed_notifier(&ghes_notifier_sci);
-		list_add_rcu(&ghes->list, &ghes_sci);
+		if (list_empty(&ghes_hed))
+			register_acpi_hed_notifier(&ghes_notifier_hed);
+		list_add_rcu(&ghes->list, &ghes_hed);
 		mutex_unlock(&ghes_list_mutex);
 		break;
 	case ACPI_HEST_NOTIFY_NMI:
@@ -1068,10 +1072,12 @@  static int ghes_remove(struct platform_device *ghes_dev)
 		free_irq(ghes->irq, ghes);
 		break;
 	case ACPI_HEST_NOTIFY_SCI:
+	case ACPI_HEST_NOTIFY_GSIV:
+	case ACPI_HEST_NOTIFY_GPIO:
 		mutex_lock(&ghes_list_mutex);
 		list_del_rcu(&ghes->list);
-		if (list_empty(&ghes_sci))
-			unregister_acpi_hed_notifier(&ghes_notifier_sci);
+		if (list_empty(&ghes_hed))
+			unregister_acpi_hed_notifier(&ghes_notifier_hed);
 		mutex_unlock(&ghes_list_mutex);
 		break;
 	case ACPI_HEST_NOTIFY_NMI: