devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* new cpu iteration code...
@ 2013-09-18 21:37 David Miller
       [not found] ` <20130918.173726.1443745664398441126.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
  0 siblings, 1 reply; 18+ messages in thread
From: David Miller @ 2013-09-18 21:37 UTC (permalink / raw)
  To: sudeep.karkadanagesha-5wv7dgnIgG8
  Cc: grant.likely-QSEj5FYQhm4dnm+yROfE0A,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ,
	devicetree-u79uwXL29TY76Z2rM5mHXA


I'm getting a flood of kernel log warnings on bootup now with
the generic of_get_cpu_node() code, it is wrong for sparc64
on several levels.

There is never a root "/cpus" node, so this code always fails.
Usually the "cpu" nodes are simply listed at the top-level.

The correct way to go about this is to use something like:

	struct device_node *dp;

	for_each_node_by_type(dp, "cpu") {
	}

and therefore be agnostic as to the layout of the device
tree wrt. cpu nodes.

Secondly, the property to use to get the physical cpu number is not
only different on sparc from what this code uses, but varies.  It can
be either "upa-portid" or "portid".  The "reg" property represents
various things and will be different for different cpu types and thus
is not a good candidate for fetching this information.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2013-10-04 17:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 21:37 new cpu iteration code David Miller
     [not found] ` <20130918.173726.1443745664398441126.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-09-19  9:21   ` Sudeep KarkadaNagesha
     [not found]     ` <523AC214.4040601-5wv7dgnIgG8@public.gmane.org>
2013-09-19 10:52       ` David Miller
2013-09-19 13:26       ` Rob Herring
     [not found]         ` <523AFB6C.5070300-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-19 14:03           ` Sudeep KarkadaNagesha
2013-09-19 17:38           ` David Miller
     [not found]             ` <20130919.133805.1227344435777214810.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-09-20 16:44               ` Sudeep KarkadaNagesha
     [not found]                 ` <523C7B54.3070706-5wv7dgnIgG8@public.gmane.org>
2013-09-20 17:16                   ` David Miller
2013-09-22 20:13                   ` Rob Herring
     [not found]                     ` <523F4F6F.8030209-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-09-22 20:29                       ` David Miller
     [not found]                         ` <20130922.162915.1269060096375052591.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-09-25  2:29                           ` Rob Herring
     [not found]                             ` <CAL_JsqKNVqJbn559ruvFHg+FVGt8ou4v_Ntf-HphwxCNXQ7GfQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-03 20:11                               ` Grant Likely
     [not found]                                 ` <CACxGe6soxNN6TjDw9h15c39FHzyGzY1OZX9cZ8FRQ_k4PinYvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-03 20:26                                   ` David Miller
2013-10-03 21:24                                   ` David Miller
     [not found]                                     ` <20131003.172451.54508059414505899.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-10-04 10:27                                       ` Grant Likely
     [not found]                                         ` <CACxGe6u+L1JBg+1XAmLtxC+CdW1Uo39r8=czQxij0bPai6XO-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-04 17:29                                           ` David Miller
2013-10-04 10:34                                       ` Sudeep KarkadaNagesha
     [not found]                                         ` <524E99B0.9070805-5wv7dgnIgG8@public.gmane.org>
2013-10-04 17:27                                           ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).