Home | History | Annotate | Download | only in kernel_space
      1 /*
      2  *
      3  *   Copyright (c) International Business Machines  Corp., 2001
      4  *
      5  *   This program is free software;  you can redistribute it and/or modify
      6  *   it under the terms of the GNU General Public License as published by
      7  *   the Free Software Foundation; either version 2 of the License, or
      8  *   (at your option) any later version.
      9  *
     10  *   This program is distributed in the hope that it will be useful,
     11  *   but WITHOUT ANY WARRANTY;  without even the implied warranty of
     12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
     13  *   the GNU General Public License for more details.
     14  *
     15  *   You should have received a copy of the GNU General Public License
     16  *   along with this program;  if not, write to the Free Software
     17  *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     18  *
     19 
     20  * Remember that you want to seperate your header
     21  * files between what is needed in kernel space
     22  * only, and what will also be needed by a user
     23  * space program that is using this module. For
     24  * that reason keep all structures that will need
     25  * kernel space pointers in a seperate header file
     26  * from where ioctl flags aer kept
     27  *
     28  * author: Kai Zhao
     29  * date:   09/03/2003
     30  *
     31  */
     32 
     33 /* test function export to user space*/
     34 extern int tdrm_test_interface(struct inode *inode, struct file *filp,
     35 			unsigned int cmd, unsigned long arg);
     36 extern int tdrm_test_stub_register(struct inode *inode,struct file *filp,
     37 		unsigned int cmd , unsigned long arg);
     38 extern int tdrm_test_stub_unregister(struct inode *inode,struct file *filp,
     39 		unsigned int cmd , unsigned long arg);
     40 extern int tdrm_test_uninit_agp(struct inode *inode,struct file *filp,
     41 		unsigned int cmd , unsigned long arg);
     42 extern int tdrm_test_init_agp(struct inode *inode,struct file *filp,
     43 		unsigned int cmd , unsigned long arg);
     44 extern int tdrm_test_add_magic(struct inode *inode,struct file *filp,
     45 		unsigned int cmd , unsigned long arg);
     46 extern int tdrm_test_remove_magic(struct inode *inode,struct file *filp,
     47 		unsigned int cmd , unsigned long arg);
     48 extern int tdrm_test_ctxbitmap_init(struct inode *inode,struct file *filp,
     49 		unsigned int cmd , unsigned long arg);
     50 extern int tdrm_test_ctxbitmap_cleanup(struct inode *inode,struct file *filp,
     51 		unsigned int cmd , unsigned long arg);
     52 extern int tdrm_test_alloc_pages(struct inode *inode,struct file *filp,
     53 		unsigned int cmd , unsigned long arg);
     54 extern int tdrm_test_free_pages(struct inode *inode,struct file *filp,
     55 		unsigned int cmd , unsigned long arg);
     56 
     57 
     58 
     59 typedef int tdrm_ioctl_t( struct inode *inode, struct file *filp,
     60 			 unsigned int cmd, unsigned long arg );
     61 
     62 typedef struct tdrm_ioctl_desc {
     63 	tdrm_ioctl_t	     *func;
     64 	int		     auth_needed;
     65 	int		     root_only;
     66 } tdrm_ioctl_desc_t;
     67 
     68