From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755611Ab3KLOkH (ORCPT ); Tue, 12 Nov 2013 09:40:07 -0500 Received: from unicorn.mansr.com ([81.2.72.234]:38259 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751478Ab3KLOkC convert rfc822-to-8bit (ORCPT ); Tue, 12 Nov 2013 09:40:02 -0500 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Nicolas Pitre Cc: Ben Dooks , Russell King - ARM Linux , =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= , Stephen Boyd , linux-kernel@vger.kernel.org, Christopher Covington , Jean-Christophe PLAGNIOL-VILLARD , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v2] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions References: <1383951632-6090-1-git-send-email-sboyd@codeaurora.org> <528193A0.7050505@codeaurora.org> <20131112140436.GK16735@n2100.arm.linux.org.uk> <52823877.60806@codethink.co.uk> Date: Tue, 12 Nov 2013 14:40:01 +0000 In-Reply-To: (Nicolas Pitre's message of "Tue, 12 Nov 2013 09:32:03 -0500 (EST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (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 Tue, 12 Nov 2013, Ben Dooks wrote: > >> Given these are single instructoins for ARM, is it possible we could >> make a table of all the callers and fix them up when we initialise >> as we do for the SMP/UP case and for page-offset? > > Not really. Calls to those functions are generated by the compiler > implicitly when a divisor operand is used and therefore we cannot > annotate those calls. We'd have to use special accessors everywhere to > replace the standard division operand (like we do for 64 by 32 bit > divisions) but I doubt that people would accept that. It might be possible to extract this information from relocation tables. -- Måns Rullgård mans@mansr.com