From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752878AbdKWPZD (ORCPT ); Thu, 23 Nov 2017 10:25:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:58728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391AbdKWPZC (ORCPT ); Thu, 23 Nov 2017 10:25:02 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D8F421921 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=luto@kernel.org X-Google-Smtp-Source: AGs4zMY4dKOUrEGz6V8e789omhvYB78YDsn9e3S8GXcu8NbPIbPHCoA3NBqGDbi9z9v3VYpC+e3lBdC/cbE08u54+n8= MIME-Version: 1.0 In-Reply-To: <20171122173225.nlf7einjbi4u52q5@pd.tnic> References: <7d11626f17da123a741dc54b61edec5d868c3987.1511325444.git.luto@kernel.org> <20171122153327.fyxn4zspgdrjs45s@pd.tnic> <20171122173225.nlf7einjbi4u52q5@pd.tnic> From: Andy Lutomirski Date: Thu, 23 Nov 2017 07:24:41 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 05/18] x86/fixmap: Generalize the GDT fixmap mechanism To: Borislav Petkov Cc: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , Brian Gerst , Dave Hansen , Linus Torvalds , Josh Poimboeuf Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 22, 2017 at 9:32 AM, Borislav Petkov wrote: > On Wed, Nov 22, 2017 at 09:16:00AM -0800, Andy Lutomirski wrote: >> Agreed, except that the fixmap enum needs to know >> sizeof(cpu_entry_area), and I'm really hesitant to add yet another >> header dependency. > > Perhaps a separate asm/cpuarea.h. asm/cpu.h looks small enough but it > has hotplug and other misc stuff in there. > > Bah, our header separation needs a serious cleanup. ;-\ > >> My general habit is that I like the != 0 here because I'm doing >> arithmetic rather than thinking of % as some kind of logical operator. >> I.e. I find it easier to understand the way I wrote it. > > I know, and I can recognize the code you wrote in arch/x86/ just by > those tests, without looking at git blame output. :-) > > In my case, without the != 0 reads easier. I'm making the kernel more personal!