All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h
@ 2018-11-08 12:24 Baruch Siach
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 2/5] linux/const.h: import from kernel Baruch Siach
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Baruch Siach @ 2018-11-08 12:24 UTC (permalink / raw)
  To: u-boot

Commit 86f21c96f467368 (mips: Use common _AC macro now.) removed the _AC
definition from const.h. All other macros defined in const.h are not
used anywhere. Remove this header.

Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v3: New patch in this series
---
 arch/mips/include/asm/const.h               | 27 ---------------------
 arch/mips/include/asm/mach-generic/spaces.h |  2 --
 2 files changed, 29 deletions(-)
 delete mode 100644 arch/mips/include/asm/const.h

diff --git a/arch/mips/include/asm/const.h b/arch/mips/include/asm/const.h
deleted file mode 100644
index ed43b5d534ac..000000000000
--- a/arch/mips/include/asm/const.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * const.h: Macros for dealing with constants.
- */
-
-#ifndef _LINUX_CONST_H
-#define _LINUX_CONST_H
-
-/* Some constant macros are used in both assembler and
- * C code.  Therefore we cannot annotate them always with
- * 'UL' and other type specifiers unilaterally.  We
- * use the following macros to deal with this.
- *
- * Similarly, _AT() will cast an expression with a type in C, but
- * leave it unchanged in asm.
- */
-
-#ifdef __ASSEMBLY__
-#define _AT(T,X)	X
-#else
-#define _AT(T,X)	((T)(X))
-#endif
-
-#define _BITUL(x)	(_AC(1,UL) << (x))
-#define _BITULL(x)	(_AC(1,ULL) << (x))
-
-#endif /* !(_LINUX_CONST_H) */
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
index b7eac323cd67..85f5849abfbe 100644
--- a/arch/mips/include/asm/mach-generic/spaces.h
+++ b/arch/mips/include/asm/mach-generic/spaces.h
@@ -7,8 +7,6 @@
 #ifndef _ASM_MACH_GENERIC_SPACES_H
 #define _ASM_MACH_GENERIC_SPACES_H
 
-#include <asm/const.h>
-
 /*
  * This gives the physical RAM offset.
  */
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 2/5] linux/const.h: import from kernel
  2018-11-08 12:24 [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Baruch Siach
@ 2018-11-08 12:24 ` Baruch Siach
  2018-11-08 12:55   ` Tom Rini
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 3/5] Use _AC and UL macros from linux/const.h Baruch Siach
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2018-11-08 12:24 UTC (permalink / raw)
  To: u-boot

Combine the uapi/linux/const.h header into the kernel linux/const.h. The
next commit will use the _AC macro this header instead of the common.h
definition.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v3: New patch in this series
---
 include/linux/const.h | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 include/linux/const.h

diff --git a/include/linux/const.h b/include/linux/const.h
new file mode 100644
index 000000000000..379c88923269
--- /dev/null
+++ b/include/linux/const.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _LINUX_CONST_H
+#define _LINUX_CONST_H
+
+/* const.h: Macros for dealing with constants.  */
+
+/* Some constant macros are used in both assembler and
+ * C code.  Therefore we cannot annotate them always with
+ * 'UL' and other type specifiers unilaterally.  We
+ * use the following macros to deal with this.
+ *
+ * Similarly, _AT() will cast an expression with a type in C, but
+ * leave it unchanged in asm.
+ */
+
+#ifdef __ASSEMBLY__
+#define _AC(X,Y)	X
+#define _AT(T,X)	X
+#else
+#define __AC(X,Y)	(X##Y)
+#define _AC(X,Y)	__AC(X,Y)
+#define _AT(T,X)	((T)(X))
+#endif
+
+#define _UL(x)		(_AC(x, UL))
+#define _ULL(x)		(_AC(x, ULL))
+
+#define _BITUL(x)	(_UL(1) << (x))
+#define _BITULL(x)	(_ULL(1) << (x))
+
+#define UL(x)		(_UL(x))
+#define ULL(x)		(_ULL(x))
+
+#endif /* _LINUX_CONST_H */
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 3/5] Use _AC and UL macros from linux/const.h
  2018-11-08 12:24 [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Baruch Siach
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 2/5] linux/const.h: import from kernel Baruch Siach
@ 2018-11-08 12:24 ` Baruch Siach
  2018-11-08 12:55   ` Tom Rini
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 4/5] linux/sizes.h: sync from kernel Baruch Siach
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2018-11-08 12:24 UTC (permalink / raw)
  To: u-boot

Drop the _AC and UL macros from common.h. Linux headers is the original
source of this macro, so keep its definition in the same header.

Update existing users of these macros to include const.h directly.

Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Cc: Rick Chen <rick@andestech.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v3: New patch in this series
---
 arch/arm/include/asm/armv8/mmu.h            | 2 ++
 arch/mips/include/asm/mach-generic/spaces.h | 2 ++
 arch/riscv/include/asm/csr.h                | 2 ++
 include/common.h                            | 9 ---------
 4 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/arch/arm/include/asm/armv8/mmu.h b/arch/arm/include/asm/armv8/mmu.h
index 62d00d15c26d..4a573208dfd0 100644
--- a/arch/arm/include/asm/armv8/mmu.h
+++ b/arch/arm/include/asm/armv8/mmu.h
@@ -7,6 +7,8 @@
 #ifndef _ASM_ARMV8_MMU_H_
 #define _ASM_ARMV8_MMU_H_
 
+#include <linux/const.h>
+
 /*
  * block/section address mask and size definitions.
  */
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
index 85f5849abfbe..539d0a566d52 100644
--- a/arch/mips/include/asm/mach-generic/spaces.h
+++ b/arch/mips/include/asm/mach-generic/spaces.h
@@ -7,6 +7,8 @@
 #ifndef _ASM_MACH_GENERIC_SPACES_H
 #define _ASM_MACH_GENERIC_SPACES_H
 
+#include <linux/const.h>
+
 /*
  * This gives the physical RAM offset.
  */
diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h
index 50fccea5c8f9..29624fdbb555 100644
--- a/arch/riscv/include/asm/csr.h
+++ b/arch/riscv/include/asm/csr.h
@@ -8,6 +8,8 @@
 #ifndef _ASM_RISCV_CSR_H
 #define _ASM_RISCV_CSR_H
 
+#include <linux/const.h>
+
 /* Status register flags */
 #define SR_SIE		_AC(0x00000002, UL) /* Supervisor Interrupt Enable */
 #define SR_SPIE		_AC(0x00000020, UL) /* Previous Supervisor IE */
diff --git a/include/common.h b/include/common.h
index 83b3bdc58dfa..f3c1de9f1fa2 100644
--- a/include/common.h
+++ b/include/common.h
@@ -14,9 +14,6 @@ typedef volatile unsigned long	vu_long;
 typedef volatile unsigned short vu_short;
 typedef volatile unsigned char	vu_char;
 
-/* Allow sharing constants with type modifiers between C and assembly. */
-#define _AC(X, Y)       (X##Y)
-
 #include <config.h>
 #include <errno.h>
 #include <time.h>
@@ -542,16 +539,10 @@ int cpu_release(u32 nr, int argc, char * const argv[]);
 
 #else	/* __ASSEMBLY__ */
 
-/* Drop a C type modifier (like in 3UL) for constants used in assembly. */
-#define _AC(X, Y)       X
-
 #endif	/* __ASSEMBLY__ */
 
 /* Put only stuff here that the assembler can digest */
 
-/* Declare an unsigned long constant digestable both by C and an assembler. */
-#define UL(x)           _AC(x, UL)
-
 #ifdef CONFIG_POST
 #define CONFIG_HAS_POST
 #ifndef CONFIG_POST_ALT_LIST
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 4/5] linux/sizes.h: sync from kernel
  2018-11-08 12:24 [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Baruch Siach
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 2/5] linux/const.h: import from kernel Baruch Siach
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 3/5] Use _AC and UL macros from linux/const.h Baruch Siach
@ 2018-11-08 12:24 ` Baruch Siach
  2018-11-08 12:56   ` Tom Rini
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 5/5] arm64: mvebu: a8k: autodetect RAM size Baruch Siach
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 11+ messages in thread
From: Baruch Siach @ 2018-11-08 12:24 UTC (permalink / raw)
  To: u-boot

The kernel added SZ_4G macro in commit f2b9ba871b (arm64/kernel: kaslr:
reduce module randomization range to 4 GB).

Include linux/const.h for the _AC macro.

Drop a local SZ_4G definition in tegra code.

Cc: Tom Warren <twarren@nvidia.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v3: Use linux/const.h

v2: No change
---
 arch/arm/mach-tegra/tegra186/nvtboot_mem.c | 3 +--
 include/linux/sizes.h                      | 4 ++++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-tegra/tegra186/nvtboot_mem.c b/arch/arm/mach-tegra/tegra186/nvtboot_mem.c
