Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2016-01-04 Thread Stephen Boyd
On 12/11, Nicolas Pitre wrote: > On Fri, 11 Dec 2015, Arnd Bergmann wrote: > > > On Friday 11 December 2015 12:22:20 Nicolas Pitre wrote: > > > Subject: [PATCH] ARM: Runtime patch udiv/sdiv instructions into > > > __aeabi_{u}idiv() > > > > > Thanks. > > > Before you put it in the patch

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Arnd Bergmann
On Friday 11 December 2015 01:26:25 Nicolas Pitre wrote: > This is my counter proposal to Stephen's version. Those patches and the > discussion that followed are available here: > > http://news.gmane.org/group/gmane.linux.kbuild.devel/thread=14007 > > I think what I propose here is much

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Nicolas Pitre
On Fri, 11 Dec 2015, Arnd Bergmann wrote: > On Friday 11 December 2015 01:26:25 Nicolas Pitre wrote: > > > This is my counter proposal to Stephen's version. Those patches and the > > discussion that followed are available here: > > > >

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Arnd Bergmann
On Friday 11 December 2015 12:10:29 Nicolas Pitre wrote: > On Fri, 11 Dec 2015, Arnd Bergmann wrote: > > On Friday 11 December 2015 01:26:25 Nicolas Pitre wrote: > > > Of course the ultimate performance will come from having gcc emit those > > > div instructions directly, but that would make the

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Russell King - ARM Linux
On Fri, Dec 11, 2015 at 10:50:02PM +0100, Arnd Bergmann wrote: > On Friday 11 December 2015 12:10:29 Nicolas Pitre wrote: > > On Fri, 11 Dec 2015, Arnd Bergmann wrote: > > > #ifdef CONFIG_CPU_PJ4B > > > .type __v7_pj4b_proc_info, #object > > > __v7_pj4b_proc_info: > > > .long

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Arnd Bergmann
On Friday 11 December 2015 22:34:16 Russell King - ARM Linux wrote: > > __v7_pj4b_proc_info: > - .long 0x562f5840 > - .long 0xfff0 > + .long 0x560f5800 > + .long 0xff0fff00 > > So it was to include Armada 370. So this now brings up the question... > what is

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Nicolas Pitre
On Fri, 11 Dec 2015, Arnd Bergmann wrote: > On Friday 11 December 2015 22:34:16 Russell King - ARM Linux wrote: > > > > __v7_pj4b_proc_info: > > - .long 0x562f5840 > > - .long 0xfff0 > > + .long 0x560f5800 > > + .long 0xff0fff00 > > > > So it was to include

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Nicolas Pitre
On Fri, 11 Dec 2015, Arnd Bergmann wrote: > On Friday 11 December 2015 12:10:29 Nicolas Pitre wrote: > > On Fri, 11 Dec 2015, Arnd Bergmann wrote: > > > On Friday 11 December 2015 01:26:25 Nicolas Pitre wrote: > > > > Of course the ultimate performance will come from having gcc emit those > > >

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Arnd Bergmann
On Friday 11 December 2015 17:00:50 Nicolas Pitre wrote: > You seem to have a good grasp of the problem space. I'd suggest you make > a patch! ;-) Yes, I can do that once all the ARMv6/v7 multiplatform work is done, that should at least reduce the number of special cases. > > > > #ifdef

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Arnd Bergmann
On Friday 11 December 2015 12:22:20 Nicolas Pitre wrote: > Subject: [PATCH] ARM: Runtime patch udiv/sdiv instructions into > __aeabi_{u}idiv() > > The ARM compiler inserts calls to __aeabi_uidiv() and > __aeabi_idiv() when it needs to perform division on signed and > unsigned integers. If a

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Nicolas Pitre
On Fri, 11 Dec 2015, Arnd Bergmann wrote: > On Friday 11 December 2015 12:22:20 Nicolas Pitre wrote: > > Subject: [PATCH] ARM: Runtime patch udiv/sdiv instructions into > > __aeabi_{u}idiv() > > > > The ARM compiler inserts calls to __aeabi_uidiv() and > > __aeabi_idiv() when it needs to

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Arnd Bergmann
On Friday 11 December 2015 19:01:00 Nicolas Pitre wrote: > On Fri, 11 Dec 2015, Arnd Bergmann wrote: > > > On Friday 11 December 2015 22:34:16 Russell King - ARM Linux wrote: > > > > > > __v7_pj4b_proc_info: > > > - .long 0x562f5840 > > > - .long 0xfff0 > > > + .long

Re: [PATCH] ARM: Runtime patch udiv/sdiv instructions into __aeabi_{u}idiv()

2015-12-11 Thread Nicolas Pitre
On Fri, 11 Dec 2015, Nicolas Pitre wrote: > On Fri, 11 Dec 2015, Arnd Bergmann wrote: > > > Strictly speaking, we can ignore the thumb instruction for pj4, as all > > variants also support the normal T2 opcode for udiv/sdiv. > > OK it is gone. > > Now... The code bails out if ARM mode and