[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150807044636.GB7607@hr-slim.amd.com>
Date: Fri, 7 Aug 2015 12:46:37 +0800
From: Huang Rui <ray.huang@....com>
To: Borislav Petkov <bp@...e.de>
CC: Andy Lutomirski <luto@...capital.net>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Len Brown <lenb@...nel.org>,
John Stultz <john.stultz@...aro.org>,
Frédéric Weisbecker <fweisbec@...il.com>,
<linux-kernel@...r.kernel.org>, <x86@...nel.org>,
Fengguang Wu <fengguang.wu@...el.com>,
Aaron Lu <aaron.lu@...el.com>, Tony Li <tony.li@....com>,
Andreas Herrmann <herrmann.der.user@...il.com>
Subject: Re: [PATCH v6 2/2] x86, mwaitt: introduce mwaitx delay with a
configurable timer
On Thu, Aug 06, 2015 at 05:14:40PM +0200, Borislav Petkov wrote:
> On Wed, Aug 05, 2015 at 11:18:52AM +0800, Huang Rui wrote:
> > +static void delay_mwaitx(unsigned long __loops)
> > +{
> > + u32 delay, loops = __loops;
> > + u64 end, start;
>
> Hmm, this truncates __loops in case someone wants to delay for more
> than (u32)-1 TSC clocks. I guess the right thing to do is to do the
> calculation with u64s and MWAITX_MAX_LOOPS will keep us within bounds.
>
Yes, you're right. Thanks to update. :)
Thanks,
Rui
--
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