Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4808659ybg; Tue, 29 Oct 2019 12:42:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzHF/D9o8MkwOF/36rgYyDK1TH38gaDvVXpoTK8w7rWSXGg147QX1reu6hQt807gKlKwFVq X-Received: by 2002:a17:906:5502:: with SMTP id r2mr5214100ejp.3.1572378163438; Tue, 29 Oct 2019 12:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572378163; cv=none; d=google.com; s=arc-20160816; b=TaYBcjA4ytEqO8VSqDwVRvsoQgaF1Uc7b7J762BkftDQkdpE3G3p7id1B8bt2a3xL5 W0rAjBV/+j4+5qDU1k3uVHH8c9tGEVkJpbYCHvDhyHqiefmnHPar8OZHA/+WC/6yopFI smhTHacjaE7k4jZJvNapjdIP8n1gOdUT6xFBLo8uzhH2xVo56Z5y6yJFDBf6aSR5O+Hh EPiIjlBUatuXzVi4yQaEX7ngWIxoAjbJipdoNjTrZAlN445BKmiFAYc67n7C8tOlG4Ft YR+zXr/U5nVXuf9M8mLn1TQnEFxiODT23MTEIxl46tnL1WVim7qWyJuBOWPtxgZEhuS+ 1P0w== 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=JGXWynMZok9vtjEIP4H9mzz7e6klkRs/tO3ZitTN6FM=; b=a2lW4DLfX6aFgKr/oWMoPrnroyu36uAerk4/o1+dxs55JWpkcxlkPIuByj21gc1UA2 tARBueVRE/tudnWLn+5ML0EFQIJwGbwdq4pLiWYmGeavLGcalFm7VdkJ6z4e59n53+fV tu+mE7Vi5d4C4a0oR/GEQ36UI9MuebyqLwBqvG6JDjhELdE+J7b+8SyJnR/+SKDMRMEW i20k4SPea/TNQ5umOGRlmBLf1FTaKPRAoX6M/Zz1JyUsZMinu4kr+F0AWnhzleRJqQF6 bmx3pGb3kbgYpZjP1bQ2HEFobxZxOTuUGJwxcxQ/wTv+MoTZXriwV2bXmidBcV3lz+q1 gNVw== 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 v25si8665155eja.418.2019.10.29.12.42.19; Tue, 29 Oct 2019 12:42:43 -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 S2389433AbfJ2OjI (ORCPT + 99 others); Tue, 29 Oct 2019 10:39:08 -0400 Received: from mx2.suse.de ([195.135.220.15]:54596 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389024AbfJ2OjI (ORCPT ); Tue, 29 Oct 2019 10:39:08 -0400 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 F1619B29B; Tue, 29 Oct 2019 14:39:06 +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 v2 1/3] s390/unwind: drop unnecessary code around calling ftrace_graph_ret_addr() Date: Tue, 29 Oct 2019 15:39:02 +0100 Message-Id: <20191029143904.24051-2-mbenes@suse.cz> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191029143904.24051-1-mbenes@suse.cz> References: <20191029143904.24051-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 8fc9daae47a2..b407b5531f11 100644 --- a/arch/s390/kernel/unwind_bc.c +++ b/arch/s390/kernel/unwind_bc.c @@ -80,12 +80,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; @@ -140,12 +136,8 @@ void __unwind_start(struct unwind_state *state, struct task_struct *task, reliable = 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