From patchwork Mon Jun 3 09:10:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 165595 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp4211063ili; Mon, 3 Jun 2019 02:18:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqy6NIrDE7CVD0zfVMpn8cK1BxywBYIB+41R+V+LX0aB7mZdKWywoWVHx7hg2s+c+kMMNJET X-Received: by 2002:a17:902:2e81:: with SMTP id r1mr28606153plb.0.1559553502562; Mon, 03 Jun 2019 02:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559553502; cv=none; d=google.com; s=arc-20160816; b=jrwm0cDkeoyyfKBaS3B72vlQR6dMfgPe4tovMS4udZCDDAbB/KlzokaCXjpN0D3hnV kd0+RI0uEgZ2X8lI7ULV6ldiLi/e0zt2LOMYceSaoKnC7bI52cBK3qKQv6DCSF0HsFkS 7sbU+U7875YL3M3vIY6qll3RXmJJ4xssOPfsOFM/BmeXbBWd8fKQ9f2LCbyx8evDg91k skr35RqIYBP8BrFC0XYXRb1zbEnI0bE4LeyMiCxUPMD18BPAMWf1mYPDwBFlP9FrzKND 0wn1dKYcnHX/GoHTKHLxaJcFcDMpPJ5SHV9CHaZowM4RQP3QD6gsQTgHhuUgomEeWaxR s7Vg== 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=Uxh0FCdCreUcf8edEoivfGm7FzgDoHFgRVdGAU1FrgE=; b=O81AUaJf3yO4qkyoWa/3LTZLK37otcWwz+h7aeVoB+BvsDVKoC/qiVt81OOYe0sZgq GSKydboPeQcFWyZTSRf02NNEK3W9YG4CTiFX+549ZkKdD+s3nTbHq2GJKXtrexgI/oML tud/jL9SicO4i6V4Id5564yYzTFKJC6ymVqDpyL8nfoKUiXld2Iz0yhlOOEJ5FuRJNxg tan4xXjua5PmPBEp9U9+37PHozLmD/OBmB9wEAyFt/020xcdEQP+chYuw2RC41YY6W38 Aa97jnrVOAt9xo0tHxAPkSM1fudDRr1lIdpWMO9pqmdLX6rJz4PMH/GgARz2AuE9tUsB HQWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pQWSMaiu; 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 f40si18532441plb.375.2019.06.03.02.18.22; Mon, 03 Jun 2019 02:18:22 -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=pQWSMaiu; 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 S1728967AbfFCJSV (ORCPT + 30 others); Mon, 3 Jun 2019 05:18:21 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:41584 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728130AbfFCJK1 (ORCPT ); Mon, 3 Jun 2019 05:10:27 -0400 Received: by mail-lf1-f65.google.com with SMTP id 136so1456482lfa.8 for ; Mon, 03 Jun 2019 02:10:26 -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=Uxh0FCdCreUcf8edEoivfGm7FzgDoHFgRVdGAU1FrgE=; b=pQWSMaiuB4YPTpJ/jxzXOdfiEwulhfBjsDe1AH0XsM8ITR0LE9Bcq8Mqt8tJCpqT9a QnJy/6ks/G7ewIr4OMXXZMLxZH5SN+8lDFgnDRTnnGBL1QrIKX8i8j0s9dXS4NOfb19x up6RV847HDIar9anNx6PuMX2seb39MVDXlCP1gySCczqYGU6kBzk8fHUCGHaRGOHyf8W yvVD2mGfeXvGO8ZxqbpAF/YgP8IoqY+Cdx7Qk4BpNx6FS1Ir26G5UcAKoQ27J+9rjnPM BcaquYDFucepeZxq9ZXB2pfz6Pa5thNOMaw0kfMCRYqCFveI3YSdYMrwORv9t99PC/4l 2Hog== 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=Uxh0FCdCreUcf8edEoivfGm7FzgDoHFgRVdGAU1FrgE=; b=UvLmVQUHnkAhe8tNqp1o4wgD9d44QOnJfYxjSiXA7h8qp85ZjVi/y6Dbj9gRwAkELY CtKrURGawbVV2Np33eThux66pi/eZ6sH94EUTk9UUCc5orVtz5RZdkMxQKf1hhIDjahc NLjq9vzu19gwgYDdAqTu68L/ZEPGVwIrufjWHe084lRjuOJ6AUUHHiDOvCXAjv7s0hTw aXfuJuxYcXcyMZkum3A1hTsXwZ0ymfp9x7RN2mwBBBT9osmsOjhnQKVDbTwPZFdXBg76 7+3+VkoiQjY3QgM7i5T5R2KRRkg/948hAS0jNOC5oKlpHIf83kT7wi00w7BNtBjlDHBD HAXg== X-Gm-Message-State: APjAAAV1MVi0hNciqSDaSeI6rTiORXU45A/qO5i1we1CQ96zcdywtP5N PTcrXHCHZfnQ4SN1aTLQrmcZ6w== X-Received: by 2002:ac2:4c84:: with SMTP id d4mr12944955lfl.1.1559553025224; Mon, 03 Jun 2019 02:10:25 -0700 (PDT) Received: from localhost (c-1c3670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.28]) by smtp.gmail.com with ESMTPSA id g11sm323757lfb.9.2019.06.03.02.10.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jun 2019 02:10:24 -0700 (PDT) From: Anders Roxell To: peterz@infradead.org, mingo@redhat.com Cc: will.deacon@arm.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] seqlock: mark raw_read_seqcount and read_seqcount_retry as __always_inline Date: Mon, 3 Jun 2019 11:10:08 +0200 Message-Id: <20190603091008.24776-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 sched_clock() in kernel/time/sched_clock.c is marked as notrace. However, functions raw_read_seqcount and read_seqcount_retry are marked as inline. If CONFIG_OPTIMIZE_INLINING is set that will 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. Signed-off-by: Anders Roxell --- include/linux/seqlock.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 Acked-by: Will Deacon 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);