From patchwork Wed Oct 28 13:11:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 55686 Delivered-To: patch@linaro.org Received: by 10.112.61.134 with SMTP id p6csp112695lbr; Wed, 28 Oct 2015 06:13:50 -0700 (PDT) X-Received: by 10.60.62.100 with SMTP id x4mr31403701oer.14.1446038029664; Wed, 28 Oct 2015 06:13:49 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id e141si27489445oig.125.2015.10.28.06.13.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Oct 2015 06:13:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro_org.20150623.gappssmtp.com Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZrQWq-0006Q0-CB; Wed, 28 Oct 2015 13:12:36 +0000 Received: from mail-wi0-x235.google.com ([2a00:1450:400c:c05::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZrQWe-0006EL-3O for linux-arm-kernel@lists.infradead.org; Wed, 28 Oct 2015 13:12:25 +0000 Received: by wijp11 with SMTP id p11so254757809wij.0 for ; Wed, 28 Oct 2015 06:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro_org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1Aw8R/Bhnvvktj+Ob06iLZLbnBrW+v5mbS05Foi7ZeY=; b=tzmG3Qpd34NZHTf1a3XGi9OsumbX7QEguuJiWdeM5sbe7/bOLbBrRIET4WK0N09Qta guH270SzCNzfyRpx+UniAYEGoJ0qxsZcmqEyDKPdxMSOa9FLVbZqvFkBLlCsP1MKHyfa WJ/0VJyzuhs4A0Fx4i4mPHsxY4uw+Yp7sxDQ3hULtem1EImK/neDmsl4Y1PRGZej886z VCi8tXzvJM3hbNeNwNGXkaIuuf+PggVwX7NESmP3KBOylmcBFtf/NKb580dUeGp7o5sc UStGZIm1QcKjMMglWadtXLLQFEyr2UCO51J3ig/LdqkmPyIIpkFsfNDBBMRpCa98PY4U a7YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1Aw8R/Bhnvvktj+Ob06iLZLbnBrW+v5mbS05Foi7ZeY=; b=OekcBsvPXRN+kmwIGaEL38pJb8Cmqia05J4HcUhkhnyaq6SusIriDGVvFsqvlwqSW3 sOKrLO9O2dUgY+p7fYQ8upv8zZuwggI3GwStVTBAw9QKd6GX5EFLeI6/TFAoBmA4jD8Z t7bjQFYLrDz/KMnD9WVRUO0ffzjneonjrWkVcpRuzbv6T2/rAllk2EhoB6afLLpbzY+b Tl106ivz7yJokJUDMASEeg8zSzm8xoPElGFtQe3GG8NSdCI6anZ9Zz+WUkitoYxHWY8z S353NUkY/v+wDmiYL/pC6rWy1HAq4JQP36tWR/06T5sHYaqZZ/QLvbd81zkS6RaAJ5AE VCWQ== X-Gm-Message-State: ALoCoQlJ0lm+3tFOHb2/ZEjmSyFcD1qpvZJn71Dim5BIgIhhvqk+wEBAc3TgeNVH4uuV+uBaNlG7 X-Received: by 10.195.18.6 with SMTP id gi6mr6164058wjd.47.1446037922727; Wed, 28 Oct 2015 06:12:02 -0700 (PDT) Received: from localhost.localdomain (sju31-1-78-210-255-2.fbx.proxad.net. [78.210.255.2]) by smtp.gmail.com with ESMTPSA id lv4sm49967344wjb.43.2015.10.28.06.12.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 Oct 2015 06:12:01 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de Subject: [PATCH 4/8] clocksource/drivers/prima2: Prevent ftrace recursion Date: Wed, 28 Oct 2015 14:11:29 +0100 Message-Id: <1446037894-22601-4-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446037894-22601-1-git-send-email-daniel.lezcano@linaro.org> References: <5630C947.4020706@linaro.org> <1446037894-22601-1-git-send-email-daniel.lezcano@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151028_061224_359902_2C20ADA3 X-CRM114-Status: GOOD ( 11.68 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c05:0:0:0:235 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jisheng Zhang , Barry Song , "open list:CLOCKSOURCE, CLOC..." , "moderated list:ARM/CSR SIRFPRIMA..." MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org From: Jisheng Zhang Currently prima2 timer can be used as a scheduler clock. We properly marked sirfsoc_read_sched_clock() as notrace but we then call another function sirfsoc_timer_read() that _wasn't_ notrace. Having a traceable function in the sched_clock() path leads to a recursion within ftrace and a kernel crash. Fix this by adding notrace attribute to the sirfsoc_timer_read() function. Signed-off-by: Jisheng Zhang Signed-off-by: Daniel Lezcano --- drivers/clocksource/timer-prima2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/clocksource/timer-prima2.c b/drivers/clocksource/timer-prima2.c index 78de982..2854c66 100644 --- a/drivers/clocksource/timer-prima2.c +++ b/drivers/clocksource/timer-prima2.c @@ -73,7 +73,7 @@ static irqreturn_t sirfsoc_timer_interrupt(int irq, void *dev_id) } /* read 64-bit timer counter */ -static cycle_t sirfsoc_timer_read(struct clocksource *cs) +static cycle_t notrace sirfsoc_timer_read(struct clocksource *cs) { u64 cycles;