From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Vitaly Bordug <vbordug@ru.mvista.com>,
linux-ppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: [PATCH] ppc_sys: do not BUG if system ID is unknown
Date: Wed, 26 Oct 2005 12:57:10 -0200 [thread overview]
Message-ID: <20051026145710.GA10496@logos.cnet> (raw)
Vitaly,
Subject and diff says it all: currently ppc_sys BUGs on unknown system
ID, which is quite unfriendly.
The following is applied to the 8xx-fixes tree.
diff-tree a807b39b11a2fc311d3bbeff2b6f17c31636bb58 (from 94c84a4faa99c5f1ca93f0b9c5ad3df9d57409f8)
Author: Marcelo Tosatti <marcelo@pegasos.cnet>
Date: Wed Oct 26 14:43:30 2005 -0500
ppc32: Make ppc_sys friendly to unknown system ID's
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c
index 52ba0c6..26d7605 100644
--- a/arch/ppc/syslib/ppc_sys.c
+++ b/arch/ppc/syslib/ppc_sys.c
@@ -85,8 +85,11 @@ static int __init find_chip_by_name_and_
void __init identify_ppc_sys_by_name_and_id(char *name, u32 id)
{
int i = find_chip_by_name_and_id(name, id);
- BUG_ON(i < 0);
- cur_ppc_sys_spec = &ppc_sys_specs[i];
+ if (i < 0) {
+ printk(KERN_ERR "ppc_sys: Unable to identify PPC system!\n");
+ cur_ppc_sys_spec = NULL;
+ } else
+ cur_ppc_sys_spec = &ppc_sys_specs[i];
}
/* Update all memory resources by paddr, call before platform_device_register */
@@ -128,7 +131,8 @@ static int __init ppc_sys_init(void)
{
unsigned int i, dev_id, ret = 0;
- BUG_ON(cur_ppc_sys_spec == NULL);
+ if(cur_ppc_sys_spec == NULL)
+ return 1;
for (i = 0; i < cur_ppc_sys_spec->num_devices; i++) {
dev_id = cur_ppc_sys_spec->device_list[i];
reply other threads:[~2005-10-26 20:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20051026145710.GA10496@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=linuxppc-embedded@ozlabs.org \
--cc=vbordug@ru.mvista.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.