From patchwork Fri May 10 03:09:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 2548271 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BD53A3FD4E for ; Fri, 10 May 2013 03:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755704Ab3EJDKF (ORCPT ); Thu, 9 May 2013 23:10:05 -0400 Received: from tx2ehsobe005.messaging.microsoft.com ([65.55.88.15]:52880 "EHLO tx2outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755939Ab3EJDKA (ORCPT ); Thu, 9 May 2013 23:10:00 -0400 Received: from mail84-tx2-R.bigfish.com (10.9.14.248) by TX2EHSOBE002.bigfish.com (10.9.40.22) with Microsoft SMTP Server id 14.1.225.23; Fri, 10 May 2013 03:09:59 +0000 Received: from mail84-tx2 (localhost [127.0.0.1]) by mail84-tx2-R.bigfish.com (Postfix) with ESMTP id 8AFC92204BA; Fri, 10 May 2013 03:09:59 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1f42h1ee6h1de0h1fdah1202h1e76h1d1ah1d2ah1fc6hzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1d0ch1d2eh1d3fh1155h) Received: from mail84-tx2 (localhost.localdomain [127.0.0.1]) by mail84-tx2 (MessageSwitch) id 1368155393910540_24457; Fri, 10 May 2013 03:09:53 +0000 (UTC) Received: from TX2EHSMHS017.bigfish.com (unknown [10.9.14.235]) by mail84-tx2.bigfish.com (Postfix) with ESMTP id D24B920013A; Fri, 10 May 2013 03:09:53 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS017.bigfish.com (10.9.99.117) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 10 May 2013 03:09:49 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.328.11; Fri, 10 May 2013 03:09:49 +0000 Received: from snotra.am.freescale.net ([10.214.85.10]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id r4A39i1v025681; Thu, 9 May 2013 20:09:48 -0700 From: Scott Wood To: Alexander Graf , Benjamin Herrenschmidt CC: , , , Scott Wood Subject: [PATCH v2 1/4] powerpc: hard_irq_disable(): Call trace_hardirqs_off after disabling Date: Thu, 9 May 2013 22:09:41 -0500 Message-ID: <1368155384-11035-2-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368155384-11035-1-git-send-email-scottwood@freescale.com> References: <1368155384-11035-1-git-send-email-scottwood@freescale.com> MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org lockdep.c has this: /* * So we're supposed to get called after you mask local IRQs, * but for some reason the hardware doesn't quite think you did * a proper job. */ if (DEBUG_LOCKS_WARN_ON(!irqs_disabled())) return; Since irqs_disabled() is based on soft_enabled(), that (not just the hard EE bit) needs to be 0 before we call trace_hardirqs_off. Signed-off-by: Scott Wood --- arch/powerpc/include/asm/hw_irq.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/hw_irq.h b/arch/powerpc/include/asm/hw_irq.h index d615b28..ba713f1 100644 --- a/arch/powerpc/include/asm/hw_irq.h +++ b/arch/powerpc/include/asm/hw_irq.h @@ -96,11 +96,12 @@ static inline bool arch_irqs_disabled(void) #endif #define hard_irq_disable() do { \ + u8 _was_enabled = get_paca()->soft_enabled; \ __hard_irq_disable(); \ - if (local_paca->soft_enabled) \ - trace_hardirqs_off(); \ get_paca()->soft_enabled = 0; \ get_paca()->irq_happened |= PACA_IRQ_HARD_DIS; \ + if (_was_enabled) \ + trace_hardirqs_off(); \ } while(0) static inline bool lazy_irq_pending(void)