All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] arm: change tbu/l type to unsigned int
@ 2017-04-20  1:10 Peng Fan
  2017-04-20  1:10 ` [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h " Peng Fan
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Peng Fan @ 2017-04-20  1:10 UTC (permalink / raw)
  To: u-boot

Change tbu/l type to unsigned int.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
---
 arch/arm/include/asm/global_data.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index dfcbcce..92d9c97 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -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))
-- 
2.6.6

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

* [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h to unsigned int
  2017-04-20  1:10 [U-Boot] [PATCH 1/2] arm: change tbu/l type to unsigned int Peng Fan
@ 2017-04-20  1:10 ` Peng Fan
  2017-04-24  3:38   ` Simon Glass
  2017-04-24  3:38 ` [U-Boot] [PATCH 1/2] arm: change tbu/l type " Simon Glass
  2017-05-08  9:58 ` Peng Fan
  2 siblings, 1 reply; 8+ messages in thread
From: Peng Fan @ 2017-04-20  1:10 UTC (permalink / raw)
  To: u-boot

Change type of timebase_l/h to unsigned int.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Eddie Cai <eddie.cai.linux@gmail.com>
Cc: Jagan Teki <jteki@openedev.com>
Cc: York Sun <york.sun@nxp.com>
Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
---

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(-)

diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 1a77c98..51838b5 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -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 */
-- 
2.6.6

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

* [U-Boot] [PATCH 1/2] arm: change tbu/l type to unsigned int
  2017-04-20  1:10 [U-Boot] [PATCH 1/2] arm: change tbu/l type to unsigned int Peng Fan
  2017-04-20  1:10 ` [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h " Peng Fan
@ 2017-04-24  3:38 ` Simon Glass
  2017-05-08  9:58 ` Peng Fan
  2 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2017-04-24  3:38 UTC (permalink / raw)
  To: u-boot

Hi Peng,

On 19 April 2017 at 19:10, Peng Fan <peng.fan@nxp.com> wrote:
> Change tbu/l type to unsigned int.

Why do this, please?

>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  arch/arm/include/asm/global_data.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
> index dfcbcce..92d9c97 100644
> --- a/arch/arm/include/asm/global_data.h
> +++ b/arch/arm/include/asm/global_data.h
> @@ -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))
> --
> 2.6.6
>

Regards,
Simon

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

