patch-2.2.12 linux/arch/ppc/kernel/chrp_setup.c
Next file: linux/arch/ppc/kernel/feature.c
Previous file: linux/arch/ppc/kernel/chrp_pci.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Wed Aug 25 17:29:46 1999
- Orig file:
v2.2.11/linux/arch/ppc/kernel/chrp_setup.c
- Orig date:
Mon Aug 9 16:05:55 1999
diff -u --recursive --new-file v2.2.11/linux/arch/ppc/kernel/chrp_setup.c linux/arch/ppc/kernel/chrp_setup.c
@@ -294,16 +294,19 @@
{
struct property *p;
device = find_devices("rtas");
- for ( p = device->properties;
- p && strncmp(p->name, "rtas-event-scan-rate", 20);
- p = p->next )
- /* nothing */ ;
- if ( p && *(unsigned long *)p->value )
+ if ( device )
{
- rtas_event_scan_rate = (HZ/(*(unsigned long *)p->value)*30)-1;
- rtas_event_scan_ct = 1;
- printk("RTAS Event Scan Rate: %lu (%lu jiffies)\n",
- *(unsigned long *)p->value, rtas_event_scan_rate );
+ for ( p = device->properties;
+ p && strncmp(p->name, "rtas-event-scan-rate", 20);
+ p = p->next )
+ /* nothing */ ;
+ if ( p && *(unsigned long *)p->value )
+ {
+ rtas_event_scan_rate = (HZ/(*(unsigned long *)p->value)*30)-1;
+ rtas_event_scan_ct = 1;
+ printk("RTAS Event Scan Rate: %lu (%lu jiffies)\n",
+ *(unsigned long *)p->value, rtas_event_scan_rate );
+ }
}
}
}
@@ -312,11 +315,10 @@
chrp_event_scan(void)
{
unsigned char log[1024];
+ unsigned long ret = 0;
if ( rtas_event_scan_rate && (rtas_event_scan_ct-- <= 0) )
- {
- call_rtas( "event-scan", 4, 1, NULL, 0x0, 1, __pa(log), 1024 );
- rtas_event_scan_ct = rtas_event_scan_rate;
- }
+ call_rtas( "event-scan", 4, 1, &ret, 0xffffffff, 0,
+ __pa(log), 1024 );
}
void
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)