From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752774AbcFIPtd (ORCPT ); Thu, 9 Jun 2016 11:49:33 -0400 Received: from mail.skyhub.de ([78.46.96.112]:40617 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751799AbcFIPtb (ORCPT ); Thu, 9 Jun 2016 11:49:31 -0400 Date: Thu, 9 Jun 2016 17:49:26 +0200 From: Borislav Petkov To: "H. Peter Anvin" Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Linux Kernel Mailing List , Andy Lutomirski Subject: Re: [PATCH v2 10/10] x86, asm: Use CC_SET()/CC_OUT() and static_cpu_has() in archrandom.h Message-ID: <20160609154926.GB15900@pd.tnic> References: <1465414726-197858-1-git-send-email-hpa@linux.intel.com> <1465414726-197858-11-git-send-email-hpa@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1465414726-197858-11-git-send-email-hpa@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 , > 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 > > v2: fix a conflict between and > discovered by Ingo Molnar. There are a few places in x86-specific > code where we need all of even when > CONFIG_ARCH_RANDOM is disabled, so 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 -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.