lkml.org 
[lkml]   [2015]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RESEND PATCH v3 1/2] mm: Introducing arch_remap hook
On 13/04/2015 22:59, Andrew Morton wrote:
> On Mon, 13 Apr 2015 17:02:19 +0300 "Kirill A. Shutemov" <kirill@shutemov.name> wrote:
>
>>> Kirill, if I'm right with it, can you suggest the header where to put
>>> the "generic" mremap hook's (empty) body?
>>
>> I initially thought it would be enough to put it into
>> <asm-generic/mmu_context.h>, expecting it works as
>> <asm-generic/pgtable.h>. But that's not the case.
>>
>> It probably worth at some point rework all <asm/mmu_context.h> to include
>> <asm-generic/mmu_context.h> at the end as we do for <asm/pgtable.h>.
>> But that's outside the scope of the patchset, I guess.
>>
>> I don't see any better candidate for such dummy header. :-/
>
> Do away with __HAVE_ARCH_REMAP and do it like this:
>
> arch/x/include/asm/y.h:
>
> extern void arch_remap(...);
> #define arch_remap arch_remap
>
> include/linux/z.h:
>
> #include <asm/y.h>
>
> #ifndef arch_remap
> static inline void arch_remap(...) { }
> #define arch_remap arch_remap
> #endif

Hi Andrew,

I like your idea, but I can't find any good candidate for <asm/y.h> and
<linux/z.h>.

I tried with <linux/mm.h> and <asm/mmu_context.h> but
<asm/mmu_context.h> is already including <linux/mm.h>.

Do you have any suggestion ?

Another option could be to do it like the actual arch_unmap() in
<asm-generic/mm_hooks.h> but this is the opposite of your idea, and Ingo
was not comfortable with this idea due to the impact of the other
architectures.

Cheers,
Laurent.



\
 
 \ /
  Last update: 2015-04-14 12:01    [W:0.101 / U:1.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site