[parisc-linux-cvs] linux deller

Helge Deller deller@gmx.de
Tue, 4 Dec 2001 03:12:29 +0100


--------------Boundary-00=_TGRS2DQFXNLMBINDOMMZ
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

On Tuesday 04 December 2001 03:12, Helge Deller wrote:
> CVSROOT:	/var/cvs
> Module name:	linux
> Changes by:	deller	01/12/03 19:12:40
>
> Modified files:
> 	.              : Makefile
> 	arch/parisc/kernel: parisc_ksyms.c power.c superio.c time.c
> 	                    traps.c
> 	arch/parisc/mm : init.c
> 	drivers/video/sti: sticore.c
> 	include/asm-parisc: irq.h
>
> Log message:
> - 2.4.16-pa12
> - EXPORT_SYMBOL(map_hpux_gateway_page) fixes unresolved symbol in
> binfmt_som as module - some cleanups in soft power switch support (doesn't
> fixes crashes on some Bxxx machines yet) - superio-fixes, moved extern void
> do_irq() to irq.h
> - removed tabs from kernel dump output
> - re-enable the powerswitch in case we had an HPMC
> - IMPORTANT: we now free up unneeded kernel-space after kernel-startup
> TODO: check remaining __init usages !
> - special-case VisEG on c3000 only (which doesn't work yet and crashes the
> machine) all other PCI cards will now be activated by sticon/stifb !



--------------Boundary-00=_TGRS2DQFXNLMBINDOMMZ
Content-Type: text/plain;
  charset="iso-8859-1";
  name="di"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="di"

Index: Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.216
diff -u -p -r1.216 Makefile
--- Makefile	2001/12/03 23:17:53	1.216
+++ Makefile	2001/12/04 02:03:20
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 16
-EXTRAVERSION = -pa11
+EXTRAVERSION = -pa12
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
Index: arch/parisc/kernel/parisc_ksyms.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/parisc_ksyms.c,v
retrieving revision 1.35
diff -u -p -r1.35 parisc_ksyms.c
--- arch/parisc/kernel/parisc_ksyms.c	2001/11/13 17:31:52	1.35
+++ arch/parisc/kernel/parisc_ksyms.c	2001/12/04 02:03:23
@@ -38,6 +38,7 @@ EXPORT_SYMBOL(disable_irq);
 #include <asm/processor.h>
 EXPORT_SYMBOL(kernel_thread);
 EXPORT_SYMBOL(boot_cpu_data);
+EXPORT_SYMBOL(map_hpux_gateway_page);
 #ifdef CONFIG_EISA
 EXPORT_SYMBOL(EISA_bus);
 #endif
Index: arch/parisc/kernel/power.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/power.c,v
retrieving revision 1.2
diff -u -p -r1.2 power.c
--- arch/parisc/kernel/power.c	2001/11/30 02:36:04	1.2
+++ arch/parisc/kernel/power.c	2001/12/04 02:03:24
@@ -11,6 +11,7 @@
  *  
  * TODO:
  * - use tasklets instead of calling it from the timer-interrupt function
+ * - after a special amount of time just turn the machine off (killing init may have failed!)
  * - ....
  */
 
@@ -49,7 +50,8 @@ static int shutdown_timer;
 #define __getDIAG(dr) ( { 			\
         register unsigned long __res asm("r28");\
 	__asm__ __volatile__ (			\
-		".word %0"			\
+		".word %0 \n\t"			\
+		"nop \n\t"			\
 		: 				\
 		: "i" (MFCPU_T(dr,28))		\
 		: "memory"			\
@@ -86,12 +88,6 @@ static void poweroff(void)
 	schedule_task(&poweroff_tq);
 }
 
-
-/* soft power switch function ptr */
-void (*check_soft_power)(struct pt_regs *regs);
-
-
-
 /* check, give feedback and start shutdown after one second */
 static void process_shutdown(void)
 {
@@ -108,13 +104,17 @@ static void process_shutdown(void)
 }
 
 
+/* soft power switch function ptr */
+void (*check_soft_power)(void);
+
+
 /*
  * On gecko style machines (e.g. 712/xx and 715/xx) 
  * the power switch status is stored in Bit 0 ("the highest bit")
  * of CPU diagnose register 25.
  * 
  */
