This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author psswirhun
Recipients psswirhun
Date 2021-02-04.22:45:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612478715.17.0.31458005009.issue43131@roundup.psfhosted.org>
In-reply-to
Content
mmap (example, as used in python-periphery) duplicates writes, compared to devmem and a c-periphery on an ARM64 platform (Zynq/Petalinux/Yocto). There are various other reports of duplicated writes using mmap suggesting it is a bug. Example:

fd = os.open("/dev/mem", os.O_RDWR | os.O_SYNC)
mapping = mmap.mmap(fd, 4096, flags=mmap.MAP_SHARED, prot=(mmap.PROT_READ | mmap.PROT_WRITE), offset=0x80000000)
mapping.write(bytearray([0x0,]* 4))  # results in 2 writes, should be 1
mapping.write(bytearray([0x0,]* 8))  # results in 4 writes, should be 1-2 depending on bus width (32b vs 64b)
# OR:
mapping[0:4] = struct.pack("=L", 0x0)  # results in 2 writes, should be 1
History
Date User Action Args
2021-02-04 22:45:15psswirhunsetrecipients: + psswirhun
2021-02-04 22:45:15psswirhunsetmessageid: <1612478715.17.0.31458005009.issue43131@roundup.psfhosted.org>
2021-02-04 22:45:15psswirhunlinkissue43131 messages
2021-02-04 22:45:15psswirhuncreate