Skip to contentSkip to conversation

fix power3 boot

PATCH In review Anton Blanchard 2 participants 3 messages Jul 4, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix power3 boot

Hi,

We were calling init_pci_config_tokens too late in eeh_init. POWER3 (which doesnt have EEH) would fall out of eeh_init before calling it.

arch/ppc64/kernel/eeh.c renamed from arch/ppc64/kernel/eeh.c~fix_power3 +2 -1
diff -puN arch/ppc64/kernel/eeh.c~fix_power3 arch/ppc64/kernel/eeh.c
@@ -574,6 +574,8 @@ void __init eeh_init(void)
 	struct eeh_early_enable_info info;
 	char *eeh_force_off = strstr(saved_command_line, "eeh-force-off");
 
+	init_pci_config_tokens();
+
 	ibm_set_eeh_option = rtas_token("ibm,set-eeh-option");
 	ibm_set_slot_reset = rtas_token("ibm,set-slot-reset");
 	ibm_read_slot_reset_state = rtas_token("ibm,read-slot-reset-state");
@@ -588,7 +590,6 @@ void __init eeh_init(void)
 	}
 
 	/* Enable EEH for all adapters.  Note that eeh requires buid's */
-	init_pci_config_tokens();
 	for (phb = of_find_node_by_name(NULL, "pci"); phb;
 	     phb = of_find_node_by_name(phb, "pci")) {
 		unsigned long buid;

_

#1 lore raw

Review void __init eeh_init(void)

Quoted 10 lines · Anton Blanchard
(quoted diff) +0 -0
@@ -588,7 +590,6 @@ void __init eeh_init(void)
  	}
 
  	/* Enable EEH for all adapters.  Note that eeh requires buid's */
 -	init_pci_config_tokens();
  	for (phb = of_find_node_by_name(NULL, "pci"); phb;
  	     phb = of_find_node_by_name(phb, "pci")) {
  		unsigned long buid;

That line was already deleted by paulus's "EEH fixes for POWER5 machines (1/2)" patch, so we end up with the below.

arch/ppc64/kernel/eeh.c renamed from arch/ppc64/kernel/eeh.c~ppc64-fix-power3-boot +2 -0
diff -puN arch/ppc64/kernel/eeh.c~ppc64-fix-power3-boot arch/ppc64/kernel/eeh.c
@@ -587,6 +587,8 @@ void __init eeh_init(void)
 		return;
 	}
 
+	init_pci_config_tokens();
+
 	ibm_set_eeh_option = rtas_token("ibm,set-eeh-option");
 	ibm_set_slot_reset = rtas_token("ibm,set-slot-reset");
 	ibm_read_slot_reset_state = rtas_token("ibm,read-slot-reset-state");

_

#2 lore raw
Quoted 3 lines

That line was already deleted by paulus's "EEH fixes for POWER5 machines (1/2)" patch, so we end up with the below.1

Oh sorry, I missed that patch. Looks like that patch already added the required call to init_pci_config_tokens:

void __init eeh_init(void)
{
- struct device_node *phb;

+       struct device_node *phb, *np;
        struct eeh_early_enable_info info;
        char *eeh_force_off = strstr(saved_command_line, "eeh-force-off");

+ init_pci_config_tokens();
+
+ np = of_find_node_by_path("/rtas");
+ if (np == NULL) {
+ printk(KERN_WARNING "EEH: RTAS not found !\n");
+ return;
+ }
+