aboutsummaryrefslogtreecommitdiff
path: root/drivers/s390/block/xpram.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-07-24 03:40:11 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-24 03:40:11 -0400
commitd11ea48aab3b57cc931cc7120603e1c2ffb04302 (patch)
treedad3c780816d0a76e021ee53c49c7c1fb4dd1243 /drivers/s390/block/xpram.c
parent22ad852b8297e5063fc50f54a77e13f6d9b16a6f (diff)
parentabb5a5cc6bba1516403146c5b79036fe843beb70 (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/s390/block/xpram.c')
-rw-r--r--drivers/s390/block/xpram.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/s390/block/xpram.c b/drivers/s390/block/xpram.c
index 4cd879cb9bd..1140302ff11 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)
{
unsigned long mem_needed;
unsigned long mem_auto;
+ unsigned long long size;
int mem_auto_no;
int i;
@@ -321,9 +322,19 @@ static int __init xpram_setup_sizes(unsigned long pages)
mem_needed = 0;
mem_auto_no = 0;
for (i = 0; i < xpram_devs; i++) {
- if (sizes[i])
- xpram_sizes[i] =
- (memparse(sizes[i], &sizes[i]) + 3) & -4UL;
+ if (sizes[i]) {
+ size = simple_strtoull(sizes[i], &sizes[i], 0);
+ switch (sizes[i][0]) {
+ case 'g':
+ case 'G':
+ size <<= 20;
+ break;
+ case 'm':
+ case 'M':
+ size <<= 10;
+ }
+ xpram_sizes[i] = (size + 3) & -4UL;
+ }
if (xpram_sizes[i])
mem_needed += xpram_sizes[i];
else