| .. | .. |
|---|
| 2 | 2 | #ifndef _ASM_S390_BUG_H |
|---|
| 3 | 3 | #define _ASM_S390_BUG_H |
|---|
| 4 | 4 | |
|---|
| 5 | | -#include <linux/kernel.h> |
|---|
| 5 | +#include <linux/compiler.h> |
|---|
| 6 | 6 | |
|---|
| 7 | 7 | #ifdef CONFIG_BUG |
|---|
| 8 | 8 | |
|---|
| 9 | 9 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
|---|
| 10 | 10 | |
|---|
| 11 | 11 | #define __EMIT_BUG(x) do { \ |
|---|
| 12 | | - asm volatile( \ |
|---|
| 13 | | - "0: j 0b+2\n" \ |
|---|
| 14 | | - "1:\n" \ |
|---|
| 12 | + asm_inline volatile( \ |
|---|
| 13 | + "0: mc 0,0\n" \ |
|---|
| 15 | 14 | ".section .rodata.str,\"aMS\",@progbits,1\n" \ |
|---|
| 16 | | - "2: .asciz \""__FILE__"\"\n" \ |
|---|
| 15 | + "1: .asciz \""__FILE__"\"\n" \ |
|---|
| 17 | 16 | ".previous\n" \ |
|---|
| 18 | | - ".section __bug_table,\"aw\"\n" \ |
|---|
| 19 | | - "3: .long 1b-3b,2b-3b\n" \ |
|---|
| 17 | + ".section __bug_table,\"awM\",@progbits,%2\n" \ |
|---|
| 18 | + "2: .long 0b-2b,1b-2b\n" \ |
|---|
| 20 | 19 | " .short %0,%1\n" \ |
|---|
| 21 | | - " .org 3b+%2\n" \ |
|---|
| 20 | + " .org 2b+%2\n" \ |
|---|
| 22 | 21 | ".previous\n" \ |
|---|
| 23 | 22 | : : "i" (__LINE__), \ |
|---|
| 24 | 23 | "i" (x), \ |
|---|
| .. | .. |
|---|
| 27 | 26 | |
|---|
| 28 | 27 | #else /* CONFIG_DEBUG_BUGVERBOSE */ |
|---|
| 29 | 28 | |
|---|
| 30 | | -#define __EMIT_BUG(x) do { \ |
|---|
| 31 | | - asm volatile( \ |
|---|
| 32 | | - "0: j 0b+2\n" \ |
|---|
| 33 | | - "1:\n" \ |
|---|
| 34 | | - ".section __bug_table,\"aw\"\n" \ |
|---|
| 35 | | - "2: .long 1b-2b\n" \ |
|---|
| 36 | | - " .short %0\n" \ |
|---|
| 37 | | - " .org 2b+%1\n" \ |
|---|
| 38 | | - ".previous\n" \ |
|---|
| 39 | | - : : "i" (x), \ |
|---|
| 40 | | - "i" (sizeof(struct bug_entry))); \ |
|---|
| 29 | +#define __EMIT_BUG(x) do { \ |
|---|
| 30 | + asm_inline volatile( \ |
|---|
| 31 | + "0: mc 0,0\n" \ |
|---|
| 32 | + ".section __bug_table,\"awM\",@progbits,%1\n" \ |
|---|
| 33 | + "1: .long 0b-1b\n" \ |
|---|
| 34 | + " .short %0\n" \ |
|---|
| 35 | + " .org 1b+%1\n" \ |
|---|
| 36 | + ".previous\n" \ |
|---|
| 37 | + : : "i" (x), \ |
|---|
| 38 | + "i" (sizeof(struct bug_entry))); \ |
|---|
| 41 | 39 | } while (0) |
|---|
| 42 | 40 | |
|---|
| 43 | 41 | #endif /* CONFIG_DEBUG_BUGVERBOSE */ |
|---|