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

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

From: Nicolas Pitre <hidden>
Date: 2012-12-18 21:59:45

On Tue, 18 Dec 2012, Will Deacon wrote:
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?  :-)
quoted
quoted
+static int __init psci_init(void)
+{
+	struct device_node *np;
+	const char *method;
+	u32 base, id;
+
+	np = of_find_matching_node(NULL, psci_of_match);
+	if (!np)
+		return 0;
+
+	pr_info("probing function IDs from device-tree\n");
Having "probing function IDs from device-tree" in the middle of a kernel 
log isn't very informative.  Better make this more useful or remove it.
quoted
+
+	if (of_property_read_u32(np, "function-base", &base)) {
+		pr_warning("missing \"function-base\" property\n");
Same thing here: this lacks context in a kernel log.
And so on for the other occurrences.
Actually, these are all prefixed with "psci: " thanks to the pr_fmt
definition at the top of the file.
Ah, goodie!  No more issue then.


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