lkml.org 
[lkml]   [2022]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 02/11] mm: ioremap: fixup the physical address and page prot
On 08/22/22 at 06:30am, Christophe Leroy wrote:
>
>
> Le 20/08/2022 à 02:31, Baoquan He a écrit :
> > On some architectures, the physical address need be fixed up before
> > doing mapping, e.g, parisc. And on architectures, e.g arc, the
> > parameter 'prot' passed into ioremap_prot() need be adjusted too.
> >
> > In oder to convert them to take GENERIC_IOREMAP method, we need wrap
> > the address fixing up code and page prot adjusting code into arch_ioremap()
> > and pass the new address and 'prot' out for ioremap_prot() handling.
>
> Is it really the best approach ? Wouldn't it be better to have helpers
> to do that, those helpers being called by the ioremap_prot(), instead of
> doing it inside the arch_ioremap() function ?

This is suggested too by Alexander during his v1 reviewing. I tried, but
feel the current way taken in this patchset is better. Because not all
architecutres need the address fix up, only parisc, and only few need
adjust the 'prot'. Introducing other helpers seems too much, that only
increases the complexity of of ioremap() and the generic GENERIC_IOREMAP
method for people to understand and take.

>
> >
> > This is a preparation patch, no functionality change.
>
> Could this be squashed into previous patch ?

Yep, will do. Thanks.

\
 
 \ /
  Last update: 2022-08-23 03:20    [W:2.093 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site