Message ID | 1492650631-15510-2-git-send-email-peng.fan@nxp.com |
---|---|
State | Accepted |
Commit | 25112101d0af42cfc1ddf330d78757082965557a |
Delegated to: | Tom Rini |
Headers | show |
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
Hi Simon, > -----Original Message----- > From: sjg@google.com [mailto:sjg@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
Hi Peng, On 25 April 2017 at 14:51, Peng Fan <peng.fan@nxp.com> wrote: > Hi Simon, > >> -----Original Message----- >> From: sjg@google.com [mailto:sjg@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
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 */
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(-)