Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1231336 > unrolled thread
| Started by | Borislav Petkov <bp@alien8.de> |
|---|---|
| First post | 2015-09-23 12:50 +0200 |
| Last post | 2015-09-24 09:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [tip:x86/fpu] x86/fpu: Rename XSAVE macros Borislav Petkov <bp@alien8.de> - 2015-09-23 12:50 +0200
[tip:x86/fpu] x86/fpu: Fixup uninitialized feature_name warning tip-bot for Borislav Petkov <tipbot@zytor.com> - 2015-09-24 09:30 +0200
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2015-09-23 12:50 +0200 |
| Subject | Re: [tip:x86/fpu] x86/fpu: Rename XSAVE macros |
| Message-ID | <qbPMB-1HW-1@gated-at.bofh.it> |
On Mon, Sep 14, 2015 at 05:21:07AM -0700, tip-bot for Dave Hansen wrote:
> Commit-ID: d91cab78133d33b1dfd3d3fa7167fcbf74fb5f99
> Gitweb: http://git.kernel.org/tip/d91cab78133d33b1dfd3d3fa7167fcbf74fb5f99
> Author: Dave Hansen <dave.hansen@linux.intel.com>
> AuthorDate: Wed, 2 Sep 2015 16:31:26 -0700
> Committer: Ingo Molnar <mingo@kernel.org>
> CommitDate: Mon, 14 Sep 2015 12:21:46 +0200
>
> x86/fpu: Rename XSAVE macros
>
> There are two concepts that have some confusing naming:
> 1. Extended State Component numbers (currently called
> XFEATURE_BIT_*)
> 2. Extended State Component masks (currently called XSTATE_*)
>
> The numbers are (currently) from 0-9. State component 3 is the
> bounds registers for MPX, for instance.
>
> But when we want to enable "state component 3", we go set a bit
> in XCR0. The bit we set is 1<<3. We can check to see if a
> state component feature is enabled by looking at its bit.
>
> The current 'xfeature_bit's are at best xfeature bit _numbers_.
> Calling them bits is at best inconsistent with ending the enum
> list with 'XFEATURES_NR_MAX'.
>
> This patch renames the enum to be 'xfeature'. These also
> happen to be what the Intel documentation calls a "state
> component".
>
> We also want to differentiate these from the "XSTATE_*" macros.
> The "XSTATE_*" macros are a mask, and we rename them to match.
>
> These macros are reasonably widely used so this patch is a
> wee bit big, but this really is just a rename.
>
> The only non-mechanical part of this is the
>
> s/XSTATE_EXTEND_MASK/XFEATURE_MASK_EXTEND/
>
> We need a better name for it, but that's another patch.
>
> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Andy Lutomirski <luto@amacapital.net>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Brian Gerst <brgerst@gmail.com>
> Cc: Denys Vlasenko <dvlasenk@redhat.com>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Tim Chen <tim.c.chen@linux.intel.com>
> Cc: dave@sr71.net
> Cc: linux-kernel@vger.kernel.org
> Link: http://lkml.kernel.org/r/20150902233126.38653250@viggo.jf.intel.com
> [ Ported to v4.3-rc1. ]
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
...
> @@ -558,7 +558,7 @@ static int __init twofish_init(void)
> {
> const char *feature_name;
>
> - if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) {
> + if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
> pr_info("CPU feature '%s' is not supported.\n", feature_name);
> return -ENODEV;
> }
---
From: Borislav Petkov <bp@suse.de>
Date: Wed, 23 Sep 2015 12:44:59 +0200
Subject: [PATCH] x86/crypto: Fixup uninitialized feature_name warning
Hand in &feature_name to cpu_has_xfeatures() as it is supposed to. Fixes
an uninitialized warning.
Fixes: d91cab78133d ("x86/fpu: Rename XSAVE macros")
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/crypto/twofish_avx_glue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/crypto/twofish_avx_glue.c b/arch/x86/crypto/twofish_avx_glue.c
index 6f3738ced95e..b7a3904b953c 100644
--- a/arch/x86/crypto/twofish_avx_glue.c
+++ b/arch/x86/crypto/twofish_avx_glue.c
@@ -558,7 +558,7 @@ static int __init twofish_init(void)
{
const char *feature_name;
- if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
+ if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, &feature_name)) {
pr_info("CPU feature '%s' is not supported.\n", feature_name);
return -ENODEV;
}
--
2.3.5
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
--
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/
[toc] | [next] | [standalone]
| From | tip-bot for Borislav Petkov <tipbot@zytor.com> |
|---|---|
| Date | 2015-09-24 09:30 +0200 |
| Subject | [tip:x86/fpu] x86/fpu: Fixup uninitialized feature_name warning |
| Message-ID | <qc98D-4Fk-23@gated-at.bofh.it> |
| In reply to | #1231336 |
Commit-ID: 158ecc39185b885420e5136b803b29be2bbec7fb
Gitweb: http://git.kernel.org/tip/158ecc39185b885420e5136b803b29be2bbec7fb
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Wed, 23 Sep 2015 12:49:01 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 24 Sep 2015 09:21:20 +0200
x86/fpu: Fixup uninitialized feature_name warning
Hand in &feature_name to cpu_has_xfeatures() as it is supposed
to. Fixes an uninitialized warning.
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: brgerst@gmail.com
Cc: dvlasenk@redhat.com
Cc: fenghua.yu@intel.com
Cc: luto@amacapital.net
Cc: tim.c.chen@linux.intel.com
Fixes: d91cab78133d ("x86/fpu: Rename XSAVE macros")
Link: http://lkml.kernel.org/r/20150923104901.GA3538@pd.tnic
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/crypto/twofish_avx_glue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/crypto/twofish_avx_glue.c b/arch/x86/crypto/twofish_avx_glue.c
index 6f3738c..b7a3904 100644
--- a/arch/x86/crypto/twofish_avx_glue.c
+++ b/arch/x86/crypto/twofish_avx_glue.c
@@ -558,7 +558,7 @@ static int __init twofish_init(void)
{
const char *feature_name;
- if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, NULL)) {
+ if (!cpu_has_xfeatures(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM, &feature_name)) {
pr_info("CPU feature '%s' is not supported.\n", feature_name);
return -ENODEV;
}
--
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/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web