linux deller
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Helge Deller
maintainer - 2.4.16-pa27
- simpler and warning-free asm() statemnt in power-off code
- use cad_pid from kernel/sys.c instead of hardcoded pid 1 for killing init process
- print shutdown-msg on LCD if CONFIG_CHASSIS_LCD_LED is compiled in
Index: linux/Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.231
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 4 SUBLEVEL = 16 -EXTRAVERSION = -pa26 +EXTRAVERSION = -pa27 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
Index: linux/arch/parisc/kernel/power.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/power.c,v retrieving revision 1.4
arch/parisc/kernel/power.c +19 -15
@@ -15,11 +15,6 @@* - .... */ -#include <asm/irq.h> -#include <asm/pdc.h> -#include <asm/gsc.h> -#include <asm/io.h> -#include <linux/init.h> #include <linux/kernel.h> #include <linux/string.h>
@@ -27,6 +22,12 @@#include <linux/sched.h> #include <linux/interrupt.h> +#include <asm/gsc.h> +#include <asm/pdc.h> +#include <asm/irq.h> +#include <asm/io.h> +#include <asm/led.h> +/* For kernel debugging purposes it's sometimes better to have * the soft-power switch killing the power at once.
@@ -38,23 +39,21 @@/* local time-counter for shutdown */ static int shutdown_timer; +#define DIAG_CODE (code) (0x14000000 + ((code)<<5))/* this will go to processor.h or any other place... */ -/* taken from PCXL ERS pg 82 */ +/* taken from PCXL ERS page 82 */ #define MFCPU_X (rDiagReg, t_ch, t_th, code) \ - (0x14000000 + ((rDiagReg)<<21) + ((t_ch)<<16) + ((code)<<5) + ((t_th)<<0) ) + (DIAG_CODE(code) + ((rDiagReg)<<21) + ((t_ch)<<16) + ((t_th)<<0) ) +#define MTCPU (dr, gr) MFCPU_X(dr, gr, 0, 0x12)/* move value of gr to dr[dr] */ #define MFCPU_C (dr, gr) MFCPU_X(dr, gr, 0, 0x30)/* for dr0 and dr8 only ! */ #define MFCPU_T (dr, gr) MFCPU_X(dr, 0, gr, 0xa0)/* all dr except dr0 and dr8 */ #define __getDIAG (dr) ( { \ register unsigned long __res asm("r28");\ - __asm__ __volatile__ ( \ - ".word %0 \n\t" \ - "nop \n\t" \ - : \ - : "i" (MFCPU_T(dr,28)) \ - : "memory" \ + __asm__ __volatile__ ( \ + ".word %1\n nop\n" : "=&r" (__res) : "i" (MFCPU_T(dr,28)) \ ); \ __res; \ } )
@@ -64,7 +63,8 @@ static int shutdown_timer;static void deferred_poweroff (void *dummy) { -kill_proc (1 ,SIGINT ,0 ); +extern int cad_pid;/* kernel/sys.c */ +kill_proc (cad_pid,SIGINT ,1 );/* machine_power_off(); */ }
@@ -98,7 +98,11 @@ static void process_shutdown(void)/* wait until the button was pressed for 1 second */ if (shutdown_timer ==HZ ) { -printk (KERN_INFO "Shutting down...\n" ); +static char msg[] ="Shutting down..." ; +printk (KERN_INFO "%s\n" , msg); +#ifdef CONFIG_CHASSIS_LCD_LED +lcd_print (msg); +#endif poweroff (); } }