All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] bitmap_parse-support-all-semantics.patch removed from -mm tree
@ 2021-05-11 17:00 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2021-05-11 17:00 UTC (permalink / raw)
  To: andriy.shevchenko, corbet, jiangshanlai, joel, linux,
	mathieu.desnoyers, mm-commits, palmerdabbelt, paul.gortmaker,
	paulmck, rdunlap, rostedt, yury.norov


The patch titled
     Subject: bitmap_parse: support 'all' semantics
has been removed from the -mm tree.  Its filename was
     bitmap_parse-support-all-semantics.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Yury Norov <yury.norov@gmail.com>
Subject: bitmap_parse: support 'all' semantics

RCU code supports an 'all' group as a special case when parsing rcu_nocbs
parameter.  This patch moves the 'all' support to the core bitmap_parse
code, so that all bitmap users can enjoy this extension.

Moving 'all' parsing to a bitmap_parse level, also allows users to pass
patterns together with 'all' in regular group:pattern format

Link: https://lkml.kernel.org/r/20210421031326.72816-2-yury.norov@gmail.com
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Palmer Dabbelt <palmerdabbelt@google.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 Documentation/admin-guide/kernel-parameters.rst |    5 +++++
 lib/bitmap.c                                    |    9 +++++++++
 lib/test_bitmap.c                               |    7 +++++++
 3 files changed, 21 insertions(+)

--- a/Documentation/admin-guide/kernel-parameters.rst~bitmap_parse-support-all-semantics
+++ a/Documentation/admin-guide/kernel-parameters.rst
@@ -76,6 +76,11 @@ to change, such as less cores in the CPU
 will also change.  Use the same on a small 4 core system, and "16-N" becomes
 "16-3" and now the same boot input will be flagged as invalid (start > end).
 
+The special case-tolerant group name "all" has a meaning of selecting all CPUs,
+such that "isolcpus=all" is the equivalent of "isolcpus=0-N".
+
+The semantics of "N" and "all" is supported on a level of bitmaps and holds for
+all users of bitmap_parse().
 
 This document may not be entirely up to date and comprehensive. The command
 "modinfo -p ${modulename}" shows a current list of all parameters of a loadable
--- a/lib/bitmap.c~bitmap_parse-support-all-semantics
+++ a/lib/bitmap.c
@@ -581,6 +581,14 @@ static const char *bitmap_parse_region(c
 {
 	unsigned int lastbit = r->nbits - 1;
 
+	if (!strncasecmp(str, "all", 3)) {
+		r->start = 0;
+		r->end = lastbit;
+		str += 3;
+
+		goto check_pattern;
+	}
+
 	str = bitmap_getnum(str, &r->start, lastbit);
 	if (IS_ERR(str))
 		return str;
@@ -595,6 +603,7 @@ static const char *bitmap_parse_region(c
 	if (IS_ERR(str))
 		return str;
 
+check_pattern:
 	if (end_of_region(*str))
 		goto no_pattern;
 
--- a/lib/test_bitmap.c~bitmap_parse-support-all-semantics
+++ a/lib/test_bitmap.c
@@ -366,6 +366,13 @@ static const struct test_bitmap_parselis
 	{0, "0-31:1/3,1-31:1/3,2-31:1/3",	&exp1[8 * step], 32, 0},
 	{0, "1-10:8/12,8-31:24/29,0-31:0/3",	&exp1[9 * step], 32, 0},
 
+	{0,	  "all",		&exp1[8 * step], 32, 0},
+	{0,	  "0, 1, all,  ",	&exp1[8 * step], 32, 0},
+	{0,	  "all:1/2",		&exp1[4 * step], 32, 0},
+	{0,	  "ALL:1/2",		&exp1[4 * step], 32, 0},
+	{-EINVAL, "al", NULL, 8, 0},
+	{-EINVAL, "alll", NULL, 8, 0},
+
 	{-EINVAL, "-1",	NULL, 8, 0},
 	{-EINVAL, "-0",	NULL, 8, 0},
 	{-EINVAL, "10-1", NULL, 8, 0},
_

Patches currently in -mm which might be from yury.norov@gmail.com are



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-11 17:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-11 17:00 [merged] bitmap_parse-support-all-semantics.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.