[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1201643817.12722.30.camel@yangyi-dev.bj.intel.com>
Date: Wed, 30 Jan 2008 05:56:57 +0800
From: Yi Yang <yi.y.yang@...el.com>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: tglx@...utronix.de, mingo@...hat.com, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org
Subject: Re: [PATCH 2.6.24] x86: add sysfs interface for cpuid module
On Tue, 2008-01-29 at 07:51 -0800, H. Peter Anvin wrote:
> Yi Yang wrote:
> > Current cpuid module will create a char device for every logical cpu,
> > when a user cats /dev/cpu/*/cpuid, he/she will enter a limitless loop,
> > the root cause is that cpuid module doesn't decide wether a cpuid level
> > is valid, it just uses an offset to denote cpuid level and take it to
> > cpuid instruction, cpuid instruction will ignore it and return some data
> >
> > This patch uses sysfs to avoid limitless loop and provide more flexible
> > interface for cpuid, please consider to merge to -mm tree in order to test.
>
> This is broken.
>
> Triple broken.
>
> It's broken, because it doesn't take into account the fact that Intel
> broke CPUID level 4 and made it "repeating" (neither did the cpuid char
> device, because it predated the Intel braindamage; I've had a patch for
> it privately for a while, but didn't push it upstream because paravirt
> broke it royally and I wanted the situation to settle down.)
level 4 doesn't result in repeating on Intel CPU, cpuid module sets
file offset to level, so cat /dev/cpu/*/cpuid will run cpuid instruction
continuously.
--
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