* [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures
@ 2020-05-08 9:30 Huacai Chen
2020-05-08 13:01 ` Thomas Bogendoerfer
0 siblings, 1 reply; 7+ messages in thread
From: Huacai Chen @ 2020-05-08 9:30 UTC (permalink / raw)
To: Thomas Bogendoerfer
Cc: linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Jiaxun Yang,
Huacai Chen
Commit d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to
inst.h") causes a lot of build failures because macros in asm.h conflict
with various subsystems. Some of these conflictions has been fixed (such
as LONG, PANIC and PRINT) by adjusting asm.h, but some of them is nearly
impossible to fix (such as PTR and END). The only reason of including
asm.h in inst.h is that we need the PTR macro which is used by unaligned
load/store helpers. So in this patch we define a new PTR_STR macro and
use it to replace STR(PTR), then we can stop including asm.h to avoid
various build failures.
Fixes: d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to inst.h")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Huacai Chen <chenhc@lemote.com>
---
arch/mips/include/asm/inst.h | 184 ++++++++++++++++++++++---------------------
1 file changed, 95 insertions(+), 89 deletions(-)
diff --git a/arch/mips/include/asm/inst.h b/arch/mips/include/asm/inst.h
index 8254545..6d74ba3 100644
--- a/arch/mips/include/asm/inst.h
+++ b/arch/mips/include/asm/inst.h
@@ -11,9 +11,15 @@
#ifndef _ASM_INST_H
#define _ASM_INST_H
-#include <asm/asm.h>
#include <uapi/asm/inst.h>
+#if (_MIPS_SZPTR == 32)
+#define PTR_STR ".word"
+#endif
+#if (_MIPS_SZPTR == 64)
+#define PTR_STR ".dword"
+#endif
+
/* HACHACHAHCAHC ... */
/* In case some other massaging is needed, keep MIPSInst as wrapper */
@@ -102,8 +108,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -123,8 +129,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -156,10 +162,10 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -184,8 +190,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -207,8 +213,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -227,8 +233,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -260,10 +266,10 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -305,14 +311,14 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
- STR(PTR)"\t5b, 11b\n\t" \
- STR(PTR)"\t6b, 11b\n\t" \
- STR(PTR)"\t7b, 11b\n\t" \
- STR(PTR)"\t8b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
+ PTR_STR"\t5b, 11b\n\t" \
+ PTR_STR"\t6b, 11b\n\t" \
+ PTR_STR"\t7b, 11b\n\t" \
+ PTR_STR"\t8b, 11b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -337,8 +343,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT));\
@@ -358,8 +364,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT)); \
@@ -378,8 +384,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT)); \
@@ -407,10 +413,10 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
".previous" \
: "=&r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT) \
@@ -447,14 +453,14 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
- STR(PTR)"\t5b, 11b\n\t" \
- STR(PTR)"\t6b, 11b\n\t" \
- STR(PTR)"\t7b, 11b\n\t" \
- STR(PTR)"\t8b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
+ PTR_STR"\t5b, 11b\n\t" \
+ PTR_STR"\t6b, 11b\n\t" \
+ PTR_STR"\t7b, 11b\n\t" \
+ PTR_STR"\t8b, 11b\n\t" \
".previous" \
: "=&r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT) \
@@ -480,8 +486,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -501,8 +507,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -534,10 +540,10 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -563,8 +569,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -586,8 +592,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -606,8 +612,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -639,10 +645,10 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -684,14 +690,14 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
- STR(PTR)"\t5b, 11b\n\t" \
- STR(PTR)"\t6b, 11b\n\t" \
- STR(PTR)"\t7b, 11b\n\t" \
- STR(PTR)"\t8b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
+ PTR_STR"\t5b, 11b\n\t" \
+ PTR_STR"\t6b, 11b\n\t" \
+ PTR_STR"\t7b, 11b\n\t" \
+ PTR_STR"\t8b, 11b\n\t" \
".previous" \
: "=&r" (value), "=r" (res) \
: "r" (addr), "i" (-EFAULT)); \
@@ -714,8 +720,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT));\
@@ -735,8 +741,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT)); \
@@ -755,8 +761,8 @@ do { \
"j\t3b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 4b\n\t" \
- STR(PTR)"\t2b, 4b\n\t" \
+ PTR_STR"\t1b, 4b\n\t" \
+ PTR_STR"\t2b, 4b\n\t" \
".previous" \
: "=r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT)); \
@@ -785,10 +791,10 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
".previous" \
: "=&r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT) \
@@ -825,14 +831,14 @@ do { \
"j\t10b\n\t" \
".previous\n\t" \
".section\t__ex_table,\"a\"\n\t" \
- STR(PTR)"\t1b, 11b\n\t" \
- STR(PTR)"\t2b, 11b\n\t" \
- STR(PTR)"\t3b, 11b\n\t" \
- STR(PTR)"\t4b, 11b\n\t" \
- STR(PTR)"\t5b, 11b\n\t" \
- STR(PTR)"\t6b, 11b\n\t" \
- STR(PTR)"\t7b, 11b\n\t" \
- STR(PTR)"\t8b, 11b\n\t" \
+ PTR_STR"\t1b, 11b\n\t" \
+ PTR_STR"\t2b, 11b\n\t" \
+ PTR_STR"\t3b, 11b\n\t" \
+ PTR_STR"\t4b, 11b\n\t" \
+ PTR_STR"\t5b, 11b\n\t" \
+ PTR_STR"\t6b, 11b\n\t" \
+ PTR_STR"\t7b, 11b\n\t" \
+ PTR_STR"\t8b, 11b\n\t" \
".previous" \
: "=&r" (res) \
: "r" (value), "r" (addr), "i" (-EFAULT) \
--
2.7.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures
2020-05-08 9:30 [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures Huacai Chen
@ 2020-05-08 13:01 ` Thomas Bogendoerfer
2020-05-09 4:10 ` Huacai Chen
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Bogendoerfer @ 2020-05-08 13:01 UTC (permalink / raw)
To: Huacai Chen
Cc: linux-mips, Fuxin Zhang, Zhangjin Wu, Huacai Chen, Jiaxun Yang
On Fri, May 08, 2020 at 05:30:12PM +0800, Huacai Chen wrote:
> Commit d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to
> inst.h") causes a lot of build failures because macros in asm.h conflict
> with various subsystems. Some of these conflictions has been fixed (such
> as LONG, PANIC and PRINT) by adjusting asm.h, but some of them is nearly
> impossible to fix (such as PTR and END). The only reason of including
> asm.h in inst.h is that we need the PTR macro which is used by unaligned
> load/store helpers. So in this patch we define a new PTR_STR macro and
> use it to replace STR(PTR), then we can stop including asm.h to avoid
> various build failures.
>
> Fixes: d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to inst.h")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> ---
> arch/mips/include/asm/inst.h | 184 ++++++++++++++++++++++---------------------
applied to mips-next. /me hopes this is the last fix... thanks
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] 7+ messages in thread
* Re: [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures
2020-05-08 13:01 ` Thomas Bogendoerfer
@ 2020-05-09 4:10 ` Huacai Chen
2020-05-09 15:25 ` Thomas Bogendoerfer
0 siblings, 1 reply; 7+ messages in thread
From: Huacai Chen @ 2020-05-09 4:10 UTC (permalink / raw)
To: Thomas Bogendoerfer; +Cc: open list:MIPS, Fuxin Zhang, Zhangjin Wu, Jiaxun Yang
Hi, Thomas,
On Fri, May 8, 2020 at 9:31 PM Thomas Bogendoerfer
<tsbogend@alpha.franken.de> wrote:
>
> On Fri, May 08, 2020 at 05:30:12PM +0800, Huacai Chen wrote:
> > Commit d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to
> > inst.h") causes a lot of build failures because macros in asm.h conflict
> > with various subsystems. Some of these conflictions has been fixed (such
> > as LONG, PANIC and PRINT) by adjusting asm.h, but some of them is nearly
> > impossible to fix (such as PTR and END). The only reason of including
> > asm.h in inst.h is that we need the PTR macro which is used by unaligned
> > load/store helpers. So in this patch we define a new PTR_STR macro and
> > use it to replace STR(PTR), then we can stop including asm.h to avoid
> > various build failures.
> >
> > Fixes: d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to inst.h")
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> > ---
> > arch/mips/include/asm/inst.h | 184 ++++++++++++++++++++++---------------------
>
> applied to mips-next. /me hopes this is the last fix... thanks
I think this is the last fix... and, does "MIPS: asm: Rename some
macros to avoid build errors" need to be reverted?
Huacai
>
> 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] 7+ messages in thread
* Re: [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures
2020-05-09 4:10 ` Huacai Chen
@ 2020-05-09 15:25 ` Thomas Bogendoerfer
2020-05-12 23:52 ` Maciej W. Rozycki
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Bogendoerfer @ 2020-05-09 15:25 UTC (permalink / raw)
To: Huacai Chen; +Cc: open list:MIPS, Fuxin Zhang, Zhangjin Wu, Jiaxun Yang
On Sat, May 09, 2020 at 12:10:05PM +0800, Huacai Chen wrote:
> On Fri, May 8, 2020 at 9:31 PM Thomas Bogendoerfer
> <tsbogend@alpha.franken.de> wrote:
> >
> > On Fri, May 08, 2020 at 05:30:12PM +0800, Huacai Chen wrote:
> > > Commit d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to
> > > inst.h") causes a lot of build failures because macros in asm.h conflict
> > > with various subsystems. Some of these conflictions has been fixed (such
> > > as LONG, PANIC and PRINT) by adjusting asm.h, but some of them is nearly
> > > impossible to fix (such as PTR and END). The only reason of including
> > > asm.h in inst.h is that we need the PTR macro which is used by unaligned
> > > load/store helpers. So in this patch we define a new PTR_STR macro and
> > > use it to replace STR(PTR), then we can stop including asm.h to avoid
> > > various build failures.
> > >
> > > Fixes: d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to inst.h")
> > > Reported-by: kbuild test robot <lkp@intel.com>
> > > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> > > ---
> > > arch/mips/include/asm/inst.h | 184 ++++++++++++++++++++++---------------------
> >
> > applied to mips-next. /me hopes this is the last fix... thanks
> I think this is the last fix... and, does "MIPS: asm: Rename some
> macros to avoid build errors" need to be reverted?
let's keep it as it is now.
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] 7+ messages in thread
* Re: [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures
2020-05-09 15:25 ` Thomas Bogendoerfer
@ 2020-05-12 23:52 ` Maciej W. Rozycki
2020-05-14 5:46 ` Huacai Chen
0 siblings, 1 reply; 7+ messages in thread
From: Maciej W. Rozycki @ 2020-05-12 23:52 UTC (permalink / raw)
To: Thomas Bogendoerfer
Cc: Huacai Chen, open list:MIPS, Fuxin Zhang, Zhangjin Wu, Jiaxun Yang
On Sat, 9 May 2020, Thomas Bogendoerfer wrote:
> > > > Commit d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to
> > > > inst.h") causes a lot of build failures because macros in asm.h conflict
> > > > with various subsystems. Some of these conflictions has been fixed (such
> > > > as LONG, PANIC and PRINT) by adjusting asm.h, but some of them is nearly
> > > > impossible to fix (such as PTR and END). The only reason of including
> > > > asm.h in inst.h is that we need the PTR macro which is used by unaligned
> > > > load/store helpers. So in this patch we define a new PTR_STR macro and
> > > > use it to replace STR(PTR), then we can stop including asm.h to avoid
> > > > various build failures.
> > > >
> > > > Fixes: d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to inst.h")
> > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> > > > ---
> > > > arch/mips/include/asm/inst.h | 184 ++++++++++++++++++++++---------------------
> > >
> > > applied to mips-next. /me hopes this is the last fix... thanks
> > I think this is the last fix... and, does "MIPS: asm: Rename some
> > macros to avoid build errors" need to be reverted?
>
> let's keep it as it is now.
Sigh, this just shows how the original change was wrong in the first
place. Why was <asm/inst.h> specifically chosen, whose purpose has been
machine code generators/interpreters that has nothing to do with unaligned
access helpers, over a more suitable location, such as (maybe obviously?)
<asm/unaligned.h>?
I suggest that we roll back to before the destruction, move the necessary
bits away from <asm/inst.h>, and then perhaps none of the follow-up hacks
will be required.
Maciej
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures
2020-05-12 23:52 ` Maciej W. Rozycki
@ 2020-05-14 5:46 ` Huacai Chen
2020-05-14 12:23 ` Maciej W. Rozycki
0 siblings, 1 reply; 7+ messages in thread
From: Huacai Chen @ 2020-05-14 5:46 UTC (permalink / raw)
To: Maciej W. Rozycki
Cc: Thomas Bogendoerfer, open list:MIPS, Fuxin Zhang, Zhangjin Wu,
Jiaxun Yang
Hi, Maciej,
On Thu, May 14, 2020 at 6:55 AM Maciej W. Rozycki <macro@linux-mips.org> wrote:
>
> On Sat, 9 May 2020, Thomas Bogendoerfer wrote:
>
> > > > > Commit d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to
> > > > > inst.h") causes a lot of build failures because macros in asm.h conflict
> > > > > with various subsystems. Some of these conflictions has been fixed (such
> > > > > as LONG, PANIC and PRINT) by adjusting asm.h, but some of them is nearly
> > > > > impossible to fix (such as PTR and END). The only reason of including
> > > > > asm.h in inst.h is that we need the PTR macro which is used by unaligned
> > > > > load/store helpers. So in this patch we define a new PTR_STR macro and
> > > > > use it to replace STR(PTR), then we can stop including asm.h to avoid
> > > > > various build failures.
> > > > >
> > > > > Fixes: d339cd02b888eb8 ("MIPS: Move unaligned load/store helpers to inst.h")
> > > > > Reported-by: kbuild test robot <lkp@intel.com>
> > > > > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> > > > > ---
> > > > > arch/mips/include/asm/inst.h | 184 ++++++++++++++++++++++---------------------
> > > >
> > > > applied to mips-next. /me hopes this is the last fix... thanks
> > > I think this is the last fix... and, does "MIPS: asm: Rename some
> > > macros to avoid build errors" need to be reverted?
> >
> > let's keep it as it is now.
>
> Sigh, this just shows how the original change was wrong in the first
> place. Why was <asm/inst.h> specifically chosen, whose purpose has been
> machine code generators/interpreters that has nothing to do with unaligned
> access helpers, over a more suitable location, such as (maybe obviously?)
> <asm/unaligned.h>?
>
> I suggest that we roll back to before the destruction, move the necessary
> bits away from <asm/inst.h>, and then perhaps none of the follow-up hacks
> will be required.
I think you are right, but it is too late... so, I think we needn't roll back.
>
> Maciej
>
>
Huacai
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures
2020-05-14 5:46 ` Huacai Chen
@ 2020-05-14 12:23 ` Maciej W. Rozycki
0 siblings, 0 replies; 7+ messages in thread
From: Maciej W. Rozycki @ 2020-05-14 12:23 UTC (permalink / raw)
To: Huacai Chen
Cc: Maciej W. Rozycki, Thomas Bogendoerfer, open list:MIPS,
Fuxin Zhang, Zhangjin Wu, Jiaxun Yang
On Thu, 14 May 2020, Huacai Chen wrote:
> > Sigh, this just shows how the original change was wrong in the first
> > place. Why was <asm/inst.h> specifically chosen, whose purpose has been
> > machine code generators/interpreters that has nothing to do with unaligned
> > access helpers, over a more suitable location, such as (maybe obviously?)
> > <asm/unaligned.h>?
> >
> > I suggest that we roll back to before the destruction, move the necessary
> > bits away from <asm/inst.h>, and then perhaps none of the follow-up hacks
> > will be required.
> I think you are right, but it is too late... so, I think we needn't roll back.
Well, your change hasn't even hit the mainline yet, and anyway it's never
too late to get things right (it's not like software gets cast in stone)
and as I say these bits do not functionally belong to <asm/inst.h>.
Maciej
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-05-14 12:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08 9:30 [PATCH] MIPS: inst.h: Stop including asm.h to avoid various build failures Huacai Chen
2020-05-08 13:01 ` Thomas Bogendoerfer
2020-05-09 4:10 ` Huacai Chen
2020-05-09 15:25 ` Thomas Bogendoerfer
2020-05-12 23:52 ` Maciej W. Rozycki
2020-05-14 5:46 ` Huacai Chen
2020-05-14 12:23 ` Maciej W. Rozycki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.