From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linutronix.de (193.142.43.55:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 21 Feb 2020 22:10:58 -0000 Received: from mga07.intel.com ([134.134.136.100]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1j5GVc-00024F-26 for speck@linutronix.de; Fri, 21 Feb 2020 23:10:57 +0100 Received: from localhost (mtg-dev.jf.intel.com [10.54.74.10]) by smtp.ostc.intel.com (Postfix) with ESMTP id 409966361 for ; Fri, 21 Feb 2020 22:10:52 +0000 (UTC) Date: Fri, 21 Feb 2020 14:10:51 -0800 From: mark gross Subject: [MODERATED] Re: [PATCH 1/2] more sampling fun 1 Message-ID: <20200221221051.GA87914@mtg-dev.jf.intel.com> Reply-To: mgross@linux.intel.com References: =?utf-8?q?=3Cc79feecdb14c62e3dd8f2680bc68292f99882aeb=2E1582?= =?utf-8?b?MTU9P3V0Zi04P3E/MjMyMj89LmdpdC5tZ3Jvc3NAbGludXguaW50ZWwuY29tPg==?= <2847e79bd70becdc174a4bd890c1be6b37247e43.camel@decadent.org.uk> MIME-Version: 1.0 In-Reply-To: <2847e79bd70becdc174a4bd890c1be6b37247e43.camel@decadent.org.uk> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Thu, Feb 20, 2020 at 07:08:45PM +0000, speck for Ben Hutchings wrote: > On Thu, 2020-02-06 at 14:11 -0800, speck for mark gross wrote: > > From: mark gross > > Subject: [PATCH 1/2] Add capability to specify a range of steppings in the > [...] > > --- a/arch/x86/include/asm/cpu_device_id.h > > +++ b/arch/x86/include/asm/cpu_device_id.h > > @@ -35,7 +35,19 @@ struct x86_cpu_desc { > > .x86_microcode_rev = (revision), \ > > } > > > > +/* > > + * Match a range of steppings > > + */ > > + > > +struct x86_cpu_id_ext { > > + struct x86_cpu_id id; > > + __u16 steppings; /* bit map of steppings to match against */ > > +}; > > + > > +#define X86_STEPPING_ANY 0 > [...] > > Minor point, but wouldn't it make more sense to define X86_STEPPING_ANY > as GENMASK(15, 0)? Then it's no longer a special case. > Right, I had initialy used basicaly the equivelent (-1 or 0xFFFF) for X86_STEPPING_ANY but, it was pointed out that other similar usages use 0 as a flag for "ANY" and was encuraged to mimic that logic. See X86_FAMILY_ANY, X86_MODEL_ANY, X86_FEATURE_ANY. I'm cool with either way. Given this background do you still encurage using GENMASK(15,0)? --mark