From patchwork Mon Jun 3 09:12:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 165592 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4209089ili; Mon, 3 Jun 2019 02:16:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqyRbNkS2jjG2AzgcwwKkW5zA3rf9AuKe/Rxhh0X4UM5M702qkhybmPOfbhMwrzV0xRDzID4 X-Received: by 2002:a17:902:8609:: with SMTP id f9mr26586417plo.252.1559553363590; Mon, 03 Jun 2019 02:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559553363; cv=none; d=google.com; s=arc-20160816; b=kkyhcUPJvCky3sYOE3aQJbgHdVTuAUTpHkKeB1ocq4izXDw53ru1vQ2fSJkUSfWkeU 85+OzX9fu02jNCg3ph5LTNnQ3MytAEv7LIpVoCNjGrcwUOBdA42Kqs2eKd1OfY6H2Q18 9t9rANkfIaNgKdisTQyz1CRmyW18nho0Zc4Ss912NyJUiAc3tmHn1g1vMAhjNY56ZxQd 1CJ7uPyf4bZ4+kHyXqP+EOpSOKG/7/6pxgf9M2meO/XiWry3zAJIScpzLy4GwFzDycc7 /HxXxoBA2zIHO7kjmAcvc9iXtWU2w4qyWUdjNXO7kHqzJjKC0tN205HJYW8w+kWmV0lo rdjw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=p2w7Kl57iLHckjKus0ozI/d6mjFcbpIqopjV/HxyM1s=; b=G2zWfxmWXT/KOUivNswA8JF3YXeLyZckdbHDd1hnA88Wh/OJgTE3fv9ghsQ1RigPKQ 8op8hJfOofovGeTTFvez15Vv0fN0qwuE2hPH+i7u8nHXwvjHX/RIzD14F/ZkDb1BERLJ gbIUK904qeEaSICa1ec7YrXEpVA4QJ+JKZIrJwNmOGkMrNnN0pmtbx2hft6ozDJaeZxG xBUZDX/sTIIigJkrgS1fL79RtRKF2yDh0zNJuteVci24nr+ZJOxRZ2SR8fUG/yvxotme 83Xsecx67UldpWGXfsR+hkLoOqY3YNzKYqNUU9fhlc+08MwSqi7KHQdHMFtvdRmVyJ06 bM3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="LErR/q1C"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 129si21663156pfy.160.2019.06.03.02.16.03; Mon, 03 Jun 2019 02:16:03 -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; dkim=pass header.i=@linaro.org header.s=google header.b="LErR/q1C"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728484AbfFCJQB (ORCPT + 30 others); Mon, 3 Jun 2019 05:16:01 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35000 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728757AbfFCJNH (ORCPT ); Mon, 3 Jun 2019 05:13:07 -0400 Received: by mail-lj1-f194.google.com with SMTP id h11so15468192ljb.2 for ; Mon, 03 Jun 2019 02:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p2w7Kl57iLHckjKus0ozI/d6mjFcbpIqopjV/HxyM1s=; b=LErR/q1Cw7oedcRjmOCVzqcAxs8gPx/T7/buH9Lwg8mSGR8eAtJ2kTcwFRHivjn5Ex kEjWaZ0dS19gIlRmtSTi0+74wxiQjf4cTAxf6mfbrFI1L/VVIf/lavH55pIQidTKt0LG 2bOOWaw3tWlDzpGQXwdZjUkhHrTMpQohW7T04THJ1XaQ294z0vbUDDvwYtL4a72rZ7KG 7x2a+G2Gwx/2N46KE1z6HifQw3qO52VIzGyZMI0hqpYVvdNJTb4Zob+fSBJTFrWEwMFa uMVDaQRSfaZWNnyGyJJqBArLdT7HZuOV1TPrk5K2dQgjo5cyiopk3TKCtcAeZbSyhF7P 7NYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p2w7Kl57iLHckjKus0ozI/d6mjFcbpIqopjV/HxyM1s=; b=attQ9WyYMwZjSEEjMFYbts7xkxVQpd5Dh7NwyieoCpcTFsRbUxEgOW9l78sWziA/3b NSLB9CHl3ZTzvlAxoeRZxaE8GXY0fYu+aJyXpW2FxDbBZCNwqnl/EdHVzQiJ4Gyz9zsq ojeAcUIefMHO4relPdh55GKAqx1DGS+4NCdTeIUbEZmo1BYq9YxZzC6bBFfa/ud/Hyqz Rxs7gs5rqDt7GoPatUSesAsZqUZqpESRp2d0cEfXl9cp0WNX5wCRLo8zcGtL5AVbmbKG l9m45MuuSUy9qArwQy7v1iFd8tAlKP0BNGe0T8bMFfUJQ//WDEXcrhvQA6z0b1u3UJe3 ytOA== X-Gm-Message-State: APjAAAXbVdBMJLdd/B/TNQYuep8Udjhevtaqyqlbh5Z2sZ8BNKYIAwM9 Mqboimb71OGRq70RzMRh13xutA== X-Received: by 2002:a2e:5b94:: with SMTP id m20mr3452661lje.7.1559553185375; Mon, 03 Jun 2019 02:13:05 -0700 (PDT) Received: from localhost (c-1c3670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.28]) by smtp.gmail.com with ESMTPSA id v2sm3030127lfi.52.2019.06.03.02.13.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jun 2019 02:13:04 -0700 (PDT) From: Anders Roxell To: mark.rutland@arm.com, marc.zyngier@arm.com, daniel.lezcano@linaro.org, tglx@linutronix.de Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mingo@redhat.com, Anders Roxell Subject: [PATCH 1/3] clocksource/arm_arch_timer: mark arch_counter_get_* as notrace Date: Mon, 3 Jun 2019 11:12:56 +0200 Message-Id: <20190603091256.25012-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_FUNCTION_GRAPH_TRACER is enabled we end up in this circular call trace since function arch_counter_get_cntvct() isn't marked with no trace: [ 17.914934] Call trace: [ 17.915211] ftrace_return_to_handler+0x194/0x288 [ 17.915551] return_to_handler+0x1c/0x38 [ 17.915855] trace_clock_local+0x38/0x88 [ 17.916159] function_graph_enter+0xf0/0x258 [ 17.916465] prepare_ftrace_return+0x60/0x90 [ 17.916772] ftrace_graph_caller+0x1c/0x24 [ 17.917093] arch_counter_get_cntvct+0x10/0x30 [ 17.917417] sched_clock+0x70/0x218 [ 17.917723] trace_clock_local+0x38/0x88 [ 17.918026] function_graph_enter+0xf0/0x258 [ 17.918332] prepare_ftrace_return+0x60/0x90 [ 17.918649] ftrace_graph_caller+0x1c/0x24 [ 17.918963] arch_counter_get_cntvct+0x10/0x30 [ 17.919286] sched_clock+0x70/0x218 Rework so that function arch_counter_get_cntvct() is marked with notrace. Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters") Signed-off-by: Anders Roxell --- drivers/clocksource/arm_arch_timer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.20.1 diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index b2a951a798e2..f4d5bd8fe906 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -149,22 +149,22 @@ u32 arch_timer_reg_read(int access, enum arch_timer_reg reg, return val; } -static u64 arch_counter_get_cntpct_stable(void) +static u64 notrace arch_counter_get_cntpct_stable(void) { return __arch_counter_get_cntpct_stable(); } -static u64 arch_counter_get_cntpct(void) +static u64 notrace arch_counter_get_cntpct(void) { return __arch_counter_get_cntpct(); } -static u64 arch_counter_get_cntvct_stable(void) +static u64 notrace arch_counter_get_cntvct_stable(void) { return __arch_counter_get_cntvct_stable(); } -static u64 arch_counter_get_cntvct(void) +static u64 notrace arch_counter_get_cntvct(void) { return __arch_counter_get_cntvct(); } @@ -947,7 +947,7 @@ bool arch_timer_evtstrm_available(void) return cpumask_test_cpu(raw_smp_processor_id(), &evtstrm_available); } -static u64 arch_counter_get_cntvct_mem(void) +static u64 notrace arch_counter_get_cntvct_mem(void) { u32 vct_lo, vct_hi, tmp_hi;