* [PATCH 13/27] m68k: Use common bits from generic tlb.h
[not found] <1400093999-18703-1-git-send-email-richard@nod.at>
@ 2014-05-14 18:59 ` Richard Weinberger
2014-05-14 19:19 ` Geert Uytterhoeven
[not found] ` <CAMuHMdUddNc3Suq25JU7UC+YdWQHmk0nCRzCEbqmKg1+a+=FXw@mail.gmail.com>
0 siblings, 2 replies; 6+ messages in thread
From: Richard Weinberger @ 2014-05-14 18:59 UTC (permalink / raw)
To: linux-arch, arnd, linux-kernel
Cc: Richard Weinberger, Geert Uytterhoeven, linux-m68k
It is no longer needed to define them on our own.
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: linux-m68k@lists.linux-m68k.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/m68k/include/asm/tlb.h | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/arch/m68k/include/asm/tlb.h b/arch/m68k/include/asm/tlb.h
index 1785cff..74c15f6 100644
--- a/arch/m68k/include/asm/tlb.h
+++ b/arch/m68k/include/asm/tlb.h
@@ -1,19 +1,11 @@
#ifndef _M68K_TLB_H
#define _M68K_TLB_H
-/*
- * m68k doesn't need any special per-pte or
- * per-vma handling..
- */
-#define tlb_start_vma(tlb, vma) do { } while (0)
-#define tlb_end_vma(tlb, vma) do { } while (0)
-#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
-
-/*
- * .. because we flush the whole mm when it
- * fills up.
- */
-#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
+#ifdef CONFIG_MMU && !defined(CONFIG_COLDFIRE) && !defined(CONFIG_SUN3)
+/* These defines are needed to override the defaults from asm-generic/tlb.h */
+#define __pte_free_tlb __pte_free_tlb
+#define __pmd_free_tlb __pmd_free_tlb
+#endif
#include <asm-generic/tlb.h>
--
1.8.4.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 13/27] m68k: Use common bits from generic tlb.h
2014-05-14 18:59 ` [PATCH 13/27] m68k: Use common bits from generic tlb.h Richard Weinberger
@ 2014-05-14 19:19 ` Geert Uytterhoeven
[not found] ` <CAMuHMdUddNc3Suq25JU7UC+YdWQHmk0nCRzCEbqmKg1+a+=FXw@mail.gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-05-14 19:19 UTC (permalink / raw)
To: Richard Weinberger
Cc: Linux-Arch, Arnd Bergmann, linux-kernel@vger.kernel.org,
linux-m68k
On Wed, May 14, 2014 at 8:59 PM, Richard Weinberger <richard@nod.at> wrote:
> --- a/arch/m68k/include/asm/tlb.h
> +++ b/arch/m68k/include/asm/tlb.h
> @@ -1,19 +1,11 @@
> #ifndef _M68K_TLB_H
> #define _M68K_TLB_H
>
> -/*
> - * m68k doesn't need any special per-pte or
> - * per-vma handling..
> - */
> -#define tlb_start_vma(tlb, vma) do { } while (0)
> -#define tlb_end_vma(tlb, vma) do { } while (0)
> -#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
> -
> -/*
> - * .. because we flush the whole mm when it
> - * fills up.
> - */
> -#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
> +#ifdef CONFIG_MMU && !defined(CONFIG_COLDFIRE) && !defined(CONFIG_SUN3)
Syntax error:
#if defined(CONFIG_MMU) && ...
But why this sudden #ifdef checks?
> +/* These defines are needed to override the defaults from asm-generic/tlb.h */
> +#define __pte_free_tlb __pte_free_tlb
> +#define __pmd_free_tlb __pmd_free_tlb
> +#endif
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 13/27] m68k: Use common bits from generic tlb.h
[not found] ` <CAMuHMdUddNc3Suq25JU7UC+YdWQHmk0nCRzCEbqmKg1+a+=FXw@mail.gmail.com>
@ 2014-05-14 19:26 ` Richard Weinberger
2014-05-14 19:34 ` Geert Uytterhoeven
0 siblings, 1 reply; 6+ messages in thread
From: Richard Weinberger @ 2014-05-14 19:26 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux-Arch, Arnd Bergmann, linux-kernel@vger.kernel.org,
linux-m68k
Am 14.05.2014 21:19, schrieb Geert Uytterhoeven:
> On Wed, May 14, 2014 at 8:59 PM, Richard Weinberger <richard@nod.at> wrote:
>> --- a/arch/m68k/include/asm/tlb.h
>> +++ b/arch/m68k/include/asm/tlb.h
>> @@ -1,19 +1,11 @@
>> #ifndef _M68K_TLB_H
>> #define _M68K_TLB_H
>>
>> -/*
>> - * m68k doesn't need any special per-pte or
>> - * per-vma handling..
>> - */
>> -#define tlb_start_vma(tlb, vma) do { } while (0)
>> -#define tlb_end_vma(tlb, vma) do { } while (0)
>> -#define __tlb_remove_tlb_entry(tlb, ptep, address) do { } while (0)
>> -
>> -/*
>> - * .. because we flush the whole mm when it
>> - * fills up.
>> - */
>> -#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm)
>> +#ifdef CONFIG_MMU && !defined(CONFIG_COLDFIRE) && !defined(CONFIG_SUN3)
>
> Syntax error:
>
> #if defined(CONFIG_MMU) && ...
Whoops, thanks for pointing this out.
> But why this sudden #ifdef checks?
They are needed because in pgalloc.h you have:
#ifdef CONFIG_MMU
#include <asm/virtconvert.h>
#if defined(CONFIG_COLDFIRE)
#include <asm/mcf_pgalloc.h>
#elif defined(CONFIG_SUN3)
#include <asm/sun3_pgalloc.h>
#else
#include <asm/motorola_pgalloc.h>
#endif
And only asm/motorola_pgalloc.h have __pte/pmd_free_tlb as static inline functions.
Therefore we need to define them such that the generic tlb.h versions will not clash
with yours.
Thanks,
//richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 13/27] m68k: Use common bits from generic tlb.h
2014-05-14 19:26 ` Richard Weinberger
@ 2014-05-14 19:34 ` Geert Uytterhoeven
2014-05-14 20:57 ` Richard Weinberger
0 siblings, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-05-14 19:34 UTC (permalink / raw)
To: Richard Weinberger
Cc: Linux-Arch, Arnd Bergmann, linux-kernel@vger.kernel.org,
linux-m68k
Hi Richard,
On Wed, May 14, 2014 at 9:26 PM, Richard Weinberger <richard@nod.at> wrote:
>> But why this sudden #ifdef checks?
>
> They are needed because in pgalloc.h you have:
> #ifdef CONFIG_MMU
> #include <asm/virtconvert.h>
> #if defined(CONFIG_COLDFIRE)
> #include <asm/mcf_pgalloc.h>
> #elif defined(CONFIG_SUN3)
> #include <asm/sun3_pgalloc.h>
> #else
> #include <asm/motorola_pgalloc.h>
> #endif
>
> And only asm/motorola_pgalloc.h have __pte/pmd_free_tlb as static inline functions.
> Therefore we need to define them such that the generic tlb.h versions will not clash
> with yours.
Thanks for the clarification!
Perhaps this deserves a comment:
/* Applies to Classic m68k MMU only */
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 13/27] m68k: Use common bits from generic tlb.h
2014-05-14 19:34 ` Geert Uytterhoeven
@ 2014-05-14 20:57 ` Richard Weinberger
2014-05-15 9:49 ` Geert Uytterhoeven
0 siblings, 1 reply; 6+ messages in thread
From: Richard Weinberger @ 2014-05-14 20:57 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Linux-Arch, Arnd Bergmann, linux-kernel@vger.kernel.org,
linux-m68k
Am 14.05.2014 21:34, schrieb Geert Uytterhoeven:
> Hi Richard,
>
> On Wed, May 14, 2014 at 9:26 PM, Richard Weinberger <richard@nod.at> wrote:
>>> But why this sudden #ifdef checks?
>>
>> They are needed because in pgalloc.h you have:
>> #ifdef CONFIG_MMU
>> #include <asm/virtconvert.h>
>> #if defined(CONFIG_COLDFIRE)
>> #include <asm/mcf_pgalloc.h>
>> #elif defined(CONFIG_SUN3)
>> #include <asm/sun3_pgalloc.h>
>> #else
>> #include <asm/motorola_pgalloc.h>
>> #endif
>>
>> And only asm/motorola_pgalloc.h have __pte/pmd_free_tlb as static inline functions.
>> Therefore we need to define them such that the generic tlb.h versions will not clash
>> with yours.
>
> Thanks for the clarification!
One problem which arises here is that me need to make sure that pgalloc.h is included before
tlb.h. Which kind of sucks.
I'll move __pte/pmd_free_tlb from *_pgalloc.h into tlb.h to prevent this issue.
Are you fine with that?
> Perhaps this deserves a comment:
>
> /* Applies to Classic m68k MMU only */
Will add.
Thanks,
//richard
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 13/27] m68k: Use common bits from generic tlb.h
2014-05-14 20:57 ` Richard Weinberger
@ 2014-05-15 9:49 ` Geert Uytterhoeven
0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2014-05-15 9:49 UTC (permalink / raw)
To: Richard Weinberger
Cc: Linux-Arch, Arnd Bergmann, linux-kernel@vger.kernel.org,
linux-m68k
Hi Richard,
On Wed, May 14, 2014 at 10:57 PM, Richard Weinberger <richard@nod.at> wrote:
>> On Wed, May 14, 2014 at 9:26 PM, Richard Weinberger <richard@nod.at> wrote:
>>>> But why this sudden #ifdef checks?
>>>
>>> They are needed because in pgalloc.h you have:
>>> #ifdef CONFIG_MMU
>>> #include <asm/virtconvert.h>
>>> #if defined(CONFIG_COLDFIRE)
>>> #include <asm/mcf_pgalloc.h>
>>> #elif defined(CONFIG_SUN3)
>>> #include <asm/sun3_pgalloc.h>
>>> #else
>>> #include <asm/motorola_pgalloc.h>
>>> #endif
>>>
>>> And only asm/motorola_pgalloc.h have __pte/pmd_free_tlb as static inline functions.
>>> Therefore we need to define them such that the generic tlb.h versions will not clash
>>> with yours.
>>
>> Thanks for the clarification!
>
> One problem which arises here is that me need to make sure that pgalloc.h is included before
> tlb.h. Which kind of sucks.
Indeed.
arch/m68k/include/asm/mmu_context.h includes pgalloc.h, but not tlb.h.
Didn't check whether it gets it indirectly.
> I'll move __pte/pmd_free_tlb from *_pgalloc.h into tlb.h to prevent this issue.
>
> Are you fine with that?
As long as it compiles, I'm happy ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-15 9:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1400093999-18703-1-git-send-email-richard@nod.at>
2014-05-14 18:59 ` [PATCH 13/27] m68k: Use common bits from generic tlb.h Richard Weinberger
2014-05-14 19:19 ` Geert Uytterhoeven
[not found] ` <CAMuHMdUddNc3Suq25JU7UC+YdWQHmk0nCRzCEbqmKg1+a+=FXw@mail.gmail.com>
2014-05-14 19:26 ` Richard Weinberger
2014-05-14 19:34 ` Geert Uytterhoeven
2014-05-14 20:57 ` Richard Weinberger
2014-05-15 9:49 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox