Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp513170ybi; Wed, 3 Jul 2019 00:15:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGjUk1rCld9HdF78J9KlmmvsmTO+wWW3SUDx/E/wI/3tQq5BVmMrvEWgub0dyo2vmMAs0b X-Received: by 2002:a17:902:aa5:: with SMTP id 34mr41893038plp.166.1562138122244; Wed, 03 Jul 2019 00:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562138122; cv=none; d=google.com; s=arc-20160816; b=jaLQQcOIlbQ/Fm0RyQ+GpG1XEY0PGhnhANBvgYkP6S862cFuM/LIJZ0s4JWFt51E+W dGNIJpelXzHxNSogRC2QWUqdyE+zCE4Xv+2wLoE6UH3RHAa+vVhjJNkslZ4VBRAt200E AjzFp+AxzirEmjoTDdhzca4FIPo4BMv+Z+BtyNSBk94OJYhZZvLGKZiA8ugQzq9Cnh9R qBgB8g2QcU5dZ/XVSDsOPHuQwalBkkopGat5GPWBYDSqFQVqxGpi8kxPvCk0DTHT06/7 0wv27rZuJAanqW7mhkcOolo+NtX4qa0UakFbQx/NPJmVpNFyMnMCfPZS303gTe4oKB/q fnwQ== 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=VhTZ18hX0yEenw77Q3E7kjklW3RIcvPLHLYFnzx8tTo=; b=uj2djBzwRsG8O7N4npxnBVvvLN19DLD6vYS3kFOqXJO17fw8r2A16EtCHKwSffQf/o G2ysKhTU3ZS5UkNs6dhVOiMMSkuI7YHLXA6QpEdMJGju84M0l2WmK9/34uv4RCgKZO2v /V+QiUFhUm7fzjj1QI24Iq7ROV7rbfpA0a87oB5IZPJrr8HkP8J3/K4ivs377Pe6GSqu tnw19cx7ZiYP1kKDfNclS4DfWltHWhyYfp8GvUdnpUDtuIBPxk7vyFTkf/FkdhvarIgt PM3iHo/6Hqmwk2BC7gzJ16E+YtGycKz+IWWgAQELCAMuVwwOwdbDW4cZ2MY7gapGtOTt Qjjw== 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 b24si1469733pfd.156.2019.07.03.00.15.06; Wed, 03 Jul 2019 00:15: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; 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 S1727204AbfGCHO1 (ORCPT + 99 others); Wed, 3 Jul 2019 03:14:27 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:33050 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727281AbfGCHON (ORCPT ); Wed, 3 Jul 2019 03:14:13 -0400 Received: by mail-pg1-f195.google.com with SMTP id m4so738195pgk.0 for ; Wed, 03 Jul 2019 00:14:12 -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=VhTZ18hX0yEenw77Q3E7kjklW3RIcvPLHLYFnzx8tTo=; b=FntETGZypFmNQf29s+82sGEL/0SLzDgQmDa+DR4SOkXAjaHG+p32B/p6SORUaFSoDq F5o426SEdwguoO1QtmSgLl6LIf/Q0s84UTz7xZFtN/imRbh5EaZ2JItm/iWiCK2N7j30 aoY78ZBJrboSMgpI5bDV02gTmJmzL1taqTRd3C4zjAIaU+xZF1BVkMnXX6sPdc0Qd1Dr 518oGydyELmcsT7EGcDd8ktOp2d9VC+O8dNIwrSpegDkZJycsHoI4Om5Dqsfqt+PJnTP SVGMSh5xkCY/3giU5YzwJuO2kp606WbcesbAIztofJdQCxHI0EYJsrv7TC66HlzZmsma zE0g== X-Gm-Message-State: APjAAAVZzLoUDZLchf0RrBMdg5gL2w5J4w4JnT14WTnlry2/lwQWNDFo V/KIhrOdbg4/SWeXDR9cXRE= X-Received: by 2002:a65:4786:: with SMTP id e6mr26980658pgs.448.1562138052234; Wed, 03 Jul 2019 00:14:12 -0700 (PDT) Received: from sc2-haas01-esx0118.eng.vmware.com ([66.170.99.1]) by smtp.gmail.com with ESMTPSA id j21sm1256593pfh.86.2019.07.03.00.14.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 00:14:11 -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 v2 7/9] cpumask: Mark functions as pure Date: Tue, 2 Jul 2019 16:51:49 -0700 Message-Id: <20190702235151.4377-8-namit@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190702235151.4377-1-namit@vmware.com> References: <20190702235151.4377-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(). 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 693124900f0a..8decc46ca0ce 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.17.1