From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760150AbaKAT4S (ORCPT ); Sat, 1 Nov 2014 15:56:18 -0400 Received: from www.linutronix.de ([62.245.132.108]:47403 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758469AbaKAT4Q (ORCPT ); Sat, 1 Nov 2014 15:56:16 -0400 Date: Sat, 1 Nov 2014 20:56:01 +0100 (CET) From: Thomas Gleixner To: Andy Lutomirski cc: Peter Zijlstra , Valdis Kletnieks , "linux-kernel@vger.kernel.org" , Paul Mackerras , Arnaldo Carvalho de Melo , Ingo Molnar , Kees Cook , Andrea Arcangeli , Vince Weaver , "hillf.zj" , x86@kernel.org Subject: Re: [PATCH v2 2/8] x86: Clean up cr4 manipulation In-Reply-To: <495a10bdc9e67016b8fd3945700d46cfd5c12c2f.1414190806.git.luto@amacapital.net> Message-ID: References: <495a10bdc9e67016b8fd3945700d46cfd5c12c2f.1414190806.git.luto@amacapital.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 24 Oct 2014, Andy Lutomirski wrote: > CR4 manipulation was split, seemingly at random, between direct > (write_cr4) and using a helper (set/clear_in_cr4). Unfortunately, > the set_in_cr4 and clear_in_cr4 helpers also poke at the boot code, > which only a small subset of users actually wanted. > > This patch replaces all cr4 access in functions that don't leave cr4 > exactly the way they found it with new helpers cr4_set_bits, > cr4_clear_bits, and cr4_set_bits_and_update_boot. > > Signed-off-by: Andy Lutomirski Reviewed-by: Thomas Gleixner