Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1440338pxj; Fri, 21 May 2021 14:29:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxV29sk7VMhgGj4gZie5JeHoPjwmfCFTH9EG3VgcNNE5CKD+uuYYP7uIfyhULPFD89nSFuj X-Received: by 2002:aa7:d2d4:: with SMTP id k20mr12939803edr.384.1621632590101; Fri, 21 May 2021 14:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621632590; cv=none; d=google.com; s=arc-20160816; b=oTgFBN9W5dEaQaqv1ebn1bogOp5z9EK3BHbipIah3aT+fFE/ezfWpPwQ1RcMG683OG oUXVcVjtZAYw7gF4A96MxiDmtAG4Y99hgmLEnaGZdkxae6XzEwtn7PJMA6RE4LhFD1eW muUieSdny6DsU1aAlcjxMmgRJViKe5cQuVRa3/yLmWXfd26LGVuCE7yi1c9VOdRpsdfG 4cwpVoVQvqhC5Y9tJ7kMDCXf+rLBbBalJMhHr+fVFuzBtczt9jwWqeGQTNgqzGwL4IYZ YCHKmF3qjayLbGDt2XsPmjb4h7Gn8yokcle/n7WjFPvJ+5nw6TRyqvHaLjuzPXVJZuU0 3+NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=PlWT/h/uFlRbuF6+X3hEtWq9PabKtBmphm+LVJuqNQk=; b=CUxAr0CVgC83pC5j+oQlKqU+A2p2StgTaJf4xwuVSPVyb2AB0uQMG3rzYsvGUgjKoV 9/YDnNkAg57QtwTBu6eHPoZFg71QS6DPkFaF6AZQjHV/uX08Y7j2dlJi2fb7SB5eJmva 5SzTGznlRJlId2JF7JaBOEbeTVmk6N4n/8IE27FcqHgQTvqF5x9RrM0tkCJJ8eTfcfZm /Rh01fglMPcyf9LOxW9KubkzY3L1FXbw2N1yDzhI6j4dnXL3WYxIIa1ckPkRr28yM27x Mxy+KPS7y0DNs6xAYf2pQzplPmNI/D9GpEpMm0UXnCutmMVQL3jCmJKNXhGf2Gzez6UK uKZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mumXUlDr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca24si6069065ejb.289.2021.05.21.14.29.26; Fri, 21 May 2021 14:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=mumXUlDr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230031AbhEUUAp (ORCPT + 99 others); Fri, 21 May 2021 16:00:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229932AbhEUUAp (ORCPT ); Fri, 21 May 2021 16:00:45 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8626C061574 for ; Fri, 21 May 2021 12:59:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=PlWT/h/uFlRbuF6+X3hEtWq9PabKtBmphm+LVJuqNQk=; b=mumXUlDrNRn9c9v9ouEjIXw0o1 xf4CMIfuWVLlKf3dE7YR5RC4Q8pdRXyYILl+uyGZe2aHLImdsqeC3OsUcybEuwRZPDJ/4Bgq6Bv+T BGJahU7pUTHDy7waI3PIBUXg/xmEg3Eoqp0xyMjt5w15uukc+F6bXVPhaEfjVgAsFW3C2u81PL4rJ rVJlIfBBCjKaC7n0RhWVN7hWBC2vRtfsMaINu7xFf7LUQ7mWtb3tB/gHLeGRYY53IpHDKz31ppLoP mSFSYNIaXgNNYC3J1pIRNKwswQ16If/a5/Hutq7TN+W8uanGH7XSrPB32ADneHGrC9SLYFnCDufmD KYbrPpeA==; Received: from [2601:1c0:6280:3f0::7376] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lkBIl-00HOY7-M2; Fri, 21 May 2021 19:59:19 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, Mel Gorman Subject: [PATCH] x86: fixmap: use CONFIG_NR_CPUS instead of NR_CPUS Date: Fri, 21 May 2021 12:59:18 -0700 Message-Id: <20210521195918.2183-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use CONFIG_NR_CPUS instead of NR_CPUS for an enum entry item. (Alternatively, #include unconditionally instead of conditionally.) This fixes 100+ build errors like so: In file included from ../include/asm-generic/early_ioremap.h:6:0, from ./arch/x86/include/generated/asm/early_ioremap.h:1, from ../arch/x86/include/asm/io.h:44, from ../include/linux/io.h:13, from ../mm/early_ioremap.c:13: ../arch/x86/include/asm/fixmap.h:103:48: error: ‘NR_CPUS’ undeclared here (not in a function); did you mean ‘NR_OPEN’? FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1, Fixes: e972c2511967 ("mm/early_ioremap: add prototype for early_memremap_pgprot_adjust") Signed-off-by: Randy Dunlap Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: Mel Gorman --- arch/x86/include/asm/fixmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20210521.orig/arch/x86/include/asm/fixmap.h +++ linux-next-20210521/arch/x86/include/asm/fixmap.h @@ -100,7 +100,7 @@ enum fixed_addresses { #endif #ifdef CONFIG_KMAP_LOCAL FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */ - FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * NR_CPUS) - 1, + FIX_KMAP_END = FIX_KMAP_BEGIN + (KM_MAX_IDX * CONFIG_NR_CPUS) - 1, #ifdef CONFIG_PCI_MMCONFIG FIX_PCIE_MCFG, #endif