From: Will Deacon <will@kernel.org> To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, kernel-team@android.com, Will Deacon <will@kernel.org>, Catalin Marinas <catalin.marinas@arm.com>, Qian Cai <cai@redhat.com>, "Paul E. McKenney" <paulmck@kernel.org> Subject: [PATCH 1/2] arm64: psci: Avoid printing in cpu_psci_cpu_die() Date: Fri, 6 Nov 2020 10:36:01 +0000 [thread overview] Message-ID: <20201106103602.9849-2-will@kernel.org> (raw) In-Reply-To: <20201106103602.9849-1-will@kernel.org> cpu_psci_cpu_die() is called in the context of the dying CPU, which will no longer be online or tracked by RCU. It is therefore not generally safe to call printk() if the PSCI "cpu off" request fails, so remove the pr_crit() invocation. Cc: Qian Cai <cai@redhat.com> Cc: "Paul E. McKenney" <paulmck@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will@kernel.org> --- arch/arm64/kernel/psci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index 43ae4e0c968f..6a4f3e37c3b4 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c @@ -75,8 +75,6 @@ static void cpu_psci_cpu_die(unsigned int cpu) PSCI_0_2_POWER_STATE_TYPE_SHIFT; ret = psci_ops.cpu_off(state); - - pr_crit("unable to power off CPU%u (%d)\n", cpu, ret); } static int cpu_psci_cpu_kill(unsigned int cpu) -- 2.29.1.341.ge80a0c044ae-goog
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org> To: linux-arm-kernel@lists.infradead.org Cc: "Paul E. McKenney" <paulmck@kernel.org>, Qian Cai <cai@redhat.com>, kernel-team@android.com, linux-kernel@vger.kernel.org, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Subject: [PATCH 1/2] arm64: psci: Avoid printing in cpu_psci_cpu_die() Date: Fri, 6 Nov 2020 10:36:01 +0000 [thread overview] Message-ID: <20201106103602.9849-2-will@kernel.org> (raw) In-Reply-To: <20201106103602.9849-1-will@kernel.org> cpu_psci_cpu_die() is called in the context of the dying CPU, which will no longer be online or tracked by RCU. It is therefore not generally safe to call printk() if the PSCI "cpu off" request fails, so remove the pr_crit() invocation. Cc: Qian Cai <cai@redhat.com> Cc: "Paul E. McKenney" <paulmck@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will@kernel.org> --- arch/arm64/kernel/psci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm64/kernel/psci.c b/arch/arm64/kernel/psci.c index 43ae4e0c968f..6a4f3e37c3b4 100644 --- a/arch/arm64/kernel/psci.c +++ b/arch/arm64/kernel/psci.c @@ -75,8 +75,6 @@ static void cpu_psci_cpu_die(unsigned int cpu) PSCI_0_2_POWER_STATE_TYPE_SHIFT; ret = psci_ops.cpu_off(state); - - pr_crit("unable to power off CPU%u (%d)\n", cpu, ret); } static int cpu_psci_cpu_kill(unsigned int cpu) -- 2.29.1.341.ge80a0c044ae-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-11-06 10:36 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-06 10:36 [PATCH 0/2] arm64: Fix issues with CPU hotplug and RCU Will Deacon 2020-11-06 10:36 ` Will Deacon 2020-11-06 10:36 ` Will Deacon [this message] 2020-11-06 10:36 ` [PATCH 1/2] arm64: psci: Avoid printing in cpu_psci_cpu_die() Will Deacon 2020-11-19 13:24 ` kernel test robot 2020-11-06 10:36 ` [PATCH 2/2] arm64: smp: Tell RCU about CPUs that fail to come online Will Deacon 2020-11-06 10:36 ` Will Deacon 2020-11-06 14:43 ` Paul E. McKenney 2020-11-06 14:43 ` Paul E. McKenney
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=20201106103602.9849-2-will@kernel.org \ --to=will@kernel.org \ --cc=cai@redhat.com \ --cc=catalin.marinas@arm.com \ --cc=kernel-team@android.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=paulmck@kernel.org \ /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.