diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-28 10:56:43 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-28 10:56:43 -0400 |
commit | 94c12cc7d196bab34aaa98d38521549fa1e5ef76 (patch) | |
tree | 8e0cec0ed44445d74a2cb5160303d6b4dfb1bc31 /arch/s390/mm/fault.c | |
parent | 25d83cbfaa44e1b9170c0941c3ef52ca39f54ccc (diff) |
[S390] Inline assembly cleanup.
Major cleanup of all s390 inline assemblies. They now have a common
coding style. Quite a few have been shortened, mainly by using register
asm variables. Use of the EX_TABLE macro helps as well. The atomic ops,
bit ops and locking inlines new use the Q-constraint if a newer gcc
is used. That results in slightly better code.
Thanks to Christian Borntraeger for proof reading the changes.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/mm/fault.c')
-rw-r--r-- | arch/s390/mm/fault.c | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index a393c308bb29..f2b9a84dc2bf 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -424,20 +424,13 @@ int pfault_init(void) | |||
424 | 424 | ||
425 | if (pfault_disable) | 425 | if (pfault_disable) |
426 | return -1; | 426 | return -1; |
427 | __asm__ __volatile__( | 427 | asm volatile( |
428 | " diag %1,%0,0x258\n" | 428 | " diag %1,%0,0x258\n" |
429 | "0: j 2f\n" | 429 | "0: j 2f\n" |
430 | "1: la %0,8\n" | 430 | "1: la %0,8\n" |
431 | "2:\n" | 431 | "2:\n" |
432 | ".section __ex_table,\"a\"\n" | 432 | EX_TABLE(0b,1b) |
433 | " .align 4\n" | 433 | : "=d" (rc) : "a" (&refbk), "m" (refbk) : "cc"); |
434 | #ifndef CONFIG_64BIT | ||
435 | " .long 0b,1b\n" | ||
436 | #else /* CONFIG_64BIT */ | ||
437 | " .quad 0b,1b\n" | ||
438 | #endif /* CONFIG_64BIT */ | ||
439 | ".previous" | ||
440 | : "=d" (rc) : "a" (&refbk), "m" (refbk) : "cc" ); | ||
441 | __ctl_set_bit(0, 9); | 434 | __ctl_set_bit(0, 9); |
442 | return rc; | 435 | return rc; |
443 | } | 436 | } |
@@ -450,18 +443,11 @@ void pfault_fini(void) | |||
450 | if (pfault_disable) | 443 | if (pfault_disable) |
451 | return; | 444 | return; |
452 | __ctl_clear_bit(0,9); | 445 | __ctl_clear_bit(0,9); |
453 | __asm__ __volatile__( | 446 | asm volatile( |
454 | " diag %0,0,0x258\n" | 447 | " diag %0,0,0x258\n" |
455 | "0:\n" | 448 | "0:\n" |
456 | ".section __ex_table,\"a\"\n" | 449 | EX_TABLE(0b,0b) |
457 | " .align 4\n" | 450 | : : "a" (&refbk), "m" (refbk) : "cc"); |
458 | #ifndef CONFIG_64BIT | ||
459 | " .long 0b,0b\n" | ||
460 | #else /* CONFIG_64BIT */ | ||
461 | " .quad 0b,0b\n" | ||
462 | #endif /* CONFIG_64BIT */ | ||
463 | ".previous" | ||
464 | : : "a" (&refbk), "m" (refbk) : "cc" ); | ||
465 | } | 451 | } |
466 | 452 | ||
467 | asmlinkage void | 453 | asmlinkage void |