[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1242745272.3169.13.camel@localhost.localdomain>
Date: Tue, 19 May 2009 20:31:12 +0530
From: Jaswinder Singh Rajput <jaswinder@...nel.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...nel.org>,
Robert Richter <robert.richter@....com>,
Dave Jones <davej@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
x86 maintainers <x86@...nel.org>
Subject: Re: [PATCH 3/10 -tip] x86: Add cpufeatures for Advanced Power
Management
Hello Thomas,
On Sun, 2009-05-17 at 14:17 +0200, Thomas Gleixner wrote:
> On Fri, 15 May 2009, Jaswinder Singh Rajput wrote:
> > > Do you really believe that open-coding x86_capability[9] in .../common.c
> > > is better than the open-coding in ../powernow-k8.c ?
> > >
> >
> > BTW, then how you can set x86_capability[9] in one shot ? do you want me
> > to set each bit with set_cpu_cap() ?
>
> Using "9" as an array index is the point. This needs to be a constant
> near the other constants which describe the bits and a big fat comment.
>
You mean these should also use constant and big fat comment :
arch/x86/include/asm/elf.h:#define ELF_HWCAP (boot_cpu_data.x86_capability[0])
arch/x86/kernel/cpu/centaur.c: c->x86_capability[5] = cpuid_edx(0xC0000001);
arch/x86/kernel/cpu/common.c: c->x86_capability[0] = capability;
arch/x86/kernel/cpu/common.c: c->x86_capability[4] = excap;
arch/x86/kernel/cpu/common.c: c->x86_capability[1] = cpuid_edx(0x80000001);
arch/x86/kernel/cpu/common.c: c->x86_capability[6] = cpuid_ecx(0x80000001);
arch/x86/kernel/cpu/transmeta.c: c->x86_capability[2] = cpuid_edx(0x80860001);
arch/x86/kernel/cpu/transmeta.c: c->x86_capability[0] = cpuid_edx(0x00000001);
arch/x86/kernel/mpparse.c: processor.featureflag = boot_cpu_data.x86_capability[0];
arch/x86/lguest/boot.c: new_cpu_data.x86_capability[0] = cpuid_edx(1);
arch/x86/xen/enlighten.c: new_cpu_data.x86_capability[0] = cpuid_edx(1);
So should I also make constant for all x86_capability.
Peter, Ingo:
Do you think we need to arrange x86_capability in some order, currently
we are using x86_capability numbering in random order.
Thanks,
--
JSR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists