Skip to contentSkip to conversation

arm: change tbu/l type to unsigned int

PATCH Superseded Peng Fan 4 participants 8 messages Apr 20, 2017 – May 8, 2017

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Peng Fan

author
#0 lore raw

PATCH 1/2 arm: change tbu/l type to unsigned int

Change tbu/l type to unsigned int.

Cc Simon Glass <[email protected]>
Cc Tom Rini <[email protected]>
---
 arch/arm/include/asm/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/global_data.h +2 -2
index dfcbcce..92d9c97 100644
@@ -32,8 +32,8 @@ struct arch_global_data {
 #endif
 	/* "static data" needed by most of timer.c on ARM platforms */
 	unsigned long timer_rate_hz;
-	unsigned long tbu;
-	unsigned long tbl;
+	unsigned int tbu;
+	unsigned int tbl;
 	unsigned long lastinc;
 	unsigned long long timer_reset_value;
 #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
Signature · 1 line
2.6.6
author
#1 lore raw

PATCH 2/2 asm-generic: global_data: change timebase_l/h to unsigned int

Change type of timebase_l/h to unsigned int.

Cc Simon Glass <[email protected]>
Cc Eddie Cai <[email protected]>
Cc Jagan Teki <[email protected]>
Cc York Sun <[email protected]>
Cc "Robert P. J. Day" <[email protected]>
Cc Michal Simek <[email protected]>
Cc Tom Rini <[email protected]>

---

Buildman shows the following build failure, but not related this patch.
aarch64: + orangepi_pc2
x86: + qemu-x86_64 qemu-x86_efi_payload64 chromebook_link64

 include/asm-generic/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/asm-generic/global_data.h +2 -2
index 1a77c98..51838b5 100644
@@ -83,8 +83,8 @@ typedef struct global_data {
 #ifdef CONFIG_SYS_I2C_MXC
 	void *srdata[10];
 #endif
-	unsigned long timebase_h;
-	unsigned long timebase_l;
+	unsigned int timebase_h;
+	unsigned int timebase_l;
 #ifdef CONFIG_SYS_MALLOC_F_LEN
 	unsigned long malloc_base;	/* base address of early malloc() */
 	unsigned long malloc_limit;	/* limit address */
Signature · 1 line
2.6.6
#2 lore raw

PATCH 2/2 asm-generic: global_data: change timebase_l/h to unsigned int

Hi Peng,

Quoted 1 line · Peng Fan

Change type of timebase_l/h to unsigned int.

What is the motivation for this, please?

Quoted 9 lines
Cc Simon Glass <[email protected]>
Cc Eddie Cai <[email protected]>
Cc Jagan Teki <[email protected]>
Cc York Sun <[email protected]>
Cc "Robert P. J. Day" <[email protected]>
Cc Michal Simek <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 9 lines

---

Buildman shows the following build failure, but not related this patch.
aarch64: + orangepi_pc2
x86: + qemu-x86_64 qemu-x86_efi_payload64 chromebook_link64

 include/asm-generic/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Regards,
Simon

author
#3 lore raw

PATCH 2/2 asm-generic: global_data: change timebase_l/h to unsigned int

Hi Simon,

Quoted 11 lines

-----Original Message-----
From: sjg at google.com [mailto:sjg at google.com] On Behalf Of Simon Glass
Sent: Monday, April 24, 2017 11:38 AM
To: Peng Fan <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Tom Rini <[email protected]>; Eddie Cai <[email protected]>; Jagan Teki <[email protected]>; york sun <[email protected]>; Robert P. J. Day <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [PATCH 2/2] asm-generic: global_data: change timebase_l/h to unsigned int

Quoted 6 lines

Hi Peng,

Quoted 1 line · Peng Fan

Change type of timebase_l/h to unsigned int.

What is the motivation for this, please?

From lib/time.c: ((uint64_t)gd->timebase_h << 32) | gd->timebase_l;

This piece code is based on that timebase_h and timebase_l are 32bits width, I think. But unsigned long are 64bits width on ARM64. I am not sure, but I suppose same case on other archs.

Thanks,
Peng.

Quoted 22 lines
Quoted 10 lines
Cc Simon Glass <[email protected]>
Cc Eddie Cai <[email protected]>
Cc Jagan Teki <[email protected]>
Cc York Sun <[email protected]>
Cc "Robert P. J. Day" <[email protected]>
Cc Michal Simek <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 9 lines

---

Buildman shows the following build failure, but not related this patch.
aarch64: + orangepi_pc2
x86: + qemu-x86_64 qemu-x86_efi_payload64 chromebook_link64

 include/asm-generic/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Regards,
Simon

#4 lore raw

PATCH 2/2 asm-generic: global_data: change timebase_l/h to unsigned int

Hi Peng,

Quoted 18 lines · Peng Fan

Hi Simon,

Quoted 16 lines

-----Original Message-----
From: sjg at google.com [mailto:sjg at google.com] On Behalf Of Simon Glass
Sent: Monday, April 24, 2017 11:38 AM
To: Peng Fan <[email protected]>
Cc: U-Boot Mailing List <[email protected]>; Tom Rini <[email protected]>; Eddie Cai <[email protected]>; Jagan Teki <[email protected]>; york sun <[email protected]>; Robert P. J. Day <[email protected]>; Michal Simek <[email protected]>
Subject: Re: [PATCH 2/2] asm-generic: global_data: change timebase_l/h to unsigned int

Hi Peng,

Quoted 1 line · Peng Fan

Change type of timebase_l/h to unsigned int.

Quoted 7 lines
Quoted 1 line

What is the motivation for this, please?

From lib/time.c: ((uint64_t)gd->timebase_h << 32) | gd->timebase_l;

This piece code is based on that timebase_h and timebase_l are 32bits width, I think. But unsigned long are 64bits width on ARM64. I am not sure, but I suppose same case on other archs.

OK I see. I suspect it would make more sense to have a single 64-bit value on 64-bit machines, but perhaps that is a separate point.

Quoted 26 lines

Thanks,
Peng.

Quoted 22 lines
Quoted 10 lines
Cc Simon Glass <[email protected]>
Cc Eddie Cai <[email protected]>
Cc Jagan Teki <[email protected]>
Cc York Sun <[email protected]>
Cc "Robert P. J. Day" <[email protected]>
Cc Michal Simek <[email protected]>
Cc Tom Rini <[email protected]>
Quoted 9 lines

---

Buildman shows the following build failure, but not related this patch.
aarch64: + orangepi_pc2
x86: + qemu-x86_64 qemu-x86_efi_payload64 chromebook_link64

 include/asm-generic/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Regards,
Simon

#5 lore raw

PATCH 1/2 arm: change tbu/l type to unsigned int

In reply to Peng Fan

Hi Peng,

Quoted 1 line · Peng Fan

Change tbu/l type to unsigned int.

Why do this, please?

Quoted 24 lines
Cc Simon Glass <[email protected]>
Cc Tom Rini <[email protected]>
---
 arch/arm/include/asm/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/global_data.h +2 -3
index dfcbcce..92d9c97 100644
@@ -32,8 +32,8 @@ struct arch_global_data {
 #endif
        /* "static data" needed by most of timer.c on ARM platforms */
        unsigned long timer_rate_hz;
-       unsigned long tbu;
-       unsigned long tbl;
+       unsigned int tbu;
+       unsigned int tbl;
        unsigned long lastinc;
        unsigned long long timer_reset_value;
 #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
--
Quoted 2 lines

2.6.6

Regards,
Simon

#6 lore raw

PATCH 1/2 arm: change tbu/l type to unsigned int

In reply to Peng Fan

Hi Tom,

Will you pick up this patch set?

Thanks,
Peng.

Quoted 31 lines · Peng Fan

Change tbu/l type to unsigned int.

Cc Simon Glass <[email protected]>
Cc Tom Rini <[email protected]>

---
arch/arm/include/asm/global_data.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/global_data.h +2 -2
index dfcbcce..92d9c97 100644
@@ -32,8 +32,8 @@ struct arch_global_data {
 #endif
 	/* "static data" needed by most of timer.c on ARM platforms */
 	unsigned long timer_rate_hz;
-	unsigned long tbu;
-	unsigned long tbl;
+	unsigned int tbu;
+	unsigned int tbl;
 	unsigned long lastinc;
 	unsigned long long timer_reset_value;
 #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
Signature · 6 lines
2.6.6

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot
#7 lore raw

PATCH 1/2 arm: change tbu/l type to unsigned int

Quoted 3 lines · Peng Fan

Hi Tom,

Will you pick up this patch set?

Yes, but can you v2 it with details of why in the commit messages? Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170508/09b8cf81/attachment.sig>