index 5c9467bfe8be..62142821a595 100644
--- a/arch/arm/mach-tegra/tegra186/nvtboot_mem.c
+++ b/arch/arm/mach-tegra/tegra186/nvtboot_mem.c
@@ -6,11 +6,10 @@
 #include <common.h>
 #include <fdt_support.h>
 #include <fdtdec.h>
+#include <linux/sizes.h>
 #include <asm/arch/tegra.h>
 #include <asm/armv8/mmu.h>
 
-#define SZ_4G 0x100000000ULL
-
 /*
  * Size of a region that's large enough to hold the relocated U-Boot and all
  * other allocations made around it (stack, heap, page tables, etc.)
diff --git a/include/linux/sizes.h b/include/linux/sizes.h
index ce3e8150c174..fbde0bc7e882 100644
--- a/include/linux/sizes.h
+++ b/include/linux/sizes.h
@@ -8,6 +8,8 @@
 #ifndef __LINUX_SIZES_H__
 #define __LINUX_SIZES_H__
 
+#include <linux/const.h>
+
 #define SZ_1				0x00000001
 #define SZ_2				0x00000002
 #define SZ_4				0x00000004
@@ -44,4 +46,6 @@
 #define SZ_1G				0x40000000
 #define SZ_2G				0x80000000
 
+#define SZ_4G				_AC(0x100000000, ULL)
+
 #endif /* __LINUX_SIZES_H__ */
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 5/5] arm64: mvebu: a8k: autodetect RAM size
  2018-11-08 12:24 [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Baruch Siach
                   ` (2 preceding siblings ...)
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 4/5] linux/sizes.h: sync from kernel Baruch Siach
@ 2018-11-08 12:24 ` Baruch Siach
  2018-11-08 12:55 ` [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Tom Rini
  2018-11-08 14:29 ` Daniel Schwierzeck
  5 siblings, 0 replies; 11+ messages in thread
From: Baruch Siach @ 2018-11-08 12:24 UTC (permalink / raw)
  To: u-boot

Some Armada 8K boards like Macchiatobin and Clearfog GT-8K use RAM from
external DIMM. Hard coding the RAM size in the device-tree is not
convenient. Fortunately, the ATF that initializes the RAM knows the size
of RAM, and U-Boot can query the ATF using a SMC call.

The ATF maps the lower 3G of RAM starting at address 0. Higher RAM is
mapped at 4G. This leaves a 1G hole between 3G and 4G for IO
peripherals. Use a second bi_dram[] entry to describe the higher RAM
area. As a result, CONFIG_NR_DRAM_BANKS must be set to 2 to use more
than 3GB RAM.

This code in this commit is mostly taken from downstream Marvell U-Boot
code by Grzegorz Jaszczyk.

Cc: Grzegorz Jaszczyk <jaz@semihalf.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
v3:
  No change

v2:
  Expand memory layout description in code comment and the commit log
  (Stefan)
---
 arch/arm/mach-mvebu/arm64-common.c | 50 +++++++++++++++++++++++++++++-
 1 file changed, 49 insertions(+), 1 deletion(-)

diff --git a/arch/arm/mach-mvebu/arm64-common.c b/arch/arm/mach-mvebu/arm64-common.c
index f47273fde9c6..47bbf69944ec 100644
--- a/arch/arm/mach-mvebu/arm64-common.c
+++ b/arch/arm/mach-mvebu/arm64-common.c
@@ -7,6 +7,7 @@
 #include <dm.h>
 #include <fdtdec.h>
 #include <linux/libfdt.h>
+#include <linux/sizes.h>
 #include <pci.h>
 #include <asm/io.h>
 #include <asm/system.h>
@@ -45,15 +46,62 @@ const struct mbus_dram_target_info *mvebu_mbus_dram_info(void)
 
 /* DRAM init code ... */
 
+#define MV_SIP_DRAM_SIZE	0x82000010
+
+static u64 a8k_dram_scan_ap_sz(void)
+{
+	struct pt_regs pregs;
+
+	pregs.regs[0] = MV_SIP_DRAM_SIZE;
+	pregs.regs[1] = SOC_REGS_PHY_BASE;
+	smc_call(&pregs);
+
+	return pregs.regs[0];
+}
+
+static void a8k_dram_init_banksize(void)
+{
+	/*
+	 * The firmware (ATF) leaves a 1G whole above the 3G mark for IO
+	 * devices. Higher RAM is mapped at 4G.
+	 *
+	 * Config 2 DRAM banks:
+	 * Bank 0 - max size 4G - 1G
+	 * Bank 1 - ram size - 4G + 1G
+	 */
+	phys_size_t max_bank0_size = SZ_4G - SZ_1G;
+
+	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+	if (gd->ram_size <= max_bank0_size) {
+		gd->bd->bi_dram[0].size = gd->ram_size;
+		return;
+	}
+
+	gd->bd->bi_dram[0].size = max_bank0_size;
+	if (CONFIG_NR_DRAM_BANKS > 1) {
+		gd->bd->bi_dram[1].start = SZ_4G;
+		gd->bd->bi_dram[1].size = gd->ram_size - max_bank0_size;
+	}
+}
+
 int dram_init_banksize(void)
 {
-	fdtdec_setup_memory_banksize();
+	if (CONFIG_IS_ENABLED(ARMADA_8K))
+		a8k_dram_init_banksize();
+	else
+		fdtdec_setup_memory_banksize();
 
 	return 0;
 }
 
 int dram_init(void)
 {
+	if (CONFIG_IS_ENABLED(ARMADA_8K)) {
+		gd->ram_size = a8k_dram_scan_ap_sz();
+		if (gd->ram_size != 0)
+			return 0;
+	}
+
 	if (fdtdec_setup_mem_size_base() != 0)
 		return -EINVAL;
 
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 2/5] linux/const.h: import from kernel
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 2/5] linux/const.h: import from kernel Baruch Siach
@ 2018-11-08 12:55   ` Tom Rini
  0 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2018-11-08 12:55 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 08, 2018 at 02:24:11PM +0200, Baruch Siach wrote:

> Combine the uapi/linux/const.h header into the kernel linux/const.h. The
> next commit will use the _AC macro this header instead of the common.h
> definition.
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v3: New patch in this series
> ---

This should be patch #1 and mention what kernel release it's from
please, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181108/f97d1506/attachment.sig>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h
  2018-11-08 12:24 [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Baruch Siach
                   ` (3 preceding siblings ...)
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 5/5] arm64: mvebu: a8k: autodetect RAM size Baruch Siach
@ 2018-11-08 12:55 ` Tom Rini
  2018-11-08 14:29 ` Daniel Schwierzeck
  5 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2018-11-08 12:55 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 08, 2018 at 02:24:10PM +0200, Baruch Siach wrote:

