xref: /linux/include/linux/fsl_hypervisor.h (revision e5451c8f8330e03ad3cfa16048b4daf961af434f)
16db71994STimur Tabi /*
26db71994STimur Tabi  * Freescale hypervisor ioctl and kernel interface
36db71994STimur Tabi  *
46db71994STimur Tabi  * Copyright (C) 2008-2011 Freescale Semiconductor, Inc.
56db71994STimur Tabi  * Author: Timur Tabi <timur@freescale.com>
66db71994STimur Tabi  *
76db71994STimur Tabi  * Redistribution and use in source and binary forms, with or without
86db71994STimur Tabi  * modification, are permitted provided that the following conditions are met:
96db71994STimur Tabi  *     * Redistributions of source code must retain the above copyright
106db71994STimur Tabi  *       notice, this list of conditions and the following disclaimer.
116db71994STimur Tabi  *     * Redistributions in binary form must reproduce the above copyright
126db71994STimur Tabi  *       notice, this list of conditions and the following disclaimer in the
136db71994STimur Tabi  *       documentation and/or other materials provided with the distribution.
146db71994STimur Tabi  *     * Neither the name of Freescale Semiconductor nor the
156db71994STimur Tabi  *       names of its contributors may be used to endorse or promote products
166db71994STimur Tabi  *       derived from this software without specific prior written permission.
176db71994STimur Tabi  *
186db71994STimur Tabi  *
196db71994STimur Tabi  * ALTERNATIVELY, this software may be distributed under the terms of the
206db71994STimur Tabi  * GNU General Public License ("GPL") as published by the Free Software
216db71994STimur Tabi  * Foundation, either version 2 of that License or (at your option) any
226db71994STimur Tabi  * later version.
236db71994STimur Tabi  *
246db71994STimur Tabi  * This software is provided by Freescale Semiconductor "as is" and any
256db71994STimur Tabi  * express or implied warranties, including, but not limited to, the implied
266db71994STimur Tabi  * warranties of merchantability and fitness for a particular purpose are
276db71994STimur Tabi  * disclaimed. In no event shall Freescale Semiconductor be liable for any
286db71994STimur Tabi  * direct, indirect, incidental, special, exemplary, or consequential damages
296db71994STimur Tabi  * (including, but not limited to, procurement of substitute goods or services;
306db71994STimur Tabi  * loss of use, data, or profits; or business interruption) however caused and
316db71994STimur Tabi  * on any theory of liability, whether in contract, strict liability, or tort
326db71994STimur Tabi  * (including negligence or otherwise) arising in any way out of the use of this
336db71994STimur Tabi  * software, even if advised of the possibility of such damage.
346db71994STimur Tabi  *
356db71994STimur Tabi  * This file is used by the Freescale hypervisor management driver.  It can
366db71994STimur Tabi  * also be included by applications that need to communicate with the driver
376db71994STimur Tabi  * via the ioctl interface.
386db71994STimur Tabi  */
396db71994STimur Tabi #ifndef FSL_HYPERVISOR_H
406db71994STimur Tabi #define FSL_HYPERVISOR_H
416db71994STimur Tabi 
42*607ca46eSDavid Howells #include <uapi/linux/fsl_hypervisor.h>
436db71994STimur Tabi 
446db71994STimur Tabi 
456db71994STimur Tabi /**
466db71994STimur Tabi  * fsl_hv_event_register() - register a callback for failover events
476db71994STimur Tabi  * @nb: pointer to caller-supplied notifier_block structure
486db71994STimur Tabi  *
496db71994STimur Tabi  * This function is called by device drivers to register their callback
506db71994STimur Tabi  * functions for fail-over events.
516db71994STimur Tabi  *
526db71994STimur Tabi  * The caller should allocate a notifier_block object and initialize the
536db71994STimur Tabi  * 'priority' and 'notifier_call' fields.
546db71994STimur Tabi  */
556db71994STimur Tabi int fsl_hv_failover_register(struct notifier_block *nb);
566db71994STimur Tabi 
576db71994STimur Tabi /**
586db71994STimur Tabi  * fsl_hv_event_unregister() - unregister a callback for failover events
596db71994STimur Tabi  * @nb: the same 'nb' used in previous fsl_hv_failover_register call
606db71994STimur Tabi  */
616db71994STimur Tabi int fsl_hv_failover_unregister(struct notifier_block *nb);
626db71994STimur Tabi 
636db71994STimur Tabi #endif
64