From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id B3E171A31B3 for ; Fri, 10 Apr 2015 16:53:28 +1000 (AEST) Received: from /spool/local by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 10 Apr 2015 16:53:27 +1000 Received: from d23relay06.au.ibm.com (d23relay06.au.ibm.com [9.185.63.219]) by d23dlp02.au.ibm.com (Postfix) with ESMTP id 20F152BB004D for ; Fri, 10 Apr 2015 16:53:25 +1000 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t3A6rGR524969420 for ; Fri, 10 Apr 2015 16:53:25 +1000 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t3A6qpNJ028091 for ; Fri, 10 Apr 2015 16:52:51 +1000 From: Vipin K Parashar To: linuxppc-dev@lists.ozlabs.org Subject: [PATCH 0/2] OPAL Poweroff events driver for PowerNV platform Date: Fri, 10 Apr 2015 12:22:11 +0530 Message-Id: <1428648733-23826-1-git-send-email-vipin@linux.vnet.ibm.com> Cc: Vipin K Parashar List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , OPAL Poweroff events driver handles poweroff events on PowerNV platform. Currently this driver supports EPOW (Early Power Off Warning) and Delayed Power Off (DPO) events on FSP based systems. EPOW events are generated by SPCN/FSP due to various critical system conditions that need system shutdown. Few examples of these conditions are high ambient temperature or system running on UPS power with UPS battery low. DPO event is generated in reponse to user initiated system shutdown request. OPAL Poweroff events driver handles OPAL notifications for these events, processes them, starts kernel system poweroff timers and send uevents to notify udev. Poweroff event attributes are exposed as attributes files for platform device opal-poweroff-events. Host userspace should add udev scripts to perform various actions like sending event info to guests for graceful guest shutdown and host poweroff scripts. Below attribute files are created for platform device opal-poweroff-events: admin_shutdown - Poweroff needed due to admin requested shutdown Values as below: No Yes power_supply - Poweroff needed due to UPS/internal battery Values as below: Normal UPS UPS-low thermal - Poweroff needed due to high, critical ambient or internal temp Values as below: Normal High-ambient-temp Critical-ambient-temp High-internal-temp Critical-internal-temp timeout: Time allowed for poweroff Vipin K Parashar (2): powerpc/powernv: OPAL poweroff events driver for PowerNV platform powerpc/powernv: Add udev notification and poweroff event attributes arch/powerpc/include/asm/opal.h | 22 + arch/powerpc/platforms/powernv/Makefile | 2 +- .../platforms/powernv/opal-poweroff-events.c | 567 +++++++++++++++++++++ .../platforms/powernv/opal-poweroff-events.h | 35 ++ arch/powerpc/platforms/powernv/opal-wrappers.S | 3 +- arch/powerpc/platforms/powernv/opal.c | 8 +- 6 files changed, 634 insertions(+), 3 deletions(-) create mode 100644 arch/powerpc/platforms/powernv/opal-poweroff-events.c create mode 100644 arch/powerpc/platforms/powernv/opal-poweroff-events.h -- 1.9.3