Commit c6ac667
powerpc/64e/interrupt: Fix nvgprs being clobbered
Some interrupt handlers have an "extra" that saves 1 or 2
registers (r14, r15) in the paca save area and makes them available to
use by the handler.
The change to always save nvgprs in exception handlers lead to some
interrupt handlers saving those scratch r14 / r15 registers into the
interrupt frame's GPR saves, which get restored on interrupt exit.
Fix this by always reloading those scratch registers from paca before
the EXCEPTION_COMMON that saves nvgprs.
Fixes: 4228b2c ("powerpc/64e/interrupt: always save nvgprs on interrupt")
Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210514044008.1955783-1-npiggin@gmail.com1 parent 4ec5fee commit c6ac667
1 file changed
Lines changed: 24 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
343 | 349 | | |
344 | 350 | | |
345 | 351 | | |
| |||
535 | 541 | | |
536 | 542 | | |
537 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
538 | 548 | | |
539 | 549 | | |
540 | 550 | | |
| |||
544 | 554 | | |
545 | 555 | | |
546 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
547 | 561 | | |
548 | 562 | | |
549 | 563 | | |
| |||
557 | 571 | | |
558 | 572 | | |
559 | 573 | | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
560 | 578 | | |
561 | 579 | | |
562 | 580 | | |
| |||
565 | 583 | | |
566 | 584 | | |
567 | 585 | | |
568 | | - | |
569 | 586 | | |
570 | | - | |
571 | 587 | | |
| 588 | + | |
| 589 | + | |
572 | 590 | | |
573 | 591 | | |
574 | 592 | | |
| |||
725 | 743 | | |
726 | 744 | | |
727 | 745 | | |
728 | | - | |
729 | 746 | | |
730 | | - | |
731 | 747 | | |
732 | 748 | | |
| 749 | + | |
| 750 | + | |
733 | 751 | | |
734 | 752 | | |
735 | 753 | | |
| |||
796 | 814 | | |
797 | 815 | | |
798 | 816 | | |
799 | | - | |
800 | 817 | | |
801 | | - | |
802 | 818 | | |
803 | 819 | | |
| 820 | + | |
| 821 | + | |
804 | 822 | | |
805 | 823 | | |
806 | 824 | | |
| |||
931 | 949 | | |
932 | 950 | | |
933 | 951 | | |
934 | | - | |
935 | | - | |
936 | 952 | | |
937 | | - | |
938 | | - | |
939 | 953 | | |
940 | 954 | | |
941 | 955 | | |
| |||
944 | 958 | | |
945 | 959 | | |
946 | 960 | | |
947 | | - | |
948 | | - | |
949 | 961 | | |
950 | | - | |
951 | | - | |
952 | 962 | | |
953 | 963 | | |
954 | 964 | | |
| |||
0 commit comments