[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>
This commit is contained in:
Thomas Klein
2006-11-03 17:48:23 +01:00
zatwierdzone przez Jeff Garzik
rodzic 07fd06b3bc
commit a1d261c561
5 zmienionych plików z 26 dodań i 23 usunięć

Wyświetl plik

@@ -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;