Patch "firmware: psci: Fix return value from psci_system_suspend()" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    firmware: psci: Fix return value from psci_system_suspend()

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     firmware-psci-fix-return-value-from-psci_system_susp.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 49bf0830ed0528bee6b838f10b80fb1e4465036f
Author: Sudeep Holla <sudeep.holla@xxxxxxx>
Date:   Wed May 15 10:55:28 2024 +0100

    firmware: psci: Fix return value from psci_system_suspend()
    
    [ Upstream commit e7c3696d4692e8046d25f6e63f983e934e12f2c5 ]
    
    Currently we return the value from invoke_psci_fn() directly as return
    value from psci_system_suspend(). It is wrong to send the PSCI interface
    return value directly. psci_to_linux_errno() provide the mapping from
    PSCI return value to the one that can be returned to the callers within
    the kernel.
    
    Use psci_to_linux_errno() to convert and return the correct value from
    psci_system_suspend().
    
    Fixes: faf7ec4a92c0 ("drivers: firmware: psci: add system suspend support")
    Acked-by: Mark Rutland <mark.rutland@xxxxxxx>
    Signed-off-by: Sudeep Holla <sudeep.holla@xxxxxxx>
    Link: https://lore.kernel.org/r/20240515095528.1949992-1-sudeep.holla@xxxxxxx
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index d9629ff878619..2328ca58bba61 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -497,10 +497,12 @@ int psci_cpu_suspend_enter(u32 state)
 
 static int psci_system_suspend(unsigned long unused)
 {
+	int err;
 	phys_addr_t pa_cpu_resume = __pa_symbol(cpu_resume);
 
-	return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
+	err = invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
 			      pa_cpu_resume, 0, 0);
+	return psci_to_linux_errno(err);
 }
 
 static int psci_system_suspend_enter(suspend_state_t state)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux