linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support
@ 2016-01-07 11:27 fu.wei
  2016-01-07 11:42 ` Fu Wei
  2016-01-07 12:00 ` kbuild test robot
  0 siblings, 2 replies; 7+ messages in thread
From: fu.wei @ 2016-01-07 11:27 UTC (permalink / raw)
  To: tony.luck, gong.chen, ying.huang, tomasz.nowicki, tn
  Cc: tbaicar, rruigrok, harba, graeme.gregory, al.stone, hanjun.guo,
	linux-kernel, linux-acpi, linaro-acpi, jcm, mark.rutland,
	catalin.marinas, will.deacon, rjw, bp, matt.fleming, Chen, Gong,
	Fu Wei

From: Huang Ying <ying.huang@intel.com>

ACPI/APEI is designed to verifiy/report H/W errors, like Corrected
Error(CE) and Uncorrected Error(UC). It contains four tables: HEST,
ERST, EINJ and BERT. The first three tables have been merged for
a long time, but because of lacking BIOS support for BERT, the
support for BERT is pending until now. Recently on ARM 64 platform
it is has been supported. So here we come.

Under normal circumstances, when a hardware error occurs, kernel will
be notified via NMI, MCE or some other method, then kernel will
process the error condition, report it, and recover it if possible.
But sometime, the situation is so bad, so that firmware may choose to
reset directly without notifying Linux kernel.

Linux kernel can use the Boot Error Record Table (BERT) to get the
un-notified hardware errors that occurred in a previous boot. In this
patch, the error information is reported via printk.

For more information about BERT, please refer to ACPI Specification
version 6.0, section 18.3.1:
  http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf

The following log is a BERT record after system reboot because of
hitting a fatal error.

BERT: Obtained BERT iomem region <00000000fe801000-00000000fe802000> for BERT.
[Hardware Error]: Error record from previous boot:
[Hardware Error]: event severity: fatal
[Hardware Error]:  Error 0, type: fatal
[Hardware Error]:   section_type: memory error
[Hardware Error]:   physical_address: 0x00000000fe800000
[Hardware Error]:   physical_address_mask: 0x0000000000000fff
[Hardware Error]:   card: 0 module: 1 bank: 0 device: 1 row: 1 column: 1 bit_pos

[Tomasz Nowicki: Clear error status at the end of error handling]
[Tony: Applied some cleanups suggested by Fu Wei]
[Fu Wei: delete EXPORT_SYMBOL_GPL(bert_disable), improve the code]

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Fu Wei <fu.wei@linaro.org>
Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
---
Changelog:
v3: Merge the two patches
    Do some improvements according to Borislav's suggestion.

v2: https://lkml.org/lkml/2015/8/18/336
    Delete EXPORT_SYMBOL_GPL(bert_disable), because "bert_disable" is only used
    in bert.c for now.
    Do some code-style cleanups.

v1: The first upstream version submitted in linux-acpi mailing list:
    http://www.spinics.net/lists/linux-acpi/msg57384.html

 Documentation/kernel-parameters.txt |   3 +
 drivers/acpi/apei/Makefile          |   2 +-
 drivers/acpi/apei/bert.c            | 158 ++++++++++++++++++++++++++++++++++++
 include/acpi/apei.h                 |   1 +
 4 files changed, 163 insertions(+), 1 deletion(-)
 create mode 100644 drivers/acpi/apei/bert.c

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 742f69d..2310e97 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -555,6 +555,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
 	bootmem_debug	[KNL] Enable bootmem allocator debug messages.
 
+	bert_disable	[ACPI]
+			Disable Boot Error Record Table (BERT) support.
+
 	bttv.card=	[HW,V4L] bttv (bt848 + bt878 based grabber cards)
 	bttv.radio=	Most important insmod options are available as
 			kernel args too.
diff --git a/drivers/acpi/apei/Makefile b/drivers/acpi/apei/Makefile
index 5d575a9..e50573d 100644
--- a/drivers/acpi/apei/Makefile
+++ b/drivers/acpi/apei/Makefile
@@ -3,4 +3,4 @@ obj-$(CONFIG_ACPI_APEI_GHES)	+= ghes.o
 obj-$(CONFIG_ACPI_APEI_EINJ)	+= einj.o
 obj-$(CONFIG_ACPI_APEI_ERST_DEBUG) += erst-dbg.o
 
