Messages in this thread | | | Date | Thu, 9 Jun 2016 17:49:26 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH v2 10/10] x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.h |
| |
On Wed, Jun 08, 2016 at 12:38:46PM -0700, H. Peter Anvin wrote: > Use CC_SET()/CC_OUT() and static_cpu_has(). This produces code good > enough to eliminate ad hoc use of alternatives in <asm/archrandom.h>, > greatly simplifying the code. > > While we are at it, make x86_init_rdrand() compile out completely if > we don't need it. > > Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> > > v2: fix a conflict between <linux/random.h> and <asm/archrandom.h> > discovered by Ingo Molnar. There are a few places in x86-specific > code where we need all of <arch/archrandom.h> even when > CONFIG_ARCH_RANDOM is disabled, so <linux/random.h> does not > suffice. > --- > arch/x86/include/asm/archrandom.h | 128 ++++++++++++++++++-------------------- > arch/x86/kernel/cpu/rdrand.c | 4 +- > 2 files changed, 62 insertions(+), 70 deletions(-)
Reviewed-by: Borislav Petkov <bp@suse.de>
-- Regards/Gruss, Boris.
ECO tip #101: Trim your mails when you reply.
| |