Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1264539pxb; Wed, 2 Feb 2022 00:23:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJys2bm9O8d5RiahErr1LQAzIbXJpr2KGyiS/C0L4vP/JIu8S09Xep6JKQlq2Gle/pRd0Iew X-Received: by 2002:a63:6b43:: with SMTP id g64mr4050156pgc.585.1643790206261; Wed, 02 Feb 2022 00:23:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643790206; cv=none; d=google.com; s=arc-20160816; b=VrgX+Z5DJHT2OZFZyCVwxSxDro/3zQsTQTGKs9tMjRfzLqaIqNKGtz7aSaoTa2nsG4 aT/zoJG7HGb4fj8/O0AzpD5vj/8dm4BA8/33qR9N38L1mtFk4JDhNdOxRq8hAuitvoOM n5fFvJCaE/3rYMIOfLztBTf29I0dGGZOllMpsQY4Z7+UrDJmVEVFTGE3rl6+mDvObt3T 0bSamYlp120iPhM6emWX/7PUYpDCp96klnwgUzx6a+lyOK4xmYBXUPON860hc5s17ozO Zmnsfrsg2bGwzvLUJXHSpFqq92s2zddl2qszIAft3738ijkx+RofhEHJRUQFRMb2SNIC LkPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=B1+wj5LVAnOND9i89+cl2MoaqHLTmPZKFVHEjbRXDZs=; b=Ovrcv4INLqudhCZkVRWNXkFxj2UebQv8XSCkg5eA0qOyNbwU8sArBJERNZDjrWKb+c cJGJQUYTWWz+EeaoCZfBME380URgDTlAkj2/D0aefo646vm/TEgD8YI3Fbn59q8yuvpj M/2qjHVfzyr9G3vN/0Tobg0ODOP8t2x3JpNjSk54dg3wmuYW0YRJnvEOytURdVIEh/nC UgW77ZOVuqRsmByb/ykL/dLsVxCTgG0ELr4VxWBvKE/wvQd8w/tXsbs178W51m2WWEKm Uti/NQKtLJ0B0EUQBsMSdWoRs4g6obI+b3woYA30t8LlI09yRzZ0TY4lc9/9oQq3as0f wXSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z7tbi7yA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7si4383212pjm.137.2022.02.02.00.23.14; Wed, 02 Feb 2022 00:23:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z7tbi7yA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243586AbiBBBA4 (ORCPT + 99 others); Tue, 1 Feb 2022 20:00:56 -0500 Received: from mga03.intel.com ([134.134.136.65]:20163 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229994AbiBBBAz (ORCPT ); Tue, 1 Feb 2022 20:00:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643763655; x=1675299655; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=vDbMgeOCMKbsw6F5Rtn4JMP/kbMOZMhb5AzDRkk3ig4=; b=Z7tbi7yA7IC0mElL/R17XN5xC2fLrSGlbUoR43RJ78PCHBbxI53Te2LM qnVc0MeDUgEufwaJrigqCNISNqAm4nUusA7Zbwmmd9v4WTKPKdOUuqMyh EdfMaPoMyFSdFeoJawXmQ2TQhrFhwGoSiQKAo15QEpOqJEZvEYh4xnhW1 w/WUShv+WyLekTvIoVr/4zD7sXtes0qUPLvm9fusgLrGwZfbhz1WAFi+o teJCBx1vt0oAJEKbOnh5BsRLLhjdOKG+n25g5xgzj6gYUtYDurM1D8uso i7bcYmo97zT7aTRoLTuNktPiMeNZtnln+f/OpCQ9xrBkcIMCyW4mcgwXu A==; X-IronPort-AV: E=McAfee;i="6200,9189,10245"; a="247778221" X-IronPort-AV: E=Sophos;i="5.88,335,1635231600"; d="scan'208";a="247778221" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2022 17:00:54 -0800 X-IronPort-AV: E=Sophos;i="5.88,335,1635231600"; d="scan'208";a="538052810" Received: from iweiny-desk2.sc.intel.com (HELO localhost) ([10.3.52.147]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Feb 2022 17:00:53 -0800 Date: Tue, 1 Feb 2022 17:00:53 -0800 From: Ira Weiny To: Dave Hansen Cc: Dave Hansen , "H. Peter Anvin" , Dan Williams , Fenghua Yu , Rick Edgecombe , linux-kernel@vger.kernel.org Subject: Re: [PATCH V8 03/44] x86/pkeys: Create pkeys_common.h Message-ID: <20220202010053.GT785175@iweiny-DESK2.sc.intel.com> References: <20220127175505.851391-1-ira.weiny@intel.com> <20220127175505.851391-4-ira.weiny@intel.com> <7bb7d2be-9fa0-1b0d-17d1-adb7d58d5389@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7bb7d2be-9fa0-1b0d-17d1-adb7d58d5389@intel.com> User-Agent: Mutt/1.11.1 (2018-12-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 28, 2022 at 02:43:54PM -0800, Dave Hansen wrote: > On 1/27/22 09:54, ira.weiny@intel.com wrote: > > From: Ira Weiny > > > > Protection Keys User (PKU) and Protection Keys Supervisor (PKS) work in > > similar fashions and can share common defines. Specifically PKS and PKU > > each have: > > > > 1. A single control register > > 2. The same number of keys > > 3. The same number of bits in the register per key > > 4. Access and Write disable in the same bit locations > > > > Given the above, share all the macros that synthesize and manipulate > > register values between the two features. Share these defines by moving > > them into a new header, change their names to reflect the common use, > > and include the header where needed. > > I'd probably include *one* more sentence to prime the reader for the > pattern they are about to see. Perhaps: > > This mostly takes the form of converting names from the PKU- > specific "PKRU" to the U/S-agnostic "PKR". Fair enough. > > > Also while editing the code remove the use of 'we' from comments being > > touched. > > > > NOTE the checkpatch errors are ignored for the init_pkru_value to > > align the values in the code. > > > > Signed-off-by: Ira Weiny > > Either way, this looks fine: > > Acked-by: Dave Hansen Thanks! Ira