Only the last 12 bits of virtual / physical addresses are used when masking
with IDA_BLOCK_SIZE - 1. Given that the bits are the same regardless of
virtual or physical address, remove the virtual to physical address
conversion.
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
{
unsigned int cidaw;
- cidaw = __pa(vaddr) & (IDA_BLOCK_SIZE - 1);
+ cidaw = (unsigned long)vaddr & (IDA_BLOCK_SIZE - 1);
cidaw += length + IDA_BLOCK_SIZE - 1;
cidaw >>= IDA_SIZE_SHIFT;
return cidaw;
{
unsigned int cidaw;
- cidaw = __pa(vaddr) & (IDA_2K_BLOCK_SIZE - 1);
+ cidaw = (unsigned long)vaddr & (IDA_2K_BLOCK_SIZE - 1);
cidaw += length + IDA_2K_BLOCK_SIZE - 1;
cidaw >>= IDA_2K_SIZE_SHIFT;
return cidaw;