Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp102850ybi; Fri, 7 Jun 2019 05:00:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgeTM767M9iPThnvf/2cV6ryp0ocxcXorWsLxYRkXV9rKpgHvxiFdBv71h6tuiOs/zZDAJ X-Received: by 2002:aa7:80d2:: with SMTP id a18mr23152871pfn.152.1559908820435; Fri, 07 Jun 2019 05:00:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559908820; cv=none; d=google.com; s=arc-20160816; b=E6Y99THNFZccre8rbseTIVKx7a/2Rn4a+Ni52bgq6C7ygsRrdE4XKZey+OcFSblhrQ sZ0TLdvHVOwmcInnq7WEHU7p9MmPFUITqQxQF2wgQz4TiLg3lcc9CW5AhERdJaICagcs b69fFhPVG5Pb0QF/qptvx+DbveDsWzusIasqREmZV5y7yHQKHTccpyh87xXmNmtn9gGc NopY7iSUkt8cY0vricSmXR7u/oSUJ2/YIjjLHjnvWPMCq3v5HPndglGnLEOKhGlsavRk t0GFlHjt/jZxfAzq+/juuPFjx+PeBN080Sip2c2YO4BcHQ0mgAhXcl60e1Ia4/58UqhR hXHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Vilweil9TlBgu5Hkhhnnu+TXSPB8nWOcIpLYUSYfYRs=; b=b23my4X0psfEoRNEtrvCpsz/mMgmNIbQNdn8pj94Cbzj07yAxiwZcfbG9s9SXUfQYF LEZstGdFiobRgwgoI1HjrG5sFQd9JLwe/hDRFkenWpVYOwKWEaWjyIL4OYlePB9kjMAE HRl6bACykJylIbbxsO5TEbmzY93UDvroj5kjHK8QbP1gVZmZKwYpwKpUz35cFZYzw2dd 7FTRTznFJDJC5nidiYZjPVqsu0yIVl12zs6ASMfXyT+iILSWW5fO+nIDRAdJydOlaG5K YcKvhSjfsJ4fdp1X8gNVbdvxRkQP+D5pWy3xx09hgK/sr05G85vTx5MtZDVdWGbdLCRR VVHg== 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 t15si1469102pjw.97.2019.06.07.05.00.04; Fri, 07 Jun 2019 05:00:20 -0700 (PDT) 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 S1728662AbfFGLgo (ORCPT + 99 others); Fri, 7 Jun 2019 07:36:44 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:44394 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728650AbfFGLgo (ORCPT ); Fri, 7 Jun 2019 07:36:44 -0400 Received: from ramsan ([84.194.111.163]) by michel.telenet-ops.be with bizsmtp id Mnci200093XaVaC06nciXJ; Fri, 07 Jun 2019 13:36:42 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hZDAo-0004G6-2j; Fri, 07 Jun 2019 13:36:42 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hZDAo-0003xk-1G; Fri, 07 Jun 2019 13:36:42 +0200 From: Geert Uytterhoeven To: Ralf Baechle , Paul Burton , James Hogan , Steven Rostedt , Ingo Molnar Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] MIPS: ftrace: Reword prepare_ftrace_return() comment block Date: Fri, 7 Jun 2019 13:36:40 +0200 Message-Id: <20190607113640.15191-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Improve the comment block for prepare_ftrace_return(). Signed-off-by: Geert Uytterhoeven --- arch/mips/kernel/ftrace.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c index 4b5e1f2bfbcea85f..2625232bfe526a84 100644 --- a/arch/mips/kernel/ftrace.c +++ b/arch/mips/kernel/ftrace.c @@ -333,20 +333,21 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra, return; /* - * "parent_ra_addr" is the stack address saved the return address of - * the caller of _mcount. + * "parent_ra_addr" is the stack address where the return address of + * the caller of _mcount is saved. * - * if the gcc < 4.5, a leaf function does not save the return address - * in the stack address, so, we "emulate" one in _mcount's stack space, - * and hijack it directly, but for a non-leaf function, it save the - * return address to the its own stack space, we can not hijack it - * directly, but need to find the real stack address, - * ftrace_get_parent_addr() does it! + * If gcc < 4.5, a leaf function does not save the return address + * in the stack address, so we "emulate" one in _mcount's stack space, + * and hijack it directly. + * For a non-leaf function, it does save the return address to its own + * stack space, so we can not hijack it directly, but need to find the + * real stack address, which is done by ftrace_get_parent_addr(). * - * if gcc>= 4.5, with the new -mmcount-ra-address option, for a + * If gcc >= 4.5, with the new -mmcount-ra-address option, for a * non-leaf function, the location of the return address will be saved - * to $12 for us, and for a leaf function, only put a zero into $12. we - * do it in ftrace_graph_caller of mcount.S. + * to $12 for us. + * For a leaf function, it just puts a zero into $12, so we handle + * it in ftrace_graph_caller() of mcount.S. */ /* old_parent_ra = *parent_ra_addr; */ -- 2.17.1