Re: [PATCH] MIPS: clean up CONFIG_MIPS_PGD_C0_CONTEXT handling
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
Date: 2021-03-07 20:54:49
Also in:
linux-arch, linux-mm
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
Date: 2021-03-07 20:54:49
Also in:
linux-arch, linux-mm
On Fri, 5 Mar 2021, Huang Pei wrote:
/home/hp/projects/Linux/temp/linux-stable/arch/mips/include/asm/io.h: In function ‘phys_to_virt’: /home/hp/projects/Linux/temp/linux-stable/arch/mips/include/asm/io.h:122:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] return (void *)(address + PAGE_OFFSET - PHYS_OFFSET); ......... Only change CAC_BASE Does NOT work
Thank you for checking. Right. I don't know why it fails for `phys_to_virt' where `address' is of the `unsigned long' type, but there are other places where the macros themselves are cast to `void *'. We may want to rework that stuff, but not necessarily on this occasion. Use an explicit cast of the macro to `s64' here then, as my other suggestion was. Anything is better than hardcoded magic numbers. Maciej