>-----Original Message-----
>From: Arjan van de Ven [mailto:[email protected]]
>Sent: Tuesday, May 17, 2011 6:14 PM
>To: Mathew, JohnX
>Cc: [email protected]
>Subject: Re: [PATCH] intel_cpu: Add Medfield processor as Intel cpu
>
>On 5/17/2011 6:52 AM, John Mathew wrote:
>> Currently only NHM architecture cpu model numbers are checked to
>> identify Intel cpus. This patch adds the Medfield model id to
>> this list. Medfield is based on Atom architecture. In Atom
>architecture
>> only the MSR_PKG_RESIDENCY registers need to be read and there is no
>> MSR_CORE_RESIDENCY or MSR_CPU_RESIDENCY registers. So only a new
>> nhm_package class needs to be created.
>> diff --git a/cpu/intel_cpus.cpp b/cpu/intel_cpus.cpp
>> index f42f3b4..db5afb2 100644
>> --- a/cpu/intel_cpus.cpp
>> +++ b/cpu/intel_cpus.cpp
>> @@ -60,6 +60,16 @@ static uint64_t get_msr(int cpu, uint64_t offset)
>>      char msr_path[256];
>>
>>      fd = sprintf(msr_path, "/dev/cpu/%d/msr", cpu);
>> +
>> +    if (access(msr_path, R_OK) != 0){
>> +            fd = sprintf(msr_path, "/dev/msr%d", cpu);
>> +
>> +            if (access(msr_path, R_OK) != 0){
>> +                    fprintf(stderr, "msr reg not found");
>> +                    exit(-2);
>> +            }
>> +    }
>> +
>>      fd = open(msr_path, O_RDONLY);
>>
>>      retval = pread(fd,&msr, sizeof msr, offset);
>
>
>hmm your description does not match your patch...
>missend ?

In the 2.6.35 kernel, there is no /dev/cpu/%d/msr. Instead msr dev is 
registered as msr%d.
So I clubbed the checking of msr%d along with this patch. I can submit it as a 
different patch.


---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


_______________________________________________
Power mailing list
[email protected]
https://bughost.org/mailman/listinfo/power

Reply via email to