-apei-y := apei-base.o hest.o erst.o
+apei-y := apei-base.o hest.o erst.o bert.o
diff --git a/drivers/acpi/apei/bert.c b/drivers/acpi/apei/bert.c
new file mode 100644
index 0000000..6f6ae38
--- /dev/null
+++ b/drivers/acpi/apei/bert.c
@@ -0,0 +1,158 @@
+/*
+ * APEI Boot Error Record Table (BERT) support
+ *
+ * Copyright 2011 Intel Corp.
+ *   Author: Huang Ying <ying.huang@intel.com>
+ *
+ * Under normal circumstances, when a hardware error occurs, kernel
+ * will be notified via NMI, MCE or some other method, then kernel
+ * will process the error condition, report it, and recover it if
+ * possible. But sometime, the situation is so bad, so that firmware
+ * may choose to reset directly without notifying Linux kernel.
+ *
+ * Linux kernel can use the Boot Error Record Table (BERT) to get the
+ * un-notified hardware errors that occurred in a previous boot.
+ *
+ * For more information about BERT, please refer to ACPI Specification
+ * version 4.0, section 17.3.1
+ *
+ * This file is licensed under GPLv2.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/acpi.h>
+#include <linux/io.h>
+
+#include "apei-internal.h"
+
+#undef pr_fmt(fmt)
+#define pr_fmt(fmt) "BERT: " fmt
+
+static int bert_disable;
+
+static void __init bert_print_all(struct acpi_bert_region *region,
+				  unsigned int region_len)
+{
+	/*
+	 * We use cper_estatus_* which uses struct acpi_hest_generic_status,
+	 * struct acpi_hest_generic_status and acpi_bert_region are the same
+	 * (Generic Error Status Block), so we declare the "estatus" here.
+	 */
+	struct acpi_hest_generic_status *estatus =
+		(struct acpi_hest_generic_status *)region;
+	int remain = region_len;
+	u32 estatus_len;
+
+	/* The records have been polled*/
+	if (!estatus->block_status)
+		return;
+
+	while (remain > sizeof(struct acpi_bert_region)) {
+		/*
+		 * Test Generic Error Status Block first,
+		 * if the data(Offset, Length) is invalid, we just return,
+		 * because we can't trust the length data from this block.
+		 */
+		if (cper_estatus_check(estatus)) {
+			pr_err(FW_BUG "Invalid error record\n");
+			return;
+		}
+
+		estatus_len = cper_estatus_len(estatus);
+		if (remain < estatus_len) {
+			pr_err(FW_BUG "Invalid status block length (%u)\n",
+			       estatus_len);
+			return;
+		}
+
+		pr_info_once(HW_ERR "Error records from previous boot:\n");
+
+		cper_estatus_print(KERN_INFO HW_ERR, estatus);
+
+		/*
+		 * Because the boot error source is "one-time polled" type,
+		 * clear Block Status of current Generic Error Status Block,
+		 * once it's printed.
+		 */
+		estatus->block_status = 0;
+
+		estatus = (void *)estatus + estatus_len;
+		if (!estatus->block_status)
+			return;	/* No more error records */
+
+		remain -= estatus_len;
+	}
+}
+
+static int __init setup_bert_disable(char *str)
+{
+	bert_disable = 1;
+
+	return 0;
+}
+__setup("bert_disable", setup_bert_disable);
+
+static int __init bert_check_table(struct acpi_table_bert *bert_tab)
+{
+	if (bert_tab->header.length < sizeof(struct acpi_table_bert) ||
+	    bert_tab->region_length < sizeof(struct acpi_bert_region))
+		return -EINVAL;
+
+	return 0;
+}
+
+static int __init bert_init(void)
+{
+	struct acpi_bert_region *boot_error_region;
+	struct acpi_table_bert *bert_tab;
+	unsigned int region_len;
+	acpi_status status;
+	int rc = 0;
+
+	if (acpi_disabled)
+		return 0;
+
+	if (bert_disable) {
+		pr_info("Boot Error Record Table support is disabled\n");
+		return 0;
+	}
+
+	status = acpi_get_table(ACPI_SIG_BERT, 0, (struct acpi_table_header **)&bert_tab);
+	if (status == AE_NOT_FOUND)
+		return 0;
+	if (ACPI_FAILURE(status)) {
+		pr_err("get table failed, %s\n", acpi_format_exception(status));
+		return -EINVAL;
+	}
+
+	rc = bert_check_table(bert_tab);
+	if (rc) {
+		pr_err(FW_BUG "table invalid\n");
+		return rc;
+	}
+
+	region_len = bert_tab->region_length;
+	if (!request_mem_region(bert_tab->address, region_len, "APEI BERT")) {
+		pr_err("Can't request iomem region <%016llx-%016llx>\n",
+		       (unsigned long long)bert_tab->address,
+		       (unsigned long long)bert_tab->address + region_len - 1);
+		return -EIO;
+	}
+
+	boot_error_region = ioremap_cache(bert_tab->address, region_len);
+	if (boot_error_region) {
+		bert_print_all(boot_error_region, region_len);
+		iounmap(boot_error_region);
+	} else {
+		rc = -ENOMEM;
+	}
+
+	release_mem_region(bert_tab->address, region_len);
+
+	return rc;
+}
+
+late_initcall(bert_init);
diff --git a/include/acpi/apei.h b/include/acpi/apei.h
index 76284bb..284801a 100644
--- a/include/acpi/apei.h
+++ b/include/acpi/apei.h
@@ -23,6 +23,7 @@ extern bool ghes_disable;
 #else
 #define ghes_disable 1
 #endif
+extern int bert_disable;
 
 #ifdef CONFIG_ACPI_APEI
 void __init acpi_hest_init(void);
-- 
2.5.0


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

