| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: [Xen-devel] [PATCH 01/44] kernel: Add support for poweroff	handler call chain
 
To: Guenter Roeck <linux@xxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxxFrom: Philippe Rétornaz <philippe.retornaz@xxxxxxxxx>Date: Tue, 07 Oct 2014 09:46:59 +0200Cc: linux-m32r-ja@xxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx,	linux-efi@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx,	Heiko Stuebner <heiko@xxxxxxxxx>, linux-sh@xxxxxxxxxxxxxxx,	devicetree@xxxxxxxxxxxxxxx, Pavel Machek <pavel@xxxxxx>,	devel@xxxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx,	lguest@xxxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx,	linux-hexagon@xxxxxxxxxxxxxxx, Alexander Graf <agraf@xxxxxxx>,	linux-acpi@xxxxxxxxxxxxxxx, Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>,	xen-devel@xxxxxxxxxxxxxxxxxxxx, Len Brown <len.brown@xxxxxxxxx>,	user-mode-linux-devel@xxxxxxxxxxxxxxxxxxxxx,	linux-pm@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx,	adi-buildroot-devel@xxxxxxxxxxxxxxxxxxxxx,	linux-m68k@xxxxxxxxxxxxxxxxxxxx, linux-am33-list@xxxxxxxxxx,	linux-tegra@xxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx,	linux-metag@xxxxxxxxxxxxxxx,	linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-cris-kernel@xxxxxxxx,	linux-parisc@xxxxxxxxxxxxxxx, "Rafael J. Wysocki" <rjw@xxxxxxxxxxxxx>,	linux-alpha@xxxxxxxxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,	Romain Perier <romain.perier@xxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxxDelivery-date: Tue, 07 Oct 2014 07:53:56 +0000List-id: Xen developer discussion <xen-devel.lists.xen.org> 
 
Hello
This seems exactly what I would need on the mc13783 to handle cleanly 
the poweroff, 
but after reading this patchset I have the following question:
[...]
 
+/*
+ *     Notifier list for kernel code which wants to be called
+ *     to power off the system.
+ */
+static ATOMIC_NOTIFIER_HEAD(poweroff_handler_list);
 
[...]
 
+void do_kernel_poweroff(void)
+{
+       atomic_notifier_call_chain(&poweroff_handler_list, 0, NULL);
+}
+
 
It seems that the poweroff callback needs to be atomic as per
_atomic_notifier_call_chain documentation:
        "Calls each function in a notifier chain in turn.  The functions
         run in an atomic context"
But this is a problem for many MFD (mc13783, twl4030 etc ...) which are
accessible on only a blocking bus (SPI, I2C).
What I am missing here ?
Thanks,
Philippe
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
 |