|
@@ -604,14 +604,14 @@ static void __init xics_init_one_node(struct device_node *np,
|
|
unsigned int *indx)
|
|
unsigned int *indx)
|
|
{
|
|
{
|
|
unsigned int ilen;
|
|
unsigned int ilen;
|
|
- u32 *ireg;
|
|
|
|
|
|
+ const u32 *ireg;
|
|
|
|
|
|
/* This code does the theorically broken assumption that the interrupt
|
|
/* This code does the theorically broken assumption that the interrupt
|
|
* server numbers are the same as the hard CPU numbers.
|
|
* server numbers are the same as the hard CPU numbers.
|
|
* This happens to be the case so far but we are playing with fire...
|
|
* This happens to be the case so far but we are playing with fire...
|
|
* should be fixed one of these days. -BenH.
|
|
* should be fixed one of these days. -BenH.
|
|
*/
|
|
*/
|
|
- ireg = (u32 *)get_property(np, "ibm,interrupt-server-ranges", NULL);
|
|
|
|
|
|
+ ireg = get_property(np, "ibm,interrupt-server-ranges", NULL);
|
|
|
|
|
|
/* Do that ever happen ? we'll know soon enough... but even good'old
|
|
/* Do that ever happen ? we'll know soon enough... but even good'old
|
|
* f80 does have that property ..
|
|
* f80 does have that property ..
|
|
@@ -623,7 +623,7 @@ static void __init xics_init_one_node(struct device_node *np,
|
|
*/
|
|
*/
|
|
*indx = *ireg;
|
|
*indx = *ireg;
|
|
}
|
|
}
|
|
- ireg = (u32 *)get_property(np, "reg", &ilen);
|
|
|
|
|
|
+ ireg = get_property(np, "reg", &ilen);
|
|
if (!ireg)
|
|
if (!ireg)
|
|
panic("xics_init_IRQ: can't find interrupt reg property");
|
|
panic("xics_init_IRQ: can't find interrupt reg property");
|
|
|
|
|
|
@@ -649,7 +649,7 @@ static void __init xics_setup_8259_cascade(void)
|
|
{
|
|
{
|
|
struct device_node *np, *old, *found = NULL;
|
|
struct device_node *np, *old, *found = NULL;
|
|
int cascade, naddr;
|
|
int cascade, naddr;
|
|
- u32 *addrp;
|
|
|
|
|
|
+ const u32 *addrp;
|
|
unsigned long intack = 0;
|
|
unsigned long intack = 0;
|
|
|
|
|
|
for_each_node_by_type(np, "interrupt-controller")
|
|
for_each_node_by_type(np, "interrupt-controller")
|
|
@@ -675,7 +675,7 @@ static void __init xics_setup_8259_cascade(void)
|
|
break;
|
|
break;
|
|
if (strcmp(np->name, "pci") != 0)
|
|
if (strcmp(np->name, "pci") != 0)
|
|
continue;
|
|
continue;
|
|
- addrp = (u32 *)get_property(np, "8259-interrupt-acknowledge", NULL);
|
|
|
|
|
|
+ addrp = get_property(np, "8259-interrupt-acknowledge", NULL);
|
|
if (addrp == NULL)
|
|
if (addrp == NULL)
|
|
continue;
|
|
continue;
|
|
naddr = prom_n_addr_cells(np);
|
|
naddr = prom_n_addr_cells(np);
|
|
@@ -694,7 +694,8 @@ void __init xics_init_IRQ(void)
|
|
{
|
|
{
|
|
int i;
|
|
int i;
|
|
struct device_node *np;
|
|
struct device_node *np;
|
|
- u32 *ireg, ilen, indx = 0;
|
|
|
|
|
|
+ u32 ilen, indx = 0;
|
|
|
|
+ const u32 *ireg;
|
|
int found = 0;
|
|
int found = 0;
|
|
|
|
|
|
ppc64_boot_msg(0x20, "XICS Init");
|
|
ppc64_boot_msg(0x20, "XICS Init");
|
|
@@ -719,18 +720,17 @@ void __init xics_init_IRQ(void)
|
|
for (np = of_find_node_by_type(NULL, "cpu");
|
|
for (np = of_find_node_by_type(NULL, "cpu");
|
|
np;
|
|
np;
|
|
np = of_find_node_by_type(np, "cpu")) {
|
|
np = of_find_node_by_type(np, "cpu")) {
|
|
- ireg = (u32 *)get_property(np, "reg", &ilen);
|
|
|
|
|
|
+ ireg = get_property(np, "reg", &ilen);
|
|
if (ireg && ireg[0] == get_hard_smp_processor_id(boot_cpuid)) {
|
|
if (ireg && ireg[0] == get_hard_smp_processor_id(boot_cpuid)) {
|
|
- ireg = (u32 *)get_property(np,
|
|
|
|
- "ibm,ppc-interrupt-gserver#s",
|
|
|
|
- &ilen);
|
|
|
|
|
|
+ ireg = get_property(np,
|
|
|
|
+ "ibm,ppc-interrupt-gserver#s", &ilen);
|
|
i = ilen / sizeof(int);
|
|
i = ilen / sizeof(int);
|
|
if (ireg && i > 0) {
|
|
if (ireg && i > 0) {
|
|
default_server = ireg[0];
|
|
default_server = ireg[0];
|
|
/* take last element */
|
|
/* take last element */
|
|
default_distrib_server = ireg[i-1];
|
|
default_distrib_server = ireg[i-1];
|
|
}
|
|
}
|
|
- ireg = (u32 *)get_property(np,
|
|
|
|
|
|
+ ireg = get_property(np,
|
|
"ibm,interrupt-server#-size", NULL);
|
|
"ibm,interrupt-server#-size", NULL);
|
|
if (ireg)
|
|
if (ireg)
|
|
interrupt_server_size = *ireg;
|
|
interrupt_server_size = *ireg;
|