* Re: [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support
  2016-01-07 11:27 [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support fu.wei
@ 2016-01-07 11:42 ` Fu Wei
       [not found]   ` <87io34khkx.fsf@yhuang-dev.intel.com>
  2016-01-07 12:00 ` kbuild test robot
  1 sibling, 1 reply; 7+ messages in thread
From: Fu Wei @ 2016-01-07 11:42 UTC (permalink / raw)
  To: Tony Luck, Chen, Gong, Huang Ying, Tomasz Nowicki, Tomasz Nowicki
  Cc: tbaicar, rruigrok, Abdulhamid, Harb, G Gregory, Al Stone,
	Hanjun Guo, LKML, linux-acpi, Linaro ACPI Mailman List,
	Jon Masters, Mark Rutland, Catalin Marinas, Will Deacon,
	Rafael Wysocki, bp, matt.fleming, Chen, Gong, Fu Wei

Hi Borislav,


On 7 January 2016 at 19:27,  <fu.wei@linaro.org> wrote:
> From: Huang Ying <ying.huang@intel.com>
>
> ACPI/APEI is designed to verifiy/report H/W errors, like Corrected
> Error(CE) and Uncorrected Error(UC). It contains four tables: HEST,
> ERST, EINJ and BERT. The first three tables have been merged for
> a long time, but because of lacking BIOS support for BERT, the
> support for BERT is pending until now. Recently on ARM 64 platform
> it is has been supported. So here we come.
>
> Under normal circumstances, when a hardware error occurs, kernel will
> be notified via NMI, MCE or some other method, then kernel will
> process the error condition, report it, and recover it if possible.
> But sometime, the situation is so bad, so that firmware may choose to
> reset directly without notifying Linux kernel.
>
> Linux kernel can use the Boot Error Record Table (BERT) to get the
> un-notified hardware errors that occurred in a previous boot. In this
> patch, the error information is reported via printk.
>
> For more information about BERT, please refer to ACPI Specification
> version 6.0, section 18.3.1:
>   http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf
>
> The following log is a BERT record after system reboot because of
> hitting a fatal error.
>
> BERT: Obtained BERT iomem region <00000000fe801000-00000000fe802000> for BERT.
> [Hardware Error]: Error record from previous boot:
> [Hardware Error]: event severity: fatal
> [Hardware Error]:  Error 0, type: fatal
> [Hardware Error]:   section_type: memory error
> [Hardware Error]:   physical_address: 0x00000000fe800000
> [Hardware Error]:   physical_address_mask: 0x0000000000000fff
> [Hardware Error]:   card: 0 module: 1 bank: 0 device: 1 row: 1 column: 1 bit_pos
>
> [Tomasz Nowicki: Clear error status at the end of error handling]
> [Tony: Applied some cleanups suggested by Fu Wei]
> [Fu Wei: delete EXPORT_SYMBOL_GPL(bert_disable), improve the code]
>
> Signed-off-by: Huang Ying <ying.huang@intel.com>
> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
> Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
> Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
> ---
> Changelog:
> v3: Merge the two patches
>     Do some improvements according to Borislav's suggestion.
>
> v2: https://lkml.org/lkml/2015/8/18/336
>     Delete EXPORT_SYMBOL_GPL(bert_disable), because "bert_disable" is only used
>     in bert.c for now.
>     Do some code-style cleanups.
>
> v1: The first upstream version submitted in linux-acpi mailing list:
>     http://www.spinics.net/lists/linux-acpi/msg57384.html
>
>  Documentation/kernel-parameters.txt |   3 +
>  drivers/acpi/apei/Makefile          |   2 +-
>  drivers/acpi/apei/bert.c            | 158 ++++++++++++++++++++++++++++++++++++
>  include/acpi/apei.h                 |   1 +
>  4 files changed, 163 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/acpi/apei/bert.c
>
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index 742f69d..2310e97 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -555,6 +555,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>
>         bootmem_debug   [KNL] Enable bootmem allocator debug messages.
>
> +       bert_disable    [ACPI]
> +                       Disable Boot Error Record Table (BERT) support.
> +

This comes from the original version of BERT patch
But I don't think we need this, and I don't see any benefit of this.

Any suggestion ? Or anything I missed?


>         bttv.card=      [HW,V4L] bttv (bt848 + bt878 based grabber cards)
>         bttv.radio=     Most important insmod options are available as
>                         kernel args too.
> diff --git a/drivers/acpi/apei/Makefile b/drivers/acpi/apei/Makefile
> index 5d575a9..e50573d 100644
> --- a/drivers/acpi/apei/Makefile
> +++ b/drivers/acpi/apei/Makefile
> @@ -3,4 +3,4 @@ obj-$(CONFIG_ACPI_APEI_GHES)    += ghes.o
>  obj-$(CONFIG_ACPI_APEI_EINJ)   += einj.o
>  obj-$(CONFIG_ACPI_APEI_ERST_DEBUG) += erst-dbg.o
>
> -apei-y := apei-base.o hest.o erst.o
> +apei-y := apei-base.o hest.o erst.o bert.o
> diff --git a/drivers/acpi/apei/bert.c b/drivers/acpi/apei/bert.c
> new file mode 100644
> index 0000000..6f6ae38
> --- /dev/null
> +++ b/drivers/acpi/apei/bert.c
> @@ -0,0 +1,158 @@
> +/*
> + * APEI Boot Error Record Table (BERT) support
> + *
> + * Copyright 2011 Intel Corp.
> + *   Author: Huang Ying <ying.huang@intel.com>
> + *
> + * Under normal circumstances, when a hardware error occurs, kernel
> + * will be notified via NMI, MCE or some other method, then kernel
> + * will process the error condition, report it, and recover it if
> + * possible. But sometime, the situation is so bad, so that firmware
> + * may choose to reset directly without notifying Linux kernel.
> + *
> + * Linux kernel can use the Boot Error Record Table (BERT) to get the
> + * un-notified hardware errors that occurred in a previous boot.
> + *
> + * For more information about BERT, please refer to ACPI Specification
> + * version 4.0, section 17.3.1
> + *
> + * This file is licensed under GPLv2.
> + *
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/init.h>
> +#include <linux/acpi.h>
> +#include <linux/io.h>
> +
> +#include "apei-internal.h"
> +
> +#undef pr_fmt(fmt)
> +#define pr_fmt(fmt) "BERT: " fmt
> +
> +static int bert_disable;
> +
> +static void __init bert_print_all(struct acpi_bert_region *region,
> +                                 unsigned int region_len)
> +{
> +       /*
> +        * We use cper_estatus_* which uses struct acpi_hest_generic_status,
> +        * struct acpi_hest_generic_status and acpi_bert_region are the same
> +        * (Generic Error Status Block), so we declare the "estatus" here.
> +        */
> +       struct acpi_hest_generic_status *estatus =
> +               (struct acpi_hest_generic_status *)region;
> +       int remain = region_len;
> +       u32 estatus_len;
> +
> +       /* The records have been polled*/
> +       if (!estatus->block_status)
> +               return;
> +
> +       while (remain > sizeof(struct acpi_bert_region)) {
> +               /*
> +                * Test Generic Error Status Block first,
> +                * if the data(Offset, Length) is invalid, we just return,
> +                * because we can't trust the length data from this block.
> +                */
> +               if (cper_estatus_check(estatus)) {
> +                       pr_err(FW_BUG "Invalid error record\n");
> +                       return;
> +               }
> +
> +               estatus_len = cper_estatus_len(estatus);
> +               if (remain < estatus_len) {
> +                       pr_err(FW_BUG "Invalid status block length (%u)\n",
> +                              estatus_len);
> +                       return;
> +               }
> +
> +               pr_info_once(HW_ERR "Error records from previous boot:\n");
> +
> +               cper_estatus_print(KERN_INFO HW_ERR, estatus);
> +
> +               /*
> +                * Because the boot error source is "one-time polled" type,
> +                * clear Block Status of current Generic Error Status Block,
> +                * once it's printed.
> +                */
> +               estatus->block_status = 0;
> +
> +               estatus = (void *)estatus + estatus_len;
> +               if (!estatus->block_status)
> +                       return; /* No more error records */
> +
> +               remain -= estatus_len;
> +       }
> +}
> +
> +static int __init setup_bert_disable(char *str)
> +{
> +       bert_disable = 1;
> +
> +       return 0;
> +}
> +__setup("bert_disable", setup_bert_disable);
> +
> +static int __init bert_check_table(struct acpi_table_bert *bert_tab)
> +{
> +       if (bert_tab->header.length < sizeof(struct acpi_table_bert) ||
> +           bert_tab->region_length < sizeof(struct acpi_bert_region))
> +               return -EINVAL;
> +
> +       return 0;
> +}
> +
> +static int __init bert_init(void)
> +{
> +       struct acpi_bert_region *boot_error_region;
> +       struct acpi_table_bert *bert_tab;
> +       unsigned int region_len;
> +       acpi_status status;
> +       int rc = 0;
> +
> +       if (acpi_disabled)
> +               return 0;
> +
> +       if (bert_disable) {
> +               pr_info("Boot Error Record Table support is disabled\n");
> +               return 0;
> +       }
> +
> +       status = acpi_get_table(ACPI_SIG_BERT, 0, (struct acpi_table_header **)&bert_tab);
> +       if (status == AE_NOT_FOUND)
> +               return 0;
> +       if (ACPI_FAILURE(status)) {
> +               pr_err("get table failed, %s\n", acpi_format_exception(status));
> +               return -EINVAL;
> +       }
> +
> +       rc = bert_check_table(bert_tab);
> +       if (rc) {
> +               pr_err(FW_BUG "table invalid\n");
> +               return rc;
> +       }
> +
> +       region_len = bert_tab->region_length;
> +       if (!request_mem_region(bert_tab->address, region_len, "APEI BERT")) {
> +               pr_err("Can't request iomem region <%016llx-%016llx>\n",
> +                      (unsigned long long)bert_tab->address,
> +                      (unsigned long long)bert_tab->address + region_len - 1);
> +               return -EIO;
> +       }
> +
> +       boot_error_region = ioremap_cache(bert_tab->address, region_len);
> +       if (boot_error_region) {
> +               bert_print_all(boot_error_region, region_len);
> +               iounmap(boot_error_region);
> +       } else {
> +               rc = -ENOMEM;
> +       }
> +
> +       release_mem_region(bert_tab->address, region_len);
> +
> +       return rc;
> +}
> +
> +late_initcall(bert_init);
> diff --git a/include/acpi/apei.h b/include/acpi/apei.h
> index 76284bb..284801a 100644
> --- a/include/acpi/apei.h
> +++ b/include/acpi/apei.h
> @@ -23,6 +23,7 @@ extern bool ghes_disable;
>  #else
>  #define ghes_disable 1
>  #endif
> +extern int bert_disable;
>
>  #ifdef CONFIG_ACPI_APEI
>  void __init acpi_hest_init(void);
> --
> 2.5.0
>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021

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

* Re: [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support
  2016-01-07 11:27 [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support fu.wei
  2016-01-07 11:42 ` Fu Wei
@ 2016-01-07 12:00 ` kbuild test robot
  2016-01-07 16:21   ` Fu Wei
  1 sibling, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2016-01-07 12:00 UTC (permalink / raw)
  To: fu.wei
  Cc: kbuild-all, tony.luck, gong.chen, ying.huang, tomasz.nowicki, tn,
	tbaicar, rruigrok, harba, graeme.gregory, al.stone, hanjun.guo,
	linux-kernel, linux-acpi, linaro-acpi, jcm, mark.rutland,
	catalin.marinas, will.deacon, rjw, bp, matt.fleming, Chen, Gong,
	Fu Wei

[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]

Hi Huang,

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v4.4-rc8 next-20160106]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url:    https://github.com/0day-ci/linux/commits/fu-wei-linaro-org/acpi-apei-add-Boot-Error-Record-Table-BERT-support/20160107-193040
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-lkp (attached as .config)
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

>> drivers/acpi/apei/bert.c:31:14: warning: extra tokens at end of #undef directive
    #undef pr_fmt(fmt)
                 ^

vim +31 drivers/acpi/apei/bert.c

    15	 *
    16	 * For more information about BERT, please refer to ACPI Specification
    17	 * version 4.0, section 17.3.1
    18	 *
    19	 * This file is licensed under GPLv2.
    20	 *
    21	 */
    22	
    23	#include <linux/kernel.h>
    24	#include <linux/module.h>
    25	#include <linux/init.h>
    26	#include <linux/acpi.h>
    27	#include <linux/io.h>
    28	
    29	#include "apei-internal.h"
    30	
  > 31	#undef pr_fmt(fmt)
    32	#define pr_fmt(fmt) "BERT: " fmt
    33	
    34	static int bert_disable;
    35	
    36	static void __init bert_print_all(struct acpi_bert_region *region,
    37					  unsigned int region_len)
    38	{
    39		/*

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 22100 bytes --]

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

* Re: [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support
  2016-01-07 12:00 ` kbuild test robot
@ 2016-01-07 16:21   ` Fu Wei
  2016-01-07 16:22     ` G Gregory
  0 siblings, 1 reply; 7+ messages in thread
From: Fu Wei @ 2016-01-07 16:21 UTC (permalink / raw)
  To: Huang Ying
  Cc: Tony Luck, Chen, Gong, Tomasz Nowicki, Tomasz Nowicki, tbaicar,
	rruigrok, Abdulhamid, Harb, G Gregory, Al Stone, Hanjun Guo,
	LKML, linux-acpi, Linaro ACPI Mailman List, Jon Masters,
	Mark Rutland, Catalin Marinas, Will Deacon, Rafael Wysocki, bp,
	matt.fleming, Chen, Gong

Hi Huang,

On 7 January 2016 at 20:00, kbuild test robot <lkp@intel.com> wrote:
> Hi Huang,
>
> [auto build test WARNING on pm/linux-next]
> [also build test WARNING on v4.4-rc8 next-20160106]
> [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
>
> url:    https://github.com/0day-ci/linux/commits/fu-wei-linaro-org/acpi-apei-add-Boot-Error-Record-Table-BERT-support/20160107-193040
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> config: x86_64-lkp (attached as .config)
> reproduce:
>         # save the attached .config to linux build tree
>         make ARCH=x86_64
>
> All warnings (new ones prefixed by >>):
>
>>> drivers/acpi/apei/bert.c:31:14: warning: extra tokens at end of #undef directive
>     #undef pr_fmt(fmt)
>                  ^
>
> vim +31 drivers/acpi/apei/bert.c
>
>     15   *
>     16   * For more information about BERT, please refer to ACPI Specification
>     17   * version 4.0, section 17.3.1
>     18   *
>     19   * This file is licensed under GPLv2.
>     20   *
>     21   */
>     22
>     23  #include <linux/kernel.h>
>     24  #include <linux/module.h>
>     25  #include <linux/init.h>
>     26  #include <linux/acpi.h>
>     27  #include <linux/io.h>
>     28
>     29  #include "apei-internal.h"
>     30
>   > 31  #undef pr_fmt(fmt)

Do you have any idea?
I did not get warnings when I compiled this for arm64.
But without it, I got "redefined" warning.

>     32  #define pr_fmt(fmt) "BERT: " fmt
>     33
>     34  static int bert_disable;
>     35
>     36  static void __init bert_print_all(struct acpi_bert_region *region,
>     37                                    unsigned int region_len)
>     38  {
>     39          /*
>
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021

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

* Re: [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support
  2016-01-07 16:21   ` Fu Wei
@ 2016-01-07 16:22     ` G Gregory
  2016-01-08  3:29       ` Fu Wei
  0 siblings, 1 reply; 7+ messages in thread
From: G Gregory @ 2016-01-07 16:22 UTC (permalink / raw)
  To: Fu Wei
  Cc: Huang Ying, Tony Luck, Chen, Gong, Tomasz Nowicki,
	Tomasz Nowicki, tbaicar, rruigrok, Abdulhamid, Harb, Al Stone,
	Hanjun Guo, LKML, linux-acpi, Linaro ACPI Mailman List,
	Jon Masters, Mark Rutland, Catalin Marinas, Will Deacon,
	Rafael Wysocki, bp, matt.fleming, Chen, Gong

On 7 January 2016 at 16:21, Fu Wei <fu.wei@linaro.org> wrote:
> Hi Huang,
>
> On 7 January 2016 at 20:00, kbuild test robot <lkp@intel.com> wrote:
>> Hi Huang,
>>
>> [auto build test WARNING on pm/linux-next]
>> [also build test WARNING on v4.4-rc8 next-20160106]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
>>
>> url:    https://github.com/0day-ci/linux/commits/fu-wei-linaro-org/acpi-apei-add-Boot-Error-Record-Table-BERT-support/20160107-193040
>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
>> config: x86_64-lkp (attached as .config)
>> reproduce:
>>         # save the attached .config to linux build tree
>>         make ARCH=x86_64
>>
>> All warnings (new ones prefixed by >>):
>>
>>>> drivers/acpi/apei/bert.c:31:14: warning: extra tokens at end of #undef directive
>>     #undef pr_fmt(fmt)
>>                  ^
>>
>> vim +31 drivers/acpi/apei/bert.c
>>
>>     15   *
>>     16   * For more information about BERT, please refer to ACPI Specification
>>     17   * version 4.0, section 17.3.1
>>     18   *
>>     19   * This file is licensed under GPLv2.
>>     20   *
>>     21   */
>>     22
>>     23  #include <linux/kernel.h>
>>     24  #include <linux/module.h>
>>     25  #include <linux/init.h>
>>     26  #include <linux/acpi.h>
>>     27  #include <linux/io.h>
>>     28
>>     29  #include "apei-internal.h"
>>     30
>>   > 31  #undef pr_fmt(fmt)
>
> Do you have any idea?
> I did not get warnings when I compiled this for arm64.
> But without it, I got "redefined" warning.
>
Shouldn't it be just

#undef pr_fmt

No arguments!

Graeme

>>     32  #define pr_fmt(fmt) "BERT: " fmt
>>     33
>>     34  static int bert_disable;
>>     35
>>     36  static void __init bert_print_all(struct acpi_bert_region *region,
>>     37                                    unsigned int region_len)
>>     38  {
>>     39          /*
>>
>> ---
>> 0-DAY kernel test infrastructure                Open Source Technology Center
>> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
>
>
>
> --
> Best regards,
>
> Fu Wei
> Software Engineer
> Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
> Ph: +86 21 61221326(direct)
> Ph: +86 186 2020 4684 (mobile)
> Room 1512, Regus One Corporate Avenue,Level 15,
> One Corporate Avenue,222 Hubin Road,Huangpu District,
> Shanghai,China 200021

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

* Re: [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support
       [not found]   ` <87io34khkx.fsf@yhuang-dev.intel.com>
@ 2016-01-08  3:25     ` Fu Wei
  0 siblings, 0 replies; 7+ messages in thread
From: Fu Wei @ 2016-01-08  3:25 UTC (permalink / raw)
  To: Huang, Ying
  Cc: Tony Luck, Chen, Gong, Tomasz Nowicki, Tomasz Nowicki, tbaicar,
	rruigrok, Abdulhamid, Harb, G Gregory, Al Stone, Hanjun Guo,
	LKML, linux-acpi, Linaro ACPI Mailman List, Jon Masters,
	Mark Rutland, Catalin Marinas, Will Deacon, Rafael Wysocki, bp,
	matt.fleming, Chen, Gong

Hi Huang,

On 8 January 2016 at 09:03, Huang, Ying <ying.huang@intel.com> wrote:
> Fu Wei <fu.wei@linaro.org> writes:
>
>> Hi Borislav,
>>
>>
>> On 7 January 2016 at 19:27,  <fu.wei@linaro.org> wrote:
>>> From: Huang Ying <ying.huang@intel.com>
>>>
>>> ACPI/APEI is designed to verifiy/report H/W errors, like Corrected
>>> Error(CE) and Uncorrected Error(UC). It contains four tables: HEST,
>>> ERST, EINJ and BERT. The first three tables have been merged for
>>> a long time, but because of lacking BIOS support for BERT, the
>>> support for BERT is pending until now. Recently on ARM 64 platform
>>> it is has been supported. So here we come.
>>>
>>> Under normal circumstances, when a hardware error occurs, kernel will
>>> be notified via NMI, MCE or some other method, then kernel will
>>> process the error condition, report it, and recover it if possible.
>>> But sometime, the situation is so bad, so that firmware may choose to
>>> reset directly without notifying Linux kernel.
>>>
>>> Linux kernel can use the Boot Error Record Table (BERT) to get the
>>> un-notified hardware errors that occurred in a previous boot. In this
>>> patch, the error information is reported via printk.
>>>
>>> For more information about BERT, please refer to ACPI Specification
>>> version 6.0, section 18.3.1:
>>>   http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf
>>>
>>> The following log is a BERT record after system reboot because of
>>> hitting a fatal error.
>>>
>>> BERT: Obtained BERT iomem region <00000000fe801000-00000000fe802000> for BERT.
>>> [Hardware Error]: Error record from previous boot:
>>> [Hardware Error]: event severity: fatal
>>> [Hardware Error]:  Error 0, type: fatal
>>> [Hardware Error]:   section_type: memory error
>>> [Hardware Error]:   physical_address: 0x00000000fe800000
>>> [Hardware Error]:   physical_address_mask: 0x0000000000000fff
>>> [Hardware Error]:   card: 0 module: 1 bank: 0 device: 1 row: 1 column: 1 bit_pos
>>>
>>> [Tomasz Nowicki: Clear error status at the end of error handling]
>>> [Tony: Applied some cleanups suggested by Fu Wei]
>>> [Fu Wei: delete EXPORT_SYMBOL_GPL(bert_disable), improve the code]
>>>
>>> Signed-off-by: Huang Ying <ying.huang@intel.com>
>>> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>>> Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
>>> Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
>>> Signed-off-by: Tony Luck <tony.luck@intel.com>
>>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>>> Tested-by: Tyler Baicar <tbaicar@codeaurora.org>
>>> ---
>>> Changelog:
>>> v3: Merge the two patches
>>>     Do some improvements according to Borislav's suggestion.
>>>
>>> v2: https://lkml.org/lkml/2015/8/18/336
>>>     Delete EXPORT_SYMBOL_GPL(bert_disable), because "bert_disable" is only used
>>>     in bert.c for now.
>>>     Do some code-style cleanups.
>>>
>>> v1: The first upstream version submitted in linux-acpi mailing list:
>>>     http://www.spinics.net/lists/linux-acpi/msg57384.html
>>>
>>>  Documentation/kernel-parameters.txt |   3 +
>>>  drivers/acpi/apei/Makefile          |   2 +-
>>>  drivers/acpi/apei/bert.c            | 158 ++++++++++++++++++++++++++++++++++++
>>>  include/acpi/apei.h                 |   1 +
>>>  4 files changed, 163 insertions(+), 1 deletion(-)
>>>  create mode 100644 drivers/acpi/apei/bert.c
>>>
>>> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
>>> index 742f69d..2310e97 100644
>>> --- a/Documentation/kernel-parameters.txt
>>> +++ b/Documentation/kernel-parameters.txt
>>> @@ -555,6 +555,9 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>>>
>>>         bootmem_debug   [KNL] Enable bootmem allocator debug messages.
>>>
>>> +       bert_disable    [ACPI]
>>> +                       Disable Boot Error Record Table (BERT) support.
>>> +
>>
>> This comes from the original version of BERT patch
>> But I don't think we need this, and I don't see any benefit of this.
>>
>> Any suggestion ? Or anything I missed?
>
> The original intention of this parameter is to avoid the bad influence
> of some buggy BIOS, for example the malformed table or table with
> garbage information.

Thanks for your explanation,  got it
will add this info in the next patch

>
> Best Regards,
> Huang, Ying
>
>>>         bttv.card=      [HW,V4L] bttv (bt848 + bt878 based grabber cards)
>>>         bttv.radio=     Most important insmod options are available as
>>>                         kernel args too.
>>> diff --git a/drivers/acpi/apei/Makefile b/drivers/acpi/apei/Makefile
>>> index 5d575a9..e50573d 100644
>>> --- a/drivers/acpi/apei/Makefile
>>> +++ b/drivers/acpi/apei/Makefile
>>> @@ -3,4 +3,4 @@ obj-$(CONFIG_ACPI_APEI_GHES)    += ghes.o
>>>  obj-$(CONFIG_ACPI_APEI_EINJ)   += einj.o
>>>  obj-$(CONFIG_ACPI_APEI_ERST_DEBUG) += erst-dbg.o
>>>
>>> -apei-y := apei-base.o hest.o erst.o
>>> +apei-y := apei-base.o hest.o erst.o bert.o
>>> diff --git a/drivers/acpi/apei/bert.c b/drivers/acpi/apei/bert.c
>>> new file mode 100644
>>> index 0000000..6f6ae38
>>> --- /dev/null
>>> +++ b/drivers/acpi/apei/bert.c
>>> @@ -0,0 +1,158 @@
>>> +/*
>>> + * APEI Boot Error Record Table (BERT) support
>>> + *
>>> + * Copyright 2011 Intel Corp.
>>> + *   Author: Huang Ying <ying.huang@intel.com>
>>> + *
>>> + * Under normal circumstances, when a hardware error occurs, kernel
>>> + * will be notified via NMI, MCE or some other method, then kernel
>>> + * will process the error condition, report it, and recover it if
>>> + * possible. But sometime, the situation is so bad, so that firmware
>>> + * may choose to reset directly without notifying Linux kernel.
>>> + *
>>> + * Linux kernel can use the Boot Error Record Table (BERT) to get the
>>> + * un-notified hardware errors that occurred in a previous boot.
>>> + *
>>> + * For more information about BERT, please refer to ACPI Specification
>>> + * version 4.0, section 17.3.1
>>> + *
>>> + * This file is licensed under GPLv2.
>>> + *
>>> + */
>>> +
>>> +#include <linux/kernel.h>
>>> +#include <linux/module.h>
>>> +#include <linux/init.h>
>>> +#include <linux/acpi.h>
>>> +#include <linux/io.h>
>>> +
>>> +#include "apei-internal.h"
>>> +
>>> +#undef pr_fmt(fmt)
>>> +#define pr_fmt(fmt) "BERT: " fmt
>>> +
>>> +static int bert_disable;
>>> +
>>> +static void __init bert_print_all(struct acpi_bert_region *region,
>>> +                                 unsigned int region_len)
>>> +{
>>> +       /*
>>> +        * We use cper_estatus_* which uses struct acpi_hest_generic_status,
>>> +        * struct acpi_hest_generic_status and acpi_bert_region are the same
>>> +        * (Generic Error Status Block), so we declare the "estatus" here.
>>> +        */
>>> +       struct acpi_hest_generic_status *estatus =
>>> +               (struct acpi_hest_generic_status *)region;
>>> +       int remain = region_len;
>>> +       u32 estatus_len;
>>> +
>>> +       /* The records have been polled*/
>>> +       if (!estatus->block_status)
>>> +               return;
>>> +
>>> +       while (remain > sizeof(struct acpi_bert_region)) {
>>> +               /*
>>> +                * Test Generic Error Status Block first,
>>> +                * if the data(Offset, Length) is invalid, we just return,
>>> +                * because we can't trust the length data from this block.
>>> +                */
>>> +               if (cper_estatus_check(estatus)) {
>>> +                       pr_err(FW_BUG "Invalid error record\n");
>>> +                       return;
>>> +               }
>>> +
>>> +               estatus_len = cper_estatus_len(estatus);
>>> +               if (remain < estatus_len) {
>>> +                       pr_err(FW_BUG "Invalid status block length (%u)\n",
>>> +                              estatus_len);
>>> +                       return;
>>> +               }
>>> +
>>> +               pr_info_once(HW_ERR "Error records from previous boot:\n");
>>> +
>>> +               cper_estatus_print(KERN_INFO HW_ERR, estatus);
>>> +
>>> +               /*
>>> +                * Because the boot error source is "one-time polled" type,
>>> +                * clear Block Status of current Generic Error Status Block,
>>> +                * once it's printed.
>>> +                */
>>> +               estatus->block_status = 0;
>>> +
>>> +               estatus = (void *)estatus + estatus_len;
>>> +               if (!estatus->block_status)
>>> +                       return; /* No more error records */
>>> +
>>> +               remain -= estatus_len;
>>> +       }
>>> +}
>>> +
>>> +static int __init setup_bert_disable(char *str)
>>> +{
>>> +       bert_disable = 1;
>>> +
>>> +       return 0;
>>> +}
>>> +__setup("bert_disable", setup_bert_disable);
>>> +
>>> +static int __init bert_check_table(struct acpi_table_bert *bert_tab)
>>> +{
>>> +       if (bert_tab->header.length < sizeof(struct acpi_table_bert) ||
>>> +           bert_tab->region_length < sizeof(struct acpi_bert_region))
>>> +               return -EINVAL;
>>> +
>>> +       return 0;
>>> +}
>>> +
>>> +static int __init bert_init(void)
>>> +{
>>> +       struct acpi_bert_region *boot_error_region;
>>> +       struct acpi_table_bert *bert_tab;
>>> +       unsigned int region_len;
>>> +       acpi_status status;
>>> +       int rc = 0;
>>> +
>>> +       if (acpi_disabled)
>>> +               return 0;
>>> +
>>> +       if (bert_disable) {
>>> +               pr_info("Boot Error Record Table support is disabled\n");
>>> +               return 0;
>>> +       }
>>> +
>>> +       status = acpi_get_table(ACPI_SIG_BERT, 0, (struct acpi_table_header **)&bert_tab);
>>> +       if (status == AE_NOT_FOUND)
>>> +               return 0;
>>> +       if (ACPI_FAILURE(status)) {
>>> +               pr_err("get table failed, %s\n", acpi_format_exception(status));
>>> +               return -EINVAL;
>>> +       }
>>> +
>>> +       rc = bert_check_table(bert_tab);
>>> +       if (rc) {
>>> +               pr_err(FW_BUG "table invalid\n");
>>> +               return rc;
>>> +       }
>>> +
>>> +       region_len = bert_tab->region_length;
>>> +       if (!request_mem_region(bert_tab->address, region_len, "APEI BERT")) {
>>> +               pr_err("Can't request iomem region <%016llx-%016llx>\n",
>>> +                      (unsigned long long)bert_tab->address,
>>> +                      (unsigned long long)bert_tab->address + region_len - 1);
>>> +               return -EIO;
>>> +       }
>>> +
>>> +       boot_error_region = ioremap_cache(bert_tab->address, region_len);
>>> +       if (boot_error_region) {
>>> +               bert_print_all(boot_error_region, region_len);
>>> +               iounmap(boot_error_region);
>>> +       } else {
>>> +               rc = -ENOMEM;
>>> +       }
>>> +
>>> +       release_mem_region(bert_tab->address, region_len);
>>> +
>>> +       return rc;
>>> +}
>>> +
>>> +late_initcall(bert_init);
>>> diff --git a/include/acpi/apei.h b/include/acpi/apei.h
>>> index 76284bb..284801a 100644
>>> --- a/include/acpi/apei.h
>>> +++ b/include/acpi/apei.h
>>> @@ -23,6 +23,7 @@ extern bool ghes_disable;
>>>  #else
>>>  #define ghes_disable 1
>>>  #endif
>>> +extern int bert_disable;
>>>
>>>  #ifdef CONFIG_ACPI_APEI
>>>  void __init acpi_hest_init(void);
>>> --
>>> 2.5.0
>>>



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021

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

* Re: [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support
  2016-01-07 16:22     ` G Gregory
@ 2016-01-08  3:29       ` Fu Wei
  0 siblings, 0 replies; 7+ messages in thread
From: Fu Wei @ 2016-01-08  3:29 UTC (permalink / raw)
  To: G Gregory
  Cc: Huang Ying, Tony Luck, Chen, Gong, Tomasz Nowicki,
	Tomasz Nowicki, tbaicar, rruigrok, Abdulhamid, Harb, Al Stone,
	Hanjun Guo, LKML, linux-acpi, Linaro ACPI Mailman List,
	Jon Masters, Mark Rutland, Catalin Marinas, Will Deacon,
	Rafael Wysocki, bp, matt.fleming, Chen, Gong

Hi Graeme,

On 8 January 2016 at 00:22, G Gregory <graeme.gregory@linaro.org> wrote:
> On 7 January 2016 at 16:21, Fu Wei <fu.wei@linaro.org> wrote:
>> Hi Huang,
>>
>> On 7 January 2016 at 20:00, kbuild test robot <lkp@intel.com> wrote:
>>> Hi Huang,
>>>
>>> [auto build test WARNING on pm/linux-next]
>>> [also build test WARNING on v4.4-rc8 next-20160106]
>>> [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
>>>
>>> url:    https://github.com/0day-ci/linux/commits/fu-wei-linaro-org/acpi-apei-add-Boot-Error-Record-Table-BERT-support/20160107-193040
>>> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
>>> config: x86_64-lkp (attached as .config)
>>> reproduce:
>>>         # save the attached .config to linux build tree
>>>         make ARCH=x86_64
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>>>> drivers/acpi/apei/bert.c:31:14: warning: extra tokens at end of #undef directive
>>>     #undef pr_fmt(fmt)
>>>                  ^
>>>
>>> vim +31 drivers/acpi/apei/bert.c
>>>
>>>     15   *
>>>     16   * For more information about BERT, please refer to ACPI Specification
>>>     17   * version 4.0, section 17.3.1
>>>     18   *
>>>     19   * This file is licensed under GPLv2.
>>>     20   *
>>>     21   */
>>>     22
>>>     23  #include <linux/kernel.h>
>>>     24  #include <linux/module.h>
>>>     25  #include <linux/init.h>
>>>     26  #include <linux/acpi.h>
>>>     27  #include <linux/io.h>
>>>     28
>>>     29  #include "apei-internal.h"
>>>     30
>>>   > 31  #undef pr_fmt(fmt)
>>
>> Do you have any idea?
>> I did not get warnings when I compiled this for arm64.
>> But without it, I got "redefined" warning.
>>
> Shouldn't it be just
>
> #undef pr_fmt

Thanks for pointing out this, yes, my bad!

fixed it !

>
> No arguments!
>
> Graeme
>
>>>     32  #define pr_fmt(fmt) "BERT: " fmt
>>>     33
>>>     34  static int bert_disable;
>>>     35
>>>     36  static void __init bert_print_all(struct acpi_bert_region *region,
>>>     37                                    unsigned int region_len)
>>>     38  {
>>>     39          /*
>>>
>>> ---
>>> 0-DAY kernel test infrastructure                Open Source Technology Center
>>> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
>>
>>
>>
>> --
>> Best regards,
>>
>> Fu Wei
>> Software Engineer
>> Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
>> Ph: +86 21 61221326(direct)
>> Ph: +86 186 2020 4684 (mobile)
>> Room 1512, Regus One Corporate Avenue,Level 15,
>> One Corporate Avenue,222 Hubin Road,Huangpu District,
>> Shanghai,China 200021



-- 
Best regards,

Fu Wei
Software Engineer
Red Hat Software (Beijing) Co.,Ltd.Shanghai Branch
Ph: +86 21 61221326(direct)
Ph: +86 186 2020 4684 (mobile)
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021

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

end of thread, other threads:[~2016-01-08  3:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-07 11:27 [PATCH v3] acpi, apei: add Boot Error Record Table (BERT) support fu.wei
2016-01-07 11:42 ` Fu Wei
     [not found]   ` <87io34khkx.fsf@yhuang-dev.intel.com>
2016-01-08  3:25     ` Fu Wei
2016-01-07 12:00 ` kbuild test robot
2016-01-07 16:21   ` Fu Wei
2016-01-07 16:22     ` G Gregory
2016-01-08  3:29       ` Fu Wei

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).