direct-io.hg

changeset 4361:df27b2234149

bitkeeper revision 1.1159.276.1 (4248a7f9-4Jb7VaVyStfIWsk_XitsQ)

Make sysrq work.

Signed-off-by: <mark.williamson@cl.cam.ac.uk>
author mwilli2@equilibrium.research
date Tue Mar 29 00:57:29 2005 +0000 (2005-03-29)
parents 41b4061f42cb
children 8f4d7fcb8020
files linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c tools/python/xen/lowlevel/xu/xu.c xen/include/public/io/domain_controller.h
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c	Mon Mar 28 17:51:38 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c	Tue Mar 29 00:57:29 2005 +0000
     1.3 @@ -242,7 +242,7 @@ static void shutdown_handler(ctrl_msg_t 
     1.4      else if ( (pending_sysrq == -1) && 
     1.5                (msg->subtype == CMSG_SHUTDOWN_SYSRQ) )
     1.6      {
     1.7 -        pending_sysrq = msg->msg[0];
     1.8 +        pending_sysrq = ((shutdown_sysrq_t *)&msg->msg[0])->key;
     1.9          schedule_work(&sysrq_work);
    1.10      }
    1.11      else
     2.1 --- a/tools/python/xen/lowlevel/xu/xu.c	Mon Mar 28 17:51:38 2005 +0000
     2.2 +++ b/tools/python/xen/lowlevel/xu/xu.c	Tue Mar 29 00:57:29 2005 +0000
     2.3 @@ -671,6 +671,9 @@ static PyObject *xu_message_new(PyObject
     2.4          P2C(mem_request_t, target, u32);
     2.5          P2C(mem_request_t, status, u32);
     2.6          break;
     2.7 +    case TYPE(CMSG_SHUTDOWN, CMSG_SHUTDOWN_SYSRQ):
     2.8 +        P2C(shutdown_sysrq_t, key, char);
     2.9 +        break;
    2.10      }
    2.11  
    2.12      if ( dict_items_parsed != PyDict_Size(payload) )
     3.1 --- a/xen/include/public/io/domain_controller.h	Mon Mar 28 17:51:38 2005 +0000
     3.2 +++ b/xen/include/public/io/domain_controller.h	Tue Mar 29 00:57:29 2005 +0000
     3.3 @@ -545,6 +545,10 @@ typedef struct {
     3.4                                      /* SHUTDOWN_suspend.                     */
     3.5  #define CMSG_SHUTDOWN_SYSRQ     3
     3.6  
     3.7 +typedef struct {
     3.8 +    char key;      /* 0: sysrq key */
     3.9 +    char __pad[3]; /* 1: */
    3.10 +} PACKED shutdown_sysrq_t; /* 4 bytes */
    3.11  
    3.12  /******************************************************************************
    3.13   * MEMORY CONTROLS