From: Nathan Fontenot <nfont@austin.ibm.com>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 3/4][POWERPC] Remove redundant of_get_cpu_node routine
Date: Wed, 06 Feb 2008 14:37:35 -0600 [thread overview]
Message-ID: <47AA1A8F.3020704@austin.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 163 bytes --]
It appears that xics.c has its own of_get_cpu_node(). Remove this and use the
common one from prom.c.
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
---
[-- Attachment #2: of_get_cpu_node.patch --]
[-- Type: text/x-patch, Size: 1172 bytes --]
Index: linux-2.6/arch/powerpc/platforms/pseries/xics.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/pseries/xics.c 2008-02-06 11:31:44.000000000 -0600
+++ linux-2.6/arch/powerpc/platforms/pseries/xics.c 2008-02-06 11:34:34.000000000 -0600
@@ -658,31 +658,6 @@
set_irq_chained_handler(cascade, pseries_8259_cascade);
}
-static struct device_node *cpuid_to_of_node(int cpu)
-{
- struct device_node *np;
- u32 hcpuid = get_hard_smp_processor_id(cpu);
-
- for_each_node_by_type(np, "cpu") {
- int i, len;
- const u32 *intserv;
-
- intserv = of_get_property(np, "ibm,ppc-interrupt-server#s",
- &len);
-
- if (!intserv)
- intserv = of_get_property(np, "reg", &len);
-
- i = len / sizeof(u32);
-
- while (i--)
- if (intserv[i] == hcpuid)
- return np;
- }
-
- return NULL;
-}
-
void __init xics_init_IRQ(void)
{
int i, j;
@@ -711,7 +686,7 @@
xics_init_host();
/* Find the server numbers for the boot cpu. */
- np = cpuid_to_of_node(boot_cpuid);
+ np = of_get_cpu_node(boot_cpuid, NULL);
BUG_ON(!np);
ireg = of_get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
if (!ireg)
reply other threads:[~2008-02-06 20:37 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=47AA1A8F.3020704@austin.ibm.com \
--to=nfont@austin.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
/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).