Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754075AbaATMag (ORCPT ); Mon, 20 Jan 2014 07:30:36 -0500 Received: from mail-pb0-f44.google.com ([209.85.160.44]:37247 "EHLO mail-pb0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751857AbaATMaa (ORCPT ); Mon, 20 Jan 2014 07:30:30 -0500 Message-ID: <52DD15FC.5030807@linaro.org> Date: Mon, 20 Jan 2014 20:26:36 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Sudeep Holla CC: "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Russell King - ARM Linux , "linux-acpi@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "grant.likely@linaro.org" , Matthew Garrett , Olof Johansson , Linus Walleij , Bjorn Helgaas , Rob Herring , Mark Rutland , Arnd Bergmann , "patches@linaro.org" , "linux-kernel@vger.kernel.org" , "linaro-kernel@lists.linaro.org" , "linaro-acpi@lists.linaro.org" , Charles Garcia-Tobin , Al Stone , "graeme.gregory@linaro.org" Subject: Re: [PATCH 04/20] ARM64 / ACPI: Introduce arm_core.c and its related head file References: <1389961514-13562-1-git-send-email-hanjun.guo@linaro.org> <1389961514-13562-5-git-send-email-hanjun.guo@linaro.org> <52D960D1.3090700@arm.com> In-Reply-To: <52D960D1.3090700@arm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2014-1-18 0:56, Sudeep Holla wrote: > On 17/01/14 12:24, Hanjun Guo wrote: >> Introduce arm_core.c and its related head file, after this patch, >> we can get ACPI tables from firmware on ARM64 now. >> >> Signed-off-by: Al Stone >> Signed-off-by: Graeme Gregory >> Signed-off-by: Hanjun Guo >> --- >> arch/arm64/include/asm/acpi.h | 57 +++++++++++ >> arch/arm64/kernel/setup.c | 6 ++ >> drivers/acpi/Makefile | 2 + >> drivers/acpi/plat/Makefile | 1 + >> drivers/acpi/plat/arm-core.c | 209 +++++++++++++++++++++++++++++++++++++++++ >> 5 files changed, 275 insertions(+) >> create mode 100644 drivers/acpi/plat/Makefile >> create mode 100644 drivers/acpi/plat/arm-core.c >> >> diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h >> index cf19dc6..908d71b 100644 >> --- a/arch/arm64/include/asm/acpi.h >> +++ b/arch/arm64/include/asm/acpi.h >> @@ -19,6 +19,43 @@ >> #ifndef _ASM_ARM64_ACPI_H >> #define _ASM_ARM64_ACPI_H >> >> +#include >> + >> +#include >> + >> +#define COMPILER_DEPENDENT_INT64 s64 >> +#define COMPILER_DEPENDENT_UINT64 u64 >> + >> +/* >> + * Calling conventions: >> + * >> + * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) >> + * ACPI_EXTERNAL_XFACE - External ACPI interfaces >> + * ACPI_INTERNAL_XFACE - Internal ACPI interfaces >> + * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces >> + */ >> +#define ACPI_SYSTEM_XFACE >> +#define ACPI_EXTERNAL_XFACE >> +#define ACPI_INTERNAL_XFACE >> +#define ACPI_INTERNAL_VAR_XFACE >> + >> +/* Asm macros */ >> +#define ACPI_FLUSH_CPU_CACHE() flush_cache_all() >> + >> +/* Basic configuration for ACPI */ >> +#ifdef CONFIG_ACPI >> +extern int acpi_disabled; >> +extern int acpi_noirq; >> +extern int acpi_pci_disabled; >> +extern int acpi_strict; >> + >> +static inline void disable_acpi(void) >> +{ >> + acpi_disabled = 1; >> + acpi_pci_disabled = 1; >> + acpi_noirq = 1; >> +} >> + >> static inline bool arch_has_acpi_pdc(void) >> { >> return false; /* always false for now */ >> @@ -29,4 +66,24 @@ static inline void arch_acpi_set_pdc_bits(u32 *buf) >> return; >> } >> >> +static inline void acpi_noirq_set(void) { acpi_noirq = 1; } >> +static inline void acpi_disable_pci(void) >> +{ >> + acpi_pci_disabled = 1; >> + acpi_noirq_set(); >> +} >> + >> +/* FIXME: this function should be moved to topology.h when it's ready */ >> +void arch_fix_phys_package_id(int num, u32 slot); >> + >> +/* temperally define -1 to make acpi core compilerable */ >> +#define cpu_physical_id(cpu) -1 >> + > > I assume `cpu` here is logical cpu id in which case you can define it to be same > as cpu_logical_map ? Yes. it is about the hardware id of CPU and may refer to MPIDR in ARM/ARM64. 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/