Skip to contentSkip to conversation

drivers: firmware: psci: Use __pa_symbol for cpu_resume

PATCH New Geert Uytterhoeven 4 participants 4 messages Jan 24, 2017 – Jan 25, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers: firmware: psci: Use __pa_symbol for cpu_resume

If CONFIG_DEBUG_VIRTUAL=y, during s2ram:

    virt_to_phys used for non-linear address: ffffff80085db280 (cpu_resume+0x0/0x20)
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1628 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60
    ...
    [<ffffff800809abb4>] __virt_to_phys+0x28/0x60
    [<ffffff80084a0c38>] psci_system_suspend+0x20/0x44
    [<ffffff8008095b28>] cpu_suspend+0x3c/0x68
    [<ffffff80084a0b48>] psci_system_suspend_enter+0x18/0x20
    [<ffffff80080ea3e0>] suspend_devices_and_enter+0x3f8/0x7e8
    [<ffffff80080ead14>] pm_suspend+0x544/0x5f4
Fixes 1a08e3d9e0ac4577 ("drivers: firmware: psci: Use __pa_symbol for kernel symbol")
---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/psci.c +1 -1
index 66a8793f3b3793ff..493a56a4cfc4a836 100644
@@ -419,7 +419,7 @@ int psci_cpu_suspend_enter(unsigned long index)
 static int psci_system_suspend(unsigned long unused)
 {
 	return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
-			      virt_to_phys(cpu_resume), 0, 0);
+			      __pa_symbol(cpu_resume), 0, 0);
 }
 
 static int psci_system_suspend_enter(suspend_state_t state)
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 drivers: firmware: psci: Use __pa_symbol for cpu_resume

Quoted 13 lines · Geert Uytterhoeven

If CONFIG_DEBUG_VIRTUAL=y, during s2ram:

    virt_to_phys used for non-linear address: ffffff80085db280 (cpu_resume+0x0/0x20)
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1628 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60
    ...
    [<ffffff800809abb4>] __virt_to_phys+0x28/0x60
    [<ffffff80084a0c38>] psci_system_suspend+0x20/0x44
    [<ffffff8008095b28>] cpu_suspend+0x3c/0x68
    [<ffffff80084a0b48>] psci_system_suspend_enter+0x18/0x20
    [<ffffff80080ea3e0>] suspend_devices_and_enter+0x3f8/0x7e8
    [<ffffff80080ead14>] pm_suspend+0x544/0x5f4
Quoted 2 lines
Fixes 1a08e3d9e0ac4577 ("drivers: firmware: psci: Use __pa_symbol for kernel symbol")

Argh, I should have spotted this. :(

This should go via the arm64 tree -- Will, could you pick this up?

Thanks,
Mark.

Quoted 20 lines
---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/psci.c +1 -1
index 66a8793f3b3793ff..493a56a4cfc4a836 100644
@@ -419,7 +419,7 @@ int psci_cpu_suspend_enter(unsigned long index)
 static int psci_system_suspend(unsigned long unused)
 {
 	return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
-			      virt_to_phys(cpu_resume), 0, 0);
+			      __pa_symbol(cpu_resume), 0, 0);
 }
 
 static int psci_system_suspend_enter(suspend_state_t state)
Signature · 1 line
1.9.1
#2 lore raw

PATCH 1/1 drivers: firmware: psci: Use __pa_symbol for cpu_resume

Quoted 14 lines · Mark Rutland
Quoted 13 lines · Geert Uytterhoeven

If CONFIG_DEBUG_VIRTUAL=y, during s2ram:

    virt_to_phys used for non-linear address: ffffff80085db280 (cpu_resume+0x0/0x20)
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1628 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60
    ...
    [<ffffff800809abb4>] __virt_to_phys+0x28/0x60
    [<ffffff80084a0c38>] psci_system_suspend+0x20/0x44
    [<ffffff8008095b28>] cpu_suspend+0x3c/0x68
    [<ffffff80084a0b48>] psci_system_suspend_enter+0x18/0x20
    [<ffffff80080ea3e0>] suspend_devices_and_enter+0x3f8/0x7e8
    [<ffffff80080ead14>] pm_suspend+0x544/0x5f4
Quoted 8 lines
Quoted 2 lines
Fixes 1a08e3d9e0ac4577 ("drivers: firmware: psci: Use __pa_symbol for kernel symbol")

Argh, I should have spotted this. :(

This should go via the arm64 tree -- Will, could you pick this up?

Yup, I'll queue this along with the other __pa_symbol fix.

Cheers,

Will

#3 lore raw

PATCH 1/1 drivers: firmware: psci: Use __pa_symbol for cpu_resume

In reply to Geert Uytterhoeven
Quoted 25 lines · Geert Uytterhoeven

If CONFIG_DEBUG_VIRTUAL=y, during s2ram:

    virt_to_phys used for non-linear address: ffffff80085db280 (cpu_resume+0x0/0x20)
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 1628 at arch/arm64/mm/physaddr.c:14 __virt_to_phys+0x28/0x60
    ...
    [<ffffff800809abb4>] __virt_to_phys+0x28/0x60
    [<ffffff80084a0c38>] psci_system_suspend+0x20/0x44
    [<ffffff8008095b28>] cpu_suspend+0x3c/0x68
    [<ffffff80084a0b48>] psci_system_suspend_enter+0x18/0x20
    [<ffffff80080ea3e0>] suspend_devices_and_enter+0x3f8/0x7e8
    [<ffffff80080ead14>] pm_suspend+0x544/0x5f4
Fixes 1a08e3d9e0ac4577 ("drivers: firmware: psci: Use __pa_symbol for kernel symbol")
---
 drivers/firmware/psci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/psci.c +0 -0
index 66a8793f3b3793ff..493a56a4cfc4a836 100644

drivers/firmware/psci.c int psci_cpu_suspend_enter(unsigned long index) · line 425

Quoted 8 lines
drivers/firmware/psci.c +1 -1
@@ -419,7 +419,7 @@ int psci_cpu_suspend_enter(unsigned long index)
 static int psci_system_suspend(unsigned long unused)
 {
 	return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
-			      virt_to_phys(cpu_resume), 0, 0);
+			      __pa_symbol(cpu_resume), 0, 0);
 }
 
 static int psci_system_suspend_enter(suspend_state_t state)

(thought I sent this yesterday but SMTP was not set correctly)