Skip to contentSkip to conversation

2.4.0-test3 sys_ctrler fix.

PATCH New Iain Sandoe 1 participant 1 message Jul 13, 2000

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.0-test3 sys_ctrler fix.

here is a patch against 2.4.0-test3 as of yesterday (i.e. against the version with broken timer.c & idle.c). I was having real problems getting the BK rsync stuff until just now...

This patch fixes the cross-referencing of sys_ctrler - a variable indicating the ADB controller type (CUDA or PMU).

It is quite wide-ranging and affected pmac_setup, xmon, nvram, time, start, via-cuda, via-pmu & dmasound.

It may already have been fixed in 2.4.0-test4 (I just noticed that bitkeeper has changed).

====

I'll do a separate patch against 2.4.0-test3 for the dmasound stuff (once I've checked it out a bit more).

If you're desperate to try the sound then add a line

extern sys_ctrler_t sys_ctrlr ;

anywhere after machdep.h has been included - this should fix anyone else who has a G3/desktop (with the dmasound sources from test3).

It *might* fix PB problems too (but I can't be certain).

====

It needs the scrutiny of a more experienced bunch - I may not have got the conditionalisation right for all PPC platform variants... please be gentle-ish...

Iain.

arch/ppc/kernel/pmac_nvram.c +1 -0
diff -urbBw bk_devel/arch/ppc/kernel/pmac_nvram.c linuxppc_2_3/arch/ppc/kernel/pmac_nvram.c
@@ -70,6 +70,7 @@
 
 extern int pmac_newworld;
 
+extern sys_ctrler_t sys_ctrler ;
 
 static u8
 chrp_checksum(struct chrp_header* hdr)
arch/ppc/kernel/pmac_setup.c +2 -0
diff -urbBw bk_devel/arch/ppc/kernel/pmac_setup.c linuxppc_2_3/arch/ppc/kernel/pmac_setup.c
@@ -94,6 +94,8 @@
 extern void pckbd_init_hw(void);
 extern void pmac_nvram_update(void);
 
+sys_ctrler_t sys_ctrler = 0 ;
+
 unsigned char drive_info;
 
 int ppc_override_l2cr = 0;
arch/ppc/kernel/pmac_time.c +2 -0
diff -urbBw bk_devel/arch/ppc/kernel/pmac_time.c linuxppc_2_3/arch/ppc/kernel/pmac_time.c
@@ -31,6 +31,8 @@
 
 extern rwlock_t xtime_lock;
 
+extern sys_ctrler_t sys_ctrler ;
+
 /* Apparently the RTC stores seconds since 1 Jan 1904 */
 #define RTC_OFFSET	2082844800
 
arch/ppc/kernel/ppc_ksyms.c +4 -0
diff -urbBw bk_devel/arch/ppc/kernel/ppc_ksyms.c linuxppc_2_3/arch/ppc/kernel/ppc_ksyms.c
@@ -61,6 +61,8 @@
 int abs(int);
 extern unsigned long ret_to_user_hook;
 
+extern sys_ctrler_t sys_ctrler ;
+
 EXPORT_SYMBOL(clear_page);
 EXPORT_SYMBOL(do_signal);
 EXPORT_SYMBOL(syscall_trace);
@@ -198,6 +200,8 @@
 EXPORT_SYMBOL(_machine);
 #endif
 EXPORT_SYMBOL(ppc_md);
+
+EXPORT_SYMBOL_NOVERS(sys_ctrler) ;
 
 #ifdef CONFIG_ADB
 /*
arch/ppc/xmon/start.c +2 -0
diff -urbBw bk_devel/arch/ppc/xmon/start.c linuxppc_2_3/arch/ppc/xmon/start.c
@@ -27,6 +27,8 @@
 static int xmon_use_sccb = 0;
 static struct device_node *macio_node;
 
+extern sys_ctrler_t sys_ctrler ;
+
 #define TB_SPEED	25000000
 
 static inline unsigned int readtb(void)
drivers/macintosh/via-cuda.c +4 -0
diff -urbBw bk_devel/drivers/macintosh/via-cuda.c linuxppc_2_3/drivers/macintosh/via-cuda.c
@@ -32,6 +32,10 @@
 
 static volatile unsigned char *via;
 
+#ifdef CONFIG_PPC
+extern sys_ctrler_t sys_ctrler ;
+#endif
+
 #ifdef CONFIG_MAC
 #define CUDA_IRQ IRQ_MAC_ADB
 #define __openfirmware
drivers/macintosh/via-pmu.c +2 -0
diff -urbBw bk_devel/drivers/macintosh/via-pmu.c linuxppc_2_3/drivers/macintosh/via-pmu.c
@@ -156,6 +156,8 @@
 extern int grackle_pcibios_write_config_word(unsigned char bus,
 	unsigned char dev_fn, unsigned char offset, unsigned short val);
 
+extern sys_ctrler_t sys_ctrler ;
+
 /*
  * This table indicates for each PMU opcode:
  * - the number of data bytes to be sent with the command, or -1
include/asm-ppc/machdep.h +2 -2
diff -urbBw bk_devel/include/asm-ppc/machdep.h linuxppc_2_3/include/asm-ppc/machdep.h
@@ -87,9 +87,9 @@
  * Power macintoshes have either a CUDA or a PMU controlling
  * system reset, power, NVRAM, RTC.
  */
-enum sys_ctrler_kind {
+typedef enum sys_ctrler_kind {
 	SYS_CTRLER_CUDA = 1,
 	SYS_CTRLER_PMU = 2,
-} sys_ctrler;
+} sys_ctrler_t ;
 
 #endif /* _PPC_MACHDEP_H */