From patchwork Wed Jun 27 22:45:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 167756 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 0A7B8100875 for ; Thu, 28 Jun 2012 08:46:34 +1000 (EST) Received: from kryten (ppp121-45-170-72.lns20.syd6.internode.on.net [121.45.170.72]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPSA id 0F997B6F9F; Thu, 28 Jun 2012 08:45:09 +1000 (EST) Date: Thu, 28 Jun 2012 08:45:09 +1000 From: Anton Blanchard To: benh@kernel.crashing.org, paulus@samba.org Subject: [PATCH] powerpc: check_and_cede_processor never cedes Message-ID: <20120628084509.4caec81d@kryten> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Cc: linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15rc1 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" Commit f948501b36c6 ("Make hard_irq_disable() actually hard-disable interrupts") caused check_and_cede_processor to stop working. ->irq_happened will never be zero right after a hard_irq_disable so the compiler removes the call to cede_processor completely. The bug was introduced back in the lazy interrupt handling rework of 3.4 but was hidden until recently because hard_irq_disable did nothing. This issue will eventually appear in 3.4 stable since the hard_irq_disable fix is marked stable, so mark this one for stable too. Signed-off-by: Anton Blanchard Cc: stable@vger.kernel.org Index: linux-build/arch/powerpc/platforms/pseries/processor_idle.c =================================================================== --- linux-build.orig/arch/powerpc/platforms/pseries/processor_idle.c 2012-06-27 21:20:45.403761715 +1000 +++ linux-build/arch/powerpc/platforms/pseries/processor_idle.c 2012-06-27 21:57:14.796788823 +1000 @@ -106,7 +106,7 @@ static void check_and_cede_processor(voi * we first hard disable then check. */ hard_irq_disable(); - if (get_paca()->irq_happened == 0) + if (get_paca()->irq_happened == PACA_IRQ_HARD_DIS) cede_processor(); }