Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7257644imm; Tue, 28 Aug 2018 08:53:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbTkCnpgnvDBRhI7CmapAr0vkpDJCLvkVujjW+2MVoMfqtVoixYVJ/U7OjlRBKohrQrVCa0 X-Received: by 2002:a62:d1b:: with SMTP id v27-v6mr2147122pfi.87.1535471625393; Tue, 28 Aug 2018 08:53:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535471625; cv=none; d=google.com; s=arc-20160816; b=KWCFvyYw/kPhNISFiXQpVnFbSWWhtEdHqT76nvConvww4MUI0DWaiUpyRR+/9lt76l y6NOfq6PGVvkVRUxTht5kIZfaLTa5nARCo5BBCkWfax60mdaoIN0jPGERF9JbrqxfL8r DTDKO53OexzuMX8QJ7gcCWUZzktvQ+mDRDSiXUBX4hVsecwbd16cSPx7sa8eSI0Mbpte xMHpm84mcClxd07LsYzQhiI7SbvhGy8E3N57nWXI7Hw8FWhrBNh3Capk8OTcpz2adOOh Pwyb/40jsjdB7rXaYePwl1pVWE0a6oTk3Jflcg4/5A3KMfJbi+m7xSULhfozC0Zw2dR9 Sj8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=I90OF0f6j9j92ar/9Am4o0zawr3aUDzRP9KcYNpyt0Y=; b=MSxZFBx+nDuEPX4taDmeQ9qjnZ6Vvyb5PeP9ZlxRqCGUZgptUXpusKtw2Kdqf2wxM3 tE3LSBMD9tjbe7SHWOkNNDP3MXdzfn3Ea1VWd9la2yRkxsjf+rTfMuM0zN7yBpzkUM2Z I7wm3mA5uhn8iHa2qVYFma+foSEi138EcI1/pENmz7/QeyKcgxHhiQk5PswfSSPAEHau GqOSO5QCTwhjN7UWqMbevDP9Ydn5Ka4aLFVZy5GCAlLzV3m5y2K+FMuE31r5CRR2PDSn uKsTxk0a+T4/aKNlZHiUq1Owqp4s9IT9GfFkKemNFf2kSfRlYfy3sAgTS69OyCPnx9bQ QbSQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13-v6si1329629pgh.255.2018.08.28.08.53.30; Tue, 28 Aug 2018 08:53:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727496AbeH1ToW (ORCPT + 99 others); Tue, 28 Aug 2018 15:44:22 -0400 Received: from foss.arm.com ([217.140.101.70]:40972 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726383AbeH1ToV (ORCPT ); Tue, 28 Aug 2018 15:44:21 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0DC7980D; Tue, 28 Aug 2018 08:52:05 -0700 (PDT) Received: from e112298-lin.Emea.Arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E6CD73F557; Tue, 28 Aug 2018 08:52:02 -0700 (PDT) From: Julien Thierry To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, daniel.thompson@linaro.org, joel@joelfernandes.org, marc.zyngier@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, james.morse@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, Julien Thierry , Stefano Stabellini Subject: [PATCH v5 07/27] arm64: xen: Use existing helper to check interrupt status Date: Tue, 28 Aug 2018 16:51:17 +0100 Message-Id: <1535471497-38854-8-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535471497-38854-1-git-send-email-julien.thierry@arm.com> References: <1535471497-38854-1-git-send-email-julien.thierry@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The status of interrupts might depend on more than just pstate. Use interrupts_disabled() instead of raw_irqs_disabled_flags() to take the full context into account. Signed-off-by: Julien Thierry Cc: Stefano Stabellini Cc: Catalin Marinas Cc: Will Deacon --- arch/arm64/include/asm/xen/events.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/xen/events.h b/arch/arm64/include/asm/xen/events.h index 4e22b7a..2788e95 100644 --- a/arch/arm64/include/asm/xen/events.h +++ b/arch/arm64/include/asm/xen/events.h @@ -14,7 +14,7 @@ enum ipi_vector { static inline int xen_irqs_disabled(struct pt_regs *regs) { - return raw_irqs_disabled_flags((unsigned long) regs->pstate); + return !interrupts_enabled(regs); } #define xchg_xen_ulong(ptr, val) xchg((ptr), (val)) -- 1.9.1