From patchwork Wed Apr 5 23:18:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 9665897 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 5D19960352 for ; Wed, 5 Apr 2017 23:23:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FC472816B for ; Wed, 5 Apr 2017 23:23:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44B5A28584; Wed, 5 Apr 2017 23:23:08 +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 010B72816B for ; Wed, 5 Apr 2017 23:23:08 +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 1cvuED-0004PL-KC; Wed, 05 Apr 2017 23:20:41 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvuEC-0004OY-CT for xen-devel@lists.xenproject.org; Wed, 05 Apr 2017 23:20:40 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id 8D/A7-23940-7CB75E85; Wed, 05 Apr 2017 23:20:39 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRWlGSWpSXmKPExsVysyfVTfd49dM Ig3ufRS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oyGzj1MBbdYK66/m8DawHiYpYuRi0NIYBOj xIMjW9ghnL2MEuc/dDF1MXJysAnoSuy4+ZoZxBYRCJWY8/MRkM3BwSxQKdG9iB8kLCxgKvHy7 EGwEhYBVYmXT/vBbF4BN4kNf64xgZRLCMhJXPmXABLmFHCXeNl6jAXEFgIquTZxKssERu4FjA yrGDWKU4vKUot0DQ30kooy0zNKchMzc4A8Y73c1OLixPTUnMSkYr3k/NxNjEDv1jMwMO5g3Nb lfIhRkoNJSZRXwedJhBBfUn5KZUZicUZ8UWlOavEhRhkODiUJXj5gsAgJFqWmp1akZeYAwwwm LcHBoyTCqw2S5i0uSMwtzkyHSJ1i1OWYc+/reyYhlrz8vFQpcV5ekCIBkKKM0jy4EbCQv8QoK yXMy8jAwCDEU5BalJtZgir/ilGcg1FJmHdKFdAUnsy8ErhNr4COYAI64smdhyBHlCQipKQaGA vu3Isq+itkkh2mVHCqg0kiIH+Jzo00txS/67UX//D6vrt47GVlkYNz/y5xduf3797PetF+MdK xd9mss8KNehm6a/zl1nFVpXpW8Xwq8CuZ2PdrHle6HkOEwxfNoGtSOjc7nGZUTTZcE/5y8pf/ 62U3KPw9rnr6zCveJdMuH5q9cmF1YHRLuxJLcUaioRZzUXEiAN4BxYN0AgAA X-Env-Sender: andre.przywara@arm.com X-Msg-Ref: server-2.tower-31.messagelabs.com!1491434438!82757466!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 11492 invoked from network); 5 Apr 2017 23:20:39 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-2.tower-31.messagelabs.com with SMTP; 5 Apr 2017 23:20:39 -0000 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 94DF1344; Wed, 5 Apr 2017 16:20:38 -0700 (PDT) Received: from slackpad.lan (usa-sjc-mx-foss1.foss.arm.com [217.140.101.70]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 561F33F4FF; Wed, 5 Apr 2017 16:20:37 -0700 (PDT) From: Andre Przywara To: Stefano Stabellini , Julien Grall Date: Thu, 6 Apr 2017 00:18:54 +0100 Message-Id: <1491434362-30310-3-git-send-email-andre.przywara@arm.com> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1491434362-30310-1-git-send-email-andre.przywara@arm.com> References: <1491434362-30310-1-git-send-email-andre.przywara@arm.com> Cc: xen-devel@lists.xenproject.org, Shanker Donthineni , Vijay Kilari Subject: [Xen-devel] [PATCH v5 02/30] bitops: add BIT_ULL variant 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 To safely handle 64-bit registers even on 32-bit systems, introduce a BIT_ULL variant (lifted from Linux). Signed-off-by: Andre Przywara Reviewed-by: Stefano Stabellini --- xen/include/asm-arm/bitops.h | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/include/asm-arm/bitops.h b/xen/include/asm-arm/bitops.h index bda8898..1cbfb9e 100644 --- a/xen/include/asm-arm/bitops.h +++ b/xen/include/asm-arm/bitops.h @@ -24,6 +24,7 @@ #define BIT(nr) (1UL << (nr)) #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_WORD)) #define BIT_WORD(nr) ((nr) / BITS_PER_WORD) +#define BIT_ULL(nr) (1ULL << (nr)) #define BITS_PER_BYTE 8 #define ADDR (*(volatile int *) addr)