-static void check_soft_power_gecko(struct pt_regs *regs)
+static void check_soft_power_gecko(void)
 {
 	if (__getDIAG(25) & 0x80000000) {
 		/* power switch button not pressed or released again */
@@ -133,7 +133,7 @@ static void check_soft_power_gecko(struc
  */
 static unsigned long soft_power_reg;
 
-static void check_soft_power_polling(struct pt_regs *regs)
+static void check_soft_power_polling(void)
 {
         unsigned long current_status;
 
@@ -142,7 +142,6 @@ static void check_soft_power_polling(str
 		/* power switch button not pressed */
 		shutdown_timer = 0;
 	} else {
-		gsc_writel(soft_power_reg, current_status & ~0x1);
 		process_shutdown();
 	}
 }
@@ -159,7 +158,7 @@ static void powerfail_interrupt(int code
 
 
 
-void __init power_init(void)
+static int __init power_init(void)
 {
 	unsigned long ret;
 
@@ -170,7 +169,7 @@ void __init power_init(void)
 	/* enable the soft power switch if possible */
 	ret = pdc_soft_power_info(&soft_power_reg);
 	if (ret != PDC_OK)
-		return;
+		return 0;
 	
 	switch ((long) soft_power_reg) {
 	case 0:		printk(KERN_INFO "Enabled gecko-style soft power switch.\n");
@@ -185,4 +184,8 @@ void __init power_init(void)
 			check_soft_power = check_soft_power_polling;
 	}
 #endif
+	return 0;
 }
+
+module_init(power_init);
+
Index: arch/parisc/kernel/superio.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/superio.c,v
retrieving revision 1.15
diff -u -p -r1.15 superio.c
--- arch/parisc/kernel/superio.c	2001/11/29 21:17:45	1.15
+++ arch/parisc/kernel/superio.c	2001/12/04 02:03:24
@@ -91,8 +91,6 @@ superio_inform_irq(int irq)
     sio_dev.iosapic_irq = irq;
 }
 
-extern void do_irq(struct irqaction *a, int i, struct pt_regs *p);
-
 static void
 superio_interrupt(int irq, void *devp, struct pt_regs *regs)
 {
@@ -115,7 +113,7 @@ superio_interrupt(int irq, void *devp, s
 
 	/* Check to see which device is interrupting */
 
-	local_irq = results & 0x7;
+	local_irq = results & 0x0f;
 
 	if (local_irq == 2 || local_irq > 7) {
 		printk(KERN_ERR "SuperIO: slave interrupted!\n");
@@ -379,7 +377,7 @@ int superio_fixup_irq(struct pci_dev *pc
 	return(sio_dev.irq_region->data.irqbase + local_irq);
 }
 
-void __init
+void __devinit
 superio_serial_init(void)
 {
 #ifdef CONFIG_SERIAL
@@ -438,10 +436,11 @@ superio_serial_init(void)
 #endif /* CONFIG_SERIAL */
 }
 
+EXPORT_SYMBOL(superio_serial_init);
 
-#ifdef CONFIG_PARPORT_PC
 
-void __init
+#ifdef CONFIG_PARPORT_PC
+void __devinit
 superio_parport_init(void)
 {
 	if (!sio_dev.irq_region)
@@ -460,7 +459,6 @@ superio_parport_init(void)
 }
 
 EXPORT_SYMBOL(superio_parport_init);
-
 #endif	/* CONFIG_PARPORT_PC */
 
 
Index: arch/parisc/kernel/time.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/time.c,v
retrieving revision 1.19
diff -u -p -r1.19 time.c
--- arch/parisc/kernel/time.c	2001/11/29 19:57:04	1.19
+++ arch/parisc/kernel/time.c	2001/12/04 02:03:25
@@ -90,7 +90,7 @@ void timer_interrupt(int irq, void *dev_
 
 	/* check soft power switch status */
 	if (check_soft_power)
-		check_soft_power(regs);
+		check_soft_power();
 }
 
 /*** converted from ia64 ***/
@@ -208,7 +208,4 @@ void __init time_init(void)
 	        xtime.tv_sec = 0;
 		xtime.tv_usec = 0;
 	}
-
-	power_init();
 }
-
Index: arch/parisc/kernel/traps.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/traps.c,v
retrieving revision 1.57
diff -u -p -r1.57 traps.c
--- arch/parisc/kernel/traps.c	2001/11/29 19:57:04	1.57
+++ arch/parisc/kernel/traps.c	2001/12/04 02:03:25
@@ -86,7 +86,7 @@ void show_regs(struct pt_regs *regs)
 	for (i = 0; i < 32; i += 4) {
 		int j;
 		p = buf;
-		p += sprintf(p, "%sr%d-%d\t", level, i, i + 3);
+		p += sprintf(p, "%sr%02d-%02d  ", level, i, i + 3);
 		for (j = 0; j < 4; j++) {
 			p += sprintf(p, " " RFMT, i + j == 0 ? 0 : regs->gr[i + j]);
 		}
@@ -96,7 +96,7 @@ void show_regs(struct pt_regs *regs)
 	for (i = 0; i < 8; i += 4) {
 		int j;
 		p = buf;
-		p += sprintf(p, "%ssr%d-%d\t", level, i, i + 3);
+		p += sprintf(p, "%ssr%02d-%02d ", level, i, i + 3);
 		for (j = 0; j < 4; j++) {
 			p += sprintf(p, " " RFMT, regs->sr[i + j]);
 		}
@@ -105,7 +105,7 @@ void show_regs(struct pt_regs *regs)
 
 #if RIDICULOUSLY_VERBOSE
 	for (i = 0; i < 32; i += 2)
-		printk("%sFR%2d : %016lx  FR%2d : %016lx", level, i,
+		printk("%sFR%02d : %016lx  FR%2d : %016lx", level, i,
 				regs->fr[i], i+1, regs->fr[i+1]);
 #endif
 
@@ -623,6 +623,9 @@ void parisc_terminate(char *msg, struct 
 
 	spin_unlock(&terminate_lock);
 
+	/* re-enable the power-off button */
+	pdc_soft_power_shutdown();
+	
 	for(;;)
 	    ;
 }
Index: arch/parisc/mm/init.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/mm/init.c,v
retrieving revision 1.43
diff -u -p -r1.43 init.c
--- arch/parisc/mm/init.c	2001/11/10 00:50:29	1.43
+++ arch/parisc/mm/init.c	2001/12/04 02:03:28
@@ -370,7 +370,6 @@ static void __init setup_bootmem(void)
 
 void free_initmem(void)
 {
-#if 0
 	unsigned long addr;
 
 	addr = (unsigned long)(&__init_begin);
@@ -383,7 +382,6 @@ void free_initmem(void)
 
 	printk(KERN_INFO "Freeing unused kernel memory: %dk freed\n",
 			(&__init_end - &__init_begin) >> 10);
-#endif
 }
 
 /*
Index: drivers/video/sti/sticore.c
===================================================================
RCS file: /var/cvs/linux/drivers/video/sti/sticore.c,v
retrieving revision 1.29
diff -u -p -r1.29 sticore.c
--- drivers/video/sti/sticore.c	2001/12/03 22:06:00	1.29
+++ drivers/video/sti/sticore.c	2001/12/04 02:03:40
@@ -922,13 +922,27 @@ static int __devinit sticore_pci_init(st
 
 	printk("Trying PCI STI ROM at %08lx, PCI hpa at %08lx\n",
 		    rom_base, fb_base);
-#if 0
-	/* FIXME: */
-	printk("I'm not trying to set up the PCI graphic card now... It would freeze your machine\n");
-	sti = NULL;
-#else
-	sti = sti_try_rom_generic(rom_base, fb_base, pd);
-#endif
+
+	/* XXX */
+	/* A Visualize EG PCI graphics card in a c3000 would crash the machine. */
+	/* This is an ugly work-around */
+#warning "FIXME: VisEG PCI graphic card crashes c3000"
+	switch (CPU_HVERSION) {
+	case 0x5BB:
+	case 0x5BC:
+		if (pd->device == 0x1005) { /* "A4977A Visualize EG" */
+			printk("I'm not trying to set up the PCI graphic card now... "
+				"It would freeze your machine !\n");
+			sti = NULL;
+			break;
+		}
+		/* fall through */
+	default:
+		sti = sti_try_rom_generic(rom_base, fb_base, pd);
+		break;
+	}
+
+	
 	if (!sti) {
 		printk(KERN_WARNING "Unable to handle STI device '%s'\n",
 			pd->name);
Index: include/asm-parisc/irq.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/irq.h,v
retrieving revision 1.20
diff -u -p -r1.20 irq.h
--- include/asm-parisc/irq.h	2001/11/29 19:57:04	1.20
+++ include/asm-parisc/irq.h	2001/12/04 02:03:42
@@ -79,6 +79,7 @@ extern void disable_irq(int);
 #define disable_irq_nosync(i) disable_irq(i)
 extern void enable_irq(int);
 
+extern void do_irq(struct irqaction *a, int i, struct pt_regs *p);
 extern void do_irq_mask(unsigned long mask, struct irq_region *region,
 	struct pt_regs *regs);
 
@@ -90,8 +91,7 @@ extern int txn_claim_irq(int);
 extern unsigned int txn_alloc_data(int, unsigned int);
 extern unsigned long txn_alloc_addr(int);
 
-/* soft power switch support */
-extern void (*check_soft_power)(struct pt_regs *regs);
-extern void power_init(void);
+/* soft power switch support (power.c) */
+extern void (*check_soft_power)(void);
 
 #endif	/* _ASM_PARISC_IRQ_H */

--------------Boundary-00=_TGRS2DQFXNLMBINDOMMZ--