]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
fix(gicv3): restore scr_el3 after changing it
authorBoyan Karatotev <boyan.karatotev@arm.com>
Thu, 23 Mar 2023 12:46:53 +0000 (12:46 +0000)
committerBoyan Karatotev <boyan.karatotev@arm.com>
Fri, 5 May 2023 12:16:18 +0000 (13:16 +0100)
EL3's context is poorly defined as it is and polluting it further is not
a good idea. Put it back as it was before the function call.

Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com>
Change-Id: I9d13c9517962b501246989fd2126d08410191784

drivers/arm/gic/v3/gicv3_main.c

index 168d0ebc9f7aed1cd1986734032e854c7ef87363..2c748000160e7d1ca5a2e08859fb7caae84d556b 100644 (file)
@@ -330,6 +330,8 @@ void gicv3_cpuif_enable(unsigned int proc_num)
        /* Enable Group1 Secure interrupts */
        write_icc_igrpen1_el3(read_icc_igrpen1_el3() |
                                IGRPEN1_EL3_ENABLE_G1S_BIT);
+       /* and restore the original */
+       write_scr_el3(scr_el3);
        isb();
        /* Add DSB to ensure visibility of System register writes */
        dsb();