The patch titled Subject: bitmap_parse: support 'all' semantics has been added to the -mm tree. Its filename is bitmap_parse-support-all-semantics.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/bitmap_parse-support-all-semantics.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/bitmap_parse-support-all-semantics.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Yury Norov <yury.norov@xxxxxxxxx> 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@xxxxxxxxx Signed-off-by: Yury Norov <yury.norov@xxxxxxxxx> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Cc: Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Lai Jiangshan <jiangshanlai@xxxxxxxxx> Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx> Cc: Palmer Dabbelt <palmerdabbelt@xxxxxxxxxx> Cc: "Paul E. McKenney" <paulmck@xxxxxxxxxx> Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx> Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxx are bitmap_parse-support-all-semantics.patch rcu-tree_plugin-dont-handle-the-case-of-all-cpu-range.patch