forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
evl: sanitize uapi/ headers (enable CONFIG_UAPI_HEADER_TEST)
Ensure that CONFIG_UAPI_HEADER_TEST passes with the EVL uapi/ headers. This involves: - removing all direct mention of the uapi/ root in include directives from uapi/ headers. - rename the header containing the ABI definitions for each uapi/evl/<element>.h to uapi/evl/<element>-abi.h, so that we can include it unambiguously from any uapi/ header as evl/<element>-abi.h, solving the name clash with the associated kernel header. - moving a few bits to the relevant implementation file (kernel and/or libevl) whenever possible, dropping the requirement for maintaining an uapi header for it (e.g. uapi/evl/mutex.h). At this chance, remove some unnecessary include directives from a few implementation files as well. Signed-off-by: Philippe Gerum <[email protected]>
- Loading branch information
Showing
44 changed files
with
110 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,10 @@ | |
* Copyright (C) 2018 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_CLOCK_H | ||
#define _EVL_UAPI_CLOCK_H | ||
#ifndef _EVL_UAPI_CLOCK_ABI_H | ||
#define _EVL_UAPI_CLOCK_ABI_H | ||
|
||
#include <uapi/evl/types.h> | ||
#include <linux/types.h> | ||
|
||
#define EVL_CLOCK_MONOTONIC_DEV "monotonic" | ||
#define EVL_CLOCK_REALTIME_DEV "realtime" | ||
|
@@ -34,4 +34,4 @@ struct evl_timerfd_setreq { | |
#define EVL_TFDIOC_SET _IOWR(EVL_TIMERFD_IOCBASE, 0, struct evl_timerfd_setreq) | ||
#define EVL_TFDIOC_GET _IOR(EVL_TIMERFD_IOCBASE, 1, struct __evl_itimerspec) | ||
|
||
#endif /* !_EVL_UAPI_CLOCK_H */ | ||
#endif /* !_EVL_UAPI_CLOCK_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,10 @@ | |
* Copyright (C) 2018 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_CONTROL_H | ||
#define _EVL_UAPI_CONTROL_H | ||
#ifndef _EVL_UAPI_CONTROL_ABI_H | ||
#define _EVL_UAPI_CONTROL_ABI_H | ||
|
||
#include <linux/types.h> | ||
#include <uapi/evl/sched.h> | ||
|
||
/* Earliest ABI level we support. */ | ||
#define EVL_ABI_BASE 23 | ||
|
@@ -40,4 +39,4 @@ struct evl_cpu_state { | |
#define EVL_CTLIOC_SCHEDCTL _IOWR(EVL_CONTROL_IOCBASE, 1, struct evl_sched_ctlreq) | ||
#define EVL_CTLIOC_GET_CPUSTATE _IOR(EVL_CONTROL_IOCBASE, 2, struct evl_cpu_state) | ||
|
||
#endif /* !_EVL_UAPI_CONTROL_H */ | ||
#endif /* !_EVL_UAPI_CONTROL_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* Copyright (C) 2018 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_FACTORY_H | ||
#define _EVL_UAPI_FACTORY_H | ||
#ifndef _EVL_UAPI_FACTORY_ABI_H | ||
#define _EVL_UAPI_FACTORY_ABI_H | ||
|
||
#include <linux/types.h> | ||
|
||
|
@@ -45,4 +45,4 @@ struct evl_clone_req { | |
|
||
#define EVL_IOC_CLONE _IOWR(EVL_FACTORY_IOCBASE, 0, struct evl_clone_req) | ||
|
||
#endif /* !_EVL_UAPI_FACTORY_H */ | ||
#endif /* !_EVL_UAPI_FACTORY_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,10 @@ | |
* Copyright (C) 2018 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_MONITOR_H | ||
#define _EVL_UAPI_MONITOR_H | ||
#ifndef _EVL_UAPI_MONITOR_ABI_H | ||
#define _EVL_UAPI_MONITOR_ABI_H | ||
|
||
#include <linux/types.h> | ||
#include <uapi/evl/types.h> | ||
#include <uapi/evl/factory.h> | ||
#include <evl/factory-abi.h> | ||
|
||
#define EVL_MONITOR_DEV "monitor" | ||
|
||
|
@@ -39,14 +37,14 @@ struct evl_monitor_state { | |
__u32 flags; | ||
union { | ||
struct { | ||
atomic_t owner; | ||
__u32 owner; /* atomic_t */ | ||
__u32 ceiling; | ||
__u32 recursive: 1, | ||
nesting : 31; | ||
} gate; | ||
struct { | ||
atomic_t value; | ||
atomic_t pollrefs; | ||
__u32 value; /* atomic_t */ | ||
__u32 pollrefs; /* atomic_t */ | ||
__u32 gate_offset; | ||
} event; | ||
} u; | ||
|
@@ -87,4 +85,4 @@ struct evl_monitor_binding { | |
#define EVL_MONIOC_TRYWAIT _IOWR(EVL_MONITOR_IOCBASE, 9, struct evl_monitor_trywaitreq) | ||
#define EVL_MONIOC_TRYWAIT_EXACT _IOWR(EVL_MONITOR_IOCBASE, 10, struct evl_monitor_trywaitreq) | ||
|
||
#endif /* !_EVL_UAPI_MONITOR_H */ | ||
#endif /* !_EVL_UAPI_MONITOR_ABI_H */ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,10 @@ | |
* Copyright (C) 2020 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_NET_SOCKET_H | ||
#define _EVL_UAPI_NET_SOCKET_H | ||
#ifndef _EVL_UAPI_NET_SOCKET_ABI_H | ||
#define _EVL_UAPI_NET_SOCKET_ABI_H | ||
|
||
#include <uapi/evl/types.h> | ||
#include <uapi/evl/fcntl.h> | ||
#include <evl/types.h> | ||
|
||
#define AF_OOB 46 /* Out-of-band domain sockets */ | ||
|
||
|
@@ -42,4 +41,4 @@ struct evl_netdev_activation { | |
#define EVL_SOCKIOC_SETRECVSZ _IOW(EVL_SOCKET_IOCBASE, 6, int) | ||
#define EVL_SOCKIOC_SETSENDSZ _IOW(EVL_SOCKET_IOCBASE, 7, int) | ||
|
||
#endif /* !_EVL_UAPI_NET_SOCKET_H */ | ||
#endif /* !_EVL_UAPI_NET_SOCKET_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,10 @@ | |
* Copyright (C) 2020 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_OBSERVABLE_H | ||
#define _EVL_UAPI_OBSERVABLE_H | ||
#ifndef _EVL_UAPI_OBSERVABLE_ABI_H | ||
#define _EVL_UAPI_OBSERVABLE_ABI_H | ||
|
||
#include <uapi/evl/types.h> | ||
#include <evl/types.h> | ||
|
||
#define EVL_OBSERVABLE_DEV "observable" | ||
|
||
|
@@ -42,4 +42,4 @@ struct __evl_notification { | |
#define EVL_OBSIOC_SUBSCRIBE _IOW(EVL_OBSERVABLE_IOCBASE, 0, struct evl_subscription) | ||
#define EVL_OBSIOC_UNSUBSCRIBE _IO(EVL_OBSERVABLE_IOCBASE, 1) | ||
|
||
#endif /* !_EVL_UAPI_OBSERVABLE_H */ | ||
#endif /* !_EVL_UAPI_OBSERVABLE_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,10 +4,10 @@ | |
* Copyright (C) 2018 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_POLL_H | ||
#define _EVL_UAPI_POLL_H | ||
#ifndef _EVL_UAPI_POLL_ABI_H | ||
#define _EVL_UAPI_POLL_ABI_H | ||
|
||
#include <uapi/evl/types.h> | ||
#include <evl/types.h> | ||
|
||
#define EVL_POLL_DEV "poll" | ||
|
||
|
@@ -39,4 +39,4 @@ struct evl_poll_waitreq { | |
#define EVL_POLIOC_CTL _IOW(EVL_POLL_IOCBASE, 0, struct evl_poll_ctlreq) | ||
#define EVL_POLIOC_WAIT _IOWR(EVL_POLL_IOCBASE, 1, struct evl_poll_waitreq) | ||
|
||
#endif /* !_EVL_UAPI_POLL_H */ | ||
#endif /* !_EVL_UAPI_POLL_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* Copyright (C) 2019 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_PROXY_H | ||
#define _EVL_UAPI_PROXY_H | ||
#ifndef _EVL_UAPI_PROXY_ABI_H | ||
#define _EVL_UAPI_PROXY_ABI_H | ||
|
||
#include <linux/types.h> | ||
|
||
|
@@ -17,4 +17,4 @@ struct evl_proxy_attrs { | |
__u32 granularity; | ||
}; | ||
|
||
#endif /* !_EVL_UAPI_PROXY_H */ | ||
#endif /* !_EVL_UAPI_PROXY_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,10 @@ | |
* Copyright (C) 2005, 2018 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_SCHED_H | ||
#define _EVL_UAPI_SCHED_H | ||
#ifndef _EVL_UAPI_SCHED_ABI_H | ||
#define _EVL_UAPI_SCHED_ABI_H | ||
|
||
#include <uapi/evl/types.h> | ||
#include <evl/types.h> | ||
|
||
#define EVL_CPU_OOB (1 << 0) | ||
#define EVL_CPU_ISOL (1 << 1) | ||
|
@@ -130,4 +130,4 @@ struct evl_sched_ctlreq { | |
__u64 info_ptr; /* (union evl_sched_ctlinfo __user *info) */ | ||
}; | ||
|
||
#endif /* !_EVL_UAPI_SCHED_H */ | ||
#endif /* !_EVL_UAPI_SCHED_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ | |
* Copyright (C) 2018 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_SYSCALL_H | ||
#define _EVL_UAPI_SYSCALL_H | ||
#ifndef _EVL_UAPI_SYSCALL_ABI_H | ||
#define _EVL_UAPI_SYSCALL_ABI_H | ||
|
||
#define sys_evl_read 0 /* oob_read() */ | ||
#define sys_evl_write 1 /* oob_write() */ | ||
#define sys_evl_ioctl 2 /* oob_ioctl() */ | ||
|
||
#define NR_EVL_SYSCALLS 3 | ||
|
||
#endif /* !_EVL_UAPI_SYSCALL_H */ | ||
#endif /* !_EVL_UAPI_SYSCALL_ABI_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,10 @@ | |
* Copyright (C) 2005, 2018 Philippe Gerum <[email protected]> | ||
*/ | ||
|
||
#ifndef _EVL_UAPI_THREAD_H | ||
#define _EVL_UAPI_THREAD_H | ||
#ifndef _EVL_UAPI_THREAD_ABI_H | ||
#define _EVL_UAPI_THREAD_ABI_H | ||
|
||
#include <linux/types.h> | ||
#include <uapi/evl/sched.h> | ||
#include <evl/sched-abi.h> | ||
|
||
#define EVL_THREAD_DEV "thread" | ||
|
||
|
@@ -131,4 +130,4 @@ struct evl_thread_state { | |
#define EVL_THRIOC_DEMOTE _IO(EVL_THREAD_IOCBASE, 11) | ||
#define EVL_THRIOC_YIELD _IO(EVL_THREAD_IOCBASE, 12) | ||
|
||
#endif /* !_EVL_UAPI_THREAD_H */ | ||
#endif /* !_EVL_UAPI_THREAD_ABI_H */ |
Oops, something went wrong.