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_phyp.h | |
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_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) | |||
81 | static inline void hcp_epas_ctor(struct h_epas *epas, u64 paddr_kernel, | 81 | static inline void hcp_epas_ctor(struct h_epas *epas, u64 paddr_kernel, |
82 | u64 paddr_user) | 82 | u64 paddr_user) |
83 | { | 83 | { |
84 | epas->kernel.addr = ioremap(paddr_kernel, PAGE_SIZE); | 84 | /* To support 64k pages we must round to 64k page boundary */ |
85 | epas->kernel.addr = ioremap((paddr_kernel & PAGE_MASK), PAGE_SIZE) + | ||
86 | (paddr_kernel & ~PAGE_MASK); | ||
85 | epas->user.addr = paddr_user; | 87 | epas->user.addr = paddr_user; |
86 | } | 88 | } |
87 | 89 | ||
88 | static inline void hcp_epas_dtor(struct h_epas *epas) | 90 | static inline void hcp_epas_dtor(struct h_epas *epas) |
89 | { | 91 | { |
90 | if (epas->kernel.addr) | 92 | if (epas->kernel.addr) |
91 | iounmap(epas->kernel.addr); | 93 | iounmap((void __iomem*)((u64)epas->kernel.addr & PAGE_MASK)); |
92 | 94 | ||
93 | epas->user.addr = 0; | 95 | epas->user.addr = 0; |
94 | epas->kernel.addr = 0; | 96 | epas->kernel.addr = 0; |