From: Peter Zijlstra <peterz@infradead.org>
To: linux-kernel@vger.kernel.org
Cc: linux-tip-commits@vger.kernel.org,
Zhang Rui <rui.zhang@intel.com>,
"Chang S. Bae" <chang.seok.bae@intel.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
x86@kernel.org
Subject: Re: [tip: x86/fpu] intel_idle: Add a new flag to initialize the AMX state
Date: Thu, 9 Jun 2022 12:23:37 +0200 [thread overview]
Message-ID: <YqHKKa/yamRS06tC@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <165471675715.4207.17983340888752028780.tip-bot2@tip-bot2>
On Wed, Jun 08, 2022 at 07:32:37PM -0000, tip-bot2 for Chang S. Bae wrote:
> @@ -134,6 +140,9 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,
> if (state->flags & CPUIDLE_FLAG_IRQ_ENABLE)
> local_irq_enable();
>
> + if (state->flags & CPUIDLE_FLAG_INIT_XSTATE)
> + fpu_idle_fpregs();
> +
> mwait_idle_with_hints(eax, ecx);
>
> return index;
This will conflict with an intel_idle patch Rafael took from me; the
resolution would be something along these lines:
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -166,6 +166,13 @@ static __cpuidle int intel_idle_irq(stru
return ret;
}
+static __cpuidle int intel_idle_xstate(struct cpuidle_device *dev,
+ struct cpuidle_driver *drv, int index)
+{
+ fpu_idle_fpregs();
+ return __intel_idle(dev, drv, index);
+}
+
/**
* intel_idle_s2idle - Ask the processor to enter the given idle state.
* @dev: cpuidle device of the target CPU.
@@ -1831,6 +1838,9 @@ static void __init intel_idle_init_cstat
if (cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_IRQ_ENABLE)
drv->states[drv->state_count].enter = intel_idle_irq;
+ if (cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_INIT_XSTATE)
+ drv->states[drv->state_count].enter = intel_idle_xstate;
+
if ((disabled_states_mask & BIT(drv->state_count)) ||
((icpu->use_acpi || force_use_acpi) &&
intel_idle_off_by_default(mwait_hint) &&
next prev parent reply other threads:[~2022-06-09 10:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-08 16:47 [PATCH v5 0/2] x86/fpu: Make AMX state ready for CPU idle Chang S. Bae
2022-06-08 16:47 ` [PATCH v5 1/2] x86/fpu: Add a helper to prepare AMX state for low-power " Chang S. Bae
2022-06-08 19:32 ` [tip: x86/fpu] " tip-bot2 for Chang S. Bae
2022-06-14 22:46 ` tip-bot2 for Chang S. Bae
2022-06-14 22:53 ` tip-bot2 for Chang S. Bae
2022-07-19 17:31 ` tip-bot2 for Chang S. Bae
2022-06-08 16:47 ` [PATCH v5 2/2] intel_idle: Add a new flag to initialize the AMX state Chang S. Bae
2022-06-08 19:32 ` [tip: x86/fpu] " tip-bot2 for Chang S. Bae
2022-06-09 10:23 ` Peter Zijlstra [this message]
2022-06-14 16:41 ` [PATCH][Rebased] " Chang S. Bae
2022-07-19 17:31 ` [tip: x86/fpu] " tip-bot2 for Chang S. Bae
[not found] ` <38cd51750ef7b995506d001eae3e4ec872cf5b77.camel@linux.intel.com>
2022-06-14 17:23 ` [PATCH v5 2/2] " Chang S. Bae
2022-06-15 6:25 ` Artem Bityutskiy
2022-06-14 22:53 ` [tip: x86/fpu] " tip-bot2 for Chang S. Bae
2022-07-18 9:06 ` Borislav Petkov
2022-07-18 18:56 ` [PATCH][Rebased] " Chang S. Bae
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=YqHKKa/yamRS06tC@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=chang.seok.bae@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rui.zhang@intel.com \
--cc=x86@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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox