From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: [RFC/PATCH 0/3] ARM: Use udiv/sdiv for __aeabi_{u}idiv library functions Date: Fri, 20 Nov 2015 17:23:14 -0800 Message-ID: <1448068997-26631-1-git-send-email-sboyd@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:57404 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760042AbbKUBXU (ORCPT ); Fri, 20 Nov 2015 20:23:20 -0500 Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Nicolas Pitre , Arnd Bergmann , Steven Rostedt , =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= This is a respin of a patch series from about a year ago[1]. I realized that we already had most of the code in recordmcount to figure out where we make calls to particular functions, so recording where we make calls to the integer division functions should be easy enough to add support for in the same codepaths. Looking back on the thread it seems like Mans was thinking along the same lines, although it wasn'= t obvious to me back then or even over the last few days when I wrote thi= s. This series extends recordmcount to record the locations of the calls to the library functions on ARM builds, and puts those locations into a table that we use to patch instructions at boot. The first two patches are the recordmcount changes, while the last patch implements the runti= me patching for modules and kernel code. The module part also hooks into t= he relocation patching code we already have. The RFC tag is because I'm thinking of splitting the recordmcount chang= es into a new program based on recordmcount so that we don't drag in a lot of corner cases and stuff when we don't need to. I suspect it will be cleaner that way too. Does anyone prefer one way or the other? Comments/feedback appreciated. [1] http://lkml.kernel.org/r/1383951632-6090-1-git-send-email-sboyd@cod= eaurora.org Cc: Nicolas Pitre Cc: Arnd Bergmann Cc: Steven Rostedt Cc: M=C3=A5ns Rullg=C3=A5rd Stephen Boyd (3): scripts: Allow recordmcount to be used without tracing enabled recordmcount: Record locations of __aeabi_{u}idiv() calls on ARM ARM: Replace calls to __aeabi_{u}idiv with udiv/sdiv instructions Makefile | 7 + arch/arm/Kconfig | 14 ++ arch/arm/kernel/module.c | 44 ++++++ arch/arm/kernel/setup.c | 34 +++++ arch/arm/kernel/vmlinux.lds.S | 13 ++ kernel/trace/Kconfig | 4 + scripts/Makefile.build | 15 +- scripts/recordmcount.c | 10 +- scripts/recordmcount.h | 337 +++++++++++++++++++++++++++++++++-= -------- scripts/recordmcount.pl | 11 +- 10 files changed, 406 insertions(+), 83 deletions(-) --=20 The Qualcomm Innovation Center, Inc. is a member of the Code Aurora For= um, a Linux Foundation Collaborative Project