From patchwork Thu Dec 22 02:15:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 9484019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6C6C8601D5 for ; Thu, 22 Dec 2016 02:17:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A620200DF for ; Thu, 22 Dec 2016 02:17:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DE6C26D08; Thu, 22 Dec 2016 02:17:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D611524B48 for ; Thu, 22 Dec 2016 02:17:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJsuf-0001VA-D6; Thu, 22 Dec 2016 02:15:21 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJsue-0001V1-Gf for xen-devel@lists.xenproject.org; Thu, 22 Dec 2016 02:15:20 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id E3/C4-25657-7373B585; Thu, 22 Dec 2016 02:15:19 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeJIrShJLcpLzFFi42I5NlG2Q9fcPDr C4MRXMYvvWyYzOTB6HP5whSWAMYo1My8pvyKBNWPKj9PsBXvYKu78m8/WwLiMtYuRi0NIYCqj xOT9W5kgnINMEkdbZ7F0MXJysAkYSvx9sokNxBYRkJDY1LCCCcRmFrCWuPfmBzuILSxgLLG2e ykjiM0ioCpx+fctsDivgJvE0QWPwHolBOQkTh6bzApicwr4SOy8fAIsLiTgLfH0RQMzRE2GxL yeOawQtpfEohuXoGw1iavnNjFPYORbwMiwilGjOLWoLLVI19BSL6koMz2jJDcxM0fX0MBYLze 1uDgxPTUnMalYLzk/dxMjMFDqGRgYdzD+Pu53iFGSg0lJlPeUdnSEEF9SfkplRmJxRnxRaU5q 8SFGGQ4OJQneV6ZAOcGi1PTUirTMHGDIwqQlOHiURHiPgqR5iwsSc4sz0yFSpxh1OQ68X/GUS YglLz8vVUqcdxFIkQBIUUZpHtwIWPxcYpSVEuZlZGBgEOIpSC3KzSxBlX/FKM7BqCTMqwgyhS czrwRu0yugI5iAjljYHQ5yREkiQkqqgVFbesa9Kz6lgSv/nJzYn9daXhXGxqRz13W34t8ItyL NgA31gq1vze19orO2c27jOv3g1xWDqtUdZ3rECsWm7nr1guX5yU5v5z7FpJ49ym2bd8kreuz1 vORmt3Rhxhs+9Y74BZzz5zvvnC+yk630xe8DHCEVft3OdfIXzp9cklmlOutQmspJEyWW4oxEQ y3mouJEAOJ2ikOaAgAA X-Env-Sender: sstabellini@kernel.org X-Msg-Ref: server-3.tower-31.messagelabs.com!1482372918!77351942!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13477 invoked from network); 22 Dec 2016 02:15:19 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-3.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 22 Dec 2016 02:15:19 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CCC9C2034A; Thu, 22 Dec 2016 02:15:16 +0000 (UTC) Received: from sstabellini-ThinkPad-X260.hsd1.ca.comcast.net (96-82-76-110-static.hfc.comcastbusiness.net [96.82.76.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD6942013D; Thu, 22 Dec 2016 02:15:15 +0000 (UTC) From: Stefano Stabellini To: julien.grall@arm.com Date: Wed, 21 Dec 2016 18:15:10 -0800 Message-Id: <1482372913-18366-1-git-send-email-sstabellini@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: X-Virus-Scanned: ClamAV using ClamSMTP Cc: xen-devel@lists.xenproject.org, sstabellini@kernel.org Subject: [Xen-devel] [PATCH v2 1/4] xen/arm: fix GIC_INVALID_LR X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP GIC_INVALID_LR should be 0xff, but actually, defined as ~(uint8_t)0, is 0xffffffff. Fix the problem by placing the ~ operator before the cast. Signed-off-by: Stefano Stabellini Reviewed-by: Julien Grall --- xen/include/asm-arm/vgic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h index 672f649..467333c 100644 --- a/xen/include/asm-arm/vgic.h +++ b/xen/include/asm-arm/vgic.h @@ -69,7 +69,7 @@ struct pending_irq unsigned long status; struct irq_desc *desc; /* only set it the irq corresponds to a physical irq */ unsigned int irq; -#define GIC_INVALID_LR ~(uint8_t)0 +#define GIC_INVALID_LR (uint8_t)~0 uint8_t lr; uint8_t priority; /* inflight is used to append instances of pending_irq to