From patchwork Wed Aug 9 08:20:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergej Proskurin X-Patchwork-Id: 9889823 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 AE18360384 for ; Wed, 9 Aug 2017 08:23:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D8F228A30 for ; Wed, 9 Aug 2017 08:23:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9277B28A37; Wed, 9 Aug 2017 08:23:35 +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 42F6F28A30 for ; Wed, 9 Aug 2017 08:23:35 +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 1dfMEz-0006MQ-6K; Wed, 09 Aug 2017 08:21: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 1dfMEy-0006LJ-2y for xen-devel@lists.xenproject.org; Wed, 09 Aug 2017 08:21:20 +0000 Received: from [85.158.137.68] by server-11.bemta-3.messagelabs.com id A2/33-01724-FF5CA895; Wed, 09 Aug 2017 08:21:19 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRWlGSWpSXmKPExsXSPJ+BQ/ff0a5 Ig8mLdCy+b5nM5MDocfjDFZYAxijWzLyk/IoE1oyVVz6zFizkrjj3KriBcRJnFyMXh5DARkaJ xfcuMEE4mxgl9kx/y9rFyMnBJmAgMeX1SjBbREBJ4t6qyWBFzAJNjBL3Gh+wgSSEBTwlWnd3M oLYLAKqEv17vgHFOTh4Bawl2mclgoQlBOQlJvZOAyvhFLCR2HEHwhYCKpl27BzzBEbuBYwMqx g1ilOLylKLdI1M9JKKMtMzSnITM3N0DQ2M9XJTi4sT01NzEpOK9ZLzczcxAv1bz8DAuIPx1XG /Q4ySHExKorybtDsjhfiS8lMqMxKLM+KLSnNSiw8xynBwKEnw/jjSFSkkWJSanlqRlpkDDDSY tAQHj5II722QNG9xQWJucWY6ROoUoy7Hqwn/vzEJseTl56VKifNuBikSACnKKM2DGwEL+kuMs lLCvIwMDAxCPAWpRbmZJajyrxjFORiVhHn3gUzhycwrgdv0CugIJqAjInw7QY4oSURISTUwRq jPuFnL+PYa52YTw3lx5zOiWHhOv5vKzmc9y+ljaJS536yq24rtX6ZwhqQdYyqZ07Fsf+2uI5f OPQi6I8d/Z/fHztqaF+X1Wno7DbUrbmyZPXlK/X7fjE8v+s1WNjT7KNyOnyAZ/DRA1zTN9ebb ppIDlbsYC0rqnsdXHLn8sfZnQ2VwtL+WEktxRqKhFnNRcSIAfiBUXnUCAAA= X-Env-Sender: proskurin@sec.in.tum.de X-Msg-Ref: server-15.tower-31.messagelabs.com!1502266878!105164075!1 X-Originating-IP: [131.159.0.8] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30506 invoked from network); 9 Aug 2017 08:21:18 -0000 Received: from mail-out1.informatik.tu-muenchen.de (HELO mail-out1.informatik.tu-muenchen.de) (131.159.0.8) by server-15.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 9 Aug 2017 08:21:18 -0000 Received: from files.sec.in.tum.de (files.sec.in.tum.de [131.159.50.1]) by services.sec.in.tum.de (Postfix) with ESMTP id EC69D10DD29F3; Wed, 9 Aug 2017 10:21:06 +0200 (CEST) Received: from thanatos.sec.in.tum.de (thanatos.sec.in.tum.de [131.159.50.57]) by files.sec.in.tum.de (Postfix) with ESMTP id E86DF1F048; Wed, 9 Aug 2017 10:21:06 +0200 (CEST) From: Sergej Proskurin To: xen-devel@lists.xenproject.org Date: Wed, 9 Aug 2017 10:20:31 +0200 Message-Id: <20170809082038.3236-7-proskurin@sec.in.tum.de> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170809082038.3236-1-proskurin@sec.in.tum.de> References: <20170809082038.3236-1-proskurin@sec.in.tum.de> Cc: Sergej Proskurin , Julien Grall , Stefano Stabellini Subject: [Xen-devel] [PATCH v8 06/13] arm/mem_access: Introduce BIT_ULL bit operation 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 We introduce the BIT_ULL macro to using values of unsigned long long as to enable setting bits of 64-bit registers on AArch32. In addition, this commit adds a define holding the register width of 64 bit double-word registers. This define simplifies using the associated constants in the following commits. Signed-off-by: Sergej Proskurin Reviewed-by: Julien Grall --- Cc: Stefano Stabellini Cc: Julien Grall --- v4: We reused the previous commit with the msg "arm/mem_access: Add defines holding the width of 32/64bit regs" from v3, as we can reuse the already existing define BITS_PER_WORD. v5: Introduce a new macro BIT_ULL instead of changing the type of the macro BIT. Remove the define BITS_PER_DOUBLE_WORD. v6: Add Julien Grall's Reviewed-by. --- 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 bda889841b..1cbfb9edb2 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)