Make struct syscall_args machine independent
After a round of cleanups in late 2020, all definitions are
functionally identical.
This removes a rotted __aligned(8) on arm. It was added in
b7112ead32
and was intended to align the
args member so that 64-bit types (off_t, etc) could be safely read on
armeb compiled with clang. With the removal of armev, this is no
longer needed (armv7 requires that 32-bit aligned reads of 64-bit
values be supported and we enable such support on armv6). As further
evidence this is unnecessary, cleanups to struct syscall_args have
resulted in args being 32-bit aligned on 32-bit systems. The sole
effect is to bloat the struct by 4 bytes.
Reviewed by: kib, jhb, imp
Differential Revision: https://reviews.freebsd.org/D33308
This commit is contained in:
parent
9a128e1678
commit
547566526f
@ -91,13 +91,6 @@ struct mdproc {
|
||||
#define KINFO_PROC_SIZE 1088
|
||||
#define KINFO_PROC32_SIZE 768
|
||||
|
||||
struct syscall_args {
|
||||
u_int code;
|
||||
u_int original_code;
|
||||
struct sysent *callp;
|
||||
register_t args[8];
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
/* Get the current kernel thread stack usage. */
|
||||
|
@ -56,22 +56,6 @@ struct mdproc {
|
||||
|
||||
#define KINFO_PROC_SIZE 816
|
||||
|
||||
#define MAXARGS 8
|
||||
/*
|
||||
* This holds the syscall state for a single system call.
|
||||
* As some syscall arguments may be 64-bit aligned we need to ensure the
|
||||
* args value is 64-bit aligned. The ABI will then ensure any 64-bit
|
||||
* arguments are already correctly aligned, even if they were passed in
|
||||
* via registers, we just need to make sure we copy them to an aligned
|
||||
* buffer.
|
||||
*/
|
||||
struct syscall_args {
|
||||
u_int code;
|
||||
u_int original_code;
|
||||
struct sysent *callp;
|
||||
register_t args[MAXARGS];
|
||||
} __aligned(8);
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <machine/pcb.h>
|
||||
|
||||
|
@ -47,14 +47,6 @@ struct mdproc {
|
||||
#define KINFO_PROC_SIZE 1088
|
||||
#define KINFO_PROC32_SIZE 816
|
||||
|
||||
#define MAXARGS 8
|
||||
struct syscall_args {
|
||||
u_int code;
|
||||
u_int original_code;
|
||||
struct sysent *callp;
|
||||
register_t args[MAXARGS];
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <machine/pcb.h>
|
||||
|
@ -62,13 +62,6 @@ struct mdproc {
|
||||
|
||||
#define KINFO_PROC_SIZE 768
|
||||
|
||||
struct syscall_args {
|
||||
u_int code;
|
||||
u_int original_code;
|
||||
struct sysent *callp;
|
||||
register_t args[8];
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <machine/md_var.h>
|
||||
|
@ -81,14 +81,6 @@ struct mdproc {
|
||||
size_t md_tls_tcb_offset; /* TCB offset */
|
||||
};
|
||||
|
||||
#define MAXARGS 8
|
||||
struct syscall_args {
|
||||
u_int code;
|
||||
u_int original_code;
|
||||
struct sysent *callp;
|
||||
register_t args[MAXARGS];
|
||||
};
|
||||
|
||||
#ifdef __mips_n64
|
||||
#define KINFO_PROC_SIZE 1088
|
||||
#define KINFO_PROC32_SIZE 816
|
||||
|
@ -59,14 +59,6 @@ struct mdproc {
|
||||
#define KINFO_PROC_SIZE 816
|
||||
#endif
|
||||
|
||||
#define MAXARGS 8
|
||||
struct syscall_args {
|
||||
u_int code;
|
||||
u_int original_code;
|
||||
struct sysent *callp;
|
||||
register_t args[MAXARGS];
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <machine/pcb.h>
|
||||
|
@ -45,14 +45,6 @@ struct mdproc {
|
||||
|
||||
#define KINFO_PROC_SIZE 1088
|
||||
|
||||
#define MAXARGS 8
|
||||
struct syscall_args {
|
||||
u_int code;
|
||||
u_int original_code;
|
||||
struct sysent *callp;
|
||||
register_t args[MAXARGS];
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <machine/pcb.h>
|
||||
|
||||
|
@ -193,7 +193,6 @@ struct racct;
|
||||
struct sbuf;
|
||||
struct sleepqueue;
|
||||
struct socket;
|
||||
struct syscall_args;
|
||||
struct td_sched;
|
||||
struct thread;
|
||||
struct trapframe;
|
||||
@ -202,6 +201,14 @@ struct vm_map;
|
||||
struct vm_map_entry;
|
||||
struct epoch_tracker;
|
||||
|
||||
#define MAXARGS 8
|
||||
struct syscall_args {
|
||||
u_int code;
|
||||
u_int original_code;
|
||||
struct sysent *callp;
|
||||
register_t args[MAXARGS];
|
||||
};
|
||||
|
||||
/*
|
||||
* XXX: Does this belong in resource.h or resourcevar.h instead?
|
||||
* Resource usage extension. The times in rusage structs in the kernel are
|
||||
|
Loading…
Reference in New Issue
Block a user