xref: /openbmc/linux/arch/parisc/include/uapi/asm/ioctl.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
270c1674fSDavid Howells /*
370c1674fSDavid Howells  *    Linux/PA-RISC Project (http://www.parisc-linux.org/)
470c1674fSDavid Howells  *    Copyright (C) 1999,2003 Matthew Wilcox < willy at debian . org >
570c1674fSDavid Howells  *    portions from "linux/ioctl.h for Linux" by H.H. Bergman.
670c1674fSDavid Howells  *
770c1674fSDavid Howells  *    This program is free software; you can redistribute it and/or modify
870c1674fSDavid Howells  *    it under the terms of the GNU General Public License as published by
970c1674fSDavid Howells  *    the Free Software Foundation; either version 2 of the License, or
1070c1674fSDavid Howells  *    (at your option) any later version.
1170c1674fSDavid Howells  *
1270c1674fSDavid Howells  *    This program is distributed in the hope that it will be useful,
1370c1674fSDavid Howells  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
1470c1674fSDavid Howells  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1570c1674fSDavid Howells  *    GNU General Public License for more details.
1670c1674fSDavid Howells  *
1770c1674fSDavid Howells  *    You should have received a copy of the GNU General Public License
1870c1674fSDavid Howells  *    along with this program; if not, write to the Free Software
1970c1674fSDavid Howells  *    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
2070c1674fSDavid Howells  */
2170c1674fSDavid Howells 
2270c1674fSDavid Howells 
2370c1674fSDavid Howells #ifndef _ASM_PARISC_IOCTL_H
2470c1674fSDavid Howells #define _ASM_PARISC_IOCTL_H
2570c1674fSDavid Howells 
2670c1674fSDavid Howells /* ioctl command encoding: 32 bits total, command in lower 16 bits,
2770c1674fSDavid Howells  * size of the parameter structure in the lower 14 bits of the
2870c1674fSDavid Howells  * upper 16 bits.
2970c1674fSDavid Howells  * Encoding the size of the parameter structure in the ioctl request
3070c1674fSDavid Howells  * is useful for catching programs compiled with old versions
3170c1674fSDavid Howells  * and to avoid overwriting user space outside the user buffer area.
3270c1674fSDavid Howells  * The highest 2 bits are reserved for indicating the ``access mode''.
3370c1674fSDavid Howells  * NOTE: This limits the max parameter size to 16kB -1 !
3470c1674fSDavid Howells  */
3570c1674fSDavid Howells 
3670c1674fSDavid Howells /*
3770c1674fSDavid Howells  * Direction bits.
3870c1674fSDavid Howells  */
3970c1674fSDavid Howells #define _IOC_NONE	0U
4070c1674fSDavid Howells #define _IOC_WRITE	2U
4170c1674fSDavid Howells #define _IOC_READ	1U
4270c1674fSDavid Howells 
4370c1674fSDavid Howells #include <asm-generic/ioctl.h>
4470c1674fSDavid Howells 
4570c1674fSDavid Howells #endif /* _ASM_PARISC_IOCTL_H */
46