Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp3985995ybx; Mon, 4 Nov 2019 06:04:27 -0800 (PST) X-Google-Smtp-Source: APXvYqytDGxkFHsxIgK4h9pcJp1L8GJZD27MA0lk4fKvI24h/uk7k87BUBWhJuTUe93M8Qy63KEG X-Received: by 2002:a50:9fc1:: with SMTP id c59mr29993386edf.305.1572876266883; Mon, 04 Nov 2019 06:04:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572876266; cv=none; d=google.com; s=arc-20160816; b=uCoonPkwfd0cv5J1PlZccUjIi2n55A66OQUbSKyPtIRmzwVhhl5o+lECwE28KyM6As XYJUjKPes9roZUvqXOdd5J7eg3G4pSde1IEPPnCB1SZ6ZsYb9EPUiP44ETjh8RYn1hXd EA8j3wx1clKJjIgmH0fxhM/6QF0HDGiMC04xi0TEGdXj84r45CZq+pJfTQn30FO+EYwb G7KIJR+elGjiymDE1jsIz+YCy+y5ZwITdrQ9mNmOEuQv5mvhApAI1xJ5IDImLcNMQ/ON L+mpt4+/awmqsakygaKeufG+mVaXs10ybduTbBrjeWk+LirS9gEFqDaJe3rippe+nB+m JM4w== 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=7EMJ9LlgxZmyxyXmrz1zhHzxGOKNXzrk3S71Ho64dPI=; b=P+8EOtsYRoGzvf06TR1Rlm3PAqLAlpiNnqt8MiFya/QES+R+GGlcdTm7r6/KoFBfqm jN/1z4WNxAfWpSSVzc4t74EGeTB0eN2X1+9BbG6hhptRUUxOXM74CPXLMRYQdWfx+D9G jvt9enzF/ipYodgGUhQaoXUN/MqD2vtlo+XzSD3+3zInkusGcgEdAO9TDq84UzuJ6eQz Xj8aWaQbvMkOY9nylabh2cNtx+I4dH6wy/qlx7ygEzcisY9QVdTv6YD7UmrKJ7vXYpCe /bm7W+nSvrNSDZlwGGzTYBx1MOU7+Vx5Iz1a/N4kXIofwLt/a7ep9kcdCw3J3B1W/IwH ahAQ== 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 jp18si2544560ejb.318.2019.11.04.06.04.02; Mon, 04 Nov 2019 06:04:26 -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 S1729199AbfKDOA0 (ORCPT + 99 others); Mon, 4 Nov 2019 09:00:26 -0500 Received: from foss.arm.com ([217.140.110.172]:43644 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727891AbfKDOA0 (ORCPT ); Mon, 4 Nov 2019 09:00:26 -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 7498F1FB; Mon, 4 Nov 2019 06:00:25 -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 371433F6C4; Mon, 4 Nov 2019 06:00:23 -0800 (PST) Date: Mon, 4 Nov 2019 14:00:21 +0000 From: Mark Rutland To: Steven Rostedt Cc: Torsten Duwe , linux-arm-kernel@lists.infradead.org, Jessica Yu , Helge Deller , "James E.J. Bottomley" , linux-kernel@vger.kernel.org, amit.kachhap@arm.com, catalin.marinas@arm.com, james.morse@arm.com, jpoimboe@redhat.com, jthierry@redhat.com, linux-parisc@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, svens@stackframe.org, takahiro.akashi@linaro.org, will@kernel.org Subject: Re: [PATCHv2 2/8] module/ftrace: handle patchable-function-entry Message-ID: <20191104140020.GI45140@lakrids.cambridge.arm.com> References: <20191029165832.33606-1-mark.rutland@arm.com> <20191029165832.33606-3-mark.rutland@arm.com> <20191030150302.GA965@suse.de> <20191031090231.GA3340@blommer> <20191031114223.GA11684@suse.de> <20191031130022.GB3477@blommer> <20191104082810.70f1b72a@grimm.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191104082810.70f1b72a@grimm.local.home> 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 Mon, Nov 04, 2019 at 08:28:10AM -0500, Steven Rostedt wrote: > On Thu, 31 Oct 2019 13:00:22 +0000 > Mark Rutland wrote: > > > Sure. I've folded the above into this patch, and pushed out an updated branch: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/log/?h=arm64/ftrace-with-regs > > Just to keep this change in lore, can you at a minimum reply to this > patch's thread with the new update? The new change is below (with all else unchanged). I can send a v3 of the series if you want the whole patch? Thanks, Mark. diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index dae64600ccbf..a9c4e4721434 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -110,17 +110,17 @@ #endif #ifdef CONFIG_FTRACE_MCOUNT_RECORD -#ifdef CC_USING_PATCHABLE_FUNCTION_ENTRY -#define MCOUNT_REC() . = ALIGN(8); \ - __start_mcount_loc = .; \ - KEEP(*(__patchable_function_entries)) \ - __stop_mcount_loc = .; -#else +/* + * The ftrace call sites are logged to a section whose name depends on the + * compiler option used. A given kernel image will only use one, AKA + * FTRACE_CALLSITE_SECTION. We capture all of them here to avoid header + * dependencies for FTRACE_CALLSITE_SECTION's definition. + */ #define MCOUNT_REC() . = ALIGN(8); \ __start_mcount_loc = .; \ KEEP(*(__mcount_loc)) \ + KEEP(*(__patchable_function_entries)) \ __stop_mcount_loc = .; -#endif #else #define MCOUNT_REC() #endif