1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * Copyright 2010 Tilera Corporation. All Rights Reserved.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation, version 2.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
12 * NON INFRINGEMENT. See the GNU General Public License for
15 * Provide methods for access control of per-cpu resources like
19 #ifndef _UAPI_ASM_TILE_HARDWALL_H
20 #define _UAPI_ASM_TILE_HARDWALL_H
22 #include <arch/chip.h>
23 #include <linux/ioctl.h>
25 #define HARDWALL_IOCTL_BASE 0xa2
28 * The HARDWALL_CREATE() ioctl is a macro with a "size" argument.
29 * The resulting ioctl value is passed to the kernel in conjunction
30 * with a pointer to a standard kernel bitmask of cpus.
31 * For network resources (UDN or IDN) the bitmask must physically
32 * represent a rectangular configuration on the chip.
33 * The "size" is the number of bytes of cpu mask data.
35 #define _HARDWALL_CREATE 1
36 #define HARDWALL_CREATE(size) \
37 _IOC(_IOC_READ, HARDWALL_IOCTL_BASE, _HARDWALL_CREATE, (size))
39 #define _HARDWALL_ACTIVATE 2
40 #define HARDWALL_ACTIVATE \
41 _IO(HARDWALL_IOCTL_BASE, _HARDWALL_ACTIVATE)
43 #define _HARDWALL_DEACTIVATE 3
44 #define HARDWALL_DEACTIVATE \
45 _IO(HARDWALL_IOCTL_BASE, _HARDWALL_DEACTIVATE)
47 #define _HARDWALL_GET_ID 4
48 #define HARDWALL_GET_ID \
49 _IO(HARDWALL_IOCTL_BASE, _HARDWALL_GET_ID)
52 #endif /* _UAPI_ASM_TILE_HARDWALL_H */