From: Vipin K Parashar <vipin@linux.vnet.ibm.com>
To: Stewart Smith <stewart@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Cc: Joel Stanley <joel@jms.id.au>,
Anshuman Khandual <khandual@linux.vnet.ibm.com>
Subject: Re: [PATCH V4] powerpc, powernv: Add OPAL platform event driver
Date: Thu, 12 Feb 2015 11:17:38 +0530 [thread overview]
Message-ID: <54DC3E7A.3090404@linux.vnet.ibm.com> (raw)
In-Reply-To: <m31tlxniqp.fsf@oc8180480414.ibm.com>
On 02/11/2015 10:32 AM, Stewart Smith wrote:
> Vipin K Parashar <vipin@linux.vnet.ibm.com> writes:
>> (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 OPAL_PLAT_EVENT_MAX_SIZE size
>> (4) Kernel driver will pass at most one opal_plat_event structure
>> (5) Poll again for more new events
> A few thoughts from discussing with Michael and Joel:
> - not convinced that a chardev is the most ideal way to notify
> userspace. It seems like yet-another powerpc specific notification
> mechanism, which isn't ideal.
> - netlink probably isn't right either (although maybe *sligthtly*
> better?)
> - it seems that the "standard" way is ACPI, so I wonder if we could emit
> an ACPI event and essentially fake having ACPI... that would make all
> existing userspace "just work", right?
> Looking at acpi_bus_generate_netlink_event call in
> drivers/acpi/button.c it looks possible that we may be able to
> (relatively simply) do that?
Thanks Stewart, i will explore more about ACPI and will also try to see
if we could use it to throw
events to guests.
> - What do UPSs do? It would seem that some common "this is what's about
> to happen to your power" would almost *have* to exist somewhat
> generically?
UPS class tells about UPS status with system. FSP sends mbox messages
with UPS status along with
UPS status bit which tells exactly as to what change is there in UPS
status like UPS installed, UPS battery low, UPS removed (By passed). We
plan to add support for these UPS events in skiboot to provide more
UPS details.
> I strongly advocate for anything that doesn't require custom userspace
> that's OPAL/POWER specific (that we then have to get into distros etc etc
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
next prev parent reply other threads:[~2015-02-12 5:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-06 7:08 [PATCH V4] powerpc, powernv: Add OPAL platform event driver Vipin K Parashar
2015-02-11 5:02 ` Stewart Smith
2015-02-12 5:47 ` Vipin K Parashar [this message]
2015-02-12 5:59 ` Stewart Smith
2015-02-24 9:44 ` Vipin K Parashar
2015-03-02 17:23 ` Vipin K Parashar
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=54DC3E7A.3090404@linux.vnet.ibm.com \
--to=vipin@linux.vnet.ibm.com \
--cc=joel@jms.id.au \
--cc=khandual@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=stewart@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).