Skip to content

squash! arm64: dts: qcom: msm8917: fix cpu idle states#14

Merged
barni2000 merged 1 commit intomsm89x7-mainline:msm89x7/6.13from
valpackett:push-lwlwrvkvlyuu
Feb 9, 2025
Merged

squash! arm64: dts: qcom: msm8917: fix cpu idle states#14
barni2000 merged 1 commit intomsm89x7-mainline:msm89x7/6.13from
valpackett:push-lwlwrvkvlyuu

Conversation

@valpackett
Copy link

pwrdn/ghds (4) is the only cluster state we can use. retention (2) seems broken (hangs), looks like that's why it was marked as worse than ghds in the downstream dts.


oops, the bogus 0x41000033 state was actually making everything worse.

Battery discharge rate on nora with display off:

  • baseline: ~0.69 (nice)
  • cpu-pc only: ~0.59
  • bogus cluster state 3: ~0.90
  • cluster-pwrdn: ~0.52

pwrdn/ghds (4) is the only cluster state we can use.
retention (2) seems broken (hangs), looks like that's why it was marked
as worse than ghds in the downstream dts.

Signed-off-by: Val Packett <val@packett.cool>
@barni2000
Copy link
Collaborator

barni2000 commented Feb 8, 2025

What is the difference for original PC idle state?
0x41000053

@valpackett
Copy link
Author

We cannot just do cluster PC (…53) right now on 8917, it being single cluster means cluster PC is basically system PC and there's nothing to wake us up from there..

Downstream, that kind of deepest level is marked with a qcom,notify-rpm flag property. What even is RPM?

@barni2000
Copy link
Collaborator

barni2000 commented Feb 9, 2025

We cannot just do cluster PC (…53) right now on 8917, it being single cluster means cluster PC is basically system PC and there's nothing to wake us up from there..

Downstream, that kind of deepest level is marked with a qcom,notify-rpm flag property. What even is RPM?

It wakes up for me. RPM is Resource Power Manager.

@valpackett
Copy link
Author

It wakes up for me.

On 8917?

@barni2000
Copy link
Collaborator

It wakes up for me.

On 8917?

yes

@barni2000 barni2000 merged commit 0bfa8fc into msm89x7-mainline:msm89x7/6.13 Feb 9, 2025
1 check passed
@barni2000
Copy link
Collaborator

Thanks!

@valpackett valpackett deleted the push-lwlwrvkvlyuu branch February 9, 2025 22:39
barni2000 pushed a commit that referenced this pull request Mar 10, 2025
…faces

commit 2240fed upstream.

Robert Morris created a test program which can cause
usb_hub_to_struct_hub() to dereference a NULL or inappropriate
pointer:

Oops: general protection fault, probably for non-canonical address
0xcccccccccccccccc: 0000 [#1] SMP DEBUG_PAGEALLOC PTI
CPU: 7 UID: 0 PID: 117 Comm: kworker/7:1 Not tainted 6.13.0-rc3-00017-gf44d154d6e3d #14
Hardware name: FreeBSD BHYVE/BHYVE, BIOS 14.0 10/17/2021
Workqueue: usb_hub_wq hub_event
RIP: 0010:usb_hub_adjust_deviceremovable+0x78/0x110
...
Call Trace:
 <TASK>
 ? die_addr+0x31/0x80
 ? exc_general_protection+0x1b4/0x3c0
 ? asm_exc_general_protection+0x26/0x30
 ? usb_hub_adjust_deviceremovable+0x78/0x110
 hub_probe+0x7c7/0xab0
 usb_probe_interface+0x14b/0x350
 really_probe+0xd0/0x2d0
 ? __pfx___device_attach_driver+0x10/0x10
 __driver_probe_device+0x6e/0x110
 driver_probe_device+0x1a/0x90
 __device_attach_driver+0x7e/0xc0
 bus_for_each_drv+0x7f/0xd0
 __device_attach+0xaa/0x1a0
 bus_probe_device+0x8b/0xa0
 device_add+0x62e/0x810
 usb_set_configuration+0x65d/0x990
 usb_generic_driver_probe+0x4b/0x70
 usb_probe_device+0x36/0xd0

The cause of this error is that the device has two interfaces, and the
hub driver binds to interface 1 instead of interface 0, which is where
usb_hub_to_struct_hub() looks.

We can prevent the problem from occurring by refusing to accept hub
devices that violate the USB spec by having more than one
configuration or interface.

Reported-and-tested-by: Robert Morris <rtm@csail.mit.edu>
Cc: stable <stable@kernel.org>
Closes: https://lore.kernel.org/linux-usb/95564.1737394039@localhost/
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/c27f3bf4-63d8-4fb5-ac82-09e3cd19f61c@rowland.harvard.edu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants