Commit d2515c80 authored by Olaf Hering's avatar Olaf Hering Committed by Paul Mackerras

[PATCH] powerpc: cleanup pmac_newworld variable usage

remove extern declarations of pmac_newworld
move pmac_newworld to bss
if there is any "interrupt-controller" device, then it is newworld.
Signed-off-by: default avatarOlaf Hering <olh@suse.de>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 42dc75c4
...@@ -57,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs); ...@@ -57,7 +57,6 @@ extern void machine_check_exception(struct pt_regs *regs);
extern void alignment_exception(struct pt_regs *regs); extern void alignment_exception(struct pt_regs *regs);
extern void program_check_exception(struct pt_regs *regs); extern void program_check_exception(struct pt_regs *regs);
extern void single_step_exception(struct pt_regs *regs); extern void single_step_exception(struct pt_regs *regs);
extern int pmac_newworld;
extern int sys_sigreturn(struct pt_regs *regs); extern int sys_sigreturn(struct pt_regs *regs);
EXPORT_SYMBOL(clear_pages); EXPORT_SYMBOL(clear_pages);
......
...@@ -88,11 +88,10 @@ int ppc_override_l2cr = 0; ...@@ -88,11 +88,10 @@ int ppc_override_l2cr = 0;
int ppc_override_l2cr_value; int ppc_override_l2cr_value;
int has_l2cache = 0; int has_l2cache = 0;
int pmac_newworld = 1; int pmac_newworld;
static int current_root_goodness = -1; static int current_root_goodness = -1;
extern int pmac_newworld;
extern struct machdep_calls pmac_md; extern struct machdep_calls pmac_md;
#define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */ #define DEFAULT_ROOT_DEVICE Root_SDA1 /* sda1 - slightly silly choice */
...@@ -310,9 +309,10 @@ static void __init pmac_setup_arch(void) ...@@ -310,9 +309,10 @@ static void __init pmac_setup_arch(void)
for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; ) for (ic = NULL; (ic = of_find_all_nodes(ic)) != NULL; )
if (get_property(ic, "interrupt-controller", NULL)) if (get_property(ic, "interrupt-controller", NULL))
break; break;
pmac_newworld = (ic != NULL); if (ic) {
if (ic) pmac_newworld = 1;
of_node_put(ic); of_node_put(ic);
}
/* Lookup PCI hosts */ /* Lookup PCI hosts */
pmac_pci_init(); pmac_pci_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment