Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/pci: clarify comment in s390_mmio_read/write

The existing comment was talking about reading in the write part
and vice versa. While we are here make it more clear why restricting
the syscalls to MIO capable devices is okay.

Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>

authored by

Niklas Schnelle and committed by
Heiko Carstens
4631f3ca 41115582

+12 -8
+12 -8
arch/s390/pci/pci_mmio.c
··· 155 155 return -EINVAL; 156 156 157 157 /* 158 - * Only support read access to MIO capable devices on a MIO enabled 159 - * system. Otherwise we would have to check for every address if it is 160 - * a special ZPCI_ADDR and we would have to do a get_pfn() which we 161 - * don't need for MIO capable devices. 158 + * We only support write access to MIO capable devices if we are on 159 + * a MIO enabled system. Otherwise we would have to check for every 160 + * address if it is a special ZPCI_ADDR and would have to do 161 + * a get_pfn() which we don't need for MIO capable devices. Currently 162 + * ISM devices are the only devices without MIO support and there is no 163 + * known need for accessing these from userspace. 162 164 */ 163 165 if (static_branch_likely(&have_mio)) { 164 166 ret = __memcpy_toio_inuser((void __iomem *) mmio_addr, ··· 284 282 return -EINVAL; 285 283 286 284 /* 287 - * Only support write access to MIO capable devices on a MIO enabled 288 - * system. Otherwise we would have to check for every address if it is 289 - * a special ZPCI_ADDR and we would have to do a get_pfn() which we 290 - * don't need for MIO capable devices. 285 + * We only support read access to MIO capable devices if we are on 286 + * a MIO enabled system. Otherwise we would have to check for every 287 + * address if it is a special ZPCI_ADDR and would have to do 288 + * a get_pfn() which we don't need for MIO capable devices. Currently 289 + * ISM devices are the only devices without MIO support and there is no 290 + * known need for accessing these from userspace. 291 291 */ 292 292 if (static_branch_likely(&have_mio)) { 293 293 ret = __memcpy_fromio_inuser(