From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752697AbdJLPNt (ORCPT ); Thu, 12 Oct 2017 11:13:49 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:38744 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751691AbdJLPNr (ORCPT ); Thu, 12 Oct 2017 11:13:47 -0400 Date: Thu, 12 Oct 2017 17:13:34 +0200 (CEST) From: Thomas Gleixner To: Ingo Molnar cc: Andi Kleen , x86@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen , Jonathan McDowell Subject: Re: [PATCH v9 2/5] x86/cpuid: Add generic table for cpuid dependencies In-Reply-To: <20171012080733.4y5wlghjr524cgr3@gmail.com> Message-ID: References: <20171007000328.12843-1-andi@firstfloor.org> <20171007000328.12843-3-andi@firstfloor.org> <20171012080733.4y5wlghjr524cgr3@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 12 Oct 2017, Ingo Molnar wrote: > > * Andi Kleen wrote: > > > --- /dev/null > > +++ b/arch/x86/kernel/cpu/cpuid-deps.c > > @@ -0,0 +1,109 @@ > > +/* Declare dependencies between CPUIDs */ > > +#include > > +#include > > +#include > > +#include > > + > > +struct cpuid_dep { > > + unsigned short feature; > > + unsigned short depends; > > +}; > > Why are these 16-bit fields? 16-bit data types should be avoided as much as > possible, as they generate suboptimal code. I was looking at that as well and decided that we preferrably have a compressed data structure. The code which walks the table is hardly performance critical and the difference in text size is marginal. Thanks, tglx