[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87io7vhaw3.fsf@ashishki-desk.ger.corp.intel.com>
Date: Mon, 31 Aug 2015 15:59:08 +0300
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Andi Kleen <andi@...stfloor.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
Arnaldo Carvalho de Melo <acme@...radead.org>
Subject: Re: [PATCH] perf/x86/intel/pt: Export cpu frequency ratios needed by PT decoders
Andi Kleen <andi@...stfloor.org> writes:
> Alexander Shishkin <alexander.shishkin@...ux.intel.com> writes:
>> + return sprintf(page, "%lu\n", val);
>> + case 1:
>> + cpuid(0x15, &eax, &ebx, &ecx, &edx);
>
> Surely this needs to be protected by a cpuid level check?
> Broadwell for once doesn't have CPUID 0x15.
I couldn't find where this is explicitly said in the SDM. However, the
leaf description says that CPUID.0x15.EBX[31:0]==0 means that the ratio
is not enumerated. I don't see how to better communicate this to
userspace though than to simply have 0 there.
Regards,
--
Alex
--
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