Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3921448imm; Tue, 29 May 2018 17:06:13 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJL11yl59mAzT8qQxevRzJv5rDyu8egFrB3wgC6NkYiGXgOfWR67CHmPtZuhj+06aYXCgER X-Received: by 2002:a17:902:b604:: with SMTP id b4-v6mr535303pls.18.1527638773438; Tue, 29 May 2018 17:06:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527638773; cv=none; d=google.com; s=arc-20160816; b=WV3dHDQPLo/cCRpl1AnMd1/7gfB7pjO7+D/ZynPtq6XEoZFfaQq0fCO/I67vVsD6zT OBjPJIPQ4BLW8BlLHnYdtjY+3ebZNTAKkLquhwqkEC9ip/u0vpTXVhs/hcBuquHFGn4O ERJIQh4ceR05bcGjhioPCziElj1sAG/6a0zlww2WrL7TkksO3lD9hg76dE0QZXUYr2RE vsDvHGvLafmmPGuU06org7MUmsPLl0X859xVfwnYyP6BiFk60rZaXWlI6uaekS+xhUsG iATO57GXQdxbCpGI2flvnl5U/mlliBBbWzgYvIwmNe+Nxzcp5qBKMbnJB+Oa2DeMfmUB i1gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=nhJUBisWNkiIeN2N7gA35XwDqBtbPGZ+nZsYdXT8s9w=; b=TiXvG95taPxjb5R9rERe8p+APxrvbrsa6djZoNTfzXYhYzK8HJn9iWL/SSefWCCcdd tGniU4y4cQThJUafsuvv2LJaEh8wluJjBmphxdSDefny4jFQsMSIoGZH1VSuD9nW00Q8 OH+ULDJg/OD/HNJNGSE96HMI9zKNilBtmOeeFJOXE8HtBmKqIuAnRYOrMu9Muc7dIoIc CnHaOkSDoRfMlpRGLajxaaI6Cu6ZMwoSpRQgxMY+J/fXJgwbxRzwVCJugdhcSH4H5WxO fJEcDaStFASFDeHxJQDnkqrXF7jSSAob54sCddUEzF6WMNz8kkslgnq3p8uXIR0DcgFT dztw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=n4HDsPyY; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9-v6si26290230pgv.313.2018.05.29.17.05.58; Tue, 29 May 2018 17:06:13 -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=@google.com header.s=20161025 header.b=n4HDsPyY; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968121AbeE3AFZ (ORCPT + 99 others); Tue, 29 May 2018 20:05:25 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:43800 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755375AbeE3AFP (ORCPT ); Tue, 29 May 2018 20:05:15 -0400 Received: by mail-pf0-f193.google.com with SMTP id j20-v6so8054249pff.10 for ; Tue, 29 May 2018 17:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nhJUBisWNkiIeN2N7gA35XwDqBtbPGZ+nZsYdXT8s9w=; b=n4HDsPyY7SS+wI0NDsceagciIcop0uovQJy5OaZM/kwGj0iaVU9eNdgQcjfS76BtpO 32VT+C8poAMQo5Gv3rnC+xgQa5woAr6Tx3CURJFd28sCNuedXTJXOfi5U3VfG94cjamU P1JTScE52y1vaCnMlDXUym/nXLqwwpm16aIOrvAqkClBZ+W1YTJY8q4Ixur+xQkN6NOG KDUZtPeMI02YgrJ9dnICWWrHjbV5Y6ANyqzVgOZJt6k8IDwmocK8mugBwh7JmHzKrlgh gdH0EMPASOfRnlHoiTWJ9sqmHc1U+eDw8sMhCTHKXTQ+n8VBU+5+ThTSL1nf8CJJqZpt 1pWw== 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:in-reply-to :references; bh=nhJUBisWNkiIeN2N7gA35XwDqBtbPGZ+nZsYdXT8s9w=; b=RiveK5kU1Om3LREePaUVIP6vgD0mv7cWkV64L3JhKwAm8fQAGXgrQ+4R5RgEkArSXQ 7q93ZYXznjwkoPPyULiY0/xKI+llatfQ18GxA1dWLvAwREa29OGrjERyBiMZEiy0vrbK 3wzGUSdf2WLfd5frqBI3hG8OxGBr0F+BrmpeZr5/X8jNlIz1gk7Z5JxkIUhPJBzUDYZS 0gM+ssEeEqwQdaZJR3k7LxxmkRrpdA2BSaRzv4skr9hZqP72rL3FuGH92TOtdCeRo4sc OeYr0nQHxPJclByJp6LnJCBQ+JSdOjcZ50cmdsY31qkUas2RTl9IevE1Rz8wMySLAbPj ys9w== X-Gm-Message-State: ALKqPweROBAo9rrglXqdLU/52zxG5RwDVKIrO1OTTvdyFnVzTnxJN5Vi yl0eKbR8GmJqmcOc7dhS57umoh4v7GQ= X-Received: by 2002:a62:3e11:: with SMTP id l17-v6mr517556pfa.18.1527638714727; Tue, 29 May 2018 17:05:14 -0700 (PDT) Received: from joelaf.mtv.corp.google.com ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id w12-v6sm86979211pfi.158.2018.05.29.17.05.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 May 2018 17:05:14 -0700 (PDT) From: Joel Fernandes X-Google-Original-From: Joel Fernandes To: linux-kernel@vger.kernel.org Cc: kernel-team@android.com, "Joel Fernandes (Google)" , Boqun Feng , Byungchul Park , Erick Reyes , Ingo Molnar , Julia Cartwright , linux-kselftest@vger.kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Namhyung Kim , Paul McKenney , Peter Zijlstra , Shuah Khan , Steven Rostedt , Thomas Glexiner , Todd Kjos , Tom Zanussi Subject: [PATCH v8 3/8] srcu: Add notrace variant of srcu_dereference Date: Tue, 29 May 2018 17:04:55 -0700 Message-Id: <20180530000500.257225-4-joel@joelfernandes.org> X-Mailer: git-send-email 2.17.0.921.gf22659ad46-goog In-Reply-To: <20180530000500.257225-1-joel@joelfernandes.org> References: <20180530000500.257225-1-joel@joelfernandes.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Joel Fernandes (Google)" In the last patch in this series, we are making lockdep register hooks onto the irq_{disable,enable} tracepoints. These tracepoints use the _rcuidle tracepoint variant. In this series we switch the _rcuidle tracepoint callers to use SRCU instead of sched-RCU. Inorder to dereference the pointer to the probe functions, we could call srcu_dereference, however this API will call back into lockdep to check if the lock is held *before* the lockdep probe hooks have a chance to run and annotate the IRQ enabled/disabled state. For this reason we need a notrace variant of srcu_dereference since otherwise we get lockdep splats. This patch adds the needed srcu_dereference_notrace variant. Reviewed-by: Paul E. McKenney Signed-off-by: Joel Fernandes (Google) --- include/linux/srcu.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/srcu.h b/include/linux/srcu.h index 2ec618979b20..a1c4947be877 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h @@ -135,6 +135,11 @@ static inline int srcu_read_lock_held(const struct srcu_struct *sp) */ #define srcu_dereference(p, sp) srcu_dereference_check((p), (sp), 0) +/** + * srcu_dereference_notrace - no tracing and no lockdep calls from here + */ +#define srcu_dereference_notrace(p, sp) srcu_dereference_check((p), (sp), 1) + /** * srcu_read_lock - register a new reader for an SRCU-protected structure. * @sp: srcu_struct in which to register the new reader. -- 2.17.0.921.gf22659ad46-goog