Skip to content

Commit 0c54450

Browse files
committed
Merge tag 'cris-for-linus-3.8' of git://jni.nu/cris
Pull CRIS changes from Jesper Nilsson. ... mainly the UAPI disintegration. * tag 'cris-for-linus-3.8' of git://jni.nu/cris: UAPI: Fix up empty files in arch/cris/ CRIS: locking: fix the return value of arch_read_trylock() CRIS: use kbuild.h instead of defining macros in asm-offset.c UAPI: (Scripted) Disintegrate arch/cris/include/asm UAPI: (Scripted) Disintegrate arch/cris/include/arch-v32/arch UAPI: (Scripted) Disintegrate arch/cris/include/arch-v10/arch
2 parents 1ffab3d + 77c8006 commit 0c54450

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+689
-645
lines changed
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
header-y += user.h
2-
header-y += svinto.h
3-
header-y += sv_addr_ag.h
4-
header-y += sv_addr.agh
1+
# CRISv10 arch
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
header-y += user.h
2-
header-y += cryptocop.h
1+
# CRISv32 arch

arch/cris/include/arch-v32/arch/cryptocop.h

Lines changed: 1 addition & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -2,124 +2,12 @@
22
* The device /dev/cryptocop is accessible using this driver using
33
* CRYPTOCOP_MAJOR (254) and minor number 0.
44
*/
5-
65
#ifndef CRYPTOCOP_H
76
#define CRYPTOCOP_H
87

9-
#include <linux/uio.h>
10-
11-
12-
#define CRYPTOCOP_SESSION_ID_NONE (0)
13-
14-
typedef unsigned long long int cryptocop_session_id;
15-
16-
/* cryptocop ioctls */
17-
#define ETRAXCRYPTOCOP_IOCTYPE (250)
18-
19-
#define CRYPTOCOP_IO_CREATE_SESSION _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 1, struct strcop_session_op)
20-
#define CRYPTOCOP_IO_CLOSE_SESSION _IOW(ETRAXCRYPTOCOP_IOCTYPE, 2, struct strcop_session_op)
21-
#define CRYPTOCOP_IO_PROCESS_OP _IOWR(ETRAXCRYPTOCOP_IOCTYPE, 3, struct strcop_crypto_op)
22-
#define CRYPTOCOP_IO_MAXNR (3)
23-
24-
typedef enum {
25-
cryptocop_cipher_des = 0,
26-
cryptocop_cipher_3des = 1,
27-
cryptocop_cipher_aes = 2,
28-
cryptocop_cipher_m2m = 3, /* mem2mem is essentially a NULL cipher with blocklength=1 */
29-
cryptocop_cipher_none
30-
} cryptocop_cipher_type;
31-
32-
typedef enum {
33-
cryptocop_digest_sha1 = 0,
34-
cryptocop_digest_md5 = 1,
35-
cryptocop_digest_none
36-
} cryptocop_digest_type;
37-
38-
typedef enum {
39-
cryptocop_csum_le = 0,
40-
cryptocop_csum_be = 1,
41-
cryptocop_csum_none
42-
} cryptocop_csum_type;
43-
44-
typedef enum {
45-
cryptocop_cipher_mode_ecb = 0,
46-
cryptocop_cipher_mode_cbc,
47-
cryptocop_cipher_mode_none
48-
} cryptocop_cipher_mode;
49-
50-
typedef enum {
51-
cryptocop_3des_eee = 0,
52-
cryptocop_3des_eed = 1,
53-
cryptocop_3des_ede = 2,
54-
cryptocop_3des_edd = 3,
55-
cryptocop_3des_dee = 4,
56-
cryptocop_3des_ded = 5,
57-
cryptocop_3des_dde = 6,
58-
cryptocop_3des_ddd = 7
59-
} cryptocop_3des_mode;
60-
61-
/* Usermode accessible (ioctl) operations. */
62-
struct strcop_session_op{
63-
cryptocop_session_id ses_id;
64-
65-
cryptocop_cipher_type cipher; /* AES, DES, 3DES, m2m, none */
66-
67-
cryptocop_cipher_mode cmode; /* ECB, CBC, none */
68-
cryptocop_3des_mode des3_mode;
69-
70-
cryptocop_digest_type digest; /* MD5, SHA1, none */
71-
72-
cryptocop_csum_type csum; /* BE, LE, none */
73-
74-
unsigned char *key;
75-
size_t keylen;
76-
};
77-
78-
#define CRYPTOCOP_CSUM_LENGTH (2)
79-
#define CRYPTOCOP_MAX_DIGEST_LENGTH (20) /* SHA-1 20, MD5 16 */
80-
#define CRYPTOCOP_MAX_IV_LENGTH (16) /* (3)DES==8, AES == 16 */
81-
#define CRYPTOCOP_MAX_KEY_LENGTH (32)
82-
83-
struct strcop_crypto_op{
84-
cryptocop_session_id ses_id;
85-
86-
/* Indata. */
87-
unsigned char *indata;
88-
size_t inlen; /* Total indata length. */
89-
90-
/* Cipher configuration. */
91-
unsigned char do_cipher:1;
92-
unsigned char decrypt:1; /* 1 == decrypt, 0 == encrypt */
93-
unsigned char cipher_explicit:1;
94-
size_t cipher_start;
95-
size_t cipher_len;
96-
/* cipher_iv is used if do_cipher and cipher_explicit and the cipher
97-
mode is CBC. The length is controlled by the type of cipher,
98-
e.g. DES/3DES 8 octets and AES 16 octets. */
99-
unsigned char cipher_iv[CRYPTOCOP_MAX_IV_LENGTH];
100-
/* Outdata. */
101-
unsigned char *cipher_outdata;
102-
size_t cipher_outlen;
103-
104-
/* digest configuration. */
105-
unsigned char do_digest:1;
106-
size_t digest_start;
107-
size_t digest_len;
108-
/* Outdata. The actual length is determined by the type of the digest. */
109-
unsigned char digest[CRYPTOCOP_MAX_DIGEST_LENGTH];
110-
111-
/* Checksum configuration. */
112-
unsigned char do_csum:1;
113-
size_t csum_start;
114-
size_t csum_len;
115-
/* Outdata. */
116-
unsigned char csum[CRYPTOCOP_CSUM_LENGTH];
117-
};
8+
#include <uapi/arch-v32/arch/cryptocop.h>
1189

