Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp372394ybx; Wed, 6 Nov 2019 01:59:00 -0800 (PST) X-Google-Smtp-Source: APXvYqygbvrrKIuXPSVQYO2cNUkYwHy/UsKSwxejTqXTBM2Xvvfyd26bzTr37K1Eu5gh4/UiYm7/ X-Received: by 2002:aa7:c716:: with SMTP id i22mr1598818edq.237.1573034339979; Wed, 06 Nov 2019 01:58:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573034339; cv=none; d=google.com; s=arc-20160816; b=MYB+j5zlgp0rI89h9+EAs1MxEU61rwslHMPlJZ2L1S1O5Av3dtBEtLv+JsZQTD9Ve4 PqH7YbqjmtXcl4JLGBbWTz+IaEJtiI57aW7f8JuC91R0zS7SD7CZO6cG0B0Gp85gQCcr UA4V70B9D+nFxZ/fYiv7lyimvndcFjlbhjnL/+jQGUbAUetsjDIEn0iq4Pf20tgbnbe6 mqRqAFLyAfH4Kspo9t9z22h5hF5SkoMJ9C1N11RbHBaNiPrK6IRxygH05P7SP+iwjIsJ MnQaz/cIMEeUMEnzcbu99RZcO+IkP3ci4yV1qFD+RNIZa8mit0SNwhSKKSPJ9Pnb/hXD WuoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=rrHAfh2BvYBppkSjTN1c8biidxgcssxPeU3Pcroz8CY=; b=FXe3yK5kSOXoTMiATZpg6yMuzzj57FpnlY0JaYnzgvnIe10Dnb+xAmlIBgQCuvZymh le7MLdkPecIGCfC6hdPS1rOQhxysHtA9y/j2fIiXsarMdTLpTquNk0GYgHZ4g7fuSmNH Mhah53zOkDU3vF5Z91IMJox1yHwfneAd35aVxS4NGftUl/LKVUbI6gNcGeEf7L9xhEuy R4lhdMISM422zAfBB2UJ5GKKWcEJEriI9b44YLhthnIzwtgThZQaaGFil8h/6IN7pwCj chNLfUSf011oNIMVFKJu5As/rp7BdVIquBeSVW67dZjOb84gEC/Wi/p4LhdHt16RcHKu pCJQ== 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 e24si12652812ede.392.2019.11.06.01.58.36; Wed, 06 Nov 2019 01:58:59 -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 S1729280AbfKFJ4F (ORCPT + 99 others); Wed, 6 Nov 2019 04:56:05 -0500 Received: from mx2.suse.de ([195.135.220.15]:49956 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725906AbfKFJ4E (ORCPT ); Wed, 6 Nov 2019 04:56:04 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3B03EAFE3; Wed, 6 Nov 2019 09:56:03 +0000 (UTC) From: Miroslav Benes To: heiko.carstens@de.ibm.com, gor@linux.ibm.com, borntraeger@de.ibm.com, jpoimboe@redhat.com, joe.lawrence@redhat.com Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, jikos@kernel.org, pmladek@suse.com, nstange@suse.de, live-patching@vger.kernel.org, Miroslav Benes Subject: [PATCH v3 1/4] s390/unwind: drop unnecessary code around calling ftrace_graph_ret_addr() Date: Wed, 6 Nov 2019 10:55:58 +0100 Message-Id: <20191106095601.29986-2-mbenes@suse.cz> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191106095601.29986-1-mbenes@suse.cz> References: <20191106095601.29986-1-mbenes@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current code around calling ftrace_graph_ret_addr() is ifdeffed and also tests if ftrace redirection is present on stack. ftrace_graph_ret_addr() however performs the test internally and there is a version for !CONFIG_FUNCTION_GRAPH_TRACER as well. The unnecessary code can thus be dropped. Signed-off-by: Miroslav Benes --- arch/s390/kernel/unwind_bc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/s390/kernel/unwind_bc.c b/arch/s390/kernel/unwind_bc.c index a8204f952315..5a78deacb972 100644 --- a/arch/s390/kernel/unwind_bc.c +++ b/arch/s390/kernel/unwind_bc.c @@ -85,12 +85,8 @@ bool unwind_next_frame(struct unwind_state *state) } } -#ifdef CONFIG_FUNCTION_GRAPH_TRACER - /* Decode any ftrace redirection */ - if (ip == (unsigned long) return_to_handler) - ip = ftrace_graph_ret_addr(state->task, &state->graph_idx, - ip, (void *) sp); -#endif + ip = ftrace_graph_ret_addr(state->task, &state->graph_idx, + ip, (void *) sp); /* Update unwind state */ state->sp = sp; @@ -147,12 +143,8 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task, reuse_sp = false; } -#ifdef CONFIG_FUNCTION_GRAPH_TRACER - /* Decode any ftrace redirection */ - if (ip == (unsigned long) return_to_handler) - ip = ftrace_graph_ret_addr(state->task, &state->graph_idx, - ip, NULL); -#endif + ip = ftrace_graph_ret_addr(state->task, &state->graph_idx, + ip, NULL); /* Update unwind state */ state->sp = sp; -- 2.23.0