diff options
-rw-r--r-- | arch/sparc/include/asm/Kbuild | 16 | ||||
-rw-r--r-- | arch/sparc/include/asm/fbio.h | 260 | ||||
-rw-r--r-- | arch/sparc/include/asm/ioctls.h | 129 | ||||
-rw-r--r-- | arch/sparc/include/asm/mman.h | 25 | ||||
-rw-r--r-- | arch/sparc/include/asm/psr.h | 36 | ||||
-rw-r--r-- | arch/sparc/include/asm/ptrace.h | 347 | ||||
-rw-r--r-- | arch/sparc/include/asm/setup.h | 10 | ||||
-rw-r--r-- | arch/sparc/include/asm/sigcontext.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/siginfo.h | 23 | ||||
-rw-r--r-- | arch/sparc/include/asm/signal.h | 185 | ||||
-rw-r--r-- | arch/sparc/include/asm/termbits.h | 260 | ||||
-rw-r--r-- | arch/sparc/include/asm/termios.h | 41 | ||||
-rw-r--r-- | arch/sparc/include/asm/traps.h | 111 | ||||
-rw-r--r-- | arch/sparc/include/asm/unistd.h | 412 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/Kbuild | 46 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/apc.h (renamed from arch/sparc/include/asm/apc.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/asi.h (renamed from arch/sparc/include/asm/asi.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/auxvec.h (renamed from arch/sparc/include/asm/auxvec.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/bitsperlong.h (renamed from arch/sparc/include/asm/bitsperlong.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/byteorder.h (renamed from arch/sparc/include/asm/byteorder.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/display7seg.h (renamed from arch/sparc/include/asm/display7seg.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/envctrl.h (renamed from arch/sparc/include/asm/envctrl.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/errno.h (renamed from arch/sparc/include/asm/errno.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/fbio.h | 259 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/fcntl.h (renamed from arch/sparc/include/asm/fcntl.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/ioctl.h (renamed from arch/sparc/include/asm/ioctl.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/ioctls.h | 131 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/ipcbuf.h (renamed from arch/sparc/include/asm/ipcbuf.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/jsflash.h (renamed from arch/sparc/include/asm/jsflash.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/kvm_para.h (renamed from arch/sparc/include/asm/kvm_para.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/mman.h | 27 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/msgbuf.h (renamed from arch/sparc/include/asm/msgbuf.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/openpromio.h (renamed from arch/sparc/include/asm/openpromio.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/param.h (renamed from arch/sparc/include/asm/param.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/perfctr.h (renamed from arch/sparc/include/asm/perfctr.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/poll.h (renamed from arch/sparc/include/asm/poll.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/posix_types.h (renamed from arch/sparc/include/asm/posix_types.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/psr.h | 47 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/psrcompat.h (renamed from arch/sparc/include/asm/psrcompat.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/pstate.h (renamed from arch/sparc/include/asm/pstate.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/ptrace.h | 352 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/resource.h (renamed from arch/sparc/include/asm/resource.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/sembuf.h (renamed from arch/sparc/include/asm/sembuf.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/setup.h | 15 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/shmbuf.h (renamed from arch/sparc/include/asm/shmbuf.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/sigcontext.h | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/siginfo.h | 25 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/signal.h | 185 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/socket.h (renamed from arch/sparc/include/asm/socket.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/sockios.h (renamed from arch/sparc/include/asm/sockios.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/stat.h (renamed from arch/sparc/include/asm/stat.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/statfs.h (renamed from arch/sparc/include/asm/statfs.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/swab.h (renamed from arch/sparc/include/asm/swab.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/termbits.h | 263 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/termios.h | 43 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/traps.h | 120 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/types.h (renamed from arch/sparc/include/asm/types.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/uctx.h (renamed from arch/sparc/include/asm/uctx.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/unistd.h | 422 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/utrap.h (renamed from arch/sparc/include/asm/utrap.h) | 0 | ||||
-rw-r--r-- | arch/sparc/include/uapi/asm/watchdog.h (renamed from arch/sparc/include/asm/watchdog.h) | 0 |
61 files changed, 1951 insertions, 1843 deletions
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index f80ff93f6f75..61d41c11ee0a 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -1,21 +1,5 @@ | |||
1 | # User exported sparc header files | 1 | # User exported sparc header files |
2 | include include/asm-generic/Kbuild.asm | ||
3 | 2 | ||
4 | header-y += apc.h | ||
5 | header-y += asi.h | ||
6 | header-y += display7seg.h | ||
7 | header-y += envctrl.h | ||
8 | header-y += fbio.h | ||
9 | header-y += jsflash.h | ||
10 | header-y += openpromio.h | ||
11 | header-y += perfctr.h | ||
12 | header-y += psrcompat.h | ||
13 | header-y += psr.h | ||
14 | header-y += pstate.h | ||
15 | header-y += traps.h | ||
16 | header-y += uctx.h | ||
17 | header-y += utrap.h | ||
18 | header-y += watchdog.h | ||
19 | 3 | ||
20 | generic-y += clkdev.h | 4 | generic-y += clkdev.h |
21 | generic-y += div64.h | 5 | generic-y += div64.h |
diff --git a/arch/sparc/include/asm/fbio.h b/arch/sparc/include/asm/fbio.h index 0a21da87f7d6..1d9afe277e9c 100644 --- a/arch/sparc/include/asm/fbio.h +++ b/arch/sparc/include/asm/fbio.h | |||
@@ -1,225 +1,10 @@ | |||
1 | #ifndef __LINUX_FBIO_H | 1 | #ifndef __LINUX_FBIO_H |
2 | #define __LINUX_FBIO_H | 2 | #define __LINUX_FBIO_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <uapi/asm/fbio.h> |
5 | #include <linux/types.h> | ||
6 | 5 | ||
7 | /* Constants used for fbio SunOS compatibility */ | ||
8 | /* (C) 1996 Miguel de Icaza */ | ||
9 | |||
10 | /* Frame buffer types */ | ||
11 | #define FBTYPE_NOTYPE -1 | ||
12 | #define FBTYPE_SUN1BW 0 /* mono */ | ||
13 | #define FBTYPE_SUN1COLOR 1 | ||
14 | #define FBTYPE_SUN2BW 2 | ||
15 | #define FBTYPE_SUN2COLOR 3 | ||
16 | #define FBTYPE_SUN2GP 4 | ||
17 | #define FBTYPE_SUN5COLOR 5 | ||
18 | #define FBTYPE_SUN3COLOR 6 | ||
19 | #define FBTYPE_MEMCOLOR 7 | ||
20 | #define FBTYPE_SUN4COLOR 8 | ||
21 | |||
22 | #define FBTYPE_NOTSUN1 9 | ||
23 | #define FBTYPE_NOTSUN2 10 | ||
24 | #define FBTYPE_NOTSUN3 11 | ||
25 | |||
26 | #define FBTYPE_SUNFAST_COLOR 12 /* cg6 */ | ||
27 | #define FBTYPE_SUNROP_COLOR 13 | ||
28 | #define FBTYPE_SUNFB_VIDEO 14 | ||
29 | #define FBTYPE_SUNGIFB 15 | ||
30 | #define FBTYPE_SUNGPLAS 16 | ||
31 | #define FBTYPE_SUNGP3 17 | ||
32 | #define FBTYPE_SUNGT 18 | ||
33 | #define FBTYPE_SUNLEO 19 /* zx Leo card */ | ||
34 | #define FBTYPE_MDICOLOR 20 /* cg14 */ | ||
35 | #define FBTYPE_TCXCOLOR 21 /* SUNW,tcx card */ | ||
36 | |||
37 | #define FBTYPE_LASTPLUSONE 21 /* This is not last + 1 in fact... */ | ||
38 | |||
39 | /* Does not seem to be listed in the Sun file either */ | ||
40 | #define FBTYPE_CREATOR 22 | ||
41 | #define FBTYPE_PCI_IGA1682 23 | ||
42 | #define FBTYPE_P9100COLOR 24 | ||
43 | |||
44 | #define FBTYPE_PCI_GENERIC 1000 | ||
45 | #define FBTYPE_PCI_MACH64 1001 | ||
46 | |||
47 | /* fbio ioctls */ | ||
48 | /* Returned by FBIOGTYPE */ | ||
49 | struct fbtype { | ||
50 | int fb_type; /* fb type, see above */ | ||
51 | int fb_height; /* pixels */ | ||
52 | int fb_width; /* pixels */ | ||
53 | int fb_depth; | ||
54 | int fb_cmsize; /* color map entries */ | ||
55 | int fb_size; /* fb size in bytes */ | ||
56 | }; | ||
57 | #define FBIOGTYPE _IOR('F', 0, struct fbtype) | ||
58 | |||
59 | struct fbcmap { | ||
60 | int index; /* first element (0 origin) */ | ||
61 | int count; | ||
62 | unsigned char __user *red; | ||
63 | unsigned char __user *green; | ||
64 | unsigned char __user *blue; | ||
65 | }; | ||
66 | |||
67 | #ifdef __KERNEL__ | ||
68 | #define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap) | 6 | #define FBIOPUTCMAP_SPARC _IOW('F', 3, struct fbcmap) |
69 | #define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap) | 7 | #define FBIOGETCMAP_SPARC _IOW('F', 4, struct fbcmap) |
70 | #else | ||
71 | #define FBIOPUTCMAP _IOW('F', 3, struct fbcmap) | ||
72 | #define FBIOGETCMAP _IOW('F', 4, struct fbcmap) | ||
73 | #endif | ||
74 | |||
75 | /* # of device specific values */ | ||
76 | #define FB_ATTR_NDEVSPECIFIC 8 | ||
77 | /* # of possible emulations */ | ||
78 | #define FB_ATTR_NEMUTYPES 4 | ||
79 | |||
80 | struct fbsattr { | ||
81 | int flags; | ||
82 | int emu_type; /* -1 if none */ | ||
83 | int dev_specific[FB_ATTR_NDEVSPECIFIC]; | ||
84 | }; | ||
85 | |||
86 | struct fbgattr { | ||
87 | int real_type; /* real frame buffer type */ | ||
88 | int owner; /* unknown */ | ||
89 | struct fbtype fbtype; /* real frame buffer fbtype */ | ||
90 | struct fbsattr sattr; | ||
91 | int emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */ | ||
92 | }; | ||
93 | #define FBIOSATTR _IOW('F', 5, struct fbgattr) /* Unsupported: */ | ||
94 | #define FBIOGATTR _IOR('F', 6, struct fbgattr) /* supported */ | ||
95 | |||
96 | #define FBIOSVIDEO _IOW('F', 7, int) | ||
97 | #define FBIOGVIDEO _IOR('F', 8, int) | ||
98 | |||
99 | struct fbcursor { | ||
100 | short set; /* what to set, choose from the list above */ | ||
101 | short enable; /* cursor on/off */ | ||
102 | struct fbcurpos pos; /* cursor position */ | ||
103 | struct fbcurpos hot; /* cursor hot spot */ | ||
104 | struct fbcmap cmap; /* color map info */ | ||
105 | struct fbcurpos size; /* cursor bit map size */ | ||
106 | char __user *image; /* cursor image bits */ | ||
107 | char __user *mask; /* cursor mask bits */ | ||
108 | }; | ||
109 | |||
110 | /* set/get cursor attributes/shape */ | ||
111 | #define FBIOSCURSOR _IOW('F', 24, struct fbcursor) | ||
112 | #define FBIOGCURSOR _IOWR('F', 25, struct fbcursor) | ||
113 | |||
114 | /* set/get cursor position */ | ||
115 | #define FBIOSCURPOS _IOW('F', 26, struct fbcurpos) | ||
116 | #define FBIOGCURPOS _IOW('F', 27, struct fbcurpos) | ||
117 | |||
118 | /* get max cursor size */ | ||
119 | #define FBIOGCURMAX _IOR('F', 28, struct fbcurpos) | ||
120 | |||
121 | /* wid manipulation */ | ||
122 | struct fb_wid_alloc { | ||
123 | #define FB_WID_SHARED_8 0 | ||
124 | #define FB_WID_SHARED_24 1 | ||
125 | #define FB_WID_DBL_8 2 | ||
126 | #define FB_WID_DBL_24 3 | ||
127 | __u32 wa_type; | ||
128 | __s32 wa_index; /* Set on return */ | ||
129 | __u32 wa_count; | ||
130 | }; | ||
131 | struct fb_wid_item { | ||
132 | __u32 wi_type; | ||
133 | __s32 wi_index; | ||
134 | __u32 wi_attrs; | ||
135 | __u32 wi_values[32]; | ||
136 | }; | ||
137 | struct fb_wid_list { | ||
138 | __u32 wl_flags; | ||
139 | __u32 wl_count; | ||
140 | struct fb_wid_item *wl_list; | ||
141 | }; | ||
142 | |||
143 | #define FBIO_WID_ALLOC _IOWR('F', 30, struct fb_wid_alloc) | ||
144 | #define FBIO_WID_FREE _IOW('F', 31, struct fb_wid_alloc) | ||
145 | #define FBIO_WID_PUT _IOW('F', 32, struct fb_wid_list) | ||
146 | #define FBIO_WID_GET _IOWR('F', 33, struct fb_wid_list) | ||
147 | |||
148 | /* Creator ioctls */ | ||
149 | #define FFB_IOCTL ('F'<<8) | ||
150 | #define FFB_SYS_INFO (FFB_IOCTL|80) | ||
151 | #define FFB_CLUTREAD (FFB_IOCTL|81) | ||
152 | #define FFB_CLUTPOST (FFB_IOCTL|82) | ||
153 | #define FFB_SETDIAGMODE (FFB_IOCTL|83) | ||
154 | #define FFB_GETMONITORID (FFB_IOCTL|84) | ||
155 | #define FFB_GETVIDEOMODE (FFB_IOCTL|85) | ||
156 | #define FFB_SETVIDEOMODE (FFB_IOCTL|86) | ||
157 | #define FFB_SETSERVER (FFB_IOCTL|87) | ||
158 | #define FFB_SETOVCTL (FFB_IOCTL|88) | ||
159 | #define FFB_GETOVCTL (FFB_IOCTL|89) | ||
160 | #define FFB_GETSAXNUM (FFB_IOCTL|90) | ||
161 | #define FFB_FBDEBUG (FFB_IOCTL|91) | ||
162 | |||
163 | /* Cg14 ioctls */ | ||
164 | #define MDI_IOCTL ('M'<<8) | ||
165 | #define MDI_RESET (MDI_IOCTL|1) | ||
166 | #define MDI_GET_CFGINFO (MDI_IOCTL|2) | ||
167 | #define MDI_SET_PIXELMODE (MDI_IOCTL|3) | ||
168 | # define MDI_32_PIX 32 | ||
169 | # define MDI_16_PIX 16 | ||
170 | # define MDI_8_PIX 8 | ||
171 | |||
172 | struct mdi_cfginfo { | ||
173 | int mdi_ncluts; /* Number of implemented CLUTs in this MDI */ | ||
174 | int mdi_type; /* FBTYPE name */ | ||
175 | int mdi_height; /* height */ | ||
176 | int mdi_width; /* width */ | ||
177 | int mdi_size; /* available ram */ | ||
178 | int mdi_mode; /* 8bpp, 16bpp or 32bpp */ | ||
179 | int mdi_pixfreq; /* pixel clock (from PROM) */ | ||
180 | }; | ||
181 | |||
182 | /* SparcLinux specific ioctl for the MDI, should be replaced for | ||
183 | * the SET_XLUT/SET_CLUTn ioctls instead | ||
184 | */ | ||
185 | #define MDI_CLEAR_XLUT (MDI_IOCTL|9) | ||
186 | |||
187 | /* leo & ffb ioctls */ | ||
188 | struct fb_clut_alloc { | ||
189 | __u32 clutid; /* Set on return */ | ||
190 | __u32 flag; | ||
191 | __u32 index; | ||
192 | }; | ||
193 | |||
194 | struct fb_clut { | ||
195 | #define FB_CLUT_WAIT 0x00000001 /* Not yet implemented */ | ||
196 | __u32 flag; | ||
197 | __u32 clutid; | ||
198 | __u32 offset; | ||
199 | __u32 count; | ||
200 | char * red; | ||
201 | char * green; | ||
202 | char * blue; | ||
203 | }; | ||
204 | |||
205 | struct fb_clut32 { | ||
206 | __u32 flag; | ||
207 | __u32 clutid; | ||
208 | __u32 offset; | ||
209 | __u32 count; | ||
210 | __u32 red; | ||
211 | __u32 green; | ||
212 | __u32 blue; | ||
213 | }; | ||
214 | |||
215 | #define LEO_CLUTALLOC _IOWR('L', 53, struct fb_clut_alloc) | ||
216 | #define LEO_CLUTFREE _IOW('L', 54, struct fb_clut_alloc) | ||
217 | #define LEO_CLUTREAD _IOW('L', 55, struct fb_clut) | ||
218 | #define LEO_CLUTPOST _IOW('L', 56, struct fb_clut) | ||
219 | #define LEO_SETGAMMA _IOW('L', 68, int) /* Not yet implemented */ | ||
220 | #define LEO_GETGAMMA _IOR('L', 69, int) /* Not yet implemented */ | ||
221 | |||
222 | #ifdef __KERNEL__ | ||
223 | /* Addresses on the fd of a cgsix that are mappable */ | 8 | /* Addresses on the fd of a cgsix that are mappable */ |
224 | #define CG6_FBC 0x70000000 | 9 | #define CG6_FBC 0x70000000 |
225 | #define CG6_TEC 0x70001000 | 10 | #define CG6_TEC 0x70001000 |
@@ -260,47 +45,6 @@ struct fb_clut32 { | |||
260 | #define CG14_CLUT3 0x6000 /* Color Look Up Table */ | 45 | #define CG14_CLUT3 0x6000 /* Color Look Up Table */ |
261 | #define CG14_AUTO 0xf000 | 46 | #define CG14_AUTO 0xf000 |
262 | 47 | ||
263 | #endif /* KERNEL */ | ||
264 | |||
265 | /* These are exported to userland for applications to use */ | ||
266 | /* Mappable offsets for the cg14: control registers */ | ||
267 | #define MDI_DIRECT_MAP 0x10000000 | ||
268 | #define MDI_CTLREG_MAP 0x20000000 | ||
269 | #define MDI_CURSOR_MAP 0x30000000 | ||
270 | #define MDI_SHDW_VRT_MAP 0x40000000 | ||
271 | |||
272 | /* Mappable offsets for the cg14: frame buffer resolutions */ | ||
273 | /* 32 bits */ | ||
274 | #define MDI_CHUNKY_XBGR_MAP 0x50000000 | ||
275 | #define MDI_CHUNKY_BGR_MAP 0x60000000 | ||
276 | |||
277 | /* 16 bits */ | ||
278 | #define MDI_PLANAR_X16_MAP 0x70000000 | ||
279 | #define MDI_PLANAR_C16_MAP 0x80000000 | ||
280 | |||
281 | /* 8 bit is done as CG3 MMAP offset */ | ||
282 | /* 32 bits, planar */ | ||
283 | #define MDI_PLANAR_X32_MAP 0x90000000 | ||
284 | #define MDI_PLANAR_B32_MAP 0xa0000000 | ||
285 | #define MDI_PLANAR_G32_MAP 0xb0000000 | ||
286 | #define MDI_PLANAR_R32_MAP 0xc0000000 | ||
287 | |||
288 | /* Mappable offsets on leo */ | ||
289 | #define LEO_SS0_MAP 0x00000000 | ||
290 | #define LEO_LC_SS0_USR_MAP 0x00800000 | ||
291 | #define LEO_LD_SS0_MAP 0x00801000 | ||
292 | #define LEO_LX_CURSOR_MAP 0x00802000 | ||
293 | #define LEO_SS1_MAP 0x00803000 | ||
294 | #define LEO_LC_SS1_USR_MAP 0x01003000 | ||
295 | #define LEO_LD_SS1_MAP 0x01004000 | ||
296 | #define LEO_UNK_MAP 0x01005000 | ||
297 | #define LEO_LX_KRN_MAP 0x01006000 | ||
298 | #define LEO_LC_SS0_KRN_MAP 0x01007000 | ||
299 | #define LEO_LC_SS1_KRN_MAP 0x01008000 | ||
300 | #define LEO_LD_GBL_MAP 0x01009000 | ||
301 | #define LEO_UNK2_MAP 0x0100a000 | ||
302 | |||
303 | #ifdef __KERNEL__ | ||
304 | struct fbcmap32 { | 48 | struct fbcmap32 { |
305 | int index; /* first element (0 origin) */ | 49 | int index; /* first element (0 origin) */ |
306 | int count; | 50 | int count; |
@@ -325,6 +69,4 @@ struct fbcursor32 { | |||
325 | 69 | ||
326 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) | 70 | #define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32) |
327 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) | 71 | #define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32) |
328 | #endif | ||
329 | |||
330 | #endif /* __LINUX_FBIO_H */ | 72 | #endif /* __LINUX_FBIO_H */ |
diff --git a/arch/sparc/include/asm/ioctls.h b/arch/sparc/include/asm/ioctls.h index 28d0c8b02cc3..77413b7e3a18 100644 --- a/arch/sparc/include/asm/ioctls.h +++ b/arch/sparc/include/asm/ioctls.h | |||
@@ -1,123 +1,8 @@ | |||
1 | #ifndef _ASM_SPARC_IOCTLS_H | 1 | #ifndef _ASM_SPARC_IOCTLS_H |
2 | #define _ASM_SPARC_IOCTLS_H | 2 | #define _ASM_SPARC_IOCTLS_H |
3 | 3 | ||
4 | #include <asm/ioctl.h> | 4 | #include <uapi/asm/ioctls.h> |
5 | 5 | ||
6 | /* Big T */ | ||
7 | #define TCGETA _IOR('T', 1, struct termio) | ||
8 | #define TCSETA _IOW('T', 2, struct termio) | ||
9 | #define TCSETAW _IOW('T', 3, struct termio) | ||
10 | #define TCSETAF _IOW('T', 4, struct termio) | ||
11 | #define TCSBRK _IO('T', 5) | ||
12 | #define TCXONC _IO('T', 6) | ||
13 | #define TCFLSH _IO('T', 7) | ||
14 | #define TCGETS _IOR('T', 8, struct termios) | ||
15 | #define TCSETS _IOW('T', 9, struct termios) | ||
16 | #define TCSETSW _IOW('T', 10, struct termios) | ||
17 | #define TCSETSF _IOW('T', 11, struct termios) | ||
18 | #define TCGETS2 _IOR('T', 12, struct termios2) | ||
19 | #define TCSETS2 _IOW('T', 13, struct termios2) | ||
20 | #define TCSETSW2 _IOW('T', 14, struct termios2) | ||
21 | #define TCSETSF2 _IOW('T', 15, struct termios2) | ||
22 | #define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ | ||
23 | #define TIOCVHANGUP _IO('T', 0x37) | ||
24 | |||
25 | /* Note that all the ioctls that are not available in Linux have a | ||
26 | * double underscore on the front to: a) avoid some programs to | ||
27 | * think we support some ioctls under Linux (autoconfiguration stuff) | ||
28 | */ | ||
29 | /* Little t */ | ||
30 | #define TIOCGETD _IOR('t', 0, int) | ||
31 | #define TIOCSETD _IOW('t', 1, int) | ||
32 | #define __TIOCHPCL _IO('t', 2) /* SunOS Specific */ | ||
33 | #define __TIOCMODG _IOR('t', 3, int) /* SunOS Specific */ | ||
34 | #define __TIOCMODS _IOW('t', 4, int) /* SunOS Specific */ | ||
35 | #define __TIOCGETP _IOR('t', 8, struct sgttyb) /* SunOS Specific */ | ||
36 | #define __TIOCSETP _IOW('t', 9, struct sgttyb) /* SunOS Specific */ | ||
37 | #define __TIOCSETN _IOW('t', 10, struct sgttyb) /* SunOS Specific */ | ||
38 | #define TIOCEXCL _IO('t', 13) | ||
39 | #define TIOCNXCL _IO('t', 14) | ||
40 | #define __TIOCFLUSH _IOW('t', 16, int) /* SunOS Specific */ | ||
41 | #define __TIOCSETC _IOW('t', 17, struct tchars) /* SunOS Specific */ | ||
42 | #define __TIOCGETC _IOR('t', 18, struct tchars) /* SunOS Specific */ | ||
43 | #define __TIOCTCNTL _IOW('t', 32, int) /* SunOS Specific */ | ||
44 | #define __TIOCSIGNAL _IOW('t', 33, int) /* SunOS Specific */ | ||
45 | #define __TIOCSETX _IOW('t', 34, int) /* SunOS Specific */ | ||
46 | #define __TIOCGETX _IOR('t', 35, int) /* SunOS Specific */ | ||
47 | #define TIOCCONS _IO('t', 36) | ||
48 | #define TIOCGSOFTCAR _IOR('t', 100, int) | ||
49 | #define TIOCSSOFTCAR _IOW('t', 101, int) | ||
50 | #define __TIOCUCNTL _IOW('t', 102, int) /* SunOS Specific */ | ||
51 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) | ||
52 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) | ||
53 | #define __TIOCREMOTE _IOW('t', 105, int) /* SunOS Specific */ | ||
54 | #define TIOCMGET _IOR('t', 106, int) | ||
55 | #define TIOCMBIC _IOW('t', 107, int) | ||
56 | #define TIOCMBIS _IOW('t', 108, int) | ||
57 | #define TIOCMSET _IOW('t', 109, int) | ||
58 | #define TIOCSTART _IO('t', 110) | ||
59 | #define TIOCSTOP _IO('t', 111) | ||
60 | #define TIOCPKT _IOW('t', 112, int) | ||
61 | #define TIOCNOTTY _IO('t', 113) | ||
62 | #define TIOCSTI _IOW('t', 114, char) | ||
63 | #define TIOCOUTQ _IOR('t', 115, int) | ||
64 | #define __TIOCGLTC _IOR('t', 116, struct ltchars) /* SunOS Specific */ | ||
65 | #define __TIOCSLTC _IOW('t', 117, struct ltchars) /* SunOS Specific */ | ||
66 | /* 118 is the non-posix setpgrp tty ioctl */ | ||
67 | /* 119 is the non-posix getpgrp tty ioctl */ | ||
68 | #define __TIOCCDTR _IO('t', 120) /* SunOS Specific */ | ||
69 | #define __TIOCSDTR _IO('t', 121) /* SunOS Specific */ | ||
70 | #define TIOCCBRK _IO('t', 122) | ||
71 | #define TIOCSBRK _IO('t', 123) | ||
72 | #define __TIOCLGET _IOW('t', 124, int) /* SunOS Specific */ | ||
73 | #define __TIOCLSET _IOW('t', 125, int) /* SunOS Specific */ | ||
74 | #define __TIOCLBIC _IOW('t', 126, int) /* SunOS Specific */ | ||
75 | #define __TIOCLBIS _IOW('t', 127, int) /* SunOS Specific */ | ||
76 | #define __TIOCISPACE _IOR('t', 128, int) /* SunOS Specific */ | ||
77 | #define __TIOCISIZE _IOR('t', 129, int) /* SunOS Specific */ | ||
78 | #define TIOCSPGRP _IOW('t', 130, int) | ||
79 | #define TIOCGPGRP _IOR('t', 131, int) | ||
80 | #define TIOCSCTTY _IO('t', 132) | ||
81 | #define TIOCGSID _IOR('t', 133, int) | ||
82 | /* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ | ||
83 | #define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ | ||
84 | #define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ | ||
85 | #define TIOCSIG _IOW('t', 136, int) /* Generate signal on Pty slave */ | ||
86 | |||
87 | /* Little f */ | ||
88 | #define FIOCLEX _IO('f', 1) | ||
89 | #define FIONCLEX _IO('f', 2) | ||
90 | #define FIOASYNC _IOW('f', 125, int) | ||
91 | #define FIONBIO _IOW('f', 126, int) | ||
92 | #define FIONREAD _IOR('f', 127, int) | ||
93 | #define TIOCINQ FIONREAD | ||
94 | #define FIOQSIZE _IOR('f', 128, loff_t) | ||
95 | |||
96 | /* SCARY Rutgers local SunOS kernel hackery, perhaps I will support it | ||
97 | * someday. This is completely bogus, I know... | ||
98 | */ | ||
99 | #define __TCGETSTAT _IO('T', 200) /* Rutgers specific */ | ||
100 | #define __TCSETSTAT _IO('T', 201) /* Rutgers specific */ | ||
101 | |||
102 | /* Linux specific, no SunOS equivalent. */ | ||
103 | #define TIOCLINUX 0x541C | ||
104 | #define TIOCGSERIAL 0x541E | ||
105 | #define TIOCSSERIAL 0x541F | ||
106 | #define TCSBRKP 0x5425 | ||
107 | #define TIOCSERCONFIG 0x5453 | ||
108 | #define TIOCSERGWILD 0x5454 | ||
109 | #define TIOCSERSWILD 0x5455 | ||
110 | #define TIOCGLCKTRMIOS 0x5456 | ||
111 | #define TIOCSLCKTRMIOS 0x5457 | ||
112 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
113 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
114 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
115 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
116 | #define TIOCMIWAIT 0x545C /* Wait for change on serial input line(s) */ | ||
117 | #define TIOCGICOUNT 0x545D /* Read serial port inline interrupt counts */ | ||
118 | |||
119 | /* Kernel definitions */ | ||
120 | #ifdef __KERNEL__ | ||
121 | #define TIOCGETC __TIOCGETC | 6 | #define TIOCGETC __TIOCGETC |
122 | #define TIOCGETP __TIOCGETP | 7 | #define TIOCGETP __TIOCGETP |
123 | #define TIOCGLTC __TIOCGLTC | 8 | #define TIOCGLTC __TIOCGLTC |
@@ -125,16 +10,4 @@ | |||
125 | #define TIOCSETP __TIOCSETP | 10 | #define TIOCSETP __TIOCSETP |
126 | #define TIOCSETN __TIOCSETN | 11 | #define TIOCSETN __TIOCSETN |
127 | #define TIOCSETC __TIOCSETC | 12 | #define TIOCSETC __TIOCSETC |
128 | #endif | ||
129 | |||
130 | /* Used for packet mode */ | ||
131 | #define TIOCPKT_DATA 0 | ||
132 | #define TIOCPKT_FLUSHREAD 1 | ||
133 | #define TIOCPKT_FLUSHWRITE 2 | ||
134 | #define TIOCPKT_STOP 4 | ||
135 | #define TIOCPKT_START 8 | ||
136 | #define TIOCPKT_NOSTOP 16 | ||
137 | #define TIOCPKT_DOSTOP 32 | ||
138 | #define TIOCPKT_IOCTL 64 | ||
139 | |||
140 | #endif /* !(_ASM_SPARC_IOCTLS_H) */ | 13 | #endif /* !(_ASM_SPARC_IOCTLS_H) */ |
diff --git a/arch/sparc/include/asm/mman.h b/arch/sparc/include/asm/mman.h index c3029ad6619a..59bb5938d852 100644 --- a/arch/sparc/include/asm/mman.h +++ b/arch/sparc/include/asm/mman.h | |||
@@ -1,33 +1,10 @@ | |||
1 | #ifndef __SPARC_MMAN_H__ | 1 | #ifndef __SPARC_MMAN_H__ |
2 | #define __SPARC_MMAN_H__ | 2 | #define __SPARC_MMAN_H__ |
3 | 3 | ||
4 | #include <asm-generic/mman-common.h> | 4 | #include <uapi/asm/mman.h> |
5 | 5 | ||
6 | /* SunOS'ified... */ | ||
7 | |||
8 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | ||
9 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | ||
10 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ | ||
11 | #define MAP_LOCKED 0x100 /* lock the mapping */ | ||
12 | #define _MAP_NEW 0x80000000 /* Binary compatibility is fun... */ | ||
13 | |||
14 | #define MAP_GROWSDOWN 0x0200 /* stack-like segment */ | ||
15 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
16 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
17 | |||
18 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | ||
19 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | ||
20 | |||
21 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
22 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
23 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | ||
24 | #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ | ||
25 | |||
26 | #ifdef __KERNEL__ | ||
27 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
28 | #define arch_mmap_check(addr,len,flags) sparc_mmap_check(addr,len) | 7 | #define arch_mmap_check(addr,len,flags) sparc_mmap_check(addr,len) |
29 | int sparc_mmap_check(unsigned long addr, unsigned long len); | 8 | int sparc_mmap_check(unsigned long addr, unsigned long len); |
30 | #endif | 9 | #endif |
31 | #endif | ||
32 | |||
33 | #endif /* __SPARC_MMAN_H__ */ | 10 | #endif /* __SPARC_MMAN_H__ */ |
diff --git a/arch/sparc/include/asm/psr.h b/arch/sparc/include/asm/psr.h index cee7ed9c927d..e71eb57945e0 100644 --- a/arch/sparc/include/asm/psr.h +++ b/arch/sparc/include/asm/psr.h | |||
@@ -7,43 +7,11 @@ | |||
7 | * | 7 | * |
8 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) | 8 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) |
9 | */ | 9 | */ |
10 | |||
11 | #ifndef __LINUX_SPARC_PSR_H | 10 | #ifndef __LINUX_SPARC_PSR_H |
12 | #define __LINUX_SPARC_PSR_H | 11 | #define __LINUX_SPARC_PSR_H |
13 | 12 | ||
14 | /* The Sparc PSR fields are laid out as the following: | 13 | #include <uapi/asm/psr.h> |
15 | * | ||
16 | * ------------------------------------------------------------------------ | ||
17 | * | impl | vers | icc | resv | EC | EF | PIL | S | PS | ET | CWP | | ||
18 | * | 31-28 | 27-24 | 23-20 | 19-14 | 13 | 12 | 11-8 | 7 | 6 | 5 | 4-0 | | ||
19 | * ------------------------------------------------------------------------ | ||
20 | */ | ||
21 | #define PSR_CWP 0x0000001f /* current window pointer */ | ||
22 | #define PSR_ET 0x00000020 /* enable traps field */ | ||
23 | #define PSR_PS 0x00000040 /* previous privilege level */ | ||
24 | #define PSR_S 0x00000080 /* current privilege level */ | ||
25 | #define PSR_PIL 0x00000f00 /* processor interrupt level */ | ||
26 | #define PSR_EF 0x00001000 /* enable floating point */ | ||
27 | #define PSR_EC 0x00002000 /* enable co-processor */ | ||
28 | #define PSR_SYSCALL 0x00004000 /* inside of a syscall */ | ||
29 | #define PSR_LE 0x00008000 /* SuperSparcII little-endian */ | ||
30 | #define PSR_ICC 0x00f00000 /* integer condition codes */ | ||
31 | #define PSR_C 0x00100000 /* carry bit */ | ||
32 | #define PSR_V 0x00200000 /* overflow bit */ | ||
33 | #define PSR_Z 0x00400000 /* zero bit */ | ||
34 | #define PSR_N 0x00800000 /* negative bit */ | ||
35 | #define PSR_VERS 0x0f000000 /* cpu-version field */ | ||
36 | #define PSR_IMPL 0xf0000000 /* cpu-implementation field */ | ||
37 | |||
38 | #define PSR_VERS_SHIFT 24 | ||
39 | #define PSR_IMPL_SHIFT 28 | ||
40 | #define PSR_VERS_SHIFTED_MASK 0xf | ||
41 | #define PSR_IMPL_SHIFTED_MASK 0xf | ||
42 | |||
43 | #define PSR_IMPL_TI 0x4 | ||
44 | #define PSR_IMPL_LEON 0xf | ||
45 | 14 | ||
46 | #ifdef __KERNEL__ | ||
47 | 15 | ||
48 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
49 | /* Get the %psr register. */ | 17 | /* Get the %psr register. */ |
@@ -96,6 +64,4 @@ static inline unsigned int get_fsr(void) | |||
96 | 64 | ||
97 | #endif /* !(__ASSEMBLY__) */ | 65 | #endif /* !(__ASSEMBLY__) */ |
98 | 66 | ||
99 | #endif /* (__KERNEL__) */ | ||
100 | |||
101 | #endif /* !(__LINUX_SPARC_PSR_H) */ | 67 | #endif /* !(__LINUX_SPARC_PSR_H) */ |
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h index fd9c3f21cbf0..0c6f6b068289 100644 --- a/arch/sparc/include/asm/ptrace.h +++ b/arch/sparc/include/asm/ptrace.h | |||
@@ -1,169 +1,11 @@ | |||
1 | #ifndef __SPARC_PTRACE_H | 1 | #ifndef __SPARC_PTRACE_H |
2 | #define __SPARC_PTRACE_H | 2 | #define __SPARC_PTRACE_H |
3 | 3 | ||
4 | #if defined(__sparc__) && defined(__arch64__) | 4 | #include <uapi/asm/ptrace.h> |
5 | /* 64 bit sparc */ | ||
6 | #include <asm/pstate.h> | ||
7 | |||
8 | /* This struct defines the way the registers are stored on the | ||
9 | * stack during a system call and basically all traps. | ||
10 | */ | ||
11 | |||
12 | /* This magic value must have the low 9 bits clear, | ||
13 | * as that is where we encode the %tt value, see below. | ||
14 | */ | ||
15 | #define PT_REGS_MAGIC 0x57ac6c00 | ||
16 | |||
17 | #ifndef __ASSEMBLY__ | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | |||
21 | struct pt_regs { | ||
22 | unsigned long u_regs[16]; /* globals and ins */ | ||
23 | unsigned long tstate; | ||
24 | unsigned long tpc; | ||
25 | unsigned long tnpc; | ||
26 | unsigned int y; | ||
27 | |||
28 | /* We encode a magic number, PT_REGS_MAGIC, along | ||
29 | * with the %tt (trap type) register value at trap | ||
30 | * entry time. The magic number allows us to identify | ||
31 | * accurately a trap stack frame in the stack | ||
32 | * unwinder, and the %tt value allows us to test | ||
33 | * things like "in a system call" etc. for an arbitray | ||
34 | * process. | ||
35 | * | ||
36 | * The PT_REGS_MAGIC is chosen such that it can be | ||
37 | * loaded completely using just a sethi instruction. | ||
38 | */ | ||
39 | unsigned int magic; | ||
40 | }; | ||
41 | |||
42 | struct pt_regs32 { | ||
43 | unsigned int psr; | ||
44 | unsigned int pc; | ||
45 | unsigned int npc; | ||
46 | unsigned int y; | ||
47 | unsigned int u_regs[16]; /* globals and ins */ | ||
48 | }; | ||
49 | |||
50 | /* A V9 register window */ | ||
51 | struct reg_window { | ||
52 | unsigned long locals[8]; | ||
53 | unsigned long ins[8]; | ||
54 | }; | ||
55 | |||
56 | /* A 32-bit register window. */ | ||
57 | struct reg_window32 { | ||
58 | unsigned int locals[8]; | ||
59 | unsigned int ins[8]; | ||
60 | }; | ||
61 | |||
62 | /* A V9 Sparc stack frame */ | ||
63 | struct sparc_stackf { | ||
64 | unsigned long locals[8]; | ||
65 | unsigned long ins[6]; | ||
66 | struct sparc_stackf *fp; | ||
67 | unsigned long callers_pc; | ||
68 | char *structptr; | ||
69 | unsigned long xargs[6]; | ||
70 | unsigned long xxargs[1]; | ||
71 | }; | ||
72 | |||
73 | /* A 32-bit Sparc stack frame */ | ||
74 | struct sparc_stackf32 { | ||
75 | unsigned int locals[8]; | ||
76 | unsigned int ins[6]; | ||
77 | unsigned int fp; | ||
78 | unsigned int callers_pc; | ||
79 | unsigned int structptr; | ||
80 | unsigned int xargs[6]; | ||
81 | unsigned int xxargs[1]; | ||
82 | }; | ||
83 | |||
84 | struct sparc_trapf { | ||
85 | unsigned long locals[8]; | ||
86 | unsigned long ins[8]; | ||
87 | unsigned long _unused; | ||
88 | struct pt_regs *regs; | ||
89 | }; | ||
90 | #endif /* (!__ASSEMBLY__) */ | ||
91 | #else | ||
92 | /* 32 bit sparc */ | ||
93 | |||
94 | #include <asm/psr.h> | ||
95 | |||
96 | /* This struct defines the way the registers are stored on the | ||
97 | * stack during a system call and basically all traps. | ||
98 | */ | ||
99 | #ifndef __ASSEMBLY__ | ||
100 | |||
101 | #include <linux/types.h> | ||
102 | |||
103 | struct pt_regs { | ||
104 | unsigned long psr; | ||
105 | unsigned long pc; | ||
106 | unsigned long npc; | ||
107 | unsigned long y; | ||
108 | unsigned long u_regs[16]; /* globals and ins */ | ||
109 | }; | ||
110 | |||
111 | /* A 32-bit register window. */ | ||
112 | struct reg_window32 { | ||
113 | unsigned long locals[8]; | ||
114 | unsigned long ins[8]; | ||
115 | }; | ||
116 | |||
117 | /* A Sparc stack frame */ | ||
118 | struct sparc_stackf { | ||
119 | unsigned long locals[8]; | ||
120 | unsigned long ins[6]; | ||
121 | struct sparc_stackf *fp; | ||
122 | unsigned long callers_pc; | ||
123 | char *structptr; | ||
124 | unsigned long xargs[6]; | ||
125 | unsigned long xxargs[1]; | ||
126 | }; | ||
127 | #endif /* (!__ASSEMBLY__) */ | ||
128 | |||
129 | #endif /* (defined(__sparc__) && defined(__arch64__))*/ | ||
130 | |||
131 | #ifndef __ASSEMBLY__ | ||
132 | |||
133 | #define TRACEREG_SZ sizeof(struct pt_regs) | ||
134 | #define STACKFRAME_SZ sizeof(struct sparc_stackf) | ||
135 | |||
136 | #define TRACEREG32_SZ sizeof(struct pt_regs32) | ||
137 | #define STACKFRAME32_SZ sizeof(struct sparc_stackf32) | ||
138 | |||
139 | #endif /* (!__ASSEMBLY__) */ | ||
140 | |||
141 | #define UREG_G0 0 | ||
142 | #define UREG_G1 1 | ||
143 | #define UREG_G2 2 | ||
144 | #define UREG_G3 3 | ||
145 | #define UREG_G4 4 | ||
146 | #define UREG_G5 5 | ||
147 | #define UREG_G6 6 | ||
148 | #define UREG_G7 7 | ||
149 | #define UREG_I0 8 | ||
150 | #define UREG_I1 9 | ||
151 | #define UREG_I2 10 | ||
152 | #define UREG_I3 11 | ||
153 | #define UREG_I4 12 | ||
154 | #define UREG_I5 13 | ||
155 | #define UREG_I6 14 | ||
156 | #define UREG_I7 15 | ||
157 | #define UREG_FP UREG_I6 | ||
158 | #define UREG_RETPC UREG_I7 | ||
159 | 5 | ||
160 | #if defined(__sparc__) && defined(__arch64__) | 6 | #if defined(__sparc__) && defined(__arch64__) |
161 | /* 64 bit sparc */ | ||
162 | |||
163 | #ifndef __ASSEMBLY__ | 7 | #ifndef __ASSEMBLY__ |
164 | 8 | ||
165 | #ifdef __KERNEL__ | ||
166 | |||
167 | #include <linux/threads.h> | 9 | #include <linux/threads.h> |
168 | #include <asm/switch_to.h> | 10 | #include <asm/switch_to.h> |
169 | 11 | ||
@@ -223,24 +65,10 @@ extern unsigned long profile_pc(struct pt_regs *); | |||
223 | #else | 65 | #else |
224 | #define profile_pc(regs) instruction_pointer(regs) | 66 | #define profile_pc(regs) instruction_pointer(regs) |
225 | #endif | 67 | #endif |
226 | #endif /* (__KERNEL__) */ | ||
227 | |||
228 | #else /* __ASSEMBLY__ */ | 68 | #else /* __ASSEMBLY__ */ |
229 | /* For assembly code. */ | ||
230 | #define TRACEREG_SZ 0xa0 | ||
231 | #define STACKFRAME_SZ 0xc0 | ||
232 | |||
233 | #define TRACEREG32_SZ 0x50 | ||
234 | #define STACKFRAME32_SZ 0x60 | ||
235 | #endif /* __ASSEMBLY__ */ | 69 | #endif /* __ASSEMBLY__ */ |
236 | |||
237 | #else /* (defined(__sparc__) && defined(__arch64__)) */ | 70 | #else /* (defined(__sparc__) && defined(__arch64__)) */ |
238 | |||
239 | /* 32 bit sparc */ | ||
240 | |||
241 | #ifndef __ASSEMBLY__ | 71 | #ifndef __ASSEMBLY__ |
242 | |||
243 | #ifdef __KERNEL__ | ||
244 | #include <asm/switch_to.h> | 72 | #include <asm/switch_to.h> |
245 | 73 | ||
246 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | 74 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) |
@@ -265,158 +93,10 @@ static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | |||
265 | #define instruction_pointer(regs) ((regs)->pc) | 93 | #define instruction_pointer(regs) ((regs)->pc) |
266 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) | 94 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) |
267 | unsigned long profile_pc(struct pt_regs *); | 95 | unsigned long profile_pc(struct pt_regs *); |
268 | #endif /* (__KERNEL__) */ | ||
269 | |||
270 | #else /* (!__ASSEMBLY__) */ | 96 | #else /* (!__ASSEMBLY__) */ |
271 | /* For assembly code. */ | ||
272 | #define TRACEREG_SZ 0x50 | ||
273 | #define STACKFRAME_SZ 0x60 | ||
274 | #endif /* (!__ASSEMBLY__) */ | 97 | #endif /* (!__ASSEMBLY__) */ |
275 | |||
276 | #endif /* (defined(__sparc__) && defined(__arch64__)) */ | 98 | #endif /* (defined(__sparc__) && defined(__arch64__)) */ |
277 | |||
278 | #ifdef __KERNEL__ | ||
279 | #define STACK_BIAS 2047 | 99 | #define STACK_BIAS 2047 |
280 | #endif | ||
281 | |||
282 | /* These are for pt_regs. */ | ||
283 | #define PT_V9_G0 0x00 | ||
284 | #define PT_V9_G1 0x08 | ||
285 | #define PT_V9_G2 0x10 | ||
286 | #define PT_V9_G3 0x18 | ||
287 | #define PT_V9_G4 0x20 | ||
288 | #define PT_V9_G5 0x28 | ||
289 | #define PT_V9_G6 0x30 | ||
290 | #define PT_V9_G7 0x38 | ||
291 | #define PT_V9_I0 0x40 | ||
292 | #define PT_V9_I1 0x48 | ||
293 | #define PT_V9_I2 0x50 | ||
294 | #define PT_V9_I3 0x58 | ||
295 | #define PT_V9_I4 0x60 | ||
296 | #define PT_V9_I5 0x68 | ||
297 | #define PT_V9_I6 0x70 | ||
298 | #define PT_V9_FP PT_V9_I6 | ||
299 | #define PT_V9_I7 0x78 | ||
300 | #define PT_V9_TSTATE 0x80 | ||
301 | #define PT_V9_TPC 0x88 | ||
302 | #define PT_V9_TNPC 0x90 | ||
303 | #define PT_V9_Y 0x98 | ||
304 | #define PT_V9_MAGIC 0x9c | ||
305 | #define PT_TSTATE PT_V9_TSTATE | ||
306 | #define PT_TPC PT_V9_TPC | ||
307 | #define PT_TNPC PT_V9_TNPC | ||
308 | |||
309 | /* These for pt_regs32. */ | ||
310 | #define PT_PSR 0x0 | ||
311 | #define PT_PC 0x4 | ||
312 | #define PT_NPC 0x8 | ||
313 | #define PT_Y 0xc | ||
314 | #define PT_G0 0x10 | ||
315 | #define PT_WIM PT_G0 | ||
316 | #define PT_G1 0x14 | ||
317 | #define PT_G2 0x18 | ||
318 | #define PT_G3 0x1c | ||
319 | #define PT_G4 0x20 | ||
320 | #define PT_G5 0x24 | ||
321 | #define PT_G6 0x28 | ||
322 | #define PT_G7 0x2c | ||
323 | #define PT_I0 0x30 | ||
324 | #define PT_I1 0x34 | ||
325 | #define PT_I2 0x38 | ||
326 | #define PT_I3 0x3c | ||
327 | #define PT_I4 0x40 | ||
328 | #define PT_I5 0x44 | ||
329 | #define PT_I6 0x48 | ||
330 | #define PT_FP PT_I6 | ||
331 | #define PT_I7 0x4c | ||
332 | |||
333 | /* Reg_window offsets */ | ||
334 | #define RW_V9_L0 0x00 | ||
335 | #define RW_V9_L1 0x08 | ||
336 | #define RW_V9_L2 0x10 | ||
337 | #define RW_V9_L3 0x18 | ||
338 | #define RW_V9_L4 0x20 | ||
339 | #define RW_V9_L5 0x28 | ||
340 | #define RW_V9_L6 0x30 | ||
341 | #define RW_V9_L7 0x38 | ||
342 | #define RW_V9_I0 0x40 | ||
343 | #define RW_V9_I1 0x48 | ||
344 | #define RW_V9_I2 0x50 | ||
345 | #define RW_V9_I3 0x58 | ||
346 | #define RW_V9_I4 0x60 | ||
347 | #define RW_V9_I5 0x68 | ||
348 | #define RW_V9_I6 0x70 | ||
349 | #define RW_V9_I7 0x78 | ||
350 | |||
351 | #define RW_L0 0x00 | ||
352 | #define RW_L1 0x04 | ||
353 | #define RW_L2 0x08 | ||
354 | #define RW_L3 0x0c | ||
355 | #define RW_L4 0x10 | ||
356 | #define RW_L5 0x14 | ||
357 | #define RW_L6 0x18 | ||
358 | #define RW_L7 0x1c | ||
359 | #define RW_I0 0x20 | ||
360 | #define RW_I1 0x24 | ||
361 | #define RW_I2 0x28 | ||
362 | #define RW_I3 0x2c | ||
363 | #define RW_I4 0x30 | ||
364 | #define RW_I5 0x34 | ||
365 | #define RW_I6 0x38 | ||
366 | #define RW_I7 0x3c | ||
367 | |||
368 | /* Stack_frame offsets */ | ||
369 | #define SF_V9_L0 0x00 | ||
370 | #define SF_V9_L1 0x08 | ||
371 | #define SF_V9_L2 0x10 | ||
372 | #define SF_V9_L3 0x18 | ||
373 | #define SF_V9_L4 0x20 | ||
374 | #define SF_V9_L5 0x28 | ||
375 | #define SF_V9_L6 0x30 | ||
376 | #define SF_V9_L7 0x38 | ||
377 | #define SF_V9_I0 0x40 | ||
378 | #define SF_V9_I1 0x48 | ||
379 | #define SF_V9_I2 0x50 | ||
380 | #define SF_V9_I3 0x58 | ||
381 | #define SF_V9_I4 0x60 | ||
382 | #define SF_V9_I5 0x68 | ||
383 | #define SF_V9_FP 0x70 | ||
384 | #define SF_V9_PC 0x78 | ||
385 | #define SF_V9_RETP 0x80 | ||
386 | #define SF_V9_XARG0 0x88 | ||
387 | #define SF_V9_XARG1 0x90 | ||
388 | #define SF_V9_XARG2 0x98 | ||
389 | #define SF_V9_XARG3 0xa0 | ||
390 | #define SF_V9_XARG4 0xa8 | ||
391 | #define SF_V9_XARG5 0xb0 | ||
392 | #define SF_V9_XXARG 0xb8 | ||
393 | |||
394 | #define SF_L0 0x00 | ||
395 | #define SF_L1 0x04 | ||
396 | #define SF_L2 0x08 | ||
397 | #define SF_L3 0x0c | ||
398 | #define SF_L4 0x10 | ||
399 | #define SF_L5 0x14 | ||
400 | #define SF_L6 0x18 | ||
401 | #define SF_L7 0x1c | ||
402 | #define SF_I0 0x20 | ||
403 | #define SF_I1 0x24 | ||
404 | #define SF_I2 0x28 | ||
405 | #define SF_I3 0x2c | ||
406 | #define SF_I4 0x30 | ||
407 | #define SF_I5 0x34 | ||
408 | #define SF_FP 0x38 | ||
409 | #define SF_PC 0x3c | ||
410 | #define SF_RETP 0x40 | ||
411 | #define SF_XARG0 0x44 | ||
412 | #define SF_XARG1 0x48 | ||
413 | #define SF_XARG2 0x4c | ||
414 | #define SF_XARG3 0x50 | ||
415 | #define SF_XARG4 0x54 | ||
416 | #define SF_XARG5 0x58 | ||
417 | #define SF_XXARG 0x5c | ||
418 | |||
419 | #ifdef __KERNEL__ | ||
420 | 100 | ||
421 | /* global_reg_snapshot offsets */ | 101 | /* global_reg_snapshot offsets */ |
422 | #define GR_SNAP_TSTATE 0x00 | 102 | #define GR_SNAP_TSTATE 0x00 |
@@ -428,29 +108,4 @@ unsigned long profile_pc(struct pt_regs *); | |||
428 | #define GR_SNAP_THREAD 0x30 | 108 | #define GR_SNAP_THREAD 0x30 |
429 | #define GR_SNAP_PAD1 0x38 | 109 | #define GR_SNAP_PAD1 0x38 |
430 | 110 | ||
431 | #endif /* __KERNEL__ */ | ||
432 | |||
433 | /* Stuff for the ptrace system call */ | ||
434 | #define PTRACE_SPARC_DETACH 11 | ||
435 | #define PTRACE_GETREGS 12 | ||
436 | #define PTRACE_SETREGS 13 | ||
437 | #define PTRACE_GETFPREGS 14 | ||
438 | #define PTRACE_SETFPREGS 15 | ||
439 | #define PTRACE_READDATA 16 | ||
440 | #define PTRACE_WRITEDATA 17 | ||
441 | #define PTRACE_READTEXT 18 | ||
442 | #define PTRACE_WRITETEXT 19 | ||
443 | #define PTRACE_GETFPAREGS 20 | ||
444 | #define PTRACE_SETFPAREGS 21 | ||
445 | |||
446 | /* There are for debugging 64-bit processes, either from a 32 or 64 bit | ||
447 | * parent. Thus their complements are for debugging 32-bit processes only. | ||
448 | */ | ||
449 | |||
450 | #define PTRACE_GETREGS64 22 | ||
451 | #define PTRACE_SETREGS64 23 | ||
452 | /* PTRACE_SYSCALL is 24 */ | ||
453 | #define PTRACE_GETFPREGS64 25 | ||
454 | #define PTRACE_SETFPREGS64 26 | ||
455 | |||
456 | #endif /* !(__SPARC_PTRACE_H) */ | 111 | #endif /* !(__SPARC_PTRACE_H) */ |
diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h index 8a83699a5507..5e35e0517318 100644 --- a/arch/sparc/include/asm/setup.h +++ b/arch/sparc/include/asm/setup.h | |||
@@ -1,17 +1,11 @@ | |||
1 | /* | 1 | /* |
2 | * Just a place holder. | 2 | * Just a place holder. |
3 | */ | 3 | */ |
4 | |||
5 | #ifndef _SPARC_SETUP_H | 4 | #ifndef _SPARC_SETUP_H |
6 | #define _SPARC_SETUP_H | 5 | #define _SPARC_SETUP_H |
7 | 6 | ||
8 | #if defined(__sparc__) && defined(__arch64__) | 7 | #include <uapi/asm/setup.h> |
9 | # define COMMAND_LINE_SIZE 2048 | ||
10 | #else | ||
11 | # define COMMAND_LINE_SIZE 256 | ||
12 | #endif | ||
13 | 8 | ||
14 | #ifdef __KERNEL__ | ||
15 | 9 | ||
16 | extern char reboot_command[]; | 10 | extern char reboot_command[]; |
17 | 11 | ||
@@ -34,6 +28,4 @@ extern void sun_do_break(void); | |||
34 | extern int stop_a_enabled; | 28 | extern int stop_a_enabled; |
35 | extern int scons_pwroff; | 29 | extern int scons_pwroff; |
36 | 30 | ||
37 | #endif /* __KERNEL__ */ | ||
38 | |||
39 | #endif /* _SPARC_SETUP_H */ | 31 | #endif /* _SPARC_SETUP_H */ |
diff --git a/arch/sparc/include/asm/sigcontext.h b/arch/sparc/include/asm/sigcontext.h index 69914d748130..fc2df1e892cb 100644 --- a/arch/sparc/include/asm/sigcontext.h +++ b/arch/sparc/include/asm/sigcontext.h | |||
@@ -1,8 +1,8 @@ | |||
1 | #ifndef __SPARC_SIGCONTEXT_H | 1 | #ifndef __SPARC_SIGCONTEXT_H |
2 | #define __SPARC_SIGCONTEXT_H | 2 | #define __SPARC_SIGCONTEXT_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | #include <asm/ptrace.h> | 4 | #include <asm/ptrace.h> |
5 | #include <uapi/asm/sigcontext.h> | ||
6 | 6 | ||
7 | #ifndef __ASSEMBLY__ | 7 | #ifndef __ASSEMBLY__ |
8 | 8 | ||
@@ -105,6 +105,4 @@ typedef struct { | |||
105 | 105 | ||
106 | #endif /* !(__ASSEMBLY__) */ | 106 | #endif /* !(__ASSEMBLY__) */ |
107 | 107 | ||
108 | #endif /* (__KERNEL__) */ | ||
109 | |||
110 | #endif /* !(__SPARC_SIGCONTEXT_H) */ | 108 | #endif /* !(__SPARC_SIGCONTEXT_H) */ |
diff --git a/arch/sparc/include/asm/siginfo.h b/arch/sparc/include/asm/siginfo.h index dbc182c438b4..48c34c19f810 100644 --- a/arch/sparc/include/asm/siginfo.h +++ b/arch/sparc/include/asm/siginfo.h | |||
@@ -1,19 +1,8 @@ | |||
1 | #ifndef __SPARC_SIGINFO_H | 1 | #ifndef __SPARC_SIGINFO_H |
2 | #define __SPARC_SIGINFO_H | 2 | #define __SPARC_SIGINFO_H |
3 | 3 | ||
4 | #if defined(__sparc__) && defined(__arch64__) | 4 | #include <uapi/asm/siginfo.h> |
5 | 5 | ||
6 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | ||
7 | #define __ARCH_SI_BAND_T int | ||
8 | |||
9 | #endif /* defined(__sparc__) && defined(__arch64__) */ | ||
10 | |||
11 | |||
12 | #define __ARCH_SI_TRAPNO | ||
13 | |||
14 | #include <asm-generic/siginfo.h> | ||
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | 6 | ||
18 | #ifdef CONFIG_COMPAT | 7 | #ifdef CONFIG_COMPAT |
19 | 8 | ||
@@ -21,14 +10,4 @@ struct compat_siginfo; | |||
21 | 10 | ||
22 | #endif /* CONFIG_COMPAT */ | 11 | #endif /* CONFIG_COMPAT */ |
23 | 12 | ||
24 | #endif /* __KERNEL__ */ | ||
25 | |||
26 | #define SI_NOINFO 32767 /* no information in siginfo_t */ | ||
27 | |||
28 | /* | ||
29 | * SIGEMT si_codes | ||
30 | */ | ||
31 | #define EMT_TAGOVF (__SI_FAULT|1) /* tag overflow */ | ||
32 | #define NSIGEMT 1 | ||
33 | |||
34 | #endif /* !(__SPARC_SIGINFO_H) */ | 13 | #endif /* !(__SPARC_SIGINFO_H) */ |
diff --git a/arch/sparc/include/asm/signal.h b/arch/sparc/include/asm/signal.h index aa42fe30d5b9..d243c2ae02d2 100644 --- a/arch/sparc/include/asm/signal.h +++ b/arch/sparc/include/asm/signal.h | |||
@@ -1,168 +1,13 @@ | |||
1 | #ifndef __SPARC_SIGNAL_H | 1 | #ifndef __SPARC_SIGNAL_H |
2 | #define __SPARC_SIGNAL_H | 2 | #define __SPARC_SIGNAL_H |
3 | 3 | ||
4 | #include <asm/sigcontext.h> | ||
5 | #include <linux/compiler.h> | ||
6 | |||
7 | #ifdef __KERNEL__ | ||
8 | #ifndef __ASSEMBLY__ | 4 | #ifndef __ASSEMBLY__ |
9 | #include <linux/personality.h> | 5 | #include <linux/personality.h> |
10 | #include <linux/types.h> | 6 | #include <linux/types.h> |
11 | #endif | 7 | #endif |
12 | #endif | 8 | #include <uapi/asm/signal.h> |
13 | |||
14 | /* On the Sparc the signal handlers get passed a 'sub-signal' code | ||
15 | * for certain signal types, which we document here. | ||
16 | */ | ||
17 | #define SIGHUP 1 | ||
18 | #define SIGINT 2 | ||
19 | #define SIGQUIT 3 | ||
20 | #define SIGILL 4 | ||
21 | #define SUBSIG_STACK 0 | ||
22 | #define SUBSIG_ILLINST 2 | ||
23 | #define SUBSIG_PRIVINST 3 | ||
24 | #define SUBSIG_BADTRAP(t) (0x80 + (t)) | ||
25 | |||
26 | #define SIGTRAP 5 | ||
27 | #define SIGABRT 6 | ||
28 | #define SIGIOT 6 | ||
29 | |||
30 | #define SIGEMT 7 | ||
31 | #define SUBSIG_TAG 10 | ||
32 | |||
33 | #define SIGFPE 8 | ||
34 | #define SUBSIG_FPDISABLED 0x400 | ||
35 | #define SUBSIG_FPERROR 0x404 | ||
36 | #define SUBSIG_FPINTOVFL 0x001 | ||
37 | #define SUBSIG_FPSTSIG 0x002 | ||
38 | #define SUBSIG_IDIVZERO 0x014 | ||
39 | #define SUBSIG_FPINEXACT 0x0c4 | ||
40 | #define SUBSIG_FPDIVZERO 0x0c8 | ||
41 | #define SUBSIG_FPUNFLOW 0x0cc | ||
42 | #define SUBSIG_FPOPERROR 0x0d0 | ||
43 | #define SUBSIG_FPOVFLOW 0x0d4 | ||
44 | |||
45 | #define SIGKILL 9 | ||
46 | #define SIGBUS 10 | ||
47 | #define SUBSIG_BUSTIMEOUT 1 | ||
48 | #define SUBSIG_ALIGNMENT 2 | ||
49 | #define SUBSIG_MISCERROR 5 | ||
50 | |||
51 | #define SIGSEGV 11 | ||
52 | #define SUBSIG_NOMAPPING 3 | ||
53 | #define SUBSIG_PROTECTION 4 | ||
54 | #define SUBSIG_SEGERROR 5 | ||
55 | |||
56 | #define SIGSYS 12 | ||
57 | |||
58 | #define SIGPIPE 13 | ||
59 | #define SIGALRM 14 | ||
60 | #define SIGTERM 15 | ||
61 | #define SIGURG 16 | ||
62 | |||
63 | /* SunOS values which deviate from the Linux/i386 ones */ | ||
64 | #define SIGSTOP 17 | ||
65 | #define SIGTSTP 18 | ||
66 | #define SIGCONT 19 | ||
67 | #define SIGCHLD 20 | ||
68 | #define SIGTTIN 21 | ||
69 | #define SIGTTOU 22 | ||
70 | #define SIGIO 23 | ||
71 | #define SIGPOLL SIGIO /* SysV name for SIGIO */ | ||
72 | #define SIGXCPU 24 | ||
73 | #define SIGXFSZ 25 | ||
74 | #define SIGVTALRM 26 | ||
75 | #define SIGPROF 27 | ||
76 | #define SIGWINCH 28 | ||
77 | #define SIGLOST 29 | ||
78 | #define SIGPWR SIGLOST | ||
79 | #define SIGUSR1 30 | ||
80 | #define SIGUSR2 31 | ||
81 | |||
82 | /* Most things should be clean enough to redefine this at will, if care | ||
83 | is taken to make libc match. */ | ||
84 | |||
85 | #define __OLD_NSIG 32 | ||
86 | #define __NEW_NSIG 64 | ||
87 | #ifdef __arch64__ | ||
88 | #define _NSIG_BPW 64 | ||
89 | #else | ||
90 | #define _NSIG_BPW 32 | ||
91 | #endif | ||
92 | #define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW) | ||
93 | |||
94 | #define SIGRTMIN 32 | ||
95 | #define SIGRTMAX __NEW_NSIG | ||
96 | |||
97 | #if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__) | ||
98 | #define _NSIG __NEW_NSIG | ||
99 | #define __new_sigset_t sigset_t | ||
100 | #define __new_sigaction sigaction | ||
101 | #define __new_sigaction32 sigaction32 | ||
102 | #define __old_sigset_t old_sigset_t | ||
103 | #define __old_sigaction old_sigaction | ||
104 | #define __old_sigaction32 old_sigaction32 | ||
105 | #else | ||
106 | #define _NSIG __OLD_NSIG | ||
107 | #define NSIG _NSIG | ||
108 | #define __old_sigset_t sigset_t | ||
109 | #define __old_sigaction sigaction | ||
110 | #define __old_sigaction32 sigaction32 | ||
111 | #endif | ||
112 | 9 | ||
113 | #ifndef __ASSEMBLY__ | 10 | #ifndef __ASSEMBLY__ |
114 | |||
115 | typedef unsigned long __old_sigset_t; /* at least 32 bits */ | ||
116 | |||
117 | typedef struct { | ||
118 | unsigned long sig[_NSIG_WORDS]; | ||
119 | } __new_sigset_t; | ||
120 | |||
121 | /* A SunOS sigstack */ | ||
122 | struct sigstack { | ||
123 | /* XXX 32-bit pointers pinhead XXX */ | ||
124 | char *the_stack; | ||
125 | int cur_status; | ||
126 | }; | ||
127 | |||
128 | /* Sigvec flags */ | ||
129 | #define _SV_SSTACK 1u /* This signal handler should use sig-stack */ | ||
130 | #define _SV_INTR 2u /* Sig return should not restart system call */ | ||
131 | #define _SV_RESET 4u /* Set handler to SIG_DFL upon taken signal */ | ||
132 | #define _SV_IGNCHILD 8u /* Do not send SIGCHLD */ | ||
133 | |||
134 | /* | ||
135 | * sa_flags values: SA_STACK is not currently supported, but will allow the | ||
136 | * usage of signal stacks by using the (now obsolete) sa_restorer field in | ||
137 | * the sigaction structure as a stack pointer. This is now possible due to | ||
138 | * the changes in signal handling. LBT 010493. | ||
139 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
140 | */ | ||
141 | #define SA_NOCLDSTOP _SV_IGNCHILD | ||
142 | #define SA_STACK _SV_SSTACK | ||
143 | #define SA_ONSTACK _SV_SSTACK | ||
144 | #define SA_RESTART _SV_INTR | ||
145 | #define SA_ONESHOT _SV_RESET | ||
146 | #define SA_NODEFER 0x20u | ||
147 | #define SA_NOCLDWAIT 0x100u | ||
148 | #define SA_SIGINFO 0x200u | ||
149 | |||
150 | #define SA_NOMASK SA_NODEFER | ||
151 | |||
152 | #define SIG_BLOCK 0x01 /* for blocking signals */ | ||
153 | #define SIG_UNBLOCK 0x02 /* for unblocking signals */ | ||
154 | #define SIG_SETMASK 0x04 /* for setting the signal mask */ | ||
155 | |||
156 | /* | ||
157 | * sigaltstack controls | ||
158 | */ | ||
159 | #define SS_ONSTACK 1 | ||
160 | #define SS_DISABLE 2 | ||
161 | |||
162 | #define MINSIGSTKSZ 4096 | ||
163 | #define SIGSTKSZ 16384 | ||
164 | |||
165 | #ifdef __KERNEL__ | ||
166 | /* | 11 | /* |
167 | * DJHR | 12 | * DJHR |
168 | * SA_STATIC_ALLOC is used for the sparc32 system to indicate that this | 13 | * SA_STATIC_ALLOC is used for the sparc32 system to indicate that this |
@@ -175,31 +20,6 @@ struct sigstack { | |||
175 | * | 20 | * |
176 | */ | 21 | */ |
177 | #define SA_STATIC_ALLOC 0x8000 | 22 | #define SA_STATIC_ALLOC 0x8000 |
178 | #endif | ||
179 | |||
180 | #include <asm-generic/signal-defs.h> | ||
181 | |||
182 | struct __new_sigaction { | ||
183 | __sighandler_t sa_handler; | ||
184 | unsigned long sa_flags; | ||
185 | __sigrestore_t sa_restorer; /* not used by Linux/SPARC yet */ | ||
186 | __new_sigset_t sa_mask; | ||
187 | }; | ||
188 | |||
189 | struct __old_sigaction { | ||
190 | __sighandler_t sa_handler; | ||
191 | __old_sigset_t sa_mask; | ||
192 | unsigned long sa_flags; | ||
193 | void (*sa_restorer)(void); /* not used by Linux/SPARC yet */ | ||
194 | }; | ||
195 | |||
196 | typedef struct sigaltstack { | ||
197 | void __user *ss_sp; | ||
198 | int ss_flags; | ||
199 | size_t ss_size; | ||
200 | } stack_t; | ||
201 | |||
202 | #ifdef __KERNEL__ | ||
203 | 23 | ||
204 | struct k_sigaction { | 24 | struct k_sigaction { |
205 | struct __new_sigaction sa; | 25 | struct __new_sigaction sa; |
@@ -208,8 +28,5 @@ struct k_sigaction { | |||
208 | 28 | ||
209 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | 29 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) |
210 | 30 | ||
211 | #endif /* !(__KERNEL__) */ | ||
212 | |||
213 | #endif /* !(__ASSEMBLY__) */ | 31 | #endif /* !(__ASSEMBLY__) */ |
214 | |||
215 | #endif /* !(__SPARC_SIGNAL_H) */ | 32 | #endif /* !(__SPARC_SIGNAL_H) */ |
diff --git a/arch/sparc/include/asm/termbits.h b/arch/sparc/include/asm/termbits.h index 23b10ff08df2..948067065ac5 100644 --- a/arch/sparc/include/asm/termbits.h +++ b/arch/sparc/include/asm/termbits.h | |||
@@ -1,266 +1,8 @@ | |||
1 | #ifndef _SPARC_TERMBITS_H | 1 | #ifndef _SPARC_TERMBITS_H |
2 | #define _SPARC_TERMBITS_H | 2 | #define _SPARC_TERMBITS_H |
3 | 3 | ||
4 | #include <linux/posix_types.h> | 4 | #include <uapi/asm/termbits.h> |
5 | 5 | ||
6 | typedef unsigned char cc_t; | ||
7 | typedef unsigned int speed_t; | ||
8 | |||
9 | #if defined(__sparc__) && defined(__arch64__) | ||
10 | typedef unsigned int tcflag_t; | ||
11 | #else | ||
12 | typedef unsigned long tcflag_t; | ||
13 | #endif | ||
14 | |||
15 | #define NCC 8 | ||
16 | struct termio { | ||
17 | unsigned short c_iflag; /* input mode flags */ | ||
18 | unsigned short c_oflag; /* output mode flags */ | ||
19 | unsigned short c_cflag; /* control mode flags */ | ||
20 | unsigned short c_lflag; /* local mode flags */ | ||
21 | unsigned char c_line; /* line discipline */ | ||
22 | unsigned char c_cc[NCC]; /* control characters */ | ||
23 | }; | ||
24 | |||
25 | #define NCCS 17 | ||
26 | struct termios { | ||
27 | tcflag_t c_iflag; /* input mode flags */ | ||
28 | tcflag_t c_oflag; /* output mode flags */ | ||
29 | tcflag_t c_cflag; /* control mode flags */ | ||
30 | tcflag_t c_lflag; /* local mode flags */ | ||
31 | cc_t c_line; /* line discipline */ | ||
32 | #ifndef __KERNEL__ | ||
33 | cc_t c_cc[NCCS]; /* control characters */ | ||
34 | #else | ||
35 | cc_t c_cc[NCCS+2]; /* kernel needs 2 more to hold vmin/vtime */ | ||
36 | #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) | ||
37 | #endif | ||
38 | }; | ||
39 | |||
40 | struct termios2 { | ||
41 | tcflag_t c_iflag; /* input mode flags */ | ||
42 | tcflag_t c_oflag; /* output mode flags */ | ||
43 | tcflag_t c_cflag; /* control mode flags */ | ||
44 | tcflag_t c_lflag; /* local mode flags */ | ||
45 | cc_t c_line; /* line discipline */ | ||
46 | cc_t c_cc[NCCS+2]; /* control characters */ | ||
47 | speed_t c_ispeed; /* input speed */ | ||
48 | speed_t c_ospeed; /* output speed */ | ||
49 | }; | ||
50 | |||
51 | struct ktermios { | ||
52 | tcflag_t c_iflag; /* input mode flags */ | ||
53 | tcflag_t c_oflag; /* output mode flags */ | ||
54 | tcflag_t c_cflag; /* control mode flags */ | ||
55 | tcflag_t c_lflag; /* local mode flags */ | ||
56 | cc_t c_line; /* line discipline */ | ||
57 | cc_t c_cc[NCCS+2]; /* control characters */ | ||
58 | speed_t c_ispeed; /* input speed */ | ||
59 | speed_t c_ospeed; /* output speed */ | ||
60 | }; | ||
61 | |||
62 | /* c_cc characters */ | ||
63 | #define VINTR 0 | ||
64 | #define VQUIT 1 | ||
65 | #define VERASE 2 | ||
66 | #define VKILL 3 | ||
67 | #define VEOF 4 | ||
68 | #define VEOL 5 | ||
69 | #define VEOL2 6 | ||
70 | #define VSWTC 7 | ||
71 | #define VSTART 8 | ||
72 | #define VSTOP 9 | ||
73 | |||
74 | |||
75 | |||
76 | #define VSUSP 10 | ||
77 | #define VDSUSP 11 /* SunOS POSIX nicety I do believe... */ | ||
78 | #define VREPRINT 12 | ||
79 | #define VDISCARD 13 | ||
80 | #define VWERASE 14 | ||
81 | #define VLNEXT 15 | ||
82 | |||
83 | /* Kernel keeps vmin/vtime separated, user apps assume vmin/vtime is | ||
84 | * shared with eof/eol | ||
85 | */ | ||
86 | #ifdef __KERNEL__ | ||
87 | #define VMIN 16 | 6 | #define VMIN 16 |
88 | #define VTIME 17 | 7 | #define VTIME 17 |
89 | #else | ||
90 | #define VMIN VEOF | ||
91 | #define VTIME VEOL | ||
92 | #endif | ||
93 | |||
94 | /* c_iflag bits */ | ||
95 | #define IGNBRK 0x00000001 | ||
96 | #define BRKINT 0x00000002 | ||
97 | #define IGNPAR 0x00000004 | ||
98 | #define PARMRK 0x00000008 | ||
99 | #define INPCK 0x00000010 | ||
100 | #define ISTRIP 0x00000020 | ||
101 | #define INLCR 0x00000040 | ||
102 | #define IGNCR 0x00000080 | ||
103 | #define ICRNL 0x00000100 | ||
104 | #define IUCLC 0x00000200 | ||
105 | #define IXON 0x00000400 | ||
106 | #define IXANY 0x00000800 | ||
107 | #define IXOFF 0x00001000 | ||
108 | #define IMAXBEL 0x00002000 | ||
109 | #define IUTF8 0x00004000 | ||
110 | |||
111 | /* c_oflag bits */ | ||
112 | #define OPOST 0x00000001 | ||
113 | #define OLCUC 0x00000002 | ||
114 | #define ONLCR 0x00000004 | ||
115 | #define OCRNL 0x00000008 | ||
116 | #define ONOCR 0x00000010 | ||
117 | #define ONLRET 0x00000020 | ||
118 | #define OFILL 0x00000040 | ||
119 | #define OFDEL 0x00000080 | ||
120 | #define NLDLY 0x00000100 | ||
121 | #define NL0 0x00000000 | ||
122 | #define NL1 0x00000100 | ||
123 | #define CRDLY 0x00000600 | ||
124 | #define CR0 0x00000000 | ||
125 | #define CR1 0x00000200 | ||
126 | #define CR2 0x00000400 | ||
127 | #define CR3 0x00000600 | ||
128 | #define TABDLY 0x00001800 | ||
129 | #define TAB0 0x00000000 | ||
130 | #define TAB1 0x00000800 | ||
131 | #define TAB2 0x00001000 | ||
132 | #define TAB3 0x00001800 | ||
133 | #define XTABS 0x00001800 | ||
134 | #define BSDLY 0x00002000 | ||
135 | #define BS0 0x00000000 | ||
136 | #define BS1 0x00002000 | ||
137 | #define VTDLY 0x00004000 | ||
138 | #define VT0 0x00000000 | ||
139 | #define VT1 0x00004000 | ||
140 | #define FFDLY 0x00008000 | ||
141 | #define FF0 0x00000000 | ||
142 | #define FF1 0x00008000 | ||
143 | #define PAGEOUT 0x00010000 /* SUNOS specific */ | ||
144 | #define WRAP 0x00020000 /* SUNOS specific */ | ||
145 | |||
146 | /* c_cflag bit meaning */ | ||
147 | #define CBAUD 0x0000100f | ||
148 | #define B0 0x00000000 /* hang up */ | ||
149 | #define B50 0x00000001 | ||
150 | #define B75 0x00000002 | ||
151 | #define B110 0x00000003 | ||
152 | #define B134 0x00000004 | ||
153 | #define B150 0x00000005 | ||
154 | #define B200 0x00000006 | ||
155 | #define B300 0x00000007 | ||
156 | #define B600 0x00000008 | ||
157 | #define B1200 0x00000009 | ||
158 | #define B1800 0x0000000a | ||
159 | #define B2400 0x0000000b | ||
160 | #define B4800 0x0000000c | ||
161 | #define B9600 0x0000000d | ||
162 | #define B19200 0x0000000e | ||
163 | #define B38400 0x0000000f | ||
164 | #define EXTA B19200 | ||
165 | #define EXTB B38400 | ||
166 | #define CSIZE 0x00000030 | ||
167 | #define CS5 0x00000000 | ||
168 | #define CS6 0x00000010 | ||
169 | #define CS7 0x00000020 | ||
170 | #define CS8 0x00000030 | ||
171 | #define CSTOPB 0x00000040 | ||
172 | #define CREAD 0x00000080 | ||
173 | #define PARENB 0x00000100 | ||
174 | #define PARODD 0x00000200 | ||
175 | #define HUPCL 0x00000400 | ||
176 | #define CLOCAL 0x00000800 | ||
177 | #define CBAUDEX 0x00001000 | ||
178 | /* We'll never see these speeds with the Zilogs, but for completeness... */ | ||
179 | #define BOTHER 0x00001000 | ||
180 | #define B57600 0x00001001 | ||
181 | #define B115200 0x00001002 | ||
182 | #define B230400 0x00001003 | ||
183 | #define B460800 0x00001004 | ||
184 | /* This is what we can do with the Zilogs. */ | ||
185 | #define B76800 0x00001005 | ||
186 | /* This is what we can do with the SAB82532. */ | ||
187 | #define B153600 0x00001006 | ||
188 | #define B307200 0x00001007 | ||
189 | #define B614400 0x00001008 | ||
190 | #define B921600 0x00001009 | ||
191 | /* And these are the rest... */ | ||
192 | #define B500000 0x0000100a | ||
193 | #define B576000 0x0000100b | ||
194 | #define B1000000 0x0000100c | ||
195 | #define B1152000 0x0000100d | ||
196 | #define B1500000 0x0000100e | ||
197 | #define B2000000 0x0000100f | ||
198 | /* These have totally bogus values and nobody uses them | ||
199 | so far. Later on we'd have to use say 0x10000x and | ||
200 | adjust CBAUD constant and drivers accordingly. | ||
201 | #define B2500000 0x00001010 | ||
202 | #define B3000000 0x00001011 | ||
203 | #define B3500000 0x00001012 | ||
204 | #define B4000000 0x00001013 */ | ||
205 | #define CIBAUD 0x100f0000 /* input baud rate (not used) */ | ||
206 | #define CMSPAR 0x40000000 /* mark or space (stick) parity */ | ||
207 | #define CRTSCTS 0x80000000 /* flow control */ | ||
208 | |||
209 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
210 | |||
211 | /* c_lflag bits */ | ||
212 | #define ISIG 0x00000001 | ||
213 | #define ICANON 0x00000002 | ||
214 | #define XCASE 0x00000004 | ||
215 | #define ECHO 0x00000008 | ||
216 | #define ECHOE 0x00000010 | ||
217 | #define ECHOK 0x00000020 | ||
218 | #define ECHONL 0x00000040 | ||
219 | #define NOFLSH 0x00000080 | ||
220 | #define TOSTOP 0x00000100 | ||
221 | #define ECHOCTL 0x00000200 | ||
222 | #define ECHOPRT 0x00000400 | ||
223 | #define ECHOKE 0x00000800 | ||
224 | #define DEFECHO 0x00001000 /* SUNOS thing, what is it? */ | ||
225 | #define FLUSHO 0x00002000 | ||
226 | #define PENDIN 0x00004000 | ||
227 | #define IEXTEN 0x00008000 | ||
228 | #define EXTPROC 0x00010000 | ||
229 | |||
230 | /* modem lines */ | ||
231 | #define TIOCM_LE 0x001 | ||
232 | #define TIOCM_DTR 0x002 | ||
233 | #define TIOCM_RTS 0x004 | ||
234 | #define TIOCM_ST 0x008 | ||
235 | #define TIOCM_SR 0x010 | ||
236 | #define TIOCM_CTS 0x020 | ||
237 | #define TIOCM_CAR 0x040 | ||
238 | #define TIOCM_RNG 0x080 | ||
239 | #define TIOCM_DSR 0x100 | ||
240 | #define TIOCM_CD TIOCM_CAR | ||
241 | #define TIOCM_RI TIOCM_RNG | ||
242 | #define TIOCM_OUT1 0x2000 | ||
243 | #define TIOCM_OUT2 0x4000 | ||
244 | #define TIOCM_LOOP 0x8000 | ||
245 | |||
246 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
247 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
248 | |||
249 | |||
250 | /* tcflow() and TCXONC use these */ | ||
251 | #define TCOOFF 0 | ||
252 | #define TCOON 1 | ||
253 | #define TCIOFF 2 | ||
254 | #define TCION 3 | ||
255 | |||
256 | /* tcflush() and TCFLSH use these */ | ||
257 | #define TCIFLUSH 0 | ||
258 | #define TCOFLUSH 1 | ||
259 | #define TCIOFLUSH 2 | ||
260 | |||
261 | /* tcsetattr uses these */ | ||
262 | #define TCSANOW 0 | ||
263 | #define TCSADRAIN 1 | ||
264 | #define TCSAFLUSH 2 | ||
265 | |||
266 | #endif /* !(_SPARC_TERMBITS_H) */ | 8 | #endif /* !(_SPARC_TERMBITS_H) */ |
diff --git a/arch/sparc/include/asm/termios.h b/arch/sparc/include/asm/termios.h index e2f46705a210..0c2414ddd52c 100644 --- a/arch/sparc/include/asm/termios.h +++ b/arch/sparc/include/asm/termios.h | |||
@@ -1,45 +1,8 @@ | |||
1 | #ifndef _SPARC_TERMIOS_H | 1 | #ifndef _SPARC_TERMIOS_H |
2 | #define _SPARC_TERMIOS_H | 2 | #define _SPARC_TERMIOS_H |
3 | 3 | ||
4 | #include <asm/ioctls.h> | 4 | #include <uapi/asm/termios.h> |
5 | #include <asm/termbits.h> | ||
6 | 5 | ||
7 | #if defined(__KERNEL__) || defined(__DEFINE_BSD_TERMIOS) | ||
8 | struct sgttyb { | ||
9 | char sg_ispeed; | ||
10 | char sg_ospeed; | ||
11 | char sg_erase; | ||
12 | char sg_kill; | ||
13 | short sg_flags; | ||
14 | }; | ||
15 | |||
16 | struct tchars { | ||
17 | char t_intrc; | ||
18 | char t_quitc; | ||
19 | char t_startc; | ||
20 | char t_stopc; | ||
21 | char t_eofc; | ||
22 | char t_brkc; | ||
23 | }; | ||
24 | |||
25 | struct ltchars { | ||
26 | char t_suspc; | ||
27 | char t_dsuspc; | ||
28 | char t_rprntc; | ||
29 | char t_flushc; | ||
30 | char t_werasc; | ||
31 | char t_lnextc; | ||
32 | }; | ||
33 | #endif /* __KERNEL__ */ | ||
34 | |||
35 | struct winsize { | ||
36 | unsigned short ws_row; | ||
37 | unsigned short ws_col; | ||
38 | unsigned short ws_xpixel; | ||
39 | unsigned short ws_ypixel; | ||
40 | }; | ||
41 | |||
42 | #ifdef __KERNEL__ | ||
43 | 6 | ||
44 | /* | 7 | /* |
45 | * c_cc characters in the termio structure. Oh, how I love being | 8 | * c_cc characters in the termio structure. Oh, how I love being |
@@ -180,6 +143,4 @@ struct winsize { | |||
180 | err; \ | 143 | err; \ |
181 | }) | 144 | }) |
182 | 145 | ||
183 | #endif /* __KERNEL__ */ | ||
184 | |||
185 | #endif /* _SPARC_TERMIOS_H */ | 146 | #endif /* _SPARC_TERMIOS_H */ |
diff --git a/arch/sparc/include/asm/traps.h b/arch/sparc/include/asm/traps.h index 3aa62dde343f..51abcb1f9b3b 100644 --- a/arch/sparc/include/asm/traps.h +++ b/arch/sparc/include/asm/traps.h | |||
@@ -3,14 +3,12 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) |
5 | */ | 5 | */ |
6 | |||
7 | #ifndef _SPARC_TRAPS_H | 6 | #ifndef _SPARC_TRAPS_H |
8 | #define _SPARC_TRAPS_H | 7 | #define _SPARC_TRAPS_H |
9 | 8 | ||
10 | #define NUM_SPARC_TRAPS 255 | 9 | #include <uapi/asm/traps.h> |
11 | 10 | ||
12 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
13 | #ifdef __KERNEL__ | ||
14 | /* This is for V8 compliant Sparc CPUS */ | 12 | /* This is for V8 compliant Sparc CPUS */ |
15 | struct tt_entry { | 13 | struct tt_entry { |
16 | unsigned long inst_one; | 14 | unsigned long inst_one; |
@@ -22,112 +20,5 @@ struct tt_entry { | |||
22 | /* We set this to _start in system setup. */ | 20 | /* We set this to _start in system setup. */ |
23 | extern struct tt_entry *sparc_ttable; | 21 | extern struct tt_entry *sparc_ttable; |
24 | 22 | ||
25 | #endif /* (__KERNEL__) */ | ||
26 | #endif /* !(__ASSEMBLY__) */ | 23 | #endif /* !(__ASSEMBLY__) */ |
27 | |||
28 | /* For patching the trap table at boot time, we need to know how to | ||
29 | * form various common Sparc instructions. Thus these macros... | ||
30 | */ | ||
31 | |||
32 | #define SPARC_MOV_CONST_L3(const) (0xa6102000 | (const&0xfff)) | ||
33 | |||
34 | /* The following assumes that the branch lies before the place we | ||
35 | * are branching to. This is the case for a trap vector... | ||
36 | * You have been warned. | ||
37 | */ | ||
38 | #define SPARC_BRANCH(dest_addr, inst_addr) \ | ||
39 | (0x10800000 | (((dest_addr-inst_addr)>>2)&0x3fffff)) | ||
40 | |||
41 | #define SPARC_RD_PSR_L0 (0xa1480000) | ||
42 | #define SPARC_RD_WIM_L3 (0xa7500000) | ||
43 | #define SPARC_NOP (0x01000000) | ||
44 | |||
45 | /* Various interesting trap levels. */ | ||
46 | /* First, hardware traps. */ | ||
47 | #define SP_TRAP_TFLT 0x1 /* Text fault */ | ||
48 | #define SP_TRAP_II 0x2 /* Illegal Instruction */ | ||
49 | #define SP_TRAP_PI 0x3 /* Privileged Instruction */ | ||
50 | #define SP_TRAP_FPD 0x4 /* Floating Point Disabled */ | ||
51 | #define SP_TRAP_WOVF 0x5 /* Window Overflow */ | ||
52 | #define SP_TRAP_WUNF 0x6 /* Window Underflow */ | ||
53 | #define SP_TRAP_MNA 0x7 /* Memory Address Unaligned */ | ||
54 | #define SP_TRAP_FPE 0x8 /* Floating Point Exception */ | ||
55 | #define SP_TRAP_DFLT 0x9 /* Data Fault */ | ||
56 | #define SP_TRAP_TOF 0xa /* Tag Overflow */ | ||
57 | #define SP_TRAP_WDOG 0xb /* Watchpoint Detected */ | ||
58 | #define SP_TRAP_IRQ1 0x11 /* IRQ level 1 */ | ||
59 | #define SP_TRAP_IRQ2 0x12 /* IRQ level 2 */ | ||
60 | #define SP_TRAP_IRQ3 0x13 /* IRQ level 3 */ | ||
61 | #define SP_TRAP_IRQ4 0x14 /* IRQ level 4 */ | ||
62 | #define SP_TRAP_IRQ5 0x15 /* IRQ level 5 */ | ||
63 | #define SP_TRAP_IRQ6 0x16 /* IRQ level 6 */ | ||
64 | #define SP_TRAP_IRQ7 0x17 /* IRQ level 7 */ | ||
65 | #define SP_TRAP_IRQ8 0x18 /* IRQ level 8 */ | ||
66 | #define SP_TRAP_IRQ9 0x19 /* IRQ level 9 */ | ||
67 | #define SP_TRAP_IRQ10 0x1a /* IRQ level 10 */ | ||
68 | #define SP_TRAP_IRQ11 0x1b /* IRQ level 11 */ | ||
69 | #define SP_TRAP_IRQ12 0x1c /* IRQ level 12 */ | ||
70 | #define SP_TRAP_IRQ13 0x1d /* IRQ level 13 */ | ||
71 | #define SP_TRAP_IRQ14 0x1e /* IRQ level 14 */ | ||
72 | #define SP_TRAP_IRQ15 0x1f /* IRQ level 15 Non-maskable */ | ||
73 | #define SP_TRAP_RACC 0x20 /* Register Access Error ??? */ | ||
74 | #define SP_TRAP_IACC 0x21 /* Instruction Access Error */ | ||
75 | #define SP_TRAP_CPDIS 0x24 /* Co-Processor Disabled */ | ||
76 | #define SP_TRAP_BADFL 0x25 /* Unimplemented Flush Instruction */ | ||
77 | #define SP_TRAP_CPEXP 0x28 /* Co-Processor Exception */ | ||
78 | #define SP_TRAP_DACC 0x29 /* Data Access Error */ | ||
79 | #define SP_TRAP_DIVZ 0x2a /* Divide By Zero */ | ||
80 | #define SP_TRAP_DSTORE 0x2b /* Data Store Error ??? */ | ||
81 | #define SP_TRAP_DMM 0x2c /* Data Access MMU Miss ??? */ | ||
82 | #define SP_TRAP_IMM 0x3c /* Instruction Access MMU Miss ??? */ | ||
83 | |||
84 | /* Now the Software Traps... */ | ||
85 | #define SP_TRAP_SUNOS 0x80 /* SunOS System Call */ | ||
86 | #define SP_TRAP_SBPT 0x81 /* Software Breakpoint */ | ||
87 | #define SP_TRAP_SDIVZ 0x82 /* Software Divide-by-Zero trap */ | ||
88 | #define SP_TRAP_FWIN 0x83 /* Flush Windows */ | ||
89 | #define SP_TRAP_CWIN 0x84 /* Clean Windows */ | ||
90 | #define SP_TRAP_RCHK 0x85 /* Range Check */ | ||
91 | #define SP_TRAP_FUNA 0x86 /* Fix Unaligned Access */ | ||
92 | #define SP_TRAP_IOWFL 0x87 /* Integer Overflow */ | ||
93 | #define SP_TRAP_SOLARIS 0x88 /* Solaris System Call */ | ||
94 | #define SP_TRAP_NETBSD 0x89 /* NetBSD System Call */ | ||
95 | #define SP_TRAP_LINUX 0x90 /* Linux System Call */ | ||
96 | |||
97 | /* Names used for compatibility with SunOS */ | ||
98 | #define ST_SYSCALL 0x00 | ||
99 | #define ST_BREAKPOINT 0x01 | ||
100 | #define ST_DIV0 0x02 | ||
101 | #define ST_FLUSH_WINDOWS 0x03 | ||
102 | #define ST_CLEAN_WINDOWS 0x04 | ||
103 | #define ST_RANGE_CHECK 0x05 | ||
104 | #define ST_FIX_ALIGN 0x06 | ||
105 | #define ST_INT_OVERFLOW 0x07 | ||
106 | |||
107 | /* Special traps... */ | ||
108 | #define SP_TRAP_KBPT1 0xfe /* KADB/PROM Breakpoint one */ | ||
109 | #define SP_TRAP_KBPT2 0xff /* KADB/PROM Breakpoint two */ | ||
110 | |||
111 | /* Handy Macros */ | ||
112 | /* Is this a trap we never expect to get? */ | ||
113 | #define BAD_TRAP_P(level) \ | ||
114 | ((level > SP_TRAP_WDOG && level < SP_TRAP_IRQ1) || \ | ||
115 | (level > SP_TRAP_IACC && level < SP_TRAP_CPDIS) || \ | ||
116 | (level > SP_TRAP_BADFL && level < SP_TRAP_CPEXP) || \ | ||
117 | (level > SP_TRAP_DMM && level < SP_TRAP_IMM) || \ | ||
118 | (level > SP_TRAP_IMM && level < SP_TRAP_SUNOS) || \ | ||
119 | (level > SP_TRAP_LINUX && level < SP_TRAP_KBPT1)) | ||
120 | |||
121 | /* Is this a Hardware trap? */ | ||
122 | #define HW_TRAP_P(level) ((level > 0) && (level < SP_TRAP_SUNOS)) | ||
123 | |||
124 | /* Is this a Software trap? */ | ||
125 | #define SW_TRAP_P(level) ((level >= SP_TRAP_SUNOS) && (level <= SP_TRAP_KBPT2)) | ||
126 | |||
127 | /* Is this a system call for some OS we know about? */ | ||
128 | #define SCALL_TRAP_P(level) ((level == SP_TRAP_SUNOS) || \ | ||
129 | (level == SP_TRAP_SOLARIS) || \ | ||
130 | (level == SP_TRAP_NETBSD) || \ | ||
131 | (level == SP_TRAP_LINUX)) | ||
132 | |||
133 | #endif /* !(_SPARC_TRAPS_H) */ | 24 | #endif /* !(_SPARC_TRAPS_H) */ |
diff --git a/arch/sparc/include/asm/unistd.h b/arch/sparc/include/asm/unistd.h index d9a677c51926..0ecea6ed943e 100644 --- a/arch/sparc/include/asm/unistd.h +++ b/arch/sparc/include/asm/unistd.h | |||
@@ -1,6 +1,3 @@ | |||
1 | #ifndef _SPARC_UNISTD_H | ||
2 | #define _SPARC_UNISTD_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * System calls under the Sparc. | 2 | * System calls under the Sparc. |
6 | * | 3 | * |
@@ -14,415 +11,15 @@ | |||
14 | * | 11 | * |
15 | * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) | 12 | * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) |
16 | */ | 13 | */ |
17 | #ifndef __32bit_syscall_numbers__ | 14 | #ifndef _SPARC_UNISTD_H |
18 | #ifndef __arch64__ | 15 | #define _SPARC_UNISTD_H |
19 | #define __32bit_syscall_numbers__ | 16 | |
20 | #endif | 17 | #include <uapi/asm/unistd.h> |
21 | #endif | ||
22 | 18 | ||
23 | #define __NR_restart_syscall 0 /* Linux Specific */ | ||
24 | #define __NR_exit 1 /* Common */ | ||
25 | #define __NR_fork 2 /* Common */ | ||
26 | #define __NR_read 3 /* Common */ | ||
27 | #define __NR_write 4 /* Common */ | ||
28 | #define __NR_open 5 /* Common */ | ||
29 | #define __NR_close 6 /* Common */ | ||
30 | #define __NR_wait4 7 /* Common */ | ||
31 | #define __NR_creat 8 /* Common */ | ||
32 | #define __NR_link 9 /* Common */ | ||
33 | #define __NR_unlink 10 /* Common */ | ||
34 | #define __NR_execv 11 /* SunOS Specific */ | ||
35 | #define __NR_chdir 12 /* Common */ | ||
36 | #define __NR_chown 13 /* Common */ | ||
37 | #define __NR_mknod 14 /* Common */ | ||
38 | #define __NR_chmod 15 /* Common */ | ||
39 | #define __NR_lchown 16 /* Common */ | ||
40 | #define __NR_brk 17 /* Common */ | ||
41 | #define __NR_perfctr 18 /* Performance counter operations */ | ||
42 | #define __NR_lseek 19 /* Common */ | ||
43 | #define __NR_getpid 20 /* Common */ | ||
44 | #define __NR_capget 21 /* Linux Specific */ | ||
45 | #define __NR_capset 22 /* Linux Specific */ | ||
46 | #define __NR_setuid 23 /* Implemented via setreuid in SunOS */ | ||
47 | #define __NR_getuid 24 /* Common */ | ||
48 | #define __NR_vmsplice 25 /* ENOSYS under SunOS */ | ||
49 | #define __NR_ptrace 26 /* Common */ | ||
50 | #define __NR_alarm 27 /* Implemented via setitimer in SunOS */ | ||
51 | #define __NR_sigaltstack 28 /* Common */ | ||
52 | #define __NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */ | ||
53 | #define __NR_utime 30 /* Implemented via utimes() under SunOS */ | ||
54 | #ifdef __32bit_syscall_numbers__ | ||
55 | #define __NR_lchown32 31 /* Linux sparc32 specific */ | ||
56 | #define __NR_fchown32 32 /* Linux sparc32 specific */ | ||
57 | #endif | ||
58 | #define __NR_access 33 /* Common */ | ||
59 | #define __NR_nice 34 /* Implemented via get/setpriority() in SunOS */ | ||
60 | #ifdef __32bit_syscall_numbers__ | ||
61 | #define __NR_chown32 35 /* Linux sparc32 specific */ | ||
62 | #endif | ||
63 | #define __NR_sync 36 /* Common */ | ||
64 | #define __NR_kill 37 /* Common */ | ||
65 | #define __NR_stat 38 /* Common */ | ||
66 | #define __NR_sendfile 39 /* Linux Specific */ | ||
67 | #define __NR_lstat 40 /* Common */ | ||
68 | #define __NR_dup 41 /* Common */ | ||
69 | #define __NR_pipe 42 /* Common */ | ||
70 | #define __NR_times 43 /* Implemented via getrusage() in SunOS */ | ||
71 | #ifdef __32bit_syscall_numbers__ | ||
72 | #define __NR_getuid32 44 /* Linux sparc32 specific */ | ||
73 | #endif | ||
74 | #define __NR_umount2 45 /* Linux Specific */ | ||
75 | #define __NR_setgid 46 /* Implemented via setregid() in SunOS */ | ||
76 | #define __NR_getgid 47 /* Common */ | ||
77 | #define __NR_signal 48 /* Implemented via sigvec() in SunOS */ | ||
78 | #define __NR_geteuid 49 /* SunOS calls getuid() */ | ||
79 | #define __NR_getegid 50 /* SunOS calls getgid() */ | ||
80 | #define __NR_acct 51 /* Common */ | ||
81 | #ifdef __32bit_syscall_numbers__ | ||
82 | #define __NR_getgid32 53 /* Linux sparc32 specific */ | ||
83 | #else | ||
84 | #define __NR_memory_ordering 52 /* Linux Specific */ | ||
85 | #endif | ||
86 | #define __NR_ioctl 54 /* Common */ | ||
87 | #define __NR_reboot 55 /* Common */ | ||
88 | #ifdef __32bit_syscall_numbers__ | ||
89 | #define __NR_mmap2 56 /* Linux sparc32 Specific */ | ||
90 | #endif | ||
91 | #define __NR_symlink 57 /* Common */ | ||
92 | #define __NR_readlink 58 /* Common */ | ||
93 | #define __NR_execve 59 /* Common */ | ||
94 | #define __NR_umask 60 /* Common */ | ||
95 | #define __NR_chroot 61 /* Common */ | ||
96 | #define __NR_fstat 62 /* Common */ | ||
97 | #define __NR_fstat64 63 /* Linux Specific */ | ||
98 | #define __NR_getpagesize 64 /* Common */ | ||
99 | #define __NR_msync 65 /* Common in newer 1.3.x revs... */ | ||
100 | #define __NR_vfork 66 /* Common */ | ||
101 | #define __NR_pread64 67 /* Linux Specific */ | ||
102 | #define __NR_pwrite64 68 /* Linux Specific */ | ||
103 | #ifdef __32bit_syscall_numbers__ | ||
104 | #define __NR_geteuid32 69 /* Linux sparc32, sbrk under SunOS */ | ||
105 | #define __NR_getegid32 70 /* Linux sparc32, sstk under SunOS */ | ||
106 | #endif | ||
107 | #define __NR_mmap 71 /* Common */ | ||
108 | #ifdef __32bit_syscall_numbers__ | ||
109 | #define __NR_setreuid32 72 /* Linux sparc32, vadvise under SunOS */ | ||
110 | #endif | ||
111 | #define __NR_munmap 73 /* Common */ | ||
112 | #define __NR_mprotect 74 /* Common */ | ||
113 | #define __NR_madvise 75 /* Common */ | ||
114 | #define __NR_vhangup 76 /* Common */ | ||
115 | #ifdef __32bit_syscall_numbers__ | ||
116 | #define __NR_truncate64 77 /* Linux sparc32 Specific */ | ||
117 | #endif | ||
118 | #define __NR_mincore 78 /* Common */ | ||
119 | #define __NR_getgroups 79 /* Common */ | ||
120 | #define __NR_setgroups 80 /* Common */ | ||
121 | #define __NR_getpgrp 81 /* Common */ | ||
122 | #ifdef __32bit_syscall_numbers__ | ||
123 | #define __NR_setgroups32 82 /* Linux sparc32, setpgrp under SunOS */ | ||
124 | #endif | ||
125 | #define __NR_setitimer 83 /* Common */ | ||
126 | #ifdef __32bit_syscall_numbers__ | ||
127 | #define __NR_ftruncate64 84 /* Linux sparc32 Specific */ | ||
128 | #endif | ||
129 | #define __NR_swapon 85 /* Common */ | ||
130 | #define __NR_getitimer 86 /* Common */ | ||
131 | #ifdef __32bit_syscall_numbers__ | ||
132 | #define __NR_setuid32 87 /* Linux sparc32, gethostname under SunOS */ | ||
133 | #endif | ||
134 | #define __NR_sethostname 88 /* Common */ | ||
135 | #ifdef __32bit_syscall_numbers__ | ||
136 | #define __NR_setgid32 89 /* Linux sparc32, getdtablesize under SunOS */ | ||
137 | #endif | ||
138 | #define __NR_dup2 90 /* Common */ | ||
139 | #ifdef __32bit_syscall_numbers__ | ||
140 | #define __NR_setfsuid32 91 /* Linux sparc32, getdopt under SunOS */ | ||
141 | #endif | ||
142 | #define __NR_fcntl 92 /* Common */ | ||
143 | #define __NR_select 93 /* Common */ | ||
144 | #ifdef __32bit_syscall_numbers__ | ||
145 | #define __NR_setfsgid32 94 /* Linux sparc32, setdopt under SunOS */ | ||
146 | #endif | ||
147 | #define __NR_fsync 95 /* Common */ | ||
148 | #define __NR_setpriority 96 /* Common */ | ||
149 | #define __NR_socket 97 /* Common */ | ||
150 | #define __NR_connect 98 /* Common */ | ||
151 | #define __NR_accept 99 /* Common */ | ||
152 | #define __NR_getpriority 100 /* Common */ | ||
153 | #define __NR_rt_sigreturn 101 /* Linux Specific */ | ||
154 | #define __NR_rt_sigaction 102 /* Linux Specific */ | ||
155 | #define __NR_rt_sigprocmask 103 /* Linux Specific */ | ||
156 | #define __NR_rt_sigpending 104 /* Linux Specific */ | ||
157 | #define __NR_rt_sigtimedwait 105 /* Linux Specific */ | ||
158 | #define __NR_rt_sigqueueinfo 106 /* Linux Specific */ | ||
159 | #define __NR_rt_sigsuspend 107 /* Linux Specific */ | ||
160 | #ifdef __32bit_syscall_numbers__ | ||
161 | #define __NR_setresuid32 108 /* Linux Specific, sigvec under SunOS */ | ||
162 | #define __NR_getresuid32 109 /* Linux Specific, sigblock under SunOS */ | ||
163 | #define __NR_setresgid32 110 /* Linux Specific, sigsetmask under SunOS */ | ||
164 | #define __NR_getresgid32 111 /* Linux Specific, sigpause under SunOS */ | ||
165 | #define __NR_setregid32 112 /* Linux sparc32, sigstack under SunOS */ | ||
166 | #else | ||
167 | #define __NR_setresuid 108 /* Linux Specific, sigvec under SunOS */ | ||
168 | #define __NR_getresuid 109 /* Linux Specific, sigblock under SunOS */ | ||
169 | #define __NR_setresgid 110 /* Linux Specific, sigsetmask under SunOS */ | ||
170 | #define __NR_getresgid 111 /* Linux Specific, sigpause under SunOS */ | ||
171 | #endif | ||
172 | #define __NR_recvmsg 113 /* Common */ | ||
173 | #define __NR_sendmsg 114 /* Common */ | ||
174 | #ifdef __32bit_syscall_numbers__ | ||
175 | #define __NR_getgroups32 115 /* Linux sparc32, vtrace under SunOS */ | ||
176 | #endif | ||
177 | #define __NR_gettimeofday 116 /* Common */ | ||
178 | #define __NR_getrusage 117 /* Common */ | ||
179 | #define __NR_getsockopt 118 /* Common */ | ||
180 | #define __NR_getcwd 119 /* Linux Specific */ | ||
181 | #define __NR_readv 120 /* Common */ | ||
182 | #define __NR_writev 121 /* Common */ | ||
183 | #define __NR_settimeofday 122 /* Common */ | ||
184 | #define __NR_fchown 123 /* Common */ | ||
185 | #define __NR_fchmod 124 /* Common */ | ||
186 | #define __NR_recvfrom 125 /* Common */ | ||
187 | #define __NR_setreuid 126 /* Common */ | ||
188 | #define __NR_setregid 127 /* Common */ | ||
189 | #define __NR_rename 128 /* Common */ | ||
190 | #define __NR_truncate 129 /* Common */ | ||
191 | #define __NR_ftruncate 130 /* Common */ | ||
192 | #define __NR_flock 131 /* Common */ | ||
193 | #define __NR_lstat64 132 /* Linux Specific */ | ||
194 | #define __NR_sendto 133 /* Common */ | ||
195 | #define __NR_shutdown 134 /* Common */ | ||
196 | #define __NR_socketpair 135 /* Common */ | ||
197 | #define __NR_mkdir 136 /* Common */ | ||
198 | #define __NR_rmdir 137 /* Common */ | ||
199 | #define __NR_utimes 138 /* SunOS Specific */ | ||
200 | #define __NR_stat64 139 /* Linux Specific */ | ||
201 | #define __NR_sendfile64 140 /* adjtime under SunOS */ | ||
202 | #define __NR_getpeername 141 /* Common */ | ||
203 | #define __NR_futex 142 /* gethostid under SunOS */ | ||
204 | #define __NR_gettid 143 /* ENOSYS under SunOS */ | ||
205 | #define __NR_getrlimit 144 /* Common */ | ||
206 | #define __NR_setrlimit 145 /* Common */ | ||
207 | #define __NR_pivot_root 146 /* Linux Specific, killpg under SunOS */ | ||
208 | #define __NR_prctl 147 /* ENOSYS under SunOS */ | ||
209 | #define __NR_pciconfig_read 148 /* ENOSYS under SunOS */ | ||
210 | #define __NR_pciconfig_write 149 /* ENOSYS under SunOS */ | ||
211 | #define __NR_getsockname 150 /* Common */ | ||
212 | #define __NR_inotify_init 151 /* Linux specific */ | ||
213 | #define __NR_inotify_add_watch 152 /* Linux specific */ | ||
214 | #define __NR_poll 153 /* Common */ | ||
215 | #define __NR_getdents64 154 /* Linux specific */ | ||
216 | #ifdef __32bit_syscall_numbers__ | ||
217 | #define __NR_fcntl64 155 /* Linux sparc32 Specific */ | ||
218 | #endif | ||
219 | #define __NR_inotify_rm_watch 156 /* Linux specific */ | ||
220 | #define __NR_statfs 157 /* Common */ | ||
221 | #define __NR_fstatfs 158 /* Common */ | ||
222 | #define __NR_umount 159 /* Common */ | ||
223 | #define __NR_sched_set_affinity 160 /* Linux specific, async_daemon under SunOS */ | ||
224 | #define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ | ||
225 | #define __NR_getdomainname 162 /* SunOS Specific */ | ||
226 | #define __NR_setdomainname 163 /* Common */ | ||
227 | #ifndef __32bit_syscall_numbers__ | ||
228 | #define __NR_utrap_install 164 /* SYSV ABI/v9 required */ | ||
229 | #endif | ||
230 | #define __NR_quotactl 165 /* Common */ | ||
231 | #define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ | ||
232 | #define __NR_mount 167 /* Common */ | ||
233 | #define __NR_ustat 168 /* Common */ | ||
234 | #define __NR_setxattr 169 /* SunOS: semsys */ | ||
235 | #define __NR_lsetxattr 170 /* SunOS: msgsys */ | ||
236 | #define __NR_fsetxattr 171 /* SunOS: shmsys */ | ||
237 | #define __NR_getxattr 172 /* SunOS: auditsys */ | ||
238 | #define __NR_lgetxattr 173 /* SunOS: rfssys */ | ||
239 | #define __NR_getdents 174 /* Common */ | ||
240 | #define __NR_setsid 175 /* Common */ | ||
241 | #define __NR_fchdir 176 /* Common */ | ||
242 | #define __NR_fgetxattr 177 /* SunOS: fchroot */ | ||
243 | #define __NR_listxattr 178 /* SunOS: vpixsys */ | ||
244 | #define __NR_llistxattr 179 /* SunOS: aioread */ | ||
245 | #define __NR_flistxattr 180 /* SunOS: aiowrite */ | ||
246 | #define __NR_removexattr 181 /* SunOS: aiowait */ | ||
247 | #define __NR_lremovexattr 182 /* SunOS: aiocancel */ | ||
248 | #define __NR_sigpending 183 /* Common */ | ||
249 | #define __NR_query_module 184 /* Linux Specific */ | ||
250 | #define __NR_setpgid 185 /* Common */ | ||
251 | #define __NR_fremovexattr 186 /* SunOS: pathconf */ | ||
252 | #define __NR_tkill 187 /* SunOS: fpathconf */ | ||
253 | #define __NR_exit_group 188 /* Linux specific, sysconf undef SunOS */ | ||
254 | #define __NR_uname 189 /* Linux Specific */ | ||
255 | #define __NR_init_module 190 /* Linux Specific */ | ||
256 | #define __NR_personality 191 /* Linux Specific */ | ||
257 | #define __NR_remap_file_pages 192 /* Linux Specific */ | ||
258 | #define __NR_epoll_create 193 /* Linux Specific */ | ||
259 | #define __NR_epoll_ctl 194 /* Linux Specific */ | ||
260 | #define __NR_epoll_wait 195 /* Linux Specific */ | ||
261 | #define __NR_ioprio_set 196 /* Linux Specific */ | ||
262 | #define __NR_getppid 197 /* Linux Specific */ | ||
263 | #define __NR_sigaction 198 /* Linux Specific */ | ||
264 | #define __NR_sgetmask 199 /* Linux Specific */ | ||
265 | #define __NR_ssetmask 200 /* Linux Specific */ | ||
266 | #define __NR_sigsuspend 201 /* Linux Specific */ | ||
267 | #define __NR_oldlstat 202 /* Linux Specific */ | ||
268 | #define __NR_uselib 203 /* Linux Specific */ | ||
269 | #define __NR_readdir 204 /* Linux Specific */ | ||
270 | #define __NR_readahead 205 /* Linux Specific */ | ||
271 | #define __NR_socketcall 206 /* Linux Specific */ | ||
272 | #define __NR_syslog 207 /* Linux Specific */ | ||
273 | #define __NR_lookup_dcookie 208 /* Linux Specific */ | ||
274 | #define __NR_fadvise64 209 /* Linux Specific */ | ||
275 | #define __NR_fadvise64_64 210 /* Linux Specific */ | ||
276 | #define __NR_tgkill 211 /* Linux Specific */ | ||
277 | #define __NR_waitpid 212 /* Linux Specific */ | ||
278 | #define __NR_swapoff 213 /* Linux Specific */ | ||
279 | #define __NR_sysinfo 214 /* Linux Specific */ | ||
280 | #define __NR_ipc 215 /* Linux Specific */ | ||
281 | #define __NR_sigreturn 216 /* Linux Specific */ | ||
282 | #define __NR_clone 217 /* Linux Specific */ | ||
283 | #define __NR_ioprio_get 218 /* Linux Specific */ | ||
284 | #define __NR_adjtimex 219 /* Linux Specific */ | ||
285 | #define __NR_sigprocmask 220 /* Linux Specific */ | ||
286 | #define __NR_create_module 221 /* Linux Specific */ | ||
287 | #define __NR_delete_module 222 /* Linux Specific */ | ||
288 | #define __NR_get_kernel_syms 223 /* Linux Specific */ | ||
289 | #define __NR_getpgid 224 /* Linux Specific */ | ||
290 | #define __NR_bdflush 225 /* Linux Specific */ | ||
291 | #define __NR_sysfs 226 /* Linux Specific */ | ||
292 | #define __NR_afs_syscall 227 /* Linux Specific */ | ||
293 | #define __NR_setfsuid 228 /* Linux Specific */ | ||
294 | #define __NR_setfsgid 229 /* Linux Specific */ | ||
295 | #define __NR__newselect 230 /* Linux Specific */ | ||
296 | #ifdef __32bit_syscall_numbers__ | 19 | #ifdef __32bit_syscall_numbers__ |
297 | #define __NR_time 231 /* Linux Specific */ | ||
298 | #else | 20 | #else |
299 | #ifdef __KERNEL__ | ||
300 | #define __NR_time 231 /* Linux sparc32 */ | 21 | #define __NR_time 231 /* Linux sparc32 */ |
301 | #endif | 22 | #endif |
302 | #endif | ||
303 | #define __NR_splice 232 /* Linux Specific */ | ||
304 | #define __NR_stime 233 /* Linux Specific */ | ||
305 | #define __NR_statfs64 234 /* Linux Specific */ | ||
306 | #define __NR_fstatfs64 235 /* Linux Specific */ | ||
307 | #define __NR__llseek 236 /* Linux Specific */ | ||
308 | #define __NR_mlock 237 | ||
309 | #define __NR_munlock 238 | ||
310 | #define __NR_mlockall 239 | ||
311 | #define __NR_munlockall 240 | ||
312 | #define __NR_sched_setparam 241 | ||
313 | #define __NR_sched_getparam 242 | ||
314 | #define __NR_sched_setscheduler 243 | ||
315 | #define __NR_sched_getscheduler 244 | ||
316 | #define __NR_sched_yield 245 | ||
317 | #define __NR_sched_get_priority_max 246 | ||
318 | #define __NR_sched_get_priority_min 247 | ||
319 | #define __NR_sched_rr_get_interval 248 | ||
320 | #define __NR_nanosleep 249 | ||
321 | #define __NR_mremap 250 | ||
322 | #define __NR__sysctl 251 | ||
323 | #define __NR_getsid 252 | ||
324 | #define __NR_fdatasync 253 | ||
325 | #define __NR_nfsservctl 254 | ||
326 | #define __NR_sync_file_range 255 | ||
327 | #define __NR_clock_settime 256 | ||
328 | #define __NR_clock_gettime 257 | ||
329 | #define __NR_clock_getres 258 | ||
330 | #define __NR_clock_nanosleep 259 | ||
331 | #define __NR_sched_getaffinity 260 | ||
332 | #define __NR_sched_setaffinity 261 | ||
333 | #define __NR_timer_settime 262 | ||
334 | #define __NR_timer_gettime 263 | ||
335 | #define __NR_timer_getoverrun 264 | ||
336 | #define __NR_timer_delete 265 | ||
337 | #define __NR_timer_create 266 | ||
338 | /* #define __NR_vserver 267 Reserved for VSERVER */ | ||
339 | #define __NR_io_setup 268 | ||
340 | #define __NR_io_destroy 269 | ||
341 | #define __NR_io_submit 270 | ||
342 | #define __NR_io_cancel 271 | ||
343 | #define __NR_io_getevents 272 | ||
344 | #define __NR_mq_open 273 | ||
345 | #define __NR_mq_unlink 274 | ||
346 | #define __NR_mq_timedsend 275 | ||
347 | #define __NR_mq_timedreceive 276 | ||
348 | #define __NR_mq_notify 277 | ||
349 | #define __NR_mq_getsetattr 278 | ||
350 | #define __NR_waitid 279 | ||
351 | #define __NR_tee 280 | ||
352 | #define __NR_add_key 281 | ||
353 | #define __NR_request_key 282 | ||
354 | #define __NR_keyctl 283 | ||
355 | #define __NR_openat 284 | ||
356 | #define __NR_mkdirat 285 | ||
357 | #define __NR_mknodat 286 | ||
358 | #define __NR_fchownat 287 | ||
359 | #define __NR_futimesat 288 | ||
360 | #define __NR_fstatat64 289 | ||
361 | #define __NR_unlinkat 290 | ||
362 | #define __NR_renameat 291 | ||
363 | #define __NR_linkat 292 | ||
364 | #define __NR_symlinkat 293 | ||
365 | #define __NR_readlinkat 294 | ||
366 | #define __NR_fchmodat 295 | ||
367 | #define __NR_faccessat 296 | ||
368 | #define __NR_pselect6 297 | ||
369 | #define __NR_ppoll 298 | ||
370 | #define __NR_unshare 299 | ||
371 | #define __NR_set_robust_list 300 | ||
372 | #define __NR_get_robust_list 301 | ||
373 | #define __NR_migrate_pages 302 | ||
374 | #define __NR_mbind 303 | ||
375 | #define __NR_get_mempolicy 304 | ||
376 | #define __NR_set_mempolicy 305 | ||
377 | #define __NR_kexec_load 306 | ||
378 | #define __NR_move_pages 307 | ||
379 | #define __NR_getcpu 308 | ||
380 | #define __NR_epoll_pwait 309 | ||
381 | #define __NR_utimensat 310 | ||
382 | #define __NR_signalfd 311 | ||
383 | #define __NR_timerfd_create 312 | ||
384 | #define __NR_eventfd 313 | ||
385 | #define __NR_fallocate 314 | ||
386 | #define __NR_timerfd_settime 315 | ||
387 | #define __NR_timerfd_gettime 316 | ||
388 | #define __NR_signalfd4 317 | ||
389 | #define __NR_eventfd2 318 | ||
390 | #define __NR_epoll_create1 319 | ||
391 | #define __NR_dup3 320 | ||
392 | #define __NR_pipe2 321 | ||
393 | #define __NR_inotify_init1 322 | ||
394 | #define __NR_accept4 323 | ||
395 | #define __NR_preadv 324 | ||
396 | #define __NR_pwritev 325 | ||
397 | #define __NR_rt_tgsigqueueinfo 326 | ||
398 | #define __NR_perf_event_open 327 | ||
399 | #define __NR_recvmmsg 328 | ||
400 | #define __NR_fanotify_init 329 | ||
401 | #define __NR_fanotify_mark 330 | ||
402 | #define __NR_prlimit64 331 | ||
403 | #define __NR_name_to_handle_at 332 | ||
404 | #define __NR_open_by_handle_at 333 | ||
405 | #define __NR_clock_adjtime 334 | ||
406 | #define __NR_syncfs 335 | ||
407 | #define __NR_sendmmsg 336 | ||
408 | #define __NR_setns 337 | ||
409 | #define __NR_process_vm_readv 338 | ||
410 | #define __NR_process_vm_writev 339 | ||
411 | |||
412 | #define NR_syscalls 340 | ||
413 | |||
414 | #ifdef __32bit_syscall_numbers__ | ||
415 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | ||
416 | * it never had the plain ones and there is no value to adding those | ||
417 | * old versions into the syscall table. | ||
418 | */ | ||
419 | #define __IGNORE_setresuid | ||
420 | #define __IGNORE_getresuid | ||
421 | #define __IGNORE_setresgid | ||
422 | #define __IGNORE_getresgid | ||
423 | #endif | ||
424 | |||
425 | #ifdef __KERNEL__ | ||
426 | #define __ARCH_WANT_OLD_READDIR | 23 | #define __ARCH_WANT_OLD_READDIR |
427 | #define __ARCH_WANT_STAT64 | 24 | #define __ARCH_WANT_STAT64 |
428 | #define __ARCH_WANT_SYS_ALARM | 25 | #define __ARCH_WANT_SYS_ALARM |
@@ -458,5 +55,4 @@ | |||
458 | */ | 55 | */ |
459 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 56 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
460 | 57 | ||
461 | #endif /* __KERNEL__ */ | ||
462 | #endif /* _SPARC_UNISTD_H */ | 58 | #endif /* _SPARC_UNISTD_H */ |
diff --git a/arch/sparc/include/uapi/asm/Kbuild b/arch/sparc/include/uapi/asm/Kbuild index 7518ad286963..ce175aff71b7 100644 --- a/arch/sparc/include/uapi/asm/Kbuild +++ b/arch/sparc/include/uapi/asm/Kbuild | |||
@@ -3,3 +3,49 @@ | |||
3 | 3 | ||
4 | include include/uapi/asm-generic/Kbuild.asm | 4 | include include/uapi/asm-generic/Kbuild.asm |
5 | 5 | ||
6 | header-y += apc.h | ||
7 | header-y += asi.h | ||
8 | header-y += auxvec.h | ||
9 | header-y += bitsperlong.h | ||
10 | header-y += byteorder.h | ||
11 | header-y += display7seg.h | ||
12 | header-y += envctrl.h | ||
13 | header-y += errno.h | ||
14 | header-y += fbio.h | ||
15 | header-y += fcntl.h | ||
16 | header-y += ioctl.h | ||
17 | header-y += ioctls.h | ||
18 | header-y += ipcbuf.h | ||
19 | header-y += jsflash.h | ||
20 | header-y += kvm_para.h | ||
21 | header-y += mman.h | ||
22 | header-y += msgbuf.h | ||
23 | header-y += openpromio.h | ||
24 | header-y += param.h | ||
25 | header-y += perfctr.h | ||
26 | header-y += poll.h | ||
27 | header-y += posix_types.h | ||
28 | header-y += psr.h | ||
29 | header-y += psrcompat.h | ||
30 | header-y += pstate.h | ||
31 | header-y += ptrace.h | ||
32 | header-y += resource.h | ||
33 | header-y += sembuf.h | ||
34 | header-y += setup.h | ||
35 | header-y += shmbuf.h | ||
36 | header-y += sigcontext.h | ||
37 | header-y += siginfo.h | ||
38 | header-y += signal.h | ||
39 | header-y += socket.h | ||
40 | header-y += sockios.h | ||
41 | header-y += stat.h | ||
42 | header-y += statfs.h | ||
43 | header-y += swab.h | ||
44 | header-y += termbits.h | ||
45 | header-y += termios.h | ||
46 | header-y += traps.h | ||
47 | header-y += types.h | ||
48 | header-y += uctx.h | ||
49 | header-y += unistd.h | ||
50 | header-y += utrap.h | ||
51 | header-y += watchdog.h | ||
diff --git a/arch/sparc/include/asm/apc.h b/arch/sparc/include/uapi/asm/apc.h index 24e9a7d4d97e..24e9a7d4d97e 100644 --- a/arch/sparc/include/asm/apc.h +++ b/arch/sparc/include/uapi/asm/apc.h | |||
diff --git a/arch/sparc/include/asm/asi.h b/arch/sparc/include/uapi/asm/asi.h index aace6f313716..aace6f313716 100644 --- a/arch/sparc/include/asm/asi.h +++ b/arch/sparc/include/uapi/asm/asi.h | |||
diff --git a/arch/sparc/include/asm/auxvec.h b/arch/sparc/include/uapi/asm/auxvec.h index ad6f360261f6..ad6f360261f6 100644 --- a/arch/sparc/include/asm/auxvec.h +++ b/arch/sparc/include/uapi/asm/auxvec.h | |||
diff --git a/arch/sparc/include/asm/bitsperlong.h b/arch/sparc/include/uapi/asm/bitsperlong.h index 40dcaa3aaa56..40dcaa3aaa56 100644 --- a/arch/sparc/include/asm/bitsperlong.h +++ b/arch/sparc/include/uapi/asm/bitsperlong.h | |||
diff --git a/arch/sparc/include/asm/byteorder.h b/arch/sparc/include/uapi/asm/byteorder.h index ccc1b6b7de6c..ccc1b6b7de6c 100644 --- a/arch/sparc/include/asm/byteorder.h +++ b/arch/sparc/include/uapi/asm/byteorder.h | |||
diff --git a/arch/sparc/include/asm/display7seg.h b/arch/sparc/include/uapi/asm/display7seg.h index 86d4a901df24..86d4a901df24 100644 --- a/arch/sparc/include/asm/display7seg.h +++ b/arch/sparc/include/uapi/asm/display7seg.h | |||
diff --git a/arch/sparc/include/asm/envctrl.h b/arch/sparc/include/uapi/asm/envctrl.h index 624fa7e2da8e..624fa7e2da8e 100644 --- a/arch/sparc/include/asm/envctrl.h +++ b/arch/sparc/include/uapi/asm/envctrl.h | |||
diff --git a/arch/sparc/include/asm/errno.h b/arch/sparc/include/uapi/asm/errno.h index c351aba997b7..c351aba997b7 100644 --- a/arch/sparc/include/asm/errno.h +++ b/arch/sparc/include/uapi/asm/errno.h | |||
diff --git a/arch/sparc/include/uapi/asm/fbio.h b/arch/sparc/include/uapi/asm/fbio.h new file mode 100644 index 000000000000..d6cea07afb61 --- /dev/null +++ b/arch/sparc/include/uapi/asm/fbio.h | |||
@@ -0,0 +1,259 @@ | |||
1 | #ifndef _UAPI__LINUX_FBIO_H | ||
2 | #define _UAPI__LINUX_FBIO_H | ||
3 | |||
4 | #include <linux/compiler.h> | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | /* Constants used for fbio SunOS compatibility */ | ||
8 | /* (C) 1996 Miguel de Icaza */ | ||
9 | |||
10 | /* Frame buffer types */ | ||
11 | #define FBTYPE_NOTYPE -1 | ||
12 | #define FBTYPE_SUN1BW 0 /* mono */ | ||
13 | #define FBTYPE_SUN1COLOR 1 | ||
14 | #define FBTYPE_SUN2BW 2 | ||
15 | #define FBTYPE_SUN2COLOR 3 | ||
16 | #define FBTYPE_SUN2GP 4 | ||
17 | #define FBTYPE_SUN5COLOR 5 | ||
18 | #define FBTYPE_SUN3COLOR 6 | ||
19 | #define FBTYPE_MEMCOLOR 7 | ||
20 | #define FBTYPE_SUN4COLOR 8 | ||
21 | |||
22 | #define FBTYPE_NOTSUN1 9 | ||
23 | #define FBTYPE_NOTSUN2 10 | ||
24 | #define FBTYPE_NOTSUN3 11 | ||
25 | |||
26 | #define FBTYPE_SUNFAST_COLOR 12 /* cg6 */ | ||
27 | #define FBTYPE_SUNROP_COLOR 13 | ||
28 | #define FBTYPE_SUNFB_VIDEO 14 | ||
29 | #define FBTYPE_SUNGIFB 15 | ||
30 | #define FBTYPE_SUNGPLAS 16 | ||
31 | #define FBTYPE_SUNGP3 17 | ||
32 | #define FBTYPE_SUNGT 18 | ||
33 | #define FBTYPE_SUNLEO 19 /* zx Leo card */ | ||
34 | #define FBTYPE_MDICOLOR 20 /* cg14 */ | ||
35 | #define FBTYPE_TCXCOLOR 21 /* SUNW,tcx card */ | ||
36 | |||
37 | #define FBTYPE_LASTPLUSONE 21 /* This is not last + 1 in fact... */ | ||
38 | |||
39 | /* Does not seem to be listed in the Sun file either */ | ||
40 | #define FBTYPE_CREATOR 22 | ||
41 | #define FBTYPE_PCI_IGA1682 23 | ||
42 | #define FBTYPE_P9100COLOR 24 | ||
43 | |||
44 | #define FBTYPE_PCI_GENERIC 1000 | ||
45 | #define FBTYPE_PCI_MACH64 1001 | ||
46 | |||
47 | /* fbio ioctls */ | ||
48 | /* Returned by FBIOGTYPE */ | ||
49 | struct fbtype { | ||
50 | int fb_type; /* fb type, see above */ | ||
51 | int fb_height; /* pixels */ | ||
52 | int fb_width; /* pixels */ | ||
53 | int fb_depth; | ||
54 | int fb_cmsize; /* color map entries */ | ||
55 | int fb_size; /* fb size in bytes */ | ||
56 | }; | ||
57 | #define FBIOGTYPE _IOR('F', 0, struct fbtype) | ||
58 | |||
59 | struct fbcmap { | ||
60 | int index; /* first element (0 origin) */ | ||
61 | int count; | ||
62 | unsigned char __user *red; | ||
63 | unsigned char __user *green; | ||
64 | unsigned char __user *blue; | ||
65 | }; | ||
66 | |||
67 | #ifndef __KERNEL__ | ||
68 | #define FBIOPUTCMAP _IOW('F', 3, struct fbcmap) | ||
69 | #define FBIOGETCMAP _IOW('F', 4, struct fbcmap) | ||
70 | #endif | ||
71 | |||
72 | /* # of device specific values */ | ||
73 | #define FB_ATTR_NDEVSPECIFIC 8 | ||
74 | /* # of possible emulations */ | ||
75 | #define FB_ATTR_NEMUTYPES 4 | ||
76 | |||
77 | struct fbsattr { | ||
78 | int flags; | ||
79 | int emu_type; /* -1 if none */ | ||
80 | int dev_specific[FB_ATTR_NDEVSPECIFIC]; | ||
81 | }; | ||
82 | |||
83 | struct fbgattr { | ||
84 | int real_type; /* real frame buffer type */ | ||
85 | int owner; /* unknown */ | ||
86 | struct fbtype fbtype; /* real frame buffer fbtype */ | ||
87 | struct fbsattr sattr; | ||
88 | int emu_types[FB_ATTR_NEMUTYPES]; /* supported emulations */ | ||
89 | }; | ||
90 | #define FBIOSATTR _IOW('F', 5, struct fbgattr) /* Unsupported: */ | ||
91 | #define FBIOGATTR _IOR('F', 6, struct fbgattr) /* supported */ | ||
92 | |||
93 | #define FBIOSVIDEO _IOW('F', 7, int) | ||
94 | #define FBIOGVIDEO _IOR('F', 8, int) | ||
95 | |||
96 | struct fbcursor { | ||
97 | short set; /* what to set, choose from the list above */ | ||
98 | short enable; /* cursor on/off */ | ||
99 | struct fbcurpos pos; /* cursor position */ | ||
100 | struct fbcurpos hot; /* cursor hot spot */ | ||
101 | struct fbcmap cmap; /* color map info */ | ||
102 | struct fbcurpos size; /* cursor bit map size */ | ||
103 | char __user *image; /* cursor image bits */ | ||
104 | char __user *mask; /* cursor mask bits */ | ||
105 | }; | ||
106 | |||
107 | /* set/get cursor attributes/shape */ | ||
108 | #define FBIOSCURSOR _IOW('F', 24, struct fbcursor) | ||
109 | #define FBIOGCURSOR _IOWR('F', 25, struct fbcursor) | ||
110 | |||
111 | /* set/get cursor position */ | ||
112 | #define FBIOSCURPOS _IOW('F', 26, struct fbcurpos) | ||
113 | #define FBIOGCURPOS _IOW('F', 27, struct fbcurpos) | ||
114 | |||
115 | /* get max cursor size */ | ||
116 | #define FBIOGCURMAX _IOR('F', 28, struct fbcurpos) | ||
117 | |||
118 | /* wid manipulation */ | ||
119 | struct fb_wid_alloc { | ||
120 | #define FB_WID_SHARED_8 0 | ||
121 | #define FB_WID_SHARED_24 1 | ||
122 | #define FB_WID_DBL_8 2 | ||
123 | #define FB_WID_DBL_24 3 | ||
124 | __u32 wa_type; | ||
125 | __s32 wa_index; /* Set on return */ | ||
126 | __u32 wa_count; | ||
127 | }; | ||
128 | struct fb_wid_item { | ||
129 | __u32 wi_type; | ||
130 | __s32 wi_index; | ||
131 | __u32 wi_attrs; | ||
132 | __u32 wi_values[32]; | ||
133 | }; | ||
134 | struct fb_wid_list { | ||
135 | __u32 wl_flags; | ||
136 | __u32 wl_count; | ||
137 | struct fb_wid_item *wl_list; | ||
138 | }; | ||
139 | |||
140 | #define FBIO_WID_ALLOC _IOWR('F', 30, struct fb_wid_alloc) | ||
141 | #define FBIO_WID_FREE _IOW('F', 31, struct fb_wid_alloc) | ||
142 | #define FBIO_WID_PUT _IOW('F', 32, struct fb_wid_list) | ||
143 | #define FBIO_WID_GET _IOWR('F', 33, struct fb_wid_list) | ||
144 | |||
145 | /* Creator ioctls */ | ||
146 | #define FFB_IOCTL ('F'<<8) | ||
147 | #define FFB_SYS_INFO (FFB_IOCTL|80) | ||
148 | #define FFB_CLUTREAD (FFB_IOCTL|81) | ||
149 | #define FFB_CLUTPOST (FFB_IOCTL|82) | ||
150 | #define FFB_SETDIAGMODE (FFB_IOCTL|83) | ||
151 | #define FFB_GETMONITORID (FFB_IOCTL|84) | ||
152 | #define FFB_GETVIDEOMODE (FFB_IOCTL|85) | ||
153 | #define FFB_SETVIDEOMODE (FFB_IOCTL|86) | ||
154 | #define FFB_SETSERVER (FFB_IOCTL|87) | ||
155 | #define FFB_SETOVCTL (FFB_IOCTL|88) | ||
156 | #define FFB_GETOVCTL (FFB_IOCTL|89) | ||
157 | #define FFB_GETSAXNUM (FFB_IOCTL|90) | ||
158 | #define FFB_FBDEBUG (FFB_IOCTL|91) | ||
159 | |||
160 | /* Cg14 ioctls */ | ||
161 | #define MDI_IOCTL ('M'<<8) | ||
162 | #define MDI_RESET (MDI_IOCTL|1) | ||
163 | #define MDI_GET_CFGINFO (MDI_IOCTL|2) | ||
164 | #define MDI_SET_PIXELMODE (MDI_IOCTL|3) | ||
165 | # define MDI_32_PIX 32 | ||
166 | # define MDI_16_PIX 16 | ||
167 | # define MDI_8_PIX 8 | ||
168 | |||
169 | struct mdi_cfginfo { | ||
170 | int mdi_ncluts; /* Number of implemented CLUTs in this MDI */ | ||
171 | int mdi_type; /* FBTYPE name */ | ||
172 | int mdi_height; /* height */ | ||
173 | int mdi_width; /* width */ | ||
174 | int mdi_size; /* available ram */ | ||
175 | int mdi_mode; /* 8bpp, 16bpp or 32bpp */ | ||
176 | int mdi_pixfreq; /* pixel clock (from PROM) */ | ||
177 | }; | ||
178 | |||
179 | /* SparcLinux specific ioctl for the MDI, should be replaced for | ||
180 | * the SET_XLUT/SET_CLUTn ioctls instead | ||
181 | */ | ||
182 | #define MDI_CLEAR_XLUT (MDI_IOCTL|9) | ||
183 | |||
184 | /* leo & ffb ioctls */ | ||
185 | struct fb_clut_alloc { | ||
186 | __u32 clutid; /* Set on return */ | ||
187 | __u32 flag; | ||
188 | __u32 index; | ||
189 | }; | ||
190 | |||
191 | struct fb_clut { | ||
192 | #define FB_CLUT_WAIT 0x00000001 /* Not yet implemented */ | ||
193 | __u32 flag; | ||
194 | __u32 clutid; | ||
195 | __u32 offset; | ||
196 | __u32 count; | ||
197 | char * red; | ||
198 | char * green; | ||
199 | char * blue; | ||
200 | }; | ||
201 | |||
202 | struct fb_clut32 { | ||
203 | __u32 flag; | ||
204 | __u32 clutid; | ||
205 | __u32 offset; | ||
206 | __u32 count; | ||
207 | __u32 red; | ||
208 | __u32 green; | ||
209 | __u32 blue; | ||
210 | }; | ||
211 | |||
212 | #define LEO_CLUTALLOC _IOWR('L', 53, struct fb_clut_alloc) | ||
213 | #define LEO_CLUTFREE _IOW('L', 54, struct fb_clut_alloc) | ||
214 | #define LEO_CLUTREAD _IOW('L', 55, struct fb_clut) | ||
215 | #define LEO_CLUTPOST _IOW('L', 56, struct fb_clut) | ||
216 | #define LEO_SETGAMMA _IOW('L', 68, int) /* Not yet implemented */ | ||
217 | #define LEO_GETGAMMA _IOR('L', 69, int) /* Not yet implemented */ | ||
218 | |||
219 | |||
220 | /* These are exported to userland for applications to use */ | ||
221 | /* Mappable offsets for the cg14: control registers */ | ||
222 | #define MDI_DIRECT_MAP 0x10000000 | ||
223 | #define MDI_CTLREG_MAP 0x20000000 | ||
224 | #define MDI_CURSOR_MAP 0x30000000 | ||
225 | #define MDI_SHDW_VRT_MAP 0x40000000 | ||
226 | |||
227 | /* Mappable offsets for the cg14: frame buffer resolutions */ | ||
228 | /* 32 bits */ | ||
229 | #define MDI_CHUNKY_XBGR_MAP 0x50000000 | ||
230 | #define MDI_CHUNKY_BGR_MAP 0x60000000 | ||
231 | |||
232 | /* 16 bits */ | ||
233 | #define MDI_PLANAR_X16_MAP 0x70000000 | ||
234 | #define MDI_PLANAR_C16_MAP 0x80000000 | ||
235 | |||
236 | /* 8 bit is done as CG3 MMAP offset */ | ||
237 | /* 32 bits, planar */ | ||
238 | #define MDI_PLANAR_X32_MAP 0x90000000 | ||
239 | #define MDI_PLANAR_B32_MAP 0xa0000000 | ||
240 | #define MDI_PLANAR_G32_MAP 0xb0000000 | ||
241 | #define MDI_PLANAR_R32_MAP 0xc0000000 | ||
242 | |||
243 | /* Mappable offsets on leo */ | ||
244 | #define LEO_SS0_MAP 0x00000000 | ||
245 | #define LEO_LC_SS0_USR_MAP 0x00800000 | ||
246 | #define LEO_LD_SS0_MAP 0x00801000 | ||
247 | #define LEO_LX_CURSOR_MAP 0x00802000 | ||
248 | #define LEO_SS1_MAP 0x00803000 | ||
249 | #define LEO_LC_SS1_USR_MAP 0x01003000 | ||
250 | #define LEO_LD_SS1_MAP 0x01004000 | ||
251 | #define LEO_UNK_MAP 0x01005000 | ||
252 | #define LEO_LX_KRN_MAP 0x01006000 | ||
253 | #define LEO_LC_SS0_KRN_MAP 0x01007000 | ||
254 | #define LEO_LC_SS1_KRN_MAP 0x01008000 | ||
255 | #define LEO_LD_GBL_MAP 0x01009000 | ||
256 | #define LEO_UNK2_MAP 0x0100a000 | ||
257 | |||
258 | |||
259 | #endif /* _UAPI__LINUX_FBIO_H */ | ||
diff --git a/arch/sparc/include/asm/fcntl.h b/arch/sparc/include/uapi/asm/fcntl.h index d0b83f66f356..d0b83f66f356 100644 --- a/arch/sparc/include/asm/fcntl.h +++ b/arch/sparc/include/uapi/asm/fcntl.h | |||
diff --git a/arch/sparc/include/asm/ioctl.h b/arch/sparc/include/uapi/asm/ioctl.h index 7d6bd51321b9..7d6bd51321b9 100644 --- a/arch/sparc/include/asm/ioctl.h +++ b/arch/sparc/include/uapi/asm/ioctl.h | |||
diff --git a/arch/sparc/include/uapi/asm/ioctls.h b/arch/sparc/include/uapi/asm/ioctls.h new file mode 100644 index 000000000000..9155f7041d44 --- /dev/null +++ b/arch/sparc/include/uapi/asm/ioctls.h | |||
@@ -0,0 +1,131 @@ | |||
1 | #ifndef _UAPI_ASM_SPARC_IOCTLS_H | ||
2 | #define _UAPI_ASM_SPARC_IOCTLS_H | ||
3 | |||
4 | #include <asm/ioctl.h> | ||
5 | |||
6 | /* Big T */ | ||
7 | #define TCGETA _IOR('T', 1, struct termio) | ||
8 | #define TCSETA _IOW('T', 2, struct termio) | ||
9 | #define TCSETAW _IOW('T', 3, struct termio) | ||
10 | #define TCSETAF _IOW('T', 4, struct termio) | ||
11 | #define TCSBRK _IO('T', 5) | ||
12 | #define TCXONC _IO('T', 6) | ||
13 | #define TCFLSH _IO('T', 7) | ||
14 | #define TCGETS _IOR('T', 8, struct termios) | ||
15 | #define TCSETS _IOW('T', 9, struct termios) | ||
16 | #define TCSETSW _IOW('T', 10, struct termios) | ||
17 | #define TCSETSF _IOW('T', 11, struct termios) | ||
18 | #define TCGETS2 _IOR('T', 12, struct termios2) | ||
19 | #define TCSETS2 _IOW('T', 13, struct termios2) | ||
20 | #define TCSETSW2 _IOW('T', 14, struct termios2) | ||
21 | #define TCSETSF2 _IOW('T', 15, struct termios2) | ||
22 | #define TIOCGDEV _IOR('T',0x32, unsigned int) /* Get primary device node of /dev/console */ | ||
23 | #define TIOCVHANGUP _IO('T', 0x37) | ||
24 | |||
25 | /* Note that all the ioctls that are not available in Linux have a | ||
26 | * double underscore on the front to: a) avoid some programs to | ||
27 | * think we support some ioctls under Linux (autoconfiguration stuff) | ||
28 | */ | ||
29 | /* Little t */ | ||
30 | #define TIOCGETD _IOR('t', 0, int) | ||
31 | #define TIOCSETD _IOW('t', 1, int) | ||
32 | #define __TIOCHPCL _IO('t', 2) /* SunOS Specific */ | ||
33 | #define __TIOCMODG _IOR('t', 3, int) /* SunOS Specific */ | ||
34 | #define __TIOCMODS _IOW('t', 4, int) /* SunOS Specific */ | ||
35 | #define __TIOCGETP _IOR('t', 8, struct sgttyb) /* SunOS Specific */ | ||
36 | #define __TIOCSETP _IOW('t', 9, struct sgttyb) /* SunOS Specific */ | ||
37 | #define __TIOCSETN _IOW('t', 10, struct sgttyb) /* SunOS Specific */ | ||
38 | #define TIOCEXCL _IO('t', 13) | ||
39 | #define TIOCNXCL _IO('t', 14) | ||
40 | #define __TIOCFLUSH _IOW('t', 16, int) /* SunOS Specific */ | ||
41 | #define __TIOCSETC _IOW('t', 17, struct tchars) /* SunOS Specific */ | ||
42 | #define __TIOCGETC _IOR('t', 18, struct tchars) /* SunOS Specific */ | ||
43 | #define __TIOCTCNTL _IOW('t', 32, int) /* SunOS Specific */ | ||
44 | #define __TIOCSIGNAL _IOW('t', 33, int) /* SunOS Specific */ | ||
45 | #define __TIOCSETX _IOW('t', 34, int) /* SunOS Specific */ | ||
46 | #define __TIOCGETX _IOR('t', 35, int) /* SunOS Specific */ | ||
47 | #define TIOCCONS _IO('t', 36) | ||
48 | #define TIOCGSOFTCAR _IOR('t', 100, int) | ||
49 | #define TIOCSSOFTCAR _IOW('t', 101, int) | ||
50 | #define __TIOCUCNTL _IOW('t', 102, int) /* SunOS Specific */ | ||
51 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) | ||
52 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) | ||
53 | #define __TIOCREMOTE _IOW('t', 105, int) /* SunOS Specific */ | ||
54 | #define TIOCMGET _IOR('t', 106, int) | ||
55 | #define TIOCMBIC _IOW('t', 107, int) | ||
56 | #define TIOCMBIS _IOW('t', 108, int) | ||
57 | #define TIOCMSET _IOW('t', 109, int) | ||
58 | #define TIOCSTART _IO('t', 110) | ||
59 | #define TIOCSTOP _IO('t', 111) | ||
60 | #define TIOCPKT _IOW('t', 112, int) | ||
61 | #define TIOCNOTTY _IO('t', 113) | ||
62 | #define TIOCSTI _IOW('t', 114, char) | ||
63 | #define TIOCOUTQ _IOR('t', 115, int) | ||
64 | #define __TIOCGLTC _IOR('t', 116, struct ltchars) /* SunOS Specific */ | ||
65 | #define __TIOCSLTC _IOW('t', 117, struct ltchars) /* SunOS Specific */ | ||
66 | /* 118 is the non-posix setpgrp tty ioctl */ | ||
67 | /* 119 is the non-posix getpgrp tty ioctl */ | ||
68 | #define __TIOCCDTR _IO('t', 120) /* SunOS Specific */ | ||
69 | #define __TIOCSDTR _IO('t', 121) /* SunOS Specific */ | ||
70 | #define TIOCCBRK _IO('t', 122) | ||
71 | #define TIOCSBRK _IO('t', 123) | ||
72 | #define __TIOCLGET _IOW('t', 124, int) /* SunOS Specific */ | ||
73 | #define __TIOCLSET _IOW('t', 125, int) /* SunOS Specific */ | ||
74 | #define __TIOCLBIC _IOW('t', 126, int) /* SunOS Specific */ | ||
75 | #define __TIOCLBIS _IOW('t', 127, int) /* SunOS Specific */ | ||
76 | #define __TIOCISPACE _IOR('t', 128, int) /* SunOS Specific */ | ||
77 | #define __TIOCISIZE _IOR('t', 129, int) /* SunOS Specific */ | ||
78 | #define TIOCSPGRP _IOW('t', 130, int) | ||
79 | #define TIOCGPGRP _IOR('t', 131, int) | ||
80 | #define TIOCSCTTY _IO('t', 132) | ||
81 | #define TIOCGSID _IOR('t', 133, int) | ||
82 | /* Get minor device of a pty master's FD -- Solaris equiv is ISPTM */ | ||
83 | #define TIOCGPTN _IOR('t', 134, unsigned int) /* Get Pty Number */ | ||
84 | #define TIOCSPTLCK _IOW('t', 135, int) /* Lock/unlock PTY */ | ||
85 | #define TIOCSIG _IOW('t', 136, int) /* Generate signal on Pty slave */ | ||
86 | |||
87 | /* Little f */ | ||
88 | #define FIOCLEX _IO('f', 1) | ||
89 | #define FIONCLEX _IO('f', 2) | ||
90 | #define FIOASYNC _IOW('f', 125, int) | ||
91 | #define FIONBIO _IOW('f', 126, int) | ||
92 | #define FIONREAD _IOR('f', 127, int) | ||
93 | #define TIOCINQ FIONREAD | ||
94 | #define FIOQSIZE _IOR('f', 128, loff_t) | ||
95 | |||
96 | /* SCARY Rutgers local SunOS kernel hackery, perhaps I will support it | ||
97 | * someday. This is completely bogus, I know... | ||
98 | */ | ||
99 | #define __TCGETSTAT _IO('T', 200) /* Rutgers specific */ | ||
100 | #define __TCSETSTAT _IO('T', 201) /* Rutgers specific */ | ||
101 | |||
102 | /* Linux specific, no SunOS equivalent. */ | ||
103 | #define TIOCLINUX 0x541C | ||
104 | #define TIOCGSERIAL 0x541E | ||
105 | #define TIOCSSERIAL 0x541F | ||
106 | #define TCSBRKP 0x5425 | ||
107 | #define TIOCSERCONFIG 0x5453 | ||
108 | #define TIOCSERGWILD 0x5454 | ||
109 | #define TIOCSERSWILD 0x5455 | ||
110 | #define TIOCGLCKTRMIOS 0x5456 | ||
111 | #define TIOCSLCKTRMIOS 0x5457 | ||
112 | #define TIOCSERGSTRUCT 0x5458 /* For debugging only */ | ||
113 | #define TIOCSERGETLSR 0x5459 /* Get line status register */ | ||
114 | #define TIOCSERGETMULTI 0x545A /* Get multiport config */ | ||
115 | #define TIOCSERSETMULTI 0x545B /* Set multiport config */ | ||
116 | #define TIOCMIWAIT 0x545C /* Wait for change on serial input line(s) */ | ||
117 | #define TIOCGICOUNT 0x545D /* Read serial port inline interrupt counts */ | ||
118 | |||
119 | /* Kernel definitions */ | ||
120 | |||
121 | /* Used for packet mode */ | ||
122 | #define TIOCPKT_DATA 0 | ||
123 | #define TIOCPKT_FLUSHREAD 1 | ||
124 | #define TIOCPKT_FLUSHWRITE 2 | ||
125 | #define TIOCPKT_STOP 4 | ||
126 | #define TIOCPKT_START 8 | ||
127 | #define TIOCPKT_NOSTOP 16 | ||
128 | #define TIOCPKT_DOSTOP 32 | ||
129 | #define TIOCPKT_IOCTL 64 | ||
130 | |||
131 | #endif /* _UAPI_ASM_SPARC_IOCTLS_H */ | ||
diff --git a/arch/sparc/include/asm/ipcbuf.h b/arch/sparc/include/uapi/asm/ipcbuf.h index 66013b4fe10d..66013b4fe10d 100644 --- a/arch/sparc/include/asm/ipcbuf.h +++ b/arch/sparc/include/uapi/asm/ipcbuf.h | |||
diff --git a/arch/sparc/include/asm/jsflash.h b/arch/sparc/include/uapi/asm/jsflash.h index 0717d9e39d2d..0717d9e39d2d 100644 --- a/arch/sparc/include/asm/jsflash.h +++ b/arch/sparc/include/uapi/asm/jsflash.h | |||
diff --git a/arch/sparc/include/asm/kvm_para.h b/arch/sparc/include/uapi/asm/kvm_para.h index 14fab8f0b957..14fab8f0b957 100644 --- a/arch/sparc/include/asm/kvm_para.h +++ b/arch/sparc/include/uapi/asm/kvm_para.h | |||
diff --git a/arch/sparc/include/uapi/asm/mman.h b/arch/sparc/include/uapi/asm/mman.h new file mode 100644 index 000000000000..0b14df33cffa --- /dev/null +++ b/arch/sparc/include/uapi/asm/mman.h | |||
@@ -0,0 +1,27 @@ | |||
1 | #ifndef _UAPI__SPARC_MMAN_H__ | ||
2 | #define _UAPI__SPARC_MMAN_H__ | ||
3 | |||
4 | #include <asm-generic/mman-common.h> | ||
5 | |||
6 | /* SunOS'ified... */ | ||
7 | |||
8 | #define MAP_RENAME MAP_ANONYMOUS /* In SunOS terminology */ | ||
9 | #define MAP_NORESERVE 0x40 /* don't reserve swap pages */ | ||
10 | #define MAP_INHERIT 0x80 /* SunOS doesn't do this, but... */ | ||
11 | #define MAP_LOCKED 0x100 /* lock the mapping */ | ||
12 | #define _MAP_NEW 0x80000000 /* Binary compatibility is fun... */ | ||
13 | |||
14 | #define MAP_GROWSDOWN 0x0200 /* stack-like segment */ | ||
15 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
16 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | ||
17 | |||
18 | #define MCL_CURRENT 0x2000 /* lock all currently mapped pages */ | ||
19 | #define MCL_FUTURE 0x4000 /* lock all additions to address space */ | ||
20 | |||
21 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
22 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
23 | #define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */ | ||
24 | #define MAP_HUGETLB 0x40000 /* create a huge page mapping */ | ||
25 | |||
26 | |||
27 | #endif /* _UAPI__SPARC_MMAN_H__ */ | ||
diff --git a/arch/sparc/include/asm/msgbuf.h b/arch/sparc/include/uapi/asm/msgbuf.h index efc7cbe9788f..efc7cbe9788f 100644 --- a/arch/sparc/include/asm/msgbuf.h +++ b/arch/sparc/include/uapi/asm/msgbuf.h | |||
diff --git a/arch/sparc/include/asm/openpromio.h b/arch/sparc/include/uapi/asm/openpromio.h index 917fb8e9c633..917fb8e9c633 100644 --- a/arch/sparc/include/asm/openpromio.h +++ b/arch/sparc/include/uapi/asm/openpromio.h | |||
diff --git a/arch/sparc/include/asm/param.h b/arch/sparc/include/uapi/asm/param.h index 0bc356bf8c50..0bc356bf8c50 100644 --- a/arch/sparc/include/asm/param.h +++ b/arch/sparc/include/uapi/asm/param.h | |||
diff --git a/arch/sparc/include/asm/perfctr.h b/arch/sparc/include/uapi/asm/perfctr.h index 214feefa577c..214feefa577c 100644 --- a/arch/sparc/include/asm/perfctr.h +++ b/arch/sparc/include/uapi/asm/perfctr.h | |||
diff --git a/arch/sparc/include/asm/poll.h b/arch/sparc/include/uapi/asm/poll.h index 091d3ad2e830..091d3ad2e830 100644 --- a/arch/sparc/include/asm/poll.h +++ b/arch/sparc/include/uapi/asm/poll.h | |||
diff --git a/arch/sparc/include/asm/posix_types.h b/arch/sparc/include/uapi/asm/posix_types.h index 156220ed99eb..156220ed99eb 100644 --- a/arch/sparc/include/asm/posix_types.h +++ b/arch/sparc/include/uapi/asm/posix_types.h | |||
diff --git a/arch/sparc/include/uapi/asm/psr.h b/arch/sparc/include/uapi/asm/psr.h new file mode 100644 index 000000000000..2f0ed856530b --- /dev/null +++ b/arch/sparc/include/uapi/asm/psr.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * psr.h: This file holds the macros for masking off various parts of | ||
3 | * the processor status register on the Sparc. This is valid | ||
4 | * for Version 8. On the V9 this is renamed to the PSTATE | ||
5 | * register and its members are accessed as fields like | ||
6 | * PSTATE.PRIV for the current CPU privilege level. | ||
7 | * | ||
8 | * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu) | ||
9 | */ | ||
10 | |||
11 | #ifndef _UAPI__LINUX_SPARC_PSR_H | ||
12 | #define _UAPI__LINUX_SPARC_PSR_H | ||
13 | |||
14 | /* The Sparc PSR fields are laid out as the following: | ||
15 | * | ||
16 | * ------------------------------------------------------------------------ | ||
17 | * | impl | vers | icc | resv | EC | EF | PIL | S | PS | ET | CWP | | ||
18 | * | 31-28 | 27-24 | 23-20 | 19-14 | 13 | 12 | 11-8 | 7 | 6 | 5 | 4-0 | | ||
19 | * ------------------------------------------------------------------------ | ||
20 | */ | ||
21 | #define PSR_CWP 0x0000001f /* current window pointer */ | ||
22 | #define PSR_ET 0x00000020 /* enable traps field */ | ||
23 | #define PSR_PS 0x00000040 /* previous privilege level */ | ||
24 | #define PSR_S 0x00000080 /* current privilege level */ | ||
25 | #define PSR_PIL 0x00000f00 /* processor interrupt level */ | ||
26 | #define PSR_EF 0x00001000 /* enable floating point */ | ||
27 | #define PSR_EC 0x00002000 /* enable co-processor */ | ||
28 | #define PSR_SYSCALL 0x00004000 /* inside of a syscall */ | ||
29 | #define PSR_LE 0x00008000 /* SuperSparcII little-endian */ | ||
30 | #define PSR_ICC 0x00f00000 /* integer condition codes */ | ||
31 | #define PSR_C 0x00100000 /* carry bit */ | ||
32 | #define PSR_V 0x00200000 /* overflow bit */ | ||
33 | #define PSR_Z 0x00400000 /* zero bit */ | ||
34 | #define PSR_N 0x00800000 /* negative bit */ | ||
35 | #define PSR_VERS 0x0f000000 /* cpu-version field */ | ||
36 | #define PSR_IMPL 0xf0000000 /* cpu-implementation field */ | ||
37 | |||
38 | #define PSR_VERS_SHIFT 24 | ||
39 | #define PSR_IMPL_SHIFT 28 | ||
40 | #define PSR_VERS_SHIFTED_MASK 0xf | ||
41 | #define PSR_IMPL_SHIFTED_MASK 0xf | ||
42 | |||
43 | #define PSR_IMPL_TI 0x4 | ||
44 | #define PSR_IMPL_LEON 0xf | ||
45 | |||
46 | |||
47 | #endif /* _UAPI__LINUX_SPARC_PSR_H */ | ||
diff --git a/arch/sparc/include/asm/psrcompat.h b/arch/sparc/include/uapi/asm/psrcompat.h index 44b6327dbbf5..44b6327dbbf5 100644 --- a/arch/sparc/include/asm/psrcompat.h +++ b/arch/sparc/include/uapi/asm/psrcompat.h | |||
diff --git a/arch/sparc/include/asm/pstate.h b/arch/sparc/include/uapi/asm/pstate.h index 4b6b998afd99..4b6b998afd99 100644 --- a/arch/sparc/include/asm/pstate.h +++ b/arch/sparc/include/uapi/asm/pstate.h | |||
diff --git a/arch/sparc/include/uapi/asm/ptrace.h b/arch/sparc/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..56fe4ea73feb --- /dev/null +++ b/arch/sparc/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,352 @@ | |||
1 | #ifndef _UAPI__SPARC_PTRACE_H | ||
2 | #define _UAPI__SPARC_PTRACE_H | ||
3 | |||
4 | #if defined(__sparc__) && defined(__arch64__) | ||
5 | /* 64 bit sparc */ | ||
6 | #include <asm/pstate.h> | ||
7 | |||
8 | /* This struct defines the way the registers are stored on the | ||
9 | * stack during a system call and basically all traps. | ||
10 | */ | ||
11 | |||
12 | /* This magic value must have the low 9 bits clear, | ||
13 | * as that is where we encode the %tt value, see below. | ||
14 | */ | ||
15 | #define PT_REGS_MAGIC 0x57ac6c00 | ||
16 | |||
17 | #ifndef __ASSEMBLY__ | ||
18 | |||
19 | #include <linux/types.h> | ||
20 | |||
21 | struct pt_regs { | ||
22 | unsigned long u_regs[16]; /* globals and ins */ | ||
23 | unsigned long tstate; | ||
24 | unsigned long tpc; | ||
25 | unsigned long tnpc; | ||
26 | unsigned int y; | ||
27 | |||
28 | /* We encode a magic number, PT_REGS_MAGIC, along | ||
29 | * with the %tt (trap type) register value at trap | ||
30 | * entry time. The magic number allows us to identify | ||
31 | * accurately a trap stack frame in the stack | ||
32 | * unwinder, and the %tt value allows us to test | ||
33 | * things like "in a system call" etc. for an arbitray | ||
34 | * process. | ||
35 | * | ||
36 | * The PT_REGS_MAGIC is chosen such that it can be | ||
37 | * loaded completely using just a sethi instruction. | ||
38 | */ | ||
39 | unsigned int magic; | ||
40 | }; | ||
41 | |||
42 | struct pt_regs32 { | ||
43 | unsigned int psr; | ||
44 | unsigned int pc; | ||
45 | unsigned int npc; | ||
46 | unsigned int y; | ||
47 | unsigned int u_regs[16]; /* globals and ins */ | ||
48 | }; | ||
49 | |||
50 | /* A V9 register window */ | ||
51 | struct reg_window { | ||
52 | unsigned long locals[8]; | ||
53 | unsigned long ins[8]; | ||
54 | }; | ||
55 | |||
56 | /* A 32-bit register window. */ | ||
57 | struct reg_window32 { | ||
58 | unsigned int locals[8]; | ||
59 | unsigned int ins[8]; | ||
60 | }; | ||
61 | |||
62 | /* A V9 Sparc stack frame */ | ||
63 | struct sparc_stackf { | ||
64 | unsigned long locals[8]; | ||
65 | unsigned long ins[6]; | ||
66 | struct sparc_stackf *fp; | ||
67 | unsigned long callers_pc; | ||
68 | char *structptr; | ||
69 | unsigned long xargs[6]; | ||
70 | unsigned long xxargs[1]; | ||
71 | }; | ||
72 | |||
73 | /* A 32-bit Sparc stack frame */ | ||
74 | struct sparc_stackf32 { | ||
75 | unsigned int locals[8]; | ||
76 | unsigned int ins[6]; | ||
77 | unsigned int fp; | ||
78 | unsigned int callers_pc; | ||
79 | unsigned int structptr; | ||
80 | unsigned int xargs[6]; | ||
81 | unsigned int xxargs[1]; | ||
82 | }; | ||
83 | |||
84 | struct sparc_trapf { | ||
85 | unsigned long locals[8]; | ||
86 | unsigned long ins[8]; | ||
87 | unsigned long _unused; | ||
88 | struct pt_regs *regs; | ||
89 | }; | ||
90 | #endif /* (!__ASSEMBLY__) */ | ||
91 | #else | ||
92 | /* 32 bit sparc */ | ||
93 | |||
94 | #include <asm/psr.h> | ||
95 | |||
96 | /* This struct defines the way the registers are stored on the | ||
97 | * stack during a system call and basically all traps. | ||
98 | */ | ||
99 | #ifndef __ASSEMBLY__ | ||
100 | |||
101 | #include <linux/types.h> | ||
102 | |||
103 | struct pt_regs { | ||
104 | unsigned long psr; | ||
105 | unsigned long pc; | ||
106 | unsigned long npc; | ||
107 | unsigned long y; | ||
108 | unsigned long u_regs[16]; /* globals and ins */ | ||
109 | }; | ||
110 | |||
111 | /* A 32-bit register window. */ | ||
112 | struct reg_window32 { | ||
113 | unsigned long locals[8]; | ||
114 | unsigned long ins[8]; | ||
115 | }; | ||
116 | |||
117 | /* A Sparc stack frame */ | ||
118 | struct sparc_stackf { | ||
119 | unsigned long locals[8]; | ||
120 | unsigned long ins[6]; | ||
121 | struct sparc_stackf *fp; | ||
122 | unsigned long callers_pc; | ||
123 | char *structptr; | ||
124 | unsigned long xargs[6]; | ||
125 | unsigned long xxargs[1]; | ||
126 | }; | ||
127 | #endif /* (!__ASSEMBLY__) */ | ||
128 | |||
129 | #endif /* (defined(__sparc__) && defined(__arch64__))*/ | ||
130 | |||
131 | #ifndef __ASSEMBLY__ | ||
132 | |||
133 | #define TRACEREG_SZ sizeof(struct pt_regs) | ||
134 | #define STACKFRAME_SZ sizeof(struct sparc_stackf) | ||
135 | |||
136 | #define TRACEREG32_SZ sizeof(struct pt_regs32) | ||
137 | #define STACKFRAME32_SZ sizeof(struct sparc_stackf32) | ||
138 | |||
139 | #endif /* (!__ASSEMBLY__) */ | ||
140 | |||
141 | #define UREG_G0 0 | ||
142 | #define UREG_G1 1 | ||
143 | #define UREG_G2 2 | ||
144 | #define UREG_G3 3 | ||
145 | #define UREG_G4 4 | ||
146 | #define UREG_G5 5 | ||
147 | #define UREG_G6 6 | ||
148 | #define UREG_G7 7 | ||
149 | #define UREG_I0 8 | ||
150 | #define UREG_I1 9 | ||
151 | #define UREG_I2 10 | ||
152 | #define UREG_I3 11 | ||
153 | #define UREG_I4 12 | ||
154 | #define UREG_I5 13 | ||
155 | #define UREG_I6 14 | ||
156 | #define UREG_I7 15 | ||
157 | #define UREG_FP UREG_I6 | ||
158 | #define UREG_RETPC UREG_I7 | ||
159 | |||
160 | #if defined(__sparc__) && defined(__arch64__) | ||
161 | /* 64 bit sparc */ | ||
162 | |||
163 | #ifndef __ASSEMBLY__ | ||
164 | |||
165 | |||
166 | #else /* __ASSEMBLY__ */ | ||
167 | /* For assembly code. */ | ||
168 | #define TRACEREG_SZ 0xa0 | ||
169 | #define STACKFRAME_SZ 0xc0 | ||
170 | |||
171 | #define TRACEREG32_SZ 0x50 | ||
172 | #define STACKFRAME32_SZ 0x60 | ||
173 | #endif /* __ASSEMBLY__ */ | ||
174 | |||
175 | #else /* (defined(__sparc__) && defined(__arch64__)) */ | ||
176 | |||
177 | /* 32 bit sparc */ | ||
178 | |||
179 | #ifndef __ASSEMBLY__ | ||
180 | |||
181 | |||
182 | #else /* (!__ASSEMBLY__) */ | ||
183 | /* For assembly code. */ | ||
184 | #define TRACEREG_SZ 0x50 | ||
185 | #define STACKFRAME_SZ 0x60 | ||
186 | #endif /* (!__ASSEMBLY__) */ | ||
187 | |||
188 | #endif /* (defined(__sparc__) && defined(__arch64__)) */ | ||
189 | |||
190 | |||
191 | /* These are for pt_regs. */ | ||
192 | #define PT_V9_G0 0x00 | ||
193 | #define PT_V9_G1 0x08 | ||
194 | #define PT_V9_G2 0x10 | ||
195 | #define PT_V9_G3 0x18 | ||
196 | #define PT_V9_G4 0x20 | ||
197 | #define PT_V9_G5 0x28 | ||
198 | #define PT_V9_G6 0x30 | ||
199 | #define PT_V9_G7 0x38 | ||
200 | #define PT_V9_I0 0x40 | ||
201 | #define PT_V9_I1 0x48 | ||
202 | #define PT_V9_I2 0x50 | ||
203 | #define PT_V9_I3 0x58 | ||
204 | #define PT_V9_I4 0x60 | ||
205 | #define PT_V9_I5 0x68 | ||
206 | #define PT_V9_I6 0x70 | ||
207 | #define PT_V9_FP PT_V9_I6 | ||
208 | #define PT_V9_I7 0x78 | ||
209 | #define PT_V9_TSTATE 0x80 | ||
210 | #define PT_V9_TPC 0x88 | ||
211 | #define PT_V9_TNPC 0x90 | ||
212 | #define PT_V9_Y 0x98 | ||
213 | #define PT_V9_MAGIC 0x9c | ||
214 | #define PT_TSTATE PT_V9_TSTATE | ||
215 | #define PT_TPC PT_V9_TPC | ||
216 | #define PT_TNPC PT_V9_TNPC | ||
217 | |||
218 | /* These for pt_regs32. */ | ||
219 | #define PT_PSR 0x0 | ||
220 | #define PT_PC 0x4 | ||
221 | #define PT_NPC 0x8 | ||
222 | #define PT_Y 0xc | ||
223 | #define PT_G0 0x10 | ||
224 | #define PT_WIM PT_G0 | ||
225 | #define PT_G1 0x14 | ||
226 | #define PT_G2 0x18 | ||
227 | #define PT_G3 0x1c | ||
228 | #define PT_G4 0x20 | ||
229 | #define PT_G5 0x24 | ||
230 | #define PT_G6 0x28 | ||
231 | #define PT_G7 0x2c | ||
232 | #define PT_I0 0x30 | ||
233 | #define PT_I1 0x34 | ||
234 | #define PT_I2 0x38 | ||
235 | #define PT_I3 0x3c | ||
236 | #define PT_I4 0x40 | ||
237 | #define PT_I5 0x44 | ||
238 | #define PT_I6 0x48 | ||
239 | #define PT_FP PT_I6 | ||
240 | #define PT_I7 0x4c | ||
241 | |||
242 | /* Reg_window offsets */ | ||
243 | #define RW_V9_L0 0x00 | ||
244 | #define RW_V9_L1 0x08 | ||
245 | #define RW_V9_L2 0x10 | ||
246 | #define RW_V9_L3 0x18 | ||
247 | #define RW_V9_L4 0x20 | ||
248 | #define RW_V9_L5 0x28 | ||
249 | #define RW_V9_L6 0x30 | ||
250 | #define RW_V9_L7 0x38 | ||
251 | #define RW_V9_I0 0x40 | ||
252 | #define RW_V9_I1 0x48 | ||
253 | #define RW_V9_I2 0x50 | ||
254 | #define RW_V9_I3 0x58 | ||
255 | #define RW_V9_I4 0x60 | ||
256 | #define RW_V9_I5 0x68 | ||
257 | #define RW_V9_I6 0x70 | ||
258 | #define RW_V9_I7 0x78 | ||
259 | |||
260 | #define RW_L0 0x00 | ||
261 | #define RW_L1 0x04 | ||
262 | #define RW_L2 0x08 | ||
263 | #define RW_L3 0x0c | ||
264 | #define RW_L4 0x10 | ||
265 | #define RW_L5 0x14 | ||
266 | #define RW_L6 0x18 | ||
267 | #define RW_L7 0x1c | ||
268 | #define RW_I0 0x20 | ||
269 | #define RW_I1 0x24 | ||
270 | #define RW_I2 0x28 | ||
271 | #define RW_I3 0x2c | ||
272 | #define RW_I4 0x30 | ||
273 | #define RW_I5 0x34 | ||
274 | #define RW_I6 0x38 | ||
275 | #define RW_I7 0x3c | ||
276 | |||
277 | /* Stack_frame offsets */ | ||
278 | #define SF_V9_L0 0x00 | ||
279 | #define SF_V9_L1 0x08 | ||
280 | #define SF_V9_L2 0x10 | ||
281 | #define SF_V9_L3 0x18 | ||
282 | #define SF_V9_L4 0x20 | ||
283 | #define SF_V9_L5 0x28 | ||
284 | #define SF_V9_L6 0x30 | ||
285 | #define SF_V9_L7 0x38 | ||
286 | #define SF_V9_I0 0x40 | ||
287 | #define SF_V9_I1 0x48 | ||
288 | #define SF_V9_I2 0x50 | ||
289 | #define SF_V9_I3 0x58 | ||
290 | #define SF_V9_I4 0x60 | ||
291 | #define SF_V9_I5 0x68 | ||
292 | #define SF_V9_FP 0x70 | ||
293 | #define SF_V9_PC 0x78 | ||
294 | #define SF_V9_RETP 0x80 | ||
295 | #define SF_V9_XARG0 0x88 | ||
296 | #define SF_V9_XARG1 0x90 | ||
297 | #define SF_V9_XARG2 0x98 | ||
298 | #define SF_V9_XARG3 0xa0 | ||
299 | #define SF_V9_XARG4 0xa8 | ||
300 | #define SF_V9_XARG5 0xb0 | ||
301 | #define SF_V9_XXARG 0xb8 | ||
302 | |||
303 | #define SF_L0 0x00 | ||
304 | #define SF_L1 0x04 | ||
305 | #define SF_L2 0x08 | ||
306 | #define SF_L3 0x0c | ||
307 | #define SF_L4 0x10 | ||
308 | #define SF_L5 0x14 | ||
309 | #define SF_L6 0x18 | ||
310 | #define SF_L7 0x1c | ||
311 | #define SF_I0 0x20 | ||
312 | #define SF_I1 0x24 | ||
313 | #define SF_I2 0x28 | ||
314 | #define SF_I3 0x2c | ||
315 | #define SF_I4 0x30 | ||
316 | #define SF_I5 0x34 | ||
317 | #define SF_FP 0x38 | ||
318 | #define SF_PC 0x3c | ||
319 | #define SF_RETP 0x40 | ||
320 | #define SF_XARG0 0x44 | ||
321 | #define SF_XARG1 0x48 | ||
322 | #define SF_XARG2 0x4c | ||
323 | #define SF_XARG3 0x50 | ||
324 | #define SF_XARG4 0x54 | ||
325 | #define SF_XARG5 0x58 | ||
326 | #define SF_XXARG 0x5c | ||
327 | |||
328 | |||
329 | /* Stuff for the ptrace system call */ | ||
330 | #define PTRACE_SPARC_DETACH 11 | ||
331 | #define PTRACE_GETREGS 12 | ||
332 | #define PTRACE_SETREGS 13 | ||
333 | #define PTRACE_GETFPREGS 14 | ||
334 | #define PTRACE_SETFPREGS 15 | ||
335 | #define PTRACE_READDATA 16 | ||
336 | #define PTRACE_WRITEDATA 17 | ||
337 | #define PTRACE_READTEXT 18 | ||
338 | #define PTRACE_WRITETEXT 19 | ||
339 | #define PTRACE_GETFPAREGS 20 | ||
340 | #define PTRACE_SETFPAREGS 21 | ||
341 | |||
342 | /* There are for debugging 64-bit processes, either from a 32 or 64 bit | ||
343 | * parent. Thus their complements are for debugging 32-bit processes only. | ||
344 | */ | ||
345 | |||
346 | #define PTRACE_GETREGS64 22 | ||
347 | #define PTRACE_SETREGS64 23 | ||
348 | /* PTRACE_SYSCALL is 24 */ | ||
349 | #define PTRACE_GETFPREGS64 25 | ||
350 | #define PTRACE_SETFPREGS64 26 | ||
351 | |||
352 | #endif /* _UAPI__SPARC_PTRACE_H */ | ||
diff --git a/arch/sparc/include/asm/resource.h b/arch/sparc/include/uapi/asm/resource.h index fe163cafb4c7..fe163cafb4c7 100644 --- a/arch/sparc/include/asm/resource.h +++ b/arch/sparc/include/uapi/asm/resource.h | |||
diff --git a/arch/sparc/include/asm/sembuf.h b/arch/sparc/include/uapi/asm/sembuf.h index faee1be08d67..faee1be08d67 100644 --- a/arch/sparc/include/asm/sembuf.h +++ b/arch/sparc/include/uapi/asm/sembuf.h | |||
diff --git a/arch/sparc/include/uapi/asm/setup.h b/arch/sparc/include/uapi/asm/setup.h new file mode 100644 index 000000000000..533768450872 --- /dev/null +++ b/arch/sparc/include/uapi/asm/setup.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * Just a place holder. | ||
3 | */ | ||
4 | |||
5 | #ifndef _UAPI_SPARC_SETUP_H | ||
6 | #define _UAPI_SPARC_SETUP_H | ||
7 | |||
8 | #if defined(__sparc__) && defined(__arch64__) | ||
9 | # define COMMAND_LINE_SIZE 2048 | ||
10 | #else | ||
11 | # define COMMAND_LINE_SIZE 256 | ||
12 | #endif | ||
13 | |||
14 | |||
15 | #endif /* _UAPI_SPARC_SETUP_H */ | ||
diff --git a/arch/sparc/include/asm/shmbuf.h b/arch/sparc/include/uapi/asm/shmbuf.h index 83a16055363f..83a16055363f 100644 --- a/arch/sparc/include/asm/shmbuf.h +++ b/arch/sparc/include/uapi/asm/shmbuf.h | |||
diff --git a/arch/sparc/include/uapi/asm/sigcontext.h b/arch/sparc/include/uapi/asm/sigcontext.h new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/arch/sparc/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/sparc/include/uapi/asm/siginfo.h b/arch/sparc/include/uapi/asm/siginfo.h new file mode 100644 index 000000000000..2d9b79ccaa50 --- /dev/null +++ b/arch/sparc/include/uapi/asm/siginfo.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _UAPI__SPARC_SIGINFO_H | ||
2 | #define _UAPI__SPARC_SIGINFO_H | ||
3 | |||
4 | #if defined(__sparc__) && defined(__arch64__) | ||
5 | |||
6 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | ||
7 | #define __ARCH_SI_BAND_T int | ||
8 | |||
9 | #endif /* defined(__sparc__) && defined(__arch64__) */ | ||
10 | |||
11 | |||
12 | #define __ARCH_SI_TRAPNO | ||
13 | |||
14 | #include <asm-generic/siginfo.h> | ||
15 | |||
16 | |||
17 | #define SI_NOINFO 32767 /* no information in siginfo_t */ | ||
18 | |||
19 | /* | ||
20 | * SIGEMT si_codes | ||
21 | */ | ||
22 | #define EMT_TAGOVF (__SI_FAULT|1) /* tag overflow */ | ||
23 | #define NSIGEMT 1 | ||
24 | |||
25 | #endif /* _UAPI__SPARC_SIGINFO_H */ | ||
diff --git a/arch/sparc/include/uapi/asm/signal.h b/arch/sparc/include/uapi/asm/signal.h new file mode 100644 index 000000000000..1a041892538f --- /dev/null +++ b/arch/sparc/include/uapi/asm/signal.h | |||
@@ -0,0 +1,185 @@ | |||
1 | #ifndef _UAPI__SPARC_SIGNAL_H | ||
2 | #define _UAPI__SPARC_SIGNAL_H | ||
3 | |||
4 | #include <asm/sigcontext.h> | ||
5 | #include <linux/compiler.h> | ||
6 | |||
7 | |||
8 | /* On the Sparc the signal handlers get passed a 'sub-signal' code | ||
9 | * for certain signal types, which we document here. | ||
10 | */ | ||
11 | #define SIGHUP 1 | ||
12 | #define SIGINT 2 | ||
13 | #define SIGQUIT 3 | ||
14 | #define SIGILL 4 | ||
15 | #define SUBSIG_STACK 0 | ||
16 | #define SUBSIG_ILLINST 2 | ||
17 | #define SUBSIG_PRIVINST 3 | ||
18 | #define SUBSIG_BADTRAP(t) (0x80 + (t)) | ||
19 | |||
20 | #define SIGTRAP 5 | ||
21 | #define SIGABRT 6 | ||
22 | #define SIGIOT 6 | ||
23 | |||
24 | #define SIGEMT 7 | ||
25 | #define SUBSIG_TAG 10 | ||
26 | |||
27 | #define SIGFPE 8 | ||
28 | #define SUBSIG_FPDISABLED 0x400 | ||
29 | #define SUBSIG_FPERROR 0x404 | ||
30 | #define SUBSIG_FPINTOVFL 0x001 | ||
31 | #define SUBSIG_FPSTSIG 0x002 | ||
32 | #define SUBSIG_IDIVZERO 0x014 | ||
33 | #define SUBSIG_FPINEXACT 0x0c4 | ||
34 | #define SUBSIG_FPDIVZERO 0x0c8 | ||
35 | #define SUBSIG_FPUNFLOW 0x0cc | ||
36 | #define SUBSIG_FPOPERROR 0x0d0 | ||
37 | #define SUBSIG_FPOVFLOW 0x0d4 | ||
38 | |||
39 | #define SIGKILL 9 | ||
40 | #define SIGBUS 10 | ||
41 | #define SUBSIG_BUSTIMEOUT 1 | ||
42 | #define SUBSIG_ALIGNMENT 2 | ||
43 | #define SUBSIG_MISCERROR 5 | ||
44 | |||
45 | #define SIGSEGV 11 | ||
46 | #define SUBSIG_NOMAPPING 3 | ||
47 | #define SUBSIG_PROTECTION 4 | ||
48 | #define SUBSIG_SEGERROR 5 | ||
49 | |||
50 | #define SIGSYS 12 | ||
51 | |||
52 | #define SIGPIPE 13 | ||
53 | #define SIGALRM 14 | ||
54 | #define SIGTERM 15 | ||
55 | #define SIGURG 16 | ||
56 | |||
57 | /* SunOS values which deviate from the Linux/i386 ones */ | ||
58 | #define SIGSTOP 17 | ||
59 | #define SIGTSTP 18 | ||
60 | #define SIGCONT 19 | ||
61 | #define SIGCHLD 20 | ||
62 | #define SIGTTIN 21 | ||
63 | #define SIGTTOU 22 | ||
64 | #define SIGIO 23 | ||
65 | #define SIGPOLL SIGIO /* SysV name for SIGIO */ | ||
66 | #define SIGXCPU 24 | ||
67 | #define SIGXFSZ 25 | ||
68 | #define SIGVTALRM 26 | ||
69 | #define SIGPROF 27 | ||
70 | #define SIGWINCH 28 | ||
71 | #define SIGLOST 29 | ||
72 | #define SIGPWR SIGLOST | ||
73 | #define SIGUSR1 30 | ||
74 | #define SIGUSR2 31 | ||
75 | |||
76 | /* Most things should be clean enough to redefine this at will, if care | ||
77 | is taken to make libc match. */ | ||
78 | |||
79 | #define __OLD_NSIG 32 | ||
80 | #define __NEW_NSIG 64 | ||
81 | #ifdef __arch64__ | ||
82 | #define _NSIG_BPW 64 | ||
83 | #else | ||
84 | #define _NSIG_BPW 32 | ||
85 | #endif | ||
86 | #define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW) | ||
87 | |||
88 | #define SIGRTMIN 32 | ||
89 | #define SIGRTMAX __NEW_NSIG | ||
90 | |||
91 | #if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__) | ||
92 | #define _NSIG __NEW_NSIG | ||
93 | #define __new_sigset_t sigset_t | ||
94 | #define __new_sigaction sigaction | ||
95 | #define __new_sigaction32 sigaction32 | ||
96 | #define __old_sigset_t old_sigset_t | ||
97 | #define __old_sigaction old_sigaction | ||
98 | #define __old_sigaction32 old_sigaction32 | ||
99 | #else | ||
100 | #define _NSIG __OLD_NSIG | ||
101 | #define NSIG _NSIG | ||
102 | #define __old_sigset_t sigset_t | ||
103 | #define __old_sigaction sigaction | ||
104 | #define __old_sigaction32 sigaction32 | ||
105 | #endif | ||
106 | |||
107 | #ifndef __ASSEMBLY__ | ||
108 | |||
109 | typedef unsigned long __old_sigset_t; /* at least 32 bits */ | ||
110 | |||
111 | typedef struct { | ||
112 | unsigned long sig[_NSIG_WORDS]; | ||
113 | } __new_sigset_t; | ||
114 | |||
115 | /* A SunOS sigstack */ | ||
116 | struct sigstack { | ||
117 | /* XXX 32-bit pointers pinhead XXX */ | ||
118 | char *the_stack; | ||
119 | int cur_status; | ||
120 | }; | ||
121 | |||
122 | /* Sigvec flags */ | ||
123 | #define _SV_SSTACK 1u /* This signal handler should use sig-stack */ | ||
124 | #define _SV_INTR 2u /* Sig return should not restart system call */ | ||
125 | #define _SV_RESET 4u /* Set handler to SIG_DFL upon taken signal */ | ||
126 | #define _SV_IGNCHILD 8u /* Do not send SIGCHLD */ | ||
127 | |||
128 | /* | ||
129 | * sa_flags values: SA_STACK is not currently supported, but will allow the | ||
130 | * usage of signal stacks by using the (now obsolete) sa_restorer field in | ||
131 | * the sigaction structure as a stack pointer. This is now possible due to | ||
132 | * the changes in signal handling. LBT 010493. | ||
133 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
134 | */ | ||
135 | #define SA_NOCLDSTOP _SV_IGNCHILD | ||
136 | #define SA_STACK _SV_SSTACK | ||
137 | #define SA_ONSTACK _SV_SSTACK | ||
138 | #define SA_RESTART _SV_INTR | ||
139 | #define SA_ONESHOT _SV_RESET | ||
140 | #define SA_NODEFER 0x20u | ||
141 | #define SA_NOCLDWAIT 0x100u | ||
142 | #define SA_SIGINFO 0x200u | ||
143 | |||
144 | #define SA_NOMASK SA_NODEFER | ||
145 | |||
146 | #define SIG_BLOCK 0x01 /* for blocking signals */ | ||
147 | #define SIG_UNBLOCK 0x02 /* for unblocking signals */ | ||
148 | #define SIG_SETMASK 0x04 /* for setting the signal mask */ | ||
149 | |||
150 | /* | ||
151 | * sigaltstack controls | ||
152 | */ | ||
153 | #define SS_ONSTACK 1 | ||
154 | #define SS_DISABLE 2 | ||
155 | |||
156 | #define MINSIGSTKSZ 4096 | ||
157 | #define SIGSTKSZ 16384 | ||
158 | |||
159 | |||
160 | #include <asm-generic/signal-defs.h> | ||
161 | |||
162 | struct __new_sigaction { | ||
163 | __sighandler_t sa_handler; | ||
164 | unsigned long sa_flags; | ||
165 | __sigrestore_t sa_restorer; /* not used by Linux/SPARC yet */ | ||
166 | __new_sigset_t sa_mask; | ||
167 | }; | ||
168 | |||
169 | struct __old_sigaction { | ||
170 | __sighandler_t sa_handler; | ||
171 | __old_sigset_t sa_mask; | ||
172 | unsigned long sa_flags; | ||
173 | void (*sa_restorer)(void); /* not used by Linux/SPARC yet */ | ||
174 | }; | ||
175 | |||
176 | typedef struct sigaltstack { | ||
177 | void __user *ss_sp; | ||
178 | int ss_flags; | ||
179 | size_t ss_size; | ||
180 | } stack_t; | ||
181 | |||
182 | |||
183 | #endif /* !(__ASSEMBLY__) */ | ||
184 | |||
185 | #endif /* _UAPI__SPARC_SIGNAL_H */ | ||
diff --git a/arch/sparc/include/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h index bea1568ae4af..bea1568ae4af 100644 --- a/arch/sparc/include/asm/socket.h +++ b/arch/sparc/include/uapi/asm/socket.h | |||
diff --git a/arch/sparc/include/asm/sockios.h b/arch/sparc/include/uapi/asm/sockios.h index 990ea746486b..990ea746486b 100644 --- a/arch/sparc/include/asm/sockios.h +++ b/arch/sparc/include/uapi/asm/sockios.h | |||
diff --git a/arch/sparc/include/asm/stat.h b/arch/sparc/include/uapi/asm/stat.h index a232e9e1f4e5..a232e9e1f4e5 100644 --- a/arch/sparc/include/asm/stat.h +++ b/arch/sparc/include/uapi/asm/stat.h | |||
diff --git a/arch/sparc/include/asm/statfs.h b/arch/sparc/include/uapi/asm/statfs.h index 55e607ad461d..55e607ad461d 100644 --- a/arch/sparc/include/asm/statfs.h +++ b/arch/sparc/include/uapi/asm/statfs.h | |||
diff --git a/arch/sparc/include/asm/swab.h b/arch/sparc/include/uapi/asm/swab.h index a34ad079487e..a34ad079487e 100644 --- a/arch/sparc/include/asm/swab.h +++ b/arch/sparc/include/uapi/asm/swab.h | |||
diff --git a/arch/sparc/include/uapi/asm/termbits.h b/arch/sparc/include/uapi/asm/termbits.h new file mode 100644 index 000000000000..dd91642fcca7 --- /dev/null +++ b/arch/sparc/include/uapi/asm/termbits.h | |||
@@ -0,0 +1,263 @@ | |||
1 | #ifndef _UAPI_SPARC_TERMBITS_H | ||
2 | #define _UAPI_SPARC_TERMBITS_H | ||
3 | |||
4 | #include <linux/posix_types.h> | ||
5 | |||
6 | typedef unsigned char cc_t; | ||
7 | typedef unsigned int speed_t; | ||
8 | |||
9 | #if defined(__sparc__) && defined(__arch64__) | ||
10 | typedef unsigned int tcflag_t; | ||
11 | #else | ||
12 | typedef unsigned long tcflag_t; | ||
13 | #endif | ||
14 | |||
15 | #define NCC 8 | ||
16 | struct termio { | ||
17 | unsigned short c_iflag; /* input mode flags */ | ||
18 | unsigned short c_oflag; /* output mode flags */ | ||
19 | unsigned short c_cflag; /* control mode flags */ | ||
20 | unsigned short c_lflag; /* local mode flags */ | ||
21 | unsigned char c_line; /* line discipline */ | ||
22 | unsigned char c_cc[NCC]; /* control characters */ | ||
23 | }; | ||
24 | |||
25 | #define NCCS 17 | ||
26 | struct termios { | ||
27 | tcflag_t c_iflag; /* input mode flags */ | ||
28 | tcflag_t c_oflag; /* output mode flags */ | ||
29 | tcflag_t c_cflag; /* control mode flags */ | ||
30 | tcflag_t c_lflag; /* local mode flags */ | ||
31 | cc_t c_line; /* line discipline */ | ||
32 | #ifndef __KERNEL__ | ||
33 | cc_t c_cc[NCCS]; /* control characters */ | ||
34 | #else | ||
35 | cc_t c_cc[NCCS+2]; /* kernel needs 2 more to hold vmin/vtime */ | ||
36 | #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) | ||
37 | #endif | ||
38 | }; | ||
39 | |||
40 | struct termios2 { | ||
41 | tcflag_t c_iflag; /* input mode flags */ | ||
42 | tcflag_t c_oflag; /* output mode flags */ | ||
43 | tcflag_t c_cflag; /* control mode flags */ | ||
44 | tcflag_t c_lflag; /* local mode flags */ | ||
45 | cc_t c_line; /* line discipline */ | ||
46 | cc_t c_cc[NCCS+2]; /* control characters */ | ||
47 | speed_t c_ispeed; /* input speed */ | ||
48 | speed_t c_ospeed; /* output speed */ | ||
49 | }; | ||
50 | |||
51 | struct ktermios { | ||
52 | tcflag_t c_iflag; /* input mode flags */ | ||
53 | tcflag_t c_oflag; /* output mode flags */ | ||
54 | tcflag_t c_cflag; /* control mode flags */ | ||
55 | tcflag_t c_lflag; /* local mode flags */ | ||
56 | cc_t c_line; /* line discipline */ | ||
57 | cc_t c_cc[NCCS+2]; /* control characters */ | ||
58 | speed_t c_ispeed; /* input speed */ | ||
59 | speed_t c_ospeed; /* output speed */ | ||
60 | }; | ||
61 | |||
62 | /* c_cc characters */ | ||
63 | #define VINTR 0 | ||
64 | #define VQUIT 1 | ||
65 | #define VERASE 2 | ||
66 | #define VKILL 3 | ||
67 | #define VEOF 4 | ||
68 | #define VEOL 5 | ||
69 | #define VEOL2 6 | ||
70 | #define VSWTC 7 | ||
71 | #define VSTART 8 | ||
72 | #define VSTOP 9 | ||
73 | |||
74 | |||
75 | |||
76 | #define VSUSP 10 | ||
77 | #define VDSUSP 11 /* SunOS POSIX nicety I do believe... */ | ||
78 | #define VREPRINT 12 | ||
79 | #define VDISCARD 13 | ||
80 | #define VWERASE 14 | ||
81 | #define VLNEXT 15 | ||
82 | |||
83 | /* Kernel keeps vmin/vtime separated, user apps assume vmin/vtime is | ||
84 | * shared with eof/eol | ||
85 | */ | ||
86 | #ifndef __KERNEL__ | ||
87 | #define VMIN VEOF | ||
88 | #define VTIME VEOL | ||
89 | #endif | ||
90 | |||
91 | /* c_iflag bits */ | ||
92 | #define IGNBRK 0x00000001 | ||
93 | #define BRKINT 0x00000002 | ||
94 | #define IGNPAR 0x00000004 | ||
95 | #define PARMRK 0x00000008 | ||
96 | #define INPCK 0x00000010 | ||
97 | #define ISTRIP 0x00000020 | ||
98 | #define INLCR 0x00000040 | ||
99 | #define IGNCR 0x00000080 | ||
100 | #define ICRNL 0x00000100 | ||
101 | #define IUCLC 0x00000200 | ||
102 | #define IXON 0x00000400 | ||
103 | #define IXANY 0x00000800 | ||
104 | #define IXOFF 0x00001000 | ||
105 | #define IMAXBEL 0x00002000 | ||
106 | #define IUTF8 0x00004000 | ||
107 | |||
108 | /* c_oflag bits */ | ||
109 | #define OPOST 0x00000001 | ||
110 | #define OLCUC 0x00000002 | ||
111 | #define ONLCR 0x00000004 | ||
112 | #define OCRNL 0x00000008 | ||
113 | #define ONOCR 0x00000010 | ||
114 | #define ONLRET 0x00000020 | ||
115 | #define OFILL 0x00000040 | ||
116 | #define OFDEL 0x00000080 | ||
117 | #define NLDLY 0x00000100 | ||
118 | #define NL0 0x00000000 | ||
119 | #define NL1 0x00000100 | ||
120 | #define CRDLY 0x00000600 | ||
121 | #define CR0 0x00000000 | ||
122 | #define CR1 0x00000200 | ||
123 | #define CR2 0x00000400 | ||
124 | #define CR3 0x00000600 | ||
125 | #define TABDLY 0x00001800 | ||
126 | #define TAB0 0x00000000 | ||
127 | #define TAB1 0x00000800 | ||
128 | #define TAB2 0x00001000 | ||
129 | #define TAB3 0x00001800 | ||
130 | #define XTABS 0x00001800 | ||
131 | #define BSDLY 0x00002000 | ||
132 | #define BS0 0x00000000 | ||
133 | #define BS1 0x00002000 | ||
134 | #define VTDLY 0x00004000 | ||
135 | #define VT0 0x00000000 | ||
136 | #define VT1 0x00004000 | ||
137 | #define FFDLY 0x00008000 | ||
138 | #define FF0 0x00000000 | ||
139 | #define FF1 0x00008000 | ||
140 | #define PAGEOUT 0x00010000 /* SUNOS specific */ | ||
141 | #define WRAP 0x00020000 /* SUNOS specific */ | ||
142 | |||
143 | /* c_cflag bit meaning */ | ||
144 | #define CBAUD 0x0000100f | ||
145 | #define B0 0x00000000 /* hang up */ | ||
146 | #define B50 0x00000001 | ||
147 | #define B75 0x00000002 | ||
148 | #define B110 0x00000003 | ||
149 | #define B134 0x00000004 | ||
150 | #define B150 0x00000005 | ||
151 | #define B200 0x00000006 | ||
152 | #define B300 0x00000007 | ||
153 | #define B600 0x00000008 | ||
154 | #define B1200 0x00000009 | ||
155 | #define B1800 0x0000000a | ||
156 | #define B2400 0x0000000b | ||
157 | #define B4800 0x0000000c | ||
158 | #define B9600 0x0000000d | ||
159 | #define B19200 0x0000000e | ||
160 | #define B38400 0x0000000f | ||
161 | #define EXTA B19200 | ||
162 | #define EXTB B38400 | ||
163 | #define CSIZE 0x00000030 | ||
164 | #define CS5 0x00000000 | ||
165 | #define CS6 0x00000010 | ||
166 | #define CS7 0x00000020 | ||
167 | #define CS8 0x00000030 | ||
168 | #define CSTOPB 0x00000040 | ||
169 | #define CREAD 0x00000080 | ||
170 | #define PARENB 0x00000100 | ||
171 | #define PARODD 0x00000200 | ||
172 | #define HUPCL 0x00000400 | ||
173 | #define CLOCAL 0x00000800 | ||
174 | #define CBAUDEX 0x00001000 | ||
175 | /* We'll never see these speeds with the Zilogs, but for completeness... */ | ||
176 | #define BOTHER 0x00001000 | ||
177 | #define B57600 0x00001001 | ||
178 | #define B115200 0x00001002 | ||
179 | #define B230400 0x00001003 | ||
180 | #define B460800 0x00001004 | ||
181 | /* This is what we can do with the Zilogs. */ | ||
182 | #define B76800 0x00001005 | ||
183 | /* This is what we can do with the SAB82532. */ | ||
184 | #define B153600 0x00001006 | ||
185 | #define B307200 0x00001007 | ||
186 | #define B614400 0x00001008 | ||
187 | #define B921600 0x00001009 | ||
188 | /* And these are the rest... */ | ||
189 | #define B500000 0x0000100a | ||
190 | #define B576000 0x0000100b | ||
191 | #define B1000000 0x0000100c | ||
192 | #define B1152000 0x0000100d | ||
193 | #define B1500000 0x0000100e | ||
194 | #define B2000000 0x0000100f | ||
195 | /* These have totally bogus values and nobody uses them | ||
196 | so far. Later on we'd have to use say 0x10000x and | ||
197 | adjust CBAUD constant and drivers accordingly. | ||
198 | #define B2500000 0x00001010 | ||
199 | #define B3000000 0x00001011 | ||
200 | #define B3500000 0x00001012 | ||
201 | #define B4000000 0x00001013 */ | ||
202 | #define CIBAUD 0x100f0000 /* input baud rate (not used) */ | ||
203 | #define CMSPAR 0x40000000 /* mark or space (stick) parity */ | ||
204 | #define CRTSCTS 0x80000000 /* flow control */ | ||
205 | |||
206 | #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ | ||
207 | |||
208 | /* c_lflag bits */ | ||
209 | #define ISIG 0x00000001 | ||
210 | #define ICANON 0x00000002 | ||
211 | #define XCASE 0x00000004 | ||
212 | #define ECHO 0x00000008 | ||
213 | #define ECHOE 0x00000010 | ||
214 | #define ECHOK 0x00000020 | ||
215 | #define ECHONL 0x00000040 | ||
216 | #define NOFLSH 0x00000080 | ||
217 | #define TOSTOP 0x00000100 | ||
218 | #define ECHOCTL 0x00000200 | ||
219 | #define ECHOPRT 0x00000400 | ||
220 | #define ECHOKE 0x00000800 | ||
221 | #define DEFECHO 0x00001000 /* SUNOS thing, what is it? */ | ||
222 | #define FLUSHO 0x00002000 | ||
223 | #define PENDIN 0x00004000 | ||
224 | #define IEXTEN 0x00008000 | ||
225 | #define EXTPROC 0x00010000 | ||
226 | |||
227 | /* modem lines */ | ||
228 | #define TIOCM_LE 0x001 | ||
229 | #define TIOCM_DTR 0x002 | ||
230 | #define TIOCM_RTS 0x004 | ||
231 | #define TIOCM_ST 0x008 | ||
232 | #define TIOCM_SR 0x010 | ||
233 | #define TIOCM_CTS 0x020 | ||
234 | #define TIOCM_CAR 0x040 | ||
235 | #define TIOCM_RNG 0x080 | ||
236 | #define TIOCM_DSR 0x100 | ||
237 | #define TIOCM_CD TIOCM_CAR | ||
238 | #define TIOCM_RI TIOCM_RNG | ||
239 | #define TIOCM_OUT1 0x2000 | ||
240 | #define TIOCM_OUT2 0x4000 | ||
241 | #define TIOCM_LOOP 0x8000 | ||
242 | |||
243 | /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ | ||
244 | #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ||
245 | |||
246 | |||
247 | /* tcflow() and TCXONC use these */ | ||
248 | #define TCOOFF 0 | ||
249 | #define TCOON 1 | ||
250 | #define TCIOFF 2 | ||
251 | #define TCION 3 | ||
252 | |||
253 | /* tcflush() and TCFLSH use these */ | ||
254 | #define TCIFLUSH 0 | ||
255 | #define TCOFLUSH 1 | ||
256 | #define TCIOFLUSH 2 | ||
257 | |||
258 | /* tcsetattr uses these */ | ||
259 | #define TCSANOW 0 | ||
260 | #define TCSADRAIN 1 | ||
261 | #define TCSAFLUSH 2 | ||
262 | |||
263 | #endif /* _UAPI_SPARC_TERMBITS_H */ | ||
diff --git a/arch/sparc/include/uapi/asm/termios.h b/arch/sparc/include/uapi/asm/termios.h new file mode 100644 index 000000000000..ea6f09e51e53 --- /dev/null +++ b/arch/sparc/include/uapi/asm/termios.h | |||
@@ -0,0 +1,43 @@ | |||
1 | #ifndef _UAPI_SPARC_TERMIOS_H | ||
2 | #define _UAPI_SPARC_TERMIOS_H | ||
3 | |||
4 | #include <asm/ioctls.h> | ||
5 | #include <asm/termbits.h> | ||
6 | |||
7 | #if defined(__KERNEL__) || defined(__DEFINE_BSD_TERMIOS) | ||
8 | struct sgttyb { | ||
9 | char sg_ispeed; | ||
10 | char sg_ospeed; | ||
11 | char sg_erase; | ||
12 | char sg_kill; | ||
13 | short sg_flags; | ||
14 | }; | ||
15 | |||
16 | struct tchars { | ||
17 | char t_intrc; | ||
18 | char t_quitc; | ||
19 | char t_startc; | ||
20 | char t_stopc; | ||
21 | char t_eofc; | ||
22 | char t_brkc; | ||
23 | }; | ||
24 | |||
25 | struct ltchars { | ||
26 | char t_suspc; | ||
27 | char t_dsuspc; | ||
28 | char t_rprntc; | ||
29 | char t_flushc; | ||
30 | char t_werasc; | ||
31 | char t_lnextc; | ||
32 | }; | ||
33 | #endif /* __KERNEL__ */ | ||
34 | |||
35 | struct winsize { | ||
36 | unsigned short ws_row; | ||
37 | unsigned short ws_col; | ||
38 | unsigned short ws_xpixel; | ||
39 | unsigned short ws_ypixel; | ||
40 | }; | ||
41 | |||
42 | |||
43 | #endif /* _UAPI_SPARC_TERMIOS_H */ | ||
diff --git a/arch/sparc/include/uapi/asm/traps.h b/arch/sparc/include/uapi/asm/traps.h new file mode 100644 index 000000000000..a4eceace6ccf --- /dev/null +++ b/arch/sparc/include/uapi/asm/traps.h | |||
@@ -0,0 +1,120 @@ | |||
1 | /* | ||
2 | * traps.h: Format of entries for the Sparc trap table. | ||
3 | * | ||
4 | * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) | ||
5 | */ | ||
6 | |||
7 | #ifndef _UAPI_SPARC_TRAPS_H | ||
8 | #define _UAPI_SPARC_TRAPS_H | ||
9 | |||
10 | #define NUM_SPARC_TRAPS 255 | ||
11 | |||
12 | #ifndef __ASSEMBLY__ | ||
13 | #endif /* !(__ASSEMBLY__) */ | ||
14 | |||
15 | /* For patching the trap table at boot time, we need to know how to | ||
16 | * form various common Sparc instructions. Thus these macros... | ||
17 | */ | ||
18 | |||
19 | #define SPARC_MOV_CONST_L3(const) (0xa6102000 | (const&0xfff)) | ||
20 | |||
21 | /* The following assumes that the branch lies before the place we | ||
22 | * are branching to. This is the case for a trap vector... | ||
23 | * You have been warned. | ||
24 | */ | ||
25 | #define SPARC_BRANCH(dest_addr, inst_addr) \ | ||
26 | (0x10800000 | (((dest_addr-inst_addr)>>2)&0x3fffff)) | ||
27 | |||
28 | #define SPARC_RD_PSR_L0 (0xa1480000) | ||
29 | #define SPARC_RD_WIM_L3 (0xa7500000) | ||
30 | #define SPARC_NOP (0x01000000) | ||
31 | |||
32 | /* Various interesting trap levels. */ | ||
33 | /* First, hardware traps. */ | ||
34 | #define SP_TRAP_TFLT 0x1 /* Text fault */ | ||
35 | #define SP_TRAP_II 0x2 /* Illegal Instruction */ | ||
36 | #define SP_TRAP_PI 0x3 /* Privileged Instruction */ | ||
37 | #define SP_TRAP_FPD 0x4 /* Floating Point Disabled */ | ||
38 | #define SP_TRAP_WOVF 0x5 /* Window Overflow */ | ||
39 | #define SP_TRAP_WUNF 0x6 /* Window Underflow */ | ||
40 | #define SP_TRAP_MNA 0x7 /* Memory Address Unaligned */ | ||
41 | #define SP_TRAP_FPE 0x8 /* Floating Point Exception */ | ||
42 | #define SP_TRAP_DFLT 0x9 /* Data Fault */ | ||
43 | #define SP_TRAP_TOF 0xa /* Tag Overflow */ | ||
44 | #define SP_TRAP_WDOG 0xb /* Watchpoint Detected */ | ||
45 | #define SP_TRAP_IRQ1 0x11 /* IRQ level 1 */ | ||
46 | #define SP_TRAP_IRQ2 0x12 /* IRQ level 2 */ | ||
47 | #define SP_TRAP_IRQ3 0x13 /* IRQ level 3 */ | ||
48 | #define SP_TRAP_IRQ4 0x14 /* IRQ level 4 */ | ||
49 | #define SP_TRAP_IRQ5 0x15 /* IRQ level 5 */ | ||
50 | #define SP_TRAP_IRQ6 0x16 /* IRQ level 6 */ | ||
51 | #define SP_TRAP_IRQ7 0x17 /* IRQ level 7 */ | ||
52 | #define SP_TRAP_IRQ8 0x18 /* IRQ level 8 */ | ||
53 | #define SP_TRAP_IRQ9 0x19 /* IRQ level 9 */ | ||
54 | #define SP_TRAP_IRQ10 0x1a /* IRQ level 10 */ | ||
55 | #define SP_TRAP_IRQ11 0x1b /* IRQ level 11 */ | ||
56 | #define SP_TRAP_IRQ12 0x1c /* IRQ level 12 */ | ||
57 | #define SP_TRAP_IRQ13 0x1d /* IRQ level 13 */ | ||
58 | #define SP_TRAP_IRQ14 0x1e /* IRQ level 14 */ | ||
59 | #define SP_TRAP_IRQ15 0x1f /* IRQ level 15 Non-maskable */ | ||
60 | #define SP_TRAP_RACC 0x20 /* Register Access Error ??? */ | ||
61 | #define SP_TRAP_IACC 0x21 /* Instruction Access Error */ | ||
62 | #define SP_TRAP_CPDIS 0x24 /* Co-Processor Disabled */ | ||
63 | #define SP_TRAP_BADFL 0x25 /* Unimplemented Flush Instruction */ | ||
64 | #define SP_TRAP_CPEXP 0x28 /* Co-Processor Exception */ | ||
65 | #define SP_TRAP_DACC 0x29 /* Data Access Error */ | ||
66 | #define SP_TRAP_DIVZ 0x2a /* Divide By Zero */ | ||
67 | #define SP_TRAP_DSTORE 0x2b /* Data Store Error ??? */ | ||
68 | #define SP_TRAP_DMM 0x2c /* Data Access MMU Miss ??? */ | ||
69 | #define SP_TRAP_IMM 0x3c /* Instruction Access MMU Miss ??? */ | ||
70 | |||
71 | /* Now the Software Traps... */ | ||
72 | #define SP_TRAP_SUNOS 0x80 /* SunOS System Call */ | ||
73 | #define SP_TRAP_SBPT 0x81 /* Software Breakpoint */ | ||
74 | #define SP_TRAP_SDIVZ 0x82 /* Software Divide-by-Zero trap */ | ||
75 | #define SP_TRAP_FWIN 0x83 /* Flush Windows */ | ||
76 | #define SP_TRAP_CWIN 0x84 /* Clean Windows */ | ||
77 | #define SP_TRAP_RCHK 0x85 /* Range Check */ | ||
78 | #define SP_TRAP_FUNA 0x86 /* Fix Unaligned Access */ | ||
79 | #define SP_TRAP_IOWFL 0x87 /* Integer Overflow */ | ||
80 | #define SP_TRAP_SOLARIS 0x88 /* Solaris System Call */ | ||
81 | #define SP_TRAP_NETBSD 0x89 /* NetBSD System Call */ | ||
82 | #define SP_TRAP_LINUX 0x90 /* Linux System Call */ | ||
83 | |||
84 | /* Names used for compatibility with SunOS */ | ||
85 | #define ST_SYSCALL 0x00 | ||
86 | #define ST_BREAKPOINT 0x01 | ||
87 | #define ST_DIV0 0x02 | ||
88 | #define ST_FLUSH_WINDOWS 0x03 | ||
89 | #define ST_CLEAN_WINDOWS 0x04 | ||
90 | #define ST_RANGE_CHECK 0x05 | ||
91 | #define ST_FIX_ALIGN 0x06 | ||
92 | #define ST_INT_OVERFLOW 0x07 | ||
93 | |||
94 | /* Special traps... */ | ||
95 | #define SP_TRAP_KBPT1 0xfe /* KADB/PROM Breakpoint one */ | ||
96 | #define SP_TRAP_KBPT2 0xff /* KADB/PROM Breakpoint two */ | ||
97 | |||
98 | /* Handy Macros */ | ||
99 | /* Is this a trap we never expect to get? */ | ||
100 | #define BAD_TRAP_P(level) \ | ||
101 | ((level > SP_TRAP_WDOG && level < SP_TRAP_IRQ1) || \ | ||
102 | (level > SP_TRAP_IACC && level < SP_TRAP_CPDIS) || \ | ||
103 | (level > SP_TRAP_BADFL && level < SP_TRAP_CPEXP) || \ | ||
104 | (level > SP_TRAP_DMM && level < SP_TRAP_IMM) || \ | ||
105 | (level > SP_TRAP_IMM && level < SP_TRAP_SUNOS) || \ | ||
106 | (level > SP_TRAP_LINUX && level < SP_TRAP_KBPT1)) | ||
107 | |||
108 | /* Is this a Hardware trap? */ | ||
109 | #define HW_TRAP_P(level) ((level > 0) && (level < SP_TRAP_SUNOS)) | ||
110 | |||
111 | /* Is this a Software trap? */ | ||
112 | #define SW_TRAP_P(level) ((level >= SP_TRAP_SUNOS) && (level <= SP_TRAP_KBPT2)) | ||
113 | |||
114 | /* Is this a system call for some OS we know about? */ | ||
115 | #define SCALL_TRAP_P(level) ((level == SP_TRAP_SUNOS) || \ | ||
116 | (level == SP_TRAP_SOLARIS) || \ | ||
117 | (level == SP_TRAP_NETBSD) || \ | ||
118 | (level == SP_TRAP_LINUX)) | ||
119 | |||
120 | #endif /* _UAPI_SPARC_TRAPS_H */ | ||
diff --git a/arch/sparc/include/asm/types.h b/arch/sparc/include/uapi/asm/types.h index 383d156cde9c..383d156cde9c 100644 --- a/arch/sparc/include/asm/types.h +++ b/arch/sparc/include/uapi/asm/types.h | |||
diff --git a/arch/sparc/include/asm/uctx.h b/arch/sparc/include/uapi/asm/uctx.h index dc937c75ffdd..dc937c75ffdd 100644 --- a/arch/sparc/include/asm/uctx.h +++ b/arch/sparc/include/uapi/asm/uctx.h | |||
diff --git a/arch/sparc/include/uapi/asm/unistd.h b/arch/sparc/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..8974ef7ae920 --- /dev/null +++ b/arch/sparc/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,422 @@ | |||
1 | /* | ||
2 | * System calls under the Sparc. | ||
3 | * | ||
4 | * Don't be scared by the ugly clobbers, it is the only way I can | ||
5 | * think of right now to force the arguments into fixed registers | ||
6 | * before the trap into the system call with gcc 'asm' statements. | ||
7 | * | ||
8 | * Copyright (C) 1995, 2007 David S. Miller (davem@davemloft.net) | ||
9 | * | ||
10 | * SunOS compatibility based upon preliminary work which is: | ||
11 | * | ||
12 | * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) | ||
13 | */ | ||
14 | #ifndef _UAPI_SPARC_UNISTD_H | ||
15 | #define _UAPI_SPARC_UNISTD_H | ||
16 | |||
17 | #ifndef __32bit_syscall_numbers__ | ||
18 | #ifndef __arch64__ | ||
19 | #define __32bit_syscall_numbers__ | ||
20 | #endif | ||
21 | #endif | ||
22 | |||
23 | #define __NR_restart_syscall 0 /* Linux Specific */ | ||
24 | #define __NR_exit 1 /* Common */ | ||
25 | #define __NR_fork 2 /* Common */ | ||
26 | #define __NR_read 3 /* Common */ | ||
27 | #define __NR_write 4 /* Common */ | ||
28 | #define __NR_open 5 /* Common */ | ||
29 | #define __NR_close 6 /* Common */ | ||
30 | #define __NR_wait4 7 /* Common */ | ||
31 | #define __NR_creat 8 /* Common */ | ||
32 | #define __NR_link 9 /* Common */ | ||
33 | #define __NR_unlink 10 /* Common */ | ||
34 | #define __NR_execv 11 /* SunOS Specific */ | ||
35 | #define __NR_chdir 12 /* Common */ | ||
36 | #define __NR_chown 13 /* Common */ | ||
37 | #define __NR_mknod 14 /* Common */ | ||
38 | #define __NR_chmod 15 /* Common */ | ||
39 | #define __NR_lchown 16 /* Common */ | ||
40 | #define __NR_brk 17 /* Common */ | ||
41 | #define __NR_perfctr 18 /* Performance counter operations */ | ||
42 | #define __NR_lseek 19 /* Common */ | ||
43 | #define __NR_getpid 20 /* Common */ | ||
44 | #define __NR_capget 21 /* Linux Specific */ | ||
45 | #define __NR_capset 22 /* Linux Specific */ | ||
46 | #define __NR_setuid 23 /* Implemented via setreuid in SunOS */ | ||
47 | #define __NR_getuid 24 /* Common */ | ||
48 | #define __NR_vmsplice 25 /* ENOSYS under SunOS */ | ||
49 | #define __NR_ptrace 26 /* Common */ | ||
50 | #define __NR_alarm 27 /* Implemented via setitimer in SunOS */ | ||
51 | #define __NR_sigaltstack 28 /* Common */ | ||
52 | #define __NR_pause 29 /* Is sigblock(0)->sigpause() in SunOS */ | ||
53 | #define __NR_utime 30 /* Implemented via utimes() under SunOS */ | ||
54 | #ifdef __32bit_syscall_numbers__ | ||
55 | #define __NR_lchown32 31 /* Linux sparc32 specific */ | ||
56 | #define __NR_fchown32 32 /* Linux sparc32 specific */ | ||
57 | #endif | ||
58 | #define __NR_access 33 /* Common */ | ||
59 | #define __NR_nice 34 /* Implemented via get/setpriority() in SunOS */ | ||
60 | #ifdef __32bit_syscall_numbers__ | ||
61 | #define __NR_chown32 35 /* Linux sparc32 specific */ | ||
62 | #endif | ||
63 | #define __NR_sync 36 /* Common */ | ||
64 | #define __NR_kill 37 /* Common */ | ||
65 | #define __NR_stat 38 /* Common */ | ||
66 | #define __NR_sendfile 39 /* Linux Specific */ | ||
67 | #define __NR_lstat 40 /* Common */ | ||
68 | #define __NR_dup 41 /* Common */ | ||
69 | #define __NR_pipe 42 /* Common */ | ||
70 | #define __NR_times 43 /* Implemented via getrusage() in SunOS */ | ||
71 | #ifdef __32bit_syscall_numbers__ | ||
72 | #define __NR_getuid32 44 /* Linux sparc32 specific */ | ||
73 | #endif | ||
74 | #define __NR_umount2 45 /* Linux Specific */ | ||
75 | #define __NR_setgid 46 /* Implemented via setregid() in SunOS */ | ||
76 | #define __NR_getgid 47 /* Common */ | ||
77 | #define __NR_signal 48 /* Implemented via sigvec() in SunOS */ | ||
78 | #define __NR_geteuid 49 /* SunOS calls getuid() */ | ||
79 | #define __NR_getegid 50 /* SunOS calls getgid() */ | ||
80 | #define __NR_acct 51 /* Common */ | ||
81 | #ifdef __32bit_syscall_numbers__ | ||
82 | #define __NR_getgid32 53 /* Linux sparc32 specific */ | ||
83 | #else | ||
84 | #define __NR_memory_ordering 52 /* Linux Specific */ | ||
85 | #endif | ||
86 | #define __NR_ioctl 54 /* Common */ | ||
87 | #define __NR_reboot 55 /* Common */ | ||
88 | #ifdef __32bit_syscall_numbers__ | ||
89 | #define __NR_mmap2 56 /* Linux sparc32 Specific */ | ||
90 | #endif | ||
91 | #define __NR_symlink 57 /* Common */ | ||
92 | #define __NR_readlink 58 /* Common */ | ||
93 | #define __NR_execve 59 /* Common */ | ||
94 | #define __NR_umask 60 /* Common */ | ||
95 | #define __NR_chroot 61 /* Common */ | ||
96 | #define __NR_fstat 62 /* Common */ | ||
97 | #define __NR_fstat64 63 /* Linux Specific */ | ||
98 | #define __NR_getpagesize 64 /* Common */ | ||
99 | #define __NR_msync 65 /* Common in newer 1.3.x revs... */ | ||
100 | #define __NR_vfork 66 /* Common */ | ||
101 | #define __NR_pread64 67 /* Linux Specific */ | ||
102 | #define __NR_pwrite64 68 /* Linux Specific */ | ||
103 | #ifdef __32bit_syscall_numbers__ | ||
104 | #define __NR_geteuid32 69 /* Linux sparc32, sbrk under SunOS */ | ||
105 | #define __NR_getegid32 70 /* Linux sparc32, sstk under SunOS */ | ||
106 | #endif | ||
107 | #define __NR_mmap 71 /* Common */ | ||
108 | #ifdef __32bit_syscall_numbers__ | ||
109 | #define __NR_setreuid32 72 /* Linux sparc32, vadvise under SunOS */ | ||
110 | #endif | ||
111 | #define __NR_munmap 73 /* Common */ | ||
112 | #define __NR_mprotect 74 /* Common */ | ||
113 | #define __NR_madvise 75 /* Common */ | ||
114 | #define __NR_vhangup 76 /* Common */ | ||
115 | #ifdef __32bit_syscall_numbers__ | ||
116 | #define __NR_truncate64 77 /* Linux sparc32 Specific */ | ||
117 | #endif | ||
118 | #define __NR_mincore 78 /* Common */ | ||
119 | #define __NR_getgroups 79 /* Common */ | ||
120 | #define __NR_setgroups 80 /* Common */ | ||
121 | #define __NR_getpgrp 81 /* Common */ | ||
122 | #ifdef __32bit_syscall_numbers__ | ||
123 | #define __NR_setgroups32 82 /* Linux sparc32, setpgrp under SunOS */ | ||
124 | #endif | ||
125 | #define __NR_setitimer 83 /* Common */ | ||
126 | #ifdef __32bit_syscall_numbers__ | ||
127 | #define __NR_ftruncate64 84 /* Linux sparc32 Specific */ | ||
128 | #endif | ||
129 | #define __NR_swapon 85 /* Common */ | ||
130 | #define __NR_getitimer 86 /* Common */ | ||
131 | #ifdef __32bit_syscall_numbers__ | ||
132 | #define __NR_setuid32 87 /* Linux sparc32, gethostname under SunOS */ | ||
133 | #endif | ||
134 | #define __NR_sethostname 88 /* Common */ | ||
135 | #ifdef __32bit_syscall_numbers__ | ||
136 | #define __NR_setgid32 89 /* Linux sparc32, getdtablesize under SunOS */ | ||
137 | #endif | ||
138 | #define __NR_dup2 90 /* Common */ | ||
139 | #ifdef __32bit_syscall_numbers__ | ||
140 | #define __NR_setfsuid32 91 /* Linux sparc32, getdopt under SunOS */ | ||
141 | #endif | ||
142 | #define __NR_fcntl 92 /* Common */ | ||
143 | #define __NR_select 93 /* Common */ | ||
144 | #ifdef __32bit_syscall_numbers__ | ||
145 | #define __NR_setfsgid32 94 /* Linux sparc32, setdopt under SunOS */ | ||
146 | #endif | ||
147 | #define __NR_fsync 95 /* Common */ | ||
148 | #define __NR_setpriority 96 /* Common */ | ||
149 | #define __NR_socket 97 /* Common */ | ||
150 | #define __NR_connect 98 /* Common */ | ||
151 | #define __NR_accept 99 /* Common */ | ||
152 | #define __NR_getpriority 100 /* Common */ | ||
153 | #define __NR_rt_sigreturn 101 /* Linux Specific */ | ||
154 | #define __NR_rt_sigaction 102 /* Linux Specific */ | ||
155 | #define __NR_rt_sigprocmask 103 /* Linux Specific */ | ||
156 | #define __NR_rt_sigpending 104 /* Linux Specific */ | ||
157 | #define __NR_rt_sigtimedwait 105 /* Linux Specific */ | ||
158 | #define __NR_rt_sigqueueinfo 106 /* Linux Specific */ | ||
159 | #define __NR_rt_sigsuspend 107 /* Linux Specific */ | ||
160 | #ifdef __32bit_syscall_numbers__ | ||
161 | #define __NR_setresuid32 108 /* Linux Specific, sigvec under SunOS */ | ||
162 | #define __NR_getresuid32 109 /* Linux Specific, sigblock under SunOS */ | ||
163 | #define __NR_setresgid32 110 /* Linux Specific, sigsetmask under SunOS */ | ||
164 | #define __NR_getresgid32 111 /* Linux Specific, sigpause under SunOS */ | ||
165 | #define __NR_setregid32 112 /* Linux sparc32, sigstack under SunOS */ | ||
166 | #else | ||
167 | #define __NR_setresuid 108 /* Linux Specific, sigvec under SunOS */ | ||
168 | #define __NR_getresuid 109 /* Linux Specific, sigblock under SunOS */ | ||
169 | #define __NR_setresgid 110 /* Linux Specific, sigsetmask under SunOS */ | ||
170 | #define __NR_getresgid 111 /* Linux Specific, sigpause under SunOS */ | ||
171 | #endif | ||
172 | #define __NR_recvmsg 113 /* Common */ | ||
173 | #define __NR_sendmsg 114 /* Common */ | ||
174 | #ifdef __32bit_syscall_numbers__ | ||
175 | #define __NR_getgroups32 115 /* Linux sparc32, vtrace under SunOS */ | ||
176 | #endif | ||
177 | #define __NR_gettimeofday 116 /* Common */ | ||
178 | #define __NR_getrusage 117 /* Common */ | ||
179 | #define __NR_getsockopt 118 /* Common */ | ||
180 | #define __NR_getcwd 119 /* Linux Specific */ | ||
181 | #define __NR_readv 120 /* Common */ | ||
182 | #define __NR_writev 121 /* Common */ | ||
183 | #define __NR_settimeofday 122 /* Common */ | ||
184 | #define __NR_fchown 123 /* Common */ | ||
185 | #define __NR_fchmod 124 /* Common */ | ||
186 | #define __NR_recvfrom 125 /* Common */ | ||
187 | #define __NR_setreuid 126 /* Common */ | ||
188 | #define __NR_setregid 127 /* Common */ | ||
189 | #define __NR_rename 128 /* Common */ | ||
190 | #define __NR_truncate 129 /* Common */ | ||
191 | #define __NR_ftruncate 130 /* Common */ | ||
192 | #define __NR_flock 131 /* Common */ | ||
193 | #define __NR_lstat64 132 /* Linux Specific */ | ||
194 | #define __NR_sendto 133 /* Common */ | ||
195 | #define __NR_shutdown 134 /* Common */ | ||
196 | #define __NR_socketpair 135 /* Common */ | ||
197 | #define __NR_mkdir 136 /* Common */ | ||
198 | #define __NR_rmdir 137 /* Common */ | ||
199 | #define __NR_utimes 138 /* SunOS Specific */ | ||
200 | #define __NR_stat64 139 /* Linux Specific */ | ||
201 | #define __NR_sendfile64 140 /* adjtime under SunOS */ | ||
202 | #define __NR_getpeername 141 /* Common */ | ||
203 | #define __NR_futex 142 /* gethostid under SunOS */ | ||
204 | #define __NR_gettid 143 /* ENOSYS under SunOS */ | ||
205 | #define __NR_getrlimit 144 /* Common */ | ||
206 | #define __NR_setrlimit 145 /* Common */ | ||
207 | #define __NR_pivot_root 146 /* Linux Specific, killpg under SunOS */ | ||
208 | #define __NR_prctl 147 /* ENOSYS under SunOS */ | ||
209 | #define __NR_pciconfig_read 148 /* ENOSYS under SunOS */ | ||
210 | #define __NR_pciconfig_write 149 /* ENOSYS under SunOS */ | ||
211 | #define __NR_getsockname 150 /* Common */ | ||
212 | #define __NR_inotify_init 151 /* Linux specific */ | ||
213 | #define __NR_inotify_add_watch 152 /* Linux specific */ | ||
214 | #define __NR_poll 153 /* Common */ | ||
215 | #define __NR_getdents64 154 /* Linux specific */ | ||
216 | #ifdef __32bit_syscall_numbers__ | ||
217 | #define __NR_fcntl64 155 /* Linux sparc32 Specific */ | ||
218 | #endif | ||
219 | #define __NR_inotify_rm_watch 156 /* Linux specific */ | ||
220 | #define __NR_statfs 157 /* Common */ | ||
221 | #define __NR_fstatfs 158 /* Common */ | ||
222 | #define __NR_umount 159 /* Common */ | ||
223 | #define __NR_sched_set_affinity 160 /* Linux specific, async_daemon under SunOS */ | ||
224 | #define __NR_sched_get_affinity 161 /* Linux specific, getfh under SunOS */ | ||
225 | #define __NR_getdomainname 162 /* SunOS Specific */ | ||
226 | #define __NR_setdomainname 163 /* Common */ | ||
227 | #ifndef __32bit_syscall_numbers__ | ||
228 | #define __NR_utrap_install 164 /* SYSV ABI/v9 required */ | ||
229 | #endif | ||
230 | #define __NR_quotactl 165 /* Common */ | ||
231 | #define __NR_set_tid_address 166 /* Linux specific, exportfs under SunOS */ | ||
232 | #define __NR_mount 167 /* Common */ | ||
233 | #define __NR_ustat 168 /* Common */ | ||
234 | #define __NR_setxattr 169 /* SunOS: semsys */ | ||
235 | #define __NR_lsetxattr 170 /* SunOS: msgsys */ | ||
236 | #define __NR_fsetxattr 171 /* SunOS: shmsys */ | ||
237 | #define __NR_getxattr 172 /* SunOS: auditsys */ | ||
238 | #define __NR_lgetxattr 173 /* SunOS: rfssys */ | ||
239 | #define __NR_getdents 174 /* Common */ | ||
240 | #define __NR_setsid 175 /* Common */ | ||
241 | #define __NR_fchdir 176 /* Common */ | ||
242 | #define __NR_fgetxattr 177 /* SunOS: fchroot */ | ||
243 | #define __NR_listxattr 178 /* SunOS: vpixsys */ | ||
244 | #define __NR_llistxattr 179 /* SunOS: aioread */ | ||
245 | #define __NR_flistxattr 180 /* SunOS: aiowrite */ | ||
246 | #define __NR_removexattr 181 /* SunOS: aiowait */ | ||
247 | #define __NR_lremovexattr 182 /* SunOS: aiocancel */ | ||
248 | #define __NR_sigpending 183 /* Common */ | ||
249 | #define __NR_query_module 184 /* Linux Specific */ | ||
250 | #define __NR_setpgid 185 /* Common */ | ||
251 | #define __NR_fremovexattr 186 /* SunOS: pathconf */ | ||
252 | #define __NR_tkill 187 /* SunOS: fpathconf */ | ||
253 | #define __NR_exit_group 188 /* Linux specific, sysconf undef SunOS */ | ||
254 | #define __NR_uname 189 /* Linux Specific */ | ||
255 | #define __NR_init_module 190 /* Linux Specific */ | ||
256 | #define __NR_personality 191 /* Linux Specific */ | ||
257 | #define __NR_remap_file_pages 192 /* Linux Specific */ | ||
258 | #define __NR_epoll_create 193 /* Linux Specific */ | ||
259 | #define __NR_epoll_ctl 194 /* Linux Specific */ | ||
260 | #define __NR_epoll_wait 195 /* Linux Specific */ | ||
261 | #define __NR_ioprio_set 196 /* Linux Specific */ | ||
262 | #define __NR_getppid 197 /* Linux Specific */ | ||
263 | #define __NR_sigaction 198 /* Linux Specific */ | ||
264 | #define __NR_sgetmask 199 /* Linux Specific */ | ||
265 | #define __NR_ssetmask 200 /* Linux Specific */ | ||
266 | #define __NR_sigsuspend 201 /* Linux Specific */ | ||
267 | #define __NR_oldlstat 202 /* Linux Specific */ | ||
268 | #define __NR_uselib 203 /* Linux Specific */ | ||
269 | #define __NR_readdir 204 /* Linux Specific */ | ||
270 | #define __NR_readahead 205 /* Linux Specific */ | ||
271 | #define __NR_socketcall 206 /* Linux Specific */ | ||
272 | #define __NR_syslog 207 /* Linux Specific */ | ||
273 | #define __NR_lookup_dcookie 208 /* Linux Specific */ | ||
274 | #define __NR_fadvise64 209 /* Linux Specific */ | ||
275 | #define __NR_fadvise64_64 210 /* Linux Specific */ | ||
276 | #define __NR_tgkill 211 /* Linux Specific */ | ||
277 | #define __NR_waitpid 212 /* Linux Specific */ | ||
278 | #define __NR_swapoff 213 /* Linux Specific */ | ||
279 | #define __NR_sysinfo 214 /* Linux Specific */ | ||
280 | #define __NR_ipc 215 /* Linux Specific */ | ||
281 | #define __NR_sigreturn 216 /* Linux Specific */ | ||
282 | #define __NR_clone 217 /* Linux Specific */ | ||
283 | #define __NR_ioprio_get 218 /* Linux Specific */ | ||
284 | #define __NR_adjtimex 219 /* Linux Specific */ | ||
285 | #define __NR_sigprocmask 220 /* Linux Specific */ | ||
286 | #define __NR_create_module 221 /* Linux Specific */ | ||
287 | #define __NR_delete_module 222 /* Linux Specific */ | ||
288 | #define __NR_get_kernel_syms 223 /* Linux Specific */ | ||
289 | #define __NR_getpgid 224 /* Linux Specific */ | ||
290 | #define __NR_bdflush 225 /* Linux Specific */ | ||
291 | #define __NR_sysfs 226 /* Linux Specific */ | ||
292 | #define __NR_afs_syscall 227 /* Linux Specific */ | ||
293 | #define __NR_setfsuid 228 /* Linux Specific */ | ||
294 | #define __NR_setfsgid 229 /* Linux Specific */ | ||
295 | #define __NR__newselect 230 /* Linux Specific */ | ||
296 | #ifdef __32bit_syscall_numbers__ | ||
297 | #define __NR_time 231 /* Linux Specific */ | ||
298 | #else | ||
299 | #endif | ||
300 | #define __NR_splice 232 /* Linux Specific */ | ||
301 | #define __NR_stime 233 /* Linux Specific */ | ||
302 | #define __NR_statfs64 234 /* Linux Specific */ | ||
303 | #define __NR_fstatfs64 235 /* Linux Specific */ | ||
304 | #define __NR__llseek 236 /* Linux Specific */ | ||
305 | #define __NR_mlock 237 | ||
306 | #define __NR_munlock 238 | ||
307 | #define __NR_mlockall 239 | ||
308 | #define __NR_munlockall 240 | ||
309 | #define __NR_sched_setparam 241 | ||
310 | #define __NR_sched_getparam 242 | ||
311 | #define __NR_sched_setscheduler 243 | ||
312 | #define __NR_sched_getscheduler 244 | ||
313 | #define __NR_sched_yield 245 | ||
314 | #define __NR_sched_get_priority_max 246 | ||
315 | #define __NR_sched_get_priority_min 247 | ||
316 | #define __NR_sched_rr_get_interval 248 | ||
317 | #define __NR_nanosleep 249 | ||
318 | #define __NR_mremap 250 | ||
319 | #define __NR__sysctl 251 | ||
320 | #define __NR_getsid 252 | ||
321 | #define __NR_fdatasync 253 | ||
322 | #define __NR_nfsservctl 254 | ||
323 | #define __NR_sync_file_range 255 | ||
324 | #define __NR_clock_settime 256 | ||
325 | #define __NR_clock_gettime 257 | ||
326 | #define __NR_clock_getres 258 | ||
327 | #define __NR_clock_nanosleep 259 | ||
328 | #define __NR_sched_getaffinity 260 | ||
329 | #define __NR_sched_setaffinity 261 | ||
330 | #define __NR_timer_settime 262 | ||
331 | #define __NR_timer_gettime 263 | ||
332 | #define __NR_timer_getoverrun 264 | ||
333 | #define __NR_timer_delete 265 | ||
334 | #define __NR_timer_create 266 | ||
335 | /* #define __NR_vserver 267 Reserved for VSERVER */ | ||
336 | #define __NR_io_setup 268 | ||
337 | #define __NR_io_destroy 269 | ||
338 | #define __NR_io_submit 270 | ||
339 | #define __NR_io_cancel 271 | ||
340 | #define __NR_io_getevents 272 | ||
341 | #define __NR_mq_open 273 | ||
342 | #define __NR_mq_unlink 274 | ||
343 | #define __NR_mq_timedsend 275 | ||
344 | #define __NR_mq_timedreceive 276 | ||
345 | #define __NR_mq_notify 277 | ||
346 | #define __NR_mq_getsetattr 278 | ||
347 | #define __NR_waitid 279 | ||
348 | #define __NR_tee 280 | ||
349 | #define __NR_add_key 281 | ||
350 | #define __NR_request_key 282 | ||
351 | #define __NR_keyctl 283 | ||
352 | #define __NR_openat 284 | ||
353 | #define __NR_mkdirat 285 | ||
354 | #define __NR_mknodat 286 | ||
355 | #define __NR_fchownat 287 | ||
356 | #define __NR_futimesat 288 | ||
357 | #define __NR_fstatat64 289 | ||
358 | #define __NR_unlinkat 290 | ||
359 | #define __NR_renameat 291 | ||
360 | #define __NR_linkat 292 | ||
361 | #define __NR_symlinkat 293 | ||
362 | #define __NR_readlinkat 294 | ||
363 | #define __NR_fchmodat 295 | ||
364 | #define __NR_faccessat 296 | ||
365 | #define __NR_pselect6 297 | ||
366 | #define __NR_ppoll 298 | ||
367 | #define __NR_unshare 299 | ||
368 | #define __NR_set_robust_list 300 | ||
369 | #define __NR_get_robust_list 301 | ||
370 | #define __NR_migrate_pages 302 | ||
371 | #define __NR_mbind 303 | ||
372 | #define __NR_get_mempolicy 304 | ||
373 | #define __NR_set_mempolicy 305 | ||
374 | #define __NR_kexec_load 306 | ||
375 | #define __NR_move_pages 307 | ||
376 | #define __NR_getcpu 308 | ||
377 | #define __NR_epoll_pwait 309 | ||
378 | #define __NR_utimensat 310 | ||
379 | #define __NR_signalfd 311 | ||
380 | #define __NR_timerfd_create 312 | ||
381 | #define __NR_eventfd 313 | ||
382 | #define __NR_fallocate 314 | ||
383 | #define __NR_timerfd_settime 315 | ||
384 | #define __NR_timerfd_gettime 316 | ||
385 | #define __NR_signalfd4 317 | ||
386 | #define __NR_eventfd2 318 | ||
387 | #define __NR_epoll_create1 319 | ||
388 | #define __NR_dup3 320 | ||
389 | #define __NR_pipe2 321 | ||
390 | #define __NR_inotify_init1 322 | ||
391 | #define __NR_accept4 323 | ||
392 | #define __NR_preadv 324 | ||
393 | #define __NR_pwritev 325 | ||
394 | #define __NR_rt_tgsigqueueinfo 326 | ||
395 | #define __NR_perf_event_open 327 | ||
396 | #define __NR_recvmmsg 328 | ||
397 | #define __NR_fanotify_init 329 | ||
398 | #define __NR_fanotify_mark 330 | ||
399 | #define __NR_prlimit64 331 | ||
400 | #define __NR_name_to_handle_at 332 | ||
401 | #define __NR_open_by_handle_at 333 | ||
402 | #define __NR_clock_adjtime 334 | ||
403 | #define __NR_syncfs 335 | ||
404 | #define __NR_sendmmsg 336 | ||
405 | #define __NR_setns 337 | ||
406 | #define __NR_process_vm_readv 338 | ||
407 | #define __NR_process_vm_writev 339 | ||
408 | |||
409 | #define NR_syscalls 340 | ||
410 | |||
411 | #ifdef __32bit_syscall_numbers__ | ||
412 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | ||
413 | * it never had the plain ones and there is no value to adding those | ||
414 | * old versions into the syscall table. | ||
415 | */ | ||
416 | #define __IGNORE_setresuid | ||
417 | #define __IGNORE_getresuid | ||
418 | #define __IGNORE_setresgid | ||
419 | #define __IGNORE_getresgid | ||
420 | #endif | ||
421 | |||
422 | #endif /* _UAPI_SPARC_UNISTD_H */ | ||
diff --git a/arch/sparc/include/asm/utrap.h b/arch/sparc/include/uapi/asm/utrap.h index b10e527c22d9..b10e527c22d9 100644 --- a/arch/sparc/include/asm/utrap.h +++ b/arch/sparc/include/uapi/asm/utrap.h | |||
diff --git a/arch/sparc/include/asm/watchdog.h b/arch/sparc/include/uapi/asm/watchdog.h index 5baf2d3919cf..5baf2d3919cf 100644 --- a/arch/sparc/include/asm/watchdog.h +++ b/arch/sparc/include/uapi/asm/watchdog.h | |||