Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1286288 > unrolled thread
| Started by | fu.wei@linaro.org |
|---|---|
| First post | 2015-12-08 08:10 +0100 |
| Last post | 2015-12-09 04:10 +0100 |
| Articles | 12 — 6 participants |
Back to article view | Back to linux.kernel
[PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. fu.wei@linaro.org - 2015-12-08 08:10 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Hanjun Guo <hanjun.guo@linaro.org> - 2015-12-08 12:30 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Fu Wei <fu.wei@linaro.org> - 2015-12-08 13:50 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2015-12-08 13:40 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Hanjun Guo <hanjun.guo@linaro.org> - 2015-12-08 14:00 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Fu Wei <fu.wei@linaro.org> - 2015-12-08 14:10 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2015-12-08 15:10 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Fu Wei <fu.wei@linaro.org> - 2015-12-09 04:30 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Fu Wei <fu.wei@linaro.org> - 2015-12-10 03:10 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Will Deacon <will.deacon@arm.com> - 2015-12-10 12:10 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2015-12-08 17:00 +0100
Re: [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. Fu Wei <fu.wei@linaro.org> - 2015-12-09 04:10 +0100
| From | fu.wei@linaro.org |
|---|---|
| Date | 2015-12-08 08:10 +0100 |
| Subject | [PATCH v4] acpi, apei, arm64: APEI initial support for aarch64. |
| Message-ID | <qDkzo-7AN-11@gated-at.bofh.it> |
From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
This commit provides APEI arch-specific bits for aarch64
Meanwhile, add a new subfunction "hest_ia_init" for
"acpi_disable_cmcff" which is used by IA-32 Architecture
Corrected Machine Check (CMC).
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
Changelog:
v4: Rebase to latest kernel version(4.4-rc4).
Move arch_apei_flush_tlb_one into header file as a inline function
Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
v3: https://lkml.org/lkml/2015/12/3/521
Remove "acpi_disable_cmcff" from arm64 code,
and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
v2: https://lkml.org/lkml/2015/12/2/432
Rebase to latest kernel version(4.4-rc3).
Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
v1: https://lkml.org/lkml/2015/8/14/199
Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
Delete arch/arm64/kernel/apei.c.
Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/acpi.h | 5 +++++
drivers/acpi/apei/hest.c | 19 ++++++++++++++++---
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 871f217..58c8992 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_REDUCED_HARDWARE_ONLY if ACPI
+ select HAVE_ACPI_APEI if ACPI
select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
select ARCH_HAS_ELF_RANDOMIZE
select ARCH_HAS_GCOV_PROFILE_ALL
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index caafd63..31d3d9a 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cputype.h>
#include <asm/smp_plat.h>
+#include <asm/tlbflush.h>
/* Macros for consistency checks of the GICC subtable of MADT */
#define ACPI_MADT_GICC_LENGTH \
@@ -94,6 +95,10 @@ static inline const char *acpi_get_enable_method(int cpu)
#ifdef CONFIG_ACPI_APEI
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
+static inline void arch_apei_flush_tlb_one(unsigned long addr)
+{
+ flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
+}
#endif
#endif /*_ASM_ACPI_H*/
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 20b3fcf..715c58b 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -117,15 +117,27 @@ int apei_hest_parse(apei_hest_func_t func, void *data)
}
EXPORT_SYMBOL_GPL(apei_hest_parse);
+#if defined(__i386__) || defined(__x86_64__)
/*
* Check if firmware advertises firmware first mode. We need FF bit to be set
* along with a set of MC banks which work in FF mode.
*/
static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
{
- return arch_apei_enable_cmcff(hest_hdr, data);
+ if (!acpi_disable_cmcff)
+ return !arch_apei_enable_cmcff(hest_hdr, data);
+
+ return 0;
}
+static inline int __init hest_ia_init(void)
+{
+ return apei_hest_parse(hest_parse_cmc, NULL);
+}
+#else
+static inline int __init hest_ia_init(void) { return 0; }
+#endif
+
struct ghes_arr {
struct platform_device **ghes_devs;
unsigned int count;
@@ -232,8 +244,9 @@ void __init acpi_hest_init(void)
goto err;
}
- if (!acpi_disable_cmcff)
- apei_hest_parse(hest_parse_cmc, NULL);
+ rc = hest_ia_init();
+ if (rc)
+ goto err;
if (!ghes_disable) {
rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
--
2.5.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Hanjun Guo <hanjun.guo@linaro.org> |
|---|---|
| Date | 2015-12-08 12:30 +0100 |
| Message-ID | <qDoD0-1Hi-15@gated-at.bofh.it> |
| In reply to | #1286288 |
Hi Fu Wei, On 12/08/2015 03:03 PM, fu.wei@linaro.org wrote: > From: Tomasz Nowicki <tomasz.nowicki@linaro.org> > > This commit provides APEI arch-specific bits for aarch64 > > Meanwhile, add a new subfunction "hest_ia_init" for > "acpi_disable_cmcff" which is used by IA-32 Architecture > Corrected Machine Check (CMC). > > Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> > Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org> > Signed-off-by: Fu Wei <fu.wei@linaro.org> > --- > Changelog: > v4: Rebase to latest kernel version(4.4-rc4). > Move arch_apei_flush_tlb_one into header file as a inline function > Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff". > > v3: https://lkml.org/lkml/2015/12/3/521 > Remove "acpi_disable_cmcff" from arm64 code, > and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)" > > v2: https://lkml.org/lkml/2015/12/2/432 > Rebase to latest kernel version(4.4-rc3). > Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c > > v1: https://lkml.org/lkml/2015/8/14/199 > Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h. > Delete arch/arm64/kernel/apei.c. > Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff". > > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/acpi.h | 5 +++++ > drivers/acpi/apei/hest.c | 19 ++++++++++++++++--- > 3 files changed, 22 insertions(+), 3 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 871f217..58c8992 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_REDUCED_HARDWARE_ONLY if ACPI > + select HAVE_ACPI_APEI if ACPI > select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE > select ARCH_HAS_ELF_RANDOMIZE > select ARCH_HAS_GCOV_PROFILE_ALL > diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h > index caafd63..31d3d9a 100644 > --- a/arch/arm64/include/asm/acpi.h > +++ b/arch/arm64/include/asm/acpi.h > @@ -17,6 +17,7 @@ > > #include <asm/cputype.h> > #include <asm/smp_plat.h> > +#include <asm/tlbflush.h> > > /* Macros for consistency checks of the GICC subtable of MADT */ > #define ACPI_MADT_GICC_LENGTH \ > @@ -94,6 +95,10 @@ static inline const char *acpi_get_enable_method(int cpu) > > #ifdef CONFIG_ACPI_APEI > pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr); How bout adding a empty line here? Except that, Acked-by: Hanjun Guo <hanjun.guo@linaro.org> Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Fu Wei <fu.wei@linaro.org> |
|---|---|
| Date | 2015-12-08 13:50 +0100 |
| Message-ID | <qDpSq-2rq-13@gated-at.bofh.it> |
| In reply to | #1286403 |
Hi Hanjun,
On 8 December 2015 at 19:26, Hanjun Guo <hanjun.guo@linaro.org> wrote:
> Hi Fu Wei,
>
>
> On 12/08/2015 03:03 PM, fu.wei@linaro.org wrote:
>>
>> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>>
>> This commit provides APEI arch-specific bits for aarch64
>>
>> Meanwhile, add a new subfunction "hest_ia_init" for
>> "acpi_disable_cmcff" which is used by IA-32 Architecture
>> Corrected Machine Check (CMC).
>>
>> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>> Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> ---
>> Changelog:
>> v4: Rebase to latest kernel version(4.4-rc4).
>> Move arch_apei_flush_tlb_one into header file as a inline function
>> Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
>>
>> v3: https://lkml.org/lkml/2015/12/3/521
>> Remove "acpi_disable_cmcff" from arm64 code,
>> and wrap it in hest.c by "#if defined(__i386__) ||
>> defined(__x86_64__)"
>>
>> v2: https://lkml.org/lkml/2015/12/2/432
>> Rebase to latest kernel version(4.4-rc3).
>> Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
>>
>> v1: https://lkml.org/lkml/2015/8/14/199
>> Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
>> Delete arch/arm64/kernel/apei.c.
>> Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
>>
>> arch/arm64/Kconfig | 1 +
>> arch/arm64/include/asm/acpi.h | 5 +++++
>> drivers/acpi/apei/hest.c | 19 ++++++++++++++++---
>> 3 files changed, 22 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 871f217..58c8992 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_REDUCED_HARDWARE_ONLY if ACPI
>> + select HAVE_ACPI_APEI if ACPI
>> select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>> select ARCH_HAS_ELF_RANDOMIZE
>> select ARCH_HAS_GCOV_PROFILE_ALL
>> diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
>> index caafd63..31d3d9a 100644
>> --- a/arch/arm64/include/asm/acpi.h
>> +++ b/arch/arm64/include/asm/acpi.h
>> @@ -17,6 +17,7 @@
>>
>> #include <asm/cputype.h>
>> #include <asm/smp_plat.h>
>> +#include <asm/tlbflush.h>
>>
>> /* Macros for consistency checks of the GICC subtable of MADT */
>> #define ACPI_MADT_GICC_LENGTH \
>> @@ -94,6 +95,10 @@ static inline const char *acpi_get_enable_method(int
>> cpu)
>>
>> #ifdef CONFIG_ACPI_APEI
>> pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
>
>
> How bout adding a empty line here?
np, done
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index 31d3d9a..da657a9 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -95,10 +95,10 @@ static inline const char *acpi_get_enable_method(int cpu)
#ifdef CONFIG_ACPI_APEI
pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
+
static inline void arch_apei_flush_tlb_one(unsigned long addr)
{
flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
}
-#endif
-
+#endif /* CONFIG_ACPI_APEI */
#endif /*_ASM_ACPI_H*/
>
> Except that,
>
> Acked-by: Hanjun Guo <hanjun.guo@linaro.org>
Great thanks for your review :-)
>
> Thanks
> Hanjun
--
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> |
|---|---|
| Date | 2015-12-08 13:40 +0100 |
| Message-ID | <qDpIK-2mc-17@gated-at.bofh.it> |
| In reply to | #1286288 |
On Tue, Dec 08, 2015 at 03:03:03PM +0800, fu.wei@linaro.org wrote:
> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
[...]
> +#if defined(__i386__) || defined(__x86_64__)
> /*
> * Check if firmware advertises firmware first mode. We need FF bit to be set
> * along with a set of MC banks which work in FF mode.
> */
> static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
> {
> - return arch_apei_enable_cmcff(hest_hdr, data);
> + if (!acpi_disable_cmcff)
Why do not you define the flag above in this file (move it out of x86 -
that's what I was aiming at in my previous reply) and remove this ifdeffery
altogether (First firmware handling could apply to arm64 too according to
specs and ACPI on arm64 guidelines) ?
arch_apei_enable_cmcff() is a weak function that does nothing on arm64
and if we need to add an implementation we can do it later.
Thanks,
Lorenzo
> + return !arch_apei_enable_cmcff(hest_hdr, data);
> +
> + return 0;
> }
>
> +static inline int __init hest_ia_init(void)
> +{
> + return apei_hest_parse(hest_parse_cmc, NULL);
> +}
> +#else
> +static inline int __init hest_ia_init(void) { return 0; }
> +#endif
> +
> struct ghes_arr {
> struct platform_device **ghes_devs;
> unsigned int count;
> @@ -232,8 +244,9 @@ void __init acpi_hest_init(void)
> goto err;
> }
>
> - if (!acpi_disable_cmcff)
> - apei_hest_parse(hest_parse_cmc, NULL);
> + rc = hest_ia_init();
> + if (rc)
> + goto err;
>
> if (!ghes_disable) {
> rc = apei_hest_parse(hest_parse_ghes_count, &ghes_count);
> --
> 2.5.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Hanjun Guo <hanjun.guo@linaro.org> |
|---|---|
| Date | 2015-12-08 14:00 +0100 |
| Message-ID | <qDq26-2uA-9@gated-at.bofh.it> |
| In reply to | #1286431 |
Hi Lorenzo,
On 12/08/2015 08:34 PM, Lorenzo Pieralisi wrote:
> On Tue, Dec 08, 2015 at 03:03:03PM +0800, fu.wei@linaro.org wrote:
>> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>
> [...]
>
>> +#if defined(__i386__) || defined(__x86_64__)
>> /*
>> * Check if firmware advertises firmware first mode. We need FF bit to be set
>> * along with a set of MC banks which work in FF mode.
>> */
>> static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
>> {
>> - return arch_apei_enable_cmcff(hest_hdr, data);
>> + if (!acpi_disable_cmcff)
>
> Why do not you define the flag above in this file (move it out of x86 -
> that's what I was aiming at in my previous reply) and remove this ifdeffery
> altogether (First firmware handling could apply to arm64 too according to
> specs and ACPI on arm64 guidelines) ?
If I understand it correctly, CMC (Corrected Machine Check) is for IA32
only, see section 18.3.2.1 IA-32 Architecture Machine Check Exception
in ACPI 6.0. for ARM64, we can use other type of error source for
firmware first handling, such as Generic Hardware Error Source, did
I miss something?
Thanks
Hanjun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Fu Wei <fu.wei@linaro.org> |
|---|---|
| Date | 2015-12-08 14:10 +0100 |
| Message-ID | <qDqbM-2Nk-23@gated-at.bofh.it> |
| In reply to | #1286446 |
Hi Lorenzo,
On 8 December 2015 at 20:52, Hanjun Guo <hanjun.guo@linaro.org> wrote:
> Hi Lorenzo,
>
> On 12/08/2015 08:34 PM, Lorenzo Pieralisi wrote:
>>
>> On Tue, Dec 08, 2015 at 03:03:03PM +0800, fu.wei@linaro.org wrote:
>>>
>>> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>>
>>
>> [...]
>>
>>> +#if defined(__i386__) || defined(__x86_64__)
>>> /*
>>> * Check if firmware advertises firmware first mode. We need FF bit to
>>> be set
>>> * along with a set of MC banks which work in FF mode.
>>> */
>>> static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr,
>>> void *data)
>>> {
>>> - return arch_apei_enable_cmcff(hest_hdr, data);
>>> + if (!acpi_disable_cmcff)
>>
>>
>> Why do not you define the flag above in this file (move it out of x86 -
>> that's what I was aiming at in my previous reply) and remove this
>> ifdeffery
>> altogether (First firmware handling could apply to arm64 too according to
>> specs and ACPI on arm64 guidelines) ?
>
>
> If I understand it correctly, CMC (Corrected Machine Check) is for IA32
> only, see section 18.3.2.1 IA-32 Architecture Machine Check Exception
> in ACPI 6.0. for ARM64, we can use other type of error source for
> firmware first handling, such as Generic Hardware Error Source, did
> I miss something?
yes, that is why I try to use "#if defined(__i386__) ||
defined(__x86_64__)" instead of moving acpi_disable_cmcff out of x86
code to here.
And I thinks we also can do "arch_apei_enable_cmcff" -->
"apei_enable_ia_cmcff" because that is IA32 only.
Please correct me if I misunderstand something. Thanks :-)
Great thanks for your feedback :-)
>
> Thanks
> Hanjun
--
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> |
|---|---|
| Date | 2015-12-08 15:10 +0100 |
| Message-ID | <qDr7R-3nh-25@gated-at.bofh.it> |
| In reply to | #1286451 |
On Tue, Dec 08, 2015 at 09:08:24PM +0800, Fu Wei wrote:
> Hi Lorenzo,
>
>
>
> On 8 December 2015 at 20:52, Hanjun Guo <hanjun.guo@linaro.org> wrote:
> > Hi Lorenzo,
> >
> > On 12/08/2015 08:34 PM, Lorenzo Pieralisi wrote:
> >>
> >> On Tue, Dec 08, 2015 at 03:03:03PM +0800, fu.wei@linaro.org wrote:
> >>>
> >>> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
> >>
> >>
> >> [...]
> >>
> >>> +#if defined(__i386__) || defined(__x86_64__)
> >>> /*
> >>> * Check if firmware advertises firmware first mode. We need FF bit to
> >>> be set
> >>> * along with a set of MC banks which work in FF mode.
> >>> */
> >>> static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr,
> >>> void *data)
> >>> {
> >>> - return arch_apei_enable_cmcff(hest_hdr, data);
> >>> + if (!acpi_disable_cmcff)
> >>
> >>
> >> Why do not you define the flag above in this file (move it out of x86 -
> >> that's what I was aiming at in my previous reply) and remove this
> >> ifdeffery
> >> altogether (First firmware handling could apply to arm64 too according to
> >> specs and ACPI on arm64 guidelines) ?
> >
> >
> > If I understand it correctly, CMC (Corrected Machine Check) is for IA32
> > only, see section 18.3.2.1 IA-32 Architecture Machine Check Exception
> > in ACPI 6.0. for ARM64, we can use other type of error source for
> > firmware first handling, such as Generic Hardware Error Source, did
> > I miss something?
>
> yes, that is why I try to use "#if defined(__i386__) ||
> defined(__x86_64__)" instead of moving acpi_disable_cmcff out of x86
> code to here.
>
> And I thinks we also can do "arch_apei_enable_cmcff" -->
> "apei_enable_ia_cmcff" because that is IA32 only.
>
> Please correct me if I misunderstand something. Thanks :-)
No you are right, I was confused by the arch_apei_enable_cmcff __weak
function declaration, I am not sure that makes much sense, as you say.
Side note: I wonder if there is a way to make the TLB flushing API common
across architectures therefore avoiding this arch_apei_flush_tlb* churn.
Thanks,
Lorenzo
> Great thanks for your feedback :-)
>
> >
> > Thanks
> > Hanjun
>
>
>
> --
> 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
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Fu Wei <fu.wei@linaro.org> |
|---|---|
| Date | 2015-12-09 04:30 +0100 |
| Message-ID | <qDDC1-2Px-5@gated-at.bofh.it> |
| In reply to | #1286511 |
Hi Lorenzo,
On 8 December 2015 at 22:07, Lorenzo Pieralisi
<lorenzo.pieralisi@arm.com> wrote:
> On Tue, Dec 08, 2015 at 09:08:24PM +0800, Fu Wei wrote:
>> Hi Lorenzo,
>>
>>
>>
>> On 8 December 2015 at 20:52, Hanjun Guo <hanjun.guo@linaro.org> wrote:
>> > Hi Lorenzo,
>> >
>> > On 12/08/2015 08:34 PM, Lorenzo Pieralisi wrote:
>> >>
>> >> On Tue, Dec 08, 2015 at 03:03:03PM +0800, fu.wei@linaro.org wrote:
>> >>>
>> >>> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>> >>
>> >>
>> >> [...]
>> >>
>> >>> +#if defined(__i386__) || defined(__x86_64__)
>> >>> /*
>> >>> * Check if firmware advertises firmware first mode. We need FF bit to
>> >>> be set
>> >>> * along with a set of MC banks which work in FF mode.
>> >>> */
>> >>> static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr,
>> >>> void *data)
>> >>> {
>> >>> - return arch_apei_enable_cmcff(hest_hdr, data);
>> >>> + if (!acpi_disable_cmcff)
>> >>
>> >>
>> >> Why do not you define the flag above in this file (move it out of x86 -
>> >> that's what I was aiming at in my previous reply) and remove this
>> >> ifdeffery
>> >> altogether (First firmware handling could apply to arm64 too according to
>> >> specs and ACPI on arm64 guidelines) ?
>> >
>> >
>> > If I understand it correctly, CMC (Corrected Machine Check) is for IA32
>> > only, see section 18.3.2.1 IA-32 Architecture Machine Check Exception
>> > in ACPI 6.0. for ARM64, we can use other type of error source for
>> > firmware first handling, such as Generic Hardware Error Source, did
>> > I miss something?
>>
>> yes, that is why I try to use "#if defined(__i386__) ||
>> defined(__x86_64__)" instead of moving acpi_disable_cmcff out of x86
>> code to here.
>>
>> And I thinks we also can do "arch_apei_enable_cmcff" -->
>> "apei_enable_ia_cmcff" because that is IA32 only.
>>
>> Please correct me if I misunderstand something. Thanks :-)
>
> No you are right, I was confused by the arch_apei_enable_cmcff __weak
> function declaration, I am not sure that makes much sense, as you say.
>
Thanks :-)
> Side note: I wonder if there is a way to make the TLB flushing API common
> across architectures therefore avoiding this arch_apei_flush_tlb* churn.
yes, make sense, I will think about this today , thanks for your suggestion.
>
> Thanks,
> Lorenzo
>
>> Great thanks for your feedback :-)
>>
>> >
>> > Thanks
>> > Hanjun
>>
>>
>>
>> --
>> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Fu Wei <fu.wei@linaro.org> |
|---|---|
| Date | 2015-12-10 03:10 +0100 |
| Message-ID | <qDYQa-8bv-5@gated-at.bofh.it> |
| In reply to | #1287053 |
Hi Lorenzo,
On 9 December 2015 at 11:25, Fu Wei <fu.wei@linaro.org> wrote:
> Hi Lorenzo,
>
> On 8 December 2015 at 22:07, Lorenzo Pieralisi
> <lorenzo.pieralisi@arm.com> wrote:
>> On Tue, Dec 08, 2015 at 09:08:24PM +0800, Fu Wei wrote:
>>> Hi Lorenzo,
>>>
>>>
>>>
>>> On 8 December 2015 at 20:52, Hanjun Guo <hanjun.guo@linaro.org> wrote:
>>> > Hi Lorenzo,
>>> >
>>> > On 12/08/2015 08:34 PM, Lorenzo Pieralisi wrote:
>>> >>
>>> >> On Tue, Dec 08, 2015 at 03:03:03PM +0800, fu.wei@linaro.org wrote:
>>> >>>
>>> >>> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>>> >>
>>> >>
>>> >> [...]
>>> >>
>>> >>> +#if defined(__i386__) || defined(__x86_64__)
>>> >>> /*
>>> >>> * Check if firmware advertises firmware first mode. We need FF bit to
>>> >>> be set
>>> >>> * along with a set of MC banks which work in FF mode.
>>> >>> */
>>> >>> static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr,
>>> >>> void *data)
>>> >>> {
>>> >>> - return arch_apei_enable_cmcff(hest_hdr, data);
>>> >>> + if (!acpi_disable_cmcff)
>>> >>
>>> >>
>>> >> Why do not you define the flag above in this file (move it out of x86 -
>>> >> that's what I was aiming at in my previous reply) and remove this
>>> >> ifdeffery
>>> >> altogether (First firmware handling could apply to arm64 too according to
>>> >> specs and ACPI on arm64 guidelines) ?
>>> >
>>> >
>>> > If I understand it correctly, CMC (Corrected Machine Check) is for IA32
>>> > only, see section 18.3.2.1 IA-32 Architecture Machine Check Exception
>>> > in ACPI 6.0. for ARM64, we can use other type of error source for
>>> > firmware first handling, such as Generic Hardware Error Source, did
>>> > I miss something?
>>>
>>> yes, that is why I try to use "#if defined(__i386__) ||
>>> defined(__x86_64__)" instead of moving acpi_disable_cmcff out of x86
>>> code to here.
>>>
>>> And I thinks we also can do "arch_apei_enable_cmcff" -->
>>> "apei_enable_ia_cmcff" because that is IA32 only.
>>>
>>> Please correct me if I misunderstand something. Thanks :-)
>>
>> No you are right, I was confused by the arch_apei_enable_cmcff __weak
>> function declaration, I am not sure that makes much sense, as you say.
>>
>
> Thanks :-)
>
>
>> Side note: I wonder if there is a way to make the TLB flushing API common
>> across architectures therefore avoiding this arch_apei_flush_tlb* churn.
>
> yes, make sense, I will think about this today , thanks for your suggestion.
I do some investigation on this "tlb" problem(actually not just tlb,
but also "get_mem_attribute") today,
I think we need to
(1)have a common API in tlbflush.h (at least for flushing one page)
across architectures(at least in x86 and arm64)
(2)use this API in drivers/acpi/apei/gest.c instead of arch_apei_flush_tlb_one
(3)delete the old function from arm64 and x86
So maybe we can have the another patchset to solve this problem, make
this patch just enable APEI for arm64 first. :-)
>
>>
>> Thanks,
>> Lorenzo
>>
>>> Great thanks for your feedback :-)
>>>
>>> >
>>> > Thanks
>>> > Hanjun
>>>
>>>
>>>
>>> --
>>> 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
--
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Will Deacon <will.deacon@arm.com> |
|---|---|
| Date | 2015-12-10 12:10 +0100 |
| Message-ID | <qE7gK-5pn-9@gated-at.bofh.it> |
| In reply to | #1288132 |
[adding Boris, as he might know how this works] On Thu, Dec 10, 2015 at 10:02:39AM +0800, Fu Wei wrote: > On 9 December 2015 at 11:25, Fu Wei <fu.wei@linaro.org> wrote: > > On 8 December 2015 at 22:07, Lorenzo Pieralisi > > <lorenzo.pieralisi@arm.com> wrote: > >> Side note: I wonder if there is a way to make the TLB flushing API common > >> across architectures therefore avoiding this arch_apei_flush_tlb* churn. > > > > yes, make sense, I will think about this today , thanks for your suggestion. > > I do some investigation on this "tlb" problem(actually not just tlb, > but also "get_mem_attribute") today, > I think we need to > (1)have a common API in tlbflush.h (at least for flushing one page) > across architectures(at least in x86 and arm64) It's not about flushing one page, flush_tlb_kernel_range (which is called by unmap_kernel_range) already takes care of that. The problem is that the unmap is called from irq/nmi context, so the IPIs required for broadcasting the TLB maintenance on x86 cannot be safely executed. So, if you're going to introduce anything in the way of TLB API, then it should be a generic form of the local_flush_tlb_* functions that we already have on ARM, imo. That sounds like a lot of work for this one problem. You could call flush_tlb_page with a fake vma/mm, but it's pretty ugly. > (2)use this API in drivers/acpi/apei/gest.c instead of arch_apei_flush_tlb_one > (3)delete the old function from arm64 and x86 Ideally, I think the ghes code would just use unmap_kernel_range unless the architecture specifically says that doesn't work in irq context. In that case, we don't need to implement the arch_apei_flush_tlb_one callback on arm64. One thing I don't fully grok about the code: since the page is mapped using ioremap_page_range, doesn't that allow other CPUs to speculatively fill their TLB with entries corresponding to the page mapped by the IRQ handler on another core? If the core with the speculative entries then takes an APEI exception, what guarantees do we have that it's looking at the right page? I think, for x86, we need a local invalidation on map, too. Will -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> |
|---|---|
| Date | 2015-12-08 17:00 +0100 |
| Message-ID | <qDsQi-4f7-19@gated-at.bofh.it> |
| In reply to | #1286288 |
On 08/12/15 07:03, fu.wei@linaro.org wrote:
> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>
> This commit provides APEI arch-specific bits for aarch64
>
> Meanwhile, add a new subfunction "hest_ia_init" for
> "acpi_disable_cmcff" which is used by IA-32 Architecture
> Corrected Machine Check (CMC).
>
> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
> Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> ---
> Changelog:
> v4: Rebase to latest kernel version(4.4-rc4).
> Move arch_apei_flush_tlb_one into header file as a inline function
> Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
>
> v3: https://lkml.org/lkml/2015/12/3/521
> Remove "acpi_disable_cmcff" from arm64 code,
> and wrap it in hest.c by "#if defined(__i386__) || defined(__x86_64__)"
>
> v2: https://lkml.org/lkml/2015/12/2/432
> Rebase to latest kernel version(4.4-rc3).
> Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
>
> v1: https://lkml.org/lkml/2015/8/14/199
> Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
> Delete arch/arm64/kernel/apei.c.
> Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
>
> arch/arm64/Kconfig | 1 +
> arch/arm64/include/asm/acpi.h | 5 +++++
> drivers/acpi/apei/hest.c | 19 ++++++++++++++++---
> 3 files changed, 22 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 871f217..58c8992 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_REDUCED_HARDWARE_ONLY if ACPI
> + select HAVE_ACPI_APEI if ACPI
> select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
> select ARCH_HAS_ELF_RANDOMIZE
> select ARCH_HAS_GCOV_PROFILE_ALL
> diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
> index caafd63..31d3d9a 100644
> --- a/arch/arm64/include/asm/acpi.h
> +++ b/arch/arm64/include/asm/acpi.h
> @@ -17,6 +17,7 @@
>
> #include <asm/cputype.h>
> #include <asm/smp_plat.h>
> +#include <asm/tlbflush.h>
>
> /* Macros for consistency checks of the GICC subtable of MADT */
> #define ACPI_MADT_GICC_LENGTH \
> @@ -94,6 +95,10 @@ static inline const char *acpi_get_enable_method(int cpu)
>
> #ifdef CONFIG_ACPI_APEI
> pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
> +static inline void arch_apei_flush_tlb_one(unsigned long addr)
> +{
> + flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
> +}
> #endif
>
> #endif /*_ASM_ACPI_H*/
> diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
> index 20b3fcf..715c58b 100644
> --- a/drivers/acpi/apei/hest.c
> +++ b/drivers/acpi/apei/hest.c
> @@ -117,15 +117,27 @@ int apei_hest_parse(apei_hest_func_t func, void *data)
> }
> EXPORT_SYMBOL_GPL(apei_hest_parse);
>
> +#if defined(__i386__) || defined(__x86_64__)
Would it be better if define a symbol like :
HAVE_ARCH_APEI_CMCFF for x86 and wrap it around that ?
> /*
> * Check if firmware advertises firmware first mode. We need FF bit to be set
> * along with a set of MC banks which work in FF mode.
> */
> static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void *data)
> {
> - return arch_apei_enable_cmcff(hest_hdr, data);
> + if (!acpi_disable_cmcff)
> + return !arch_apei_enable_cmcff(hest_hdr, data);
> +
> + return 0;
> }
>
> +static inline int __init hest_ia_init(void)
> +{
> + return apei_hest_parse(hest_parse_cmc, NULL);
> +}
> +#else
> +static inline int __init hest_ia_init(void) { return 0; }
> +#endif
Cheers
Suzuki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Fu Wei <fu.wei@linaro.org> |
|---|---|
| Date | 2015-12-09 04:10 +0100 |
| Message-ID | <qDDiG-2AX-7@gated-at.bofh.it> |
| In reply to | #1286626 |
Hi Suzuki,
On 8 December 2015 at 23:53, Suzuki K. Poulose <Suzuki.Poulose@arm.com> wrote:
> On 08/12/15 07:03, fu.wei@linaro.org wrote:
>>
>> From: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>>
>> This commit provides APEI arch-specific bits for aarch64
>>
>> Meanwhile, add a new subfunction "hest_ia_init" for
>> "acpi_disable_cmcff" which is used by IA-32 Architecture
>> Corrected Machine Check (CMC).
>>
>> Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
>> Tested-by: Jonathan (Zhixiong) Zhang <zjzhang@codeaurora.org>
>> Signed-off-by: Fu Wei <fu.wei@linaro.org>
>> ---
>> Changelog:
>> v4: Rebase to latest kernel version(4.4-rc4).
>> Move arch_apei_flush_tlb_one into header file as a inline function
>> Add a new subfunction "hest_ia_init" for "acpi_disable_cmcff".
>>
>> v3: https://lkml.org/lkml/2015/12/3/521
>> Remove "acpi_disable_cmcff" from arm64 code,
>> and wrap it in hest.c by "#if defined(__i386__) ||
>> defined(__x86_64__)"
>>
>> v2: https://lkml.org/lkml/2015/12/2/432
>> Rebase to latest kernel version(4.4-rc3).
>> Move arch_apei_flush_tlb_one() to arch/arm64/kernel/acpi.c
>>
>> v1: https://lkml.org/lkml/2015/8/14/199
>> Move arch_apei_flush_tlb_one() to arch/arm64/include/asm/apci.h.
>> Delete arch/arm64/kernel/apei.c.
>> Add "#ifdef CONFIG_ACPI_APEI" for "acpi_disable_cmcff".
>>
>> arch/arm64/Kconfig | 1 +
>> arch/arm64/include/asm/acpi.h | 5 +++++
>> drivers/acpi/apei/hest.c | 19 ++++++++++++++++---
>> 3 files changed, 22 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 871f217..58c8992 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_REDUCED_HARDWARE_ONLY if ACPI
>> + select HAVE_ACPI_APEI if ACPI
>> select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>> select ARCH_HAS_ELF_RANDOMIZE
>> select ARCH_HAS_GCOV_PROFILE_ALL
>> diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
>> index caafd63..31d3d9a 100644
>> --- a/arch/arm64/include/asm/acpi.h
>> +++ b/arch/arm64/include/asm/acpi.h
>> @@ -17,6 +17,7 @@
>>
>> #include <asm/cputype.h>
>> #include <asm/smp_plat.h>
>> +#include <asm/tlbflush.h>
>>
>> /* Macros for consistency checks of the GICC subtable of MADT */
>> #define ACPI_MADT_GICC_LENGTH \
>> @@ -94,6 +95,10 @@ static inline const char *acpi_get_enable_method(int
>> cpu)
>>
>> #ifdef CONFIG_ACPI_APEI
>> pgprot_t arch_apei_get_mem_attribute(phys_addr_t addr);
>> +static inline void arch_apei_flush_tlb_one(unsigned long addr)
>> +{
>> + flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
>> +}
>> #endif
>>
>> #endif /*_ASM_ACPI_H*/
>> diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
>> index 20b3fcf..715c58b 100644
>> --- a/drivers/acpi/apei/hest.c
>> +++ b/drivers/acpi/apei/hest.c
>> @@ -117,15 +117,27 @@ int apei_hest_parse(apei_hest_func_t func, void
>> *data)
>> }
>> EXPORT_SYMBOL_GPL(apei_hest_parse);
>>
>> +#if defined(__i386__) || defined(__x86_64__)
>
>
> Would it be better if define a symbol like :
>
> HAVE_ARCH_APEI_CMCFF for x86 and wrap it around that ?
I think that is a brilliant idea!
By this way , we can avoid to use "defined(__i386__) ||
defined(__x86_64__)" which is not recommended in Linux kernel.
Thanks for your suggestion.
I thinks maybe we can name this as HAVE_ACPI_APEI_HEST_IA32 for or x86
and wrap all hest_ia_init relevant code.
>
>> /*
>> * Check if firmware advertises firmware first mode. We need FF bit to
>> be set
>> * along with a set of MC banks which work in FF mode.
>> */
>> static int __init hest_parse_cmc(struct acpi_hest_header *hest_hdr, void
>> *data)
>> {
>> - return arch_apei_enable_cmcff(hest_hdr, data);
>> + if (!acpi_disable_cmcff)
>> + return !arch_apei_enable_cmcff(hest_hdr, data);
>> +
>> + return 0;
>> }
>>
>> +static inline int __init hest_ia_init(void)
>> +{
>> + return apei_hest_parse(hest_parse_cmc, NULL);
>> +}
>> +#else
>> +static inline int __init hest_ia_init(void) { return 0; }
>> +#endif
>
>
> Cheers
> Suzuki
>
--
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web