Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1545394ybl; Fri, 23 Aug 2019 23:04:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwX731JUeUgOQEn1tcb1oOy6T/jJ2zynsSLyY3gS83YZE4ltKgNP+tyiIwUnhaPGbwOf+j1 X-Received: by 2002:a17:90a:ae15:: with SMTP id t21mr8864539pjq.50.1566626665034; Fri, 23 Aug 2019 23:04:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566626665; cv=none; d=google.com; s=arc-20160816; b=U7EvorkmP3pNB+X1CRHyySBSqW25nHmVYiqExFySgElCQ0X3GEpe85G4ykxEu5+ilA 8HbBxnnmyuvLxIZ2+pMinRQ83ZyIllK6cP9PDKIGgQvfwCU7zIw3z1fAO9w+H2CC3EYZ LN9MVW6jd46DYmkkrSLBIykVyWZaadlusQYXKvbr0CXPWHscNdozdpsAzU7h8U/6YVJ4 76KtmHTO7fdvaZYkB2xonYKcNHJ1xcLncheRMhiv7GrKRmEwbawh35PhCgeZWc4Cgg9p PIMSHRtldcdisOqF8GuRmDzX1HdGavLflxGvWhgdyQCs75tTyflrn76H6U6KGQ/+FM7r clnA== 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; bh=JW1I/e1f0li5uTuaaXr1L7jto5OSOJdjz8Xl7/i+z+Q=; b=iAtxeoQqB+66KQ3IXfSCxIgthdHCTopsCKY5d3R6nZyyL+9TZjhK9hioYynGIa7ZIn ZIsujxVSDzqZ4Jbwm7B2TiAAfGPj8M5y9SnzwRJz5jMg1mWQ2gW0Shl2Yhet9rTb6hkN CPnGlx3Qh2VlpLuLfnV8xLeRMwniJ3K0WiCFEq1GJK1oGp9NsnvM9Ov12fyDIvuxdq0n CfiKWwFKpQ83aGgklL/SxMUxpe1aTaDFe+g6xtnGR95Jpz218UqwKODFIFgdNJ+X+vNV hX1HMIBCPwW5aWuaEGdnTplL+tF7fhNHdUv1w5QMv8evLmI6vWSsB8yhAyB41UN31Tqb oOnQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6si4797275pfb.230.2019.08.23.23.04.10; Fri, 23 Aug 2019 23:04:25 -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; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727346AbfHXGDB (ORCPT + 99 others); Sat, 24 Aug 2019 02:03:01 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:39558 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727117AbfHXGCy (ORCPT ); Sat, 24 Aug 2019 02:02:54 -0400 Received: by mail-pl1-f195.google.com with SMTP id z3so6896000pln.6 for ; Fri, 23 Aug 2019 23:02:54 -0700 (PDT) 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=JW1I/e1f0li5uTuaaXr1L7jto5OSOJdjz8Xl7/i+z+Q=; b=iEyYEMSsaJKGZtHggclB36vX9RKYIo/tL8coiMZrfoOLYHZcKD88YJtyCy8//T0auC TGurdobIyJYsmXZ0VyWY4u/YBgLLpCdvfDbaXjTL6rJoIyxwsqVAjFwDkxxPM7L7CPfk fsfgAs3SJgCqKf09OHSrDdImDJrlyBV/Xr2sFH1ApE7uWPg/zqRa+otwDJnbID7ogPFI 7NvqtY1kjhGMG0erL/+XD1HBilWy8cHPl9B8fJFzJ7S2pjbPENOX0nijczc/1hYBjmDj KISa+U6dPl2zoh+gy7VCbosp2g2Nmodzp+/3ycqbYVda/D58JUTfMdzuh+Ie8S+2ZEwI iklw== X-Gm-Message-State: APjAAAUJLqD4fMbm5r6yTAhk219x4lQT6Usv5i0lCLvPoRkTGiZHfP5R Us2FhfHK4L6auUdKjMhb7m0= X-Received: by 2002:a17:902:e413:: with SMTP id ci19mr8717199plb.256.1566626573758; Fri, 23 Aug 2019 23:02:53 -0700 (PDT) Received: from sc2-haas01-esx0118.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id i11sm6505645pfk.34.2019.08.23.23.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Aug 2019 23:02:52 -0700 (PDT) From: Nadav Amit To: Andy Lutomirski , Dave Hansen Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Nadav Amit Subject: [PATCH v4 7/9] cpumask: Mark functions as pure Date: Fri, 23 Aug 2019 15:41:51 -0700 Message-Id: <20190823224153.15223-8-namit@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190823224153.15223-1-namit@vmware.com> References: <20190823224153.15223-1-namit@vmware.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org cpumask_next_and() and cpumask_any_but() are pure, and marking them as such seems to generate different and presumably better code for native_flush_tlb_multi(). Reviewed-by: Dave Hansen Signed-off-by: Nadav Amit --- include/linux/cpumask.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index b5a5a1ed9efd..2579700bf44a 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -225,7 +225,7 @@ static inline unsigned int cpumask_last(const struct cpumask *srcp) return find_last_bit(cpumask_bits(srcp), nr_cpumask_bits); } -unsigned int cpumask_next(int n, const struct cpumask *srcp); +unsigned int __pure cpumask_next(int n, const struct cpumask *srcp); /** * cpumask_next_zero - get the next unset cpu in a cpumask @@ -242,8 +242,8 @@ static inline unsigned int cpumask_next_zero(int n, const struct cpumask *srcp) return find_next_zero_bit(cpumask_bits(srcp), nr_cpumask_bits, n+1); } -int cpumask_next_and(int n, const struct cpumask *, const struct cpumask *); -int cpumask_any_but(const struct cpumask *mask, unsigned int cpu); +int __pure cpumask_next_and(int n, const struct cpumask *, const struct cpumask *); +int __pure cpumask_any_but(const struct cpumask *mask, unsigned int cpu); unsigned int cpumask_local_spread(unsigned int i, int node); /** -- 2.17.1