Skip to content

Commit

Permalink
s390/kernel: move EX_TABLE macros to linkage.h header file
Browse files Browse the repository at this point in the history
Move the EX_TABLE macro definitions from the processor.h to the linkage.h
header file.  It helps to reduce circular header file dependencies.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Hendrik Brueckner authored and Martin Schwidefsky committed Jul 22, 2015
1 parent 3827ec3 commit 2e54dc3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
22 changes: 22 additions & 0 deletions arch/s390/include/asm/linkage.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,26 @@
#define __ALIGN .align 4, 0x07
#define __ALIGN_STR __stringify(__ALIGN)

#ifndef __ASSEMBLY__

/*
* Helper macro for exception table entries
*/
#define EX_TABLE(_fault, _target) \
".section __ex_table,\"a\"\n" \
".align 4\n" \
".long (" #_fault ") - .\n" \
".long (" #_target ") - .\n" \
".previous\n"

#else /* __ASSEMBLY__ */

#define EX_TABLE(_fault, _target) \
.section __ex_table,"a" ; \
.align 4 ; \
.long (_fault) - . ; \
.long (_target) - . ; \
.previous

#endif /* __ASSEMBLY__ */
#endif
19 changes: 0 additions & 19 deletions arch/s390/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,25 +336,6 @@ extern void memcpy_absolute(void *, void *, size_t);
memcpy_absolute(&(dest), &__tmp, sizeof(__tmp)); \
}

/*
* Helper macro for exception table entries
*/
#define EX_TABLE(_fault, _target) \
".section __ex_table,\"a\"\n" \
".align 4\n" \
".long (" #_fault ") - .\n" \
".long (" #_target ") - .\n" \
".previous\n"

#else /* __ASSEMBLY__ */

#define EX_TABLE(_fault, _target) \
.section __ex_table,"a" ; \
.align 4 ; \
.long (_fault) - . ; \
.long (_target) - . ; \
.previous

#endif /* __ASSEMBLY__ */

#endif /* __ASM_S390_PROCESSOR_H */

0 comments on commit 2e54dc3

Please sign in to comment.