From patchwork Tue Jun 11 15:21:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Li X-Patchwork-Id: 10987553 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 C748D76 for ; Tue, 11 Jun 2019 15:14:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B5F3E28500 for ; Tue, 11 Jun 2019 15:14:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A979928535; Tue, 11 Jun 2019 15:14:29 +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 31E4F28500 for ; Tue, 11 Jun 2019 15:14:29 +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=w2mTyKWxRh7+y7xY+YD+VcKlLrmnYY1goWvoHILrgXA=; b=QaOinDIcPYTP+L AiPuhi54BxEpJbJGrSRYZSMtdKTbJDBEVXhF01N5B7rHwBcGsQVOfrvA5vdnGTs5b3DZJUHSdEL8M S7sPnq/vk0misu0sZ5UQz9/aF+JDdMQPWll5CwMTeyTsJHOqsg9PuHrGfXta5/nYq7eqeVUofw8Ym Jh1aDAQhvFhKAs76pu09XpxC2mhfVE9TzxGtHOlfAO9e1BbOgQco65SHb4dV0mCZRrWmcv86831Af 09CS92+LE4M2itu+aN5U+LzH5/+dVJ0zxJOyEc+t+kuJnxzksDsv08xMM8SztwKQCiaHrerFcFu0A 9C2cgqXBQmxIfI6asleg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1haiTg-0001SU-JL; Tue, 11 Jun 2019 15:14:24 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191] helo=huawei.com) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1haiTa-0001RC-Ba for linux-arm-kernel@lists.infradead.org; Tue, 11 Jun 2019 15:14:21 +0000 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 5B7A1785BD8CB804D325; Tue, 11 Jun 2019 23:14:11 +0800 (CST) Received: from euler.huawei.com (10.175.104.193) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 11 Jun 2019 23:14:04 +0800 From: Wei Li To: , , , Subject: [PATCH] clocksource/arm_arch_timer: mark arch_timer_read_counter() as notrace to avoid deadloop Date: Tue, 11 Jun 2019 23:21:35 +0800 Message-ID: <20190611152135.44589-1-liwei391@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [10.175.104.193] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190611_081419_136801_3D106947 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, huawei.libin@huawei.com, linux-kernel@vger.kernel.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 According to arch_counter_register(), mark arch_counter_get_*() what arch_timer_read_counter() can be as notrace to avoid deadloop when using function_graph tracer. 0xffff80028af23250 0xffff000010195e00 sched_clock+64 0xffff80028af23290 0xffff0000101e83ec trace_clock_local+12 0xffff80028af232a0 0xffff00001020e52c function_graph_enter+116 0xffff80028af23300 0xffff00001009af9c prepare_ftrace_return+44 0xffff80028af23320 0xffff00001009b0a8 ftrace_graph_caller+28 0xffff80028af23330 0xffff000010b01918 arch_counter_get_cntvct+16 0xffff80028af23340 0xffff000010195e00 sched_clock+64 0xffff80028af23380 0xffff0000101e83ec trace_clock_local+12 0xffff80028af23390 0xffff00001020e52c function_graph_enter+116 0xffff80028af233f0 0xffff00001009af9c prepare_ftrace_return+44 0xffff80028af23410 0xffff00001009b0a8 ftrace_graph_caller+28 0xffff80028af23420 0xffff000010b01918 arch_counter_get_cntvct+16 ... Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters") Signed-off-by: Wei Li --- 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;