> Commit 86f21c96f467368 (mips: Use common _AC macro now.) removed the _AC
> definition from const.h. All other macros defined in const.h are not
> used anywhere. Remove this header.
> 
> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v3: New patch in this series
> ---

This should be patch #2 and switch asm/mach/spaces.h to using
<linux/const.h> I think.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181108/299cfa9c/attachment.sig>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 3/5] Use _AC and UL macros from linux/const.h
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 3/5] Use _AC and UL macros from linux/const.h Baruch Siach
@ 2018-11-08 12:55   ` Tom Rini
       [not found]     ` <752D002CFF5D0F4FA35C0100F1D73F3FA3A45FBA@ATCPCS16.andestech.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Tom Rini @ 2018-11-08 12:55 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 08, 2018 at 02:24:12PM +0200, Baruch Siach wrote:


> Drop the _AC and UL macros from common.h. Linux headers is the original
> source of this macro, so keep its definition in the same header.
> 
> Update existing users of these macros to include const.h directly.
> 
> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> Cc: Rick Chen <rick@andestech.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

I know you'll need to now drop the MIPS part but otherwise:

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181108/fff409f9/attachment.sig>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 4/5] linux/sizes.h: sync from kernel
  2018-11-08 12:24 ` [U-Boot] [PATCH v3 4/5] linux/sizes.h: sync from kernel Baruch Siach
@ 2018-11-08 12:56   ` Tom Rini
  0 siblings, 0 replies; 11+ messages in thread
From: Tom Rini @ 2018-11-08 12:56 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 08, 2018 at 02:24:13PM +0200, Baruch Siach wrote:

