From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756556AbcBDVsB (ORCPT ); Thu, 4 Feb 2016 16:48:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:51826 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753406AbcBDVr7 (ORCPT ); Thu, 4 Feb 2016 16:47:59 -0500 Date: Thu, 4 Feb 2016 22:47:56 +0100 (CET) From: Jiri Kosina X-X-Sender: jkosina@pobox.suse.cz To: AKASHI Takahiro cc: Torsten Duwe , Steven Rostedt , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org Subject: Re: [PATCH v6 1/9] ppc64 (le): prepare for -mprofile-kernel In-Reply-To: <56B31A7C.2050803@linaro.org> Message-ID: References: <20160125170459.14DB7692CE@newverein.lst.de> <20160125170723.D2CCE692CE@newverein.lst.de> <56B1AAE5.10500@linaro.org> <20160203112449.GA27247@lst.de> <56B31A7C.2050803@linaro.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 4 Feb 2016, AKASHI Takahiro wrote: > On arm/arm64, link register must be saved before any function call. So anyhow > we will have to add something, 3 instructions at the minimum, like: > save lr > branch _mcount > restore lr > > ... > > ... This means that we have at least two architectures that need one instruction before the mcount/mfentry call, and the rest of the prologue to follow afterwards. On x86, we don't need any "pre-prologue". Persumably the corresponding opcodes have different sizes. This nicely demonstrates my point -- if this one-gcc-option-to-rule-them-all would exist, it needs to be generic enough to describe these kinds of constraints (who knows what other restrictions will pop up when exploring other, more exotic, architectures later). Thanks, -- Jiri Kosina SUSE Labs