Merge tag 'efi-urgent-for-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / lib / bitmap.c
index 74ceb02..9401d39 100644 (file)
@@ -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