diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-07-24 03:38:13 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-07-24 03:38:13 -0400 |
commit | b71426eb10d904d421b36f51f93c8d0ba558edac (patch) | |
tree | a8c7088a6b89499134e01750652aa55f2baa890f /drivers/s390/block/xpram.c | |
parent | 8419dc8a34d765f2ff1aa4051084d54cfeff09cf (diff) | |
parent | abb5a5cc6bba1516403146c5b79036fe843beb70 (diff) |
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'drivers/s390/block/xpram.c')
-rw-r--r-- | drivers/s390/block/xpram.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c index 4cd879cb9bdd..1140302ff11d 100644 --- a/drivers/s390/block/xpram.c +++ b/drivers/s390/block/xpram.c | |||
@@ -304,6 +304,7 @@ static int __init xpram_setup_sizes(unsigned long pages) | |||
304 | { | 304 | { |
305 | unsigned long mem_needed; | 305 | unsigned long mem_needed; |
306 | unsigned long mem_auto; | 306 | unsigned long mem_auto; |
307 | unsigned long long size; | ||
307 | int mem_auto_no; | 308 | int mem_auto_no; |
308 | int i; | 309 | int i; |
309 | 310 | ||
@@ -321,9 +322,19 @@ static int __init xpram_setup_sizes(unsigned long pages) | |||
321 | mem_needed = 0; | 322 | mem_needed = 0; |
322 | mem_auto_no = 0; | 323 | mem_auto_no = 0; |
323 | for (i = 0; i < xpram_devs; i++) { | 324 | for (i = 0; i < xpram_devs; i++) { |
324 | if (sizes[i]) | 325 | if (sizes[i]) { |
325 | xpram_sizes[i] = | 326 | size = simple_strtoull(sizes[i], &sizes[i], 0); |
326 | (memparse(sizes[i], &sizes[i]) + 3) & -4UL; | 327 | switch (sizes[i][0]) { |
328 | case 'g': | ||
329 | case 'G': | ||
330 | size <<= 20; | ||
331 | break; | ||
332 | case 'm': | ||
333 | case 'M': | ||
334 | size <<= 10; | ||
335 | } | ||
336 | xpram_sizes[i] = (size + 3) & -4UL; | ||
337 | } | ||
327 | if (xpram_sizes[i]) | 338 | if (xpram_sizes[i]) |
328 | mem_needed += xpram_sizes[i]; | 339 | mem_needed += xpram_sizes[i]; |
329 | else | 340 | else |