11910

120-
121-
#ifdef __KERNEL__
122-
12311
/********** The API to use from inside the kernel. ************/
12412

12513
#include <arch/hwregs/dma.h>
@@ -267,6 +155,4 @@ int cryptocop_job_queue_insert_crypto(struct cryptocop_operation *operation);
267155

268156
int cryptocop_job_queue_insert_user_job(struct cryptocop_operation *operation);
269157

270-
#endif /* __KERNEL__ */
271-
272158
#endif /* CRYPTOCOP_H */

arch/cris/include/arch-v32/arch/spinlock.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static inline int arch_write_trylock(arch_rwlock_t *rw)
118118
ret = 1;
119119
}
120120
arch_spin_unlock(&rw->slock);
121-
return 1;
121+
return ret;
122122
}
123123

124124
#define _raw_read_lock_flags(lock, flags) _raw_read_lock(lock)

arch/cris/include/asm/Kbuild

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1-
include include/asm-generic/Kbuild.asm
21

32
header-y += arch-v10/
43
header-y += arch-v32/
54

6-
header-y += ethernet.h
7-
header-y += etraxgpio.h
8-
header-y += rs485.h
9-
header-y += sync_serial.h
105

116
generic-y += clkdev.h
127
generic-y += exec.h

arch/cris/include/asm/ptrace.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
#ifndef _CRIS_PTRACE_H
22
#define _CRIS_PTRACE_H
33

4-
#include <arch/ptrace.h>
4+
#include <uapi/asm/ptrace.h>
55

