Re: [PATCH] sparc: iommu/pci_sun4v: fix page alignment in dma mapping

Stian Halseth <[email protected]>
Newsgroups org.kernel.vger.sparclinux,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 2026-02-17 at 19:52 +0200, Leon Romanovsky wrote:
> 
> 
> On Tue, Feb 17, 2026, at 19:33, Stian Halseth wrote:
> > Hi Leon,
> > 
> > 
> > On Tue, 2026-02-17 at 19:25 +0200, Leon Romanovsky wrote:
> > > 
> > > 
> > > On Tue, Feb 17, 2026, at 19:16, John Paul Adrian Glaubitz wrote:
> > > > Hi Stian,
> > > > 
> > > > On Tue, 2026-02-17 at 17:48 +0100, Stian Halseth wrote:
> > > > > Thanks for the review and suggestions.
> > > > > 
> > > > > On Tue, 2026-02-17 at 17:38 +0100, John Paul Adrian Glaubitz
> > > > > wrote:
> > > > > > Hi Stian,
> > > > > > 
> > > > > > please rephrase the subject to:
> > > > > > 
> > > > > >  sparc: Fix page alignment in dma mapping
> > > > > > 
> > > > > > Your patch is not specific to sun4v but also fixes generic
> > > > > > sparc
> > > > > > code,
> > > > > > so you should remove the part "iommu/pci_sun4v:" from the
> > > > > > subject.
> > > > > > 
> > > > > Understood — I will update the patch subject as suggested.
> > > > > > On Tue, 2026-02-17 at 17:21 +0100, [email protected] wrote:
> > > > > > > From: Stian Halseth <[email protected]>
> > > > > > > 
> > > > > > > 'phys' may include an offset within the page, while
> > > > > > > 'base_paddr' is
> > > > > > > already page-aligned.
> > > > > > > 
> > > > > > > This caused incorrect DMA mapping in dma_4u_map_phys and
> > > > > > > dma_4v_map_phys.
> > > > > > > 
> > > > > > > Fix both functions by masking phys with IO_PAGE_MASK or
> > > > > > > subtracting
> > > > > > > the page offset.
> > > > > > 
> > > > > > Please remove the newlines between your sentences, they're
> > > > > > not
> > > > > > necessary
> > > > > > and also trim the lines at 80 columns.
> > > > > 
> > > > > Will do — I’ll reformat the commit message to 80-column lines
> > > > > and remove extra newlines.
> > > > 
> > > > Perfect! I have nothing to add. Let's have Andreas review your
> > > > patch ;-).
> > > 
> > > Please add Fixes line, so the patch will be taken to stable@ in
> > > automatic way.
> > I currently have:
> > Fixes: 38c0d0ebf520 ("sparc: Use physical address DMA mapping")
> > 
> > Is this sufficient, or do I need to add something else?
> 
> Ohh, you added extra line between signed-of-by and fixes line.
> 
> Just remove that extra blank line.
> 
> Thanks 
Ah, I see what you mean now. There _was_ an extra line in the first
submitted patch [1]. This is not the case in the updated patch v2 [2],
submitted Tue, 17 Feb 2026 17:21:13 +0100.

Let me know if there's still an issue with the latest patch, or if I've
made a mistake when submitting it. My first patch to LKML, sorry about
the extra work :)

> 
> > > 
> > > Thanks 
> > > 
> > > > 
> > > > Adrian
> > > > 
> > > > -- 
> > > >  .''`.  John Paul Adrian Glaubitz
> > > > : :' :  Debian Developer
> > > > `. `'   Physicist
> > > >   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
> > 
> > -- 
> > Best regards
> > Stian Halseth
> > ​

[1] https://lkml.org/lkml/2026/2/17/845
[2] https://lkml.org/lkml/2026/2/17/908

-- 
Best regards
Stian Halseth
​
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.