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: 10972601 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1844176 for ; Mon, 3 Jun 2019 09:13:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06DA228872 for ; Mon, 3 Jun 2019 09:13:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF31228928; Mon, 3 Jun 2019 09:13:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 532AC288BE for ; Mon, 3 Jun 2019 09:13:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=J/52+BRnmerWOK+Dec613GTq45ElPXiVMX6iXNfqPPM=; b=h/oAehKpe1EMV8 BeiznKWm0nQOwxreCAwVYjZRPqK37nUKZ4BMROG1SoW7+aFJwM3jUAHr9Fi/laqPM1fkoneP3APJ0 IeEYw6BQABAkVpUObObViGpKXRhRouFE9JOgINbd0OGJAa2uChOZoG11AL2AYkp8pKXtvigYB10pz whAHhK9TlkBLqOu7csyXd0oetkWiby3jE2umVUQY+xElZd5pFN0wW24dvB7XixUTrwdd5yP2+9v0O dZ5ZPDwIhNuxw5/KNe1p5R6V7RA9Fk4axYJqKyYHoxkh3xXvghSQcb1GNLe8ndXNJoJn4gQlnEyRh kEYSzXSbv7OOaH2KMNHQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXj1i-0001XC-HW; Mon, 03 Jun 2019 09:13:10 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXj1f-0001WV-Qe for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2019 09:13:09 +0000 Received: by mail-lj1-x242.google.com with SMTP id e13so15384320ljl.11 for ; Mon, 03 Jun 2019 02:13:07 -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=eZ6k8EJZEFHCKmnspd5lrb7fuQwHp+XuLl/TQTusc7t0JJXsxiT6OVhlCZJ3BZ0203 RAaBS8ax4f6MAuLg4ekTv563pE1gBI6fBE4EHDbaxNZISOBRG2R8x2JwKaYQykD58z00 q4zlsYhpaAkRtiD6HewKdPjCdzYXqUtaZ891wbHWq8a4dpWDfsWbBoJOA6lucjzRNd7R E9TZ22ZI8N4EJql7fkqDnhNVG99+NAXE4hMDTYpndsB/TD/wGcvUjXagz5tSZu/KA9IU 8THabGo9JOu+0zmDeXWKBEJw6kYGzB2SeYDGYpJ8ZucXLeFwiELNqjRytjhv15WKDnzQ 4xlg== X-Gm-Message-State: APjAAAVsHgHRfzJcLPORD6T9PRQ3lV5zzDk3QWhOIL4r7aXtZD1vnOWI b5y/7ac9sOozewrZIj/lVNmdLg== X-Google-Smtp-Source: APXvYqzH+12IqYjeDa9Cf9SfS3k+UN9FSA/zr7tE4XHHnE6+zYlsVHzadgAxfalAVmWokf3dCikz8w== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190603_021307_923802_03882AA8 X-CRM114-Status: GOOD ( 10.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mingo@redhat.com, Anders Roxell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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: 10972609 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A21876 for ; Mon, 3 Jun 2019 09:14:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 795E7288BE for ; Mon, 3 Jun 2019 09:14:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6DA412892E; Mon, 3 Jun 2019 09:14:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1B8F8288BE for ; Mon, 3 Jun 2019 09:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=mnn5kEGoHU+JfCAdPASOpLwOJ9PvEbucz3ksNO2otBc=; b=AKffUiNwr58YWE HMV3O4TiDcatBwb40QnbjICideb6/XUcI5uT4JzOnByFigbFmJBTT4tJqMJMXcULK7YbFaEW0Xqin 8z85w63Z1NqFwWKe3Vg7kxZI6TkCLO6QLz/vFxj0CIqwmaMn644W7naKUgiw5NR45+tu9EquPgPfO erfPMTH419o+r2fZ/YfAyp73c8zN9F+7E+bn2PcUdXfwIYTS4nYeUiigW+APZa6w3HupAT4nEw4qf sKi6buzhaWKsu+Z8oyIAuFfTBSJLm28TftZNYgJqpocNCh0RnynuQV/DP+YEn/wSVxCi3LNyYpPLo dDJrROO98JULo1kIuTyw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXj2j-0001u4-KB; Mon, 03 Jun 2019 09:14:13 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXj2f-0001sq-N5 for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2019 09:14:11 +0000 Received: by mail-lf1-x144.google.com with SMTP id y198so2513611lfa.1 for ; Mon, 03 Jun 2019 02:14:09 -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=hb61zzmdJRf8PTmyI7KStDJFwdqNm470BMozqVz2SWI7t5i9sBktJihz18Y9pG42AP hhbidp98dyB/59Xb/Azmq/6PdcTPyYjRirU031K9dIPNHOulcxkEl+ZhNbQoKveYg5zL 5y+DqLSyTF7KFFgTRV8IEmVEUxerX9DUQzHy0FjdZuohitmEtND7xY+tQ93x0TIa4/oz MayzJgLefP94kh3wlTtOC1auQ/60+ZtZ7eHu6Cl+Tx65DdmL1tgXww+6qKvBellajVGC zb5SbbIZrJr3NUROL8Xcbsa2NTw16a7sejX2JqmpBnNnrtVF5X/GyIM+O5cRjbITtD2A lrQg== X-Gm-Message-State: APjAAAW0zYB1YQPJfpwSh8nG0OYix+8/nbC4dEBL/fdFpDc9zrEuc1xA PyJbSP5JoFsEjkFZMY0ENB+/tA== X-Google-Smtp-Source: APXvYqycSNEtNTgVc9EBZuUkjuvDVTlF4uWCWZ8DhHDbwtYYrszDaNXZo89BJZ2WkACsE6TdHAl2TA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190603_021409_796579_FF7A688E X-CRM114-Status: GOOD ( 10.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tglx@linutronix.de, mingo@redhat.com, Anders Roxell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Marc Zyngier --- arch/arm64/include/asm/arch_timer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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: 10972613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 219EF14C0 for ; Mon, 3 Jun 2019 09:15:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 110E126255 for ; Mon, 3 Jun 2019 09:15:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 04FC82856F; Mon, 3 Jun 2019 09:15:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A6E7026255 for ; Mon, 3 Jun 2019 09:15:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=aYUUiV7LoceBfRXhK+kMkrlLRyLKNzHlRhtIyNQFPIg=; b=G5sJ0rrb+4EGIe exysj5LubIJ4jqA7pwlFIU5V6n9lz10iRo1Ur7yEYFOmSbJXFN2CIqEUaZG5GyJG5sSl4KzPIz18F nmdfM0hj5r8VULvfzdBoGD4sTT2xtfFg/j2TFKlRrDyG0DO9v09Mtpn2pc277Vk7HGy6a/IAOfj9c vVJW72JOqo+BGlQwbV5LN2YFusnxE0R6VF0UBxTEqxgVbTr2HnVOfZb2SUnz/6rGPjezaerYFRD+Q suKOaFNRTDIsFOCCCyMD3UuuG6KlEwKBa0bJiC7UU2JlkRhDvt5Hfvunlj0zVlt4qGF0FK17CRIOl K/taFF7a2KK0JcUa4Ztg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXj3p-0003XC-UD; Mon, 03 Jun 2019 09:15:21 +0000 Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hXj3m-0003WT-O2 for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2019 09:15:20 +0000 Received: by mail-lf1-x144.google.com with SMTP id a9so11577310lff.7 for ; Mon, 03 Jun 2019 02:15:18 -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=UnGcMuHX1+DYwz8ShcCea4Q2L5YeOVYkDQsKTe9o+H8Kqn5tvHr+eAuiglVxiTAt8E OQP45R1EQQ7T4aYA6UIMY4DX5D9TTyYmFZmMH1y2/H/2Uohvg+FLfRFfQsH+5iQKizV1 omE/ax7opv7kg3O+bvbZAfGV8/g4lk//r4wk0pK+9R3vELUvIC2VPOGndy3Z/BiR6w4Z yy8I2/0myJyGfRRjH2ouAKZ6tc1IA8QnZKRs3Pj6UpXNo9xGYu1J+SbeWrg2W0nMahoy 3qw6z26F66YHPQhvLuc5YPWSdopdcQ7SzHfcZlbi9lhlH76YlZ7+gHNMcWpRju6UH5Fx 8O5w== X-Gm-Message-State: APjAAAUNwov7gqKUGZy4krHNVk8UoIQLgO2SbfQ0EXQdowq4G83ku3S4 C2qQ3eCk08XC9Ke+D/8joP2mHA== X-Google-Smtp-Source: APXvYqwctOBDRg0FjRVPjNSS+OgP9LZF1AQuiSF/Mk+/WqjBT70Z2+BjtM8kSX3oNGhLTa/6lXJf6w== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190603_021518_785160_BEE463FF X-CRM114-Status: GOOD ( 11.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tglx@linutronix.de, mingo@redhat.com, Anders Roxell , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Marc Zyngier --- arch/arm/include/asm/arch_timer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(); }