From: Helge Deller <deller@gmx.de>
To: parisc-linux@lists.parisc-linux.org,
deller@dsl2.external.hp.com (Helge Deller),
parisc-linux-cvs@lists.parisc-linux.org
Subject: [parisc-linux] Re: [parisc-linux-cvs] linux deller
Date: Thu, 27 Dec 2001 00:20:03 +0100 [thread overview]
Message-ID: <20011226232317.698C44842@dsl2.external.hp.com> (raw)
In-Reply-To: <20011226231927.CA2E54842@dsl2.external.hp.com>
[-- Attachment #1: Type: text/plain, Size: 235 bytes --]
- 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
[-- Attachment #2: diff1 --]
[-- Type: text/plain, Size: 2909 bytes --]
Index: linux/Makefile
===================================================================
RCS file: /var/cvs/linux/Makefile,v
retrieving revision 1.231
diff -u -p -r1.231 Makefile
--- linux/Makefile 2001/12/26 22:02:47 1.231
+++ linux/Makefile 2001/12/26 23:16:09
@@ -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
diff -u -p -r1.4 power.c
--- linux/arch/parisc/kernel/power.c 2001/12/05 18:46:30 1.4
+++ linux/arch/parisc/kernel/power.c 2001/12/26 23:16:20
@@ -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();
}
}
next parent reply other threads:[~2001-12-26 23:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20011226231927.CA2E54842@dsl2.external.hp.com>
2001-12-26 23:20 ` Helge Deller [this message]
[not found] <20020202194652.B1F8D482A@dsl2.external.hp.com>
2002-02-02 19:43 ` [parisc-linux] Re: [parisc-linux-cvs] linux deller Helge Deller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011226232317.698C44842@dsl2.external.hp.com \
--to=deller@gmx.de \
--cc=deller@dsl2.external.hp.com \
--cc=parisc-linux-cvs@lists.parisc-linux.org \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox