All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xenproject.org
Cc: sstabellini@kernel.org, Andrii_Anisov@epam.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Oleksandr_Tyshchenko@epam.com,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>, Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH 01/20] xen/const: Introduce _BITUL and _BITULL
Date: Mon, 22 Apr 2019 17:49:18 +0100	[thread overview]
Message-ID: <20190422164937.21350-2-julien.grall@arm.com> (raw)
In-Reply-To: <20190422164937.21350-1-julien.grall@arm.com>

The pattern _AC(1, UL{,L}) << X is commonly used in the headers to make
define usuable in both assembly and C.

So introduce _BITUL and _BITULL to make the code slightly more readable.

The idea has been taken from Linux (see include/uapi/linux.h).

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/include/xen/const.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/include/xen/const.h b/xen/include/xen/const.h
index 0d5b2c64f5..b4b067bffa 100644
--- a/xen/include/xen/const.h
+++ b/xen/include/xen/const.h
@@ -21,4 +21,7 @@
 #define _AT(T,X)	((T)(X))
 #endif
 
+#define _BITUL(x)	(_AC(1, UL) << (x))
+#define _BITULL(x)	(_AC(1, ULL) << (x))
+
 #endif /* __XEN_CONST_H__ */
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: Julien Grall <julien.grall@arm.com>
To: xen-devel@lists.xenproject.org
Cc: sstabellini@kernel.org, Andrii_Anisov@epam.com,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Oleksandr_Tyshchenko@epam.com,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <jbeulich@suse.com>, Wei Liu <wei.liu2@citrix.com>
Subject: [Xen-devel] [PATCH 01/20] xen/const: Introduce _BITUL and _BITULL
Date: Mon, 22 Apr 2019 17:49:18 +0100	[thread overview]
Message-ID: <20190422164937.21350-2-julien.grall@arm.com> (raw)
Message-ID: <20190422164918.R9MJCcU7r_K6wVujk9IBBl-qLQ9_AkhCKXHMg5O0sWg@z> (raw)
In-Reply-To: <20190422164937.21350-1-julien.grall@arm.com>

The pattern _AC(1, UL{,L}) << X is commonly used in the headers to make
define usuable in both assembly and C.

So introduce _BITUL and _BITULL to make the code slightly more readable.

The idea has been taken from Linux (see include/uapi/linux.h).

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/include/xen/const.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/xen/include/xen/const.h b/xen/include/xen/const.h
index 0d5b2c64f5..b4b067bffa 100644
--- a/xen/include/xen/const.h
+++ b/xen/include/xen/const.h
@@ -21,4 +21,7 @@
 #define _AT(T,X)	((T)(X))
 #endif
 
+#define _BITUL(x)	(_AC(1, UL) << (x))
+#define _BITULL(x)	(_AC(1, ULL) << (x))
+
 #endif /* __XEN_CONST_H__ */
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-04-22 16:49 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22 16:49 [PATCH 00/20] xen/arm: Clean-up & fixes in boot/mm code Julien Grall
2019-04-22 16:49 ` [Xen-devel] " Julien Grall
2019-04-22 16:49 ` Julien Grall [this message]
2019-04-22 16:49   ` [Xen-devel] [PATCH 01/20] xen/const: Introduce _BITUL and _BITULL Julien Grall
2019-04-25 12:15   ` Jan Beulich
2019-04-25 12:15     ` [Xen-devel] " Jan Beulich
2019-04-29 16:47     ` Julien Grall
2019-04-29 16:47       ` [Xen-devel] " Julien Grall
2019-04-30  6:57       ` Jan Beulich
2019-04-30  6:57         ` [Xen-devel] " Jan Beulich
2019-04-22 16:49 ` [PATCH 02/20] xen/arm: Rename SCTLR_* defines and remove unused one Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:56   ` Andrii Anisov
2019-05-03 15:56     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 03/20] xen/arm: processor: Use _BITUL instead of _AC(1, U) in SCTLR_ defines Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:56   ` Andrii Anisov
2019-05-03 15:56     ` [Xen-devel] " Andrii Anisov
2019-05-03 16:09     ` Julien Grall
2019-05-03 16:09       ` [Xen-devel] " Julien Grall
2019-05-03 16:12       ` Andrii Anisov
2019-05-03 16:12         ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 04/20] xen/arm: Rework HSCTLR_BASE Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:56   ` Andrii Anisov
2019-05-03 15:56     ` [Xen-devel] " Andrii Anisov
2019-05-03 16:10     ` Julien Grall
2019-05-03 16:10       ` [Xen-devel] " Julien Grall
2019-05-03 16:17       ` Andrii Anisov
2019-05-03 16:17         ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 05/20] xen/arm: Rework secondary_start prototype Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:56   ` Andrii Anisov
2019-05-03 15:56     ` [Xen-devel] " Andrii Anisov
2019-05-03 16:15     ` Julien Grall
2019-05-03 16:15       ` [Xen-devel] " Julien Grall
2019-04-22 16:49 ` [PATCH 06/20] xen/arm: Remove parameter cpuid from start_xen Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:56   ` Andrii Anisov
2019-05-03 15:56     ` [Xen-devel] " Andrii Anisov
2019-05-03 16:17     ` Julien Grall
2019-05-03 16:17       ` [Xen-devel] " Julien Grall
2019-05-03 16:19       ` Andrii Anisov
2019-05-03 16:19         ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 07/20] xen/arm64: head: Remove unnecessary comment Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:57   ` Andrii Anisov
2019-05-03 15:57     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 08/20] xen/arm64: head: Move earlyprintk messages in .rodata.str Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:57   ` Andrii Anisov
2019-05-03 15:57     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 09/20] xen/arm64: head: Correctly report the HW CPU ID Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:57   ` Andrii Anisov
2019-05-03 15:57     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 10/20] xen/arm32: " Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:57   ` Andrii Anisov
2019-05-03 15:57     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 11/20] xen/arm32: head: Don't set MAIR0 and MAIR1 Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:57   ` Andrii Anisov
2019-05-03 15:57     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 12/20] xen/arm32: head: Always zero r3 before update a page-table entry Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:57   ` Andrii Anisov
2019-05-03 15:57     ` [Xen-devel] " Andrii Anisov
2019-05-03 16:21     ` Julien Grall
2019-05-03 16:21       ` [Xen-devel] " Julien Grall
2019-04-22 16:49 ` [PATCH 13/20] xen/arm32: mm: Avoid to zero and clean cache for CPU0 domheap Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:57   ` Andrii Anisov
2019-05-03 15:57     ` [Xen-devel] " Andrii Anisov
2019-05-03 17:06     ` Julien Grall
2019-05-03 17:06       ` [Xen-devel] " Julien Grall
2019-05-06  8:28       ` Andrii Anisov
2019-05-06  8:28         ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 14/20] xen/arm32: mm: Avoid cleaning the cache for secondary CPUs page-tables Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:57   ` Andrii Anisov
2019-05-03 15:57     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 15/20] xen/arm: mm: Use the shorter version __aligned(PAGE_SIZE) to align page-tables Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:58   ` Andrii Anisov
2019-05-03 15:58     ` [Xen-devel] " Andrii Anisov
2019-05-03 17:09     ` Julien Grall
2019-05-03 17:09       ` [Xen-devel] " Julien Grall
2019-05-06  7:19       ` Andrii Anisov
2019-05-06  7:19         ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 16/20] xen/arm: mm: Protect Xen page-table update with a spinlock Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:59   ` Andrii Anisov
2019-05-03 15:59     ` [Xen-devel] " Andrii Anisov
2019-05-03 17:19     ` Julien Grall
2019-05-03 17:19       ` [Xen-devel] " Julien Grall
2019-05-06  8:20       ` Andrii Anisov
2019-05-06  8:20         ` [Xen-devel] " Andrii Anisov
2019-05-06 16:54         ` Julien Grall
2019-05-06 16:54           ` [Xen-devel] " Julien Grall
2019-05-06  8:20   ` Andrii Anisov
2019-05-06  8:20     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 17/20] xen/arm: mm: Initialize page-tables earlier Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:59   ` Andrii Anisov
2019-05-03 15:59     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 18/20] xen/arm: mm: Check start is always before end in {destroy, modify}_xen_mappings Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:59   ` Andrii Anisov
2019-05-03 15:59     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 19/20] xen/arm: Pair call to set_fixmap with call to clear_fixmap in copy_from_paddr Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-05-03 15:59   ` Andrii Anisov
2019-05-03 15:59     ` [Xen-devel] " Andrii Anisov
2019-04-22 16:49 ` [PATCH 20/20] xen/arm: Allow cleaning the directory even when CONFIG_EARLY_PRINTK is set Julien Grall
2019-04-22 16:49   ` [Xen-devel] " Julien Grall
2019-04-24 15:14   ` Julien Grall
2019-04-24 15:14     ` [Xen-devel] " Julien Grall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190422164937.21350-2-julien.grall@arm.com \
    --to=julien.grall@arm.com \
    --cc=Andrii_Anisov@epam.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Oleksandr_Tyshchenko@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.