* [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h to unsigned int
  2017-04-20  1:10 ` [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h " Peng Fan
@ 2017-04-24  3:38   ` Simon Glass
  2017-04-25 20:51     ` Peng Fan
  0 siblings, 1 reply; 8+ messages in thread
From: Simon Glass @ 2017-04-24  3:38 UTC (permalink / raw)
  To: u-boot

Hi Peng,

On 19 April 2017 at 19:10, Peng Fan <peng.fan@nxp.com> wrote:
> Change type of timebase_l/h to unsigned int.

What is the motivation for this, please?

>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Eddie Cai <eddie.cai.linux@gmail.com>
> Cc: Jagan Teki <jteki@openedev.com>
> Cc: York Sun <york.sun@nxp.com>
> Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>
> 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

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

* [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h to unsigned int
  2017-04-24  3:38   ` Simon Glass
@ 2017-04-25 20:51     ` Peng Fan
  2017-05-02 11:27       ` Simon Glass
  0 siblings, 1 reply; 8+ messages in thread
From: Peng Fan @ 2017-04-25 20:51 UTC (permalink / raw)
  To: u-boot

Hi Simon,

> -----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 <peng.fan@nxp.com>
> Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Tom Rini
> <trini@konsulko.com>; Eddie Cai <eddie.cai.linux@gmail.com>; Jagan Teki
> <jteki@openedev.com>; york sun <york.sun@nxp.com>; Robert P. J. Day
> <rpjday@crashcourse.ca>; Michal Simek <michal.simek@xilinx.com>
> Subject: Re: [PATCH 2/2] asm-generic: global_data: change timebase_l/h to
> unsigned int
> 
> Hi Peng,
> 
> On 19 April 2017 at 19:10, Peng Fan <peng.fan@nxp.com> wrote:
> > 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.

> 
> >
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: Eddie Cai <eddie.cai.linux@gmail.com>
> > Cc: Jagan Teki <jteki@openedev.com>
> > Cc: York Sun <york.sun@nxp.com>
> > Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
> > Cc: Michal Simek <michal.simek@xilinx.com>
> > Cc: Tom Rini <trini@konsulko.com>
> > ---
> >
> > 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

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

* [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h to unsigned int
  2017-04-25 20:51     ` Peng Fan
@ 2017-05-02 11:27       ` Simon Glass
  0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2017-05-02 11:27 UTC (permalink / raw)
  To: u-boot

Hi Peng,

On 25 April 2017 at 14:51, Peng Fan <peng.fan@nxp.com> wrote:
> Hi Simon,
>
>> -----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 <peng.fan@nxp.com>
>> Cc: U-Boot Mailing List <u-boot@lists.denx.de>; Tom Rini
>> <trini@konsulko.com>; Eddie Cai <eddie.cai.linux@gmail.com>; Jagan Teki
>> <jteki@openedev.com>; york sun <york.sun@nxp.com>; Robert P. J. Day
>> <rpjday@crashcourse.ca>; Michal Simek <michal.simek@xilinx.com>
>> Subject: Re: [PATCH 2/2] asm-generic: global_data: change timebase_l/h to
>> unsigned int
>>
>> Hi Peng,
>>
>> On 19 April 2017 at 19:10, Peng Fan <peng.fan@nxp.com> wrote:
>> > 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.

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.

Reviewed-by: Simon Glass <sjg@chromium.org>

>
> Thanks,
> Peng.
>
>>
>> >
>> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> > Cc: Simon Glass <sjg@chromium.org>
>> > Cc: Eddie Cai <eddie.cai.linux@gmail.com>
>> > Cc: Jagan Teki <jteki@openedev.com>
>> > Cc: York Sun <york.sun@nxp.com>
>> > Cc: "Robert P. J. Day" <rpjday@crashcourse.ca>
>> > Cc: Michal Simek <michal.simek@xilinx.com>
>> > Cc: Tom Rini <trini@konsulko.com>
>> > ---
>> >
>> > 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

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

* [U-Boot] [PATCH 1/2] arm: change tbu/l type to unsigned int
  2017-04-20  1:10 [U-Boot] [PATCH 1/2] arm: change tbu/l type to unsigned int Peng Fan
  2017-04-20  1:10 ` [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h " Peng Fan
  2017-04-24  3:38 ` [U-Boot] [PATCH 1/2] arm: change tbu/l type " Simon Glass
@ 2017-05-08  9:58 ` Peng Fan
  2017-05-08 13:47   ` Tom Rini
  2 siblings, 1 reply; 8+ messages in thread
From: Peng Fan @ 2017-05-08  9:58 UTC (permalink / raw)
  To: u-boot

Hi Tom,

Will you pick up this patch set?

Thanks,
Peng.
On Thu, Apr 20, 2017 at 09:10:30AM +0800, Peng Fan wrote:
>Change tbu/l type to unsigned int.
>
>Signed-off-by: Peng Fan <peng.fan@nxp.com>
>Cc: Simon Glass <sjg@chromium.org>
>Cc: Tom Rini <trini@konsulko.com>
>---
> arch/arm/include/asm/global_data.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
>index dfcbcce..92d9c97 100644
>--- a/arch/arm/include/asm/global_data.h
>+++ b/arch/arm/include/asm/global_data.h
>@@ -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))
>-- 
>2.6.6
>
>_______________________________________________
>U-Boot mailing list
>U-Boot at lists.denx.de
>https://lists.denx.de/listinfo/u-boot

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

* [U-Boot] [PATCH 1/2] arm: change tbu/l type to unsigned int
  2017-05-08  9:58 ` Peng Fan
@ 2017-05-08 13:47   ` Tom Rini
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Rini @ 2017-05-08 13:47 UTC (permalink / raw)
  To: u-boot

On Mon, May 08, 2017 at 05:58:06PM +0800, Peng Fan wrote:
> Hi Tom,
> 
> Will you pick up this patch set?

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

-- 
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>

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

end of thread, other threads:[~2017-05-08 13:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-20  1:10 [U-Boot] [PATCH 1/2] arm: change tbu/l type to unsigned int Peng Fan
2017-04-20  1:10 ` [U-Boot] [PATCH 2/2] asm-generic: global_data: change timebase_l/h " Peng Fan
2017-04-24  3:38   ` Simon Glass
2017-04-25 20:51     ` Peng Fan
2017-05-02 11:27       ` Simon Glass
2017-04-24  3:38 ` [U-Boot] [PATCH 1/2] arm: change tbu/l type " Simon Glass
2017-05-08  9:58 ` Peng Fan
2017-05-08 13:47   ` Tom Rini

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.