From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759964AbbJ3Rpb (ORCPT ); Fri, 30 Oct 2015 13:45:31 -0400 Received: from unicorn.mansr.com ([81.2.72.234]:34460 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758081AbbJ3Rp3 convert rfc822-to-8bit (ORCPT ); Fri, 30 Oct 2015 13:45:29 -0400 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Nicolas Pitre Cc: Alexey Brodkin , "shemminger\@linux-foundation.org" , "linux-kernel\@vger.kernel.org" , "Vineet.Gupta1\@synopsys.com" , "linux-snps-arc\@lists.infradead.org" , "rmk+kernel\@arm.linux.org.uk" , "davem\@davemloft.net" , "mingo\@elte.hu" Subject: Re: [PATCH] __div64_32: implement division by multiplication for 32-bit arches References: <1446072455-16074-1-git-send-email-abrodkin@synopsys.com> <1446220442.4394.42.camel@synopsys.com> Date: Fri, 30 Oct 2015 17:45:20 +0000 In-Reply-To: (Nicolas Pitre's message of "Fri, 30 Oct 2015 12:55:38 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Nicolas Pitre writes: > On Fri, 30 Oct 2015, Alexey Brodkin wrote: > >> Hi Nicolas, >> >> On Fri, 2015-10-30 at 11:17 -0400, Nicolas Pitre wrote: >> > On Fri, 30 Oct 2015, Måns Rullgård wrote: >> > >> > > Nicolas Pitre writes: >> > > >> > > > OK... I was intrigued, so I adapted my ARM code to the generic case, >> > > > including the overflow avoidance optimizations. Please have look and >> > > > tell me how this works for you. >> > > > >> > > > If this patch is accepted upstream, then it could be possible to >> > > > abstract only the actual multiplication part with some architecture >> > > > specific assembly. >> > > >> > > Good idea. >> > >> > Could you please provide a reviewed-by or acked-by tag? >> >> Sure! >> >> Acked-by: Alexey Brodkin >> >> BTW I thought about that optimization a bit more and now I think >> we may even skip addition of arch-specific assembly insertions. > > I'm going to do it anyway given that I already have it for ARM. It'll > be opt-in, so if your arch doesn't provide it then the current C > implementation will be used by default. Great. I'll try it out on MIPS once you've posted the patch. -- Måns Rullgård mans@mansr.com