@@ -8,10 +8,6 @@
#ifndef _ASM_ARC_ATOMIC64_ARCV2_H
#define _ASM_ARC_ATOMIC64_ARCV2_H
-typedef struct {
- s64 __aligned(8) counter;
-} atomic64_t;
-
#define ATOMIC64_INIT(a) { (a) }
static inline s64 arch_atomic64_read(const atomic64_t *v)
@@ -243,10 +243,6 @@ ATOMIC_OPS(xor, ^=, eor)
#define arch_atomic_xchg(v, new) (arch_xchg(&((v)->counter), new))
#ifndef CONFIG_GENERIC_ATOMIC64
-typedef struct {
- s64 counter;
-} atomic64_t;
-
#define ATOMIC64_INIT(i) { (i) }
#ifdef CONFIG_ARM_LPAE
@@ -8,10 +8,6 @@
/* An 64bit atomic type */
-typedef struct {
- s64 __aligned(8) counter;
-} atomic64_t;
-
#define ATOMIC64_INIT(val) { (val) }
#define __ATOMIC64_DECL(sym) void atomic64_##sym(atomic64_t *, ...)
@@ -9,10 +9,6 @@
#define _ASM_GENERIC_ATOMIC64_H
#include <linux/types.h>
-typedef struct {
- s64 counter;
-} atomic64_t;
-
#define ATOMIC64_INIT(i) { (i) }
extern s64 generic_atomic64_read(const atomic64_t *v);
@@ -7,15 +7,13 @@
#define _LINUX_ATOMIC_LONG_H
#include <linux/compiler.h>
-#include <asm/types.h>
+#include <linux/types.h>
#ifdef CONFIG_64BIT
-typedef atomic64_t atomic_long_t;
#define ATOMIC_LONG_INIT(i) ATOMIC64_INIT(i)
#define atomic_long_cond_read_acquire atomic64_cond_read_acquire
#define atomic_long_cond_read_relaxed atomic64_cond_read_relaxed
#else
-typedef atomic_t atomic_long_t;
#define ATOMIC_LONG_INIT(i) ATOMIC_INIT(i)
#define atomic_long_cond_read_acquire atomic_cond_read_acquire
#define atomic_long_cond_read_relaxed atomic_cond_read_relaxed
@@ -25,9 +25,6 @@
#include <linux/jiffies.h>
#include <asm/bug.h>
-/* Nanosecond scalar representation for kernel time values */
-typedef s64 ktime_t;
-
/**
* ktime_set - Set a ktime_t variable from a seconds/nanoseconds value
* @secs: seconds to set
@@ -31,13 +31,6 @@
#endif
-struct hlist_bl_head {
- struct hlist_bl_node *first;
-};
-
-struct hlist_bl_node {
- struct hlist_bl_node *next, **pprev;
-};
#define INIT_HLIST_BL_HEAD(ptr) \
((ptr)->first = NULL)
@@ -25,12 +25,6 @@ enum lru_status {
internally, but has to return locked. */
};
-struct list_lru_one {
- struct list_head list;
- /* may become negative during memcg reparenting */
- long nr_items;
-};
-
struct list_lru_memcg {
struct rcu_head rcu;
/* array of per cgroup lists, indexed by memcg_cache_id */
@@ -49,15 +43,6 @@ struct list_lru_node {
long nr_items;
} ____cacheline_aligned_in_smp;
-struct list_lru {
- struct list_lru_node *node;
-#ifdef CONFIG_MEMCG_KMEM
- struct list_head list;
- int shrinker_id;
- bool memcg_aware;
-#endif
-};
-
void list_lru_destroy(struct list_lru *lru);
int __list_lru_init(struct list_lru *lru, bool memcg_aware,
struct lock_class_key *key, struct shrinker *shrinker);
@@ -53,14 +53,6 @@
#include <linux/stddef.h>
#include <linux/types.h>
-struct llist_head {
- struct llist_node *first;
-};
-
-struct llist_node {
- struct llist_node *next;
-};
-
#define LLIST_HEAD_INIT(name) { NULL }
#define LLIST_HEAD(name) struct llist_head name = LLIST_HEAD_INIT(name)
@@ -331,9 +331,6 @@ struct lruvec {
/* Isolate unevictable pages */
#define ISOLATE_UNEVICTABLE ((__force isolate_mode_t)0x8)
-/* LRU Isolation modes. */
-typedef unsigned __bitwise isolate_mode_t;
-
enum zone_watermarks {
WMARK_MIN,
WMARK_LOW,
@@ -79,16 +79,6 @@
#include <asm/bug.h>
-struct plist_head {
- struct list_head node_list;
-};
-
-struct plist_node {
- int prio;
- struct list_head prio_list;
- struct list_head node_list;
-};
-
/**
* PLIST_HEAD_INIT - static struct plist_head initializer
* @head: struct plist_head variable name
@@ -5,21 +5,8 @@
#include <linux/math64.h>
#include <vdso/time64.h>
-typedef __s64 time64_t;
-typedef __u64 timeu64_t;
-
#include <uapi/linux/time.h>
-struct timespec64 {
- time64_t tv_sec; /* seconds */
- long tv_nsec; /* nanoseconds */
-};
-
-struct itimerspec64 {
- struct timespec64 it_interval;
- struct timespec64 it_value;
-};
-
/* Located here for timespec[64]_valid_strict */
#define TIME64_MAX ((s64)~((u64)1 << 63))
#define TIME64_MIN (-TIME64_MAX - 1)
@@ -46,6 +46,14 @@ typedef __kernel_old_gid_t old_gid_t;
typedef __kernel_loff_t loff_t;
#endif
+typedef struct {
+ uid_t val;
+} kuid_t;
+
+typedef struct {
+ gid_t val;
+} kgid_t;
+
/*
* The following typedefs are also protected by individual ifdefs for
* historical reasons:
@@ -169,10 +177,14 @@ typedef struct {
#define ATOMIC_INIT(i) { (i) }
-#ifdef CONFIG_64BIT
typedef struct {
- s64 counter;
+ s64 __aligned(8) counter;
} atomic64_t;
+
+#ifdef CONFIG_64BIT
+typedef atomic64_t atomic_long_t;
+#else
+typedef atomic_t atomic_long_t;
#endif
struct list_head {
@@ -187,6 +199,47 @@ struct hlist_node {
struct hlist_node *next, **pprev;
};
+struct hlist_bl_head {
+ struct hlist_bl_node *first;
+};
+
+struct hlist_bl_node {
+ struct hlist_bl_node *next, **pprev;
+};
+
+struct llist_head {
+ struct llist_node *first;
+};
+
+struct llist_node {
+ struct llist_node *next;
+};
+
+struct list_lru_one {
+ struct list_head list;
+ /* may become negative during memcg reparenting */
+ long nr_items;
+};
+
+struct list_lru {
+ struct list_lru_node *node;
+#ifdef CONFIG_MEMCG_KMEM
+ struct list_head list;
+ int shrinker_id;
+ bool memcg_aware;
+#endif
+};
+
+struct plist_head {
+ struct list_head node_list;
+};
+
+struct plist_node {
+ int prio;
+ struct list_head prio_list;
+ struct list_head node_list;
+};
+
struct ustat {
__kernel_daddr_t f_tfree;
#ifdef CONFIG_ARCH_32BIT_USTAT_F_TINODE
@@ -231,5 +284,38 @@ typedef void (*swap_func_t)(void *a, void *b, int size);
typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
typedef int (*cmp_func_t)(const void *a, const void *b);
+#define UUID_SIZE 16
+typedef struct {
+ __u8 b[UUID_SIZE];
+} uuid_t;
+
+/* LRU Isolation modes. */
+typedef unsigned __bitwise isolate_mode_t;
+
+enum pid_type
+{
+ PIDTYPE_PID,
+ PIDTYPE_TGID,
+ PIDTYPE_PGID,
+ PIDTYPE_SID,
+ PIDTYPE_MAX,
+};
+
+typedef __s64 time64_t;
+typedef __u64 timeu64_t;
+
+struct timespec64 {
+ time64_t tv_sec; /* seconds */
+ long tv_nsec; /* nanoseconds */
+};
+
+struct itimerspec64 {
+ struct timespec64 it_interval;
+ struct timespec64 it_value;
+};
+
+/* Nanosecond scalar representation for kernel time values */
+typedef s64 ktime_t;
+
#endif /* __ASSEMBLY__ */
#endif /* _LINUX_TYPES_H */
@@ -18,15 +18,6 @@
struct user_namespace;
extern struct user_namespace init_user_ns;
-typedef struct {
- uid_t val;
-} kuid_t;
-
-
-typedef struct {
- gid_t val;
-} kgid_t;
-
#define KUIDT_INIT(value) (kuid_t){ value }
#define KGIDT_INIT(value) (kgid_t){ value }
@@ -11,12 +11,6 @@
#include <uapi/linux/uuid.h>
#include <linux/string.h>
-#define UUID_SIZE 16
-
-typedef struct {
- __u8 b[UUID_SIZE];
-} uuid_t;
-
#define UUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
((uuid_t) \
{{ ((a) >> 24) & 0xff, ((a) >> 16) & 0xff, ((a) >> 8) & 0xff, (a) & 0xff, \