Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-20 Thread Graeme Russ
On 20/09/11 21:28, Wolfgang Denk wrote: > Dear Graeme Russ, > > In message <4e786eba.5040...@gmail.com> you wrote: >> >> You'll laugh at this - the Intel High Performance Event Timers (HPET) are >> defined to a resolution of femto-seconds and you end up with code in >> get_timer() like: > > I hav

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-20 Thread Wolfgang Denk
Dear Graeme Russ, In message <4e786eba.5040...@gmail.com> you wrote: > > You'll laugh at this - the Intel High Performance Event Timers (HPET) are > defined to a resolution of femto-seconds and you end up with code in > get_timer() like: I have to admit that I have never been able to laugh about

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-20 Thread Graeme Russ
Hi Wolfgang, On 08/09/11 07:14, Wolfgang Denk wrote: > Dear Che-liang Chiou, > > In message > you > wrote: >> >> So I guess we can agree that a 64-bit divider is feature that is nice >> to have, and we should decide: >> * Do we need a 64-64 bit divider or a 64-32 bit one? >> * Do we write it i

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-07 Thread Wolfgang Denk
Dear Che-liang Chiou, In message you wrote: > > So I guess we can agree that a 64-bit divider is feature that is nice > to have, and we should decide: > * Do we need a 64-64 bit divider or a 64-32 bit one? > * Do we write it in C or assembly? The situation is simple: there is no code in U-Boo

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-01 Thread Che-liang Chiou
Dear Wolfgang, I am convinced that a 64-64 bit divider (this patch) is not needed. Is there any way that we could mark a patch "abandon"? Regards, Che-Liang On Thu, Sep 1, 2011 at 9:07 PM, Wolfgang Denk wrote: > Dear Che-liang Chiou, > > In message > you > wrote: >> >> do_div() and lib/div64

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-01 Thread Wolfgang Denk
Dear Che-liang Chiou, In message you wrote: > > do_div() and lib/div64.c of linux kernel has been ported to U-Boot > since Oct, 2006 (this date is the earliest record that I can find; see > commit 7b64fef3). Indeed, and so far nobody ever needed the patch you submitted, so please explain in de

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-01 Thread Che-liang Chiou
Hi Marek, do_div() and lib/div64.c of linux kernel has been ported to U-Boot since Oct, 2006 (this date is the earliest record that I can find; see commit 7b64fef3). Regards, Che-Liang On Thu, Sep 1, 2011 at 6:42 PM, Marek Vasut wrote: > On Thursday, September 01, 2011 12:30:47 PM Che-liang Chi

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-01 Thread Marek Vasut
On Thursday, September 01, 2011 12:30:47 PM Che-liang Chiou wrote: > Hi Marek, > > I will abandon this patch and submit a new patch that is adapted from > do_div() and lib64.c of the Linux kernel. Does this sound okay to you? I'm not against it, but is it worth the effort? Like ... why do we need

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-01 Thread Che-liang Chiou
Hi Marek, I will abandon this patch and submit a new patch that is adapted from do_div() and lib64.c of the Linux kernel. Does this sound okay to you? Regards, Che-Liang On Thu, Sep 1, 2011 at 6:16 PM, Marek Vasut wrote: > On Thursday, September 01, 2011 12:09:18 PM Che-liang Chiou wrote: >> Hi

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-01 Thread Che-liang Chiou
Hi, Thanks for the insightful comments. Here are my responses: * Why don't I implement the divider in C? It is not because I think it's performance critical (I haven't benchmarked it yet), but because I have a probably wrong impression that the divider has to be written in assembly --- all divide

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-09-01 Thread Marek Vasut
On Thursday, September 01, 2011 12:09:18 PM Che-liang Chiou wrote: > Hi, > > Thanks for the insightful comments. Here are my responses: > > * Why don't I implement the divider in C? > It is not because I think it's performance critical (I haven't > benchmarked it yet), but because I have a probab

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Wolfgang Denk
Dear Che-Liang Chiou, In message <1314787130-1043-1-git-send-email-clch...@chromium.org> you wrote: > This patch adds a 64-64 bit divider that supports ARMv4 and above. To summarize the misc feedback: Please explain in detail which problem you are trying to fix. We see no need for this patch so

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Mike Frysinger
On Wednesday, August 31, 2011 12:30:25 Marek Vasut wrote: > On Wednesday, August 31, 2011 06:05:29 PM Mike Frysinger wrote: > > On Wednesday, August 31, 2011 11:33:59 Marek Vasut wrote: > > > On Wednesday, August 31, 2011 05:27:46 PM Mike Frysinger wrote: > > > > On Wednesday, August 31, 2011 11:11

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Marek Vasut
On Wednesday, August 31, 2011 06:05:29 PM Mike Frysinger wrote: > On Wednesday, August 31, 2011 11:33:59 Marek Vasut wrote: > > On Wednesday, August 31, 2011 05:27:46 PM Mike Frysinger wrote: > > > On Wednesday, August 31, 2011 11:11:00 Marek Vasut wrote: > > > > On Wednesday, August 31, 2011 04:32

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Mike Frysinger
On Wednesday, August 31, 2011 11:33:59 Marek Vasut wrote: > On Wednesday, August 31, 2011 05:27:46 PM Mike Frysinger wrote: > > On Wednesday, August 31, 2011 11:11:00 Marek Vasut wrote: > > > On Wednesday, August 31, 2011 04:32:52 PM Mike Frysinger wrote: > > > > On Wednesday, August 31, 2011 06:38

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Marek Vasut
On Wednesday, August 31, 2011 05:27:46 PM Mike Frysinger wrote: > On Wednesday, August 31, 2011 11:11:00 Marek Vasut wrote: > > On Wednesday, August 31, 2011 04:32:52 PM Mike Frysinger wrote: > > > On Wednesday, August 31, 2011 06:38:50 Che-Liang Chiou wrote: > > > > This patch adds a 64-64 bit div

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Mike Frysinger
On Wednesday, August 31, 2011 11:11:00 Marek Vasut wrote: > On Wednesday, August 31, 2011 04:32:52 PM Mike Frysinger wrote: > > On Wednesday, August 31, 2011 06:38:50 Che-Liang Chiou wrote: > > > This patch adds a 64-64 bit divider that supports ARMv4 and above. > > > > why ? if you're doing 64 b

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Marek Vasut
On Wednesday, August 31, 2011 04:32:52 PM Mike Frysinger wrote: > On Wednesday, August 31, 2011 06:38:50 Che-Liang Chiou wrote: > > This patch adds a 64-64 bit divider that supports ARMv4 and above. > > why ? if you're doing 64 bit divides, chances are you're doing something > fundamentally wrong

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Mike Frysinger
On Wednesday, August 31, 2011 06:38:50 Che-Liang Chiou wrote: > This patch adds a 64-64 bit divider that supports ARMv4 and above. why ? if you're doing 64 bit divides, chances are you're doing something fundamentally wrong. perhaps you should fix that instead. this is also why we have the do_

Re: [U-Boot] [PATCH] arm: add 64-64 bit divider

2011-08-31 Thread Marek Vasut
On Wednesday, August 31, 2011 12:38:50 PM Che-Liang Chiou wrote: > This patch adds a 64-64 bit divider that supports ARMv4 and above. > > Because clz (count leading zero) instruction is added until ARMv5, the > divider implements a clz function for ARMv4 targets. > > The divider was tested with t