summary refs log tree commit diff
path: root/lib/bitmap.c
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2021-08-30 14:56:06 +0200
committerPetr Mladek <pmladek@suse.com>2021-08-30 14:56:06 +0200
commit71af75b6929458d85f63c0649dc26d6f4c19729e (patch)
treec05c57903424d8270f6b6f3ec3493791fdba4e5c /lib/bitmap.c
parentfe8e3ee0d588566c1f44f28a555042ef50eba491 (diff)
parentbc17bed5fd73ef1a9aed39f3b0ea26936dad60b8 (diff)
downloadlinux-71af75b6929458d85f63c0649dc26d6f4c19729e.tar.gz
Merge branch 'for-5.15-printk-index' into for-linus
Diffstat (limited to 'lib/bitmap.c')
-rw-r--r--lib/bitmap.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c
index 74ceb02f45e3..9401d39e4722 100644
--- a/lib/bitmap.c
+++ b/lib/bitmap.c
@@ -581,6 +581,14 @@ static const char *bitmap_parse_region(const char *str, struct region *r)
 {
 	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(const char *str, struct region *r)
 	if (IS_ERR(str))
 		return str;
 
+check_pattern:
 	if (end_of_region(*str))
 		goto no_pattern;
 
@@ -784,8 +793,6 @@ int bitmap_parse(const char *start, unsigned int buflen,
 }
 EXPORT_SYMBOL(bitmap_parse);
 
-
-#ifdef CONFIG_NUMA
 /**
  * bitmap_pos_to_ord - find ordinal of set bit at given position in bitmap
  *	@buf: pointer to a bitmap
@@ -894,6 +901,7 @@ void bitmap_remap(unsigned long *dst, const unsigned long *src,
 			set_bit(bitmap_ord_to_pos(new, n % w, nbits), dst);
 	}
 }
+EXPORT_SYMBOL(bitmap_remap);
 
 /**
  * bitmap_bitremap - Apply map defined by a pair of bitmaps to a single bit
@@ -931,7 +939,9 @@ int bitmap_bitremap(int oldbit, const unsigned long *old,
 	else
 		return bitmap_ord_to_pos(new, n % w, bits);
 }
+EXPORT_SYMBOL(bitmap_bitremap);
 
+#ifdef CONFIG_NUMA
 /**
  * bitmap_onto - translate one bitmap relative to another
  *	@dst: resulting translated bitmap