openrisc: make function cache_loop() inline
PATCH v2 1/1 openrisc: make function cache_loop() inline
The third operand of mtspr instruction must be a constant. To guarantee this condition, function cache_loop() which uses macro mtspr() must be inlined. So let's force it as 'inline'. This is to fix compiling error with new option CONFIG_NO_AUTO_INLINE.
In file included from arch/openrisc/mm/cache.c:17:0:arch/openrisc/mm/cache.c: In function 'cache_loop':arch/openrisc/include/asm/spr.h:20:27: warning: asm operand 0 probably doesn't match constraints
^
arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr'
mtspr(reg, line);
^~~~~arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'
--- arch/openrisc/mm/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/openrisc/mm/cache.c +1 -1
@@ -20,7 +20,7 @@#include <asm/cacheflush.h> #include <asm/tlbflush.h> -static void cache_loop (struct page *page,const unsigned int reg) +static inline void cache_loop (struct page *page,const unsigned int reg) {unsigned long paddr =page_to_pfn (page) <<PAGE_SHIFT ;unsigned long line = paddr & ~(L1_CACHE_BYTES -1 );
Signature · 1 line
2.17.1
Hi, Yamada,
Could you add this patch to your kbuild tree? Horne already acked it.
Quoted 39 lines · Changbin Du
The third operand of mtspr instruction must be a constant. To guarantee this condition, function
cache_loop()which uses macromtspr()must be inlined. So let's force it as 'inline'. This is to fix compiling error with new optionCONFIG_NO_AUTO_INLINE.In file included from
arch/openrisc/mm/cache.c:17:0:arch/openrisc/mm/cache.c: In function 'cache_loop':arch/openrisc/include/asm/spr.h:20:27: warning: asm operand 0 probably doesn't match constraints^ arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr' mtspr(reg, line); ^~~~~
arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'Signed-off-by Changbin Du <[email protected]>Reported-by kbuild test robot <[email protected]>Cc Stafford Horne <[email protected]>Cc Masahiro Yamada <[email protected]>Acked-by Stafford Horne <[email protected]>--- arch/openrisc/mm/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/openrisc/mm/cache.c +1
-1@@ -20,7 +20,7 @@#include <asm/cacheflush.h> #include <asm/tlbflush.h> -static void cache_loop (struct page *page,const unsigned int reg) +static inline void cache_loop (struct page *page,const unsigned int reg) {unsigned long paddr =page_to_pfn (page) <<PAGE_SHIFT ;unsigned long line = paddr & ~(L1_CACHE_BYTES -1 );Signature · 1 line
2.17.1
Signature · 2 lines
Cheers, Changbin Du
Quoted 24 lines · Changbin Du
Hi, Yamada,
Could you add this patch to your kbuild tree? Horne already acked it.Quoted 19 lines · Changbin Du
The third operand of mtspr instruction must be a constant. To guarantee this condition, function
cache_loop()which uses macromtspr()must be inlined. So let's force it as 'inline'. This is to fix compiling error with new optionCONFIG_NO_AUTO_INLINE.In file included from
arch/openrisc/mm/cache.c:17:0:arch/openrisc/mm/cache.c: In function 'cache_loop':arch/openrisc/include/asm/spr.h:20:27: warning: asm operand 0 probably doesn't match constraints^ arch/openrisc/mm/cache.c:29:3: note: in expansion of macro 'mtspr' mtspr(reg, line); ^~~~~
arch/openrisc/include/asm/spr.h:20:27: error: impossible constraint in 'asm'Signed-off-by Changbin Du <[email protected]>Reported-by kbuild test robot <[email protected]>Cc Stafford Horne <[email protected]>Cc Masahiro Yamada <[email protected]>Acked-by Stafford Horne <[email protected]>
Now applied to linux-kbuild.
Thanks!
Quoted 24 lines
Quoted 18 lines
--- arch/openrisc/mm/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/openrisc/mm/cache.c +1
-2@@ -20,7 +20,7 @@#include <asm/cacheflush.h> #include <asm/tlbflush.h> -static void cache_loop (struct page *page,const unsigned int reg) +static inline void cache_loop (struct page *page,const unsigned int reg) {unsigned long paddr =page_to_pfn (page) <<PAGE_SHIFT ;unsigned long line = paddr & ~(L1_CACHE_BYTES -1 ); --Quoted 2 lines
2.17.1
--
Cheers,
Changbin Du
Signature · 2 lines
Best Regards Masahiro Yamada