diff mbox series

[2/2] MIPS: mm: Add prototype for function __uncached_access

Message ID 20210121013435.450471-2-siyanteng@loongson.cn (mailing list archive)
State Superseded
Headers show
Series [1/2] MIPS: mm: Add prototype for function __update_cache | expand

Commit Message

Yanteng Si Jan. 21, 2021, 1:34 a.m. UTC
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(+)

Comments

Thomas Bogendoerfer Jan. 22, 2021, 10:51 a.m. UTC | #1
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.
Jiaxun Yang Jan. 22, 2021, 11:04 a.m. UTC | #2
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 ]
>
diff mbox series

Patch

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