From patchwork Tue Oct 9 11:19:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 981149 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rasmusvillemoes.dk Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=rasmusvillemoes.dk header.i=@rasmusvillemoes.dk header.b="BZKFZX3k"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42TvwZ2tNxz9sC7 for ; Tue, 9 Oct 2018 22:22:54 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727007AbeJISgy (ORCPT ); Tue, 9 Oct 2018 14:36:54 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:42134 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726160AbeJISgx (ORCPT ); Tue, 9 Oct 2018 14:36:53 -0400 Received: by mail-ed1-f66.google.com with SMTP id b7-v6so1310597edd.9 for ; Tue, 09 Oct 2018 04:20:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QbKzguH8Zx9359J1RlWTzJqi3SVOndEcPSlJxthaAXI=; b=BZKFZX3kE5/4CGxbfhZXCy4luEK+JAMy5hu60rUfh7+b2sLIAN/4gKsmO0QsXv9gQi vwPjJIwjQk2pcyh/2vrdvoVKBS2okDoBhtgxZzBGEmpTGSQtxnM+okgGpJrXJwqQU0kH QkYiDPi8ZlLCXCFA/FtXGgIiTyJgvPqoH4nIg= 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:mime-version:content-transfer-encoding; bh=QbKzguH8Zx9359J1RlWTzJqi3SVOndEcPSlJxthaAXI=; b=hYokyJLhmynGdImESweiHrUgzTxTPd3IhIIpCKlogtVMPXf1NiN6Yp2dDkQ6ivQaLo RWpS2ULzesPyav9DuQeya7efvJ79QDBLExmo6PMDp49gfAcyRnkA5KyLPIzQazlcxJvJ 6RJui2YnWbYByCqL1IBU0FLC5yxq50qlyLSaLCqrUK2bCRp1F6Adv6GDYvhnc7Vf4GnU BwYYXi7dD6zOaBlpSNUMLICFzQlS11LWzAXq6nw1WXY/FOJLj6MBDNjbp5s6DKKxTNLn UEmoMcCGZuBUqm1uXH3Y3OkMENz/SslvezJcMOPOcGLqgOJu0i4iAbG9eVH152x7GqL7 uYCw== X-Gm-Message-State: ABuFfojxO0VlN37kfH/S9aDIbOF+3NVrG7ovUHEwQKIm0DPKw6xQFkGI mYhueKLKwiSWsPeM/sD1bY8R7Q== X-Google-Smtp-Source: ACcGV63nh+tkQJsPZhUid0UDS0NJ1b2veQavTmmA/qT9cMjUQV/veSwTk9llGE31VtByM0z3mpG1EA== X-Received: by 2002:a50:86fd:: with SMTP id 58-v6mr2495214edu.15.1539084023344; Tue, 09 Oct 2018 04:20:23 -0700 (PDT) Received: from prevas-ravi.vestasvisitor.net ([193.47.71.171]) by smtp.gmail.com with ESMTPSA id n23-v6sm3595821eja.41.2018.10.09.04.20.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Oct 2018 04:20:22 -0700 (PDT) From: Rasmus Villemoes To: Jason Baron , Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , netdev@vger.kernel.org Subject: [PATCH v2 03/23] linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited Date: Tue, 9 Oct 2018 13:19:53 +0200 Message-Id: <20181009112013.14238-4-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.4.g721af0fda3 In-Reply-To: <20181009112013.14238-1-linux@rasmusvillemoes.dk> References: <20180919220444.23190-1-linux@rasmusvillemoes.dk> <20181009112013.14238-1-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org net_dbg_ratelimited tests the dynamic debug descriptor the old-fashioned way, and doesn't utilize the static key/jump label implementation on architectures that HAVE_JUMP_LABEL. Use the DYNAMIC_DEBUG_BRANCH which is defined appropriately. Cc: netdev@vger.kernel.org Acked-by: Jason Baron Signed-off-by: Rasmus Villemoes --- include/linux/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/net.h b/include/linux/net.h index e0930678c8bf..651fca72286c 100644 --- a/include/linux/net.h +++ b/include/linux/net.h @@ -263,7 +263,7 @@ do { \ #define net_dbg_ratelimited(fmt, ...) \ do { \ DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt); \ - if (unlikely(descriptor.flags & _DPRINTK_FLAGS_PRINT) && \ + if (DYNAMIC_DEBUG_BRANCH(descriptor) && \ net_ratelimit()) \ __dynamic_pr_debug(&descriptor, pr_fmt(fmt), \ ##__VA_ARGS__); \