[PATCH V3] powerpc, powernv: Add OPAL platform event driver

Anshuman Khandual khandual at linux.vnet.ibm.com
Tue Dec 2 19:04:28 AEDT 2014


On 11/25/2014 06:51 PM, Anshuman Khandual wrote:
> This patch creates a new OPAL platform event character driver
> which will give userspace clients the access to these events
> and process them effectively. Following platforms events are
> currently supported with this platform driver.
> 
> 	(1) Environmental and Power Warning (EPOW)
> 	(2) Delayed Power Off (DPO)
> 
> The user interface for this driver is /dev/opal_event character
> device file where the user space clients can poll and read for
> new opal platform events. The expected sequence of events driven
> from user space should be like the following.
> 
> 	(1) Open the character device file
> 	(2) Poll on the file for POLLIN event
> 	(3) When unblocked, must attempt to read PLAT_EVENT_MAX_SIZE size
> 	(4) Kernel driver will pass at most one opal_plat_event structure
> 	(5) Poll again for more new events
> 
> The driver registers for OPAL messages notifications corresponding to
> individual OPAL events. When any of those event messages arrive in the
> kernel, the callbacks are called to process them which in turn unblocks
> the polling thread on the character device file. The driver also registers
> a timer function which will be called after a threshold amount of time to
> shutdown the system. The user space client receives the timeout value for
> all individual OPAL platform events and hence must prepare the system and
> eventually shutdown. In case the user client does not shutdown the system,
> the timer function will be called after the threshold and shutdown the
> system explicitly.
> 
> Reviewed-by: Neelesh Gupta <neelegup at linux.vnet.ibm.com>
> Signed-off-by: Anshuman Khandual <khandual at linux.vnet.ibm.com>
> ---
> Changes in V3:
> - Rebased the patch against the mainline
> 
> Changes in V2:
> - Changed the function fetch_dpo_timeout
> - Export opal_platform_events.h for user space consumption
> - Posted here https://patchwork.ozlabs.org/patch/396725/
> 
> Original V1:
> - Original patch
> - Posted here http://patchwork.ozlabs.org/patch/394340/

Hey Michael,

Do you have any updates on this patch yet ? Thanks !



More information about the Linuxppc-dev mailing list