From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755359AbcBBRbq (ORCPT ); Tue, 2 Feb 2016 12:31:46 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36289 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011AbcBBRbp (ORCPT ); Tue, 2 Feb 2016 12:31:45 -0500 Date: Tue, 2 Feb 2016 18:31:41 +0100 From: Rabin Vincent To: Stephen Boyd Cc: Steven Rostedt , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Russell King Subject: Re: [PATCH] recordmcount: arm: Implement make_nop Message-ID: <20160202173141.GB9044@debian> References: <1454116686-30190-1-git-send-email-sboyd@codeaurora.org> <20160130184005.GA29607@debian> <20160201194432.GK4848@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160201194432.GK4848@codeaurora.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01, 2016 at 11:44:32AM -0800, Stephen Boyd wrote: > On 01/30, Rabin Vincent wrote: > > For __gnu_mcount_nc, wouldn't it be better to replace both the push {lr} > > and the bl with nop instructions, instead of keeping a (useless) push + > > pop sequence? > > Agreed. I was trying to do a 1-to-1 copy of the ftrace code on > ARM. I was wondering the same thing in that code path while > doing this though. Can't we replace both instructions instead of > one instruction when we're patching in nops at runtime? As Steven pointed out the last time this came up, we can't do it safely at runtime: https://marc.info/?l=linux-arm-kernel&m=132517584531389&w=2