From: Zhao Chenhui <chenhui.zhao@freescale.com>
To: Tabi Timur-B04825 <B04825@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
Li Yang-R58472 <r58472@freescale.com>,
Zhao Chenhui-B35336 <B35336@freescale.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync
Date: Thu, 5 Jul 2012 18:25:29 +0800 [thread overview]
Message-ID: <20120705102529.GA7982@localhost.localdomain> (raw)
In-Reply-To: <4FF45F19.2080607@freescale.com>
On Wed, Jul 04, 2012 at 10:19:54AM -0500, Tabi Timur-B04825 wrote:
> Zhao Chenhui wrote:
> > On Tue, Jul 03, 2012 at 10:17:12PM -0500, Tabi Timur-B04825 wrote:
> >> Zhao Chenhui wrote:
> >>> If the guts variable is NULL, it indicates there is error in dts or kernel.
> >>> We should fix the error, rather than ignore it.
> >>
> >> And that's why there's a warning message. Crashing the kernel is not
> >> going to fix anything.
> >>
> >
> > This error likely crashes the kenel somewhere.
>
> Can you test this, please?
>
> The point I'm trying to make is that it's wrong to intentionally halt the
> kernel unless you're sure that it's the best option. A missing device
> tree node is supposed to only disable a given feature, not break everything.
>
I think there is some misunderstanding here.
np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids);
if (np) {
guts = of_iomap(np, 0);
of_node_put(np);
if (!guts) {
pr_err("%s: Could not map guts node address\n",
__func__);
return;
}
smp_85xx_ops.give_timebase = mpc85xx_give_timebase;
smp_85xx_ops.take_timebase = mpc85xx_take_timebase;
}
If the guts node is missing, this code snippet will be skipped. If the guts node is existed,
the return value of of_iomap(), namely guts, will be tested. If it is NULL, it shows
that there is error in dts, or the ioremap() in of_iomap() failed. I think
these errors are fatal errors, so I print an error info and return.
-Chenhui
next prev parent reply other threads:[~2012-07-05 10:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-03 10:21 [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync Zhao Chenhui
2012-07-03 10:21 ` [PATCH v7 2/5] powerpc/85xx: add HOTPLUG_CPU support Zhao Chenhui
2012-07-13 12:15 ` Kumar Gala
2012-07-17 11:39 ` Zhao Chenhui-B35336
2012-07-03 12:46 ` [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync Tabi Timur-B04825
2012-07-04 3:14 ` Zhao Chenhui
2012-07-04 3:17 ` Tabi Timur-B04825
2012-07-04 3:45 ` Zhao Chenhui
2012-07-04 15:19 ` Tabi Timur-B04825
2012-07-05 10:25 ` Zhao Chenhui [this message]
2012-07-05 15:30 ` Timur Tabi
2012-07-05 17:11 ` Scott Wood
2012-07-05 15:31 ` Tabi Timur-B04825
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120705102529.GA7982@localhost.localdomain \
--to=chenhui.zhao@freescale.com \
--cc=B04825@freescale.com \
--cc=B07421@freescale.com \
--cc=B35336@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=r58472@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).