ehea: Fix mem allocations which require page alignment

PAGE_SIZE allocations via slab are not guaranteed to be page-aligned. Fixed
all memory allocations where page alignment is required by firmware.

Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Thomas Klein
2009-01-21 14:45:33 -08:00
committed by David S. Miller
parent 086c1b2c52
commit 3faf2693bd
2 changed files with 30 additions and 30 deletions

View File

@@ -1005,7 +1005,7 @@ void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle)
unsigned long ret;
u64 *rblock;
rblock = kzalloc(PAGE_SIZE, GFP_KERNEL);
rblock = (void *)get_zeroed_page(GFP_KERNEL);
if (!rblock) {
ehea_error("Cannot allocate rblock memory.");
return;
@@ -1022,5 +1022,5 @@ void ehea_error_data(struct ehea_adapter *adapter, u64 res_handle)
else
ehea_error("Error data could not be fetched: %llX", res_handle);
kfree(rblock);
free_page((unsigned long)rblock);
}