diff options
author | Thomas Klein <osstklei@de.ibm.com> | 2006-11-03 17:48:23 +0100 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-11-06 02:55:07 -0500 |
commit | a1d261c561522151cb96c75f1dd1a51cf17665cf (patch) | |
tree | 30be5e219405b5cc739ab5b83b0e91ad4dbb89cb /drivers/net/ehea/ehea_phyp.h | |
parent | 07fd06b3bc1589e44aefd02eb28700a51b3c9d12 (diff) | |
download | linux-a1d261c561522151cb96c75f1dd1a51cf17665cf.tar.gz linux-a1d261c561522151cb96c75f1dd1a51cf17665cf.tar.bz2 linux-a1d261c561522151cb96c75f1dd1a51cf17665cf.zip |
[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_phyp.h')
-rw-r--r-- | drivers/net/ehea/ehea_phyp.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ehea/ehea_phyp.h b/drivers/net/ehea/ehea_phyp.h index fa51e3b5bb05..919f94b75933 100644 --- a/drivers/net/ehea/ehea_phyp.h +++ b/drivers/net/ehea/ehea_phyp.h @@ -81,14 +81,16 @@ static inline u32 get_longbusy_msecs(int long_busy_ret_code) static inline void hcp_epas_ctor(struct h_epas *epas, u64 paddr_kernel, u64 paddr_user) { - epas->kernel.addr = ioremap(paddr_kernel, PAGE_SIZE); + /* To support 64k pages we must round to 64k page boundary */ + epas->kernel.addr = ioremap((paddr_kernel & PAGE_MASK), PAGE_SIZE) + + (paddr_kernel & ~PAGE_MASK); epas->user.addr = paddr_user; } static inline void hcp_epas_dtor(struct h_epas *epas) { if (epas->kernel.addr) - iounmap(epas->kernel.addr); + iounmap((void __iomem*)((u64)epas->kernel.addr & PAGE_MASK)); epas->user.addr = 0; epas->kernel.addr = 0; |