projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/amd/display: Update bounding box states (v2)
[linux-2.6-microblaze.git]
/
lib
/
bitmap.c
diff --git
a/lib/bitmap.c
b/lib/bitmap.c
index
74ceb02
..
9401d39
100644
(file)
--- 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;
{
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;
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;
if (IS_ERR(str))
return str;
+check_pattern:
if (end_of_region(*str))
goto no_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);
}
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
/**
* 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);
}
}
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
/**
* 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);
}
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
/**
* bitmap_onto - translate one bitmap relative to another
* @dst: resulting translated bitmap