lkml.org 
[lkml]   [2017]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 2/5] x86/cpuid: Add generic table for cpuid dependencies
On Thu, 12 Oct 2017, Ingo Molnar wrote:
>
> * Andi Kleen <andi@firstfloor.org> wrote:
>
> > --- /dev/null
> > +++ b/arch/x86/kernel/cpu/cpuid-deps.c
> > @@ -0,0 +1,109 @@
> > +/* Declare dependencies between CPUIDs */
> > +#include <linux/kernel.h>
> > +#include <linux/init.h>
> > +#include <linux/module.h>
> > +#include <asm/cpufeature.h>
> > +
> > +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

\
 
 \ /
  Last update: 2017-10-12 17:14    [W:0.118 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site