lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 17 Jan 2014 14:45:18 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, Len Brown <lenb@...nel.org>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: linux-next: build failure after merge of the tip tree

Hi all,

On Thu, 16 Jan 2014 14:51:08 -0800 "H. Peter Anvin" <hpa@...or.com> wrote:
>
> On 01/16/2014 02:34 PM, Stephen Rothwell wrote:
> > 
> > On Thu, 16 Jan 2014 23:25:36 +0100 Peter Zijlstra
> > <peterz@...radead.org> wrote:
> >> 
> >> On Fri, Jan 17, 2014 at 07:46:28AM +1100, Stephen Rothwell
> >> wrote:
> >>> 
> >>> On Thu, 16 Jan 2014 13:19:55 +0100 Peter Zijlstra
> >>> <peterz@...radead.org> wrote:
> >>>> 
> >>>> I think the below ought to work
> >>> 
> >>> To be clear, all you did was replace the body of mwait_idle()
> >>> with
> >>> 
> >>> mwait_idle_with_hints(0, 0);
> >> 
> >> Pretty much, and add the asm/mwait.h include, otherwise you'll
> >> end up with a compile fail.
> >> 
> >>> (and the comment above it)?  I need to apply in incremental
> >>> patch in the merge commit.
> >> 
> >> I don't think I touched the comment at all.
> > 
> 
> In retrospect this bit probably should have gone through the idle
> tree.  That was my bad, I need to coordinate with Len better.

So this is what I added as a merge fix patch.  Someone just needs to make
sure Linus gets this when the latter of the tow trees gets merged.

From: Stephen Rothwell <sfr@...b.auug.org.au>
Date: Fri, 17 Jan 2014 14:42:06 +1100
Subject: [PATCH] x86 idle: mwait_idle merge update

Signed-off-by: Stephen Rothwell <sfr@...b.auug.org.au>
---
 arch/x86/kernel/process.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index db471a87fdd8..4da840f01561 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -28,6 +28,7 @@
 #include <asm/fpu-internal.h>
 #include <asm/debugreg.h>
 #include <asm/nmi.h>
+#include <asm/mwait.h>
 
 /*
  * per-CPU TSS segments. Threads are completely 'soft' on Linux,
@@ -427,18 +428,7 @@ static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
 
 static void mwait_idle(void)
 {
-	if (!need_resched()) {
-		if (this_cpu_has(X86_FEATURE_CLFLUSH_MONITOR))
-			clflush((void *)&current_thread_info()->flags);
-
-		__monitor((void *)&current_thread_info()->flags, 0, 0);
-		smp_mb();
-		if (!need_resched())
-			__sti_mwait(0, 0);
-		else
-			local_irq_enable();
-	} else
-		local_irq_enable();
+	mwait_idle_with_hints(0, 0);
 }
 
 void select_idle_routine(const struct cpuinfo_x86 *c)
-- 
1.8.5.2


-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