Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4630518ybi; Tue, 11 Jun 2019 09:44:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqxDhsFvTeuxyXLCKhm37SdRPLz3HwCbamboRDTs2FCH5ojO0LeM6+yJ6RqOo6v8OvMRrBzG X-Received: by 2002:a17:902:903:: with SMTP id 3mr51498900plm.281.1560271446284; Tue, 11 Jun 2019 09:44:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560271446; cv=none; d=google.com; s=arc-20160816; b=girZztjGiAZjVA3T3F8H335bmUTZz9wNre8hXQ0E3N4XRBMuQ0PS4ne/x+n6mKqvWI jUCiE1re1zqSjhWJzfzXKRfq6yPmo2ZXpXugxDxVpMLp0hkhy27EjQ7zaTd9XJ8dLfFf EopZeauPk5g29+xLXV4g8qtUMUqLr0osK5HpFkaTBp6DumnVxTl4KlcWQEutO5kXGtK0 yO0/Pf7//jkp3cFoQ4ldUHhMTLUN3sPvWPizrHPbvR2bATDWYzsMWw8y5f8LAmVG9wl4 vZwQ1DPiR2purhGcMrDj1ARtrSHvtp1NHx0PzrtGF/VAEt5mCMVOUOSUeW2sHTPKg/Ni UmrA== 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=AmyPodx3dEFHhIzDm29UVxOwzPJji7lKWXsA6ODC9hU=; b=scgBGVs5MQMJrvG1RyB3yZK4HMrSz+eF4fsX5UjHhX/TpJR1RW9OTvLJTnnjZhnxIL d6FNDCGWBqjd/yojSNyzrEuy7gx8irYc4rNCimpqmOynsOJtFJ8moxMNoP6qL3FAUbud 3QZ1vGWo+oTX9hhpylWTc2CMYylKoOb92PC/xX4+QsA0+zVuQnpkBsQA18+rutGhDQmA Gj4m84kp0V49kK+G9ZqYeuVJQHzmSeysdn1b87ocQsnsxVsz0cLm7mamzjEx4cdiCJti R5oSN03TkL4n1NCPHNRcJkD0LUF7kd0k5S14AM3ucg+sFTlOIM8jiQkPZYejzGUNYclA T9dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zeBkKyTE; 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 b8si13971276pff.119.2019.06.11.09.43.51; Tue, 11 Jun 2019 09:44: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=zeBkKyTE; 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 S2391775AbfFKPse (ORCPT + 99 others); Tue, 11 Jun 2019 11:48:34 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:35576 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387966AbfFKPsd (ORCPT ); Tue, 11 Jun 2019 11:48:33 -0400 Received: by mail-lj1-f193.google.com with SMTP id x25so7546726ljh.2 for ; Tue, 11 Jun 2019 08:48:31 -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=AmyPodx3dEFHhIzDm29UVxOwzPJji7lKWXsA6ODC9hU=; b=zeBkKyTEAXXRJPbJhaz4mZWlzCvaSGYQQ+u/djfCjlLfFyxrrl8LkrOaZDFCOqLl+u yHr4kT+6shdR//J1JUuN0Fa0iSF4sS6mrgD2GS1ZM5wFdtgRRlPmE3kcvabEjGbE78sB OUnNNUTrXOlD7qwM/b5G3LqRiyc3NA8FkixytFwHpgl4OiRIRxCEJcCnxYhOsQQAyJAN ZQrAKme+bRWXcmUimakHwn0qgxNHMm6JCm7AwRN1Lhs/jw4tOSt8cYMgxhaDCn3/pzrI evXt0DCNk8UrcN7SFJjMhMnpnjTKdYDmIUzODW5pILwlD7ePG9Rc54fEQxJ3r2PHA4eN lkMA== 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=AmyPodx3dEFHhIzDm29UVxOwzPJji7lKWXsA6ODC9hU=; b=ohHL/ii0QYwpTbsPyI1Czy98eY3hw27ujcehdotOdbngio7+j09wW9Y6AzDPQ/D4oe loUV8Xr5qiCGZmloVGei6XdbkYVCT0XXuppwVURkF1hL7xHEXqKoJ+DUwhYmDNKtvjCd njQg1zXb0nBjW9ptBP3aZi2xW/5maADpukJLZvPtfaWB5D4fpa9tlc+uJN1iyZVQvBQv 96UhY52zW07EvbkwELrlXKSZdiUT2xmo0Y0A+ASrKyb/OJUYVxdeXRj6oLFZ7Ms/GKSI y4jXKNRpDeBm3UZ8e1QJflHkgG8W7WHKsnRMFRSyVvLNWthM8sHv22q/lLB7xqYnYfrm W3qw== X-Gm-Message-State: APjAAAU1UAWRRfgRWVkbQ0TZJ5+wcXpVlENX4hVIErKv3Ye4I4wHpFRP r59FgYwo12uo1ahj1x4p4eoI3A== X-Received: by 2002:a2e:8583:: with SMTP id b3mr21954347lji.171.1560268110982; Tue, 11 Jun 2019 08:48:30 -0700 (PDT) Received: from localhost (c-1c3670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.28]) by smtp.gmail.com with ESMTPSA id x79sm2593872lff.74.2019.06.11.08.48.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 08:48:30 -0700 (PDT) From: Anders Roxell To: peterz@infradead.org, mingo@redhat.com, will.deacon@arm.com Cc: tglx@linutronix.de, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH v2] seqlock: mark raw_read_seqcount and read_seqcount_retry as __always_inline Date: Tue, 11 Jun 2019 17:47:51 +0200 Message-Id: <20190611154751.10923-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With the function graph tracer, each traced function calls sched_clock() to take a timestamp. As sched_clock() uses raw_read_seqcount()/read_seqcount_retry(), we must ensure that these do not in turn trigger the graph tracer. Both functions is marked as inline. However, if CONFIG_OPTIMIZE_INLINING is set that may make the two functions tracable which they shouldn't. Rework so that functions raw_read_seqcount and read_seqcount_retry are marked with __always_inline so they will be inlined even if CONFIG_OPTIMIZE_INLINING is turned on. Acked-by: Will Deacon Signed-off-by: Anders Roxell --- include/linux/seqlock.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index bcf4cf26b8c8..1b18e3df186e 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h @@ -127,7 +127,7 @@ static inline unsigned __read_seqcount_begin(const seqcount_t *s) * seqcount without any lockdep checking and without checking or * masking the LSB. Calling code is responsible for handling that. */ -static inline unsigned raw_read_seqcount(const seqcount_t *s) +static __always_inline unsigned raw_read_seqcount(const seqcount_t *s) { unsigned ret = READ_ONCE(s->sequence); smp_rmb(); @@ -215,7 +215,8 @@ static inline int __read_seqcount_retry(const seqcount_t *s, unsigned start) * If the critical section was invalid, it must be ignored (and typically * retried). */ -static inline int read_seqcount_retry(const seqcount_t *s, unsigned start) +static +__always_inline int read_seqcount_retry(const seqcount_t *s, unsigned start) { smp_rmb(); return __read_seqcount_retry(s, start); -- 2.20.1