Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2127220ybl; Thu, 9 Jan 2020 07:20:40 -0800 (PST) X-Google-Smtp-Source: APXvYqyJp+u+5yQxqslr3gqc+zwGcQLGor19h0LJNxIPMdCVY5v90nmfO8QU8tWFKhxG1P2jXVKQ X-Received: by 2002:aca:554d:: with SMTP id j74mr3649548oib.92.1578583240268; Thu, 09 Jan 2020 07:20:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578583240; cv=none; d=google.com; s=arc-20160816; b=VsvPMCmj9Lw7v+eyTprjiUKvSNqqTdvcQGpsXyfVrOTwC6cI95w0r+fzvZCfOwvJbC /yE2lEfDHaDHC7fFaGYtFsm0qr7/2J7Ut3uE7xdGC7MwnOJk1csLl4Ab6b+cooOS7z9V njIz4FxzyDMHoXOZlcbMt87Snft7ZBO7HCJObNKLpzqMOFDqhLJKljnPZp/6o3GOzo78 4VXYaAW2FlquM2lWzQmrP3u8hJlB6TBsXM9GbU7ByMOrb1itHV7/eN1VRhZLl1cyEAET 60sRGK2UC01iOqiWZlNfoFNltUyiOSTxPn/18jf3/F1Ev0s18gf+Ovgse9RQRDCbB57F TBcA== 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=szo6UfY9rpyPghsqSCb3EM8SEIAhn74zTDBjvToTz6E=; b=Z90xL2vIfO4As3meE/6PGpwN7pu6fVewq9iGMMlSs9++0wqfO+t/FKi3jAjstZtFSS +PQhbBRf4isaP1FZr3XoKBpPca2ZbWRWXpJPn8lBnxRcau1SIoPvPSyux3Xv+AVfVRlW YxAiVcF2K965a5CEp9u2tQL6RdhVE2sMEtTaMzY7JxYHb9N/Fa2pAXKa5id56GbOi6M5 mGp6L2o8GV0BZ4OIydNI2pJzGhbn8TxzeivuC1aD3cE+1gUNYqv6vmcbnZQMiRT6aYfY l88TjpkO0PnCSA73CJD6cUtASI23vTUbuQC7n0++ODrpULzGkIDi4hS3nIJzohwohTom YnDw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b20si4154841otf.199.2020.01.09.07.20.27; Thu, 09 Jan 2020 07:20:40 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730958AbgAIMeJ (ORCPT + 99 others); Thu, 9 Jan 2020 07:34:09 -0500 Received: from mx2.suse.de ([195.135.220.15]:37972 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729485AbgAIMeJ (ORCPT ); Thu, 9 Jan 2020 07:34:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 72B21B2205; Thu, 9 Jan 2020 12:34:03 +0000 (UTC) From: Thomas Bogendoerfer To: Paul Burton Cc: Ralf Baechle , James Hogan , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/14] MIPS: SGI-IP27: use nodemask instead of cpumask Date: Thu, 9 Jan 2020 13:33:38 +0100 Message-Id: <20200109123353.5656-2-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200109123353.5656-1-tbogendoerfer@suse.de> References: <20200109123353.5656-1-tbogendoerfer@suse.de> 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 Replication is done on a per node basis, so the use of cpumask was a misusage here. Signed-off-by: Thomas Bogendoerfer --- arch/mips/sgi-ip27/ip27-klnuma.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/mips/sgi-ip27/ip27-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c index ee1c6ff4aa00..af7b98c39dce 100644 --- a/arch/mips/sgi-ip27/ip27-klnuma.c +++ b/arch/mips/sgi-ip27/ip27-klnuma.c @@ -20,7 +20,7 @@ #include #include -static cpumask_t ktext_repmask; +static nodemask_t ktext_repmask; /* * XXX - This needs to be much smarter about where it puts copies of the @@ -30,8 +30,8 @@ static cpumask_t ktext_repmask; void __init setup_replication_mask(void) { /* Set only the master cnode's bit. The master cnode is always 0. */ - cpumask_clear(&ktext_repmask); - cpumask_set_cpu(0, &ktext_repmask); + nodes_clear(ktext_repmask); + node_set(0, ktext_repmask); #ifdef CONFIG_REPLICATE_KTEXT #ifndef CONFIG_MAPPED_KERNEL @@ -44,7 +44,7 @@ void __init setup_replication_mask(void) if (nasid == 0) continue; /* Advertise that we have a copy of the kernel */ - cpumask_set_cpu(nasid, &ktext_repmask); + node_set(nasid, ktext_repmask); } } #endif @@ -98,7 +98,7 @@ void __init replicate_kernel_text(void) continue; /* Check if this node should get a copy of the kernel */ - if (cpumask_test_cpu(client_nasid, &ktext_repmask)) { + if (node_isset(client_nasid, ktext_repmask)) { server_nasid = client_nasid; copy_kernel(server_nasid); } @@ -122,7 +122,7 @@ unsigned long node_getfirstfree(nasid_t nasid) loadbase += 16777216; #endif offset = PAGE_ALIGN((unsigned long)(&_end)) - loadbase; - if ((nasid == 0) || (cpumask_test_cpu(nasid, &ktext_repmask))) + if ((nasid == 0) || (node_isset(nasid, ktext_repmask))) return TO_NODE(nasid, offset) >> PAGE_SHIFT; else return KDM_TO_PHYS(PAGE_ALIGN(SYMMON_STK_ADDR(nasid, 0))) >> PAGE_SHIFT; -- 2.24.1