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

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



On Tue, 18 Dec 2012, Will Deacon wrote:
> On Mon, Dec 17, 2012 at 08:51:27PM +0000, Nicolas Pitre wrote:
> > On Mon, 17 Dec 2012, Will Deacon wrote:
> > > +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?  :-)

> > > +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.
> > 
> > > +
> > > + 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.