From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com [209.85.219.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4038C1A08C4 for ; Sat, 28 Dec 2024 18:50:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735411826; cv=none; b=fu4yMGJV1AxGdD3LpbiZpIBIT7RG4WgrHcybugkHU0e+ZbeiTWYFqUlVcV3oKCcq8YeUjQBfrivFKH9dzlLgg2SlwVqiqgVX2wl2HZyikdJCxpyUb9JotqBA3HBXLRh+p89V79TBY5F99lmYR0fqlbCUf3I3uhgoh1f6woeReLo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735411826; c=relaxed/simple; bh=oBgQJD9Ty1IzfEygnsGTGDgqza7lkMcdboAeaVonfg4=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fShRzcp0QLzePutTyh3VV4MDQHQNEczIfoEONz/NILtHQuTZ5cmRPXf2t2N6k4VDlkc7wIUrwAMF3kiOSmU82ileqMRE2Biy0WQuLu5T44QT4YHeG58/uyDj8LvIlviAcxZr+pT5fSTd6bbzZIycxwILNAFzVMztFfYCmmMW+c8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YX+NSK+7; arc=none smtp.client-ip=209.85.219.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YX+NSK+7" Received: by mail-yb1-f176.google.com with SMTP id 3f1490d57ef6-e53aa843a24so7581706276.0 for ; Sat, 28 Dec 2024 10:50:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735411824; x=1736016624; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=x+tjauzfTAqaveSfzn1e+mhO9J6NkwE5NNr0Zl9Ec9o=; b=YX+NSK+7CE87egEaA+iEOysdreNoDlzYttKu8irIZcB7fDTQhJe0bAqakFL4bDEAnE MA3dANK87O6s6Us2ETrWDwjU6rEU3kNMI1sVeEH2a9cD4GgnxJcJOokSuBD2iRS5LF8N J9wHs2Eo191fLLgFp10jFVmSRv/3eAqr30pja9ovcuyr7YBfGRn0IsxYhAYNIaE3AKM1 B/HgtxVQf1oOMjFBkzJR4IGaPDatqhmcoupxlRU90azh7TqDW3SQiTFcdai12IEI6e+L Kh3+kg9jx9ERPBmBZMgjeRtlKk4CtIFgUBM8PwY4GNoBP0EaeUCh0nZz5/X8V1uXG0tK rkOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735411824; x=1736016624; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x+tjauzfTAqaveSfzn1e+mhO9J6NkwE5NNr0Zl9Ec9o=; b=jbD8VgFWeBlLIRt504mNVV7hvytXirrdbIyabxJeMgXZc61a8JzvyP/IST9QHlM8Q4 Sm4hLExkpuljlpeVr6f4rkA65Kr7ZpZ0BSd8/T9b8atCLyQJEpZ9p4S4/ojCmna4eu2Y IchFnsJT/tXwsVuVHVuIGG7IEPTJkyYpSKAjnBkrad59vT1RtCUcLphj+Sd8DC4MjrX3 +/lXzv+eqDEJH67yn1SU9RksDsOw4L6QNIPWIIXeqYYo0os1fYgvbaKzGkkihAlLDWU7 6Sf6S3WN700mDiB8JYhlFp5JSNA67QILwyaYHofLWdP4b5ktUpeDjRyB/JCeDNil957/ 0F2A== X-Gm-Message-State: AOJu0Yx/4zOR4NH1DwVJKo3TNYZZWVeDiUM4u4wPZk5CIOfnra2idN0k UL9/F4wNZT/gUsNk7j6qsMVk6DspCOctODlVxa2z0A1TWQaWy1i3OofuwQxJ X-Gm-Gg: ASbGncuQ0Ib4lsm1a/yEOarStplGAYC4eGidOx87nxhG6qWYvjcHpAOxhASvxQV3zpo JjzgB7C8LQphM8zDIpn+5RBGCOdPkz8A2AAhjwCpwWMwyWeulH8idWAAwLrO9Yc3QOcndh1HaSA lhZ0HEcR7b4LFTnsVSN9TyaGrVyCGOlTu6l2iXT2tZWRUPHZWzmu/dEtJeyFeBkjzn31locXHVv NfBLOChhLRu4X6hihXEYdUGrzJf006MyORr9d40Sk1hpjRI9IIaVQyjW5vpkDQZ4Ns29RMesBC6 W/YdVSfefjVAttYB X-Google-Smtp-Source: AGHT+IGUf9tLCUNZYTKrVtkz4yPb9icPWf+cRKS4+JCdUq3uGP1F9BvsT4jjBbosKBwPbn1+5rkQyQ== X-Received: by 2002:a05:6902:218e:b0:e38:f2ef:4f6 with SMTP id 3f1490d57ef6-e538cd1a8camr22959273276.7.1735411824099; Sat, 28 Dec 2024 10:50:24 -0800 (PST) Received: from localhost (c-24-129-28-254.hsd1.fl.comcast.net. [24.129.28.254]) by smtp.gmail.com with ESMTPSA id 3f1490d57ef6-e537cc7914esm5087807276.31.2024.12.28.10.50.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 10:50:22 -0800 (PST) From: Yury Norov To: linux-kernel@vger.kernel.org, Yury Norov , Rasmus Villemoes , Andrew Morton Subject: [PATCH 14/14] cpumask: drop cpumask_next_wrap_old() Date: Sat, 28 Dec 2024 10:49:46 -0800 Message-ID: <20241228184949.31582-15-yury.norov@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241228184949.31582-1-yury.norov@gmail.com> References: <20241228184949.31582-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Now that we have cpumask_next_wrap() wired to generic find_next_bit_wrap(), the old implementation is not needed. Signed-off-by: Yury Norov --- include/linux/cpumask.h | 21 --------------------- lib/cpumask.c | 32 -------------------------------- 2 files changed, 53 deletions(-) diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index d9a3d0ea2df1..80fa8c9bfa68 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -311,27 +311,6 @@ unsigned int cpumask_next_wrap(int n, const struct cpumask *src) #define for_each_cpu(cpu, mask) \ for_each_set_bit(cpu, cpumask_bits(mask), small_cpumask_bits) -#if NR_CPUS == 1 -static __always_inline -unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap) -{ - cpumask_check(start); - if (n != -1) - cpumask_check(n); - - /* - * Return the first available CPU when wrapping, or when starting before cpu0, - * since there is only one valid option. - */ - if (wrap && n >= 0) - return nr_cpumask_bits; - - return cpumask_first(mask); -} -#else -unsigned int __pure cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap); -#endif - /** * for_each_cpu_wrap - iterate over every cpu in a mask, starting at a specified location * @cpu: the (optionally unsigned) integer iterator diff --git a/lib/cpumask.c b/lib/cpumask.c index d7cce2aaebc2..fbf7630f2ac9 100644 --- a/lib/cpumask.c +++ b/lib/cpumask.c @@ -7,38 +7,6 @@ #include #include -/** - * cpumask_next_wrap_old - helper to implement for_each_cpu_wrap - * @n: the cpu prior to the place to search - * @mask: the cpumask pointer - * @start: the start point of the iteration - * @wrap: assume @n crossing @start terminates the iteration - * - * Return: >= nr_cpu_ids on completion - * - * Note: the @wrap argument is required for the start condition when - * we cannot assume @start is set in @mask. - */ -unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap) -{ - unsigned int next; - -again: - next = cpumask_next(n, mask); - - if (wrap && n < start && next >= start) { - return nr_cpumask_bits; - - } else if (next >= nr_cpumask_bits) { - wrap = true; - n = -1; - goto again; - } - - return next; -} -EXPORT_SYMBOL(cpumask_next_wrap_old); - /* These are not inline because of header tangles. */ #ifdef CONFIG_CPUMASK_OFFSTACK /** -- 2.43.0