Re: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
On 2013年12月04日 01:12, Rob Herring wrote: On Tue, Dec 3, 2013 at 10:36 AM, Hanjun Guo wrote: [...] +#ifndef _ASM_ARM_ACPI_H +#define _ASM_ARM_ACPI_H + +static inline bool arch_has_acpi_pdc(void) +{ + return false; /* always false for now */ +} + +static inline void arch_acpi_set_pdc_bits(u32 *buf) +{ + return; +} + +#endif /*_ASM_ARM_ACPI_H*/ diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 45b20cd..73b1d3a 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -162,6 +162,17 @@ static inline void spin_lock_prefetch(const void *x) #define HAVE_ARCH_PICK_MMAP_LAYOUT +#ifdef CONFIG_ACPI The ifdef is not necessary. Good catch, will fix it in next version. Thanks for the comments. Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
On 2013年12月04日 00:53, One Thousand Gnomes wrote: O> +enum idle_boot_override { IDLE_NO_OVERRIDE = 0, IDLE_HALT, IDLE_NOMWAIT, + IDLE_POLL, IDLE_FORCE_MWAIT }; This should probably move out of the arch directory to be a single enum including both platforms values. That will make it rather easier to keep sane and avoid ifdefs around which definitions are for which processor. Thank you very much for the suggestion, it makes sense to me, will figure out how to implement it. Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
On 2013年12月04日 00:53, One Thousand Gnomes wrote: O +enum idle_boot_override { IDLE_NO_OVERRIDE = 0, IDLE_HALT, IDLE_NOMWAIT, + IDLE_POLL, IDLE_FORCE_MWAIT }; This should probably move out of the arch directory to be a single enum including both platforms values. That will make it rather easier to keep sane and avoid ifdefs around which definitions are for which processor. Thank you very much for the suggestion, it makes sense to me, will figure out how to implement it. Thanks Hanjun -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
On 2013年12月04日 01:12, Rob Herring wrote: On Tue, Dec 3, 2013 at 10:36 AM, Hanjun Guo hanjun@linaro.org wrote: [...] +#ifndef _ASM_ARM_ACPI_H +#define _ASM_ARM_ACPI_H + +static inline bool arch_has_acpi_pdc(void) +{ + return false; /* always false for now */ +} + +static inline void arch_acpi_set_pdc_bits(u32 *buf) +{ + return; +} + +#endif /*_ASM_ARM_ACPI_H*/ diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 45b20cd..73b1d3a 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -162,6 +162,17 @@ static inline void spin_lock_prefetch(const void *x) #define HAVE_ARCH_PICK_MMAP_LAYOUT +#ifdef CONFIG_ACPI The ifdef is not necessary. Good catch, will fix it in next version. Thanks for the comments. Hanjun -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
On Tue, Dec 3, 2013 at 10:36 AM, Hanjun Guo wrote: > The _PDC (Processor Driver Capabilities) object provides OSPM a > mechanism to convey to the platform the capabilities supported > by OSPM for processor power management. > > OSPM evaluates _PDC prior to evaluating any other processor > power management objects returning configuration information. > > This patch introduces the skeleton of _PDC related file to make > ACPI core can be compiled on ARM64. > > Signed-off-by: Al Stone > Signed-off-by: Graeme Gregory > Signed-off-by: Hanjun Guo > --- > arch/arm64/include/asm/acpi.h | 32 > arch/arm64/include/asm/processor.h | 11 +++ > arch/arm64/kernel/process.c|5 + > 3 files changed, 48 insertions(+) > create mode 100644 arch/arm64/include/asm/acpi.h > > diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h > new file mode 100644 > index 000..c186f5b > --- /dev/null > +++ b/arch/arm64/include/asm/acpi.h > @@ -0,0 +1,32 @@ > +/* > + * Copyright (C) 2013, Al Stone > + * > + * ~~ > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License as published by > + * the Free Software Foundation; either version 2 of the License, or > + * (at your option) any later version. > + * > + * This program is distributed in the hope that it will be useful, > + * but WITHOUT ANY WARRANTY; without even the implied warranty of > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > + * GNU General Public License for more details. > + * > + * ~~ > + */ > + > +#ifndef _ASM_ARM_ACPI_H > +#define _ASM_ARM_ACPI_H > + > +static inline bool arch_has_acpi_pdc(void) > +{ > + return false; /* always false for now */ > +} > + > +static inline void arch_acpi_set_pdc_bits(u32 *buf) > +{ > + return; > +} > + > +#endif /*_ASM_ARM_ACPI_H*/ > diff --git a/arch/arm64/include/asm/processor.h > b/arch/arm64/include/asm/processor.h > index 45b20cd..73b1d3a 100644 > --- a/arch/arm64/include/asm/processor.h > +++ b/arch/arm64/include/asm/processor.h > @@ -162,6 +162,17 @@ static inline void spin_lock_prefetch(const void *x) > > #define HAVE_ARCH_PICK_MMAP_LAYOUT > > +#ifdef CONFIG_ACPI The ifdef is not necessary. > +/* > + * FIXME: there is no MWAIT on ARM, should be WFI or something else, > + * and modify drivers/acpi/processor_core.c too. > + */ > +enum idle_boot_override { IDLE_NO_OVERRIDE = 0, IDLE_HALT, IDLE_NOMWAIT, > + IDLE_POLL, IDLE_FORCE_MWAIT }; > + > +extern unsigned longboot_option_idle_override; > +#endif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
O> +enum idle_boot_override { IDLE_NO_OVERRIDE = 0, IDLE_HALT, IDLE_NOMWAIT, > + IDLE_POLL, IDLE_FORCE_MWAIT }; This should probably move out of the arch directory to be a single enum including both platforms values. That will make it rather easier to keep sane and avoid ifdefs around which definitions are for which processor. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
O +enum idle_boot_override { IDLE_NO_OVERRIDE = 0, IDLE_HALT, IDLE_NOMWAIT, + IDLE_POLL, IDLE_FORCE_MWAIT }; This should probably move out of the arch directory to be a single enum including both platforms values. That will make it rather easier to keep sane and avoid ifdefs around which definitions are for which processor. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [RFC part1 PATCH 4/7] ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
On Tue, Dec 3, 2013 at 10:36 AM, Hanjun Guo hanjun@linaro.org wrote: The _PDC (Processor Driver Capabilities) object provides OSPM a mechanism to convey to the platform the capabilities supported by OSPM for processor power management. OSPM evaluates _PDC prior to evaluating any other processor power management objects returning configuration information. This patch introduces the skeleton of _PDC related file to make ACPI core can be compiled on ARM64. Signed-off-by: Al Stone al.st...@linaro.org Signed-off-by: Graeme Gregory graeme.greg...@linaro.org Signed-off-by: Hanjun Guo hanjun@linaro.org --- arch/arm64/include/asm/acpi.h | 32 arch/arm64/include/asm/processor.h | 11 +++ arch/arm64/kernel/process.c|5 + 3 files changed, 48 insertions(+) create mode 100644 arch/arm64/include/asm/acpi.h diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h new file mode 100644 index 000..c186f5b --- /dev/null +++ b/arch/arm64/include/asm/acpi.h @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2013, Al Stone al.st...@linaro.org + * + * ~~ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * ~~ + */ + +#ifndef _ASM_ARM_ACPI_H +#define _ASM_ARM_ACPI_H + +static inline bool arch_has_acpi_pdc(void) +{ + return false; /* always false for now */ +} + +static inline void arch_acpi_set_pdc_bits(u32 *buf) +{ + return; +} + +#endif /*_ASM_ARM_ACPI_H*/ diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h index 45b20cd..73b1d3a 100644 --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -162,6 +162,17 @@ static inline void spin_lock_prefetch(const void *x) #define HAVE_ARCH_PICK_MMAP_LAYOUT +#ifdef CONFIG_ACPI The ifdef is not necessary. +/* + * FIXME: there is no MWAIT on ARM, should be WFI or something else, + * and modify drivers/acpi/processor_core.c too. + */ +enum idle_boot_override { IDLE_NO_OVERRIDE = 0, IDLE_HALT, IDLE_NOMWAIT, + IDLE_POLL, IDLE_FORCE_MWAIT }; + +extern unsigned longboot_option_idle_override; +#endif -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/