> The kernel added SZ_4G macro in commit f2b9ba871b (arm64/kernel: kaslr:
> reduce module randomization range to 4 GB).
> 
> Include linux/const.h for the _AC macro.
> 
> Drop a local SZ_4G definition in tegra code.
> 
> Cc: Tom Warren <twarren@nvidia.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181108/fd9d8405/attachment.sig>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h
  2018-11-08 12:24 [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Baruch Siach
                   ` (4 preceding siblings ...)
  2018-11-08 12:55 ` [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Tom Rini
@ 2018-11-08 14:29 ` Daniel Schwierzeck
  5 siblings, 0 replies; 11+ messages in thread
From: Daniel Schwierzeck @ 2018-11-08 14:29 UTC (permalink / raw)
  To: u-boot

Am Do., 8. Nov. 2018 um 13:29 Uhr schrieb Baruch Siach <baruch@tkos.co.il>:
>
> Commit 86f21c96f467368 (mips: Use common _AC macro now.) removed the _AC
> definition from const.h. All other macros defined in const.h are not
> used anywhere. Remove this header.
>
> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> v3: New patch in this series
> ---
>  arch/mips/include/asm/const.h               | 27 ---------------------
>  arch/mips/include/asm/mach-generic/spaces.h |  2 --
>  2 files changed, 29 deletions(-)
>  delete mode 100644 arch/mips/include/asm/const.h
>
> diff --git a/arch/mips/include/asm/const.h b/arch/mips/include/asm/const.h
> deleted file mode 100644
> index ed43b5d534ac..000000000000
> --- a/arch/mips/include/asm/const.h
> +++ /dev/null
> @@ -1,27 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> -/*
> - * const.h: Macros for dealing with constants.
> - */
> -
> -#ifndef _LINUX_CONST_H
> -#define _LINUX_CONST_H
> -
> -/* Some constant macros are used in both assembler and
> - * C code.  Therefore we cannot annotate them always with
> - * 'UL' and other type specifiers unilaterally.  We
> - * use the following macros to deal with this.
> - *
> - * Similarly, _AT() will cast an expression with a type in C, but
> - * leave it unchanged in asm.
> - */
> -
> -#ifdef __ASSEMBLY__
> -#define _AT(T,X)       X
> -#else
> -#define _AT(T,X)       ((T)(X))
> -#endif
> -
> -#define _BITUL(x)      (_AC(1,UL) << (x))
> -#define _BITULL(x)     (_AC(1,ULL) << (x))
> -
> -#endif /* !(_LINUX_CONST_H) */

The removal of arch/mips/include/asm/const.h should be a standalone
patch after patch 3/5 (after switching MIPS to generic linux/const.h,
see comment below).

> diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h
> index b7eac323cd67..85f5849abfbe 100644
> --- a/arch/mips/include/asm/mach-generic/spaces.h
> +++ b/arch/mips/include/asm/mach-generic/spaces.h
> @@ -7,8 +7,6 @@
>  #ifndef _ASM_MACH_GENERIC_SPACES_H
>  #define _ASM_MACH_GENERIC_SPACES_H
>
> -#include <asm/const.h>
> -
>  /*
>   * This gives the physical RAM offset.
>   */

This hunk should be squashed into patch 3/5.

> --
> 2.19.1
>


-- 
- Daniel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [U-Boot] [PATCH v3 3/5] Use _AC and UL macros from linux/const.h
       [not found]     ` <752D002CFF5D0F4FA35C0100F1D73F3FA3A45FBA@ATCPCS16.andestech.com>
@ 2018-11-09  6:18       ` Rick Chen
  0 siblings, 0 replies; 11+ messages in thread
From: Rick Chen @ 2018-11-09  6:18 UTC (permalink / raw)
  To: u-boot

> > > Drop the _AC and UL macros from common.h. Linux headers is the
> > > original source of this macro, so keep its definition in the same header.
> > >
> > > Update existing users of these macros to include const.h directly.
> > >
> > > Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
> > > Cc: Rick Chen <rick@andestech.com>
> > > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> >
> > I know you'll need to now drop the MIPS part but otherwise:
> >
> > Reviewed-by: Tom Rini <trini@konsulko.com>
> >

Reviewed-by: Rick Chen <rick@andestech.com>

> > --
> > Tom

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-11-09  6:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08 12:24 [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Baruch Siach
2018-11-08 12:24 ` [U-Boot] [PATCH v3 2/5] linux/const.h: import from kernel Baruch Siach
2018-11-08 12:55   ` Tom Rini
2018-11-08 12:24 ` [U-Boot] [PATCH v3 3/5] Use _AC and UL macros from linux/const.h Baruch Siach
2018-11-08 12:55   ` Tom Rini
     [not found]     ` <752D002CFF5D0F4FA35C0100F1D73F3FA3A45FBA@ATCPCS16.andestech.com>
2018-11-09  6:18       ` Rick Chen
2018-11-08 12:24 ` [U-Boot] [PATCH v3 4/5] linux/sizes.h: sync from kernel Baruch Siach
2018-11-08 12:56   ` Tom Rini
2018-11-08 12:24 ` [U-Boot] [PATCH v3 5/5] arm64: mvebu: a8k: autodetect RAM size Baruch Siach
2018-11-08 12:55 ` [U-Boot] [PATCH v3 1/5] MIPS: drop asm/const.h Tom Rini
2018-11-08 14:29 ` Daniel Schwierzeck

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.