6-
#ifdef __KERNEL__
76

87
/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
98
#define PTRACE_GETREGS 12
109
#define PTRACE_SETREGS 13
1110

1211
#define profile_pc(regs) instruction_pointer(regs)
1312

14-
#endif /* __KERNEL__ */
15-
1613
#endif /* _CRIS_PTRACE_H */

arch/cris/include/asm/signal.h

Lines changed: 1 addition & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
#ifndef _ASM_CRIS_SIGNAL_H
22
#define _ASM_CRIS_SIGNAL_H
33

4-
#include <linux/types.h>
4+
#include <uapi/asm/signal.h>
55

6-
/* Avoid too many header ordering problems. */
7-
struct siginfo;
8-
9-
#ifdef __KERNEL__
106
/* Most things should be clean enough to redefine this at will, if care
117
is taken to make libc match. */
128

@@ -20,95 +16,6 @@ typedef struct {
2016
unsigned long sig[_NSIG_WORDS];
2117
} sigset_t;
2218

23-
#else
24-
/* Here we must cater to libcs that poke about in kernel headers. */
25-
26-
#define NSIG 32
27-
typedef unsigned long sigset_t;
28-
29-
#endif /* __KERNEL__ */
30-
31-
#define SIGHUP 1
32-
#define SIGINT 2
33-
#define SIGQUIT 3
34-
#define SIGILL 4
35-
#define SIGTRAP 5
36-
#define SIGABRT 6
37-
#define SIGIOT 6
38-
#define SIGBUS 7
39-
#define SIGFPE 8
40-
#define SIGKILL 9
41-
#define SIGUSR1 10
42-
#define SIGSEGV 11
43-
#define SIGUSR2 12
44-
#define SIGPIPE 13
45-
#define SIGALRM 14
46-
#define SIGTERM 15
47-
#define SIGSTKFLT 16
48-
#define SIGCHLD 17
49-
#define SIGCONT 18
50-
#define SIGSTOP 19
51-
#define SIGTSTP 20
52-
#define SIGTTIN 21
53-
#define SIGTTOU 22
54-
#define SIGURG 23
55-
#define SIGXCPU 24
56-
#define SIGXFSZ 25
57-
#define SIGVTALRM 26
58-
#define SIGPROF 27
59-
#define SIGWINCH 28
60-
#define SIGIO 29
61-
#define SIGPOLL SIGIO
62-
/*
63-
#define SIGLOST 29
64-
*/
65-
#define SIGPWR 30
66-
#define SIGSYS 31
67-
#define SIGUNUSED 31
68-
69-
/* These should not be considered constants from userland. */
70-
#define SIGRTMIN 32
71-
#define SIGRTMAX _NSIG
72-
73-
/*
74-
* SA_FLAGS values:
75-
*
76-
* SA_ONSTACK indicates that a registered stack_t will be used.
77-
* SA_RESTART flag to get restarting signals (which were the default long ago)
78-
* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
79-
* SA_RESETHAND clears the handler when the signal is delivered.
80-
* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
81-
* SA_NODEFER prevents the current signal from being masked in the handler.
82-
*
83-
* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
84-
* Unix names RESETHAND and NODEFER respectively.
85-
*/
86-
87-
#define SA_NOCLDSTOP 0x00000001u
88-
#define SA_NOCLDWAIT 0x00000002u
89-
#define SA_SIGINFO 0x00000004u
90-
#define SA_ONSTACK 0x08000000u
91-
#define SA_RESTART 0x10000000u
92-
#define SA_NODEFER 0x40000000u
93-
#define SA_RESETHAND 0x80000000u
94-
95-
#define SA_NOMASK SA_NODEFER
96-
#define SA_ONESHOT SA_RESETHAND
97-
98-
#define SA_RESTORER 0x04000000
99-
100-
/*
101-
* sigaltstack controls
102-
*/
103-
#define SS_ONSTACK 1
104-
#define SS_DISABLE 2
105-
106-
#define MINSIGSTKSZ 2048
107-
#define SIGSTKSZ 8192
108-
109-
#include <asm-generic/signal-defs.h>
110-
111-
#ifdef __KERNEL__
11219
struct old_sigaction {
11320
__sighandler_t sa_handler;
11421
old_sigset_t sa_mask;
@@ -126,32 +33,6 @@ struct sigaction {
12633
struct k_sigaction {
12734
struct sigaction sa;
12835
};
129-
#else
130-
/* Here we must cater to libcs that poke about in kernel headers. */
131-
132-
struct sigaction {
133-
union {
134-
__sighandler_t _sa_handler;
135-
void (*_sa_sigaction)(int, struct siginfo *, void *);
136-
} _u;
137-
sigset_t sa_mask;
138-
unsigned long sa_flags;
139-
void (*sa_restorer)(void);
140-
};
141-
142-
#define sa_handler _u._sa_handler
143-
#define sa_sigaction _u._sa_sigaction
144-
145-
#endif /* __KERNEL__ */
146-
147-
typedef struct sigaltstack {
148-
void *ss_sp;
149-
int ss_flags;
150-
size_t ss_size;
151-
} stack_t;
152-
153-
#ifdef __KERNEL__
15436
#include <asm/sigcontext.h>
155-
#endif /* __KERNEL__ */
15637

15738
#endif

arch/cris/include/asm/swab.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#ifndef _CRIS_SWAB_H
22
#define _CRIS_SWAB_H
33

4-
#ifdef __KERNEL__
54
#include <arch/swab.h>
6-
#endif /* __KERNEL__ */
5+
#include <uapi/asm/swab.h>
76

87
#endif /* _CRIS_SWAB_H */

arch/cris/include/asm/termios.h

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,8 @@
11
#ifndef _CRIS_TERMIOS_H
22
#define _CRIS_TERMIOS_H
33

4-
#include <asm/termbits.h>
5-
#include <asm/ioctls.h>
6-
#include <asm/rs485.h>
7-
#include <linux/serial.h>
4+
#include <uapi/asm/termios.h>
85

9-
struct winsize {
10-
unsigned short ws_row;
11-
unsigned short ws_col;
12-
unsigned short ws_xpixel;
13-
unsigned short ws_ypixel;
14-
};
15-
16-
#define NCC 8
17-
struct termio {
18-
unsigned short c_iflag; /* input mode flags */
19-
unsigned short c_oflag; /* output mode flags */
20-
unsigned short c_cflag; /* control mode flags */
21-
unsigned short c_lflag; /* local mode flags */
22-
unsigned char c_line; /* line discipline */
23-
unsigned char c_cc[NCC]; /* control characters */
24-
};
25-
26-
/* modem lines */
27-
#define TIOCM_LE 0x001
28-
#define TIOCM_DTR 0x002
29-
#define TIOCM_RTS 0x004
30-
#define TIOCM_ST 0x008
31-
#define TIOCM_SR 0x010
32-
#define TIOCM_CTS 0x020
33-
#define TIOCM_CAR 0x040
34-
#define TIOCM_RNG 0x080
35-
#define TIOCM_DSR 0x100
36-
#define TIOCM_CD TIOCM_CAR
37-
#define TIOCM_RI TIOCM_RNG
38-
#define TIOCM_OUT1 0x2000
39-
#define TIOCM_OUT2 0x4000
40-
#define TIOCM_LOOP 0x8000
41-
42-
/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
43-
44-
#ifdef __KERNEL__
456

467
/* intr=^C quit=^\ erase=del kill=^U
478
eof=^D vtime=\0 vmin=\1 sxtc=\0
@@ -87,6 +48,4 @@ struct termio {
8748
#define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios))
8849
#define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios))
8950

90-
#endif /* __KERNEL__ */
91-
9251
#endif /* _CRIS_TERMIOS_H */

0 commit comments

Comments
 (0)