lkml.org 
[lkml]   [2012]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [67/90] intel idle: Make idle driver more robust
    On Thu, Jan 26, 2012 at 07:59:25AM -0800, Greg KH wrote:
    > On Thu, Jan 26, 2012 at 05:54:27PM +0200, Kirill A. Shutemov wrote:
    > > On Thu, Jan 26, 2012 at 07:47:17PM +0400, Michael Tokarev wrote:
    > > > 26.01.2012 18:45, Kirill A. Shutemov wrote:
    > > >
    > > > >>From: Thomas Renninger<trenn@suse.de>
    > > > >>
    > > > >>commit 5c2a9f06a9cd7194f884cdc88144866235dec07d upstream.
    > > > >>
    > > > >>kvm -cpu host passes the original cpuid info to the guest.
    > > > >>
    > > > >>Latest kvm version seem to return true for mwait_leaf cpuid
    > > > >>function on recent Intel CPUs. But it does not return mwait
    > > > >>C-states (mwait_substates), instead zero is returned.
    > > > >>
    > > > []
    > > > >> drivers/idle/intel_idle.c | 3 ++-
    > > > >> 1 file changed, 2 insertions(+), 1 deletion(-)
    > > > >>
    > > > >>--- a/drivers/idle/intel_idle.c
    > > > >>+++ b/drivers/idle/intel_idle.c
    > > > >>@@ -321,7 +321,8 @@ static int intel_idle_probe(void)
    > > > >> cpuid(CPUID_MWAIT_LEAF,&eax,&ebx,&ecx,&mwait_substates);
    > > > >>
    > > > >> if (!(ecx& CPUID5_ECX_EXTENSIONS_SUPPORTED) ||
    > > > >>- !(ecx& CPUID5_ECX_INTERRUPT_BREAK))
    > > > >>+ !(ecx& CPUID5_ECX_INTERRUPT_BREAK) ||
    > > > >>+ !mwait_substates)
    > > > >> return -ENODEV;
    > > > >
    > > > >It breaks build for me.
    > > > []
    > > > > CC drivers/idle/intel_idle.o
    > > > >/home/space/kas/git/public/linux-3.0-mid/drivers/idle/intel_idle.c: In function ‘intel_idle_probe’:
    > > > >/home/space/kas/git/public/linux-3.0-mid/drivers/idle/intel_idle.c:508:7: error: ‘mwait_substates’ undeclared (first use in this function)
    > > > >/home/space/kas/git/public/linux-3.0-mid/drivers/idle/intel_idle.c:508:7: note: each undeclared identifier is reported only once for each function it appears in
    > > > >make[3]: *** [drivers/idle/intel_idle.o] Error 1
    > > > >
    > > > >Variable 'substates' hasn't renamed to 'mwait_substates' in 3.0.
    > > > >See c423628 intel_idle: delete substates DEBUG modparam
    > > >
    > > > I wonder why in my 3.0.18 this variable is properly defined
    > > > in the same file, in line 77:
    > > >
    > > > ...
    > > > 74 /* intel_idle.max_cstate=0 disables driver */
    > > > 75 static int max_cstate = MWAIT_MAX_NUM_CSTATES - 1;
    > > > 76
    > > > 77 static unsigned int mwait_substates;
    > > > 78
    > > > 79 #define LAPIC_TIMER_ALWAYS_RELIABLE 0xFFFFFFFF
    > > > ...
    > >
    > > Oosp. Sorry for noise. My local patch breaks it.
    >
    > So, 3.0.18 is just fine, right?

    Yes.

    --
    Kirill A. Shutemov
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-01-26 17:09    [W:4.504 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site