Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3974244ybx; Mon, 4 Nov 2019 05:53:28 -0800 (PST) X-Google-Smtp-Source: APXvYqyb3XoHGz4qvlk4pzd/frN88YGZcE39sDadouXr/OkFabGq7avEBbGgAOFAlPJRr/4MCKa7 X-Received: by 2002:a50:959a:: with SMTP id w26mr29299713eda.214.1572875607901; Mon, 04 Nov 2019 05:53:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572875607; cv=none; d=google.com; s=arc-20160816; b=bAV6+bAu1r0TvPfY19xa87IQbKjAUVI96+VZiWcdnxhMUqFtoYov5h5mIrn26WHyC6 7pFDAiBFc2fA6OurjiHyshdaumVO+s/cSY+ZG7jd2abwZn/4/bGn67I+vmYaEz+Ey9Ez cYX49kl/VZsDndkBeio9H/1A3mxEYbFkLI9SK5hjwEOSMyYsoG/Vhb59H7xv/j2Lwilp 6KKQIDIPZ2+E5KYR0CIXRx/3Sk6W4+3/rfUlBV3CD+19bPSW7XYbyS3kMossvvjPTAY4 RP+CxvHwSWFCLG6llzbYy4igGFJg588gxiFxJlcomwH/9XaGcjg2fsDTjGiu8f3E2e5K JMDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=JNl08Suqa1PQ5cGYyjKElPUbYsNwRwBsWNEmDf/DT+A=; b=idExnDVPOKlIWLVhqAEcpPkuaFmSNOmApbBo0XlLhRapmK1W3XHadBZlpSxmOVCV+l PUh9CJN09bk6qM3VoS/zr6rF2wt6dy3TuqR4H12P/pJoc82Gtk3oz+kK0UVR0GEBz7p7 WDgzGk3HS66FGWSQ5uiaGLsuTY0m7M5OKynhiEmsusJxrdCHL6ScJkXTjrYYs1aGksaX 9JRJjA6g6qnwAjd2E9tsJrNekigAAElm6Hqx6EFbBuVQuJRmfW+4cWZ4eiWZKEHr7lPZ S40GTZMK1ZjR8VGYh6jHb3cpbpzDknzjlazzosA7F1m9cW204j5DggnwtHpO1iCqKYjH Wk+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dx19si11299236ejb.113.2019.11.04.05.53.04; Mon, 04 Nov 2019 05:53:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729090AbfKDNwB (ORCPT + 99 others); Mon, 4 Nov 2019 08:52:01 -0500 Received: from foss.arm.com ([217.140.110.172]:43414 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727663AbfKDNwB (ORCPT ); Mon, 4 Nov 2019 08:52:01 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C5F171FB; Mon, 4 Nov 2019 05:52:00 -0800 (PST) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 739A93F6C4; Mon, 4 Nov 2019 05:51:58 -0800 (PST) Date: Mon, 4 Nov 2019 13:51:56 +0000 From: Mark Rutland To: Amit Daniel Kachhap Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, deller@gmx.de, duwe@suse.de, James.Bottomley@HansenPartnership.com, james.morse@arm.com, jeyu@kernel.org, jpoimboe@redhat.com, jthierry@redhat.com, linux-parisc@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, rostedt@goodmis.org, svens@stackframe.org, takahiro.akashi@linaro.org, will@kernel.org, Torsten Duwe Subject: Re: [PATCHv2 7/8] arm64: implement ftrace with regs Message-ID: <20191104135155.GG45140@lakrids.cambridge.arm.com> References: <20191029165832.33606-1-mark.rutland@arm.com> <20191029165832.33606-8-mark.rutland@arm.com> <8132dc13-9fbd-24e2-8a5e-28b005043c3e@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8132dc13-9fbd-24e2-8a5e-28b005043c3e@arm.com> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 02, 2019 at 05:51:46PM +0530, Amit Daniel Kachhap wrote: > On 10/29/19 10:28 PM, Mark Rutland wrote: > > +/* > > + * Due to -fpatchable-function-entry=2, the compiler has placed two NOPs before > > + * the regular function prologue. For an enabled callsite, ftrace_init_nop() and > > + * ftrace_make_call() have patched those NOPs to: > > + * > > + * MOV X9, LR > > + * BL > > + * > > + * ... where is either ftrace_caller or ftrace_regs_caller. > > + * > > + * Each instrumented function follows the AAPCS, so here x0-x8 and x19-x30 are > > + * live, and x9-x18 are safe to clobber. > > + * > > + * We save the callsite's context into a pt_regs before invoking and ftrace > s/invoking and ftrace callbacks/invoking the ftrace callbacks Whoops, that was meant to be 'any'. I've fixed that up locally. Thanks, Mark.