Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2951831ybi; Thu, 18 Jul 2019 17:59:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/DwozVVN0sGFBnvHPO0hgXxaZWP1lr2/c4BisxerVIfr0evRj2iXfE6wXETvKNFZS66tu X-Received: by 2002:a17:90a:26ef:: with SMTP id m102mr53637301pje.50.1563497992243; Thu, 18 Jul 2019 17:59:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563497992; cv=none; d=google.com; s=arc-20160816; b=CFQJ2l2hY5KYN6qmLBkRv+dPTa0cub8+atiuWLoJw6TL6T0Pgx0knyhOeVf42q4j1g 3s5hVZififWUcb8fHLZSd8cF4BYtuUf0jNlSgzAZLny3V6MtcItp8w+oqACyS+33OzPW 6IaSN/ce6G6bIFtRBmlgFnnMbnN0ZLQbNAwErBMb9lldJhWFffd8RO3+RLdhwaJ+NLMe QkvsMFj5+YF3rNas5qUBwjguepbR/5EkZ9j9j1piWI3x+wfuuHSUiPkZeQ1LaGRSiJu4 8y+pniKYWRd4661B7GN6MUq9I7KKiN/MNwDbQFR8ZdQSUU3dxETHX8GSwhu9CGNnhU9k nLtw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yjgylcrTL5oyKrI42SHzoTCEiC3xG7heV6oUteyqMZI=; b=B7MEOkTX848zNhroxlkTVLEz5pulL7ROPxfyqnQgdqTsnGMshAw9ixOwOr0JdZhyG6 JTlmsKv6gvIAfGrQqi6vr90pMt90FPIfPDsUDIif7MyN2E1hdhNMkCGGK8KLktHdkuPt uHgmqp3GTJe0IKiOuJI5bE9wu7T+4D5EPqlSE+De1jdGckXrOGy1ANoe3iqWXAJuBo54 7Iy8/PXy/Tx8R9aI4Wa2uLJSuubEjdwhE0MqxpHADQJTjW5pwPZ0u6M4hfcj/ez5mTP8 etwyLR5/W5u5VUxRJng9MHmg4WpjRaHbAoVbTLhNovlo/bg1+XojugVnf027vSA7OKO6 N4Wg== 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 e96si170947plb.123.2019.07.18.17.59.36; Thu, 18 Jul 2019 17:59:52 -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 S1726641AbfGSA7L (ORCPT + 99 others); Thu, 18 Jul 2019 20:59:11 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34618 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726571AbfGSA7J (ORCPT ); Thu, 18 Jul 2019 20:59:09 -0400 Received: by mail-pl1-f193.google.com with SMTP id i2so14761140plt.1 for ; Thu, 18 Jul 2019 17:59:08 -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:mime-version:content-transfer-encoding; bh=yjgylcrTL5oyKrI42SHzoTCEiC3xG7heV6oUteyqMZI=; b=PhXkjIWGqizFBW8n8mO4IkpTSwz7iFtzWPInC6vYyRmE8AWrQtRyqWX+2kY2SWui/J 3LXxAhaE/5dMdky/GE01h6txLsmbcgsjPc1WM/jTpCL7RVH4a132t2DzFIunz3Ln5ru8 mGmuPgV/y/O0P5/Ublvinc/bqUVP9tst1dLQYOk1ft68ylwJyXEsKQKN6anKMwN5aiPk Ga+H0A6wC/YdN3OEnwSEwXT7FD+YleRNDAo1naOmBt7/iUNKKwrg7hQR17y+e2jh12V/ 9JaNz+EonnMUsfA+TWgiP1CaO6ChQ5TxOilKbCZldW8E//Hd49ToY8fW7AizF+/92rfQ borA== X-Gm-Message-State: APjAAAUjenTazAmnFt7sPeJvVI+SP51cH0TP7+sgs9Iv95gr1BAY9ZxL 3hticjYfl03zw54CWMqrRxc= X-Received: by 2002:a17:902:744c:: with SMTP id e12mr53133801plt.287.1563497948205; Thu, 18 Jul 2019 17:59:08 -0700 (PDT) Received: from htb-2n-eng-dhcp405.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id j128sm14025166pfg.28.2019.07.18.17.59.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 18 Jul 2019 17:59:07 -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 v3 7/9] cpumask: Mark functions as pure Date: Thu, 18 Jul 2019 17:58:35 -0700 Message-Id: <20190719005837.4150-8-namit@vmware.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719005837.4150-1-namit@vmware.com> References: <20190719005837.4150-1-namit@vmware.com> 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 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(). 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 0c7db5efe66c..6d57e6372b9d 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -211,7 +211,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 @@ -228,8 +228,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.20.1