From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, Hanjun Guo <hanjun.guo@linaro.org>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will.deacon@arm.com> Subject: Re: [PATCH 5/5] ARM64: kernel: acpi: honour acpi=force command line parameter Date: Wed, 25 Mar 2015 07:20:35 +0100 [thread overview] Message-ID: <CAKv+Gu9E2DCy29QSWK4gQLE+YPMbZhSfyg_TN6xDFfekJ27dFA@mail.gmail.com> (raw) In-Reply-To: <1427219940-27201-6-git-send-email-lorenzo.pieralisi@arm.com> On 24 March 2015 at 18:58, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote: > If acpi=force is passed on the command line, it forces ACPI to be > the only available boot method, hence it must be left enabled even > if the initialization and sanity checks on ACPI tables fails. > > This patch refactors ACPI initialization to prevent disabling ACPI > if acpi=force is passed on the command line. > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Hanjun Guo <hanjun.guo@linaro.org> > Cc: Catalin Marinas <catalin.marinas@arm.com> > --- Yes, much better Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > arch/arm64/include/asm/acpi.h | 3 --- > arch/arm64/kernel/acpi.c | 6 ++++-- > arch/arm64/kernel/setup.c | 2 +- > 3 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h > index e1a8965..59c05d8 100644 > --- a/arch/arm64/include/asm/acpi.h > +++ b/arch/arm64/include/asm/acpi.h > @@ -38,7 +38,6 @@ typedef u64 phys_cpuid_t; > extern int acpi_disabled; > extern int acpi_noirq; > extern int acpi_pci_disabled; > -extern bool param_acpi_force; > > /* 1 to indicate PSCI 0.2+ is implemented */ > static inline bool acpi_psci_present(void) > @@ -92,8 +91,6 @@ void __init acpi_init_cpus(void); > static inline bool acpi_psci_present(void) { return false; } > static inline bool acpi_psci_use_hvc(void) { return false; } > static inline void acpi_init_cpus(void) { } > - > -#define param_acpi_force false > #endif /* CONFIG_ACPI */ > > #endif /*_ASM_ACPI_H*/ > diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c > index 542f045..789994a 100644 > --- a/arch/arm64/kernel/acpi.c > +++ b/arch/arm64/kernel/acpi.c > @@ -43,7 +43,7 @@ static int enabled_cpus; > static bool bootcpu_valid __initdata; > > static bool param_acpi_off __initdata; > -bool param_acpi_force __initdata; > +static bool param_acpi_force __initdata; > > static int __init parse_acpi(char *arg) > { > @@ -324,8 +324,10 @@ out: > * If ACPI tables are initialized and FADT sanity checks passed, > * leave ACPI enabled and carry on booting; otherwise disable ACPI > * on initialization error. > + * If acpi=force was passed on the command line it forces ACPI > + * to be enabled even if its initialization failed. > */ > - if (err) > + if (err && !param_acpi_force) > disable_acpi(); > } > > diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c > index d60b1ad..b278311 100644 > --- a/arch/arm64/kernel/setup.c > +++ b/arch/arm64/kernel/setup.c > @@ -390,7 +390,7 @@ void __init setup_arch(char **cmdline_p) > > early_ioremap_reset(); > > - if (acpi_disabled && !param_acpi_force) { > + if (acpi_disabled) { > unflatten_device_tree(); > psci_dt_init(); > cpu_read_bootcpu_ops(); > -- > 2.2.1 >
WARNING: multiple messages have this Message-ID (diff)
From: ard.biesheuvel@linaro.org (Ard Biesheuvel) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/5] ARM64: kernel: acpi: honour acpi=force command line parameter Date: Wed, 25 Mar 2015 07:20:35 +0100 [thread overview] Message-ID: <CAKv+Gu9E2DCy29QSWK4gQLE+YPMbZhSfyg_TN6xDFfekJ27dFA@mail.gmail.com> (raw) In-Reply-To: <1427219940-27201-6-git-send-email-lorenzo.pieralisi@arm.com> On 24 March 2015 at 18:58, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote: > If acpi=force is passed on the command line, it forces ACPI to be > the only available boot method, hence it must be left enabled even > if the initialization and sanity checks on ACPI tables fails. > > This patch refactors ACPI initialization to prevent disabling ACPI > if acpi=force is passed on the command line. > > Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Hanjun Guo <hanjun.guo@linaro.org> > Cc: Catalin Marinas <catalin.marinas@arm.com> > --- Yes, much better Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > arch/arm64/include/asm/acpi.h | 3 --- > arch/arm64/kernel/acpi.c | 6 ++++-- > arch/arm64/kernel/setup.c | 2 +- > 3 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h > index e1a8965..59c05d8 100644 > --- a/arch/arm64/include/asm/acpi.h > +++ b/arch/arm64/include/asm/acpi.h > @@ -38,7 +38,6 @@ typedef u64 phys_cpuid_t; > extern int acpi_disabled; > extern int acpi_noirq; > extern int acpi_pci_disabled; > -extern bool param_acpi_force; > > /* 1 to indicate PSCI 0.2+ is implemented */ > static inline bool acpi_psci_present(void) > @@ -92,8 +91,6 @@ void __init acpi_init_cpus(void); > static inline bool acpi_psci_present(void) { return false; } > static inline bool acpi_psci_use_hvc(void) { return false; } > static inline void acpi_init_cpus(void) { } > - > -#define param_acpi_force false > #endif /* CONFIG_ACPI */ > > #endif /*_ASM_ACPI_H*/ > diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c > index 542f045..789994a 100644 > --- a/arch/arm64/kernel/acpi.c > +++ b/arch/arm64/kernel/acpi.c > @@ -43,7 +43,7 @@ static int enabled_cpus; > static bool bootcpu_valid __initdata; > > static bool param_acpi_off __initdata; > -bool param_acpi_force __initdata; > +static bool param_acpi_force __initdata; > > static int __init parse_acpi(char *arg) > { > @@ -324,8 +324,10 @@ out: > * If ACPI tables are initialized and FADT sanity checks passed, > * leave ACPI enabled and carry on booting; otherwise disable ACPI > * on initialization error. > + * If acpi=force was passed on the command line it forces ACPI > + * to be enabled even if its initialization failed. > */ > - if (err) > + if (err && !param_acpi_force) > disable_acpi(); > } > > diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c > index d60b1ad..b278311 100644 > --- a/arch/arm64/kernel/setup.c > +++ b/arch/arm64/kernel/setup.c > @@ -390,7 +390,7 @@ void __init setup_arch(char **cmdline_p) > > early_ioremap_reset(); > > - if (acpi_disabled && !param_acpi_force) { > + if (acpi_disabled) { > unflatten_device_tree(); > psci_dt_init(); > cpu_read_bootcpu_ops(); > -- > 2.2.1 >
next prev parent reply other threads:[~2015-03-25 6:20 UTC|newest] Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-24 17:58 [PATCH 0/5] ARM64: ACPI core updates Lorenzo Pieralisi 2015-03-24 17:58 ` Lorenzo Pieralisi 2015-03-24 17:58 ` [PATCH 1/5] ACPI: move arm64 GSI IRQ model to generic GSI IRQ layer Lorenzo Pieralisi 2015-03-24 17:58 ` Lorenzo Pieralisi 2015-03-25 13:20 ` Marc Zyngier 2015-03-25 13:20 ` Marc Zyngier 2015-03-25 13:20 ` Marc Zyngier 2015-03-25 15:41 ` Lorenzo Pieralisi 2015-03-25 15:41 ` Lorenzo Pieralisi 2015-03-25 15:41 ` Lorenzo Pieralisi 2015-03-25 13:23 ` Hanjun Guo 2015-03-25 13:23 ` Hanjun Guo 2015-03-25 13:23 ` Hanjun Guo 2015-03-24 17:58 ` [PATCH 2/5] ARM64: kernel: psci: factor out probe function Lorenzo Pieralisi 2015-03-24 17:58 ` Lorenzo Pieralisi 2015-03-25 13:29 ` Hanjun Guo 2015-03-25 13:29 ` Hanjun Guo 2015-03-25 13:29 ` Hanjun Guo 2015-03-24 17:58 ` [PATCH 3/5] ARM64: kernel: psci: let ACPI probe PSCI version Lorenzo Pieralisi 2015-03-24 17:58 ` Lorenzo Pieralisi 2015-03-25 13:35 ` Hanjun Guo 2015-03-25 13:35 ` Hanjun Guo 2015-03-25 13:35 ` Hanjun Guo 2015-03-24 17:58 ` [PATCH 4/5] ARM64: kernel: acpi: refactor ACPI tables init and checks Lorenzo Pieralisi 2015-03-24 17:58 ` Lorenzo Pieralisi 2015-03-25 13:45 ` Hanjun Guo 2015-03-25 13:45 ` Hanjun Guo 2015-03-25 13:45 ` Hanjun Guo 2015-03-25 14:26 ` Will Deacon 2015-03-25 14:26 ` Will Deacon 2015-03-25 14:26 ` Will Deacon 2015-03-25 15:13 ` Lorenzo Pieralisi 2015-03-25 15:13 ` Lorenzo Pieralisi 2015-03-25 15:13 ` Lorenzo Pieralisi 2015-03-24 17:58 ` [PATCH 5/5] ARM64: kernel: acpi: honour acpi=force command line parameter Lorenzo Pieralisi 2015-03-24 17:58 ` Lorenzo Pieralisi 2015-03-25 6:20 ` Ard Biesheuvel [this message] 2015-03-25 6:20 ` Ard Biesheuvel 2015-03-25 6:20 ` Ard Biesheuvel 2015-03-25 13:56 ` Hanjun Guo 2015-03-25 13:56 ` Hanjun Guo 2015-03-25 13:56 ` Hanjun Guo 2015-03-25 15:22 ` Lorenzo Pieralisi 2015-03-25 15:22 ` Lorenzo Pieralisi 2015-03-25 15:22 ` Lorenzo Pieralisi 2015-03-25 16:25 ` Catalin Marinas 2015-03-25 16:25 ` Catalin Marinas
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAKv+Gu9E2DCy29QSWK4gQLE+YPMbZhSfyg_TN6xDFfekJ27dFA@mail.gmail.com \ --to=ard.biesheuvel@linaro.org \ --cc=catalin.marinas@arm.com \ --cc=hanjun.guo@linaro.org \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=will.deacon@arm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.