Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Freescale hypervisor ioctl and kernel interface
0003  *
0004  * Copyright (C) 2008-2011 Freescale Semiconductor, Inc.
0005  * Author: Timur Tabi <timur@freescale.com>
0006  *
0007  * Redistribution and use in source and binary forms, with or without
0008  * modification, are permitted provided that the following conditions are met:
0009  *     * Redistributions of source code must retain the above copyright
0010  *       notice, this list of conditions and the following disclaimer.
0011  *     * Redistributions in binary form must reproduce the above copyright
0012  *       notice, this list of conditions and the following disclaimer in the
0013  *       documentation and/or other materials provided with the distribution.
0014  *     * Neither the name of Freescale Semiconductor nor the
0015  *       names of its contributors may be used to endorse or promote products
0016  *       derived from this software without specific prior written permission.
0017  *
0018  *
0019  * ALTERNATIVELY, this software may be distributed under the terms of the
0020  * GNU General Public License ("GPL") as published by the Free Software
0021  * Foundation, either version 2 of that License or (at your option) any
0022  * later version.
0023  *
0024  * This software is provided by Freescale Semiconductor "as is" and any
0025  * express or implied warranties, including, but not limited to, the implied
0026  * warranties of merchantability and fitness for a particular purpose are
0027  * disclaimed. In no event shall Freescale Semiconductor be liable for any
0028  * direct, indirect, incidental, special, exemplary, or consequential damages
0029  * (including, but not limited to, procurement of substitute goods or services;
0030  * loss of use, data, or profits; or business interruption) however caused and
0031  * on any theory of liability, whether in contract, strict liability, or tort
0032  * (including negligence or otherwise) arising in any way out of the use of this
0033  * software, even if advised of the possibility of such damage.
0034  *
0035  * This file is used by the Freescale hypervisor management driver.  It can
0036  * also be included by applications that need to communicate with the driver
0037  * via the ioctl interface.
0038  */
0039 #ifndef FSL_HYPERVISOR_H
0040 #define FSL_HYPERVISOR_H
0041 
0042 #include <uapi/linux/fsl_hypervisor.h>
0043 
0044 
0045 /**
0046  * fsl_hv_event_register() - register a callback for failover events
0047  * @nb: pointer to caller-supplied notifier_block structure
0048  *
0049  * This function is called by device drivers to register their callback
0050  * functions for fail-over events.
0051  *
0052  * The caller should allocate a notifier_block object and initialize the
0053  * 'priority' and 'notifier_call' fields.
0054  */
0055 int fsl_hv_failover_register(struct notifier_block *nb);
0056 
0057 /**
0058  * fsl_hv_event_unregister() - unregister a callback for failover events
0059  * @nb: the same 'nb' used in previous fsl_hv_failover_register call
0060  */
0061 int fsl_hv_failover_unregister(struct notifier_block *nb);
0062 
0063 #endif