Thread (25 messages) flat view 25 messages, 6 authors, 2012-12-20
STALE4977d

[PATCH v2 4/6] ARM: psci: add support for PSCI invocations from the kernel

From: Will Deacon <hidden>
Date: 2012-12-19 11:27:28

On Tue, Dec 18, 2012 at 09:59:45PM +0000, Nicolas Pitre wrote:
On Tue, 18 Dec 2012, Will Deacon wrote:
quoted
On Mon, Dec 17, 2012 at 08:51:27PM +0000, Nicolas Pitre wrote:
quoted
On Mon, 17 Dec 2012, Will Deacon wrote:
quoted
+static int psci_cpu_suspend(struct psci_power_state state,
+			    unsigned long entry_point)
+{
+	int err;
+	u32 fn, power_state;
+
+	fn = psci_function_id[PSCI_FN_CPU_SUSPEND];
+	power_state = psci_power_state_pack(state);
+	err = invoke_psci_fn(fn, power_state, (u32)entry_point, 0);
Why do you need the u32 cast here?
That's a hangover from when entry_point was a void *. I'll fix that, thanks.
Hopefully you didn't pass virtual pointers to the PSCI call, did you?  :-)
...and I'd have gotten away with it if it wasn't for those meddling kids!

It was also made worse by Marc's code working first time too (after I blamed
the firmware like any sane kernel hacker would do :)

Will
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help