diff mbox series

MIPS: inst.h: Stop including asm.h to avoid various build failures

Message ID 1588930212-5255-1-git-send-email-chenhc@lemote.com (mailing list archive)
State Mainlined
Commit e701656ec4db60f560f7b790235fe94819837db3
Headers show
Series MIPS: inst.h: Stop including asm.h to avoid various build failures | expand

Commit Message

Huacai Chen May 8, 2020, 9:30 a.m. UTC
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(-)

Comments

Thomas Bogendoerfer May 8, 2020, 1:01 p.m. UTC | #1
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.
Huacai Chen May 9, 2020, 4:10 a.m. UTC | #2
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 ]
Thomas Bogendoerfer May 9, 2020, 3:25 p.m. UTC | #3
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.
Maciej W. Rozycki May 12, 2020, 11:52 p.m. UTC | #4
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
Huacai Chen May 14, 2020, 5:46 a.m. UTC | #5
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
Maciej W. Rozycki May 14, 2020, 12:23 p.m. UTC | #6
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
diff mbox series

Patch

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)    \