On Sun, May 16, 2021 at 12:09 PM Matthew Wilcox willy@infradead.org wrote:
That was the other problem fixed by this patch -- on big-endian 32-bit platforms with 64-bit dma_addr_t (mips, ppc), a DMA address with bit 32 set inadvertently sets the PageTail bit. So we need to store the low bits in the first word, even on big-endian platforms.
Ouch. And yes, that would have shot down the "dma page frame number" model too.
Oh how I wish PageTail was in "flags". Yes, our compound_head() thing is "clever", but it's a pain,
That said, that union entry is "5 words", so the dma_addr_t thing could easily just have had a dummy word at the beginning.
Linus