* [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache
@ 2021-01-21 1:34 Yanteng Si
2021-01-21 1:34 ` [PATCH 2/2] MIPS: mm: Add prototype for function __uncached_access Yanteng Si
2021-01-22 10:50 ` [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache Thomas Bogendoerfer
0 siblings, 2 replies; 5+ messages in thread
From: Yanteng Si @ 2021-01-21 1:34 UTC (permalink / raw)
To: Thomas Bogendoerfer
Cc: Huacai Chen, Jiaxun Yang, linux-mips, siyanteng01, Yanteng Si
This commit adds a prototype to fix error at W=1:
arch/mips/mm/cache.c:129:6: error: no previous prototype
for '__update_cache' [-Werror=missing-prototypes]
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
arch/mips/include/asm/pgtable.h | 2 +-
arch/mips/mm/cache.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 4d3ab682d093..804889b70965 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -64,6 +64,7 @@ struct vm_area_struct;
#define __S111 __pgprot(0)
extern unsigned long _page_cachable_default;
+extern void __update_cache(unsigned long address, pte_t pte);
/*
* ZERO_PAGE is a global shared page that is always zero; used
@@ -224,7 +225,6 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pteval)
{
- extern void __update_cache(unsigned long address, pte_t pte);
if (!pte_present(pteval))
goto cache_sync_done;
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 23b16bfd97b2..27f4228dd24e 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -21,6 +21,7 @@
#include <asm/cpu.h>
#include <asm/cpu-features.h>
#include <asm/setup.h>
+#include <asm/pgtable.h>
/* Cache operations. */
void (*flush_cache_all)(void);
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] MIPS: mm: Add prototype for function __uncached_access
2021-01-21 1:34 [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache Yanteng Si
@ 2021-01-21 1:34 ` Yanteng Si
2021-01-22 10:51 ` Thomas Bogendoerfer
2021-01-22 10:50 ` [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache Thomas Bogendoerfer
1 sibling, 1 reply; 5+ messages in thread
From: Yanteng Si @ 2021-01-21 1:34 UTC (permalink / raw)
To: Thomas Bogendoerfer
Cc: Huacai Chen, Jiaxun Yang, linux-mips, siyanteng01, Yanteng Si
This commit adds a prototype to fix error at W=1:
arch/mips/mm/cache.c:211:12: error: no previous prototype
for '__uncached_access' [-Werror=missing-prototypes]
Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
arch/mips/include/asm/pgtable.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
index 804889b70965..76d36484a0ad 100644
--- a/arch/mips/include/asm/pgtable.h
+++ b/arch/mips/include/asm/pgtable.h
@@ -65,6 +65,7 @@ struct vm_area_struct;
extern unsigned long _page_cachable_default;
extern void __update_cache(unsigned long address, pte_t pte);
+extern int __weak __uncached_access(struct file *file, unsigned long addr);
/*
* ZERO_PAGE is a global shared page that is always zero; used
--
2.27.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache
2021-01-21 1:34 [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache Yanteng Si
2021-01-21 1:34 ` [PATCH 2/2] MIPS: mm: Add prototype for function __uncached_access Yanteng Si
@ 2021-01-22 10:50 ` Thomas Bogendoerfer
1 sibling, 0 replies; 5+ messages in thread
From: Thomas Bogendoerfer @ 2021-01-22 10:50 UTC (permalink / raw)
To: Yanteng Si; +Cc: Huacai Chen, Jiaxun Yang, linux-mips, siyanteng01
On Thu, Jan 21, 2021 at 09:34:34AM +0800, Yanteng Si wrote:
> This commit adds a prototype to fix error at W=1:
>
> arch/mips/mm/cache.c:129:6: error: no previous prototype
> for '__update_cache' [-Werror=missing-prototypes]
>
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
> arch/mips/include/asm/pgtable.h | 2 +-
> arch/mips/mm/cache.c | 1 +
> 2 files changed, 2 insertions(+), 1 deletion(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] MIPS: mm: Add prototype for function __uncached_access
2021-01-21 1:34 ` [PATCH 2/2] MIPS: mm: Add prototype for function __uncached_access Yanteng Si
@ 2021-01-22 10:51 ` Thomas Bogendoerfer
2021-01-22 11:04 ` Jiaxun Yang
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Bogendoerfer @ 2021-01-22 10:51 UTC (permalink / raw)
To: Yanteng Si; +Cc: Huacai Chen, Jiaxun Yang, linux-mips, siyanteng01
On Thu, Jan 21, 2021 at 09:34:35AM +0800, Yanteng Si wrote:
> This commit adds a prototype to fix error at W=1:
>
> arch/mips/mm/cache.c:211:12: error: no previous prototype
> for '__uncached_access' [-Werror=missing-prototypes]
>
> Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> ---
> arch/mips/include/asm/pgtable.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
> index 804889b70965..76d36484a0ad 100644
> --- a/arch/mips/include/asm/pgtable.h
> +++ b/arch/mips/include/asm/pgtable.h
> @@ -65,6 +65,7 @@ struct vm_area_struct;
>
> extern unsigned long _page_cachable_default;
> extern void __update_cache(unsigned long address, pte_t pte);
> +extern int __weak __uncached_access(struct file *file, unsigned long addr);
I'm in favour of removing __uncached_access(). Is there a real good reason
for the special loongson2ef treatment ?
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] MIPS: mm: Add prototype for function __uncached_access
2021-01-22 10:51 ` Thomas Bogendoerfer
@ 2021-01-22 11:04 ` Jiaxun Yang
0 siblings, 0 replies; 5+ messages in thread
From: Jiaxun Yang @ 2021-01-22 11:04 UTC (permalink / raw)
To: Thomas Bogendoerfer, Yanteng Si; +Cc: Huacai Chen, linux-mips, siyanteng01
On Fri, Jan 22, 2021, at 6:51 PM, Thomas Bogendoerfer wrote:
> On Thu, Jan 21, 2021 at 09:34:35AM +0800, Yanteng Si wrote:
> > This commit adds a prototype to fix error at W=1:
> >
> > arch/mips/mm/cache.c:211:12: error: no previous prototype
> > for '__uncached_access' [-Werror=missing-prototypes]
> >
> > Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
> > ---
> > arch/mips/include/asm/pgtable.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h
> > index 804889b70965..76d36484a0ad 100644
> > --- a/arch/mips/include/asm/pgtable.h
> > +++ b/arch/mips/include/asm/pgtable.h
> > @@ -65,6 +65,7 @@ struct vm_area_struct;
> >
> > extern unsigned long _page_cachable_default;
> > extern void __update_cache(unsigned long address, pte_t pte);
> > +extern int __weak __uncached_access(struct file *file, unsigned long addr);
>
> I'm in favour of removing __uncached_access(). Is there a real good reason
> for the special loongson2ef treatment ?
It was used to workaround a mesa bug which may access VRAM without O_SYNC.
I believe it's nolonger required after ~10 years.
Yanteng, you can just remove that.
Thanks.
>
> Thomas.
>
> --
> Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> good idea. [ RFC1925, 2.3 ]
>
--
- Jiaxun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-22 12:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 1:34 [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache Yanteng Si
2021-01-21 1:34 ` [PATCH 2/2] MIPS: mm: Add prototype for function __uncached_access Yanteng Si
2021-01-22 10:51 ` Thomas Bogendoerfer
2021-01-22 11:04 ` Jiaxun Yang
2021-01-22 10:50 ` [PATCH 1/2] MIPS: mm: Add prototype for function __update_cache Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).