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; From patchwork Mon Jun 3 09:14:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 165590 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4208145ili; Mon, 3 Jun 2019 02:15:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFVdb+422CKF7SpNSE6htfrpZ1/EkrMcWGNSth0jbjhMyOW/1zCgErcFZrV8vgBmPQ43HI X-Received: by 2002:aa7:8ac9:: with SMTP id b9mr20683768pfd.260.1559553306183; Mon, 03 Jun 2019 02:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559553306; cv=none; d=google.com; s=arc-20160816; b=adlX+wiH2ZaRevoLjoMSai5eZaP4CWJVlTCi27UsmHxtDmvC6HGrV5wb1poyYMcO5x HGjPKq8E250HONyRblu1gujDE1wRrQ68Z2wKMTVu4Ke7OC3D44gaZRrkL9G5yH1gq900 Ple0junqB/PpUrUa20SMkc7QTqZMl/53AyEIgFuFPHX85v4kEq5ZBHf3eo0ALprXlvwZ SZl/6tpmcwbO1753KeXnz3cBWHnZUsTVmO1X1F3e0bTTg8M6cfh1dVJCKrjDl5K8d0X5 vfjgzBl64jABhtCbOsVM51vjZVnE5axVZUTEcrY8K3Z39AVyQoa9fABMZnBczgYQ9Fg2 sLGg== 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=+y2pHh+GcgrSTo/c/Dh+rI5M9UbSYW68+phN/wa7KlA=; b=C8hhqAHEjFpxbe9zZUpZQinMMlf9aCHo/G0y3tXlb/PCAmkP+RbfQVSYhxPDsgGOzt ZeL/pZvz5snohKE3hcIimUWX1Sf75P4DTyFREoka9GsptTd0uPeq9QYSiKH/w2ePItet 46o/naCdTUifWEB6nJ5LOYJCaehXhL96DeyLBzo0p2M1joOFSpHaMmk6+aIdXBVjIsHs d18CwFSbYvk2A6qK+m1einzSyTB9KwIoEP6ZpjWFhOEgWDIYZ8/JL5vLgJ7HnyBuA+Pm +QShy1y7lfVze++sg47e7DU6JcxZGKmWjvlfE52Ri0/kPQI2DlJWj6lwmP1TI2KggjFX jg2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XwNM5aaS; 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 t7si16163280pgu.3.2019.06.03.02.15.05; Mon, 03 Jun 2019 02:15:06 -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=XwNM5aaS; 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 S1728974AbfFCJOO (ORCPT + 30 others); Mon, 3 Jun 2019 05:14:14 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:41874 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728223AbfFCJOJ (ORCPT ); Mon, 3 Jun 2019 05:14:09 -0400 Received: by mail-lf1-f66.google.com with SMTP id 136so1465400lfa.8 for ; Mon, 03 Jun 2019 02:14:08 -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=+y2pHh+GcgrSTo/c/Dh+rI5M9UbSYW68+phN/wa7KlA=; b=XwNM5aaSm3fVul6uRnmu+Fwt9JaXj3z2dqhDZMARNqS5naUoZNgGLSLwsvVmsEz9yL c0arF2jfhe472ek/T7KaHJmQe9ZWn1vIfZ1zP3sWpdcTKzQYLngpHvbE9cMqmevghtv2 92WTx36NG/u22grAhRBghDdGYWYAN10P/F+6XrvTXTaVMDBR/IAUa7VqHxE5fhzulF7u TBxjumz03UwitufJJztAVu7RNIaNbl7bk2FnoJQgm9CNOu+gAMsfZDTuf2C3ANydj6hx 8nQoerNpFuFxav5hC+2HVyIO1P5ydRDPAKnde4Ng8ABvXfh6QZ+0BZrD8Kl48BfUb6cH mriQ== 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=+y2pHh+GcgrSTo/c/Dh+rI5M9UbSYW68+phN/wa7KlA=; b=j1bqvcR05wwiAL1U0/68KfLPDmzS+Zy5Fdmsdmwt/ovNe9VZIV+6K1SLeC3lBPZpqT qz4dNdns2tBBHLXDB+HR6EG7zyVSQXxPcFZovgpASFFUkDxD4vmosDNOtDNC5Ud/CMCz YCIDtkuYRxSz92g5VZd67srbJYHDiiiBGfho2NcxExvKFZYx9cPicOlLgbkln5cdDnmv JM5HdfTb7MLaCjP0VVI68kHOrN1Ts8FPRR9Gbd2+Ak1SamVpDxnqAXJcP0TyXukSik7t 6NnOhvVj7lOC2tj2FTOcgm0S4kVKSd8UY3AIqsZu07VG5qKOVyGTX0figV52utfyBC2r Az5Q== X-Gm-Message-State: APjAAAUYR8sjaB1gVFB1wNrNnnX0KKGn+CedBQxZwatJkno4R2KTd0c5 pL8NNueoVnjrf1MJs0vD5BCofA== X-Received: by 2002:ac2:5449:: with SMTP id d9mr14199136lfn.126.1559553247684; Mon, 03 Jun 2019 02:14:07 -0700 (PDT) Received: from localhost (c-1c3670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.28]) by smtp.gmail.com with ESMTPSA id o184sm3068020lfo.37.2019.06.03.02.14.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jun 2019 02:14:07 -0700 (PDT) From: Anders Roxell To: mark.rutland@arm.com, marc.zyngier@arm.com, catalin.marinas@arm.com, will.deacon@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, Anders Roxell Subject: [PATCH 2/3] arm64: arch_timer: mark functions as __always_inline Date: Mon, 3 Jun 2019 11:14:02 +0200 Message-Id: <20190603091402.25115-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 If CONFIG_FUNCTION_GRAPH_TRACER is enabled function arch_counter_get_cntvct() is marked as notrace. However, function __arch_counter_get_cntvct is marked as inline. If CONFIG_OPTIMIZE_INLINING is set that will make the two functions tracable which they shouldn't. Rework so that functions __arch_counter_get_* are marked with __always_inline so they will be inlined even if CONFIG_OPTIMIZE_INLINING is turned on. Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters") Signed-off-by: Anders Roxell --- arch/arm64/include/asm/arch_timer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 Acked-by: Marc Zyngier diff --git a/arch/arm64/include/asm/arch_timer.h b/arch/arm64/include/asm/arch_timer.h index b7bca1ae09e6..50b3ab7ded4f 100644 --- a/arch/arm64/include/asm/arch_timer.h +++ b/arch/arm64/include/asm/arch_timer.h @@ -193,7 +193,7 @@ static inline void arch_timer_set_cntkctl(u32 cntkctl) : "=r" (tmp) : "r" (_val)); \ } while (0) -static inline u64 __arch_counter_get_cntpct_stable(void) +static __always_inline u64 __arch_counter_get_cntpct_stable(void) { u64 cnt; @@ -203,7 +203,7 @@ static inline u64 __arch_counter_get_cntpct_stable(void) return cnt; } -static inline u64 __arch_counter_get_cntpct(void) +static __always_inline u64 __arch_counter_get_cntpct(void) { u64 cnt; @@ -213,7 +213,7 @@ static inline u64 __arch_counter_get_cntpct(void) return cnt; } -static inline u64 __arch_counter_get_cntvct_stable(void) +static __always_inline u64 __arch_counter_get_cntvct_stable(void) { u64 cnt; @@ -223,7 +223,7 @@ static inline u64 __arch_counter_get_cntvct_stable(void) return cnt; } -static inline u64 __arch_counter_get_cntvct(void) +static __always_inline u64 __arch_counter_get_cntvct(void) { u64 cnt; From patchwork Mon Jun 3 09:15:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 165591 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4208430ili; Mon, 3 Jun 2019 02:15:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4MhziJ0gtABTD27G/xkNblrtNNwnnKL8Q8oCVlx8tUPiDvX4bgI+Rqev83x5LE+cK59ss X-Received: by 2002:a63:234c:: with SMTP id u12mr27148035pgm.264.1559553323810; Mon, 03 Jun 2019 02:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559553323; cv=none; d=google.com; s=arc-20160816; b=B0uLnYzjC96fcmwaddqOp/HhABsDHl/5hPBjYjLRjfZyRBlNcXbBfVRnP4wh7Cb0hG aufVBaqZpJqH4QPJ6XFB+q+iDTJqdM8lIh7VcgqDQ+CIFukpX1uhCiWuKzmUmJONKsDI nxdNHVNl5a0VPHzPXbAjZcBBHGZM0nBr00T+89nsQKhXSaDlrSQXtPDGPE4kmiol6njf jluufZlKWzntyeLCQlbv7JTWQz7e+Q7OP3pf8thuQZGb/2s0s88ZC1lyv+LxAEq//n7o rEaE8B3gwymoRLOXqIaf8+pjsEQCMGq8GXLSC+wtIY//1fDy4NoFG++DKeb1vD+PZw6l fHkw== 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=PR8lLBLyYvGMiS0Uym8abST4zelhaOVi9Iwrklqg+JM=; b=PnUjdRBWfX1FxI/gxiyVmsZSfT9Fj5n6fQKXwMqSfu1LaAumwVWlbVuRDIIgwwe8CS oxPxsus6jS1xyNEmXBwI7BBpwd/n36wwmVazrQEBXLKvptajlBF4PhoU80ND9IR9qDhg wHQBoT0drjB8mNzkqi1YQ2y26JmsacBGCjaWIrO0Ak6iCx9agquq7pOSrUOxOmJn9G5I 0Ih9WGdP1wdxZWZEaA2m5VzT8bMkJG0AT/kd8og8mbDoYup/HSvHPg06TQSdJDA4yvex t+5t2BIii9U94AAfjU1QptccfdWKCqyclYI3ZdrWtaFt3l1Sn7wAbHd5hNYd3xS7gI7Z MyfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WIMKxnbm; 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 h4si20127102plb.206.2019.06.03.02.15.23; Mon, 03 Jun 2019 02:15:23 -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=WIMKxnbm; 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 S1728831AbfFCJPW (ORCPT + 30 others); Mon, 3 Jun 2019 05:15:22 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:44431 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728344AbfFCJPT (ORCPT ); Mon, 3 Jun 2019 05:15:19 -0400 Received: by mail-lf1-f65.google.com with SMTP id r15so12984144lfm.11 for ; Mon, 03 Jun 2019 02:15:17 -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=PR8lLBLyYvGMiS0Uym8abST4zelhaOVi9Iwrklqg+JM=; b=WIMKxnbm4jO3KJFthTYVKBxdmkT1G96bERBd6FIDYNYhFfSTjUb3750sWesJG0TUYL bxWMY37Ut3+qwQttQ+NSVhD2nzOpnVadPB7YAZSmTvHbRNm9Vsw0pjGkbrjkhfCV9Qoi qtRXjAe+4qc7ZkyUel1mSbqjR/epygQ0DNkwGnKF9qRfQEEkRGIsQGP4G5AWKC36h7RL jRVzmDYhz5eFURzz2IQ8gJEa71grNVKYOacWuRLabzeEtxIAwaUb59PPVymqS0pEF1k3 TT42cFX5wZMHxIb7CdLFy+R/SnaPs77uoDVYWvEPreCWjB6tx5WdBkS5ZQmuCOXCN49b HNJA== 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=PR8lLBLyYvGMiS0Uym8abST4zelhaOVi9Iwrklqg+JM=; b=PtwbjpSJ2NjXEKcQo+elueG4ZM+PnKZkN1aLUkl9qxdeR8v4LOoGy/ftG3K3y/A4Bp 6yRiARXIlSQKcrW8VqpmGy016qBDMxzVjTdn65HcN6t1SsIjCSdCg21v6V8r21yG/qcV cqggw4aPABWk0LTS40tqL0qkIKjkRxVNgG/A6t6+sgUf1wXtNGzQGBkn4UQN1kJtu9zd nx7EqnurywRXeSrRQhwxpmydVqdgbUeSdNgLFd10gSuvXVEvK+zoMS6c/XbYr14zzh1C PDEMEWcQf9zjRCpm3KBGe4Am1KNZHX0zHF1vKKsiLWrDqt/bYQtqa0A4MUM1Ols2rSl9 p1FA== X-Gm-Message-State: APjAAAVJAkrgvr9/ifhv+SA7CYJknTkD6fGgzY30fhad7TV6r1GqnPwX J/DJoAY3U+Z7pJa27P4lp9E2RA== X-Received: by 2002:a19:4bc5:: with SMTP id y188mr13319717lfa.113.1559553317031; Mon, 03 Jun 2019 02:15:17 -0700 (PDT) Received: from localhost (c-1c3670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.28]) by smtp.gmail.com with ESMTPSA id k16sm3018089lje.30.2019.06.03.02.15.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jun 2019 02:15:16 -0700 (PDT) From: Anders Roxell To: mark.rutland@arm.com, marc.zyngier@arm.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, Anders Roxell Subject: [PATCH 3/3] arm: arch_timer: mark functions as __always_inline Date: Mon, 3 Jun 2019 11:15:12 +0200 Message-Id: <20190603091512.25298-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 If CONFIG_FUNCTION_GRAPH_TRACER is enabled function arch_counter_get_cntvct() is marked as notrace. However, function __arch_counter_get_cntvct is marked as inline. If CONFIG_OPTIMIZE_INLINING is set that will make the two functions tracable which they shouldn't. Rework so that functions __arch_counter_get_* are marked with __always_inline so they will be inlined even if CONFIG_OPTIMIZE_INLINING is turned on. Originally found on arm64, but doing the same thing on arm for consistency. Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters") Signed-off-by: Anders Roxell --- arch/arm/include/asm/arch_timer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.20.1 Acked-by: Marc Zyngier diff --git a/arch/arm/include/asm/arch_timer.h b/arch/arm/include/asm/arch_timer.h index 4b66ecd6be99..73a72ce41dc3 100644 --- a/arch/arm/include/asm/arch_timer.h +++ b/arch/arm/include/asm/arch_timer.h @@ -83,7 +83,7 @@ static inline u32 arch_timer_get_cntfrq(void) return val; } -static inline u64 __arch_counter_get_cntpct(void) +static __always_inline u64 __arch_counter_get_cntpct(void) { u64 cval; @@ -92,12 +92,12 @@ static inline u64 __arch_counter_get_cntpct(void) return cval; } -static inline u64 __arch_counter_get_cntpct_stable(void) +static __always_inline u64 __arch_counter_get_cntpct_stable(void) { return __arch_counter_get_cntpct(); } -static inline u64 __arch_counter_get_cntvct(void) +static __always_inline u64 __arch_counter_get_cntvct(void) { u64 cval; @@ -106,7 +106,7 @@ static inline u64 __arch_counter_get_cntvct(void) return cval; } -static inline u64 __arch_counter_get_cntvct_stable(void) +static __always_inline u64 __arch_counter_get_cntvct_stable(void) { return __arch_counter_get_cntvct(); }