diff options
author | Thomas Klein <osstklei@de.ibm.com> | 2006-11-03 11:48:23 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-11-06 02:55:07 -0500 |
commit | a1d261c561522151cb96c75f1dd1a51cf17665cf (patch) | |
tree | 30be5e219405b5cc739ab5b83b0e91ad4dbb89cb /drivers/net/ehea/ehea_qmr.c | |
parent | 07fd06b3bc1589e44aefd02eb28700a51b3c9d12 (diff) |
[PATCH] ehea: 64K page support fix
This patch fixes 64k page support by using PAGE_MASK and appropriate pagesize defines in several places.
Signed-off-by: Thomas Klein <tklein@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ehea/ehea_qmr.c')
-rw-r--r-- | drivers/net/ehea/ehea_qmr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index 161559315c0e..72ef7bde3346 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c | |||
@@ -512,7 +512,7 @@ int ehea_reg_mr_adapter(struct ehea_adapter *adapter) | |||
512 | 512 | ||
513 | start = KERNELBASE; | 513 | start = KERNELBASE; |
514 | end = (u64)high_memory; | 514 | end = (u64)high_memory; |
515 | nr_pages = (end - start) / PAGE_SIZE; | 515 | nr_pages = (end - start) / EHEA_PAGESIZE; |
516 | 516 | ||
517 | pt = kzalloc(PAGE_SIZE, GFP_KERNEL); | 517 | pt = kzalloc(PAGE_SIZE, GFP_KERNEL); |
518 | if (!pt) { | 518 | if (!pt) { |
@@ -538,9 +538,9 @@ int ehea_reg_mr_adapter(struct ehea_adapter *adapter) | |||
538 | if (nr_pages > 1) { | 538 | if (nr_pages > 1) { |
539 | u64 num_pages = min(nr_pages, (u64)512); | 539 | u64 num_pages = min(nr_pages, (u64)512); |
540 | for (i = 0; i < num_pages; i++) | 540 | for (i = 0; i < num_pages; i++) |
541 | pt[i] = virt_to_abs((void*)(((u64)start) | 541 | pt[i] = virt_to_abs((void*)(((u64)start) + |
542 | + ((k++) * | 542 | ((k++) * |
543 | PAGE_SIZE))); | 543 | EHEA_PAGESIZE))); |
544 | 544 | ||
545 | hret = ehea_h_register_rpage_mr(adapter->handle, | 545 | hret = ehea_h_register_rpage_mr(adapter->handle, |
546 | adapter->mr.handle, 0, | 546 | adapter->mr.handle, 0, |
@@ -548,8 +548,9 @@ int ehea_reg_mr_adapter(struct ehea_adapter *adapter) | |||
548 | num_pages); | 548 | num_pages); |
549 | nr_pages -= num_pages; | 549 | nr_pages -= num_pages; |
550 | } else { | 550 | } else { |
551 | u64 abs_adr = virt_to_abs((void*)(((u64)start) | 551 | u64 abs_adr = virt_to_abs((void*)(((u64)start) + |
552 | + (k * PAGE_SIZE))); | 552 | (k * EHEA_PAGESIZE))); |
553 | |||
553 | hret = ehea_h_register_rpage_mr(adapter->handle, | 554 | hret = ehea_h_register_rpage_mr(adapter->handle, |
554 | adapter->mr.handle, 0, | 555 | adapter->mr.handle, 0, |
555 | 0, abs_adr,1); | 556 | 0, abs_adr,1); |