summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/idals.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-03-07 13:28:13 +0100
committerHeiko Carstens <hca@linux.ibm.com>2024-03-13 09:23:47 +0100
commit0c9580cebb5065c7ef25d48f61222aaf46932a0f (patch)
treed6a4f3c6288018d523354b91c42ecc9698f7afe4 /arch/s390/include/asm/idals.h
parent57bc3c2219b0c4ada8072a39c55c14197e2bbda9 (diff)
s390/cio,idal: remove superfluous virt_to_phys() conversion
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>
Diffstat (limited to 'arch/s390/include/asm/idals.h')
-rw-r--r--arch/s390/include/asm/idals.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/include/asm/idals.h b/arch/s390/include/asm/idals.h
index 462109777547..1ceefc9f6fbe 100644
--- a/arch/s390/include/asm/idals.h
+++ b/arch/s390/include/asm/idals.h
@@ -41,7 +41,7 @@ static inline unsigned int idal_nr_words(void *vaddr, unsigned int length)
{
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;
@@ -54,7 +54,7 @@ static inline unsigned int idal_2k_nr_words(void *vaddr, unsigned int length)
{
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;