diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-realview/entry-macro.S | 14 | ||||
-rw-r--r-- | include/asm-arm/arch-realview/platform.h | 56 | ||||
-rw-r--r-- | include/asm-arm/arch-realview/smp.h | 31 | ||||
-rw-r--r-- | include/asm-arm/hardware/arm_scu.h | 13 | ||||
-rw-r--r-- | include/asm-ia64/page.h | 1 | ||||
-rw-r--r-- | include/asm-m68k/kbio.h | 1 | ||||
-rw-r--r-- | include/asm-m68k/vuid_event.h | 4 | ||||
-rw-r--r-- | include/asm-sparc/audioio.h | 234 | ||||
-rw-r--r-- | include/asm-sparc/kbio.h | 56 | ||||
-rw-r--r-- | include/asm-sparc/termios.h | 9 | ||||
-rw-r--r-- | include/asm-sparc/vuid_event.h | 41 | ||||
-rw-r--r-- | include/asm-sparc64/audioio.h | 234 | ||||
-rw-r--r-- | include/asm-sparc64/ebus.h | 1 | ||||
-rw-r--r-- | include/asm-sparc64/kbio.h | 56 | ||||
-rw-r--r-- | include/asm-sparc64/mmu_context.h | 46 | ||||
-rw-r--r-- | include/asm-sparc64/termios.h | 9 | ||||
-rw-r--r-- | include/asm-sparc64/tlb.h | 14 | ||||
-rw-r--r-- | include/asm-sparc64/vuid_event.h | 40 | ||||
-rw-r--r-- | include/linux/acct.h | 3 | ||||
-rw-r--r-- | include/linux/dcache.h | 1 | ||||
-rw-r--r-- | include/linux/fs.h | 9 | ||||
-rw-r--r-- | include/linux/mount.h | 29 | ||||
-rw-r--r-- | include/linux/namespace.h | 3 | ||||
-rw-r--r-- | include/linux/quota.h | 1 |
24 files changed, 175 insertions, 731 deletions
diff --git a/include/asm-arm/arch-realview/entry-macro.S b/include/asm-arm/arch-realview/entry-macro.S index 2712ba77bb3a..4df469bf42e2 100644 --- a/include/asm-arm/arch-realview/entry-macro.S +++ b/include/asm-arm/arch-realview/entry-macro.S | |||
@@ -47,3 +47,17 @@ | |||
47 | cmpcs \irqnr, \irqnr | 47 | cmpcs \irqnr, \irqnr |
48 | 48 | ||
49 | .endm | 49 | .endm |
50 | |||
51 | /* We assume that irqstat (the raw value of the IRQ acknowledge | ||
52 | * register) is preserved from the macro above. | ||
53 | * If there is an IPI, we immediately signal end of interrupt on the | ||
54 | * controller, since this requires the original irqstat value which | ||
55 | * we won't easily be able to recreate later. | ||
56 | */ | ||
57 | |||
58 | .macro test_for_ipi, irqnr, irqstat, base, tmp | ||
59 | bic \irqnr, \irqstat, #0x1c00 | ||
60 | cmp \irqnr, #16 | ||
61 | strcc \irqstat, [\base, #GIC_CPU_EOI] | ||
62 | cmpcs \irqnr, \irqnr | ||
63 | .endm | ||
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h index 4b6de13a6b9a..aef9b36b3c37 100644 --- a/include/asm-arm/arch-realview/platform.h +++ b/include/asm-arm/arch-realview/platform.h | |||
@@ -203,8 +203,14 @@ | |||
203 | /* Reserved 0x1001A000 - 0x1001FFFF */ | 203 | /* Reserved 0x1001A000 - 0x1001FFFF */ |
204 | #define REALVIEW_CLCD_BASE 0x10020000 /* CLCD */ | 204 | #define REALVIEW_CLCD_BASE 0x10020000 /* CLCD */ |
205 | #define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */ | 205 | #define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */ |
206 | #ifndef CONFIG_REALVIEW_MPCORE | ||
206 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | 207 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ |
207 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | 208 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ |
209 | #else | ||
210 | #define REALVIEW_MPCORE_SCU_BASE 0x10100000 /* SCU registers */ | ||
211 | #define REALVIEW_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ | ||
212 | #define REALVIEW_GIC_DIST_BASE 0x10101000 /* Generic interrupt controller distributor */ | ||
213 | #endif | ||
208 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ | 214 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ |
209 | /* Reserved 0x10090000 - 0x100EFFFF */ | 215 | /* Reserved 0x10090000 - 0x100EFFFF */ |
210 | 216 | ||
@@ -265,6 +271,7 @@ | |||
265 | * Interrupts - bit assignment (primary) | 271 | * Interrupts - bit assignment (primary) |
266 | * ------------------------------------------------------------------------ | 272 | * ------------------------------------------------------------------------ |
267 | */ | 273 | */ |
274 | #ifndef CONFIG_REALVIEW_MPCORE | ||
268 | #define INT_WDOGINT 0 /* Watchdog timer */ | 275 | #define INT_WDOGINT 0 /* Watchdog timer */ |
269 | #define INT_SOFTINT 1 /* Software interrupt */ | 276 | #define INT_SOFTINT 1 /* Software interrupt */ |
270 | #define INT_COMMRx 2 /* Debug Comm Rx interrupt */ | 277 | #define INT_COMMRx 2 /* Debug Comm Rx interrupt */ |
@@ -297,6 +304,55 @@ | |||
297 | #define INT_USB 29 /* USB controller */ | 304 | #define INT_USB 29 /* USB controller */ |
298 | #define INT_TSPENINT 30 /* Touchscreen pen */ | 305 | #define INT_TSPENINT 30 /* Touchscreen pen */ |
299 | #define INT_TSKPADINT 31 /* Touchscreen keypad */ | 306 | #define INT_TSKPADINT 31 /* Touchscreen keypad */ |
307 | #else | ||
308 | #define INT_LOCALTIMER 29 | ||
309 | #define INT_LOCALWDOG 30 | ||
310 | |||
311 | #define INT_AACI 0 | ||
312 | #define INT_TIMERINT0_1 1 | ||
313 | #define INT_TIMERINT2_3 2 | ||
314 | #define INT_USB 3 | ||
315 | #define INT_UARTINT0 4 | ||
316 | #define INT_UARTINT1 5 | ||
317 | #define INT_RTCINT 6 | ||
318 | #define INT_KMI0 7 | ||
319 | #define INT_KMI1 8 | ||
320 | #define INT_ETH 9 | ||
321 | #define INT_EB_IRQ1 10 /* main GIC */ | ||
322 | #define INT_EB_IRQ2 11 /* tile GIC */ | ||
323 | #define INT_EB_FIQ1 12 /* main GIC */ | ||
324 | #define INT_EB_FIQ2 13 /* tile GIC */ | ||
325 | #define INT_MMCI0A 14 | ||
326 | #define INT_MMCI0B 15 | ||
327 | |||
328 | #define INT_PMU_CPU0 17 | ||
329 | #define INT_PMU_CPU1 18 | ||
330 | #define INT_PMU_CPU2 19 | ||
331 | #define INT_PMU_CPU3 20 | ||
332 | #define INT_PMU_SCU0 21 | ||
333 | #define INT_PMU_SCU1 22 | ||
334 | #define INT_PMU_SCU2 23 | ||
335 | #define INT_PMU_SCU3 24 | ||
336 | #define INT_PMU_SCU4 25 | ||
337 | #define INT_PMU_SCU5 26 | ||
338 | #define INT_PMU_SCU6 27 | ||
339 | #define INT_PMU_SCU7 28 | ||
340 | |||
341 | #define INT_L220_EVENT 29 | ||
342 | #define INT_L220_SLAVE 30 | ||
343 | #define INT_L220_DECODE 31 | ||
344 | |||
345 | #define INT_UARTINT2 -1 | ||
346 | #define INT_UARTINT3 -1 | ||
347 | #define INT_CLCDINT -1 | ||
348 | #define INT_DMAINT -1 | ||
349 | #define INT_WDOGINT -1 | ||
350 | #define INT_GPIOINT0 -1 | ||
351 | #define INT_GPIOINT1 -1 | ||
352 | #define INT_GPIOINT2 -1 | ||
353 | #define INT_SCIINT -1 | ||
354 | #define INT_SSPINT -1 | ||
355 | #endif | ||
300 | 356 | ||
301 | /* | 357 | /* |
302 | * Interrupt bit positions | 358 | * Interrupt bit positions |
diff --git a/include/asm-arm/arch-realview/smp.h b/include/asm-arm/arch-realview/smp.h new file mode 100644 index 000000000000..fc87783e8e8b --- /dev/null +++ b/include/asm-arm/arch-realview/smp.h | |||
@@ -0,0 +1,31 @@ | |||
1 | #ifndef ASMARM_ARCH_SMP_H | ||
2 | #define ASMARM_ARCH_SMP_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #include <asm/hardware/gic.h> | ||
7 | |||
8 | #define hard_smp_processor_id() \ | ||
9 | ({ \ | ||
10 | unsigned int cpunum; \ | ||
11 | __asm__("mrc p15, 0, %0, c0, c0, 5" \ | ||
12 | : "=r" (cpunum)); \ | ||
13 | cpunum &= 0x0F; \ | ||
14 | }) | ||
15 | |||
16 | /* | ||
17 | * We use IRQ1 as the IPI | ||
18 | */ | ||
19 | static inline void smp_cross_call(cpumask_t callmap) | ||
20 | { | ||
21 | gic_raise_softirq(callmap, 1); | ||
22 | } | ||
23 | |||
24 | /* | ||
25 | * Do nothing on MPcore. | ||
26 | */ | ||
27 | static inline void smp_cross_call_done(cpumask_t callmap) | ||
28 | { | ||
29 | } | ||
30 | |||
31 | #endif | ||
diff --git a/include/asm-arm/hardware/arm_scu.h b/include/asm-arm/hardware/arm_scu.h new file mode 100644 index 000000000000..9903f60c84b7 --- /dev/null +++ b/include/asm-arm/hardware/arm_scu.h | |||
@@ -0,0 +1,13 @@ | |||
1 | #ifndef ASMARM_HARDWARE_ARM_SCU_H | ||
2 | #define ASMARM_HARDWARE_ARM_SCU_H | ||
3 | |||
4 | /* | ||
5 | * SCU registers | ||
6 | */ | ||
7 | #define SCU_CTRL 0x00 | ||
8 | #define SCU_CONFIG 0x04 | ||
9 | #define SCU_CPU_STATUS 0x08 | ||
10 | #define SCU_INVALIDATE 0x0c | ||
11 | #define SCU_FPGA_REVISION 0x10 | ||
12 | |||
13 | #endif | ||
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h index ef436b9d06ad..9d41548b7fef 100644 --- a/include/asm-ia64/page.h +++ b/include/asm-ia64/page.h | |||
@@ -120,6 +120,7 @@ extern unsigned long max_low_pfn; | |||
120 | 120 | ||
121 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | 121 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) |
122 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 122 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
123 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | ||
123 | 124 | ||
124 | typedef union ia64_va { | 125 | typedef union ia64_va { |
125 | struct { | 126 | struct { |
diff --git a/include/asm-m68k/kbio.h b/include/asm-m68k/kbio.h deleted file mode 100644 index e1fbf8fba3e8..000000000000 --- a/include/asm-m68k/kbio.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <asm-sparc/kbio.h> | ||
diff --git a/include/asm-m68k/vuid_event.h b/include/asm-m68k/vuid_event.h deleted file mode 100644 index 52ecb521a395..000000000000 --- a/include/asm-m68k/vuid_event.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _M68K_VUID_EVENT_H | ||
2 | #define _M68K_VUID_EVENT_H | ||
3 | #include <asm-sparc/vuid_event.h> | ||
4 | #endif | ||
diff --git a/include/asm-sparc/audioio.h b/include/asm-sparc/audioio.h deleted file mode 100644 index cf16173f521b..000000000000 --- a/include/asm-sparc/audioio.h +++ /dev/null | |||
@@ -1,234 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sparc/audioio.h | ||
3 | * | ||
4 | * Sparc Audio Midlayer | ||
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #ifndef _AUDIOIO_H_ | ||
9 | #define _AUDIOIO_H_ | ||
10 | |||
11 | /* | ||
12 | * SunOS/Solaris /dev/audio interface | ||
13 | */ | ||
14 | |||
15 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/time.h> | ||
18 | #include <linux/ioctl.h> | ||
19 | #endif | ||
20 | |||
21 | /* | ||
22 | * This structure contains state information for audio device IO streams. | ||
23 | */ | ||
24 | typedef struct audio_prinfo { | ||
25 | /* | ||
26 | * The following values describe the audio data encoding. | ||
27 | */ | ||
28 | unsigned int sample_rate; /* samples per second */ | ||
29 | unsigned int channels; /* number of interleaved channels */ | ||
30 | unsigned int precision; /* bit-width of each sample */ | ||
31 | unsigned int encoding; /* data encoding method */ | ||
32 | |||
33 | /* | ||
34 | * The following values control audio device configuration | ||
35 | */ | ||
36 | unsigned int gain; /* gain level: 0 - 255 */ | ||
37 | unsigned int port; /* selected I/O port (see below) */ | ||
38 | unsigned int avail_ports; /* available I/O ports (see below) */ | ||
39 | unsigned int _xxx[2]; /* Reserved for future use */ | ||
40 | |||
41 | unsigned int buffer_size; /* I/O buffer size */ | ||
42 | |||
43 | /* | ||
44 | * The following values describe driver state | ||
45 | */ | ||
46 | unsigned int samples; /* number of samples converted */ | ||
47 | unsigned int eof; /* End Of File counter (play only) */ | ||
48 | |||
49 | unsigned char pause; /* non-zero for pause, zero to resume */ | ||
50 | unsigned char error; /* non-zero if overflow/underflow */ | ||
51 | unsigned char waiting; /* non-zero if a process wants access */ | ||
52 | unsigned char balance; /* stereo channel balance */ | ||
53 | |||
54 | unsigned short minordev; | ||
55 | |||
56 | /* | ||
57 | * The following values are read-only state flags | ||
58 | */ | ||
59 | unsigned char open; /* non-zero if open access permitted */ | ||
60 | unsigned char active; /* non-zero if I/O is active */ | ||
61 | } audio_prinfo_t; | ||
62 | |||
63 | |||
64 | /* | ||
65 | * This structure describes the current state of the audio device. | ||
66 | */ | ||
67 | typedef struct audio_info { | ||
68 | /* | ||
69 | * Per-stream information | ||
70 | */ | ||
71 | audio_prinfo_t play; /* output status information */ | ||
72 | audio_prinfo_t record; /* input status information */ | ||
73 | |||
74 | /* | ||
75 | * Per-unit/channel information | ||
76 | */ | ||
77 | unsigned int monitor_gain; /* input to output mix: 0 - 255 */ | ||
78 | unsigned char output_muted; /* non-zero if output is muted */ | ||
79 | unsigned char _xxx[3]; /* Reserved for future use */ | ||
80 | unsigned int _yyy[3]; /* Reserved for future use */ | ||
81 | } audio_info_t; | ||
82 | |||
83 | |||
84 | /* | ||
85 | * Audio encoding types | ||
86 | */ | ||
87 | #define AUDIO_ENCODING_NONE (0) /* no encoding assigned */ | ||
88 | #define AUDIO_ENCODING_ULAW (1) /* u-law encoding */ | ||
89 | #define AUDIO_ENCODING_ALAW (2) /* A-law encoding */ | ||
90 | #define AUDIO_ENCODING_LINEAR (3) /* Linear PCM encoding */ | ||
91 | #define AUDIO_ENCODING_FLOAT (4) /* IEEE float (-1. <-> +1.) */ | ||
92 | #define AUDIO_ENCODING_DVI (104) /* DVI ADPCM */ | ||
93 | #define AUDIO_ENCODING_LINEAR8 (105) /* 8 bit UNSIGNED */ | ||
94 | #define AUDIO_ENCODING_LINEARLE (106) /* Linear PCM LE encoding */ | ||
95 | |||
96 | /* | ||
97 | * These ranges apply to record, play, and monitor gain values | ||
98 | */ | ||
99 | #define AUDIO_MIN_GAIN (0) /* minimum gain value */ | ||
100 | #define AUDIO_MAX_GAIN (255) /* maximum gain value */ | ||
101 | |||
102 | /* | ||
103 | * These values apply to the balance field to adjust channel gain values | ||
104 | */ | ||
105 | #define AUDIO_LEFT_BALANCE (0) /* left channel only */ | ||
106 | #define AUDIO_MID_BALANCE (32) /* equal left/right channel */ | ||
107 | #define AUDIO_RIGHT_BALANCE (64) /* right channel only */ | ||
108 | #define AUDIO_BALANCE_SHIFT (3) | ||
109 | |||
110 | /* | ||
111 | * Generic minimum/maximum limits for number of channels, both modes | ||
112 | */ | ||
113 | #define AUDIO_MIN_PLAY_CHANNELS (1) | ||
114 | #define AUDIO_MAX_PLAY_CHANNELS (4) | ||
115 | #define AUDIO_MIN_REC_CHANNELS (1) | ||
116 | #define AUDIO_MAX_REC_CHANNELS (4) | ||
117 | |||
118 | /* | ||
119 | * Generic minimum/maximum limits for sample precision | ||
120 | */ | ||
121 | #define AUDIO_MIN_PLAY_PRECISION (8) | ||
122 | #define AUDIO_MAX_PLAY_PRECISION (32) | ||
123 | #define AUDIO_MIN_REC_PRECISION (8) | ||
124 | #define AUDIO_MAX_REC_PRECISION (32) | ||
125 | |||
126 | /* | ||
127 | * Define some convenient names for typical audio ports | ||
128 | */ | ||
129 | /* | ||
130 | * output ports (several may be enabled simultaneously) | ||
131 | */ | ||
132 | #define AUDIO_SPEAKER 0x01 /* output to built-in speaker */ | ||
133 | #define AUDIO_HEADPHONE 0x02 /* output to headphone jack */ | ||
134 | #define AUDIO_LINE_OUT 0x04 /* output to line out */ | ||
135 | |||
136 | /* | ||
137 | * input ports (usually only one at a time) | ||
138 | */ | ||
139 | #define AUDIO_MICROPHONE 0x01 /* input from microphone */ | ||
140 | #define AUDIO_LINE_IN 0x02 /* input from line in */ | ||
141 | #define AUDIO_CD 0x04 /* input from on-board CD inputs */ | ||
142 | #define AUDIO_INTERNAL_CD_IN AUDIO_CD /* input from internal CDROM */ | ||
143 | #define AUDIO_ANALOG_LOOPBACK 0x40 /* input from output */ | ||
144 | |||
145 | |||
146 | /* | ||
147 | * This macro initializes an audio_info structure to 'harmless' values. | ||
148 | * Note that (~0) might not be a harmless value for a flag that was | ||
149 | * a signed int. | ||
150 | */ | ||
151 | #define AUDIO_INITINFO(i) { \ | ||
152 | unsigned int *__x__; \ | ||
153 | for (__x__ = (unsigned int *)(i); \ | ||
154 | (char *) __x__ < (((char *)(i)) + sizeof (audio_info_t)); \ | ||
155 | *__x__++ = ~0); \ | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * These allow testing for what the user wants to set | ||
160 | */ | ||
161 | #define AUD_INITVALUE (~0) | ||
162 | #define Modify(X) ((unsigned int)(X) != AUD_INITVALUE) | ||
163 | #define Modifys(X) ((X) != (unsigned short)AUD_INITVALUE) | ||
164 | #define Modifyc(X) ((X) != (unsigned char)AUD_INITVALUE) | ||
165 | |||
166 | /* | ||
167 | * Parameter for the AUDIO_GETDEV ioctl to determine current | ||
168 | * audio devices. | ||
169 | */ | ||
170 | #define MAX_AUDIO_DEV_LEN (16) | ||
171 | typedef struct audio_device { | ||
172 | char name[MAX_AUDIO_DEV_LEN]; | ||
173 | char version[MAX_AUDIO_DEV_LEN]; | ||
174 | char config[MAX_AUDIO_DEV_LEN]; | ||
175 | } audio_device_t; | ||
176 | |||
177 | |||
178 | /* | ||
179 | * Ioctl calls for the audio device. | ||
180 | */ | ||
181 | |||
182 | /* | ||
183 | * AUDIO_GETINFO retrieves the current state of the audio device. | ||
184 | * | ||
185 | * AUDIO_SETINFO copies all fields of the audio_info structure whose | ||
186 | * values are not set to the initialized value (-1) to the device state. | ||
187 | * It performs an implicit AUDIO_GETINFO to return the new state of the | ||
188 | * device. Note that the record.samples and play.samples fields are set | ||
189 | * to the last value before the AUDIO_SETINFO took effect. This allows | ||
190 | * an application to reset the counters while atomically retrieving the | ||
191 | * last value. | ||
192 | * | ||
193 | * AUDIO_DRAIN suspends the calling process until the write buffers are | ||
194 | * empty. | ||
195 | * | ||
196 | * AUDIO_GETDEV returns a structure of type audio_device_t which contains | ||
197 | * three strings. The string "name" is a short identifying string (for | ||
198 | * example, the SBus Fcode name string), the string "version" identifies | ||
199 | * the current version of the device, and the "config" string identifies | ||
200 | * the specific configuration of the audio stream. All fields are | ||
201 | * device-dependent -- see the device specific manual pages for details. | ||
202 | * | ||
203 | * AUDIO_GETDEV_SUNOS returns a number which is an audio device defined | ||
204 | * herein (making it not too portable) | ||
205 | * | ||
206 | * AUDIO_FLUSH stops all playback and recording, clears all queued buffers, | ||
207 | * resets error counters, and restarts recording and playback as appropriate | ||
208 | * for the current sampling mode. | ||
209 | */ | ||
210 | #define AUDIO_GETINFO _IOR('A', 1, audio_info_t) | ||
211 | #define AUDIO_SETINFO _IOWR('A', 2, audio_info_t) | ||
212 | #define AUDIO_DRAIN _IO('A', 3) | ||
213 | #define AUDIO_GETDEV _IOR('A', 4, audio_device_t) | ||
214 | #define AUDIO_GETDEV_SUNOS _IOR('A', 4, int) | ||
215 | #define AUDIO_FLUSH _IO('A', 5) | ||
216 | |||
217 | /* Define possible audio hardware configurations for | ||
218 | * old SunOS-style AUDIO_GETDEV ioctl */ | ||
219 | #define AUDIO_DEV_UNKNOWN (0) /* not defined */ | ||
220 | #define AUDIO_DEV_AMD (1) /* audioamd device */ | ||
221 | #define AUDIO_DEV_SPEAKERBOX (2) /* dbri device with speakerbox */ | ||
222 | #define AUDIO_DEV_CODEC (3) /* dbri device (internal speaker) */ | ||
223 | #define AUDIO_DEV_CS4231 (5) /* cs4231 device */ | ||
224 | |||
225 | /* | ||
226 | * The following ioctl sets the audio device into an internal loopback mode, | ||
227 | * if the hardware supports this. The argument is TRUE to set loopback, | ||
228 | * FALSE to reset to normal operation. If the hardware does not support | ||
229 | * internal loopback, the ioctl should fail with EINVAL. | ||
230 | * Causes ADC data to be digitally mixed in and sent to the DAC. | ||
231 | */ | ||
232 | #define AUDIO_DIAG_LOOPBACK _IOW('A', 101, int) | ||
233 | |||
234 | #endif /* _AUDIOIO_H_ */ | ||
diff --git a/include/asm-sparc/kbio.h b/include/asm-sparc/kbio.h deleted file mode 100644 index 3cf496bdf399..000000000000 --- a/include/asm-sparc/kbio.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #ifndef __LINUX_KBIO_H | ||
2 | #define __LINUX_KBIO_H | ||
3 | |||
4 | /* Return keyboard type */ | ||
5 | #define KIOCTYPE _IOR('k', 9, int) | ||
6 | /* Return Keyboard layout */ | ||
7 | #define KIOCLAYOUT _IOR('k', 20, int) | ||
8 | |||
9 | enum { | ||
10 | TR_NONE, | ||
11 | TR_ASCII, /* keyboard is in regular state */ | ||
12 | TR_EVENT, /* keystrokes sent as firm events */ | ||
13 | TR_UNTRANS_EVENT /* EVENT+up and down+no translation */ | ||
14 | }; | ||
15 | |||
16 | /* Return the current keyboard translation */ | ||
17 | #define KIOCGTRANS _IOR('k', 5, int) | ||
18 | /* Set the keyboard translation */ | ||
19 | #define KIOCTRANS _IOW('k', 0, int) | ||
20 | |||
21 | /* Send a keyboard command */ | ||
22 | #define KIOCCMD _IOW('k', 8, int) | ||
23 | |||
24 | /* Return if keystrokes are being sent to /dev/kbd */ | ||
25 | |||
26 | /* Set routing of keystrokes to /dev/kbd */ | ||
27 | #define KIOCSDIRECT _IOW('k', 10, int) | ||
28 | |||
29 | /* Set keyboard leds */ | ||
30 | #define KIOCSLED _IOW('k', 14, unsigned char) | ||
31 | |||
32 | /* Get keyboard leds */ | ||
33 | #define KIOCGLED _IOR('k', 15, unsigned char) | ||
34 | |||
35 | /* Used by KIOC[GS]RATE */ | ||
36 | struct kbd_rate { | ||
37 | unsigned char delay; /* Delay in Hz before first repeat. */ | ||
38 | unsigned char rate; /* In characters per second (0..50). */ | ||
39 | }; | ||
40 | |||
41 | /* Set keyboard rate */ | ||
42 | #define KIOCSRATE _IOW('k', 40, struct kbd_rate) | ||
43 | |||
44 | /* Get keyboard rate */ | ||
45 | #define KIOCGRATE _IOW('k', 41, struct kbd_rate) | ||
46 | |||
47 | /* Top bit records if the key is up or down */ | ||
48 | #define KBD_UP 0x80 | ||
49 | |||
50 | /* Usable information */ | ||
51 | #define KBD_KEYMASK 0x7f | ||
52 | |||
53 | /* All keys up */ | ||
54 | #define KBD_IDLE 0x75 | ||
55 | |||
56 | #endif /* __LINUX_KBIO_H */ | ||
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h index 0a8ad4cac125..d05f83c80989 100644 --- a/include/asm-sparc/termios.h +++ b/include/asm-sparc/termios.h | |||
@@ -38,15 +38,6 @@ struct sunos_ttysize { | |||
38 | int st_columns; /* Columns on the terminal */ | 38 | int st_columns; /* Columns on the terminal */ |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* Used for packet mode */ | ||
42 | #define TIOCPKT_DATA 0 | ||
43 | #define TIOCPKT_FLUSHREAD 1 | ||
44 | #define TIOCPKT_FLUSHWRITE 2 | ||
45 | #define TIOCPKT_STOP 4 | ||
46 | #define TIOCPKT_START 8 | ||
47 | #define TIOCPKT_NOSTOP 16 | ||
48 | #define TIOCPKT_DOSTOP 32 | ||
49 | |||
50 | struct winsize { | 41 | struct winsize { |
51 | unsigned short ws_row; | 42 | unsigned short ws_row; |
52 | unsigned short ws_col; | 43 | unsigned short ws_col; |
diff --git a/include/asm-sparc/vuid_event.h b/include/asm-sparc/vuid_event.h deleted file mode 100644 index 7781e9f2fdd3..000000000000 --- a/include/asm-sparc/vuid_event.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | /* SunOS Virtual User Input Device (VUID) compatibility */ | ||
2 | |||
3 | |||
4 | typedef struct firm_event { | ||
5 | unsigned short id; /* tag for this event */ | ||
6 | unsigned char pair_type; /* unused by X11 */ | ||
7 | unsigned char pair; /* unused by X11 */ | ||
8 | int value; /* VKEY_UP, VKEY_DOWN or delta */ | ||
9 | struct timeval time; | ||
10 | } Firm_event; | ||
11 | |||
12 | enum { | ||
13 | FE_PAIR_NONE, | ||
14 | FE_PAIR_SET, | ||
15 | FE_PAIR_DELTA, | ||
16 | FE_PAIR_ABSOLUTE | ||
17 | }; | ||
18 | |||
19 | /* VUID stream formats */ | ||
20 | #define VUID_NATIVE 0 /* Native byte stream format */ | ||
21 | #define VUID_FIRM_EVENT 1 /* send firm_event structures */ | ||
22 | |||
23 | /* ioctls */ | ||
24 | /* Set input device byte stream format (any of VUID_{NATIVE,FIRM_EVENT}) */ | ||
25 | #define VUIDSFORMAT _IOW('v', 1, int) | ||
26 | /* Retrieve input device byte stream format */ | ||
27 | #define VUIDGFORMAT _IOR('v', 2, int) | ||
28 | |||
29 | /* Possible tag values */ | ||
30 | /* mouse buttons: */ | ||
31 | #define MS_LEFT 0x7f20 | ||
32 | #define MS_MIDDLE 0x7f21 | ||
33 | #define MS_RIGHT 0x7f22 | ||
34 | /* motion: */ | ||
35 | #define LOC_X_DELTA 0x7f80 | ||
36 | #define LOC_Y_DELTA 0x7f81 | ||
37 | #define LOC_X_ABSOLUTE 0x7f82 /* X compat, unsupported */ | ||
38 | #define LOC_Y_ABSOLUTE 0x7f83 /* X compat, unsupported */ | ||
39 | |||
40 | #define VKEY_UP 0 | ||
41 | #define VKEY_DOWN 1 | ||
diff --git a/include/asm-sparc64/audioio.h b/include/asm-sparc64/audioio.h deleted file mode 100644 index cf16173f521b..000000000000 --- a/include/asm-sparc64/audioio.h +++ /dev/null | |||
@@ -1,234 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-sparc/audioio.h | ||
3 | * | ||
4 | * Sparc Audio Midlayer | ||
5 | * Copyright (C) 1996 Thomas K. Dyas (tdyas@noc.rutgers.edu) | ||
6 | */ | ||
7 | |||
8 | #ifndef _AUDIOIO_H_ | ||
9 | #define _AUDIOIO_H_ | ||
10 | |||
11 | /* | ||
12 | * SunOS/Solaris /dev/audio interface | ||
13 | */ | ||
14 | |||
15 | #if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/time.h> | ||
18 | #include <linux/ioctl.h> | ||
19 | #endif | ||
20 | |||
21 | /* | ||
22 | * This structure contains state information for audio device IO streams. | ||
23 | */ | ||
24 | typedef struct audio_prinfo { | ||
25 | /* | ||
26 | * The following values describe the audio data encoding. | ||
27 | */ | ||
28 | unsigned int sample_rate; /* samples per second */ | ||
29 | unsigned int channels; /* number of interleaved channels */ | ||
30 | unsigned int precision; /* bit-width of each sample */ | ||
31 | unsigned int encoding; /* data encoding method */ | ||
32 | |||
33 | /* | ||
34 | * The following values control audio device configuration | ||
35 | */ | ||
36 | unsigned int gain; /* gain level: 0 - 255 */ | ||
37 | unsigned int port; /* selected I/O port (see below) */ | ||
38 | unsigned int avail_ports; /* available I/O ports (see below) */ | ||
39 | unsigned int _xxx[2]; /* Reserved for future use */ | ||
40 | |||
41 | unsigned int buffer_size; /* I/O buffer size */ | ||
42 | |||
43 | /* | ||
44 | * The following values describe driver state | ||
45 | */ | ||
46 | unsigned int samples; /* number of samples converted */ | ||
47 | unsigned int eof; /* End Of File counter (play only) */ | ||
48 | |||
49 | unsigned char pause; /* non-zero for pause, zero to resume */ | ||
50 | unsigned char error; /* non-zero if overflow/underflow */ | ||
51 | unsigned char waiting; /* non-zero if a process wants access */ | ||
52 | unsigned char balance; /* stereo channel balance */ | ||
53 | |||
54 | unsigned short minordev; | ||
55 | |||
56 | /* | ||
57 | * The following values are read-only state flags | ||
58 | */ | ||
59 | unsigned char open; /* non-zero if open access permitted */ | ||
60 | unsigned char active; /* non-zero if I/O is active */ | ||
61 | } audio_prinfo_t; | ||
62 | |||
63 | |||
64 | /* | ||
65 | * This structure describes the current state of the audio device. | ||
66 | */ | ||
67 | typedef struct audio_info { | ||
68 | /* | ||
69 | * Per-stream information | ||
70 | */ | ||
71 | audio_prinfo_t play; /* output status information */ | ||
72 | audio_prinfo_t record; /* input status information */ | ||
73 | |||
74 | /* | ||
75 | * Per-unit/channel information | ||
76 | */ | ||
77 | unsigned int monitor_gain; /* input to output mix: 0 - 255 */ | ||
78 | unsigned char output_muted; /* non-zero if output is muted */ | ||
79 | unsigned char _xxx[3]; /* Reserved for future use */ | ||
80 | unsigned int _yyy[3]; /* Reserved for future use */ | ||
81 | } audio_info_t; | ||
82 | |||
83 | |||
84 | /* | ||
85 | * Audio encoding types | ||
86 | */ | ||
87 | #define AUDIO_ENCODING_NONE (0) /* no encoding assigned */ | ||
88 | #define AUDIO_ENCODING_ULAW (1) /* u-law encoding */ | ||
89 | #define AUDIO_ENCODING_ALAW (2) /* A-law encoding */ | ||
90 | #define AUDIO_ENCODING_LINEAR (3) /* Linear PCM encoding */ | ||
91 | #define AUDIO_ENCODING_FLOAT (4) /* IEEE float (-1. <-> +1.) */ | ||
92 | #define AUDIO_ENCODING_DVI (104) /* DVI ADPCM */ | ||
93 | #define AUDIO_ENCODING_LINEAR8 (105) /* 8 bit UNSIGNED */ | ||
94 | #define AUDIO_ENCODING_LINEARLE (106) /* Linear PCM LE encoding */ | ||
95 | |||
96 | /* | ||
97 | * These ranges apply to record, play, and monitor gain values | ||
98 | */ | ||
99 | #define AUDIO_MIN_GAIN (0) /* minimum gain value */ | ||
100 | #define AUDIO_MAX_GAIN (255) /* maximum gain value */ | ||
101 | |||
102 | /* | ||
103 | * These values apply to the balance field to adjust channel gain values | ||
104 | */ | ||
105 | #define AUDIO_LEFT_BALANCE (0) /* left channel only */ | ||
106 | #define AUDIO_MID_BALANCE (32) /* equal left/right channel */ | ||
107 | #define AUDIO_RIGHT_BALANCE (64) /* right channel only */ | ||
108 | #define AUDIO_BALANCE_SHIFT (3) | ||
109 | |||
110 | /* | ||
111 | * Generic minimum/maximum limits for number of channels, both modes | ||
112 | */ | ||
113 | #define AUDIO_MIN_PLAY_CHANNELS (1) | ||
114 | #define AUDIO_MAX_PLAY_CHANNELS (4) | ||
115 | #define AUDIO_MIN_REC_CHANNELS (1) | ||
116 | #define AUDIO_MAX_REC_CHANNELS (4) | ||
117 | |||
118 | /* | ||
119 | * Generic minimum/maximum limits for sample precision | ||
120 | */ | ||
121 | #define AUDIO_MIN_PLAY_PRECISION (8) | ||
122 | #define AUDIO_MAX_PLAY_PRECISION (32) | ||
123 | #define AUDIO_MIN_REC_PRECISION (8) | ||
124 | #define AUDIO_MAX_REC_PRECISION (32) | ||
125 | |||
126 | /* | ||
127 | * Define some convenient names for typical audio ports | ||
128 | */ | ||
129 | /* | ||
130 | * output ports (several may be enabled simultaneously) | ||
131 | */ | ||
132 | #define AUDIO_SPEAKER 0x01 /* output to built-in speaker */ | ||
133 | #define AUDIO_HEADPHONE 0x02 /* output to headphone jack */ | ||
134 | #define AUDIO_LINE_OUT 0x04 /* output to line out */ | ||
135 | |||
136 | /* | ||
137 | * input ports (usually only one at a time) | ||
138 | */ | ||
139 | #define AUDIO_MICROPHONE 0x01 /* input from microphone */ | ||
140 | #define AUDIO_LINE_IN 0x02 /* input from line in */ | ||
141 | #define AUDIO_CD 0x04 /* input from on-board CD inputs */ | ||
142 | #define AUDIO_INTERNAL_CD_IN AUDIO_CD /* input from internal CDROM */ | ||
143 | #define AUDIO_ANALOG_LOOPBACK 0x40 /* input from output */ | ||
144 | |||
145 | |||
146 | /* | ||
147 | * This macro initializes an audio_info structure to 'harmless' values. | ||
148 | * Note that (~0) might not be a harmless value for a flag that was | ||
149 | * a signed int. | ||
150 | */ | ||
151 | #define AUDIO_INITINFO(i) { \ | ||
152 | unsigned int *__x__; \ | ||
153 | for (__x__ = (unsigned int *)(i); \ | ||
154 | (char *) __x__ < (((char *)(i)) + sizeof (audio_info_t)); \ | ||
155 | *__x__++ = ~0); \ | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * These allow testing for what the user wants to set | ||
160 | */ | ||
161 | #define AUD_INITVALUE (~0) | ||
162 | #define Modify(X) ((unsigned int)(X) != AUD_INITVALUE) | ||
163 | #define Modifys(X) ((X) != (unsigned short)AUD_INITVALUE) | ||
164 | #define Modifyc(X) ((X) != (unsigned char)AUD_INITVALUE) | ||
165 | |||
166 | /* | ||
167 | * Parameter for the AUDIO_GETDEV ioctl to determine current | ||
168 | * audio devices. | ||
169 | */ | ||
170 | #define MAX_AUDIO_DEV_LEN (16) | ||
171 | typedef struct audio_device { | ||
172 | char name[MAX_AUDIO_DEV_LEN]; | ||
173 | char version[MAX_AUDIO_DEV_LEN]; | ||
174 | char config[MAX_AUDIO_DEV_LEN]; | ||
175 | } audio_device_t; | ||
176 | |||
177 | |||
178 | /* | ||
179 | * Ioctl calls for the audio device. | ||
180 | */ | ||
181 | |||
182 | /* | ||
183 | * AUDIO_GETINFO retrieves the current state of the audio device. | ||
184 | * | ||
185 | * AUDIO_SETINFO copies all fields of the audio_info structure whose | ||
186 | * values are not set to the initialized value (-1) to the device state. | ||
187 | * It performs an implicit AUDIO_GETINFO to return the new state of the | ||
188 | * device. Note that the record.samples and play.samples fields are set | ||
189 | * to the last value before the AUDIO_SETINFO took effect. This allows | ||
190 | * an application to reset the counters while atomically retrieving the | ||
191 | * last value. | ||
192 | * | ||
193 | * AUDIO_DRAIN suspends the calling process until the write buffers are | ||
194 | * empty. | ||
195 | * | ||
196 | * AUDIO_GETDEV returns a structure of type audio_device_t which contains | ||
197 | * three strings. The string "name" is a short identifying string (for | ||
198 | * example, the SBus Fcode name string), the string "version" identifies | ||
199 | * the current version of the device, and the "config" string identifies | ||
200 | * the specific configuration of the audio stream. All fields are | ||
201 | * device-dependent -- see the device specific manual pages for details. | ||
202 | * | ||
203 | * AUDIO_GETDEV_SUNOS returns a number which is an audio device defined | ||
204 | * herein (making it not too portable) | ||
205 | * | ||
206 | * AUDIO_FLUSH stops all playback and recording, clears all queued buffers, | ||
207 | * resets error counters, and restarts recording and playback as appropriate | ||
208 | * for the current sampling mode. | ||
209 | */ | ||
210 | #define AUDIO_GETINFO _IOR('A', 1, audio_info_t) | ||
211 | #define AUDIO_SETINFO _IOWR('A', 2, audio_info_t) | ||
212 | #define AUDIO_DRAIN _IO('A', 3) | ||
213 | #define AUDIO_GETDEV _IOR('A', 4, audio_device_t) | ||
214 | #define AUDIO_GETDEV_SUNOS _IOR('A', 4, int) | ||
215 | #define AUDIO_FLUSH _IO('A', 5) | ||
216 | |||
217 | /* Define possible audio hardware configurations for | ||
218 | * old SunOS-style AUDIO_GETDEV ioctl */ | ||
219 | #define AUDIO_DEV_UNKNOWN (0) /* not defined */ | ||
220 | #define AUDIO_DEV_AMD (1) /* audioamd device */ | ||
221 | #define AUDIO_DEV_SPEAKERBOX (2) /* dbri device with speakerbox */ | ||
222 | #define AUDIO_DEV_CODEC (3) /* dbri device (internal speaker) */ | ||
223 | #define AUDIO_DEV_CS4231 (5) /* cs4231 device */ | ||
224 | |||
225 | /* | ||
226 | * The following ioctl sets the audio device into an internal loopback mode, | ||
227 | * if the hardware supports this. The argument is TRUE to set loopback, | ||
228 | * FALSE to reset to normal operation. If the hardware does not support | ||
229 | * internal loopback, the ioctl should fail with EINVAL. | ||
230 | * Causes ADC data to be digitally mixed in and sent to the DAC. | ||
231 | */ | ||
232 | #define AUDIO_DIAG_LOOPBACK _IOW('A', 101, int) | ||
233 | |||
234 | #endif /* _AUDIOIO_H_ */ | ||
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index 543e4e500a72..7a408a030f52 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h | |||
@@ -79,6 +79,7 @@ extern int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr, | |||
79 | size_t len); | 79 | size_t len); |
80 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); | 80 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); |
81 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); | 81 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); |
82 | extern unsigned int ebus_dma_addr(struct ebus_dma_info *p); | ||
82 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); | 83 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); |
83 | 84 | ||
84 | extern struct linux_ebus *ebus_chain; | 85 | extern struct linux_ebus *ebus_chain; |
diff --git a/include/asm-sparc64/kbio.h b/include/asm-sparc64/kbio.h deleted file mode 100644 index 3cf496bdf399..000000000000 --- a/include/asm-sparc64/kbio.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | #ifndef __LINUX_KBIO_H | ||
2 | #define __LINUX_KBIO_H | ||
3 | |||
4 | /* Return keyboard type */ | ||
5 | #define KIOCTYPE _IOR('k', 9, int) | ||
6 | /* Return Keyboard layout */ | ||
7 | #define KIOCLAYOUT _IOR('k', 20, int) | ||
8 | |||
9 | enum { | ||
10 | TR_NONE, | ||
11 | TR_ASCII, /* keyboard is in regular state */ | ||
12 | TR_EVENT, /* keystrokes sent as firm events */ | ||
13 | TR_UNTRANS_EVENT /* EVENT+up and down+no translation */ | ||
14 | }; | ||
15 | |||
16 | /* Return the current keyboard translation */ | ||
17 | #define KIOCGTRANS _IOR('k', 5, int) | ||
18 | /* Set the keyboard translation */ | ||
19 | #define KIOCTRANS _IOW('k', 0, int) | ||
20 | |||
21 | /* Send a keyboard command */ | ||
22 | #define KIOCCMD _IOW('k', 8, int) | ||
23 | |||
24 | /* Return if keystrokes are being sent to /dev/kbd */ | ||
25 | |||
26 | /* Set routing of keystrokes to /dev/kbd */ | ||
27 | #define KIOCSDIRECT _IOW('k', 10, int) | ||
28 | |||
29 | /* Set keyboard leds */ | ||
30 | #define KIOCSLED _IOW('k', 14, unsigned char) | ||
31 | |||
32 | /* Get keyboard leds */ | ||
33 | #define KIOCGLED _IOR('k', 15, unsigned char) | ||
34 | |||
35 | /* Used by KIOC[GS]RATE */ | ||
36 | struct kbd_rate { | ||
37 | unsigned char delay; /* Delay in Hz before first repeat. */ | ||
38 | unsigned char rate; /* In characters per second (0..50). */ | ||
39 | }; | ||
40 | |||
41 | /* Set keyboard rate */ | ||
42 | #define KIOCSRATE _IOW('k', 40, struct kbd_rate) | ||
43 | |||
44 | /* Get keyboard rate */ | ||
45 | #define KIOCGRATE _IOW('k', 41, struct kbd_rate) | ||
46 | |||
47 | /* Top bit records if the key is up or down */ | ||
48 | #define KBD_UP 0x80 | ||
49 | |||
50 | /* Usable information */ | ||
51 | #define KBD_KEYMASK 0x7f | ||
52 | |||
53 | /* All keys up */ | ||
54 | #define KBD_IDLE 0x75 | ||
55 | |||
56 | #endif /* __LINUX_KBIO_H */ | ||
diff --git a/include/asm-sparc64/mmu_context.h b/include/asm-sparc64/mmu_context.h index 87c43c67866e..08ba72d7722c 100644 --- a/include/asm-sparc64/mmu_context.h +++ b/include/asm-sparc64/mmu_context.h | |||
@@ -87,37 +87,35 @@ extern void __flush_tlb_mm(unsigned long, unsigned long); | |||
87 | static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) | 87 | static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk) |
88 | { | 88 | { |
89 | unsigned long ctx_valid; | 89 | unsigned long ctx_valid; |
90 | int cpu; | ||
90 | 91 | ||
92 | /* Note: page_table_lock is used here to serialize switch_mm | ||
93 | * and activate_mm, and their calls to get_new_mmu_context. | ||
94 | * This use of page_table_lock is unrelated to its other uses. | ||
95 | */ | ||
91 | spin_lock(&mm->page_table_lock); | 96 | spin_lock(&mm->page_table_lock); |
92 | if (CTX_VALID(mm->context)) | 97 | ctx_valid = CTX_VALID(mm->context); |
93 | ctx_valid = 1; | 98 | if (!ctx_valid) |
94 | else | 99 | get_new_mmu_context(mm); |
95 | ctx_valid = 0; | 100 | spin_unlock(&mm->page_table_lock); |
96 | 101 | ||
97 | if (!ctx_valid || (old_mm != mm)) { | 102 | if (!ctx_valid || (old_mm != mm)) { |
98 | if (!ctx_valid) | ||
99 | get_new_mmu_context(mm); | ||
100 | |||
101 | load_secondary_context(mm); | 103 | load_secondary_context(mm); |
102 | reload_tlbmiss_state(tsk, mm); | 104 | reload_tlbmiss_state(tsk, mm); |
103 | } | 105 | } |
104 | 106 | ||
105 | { | 107 | /* Even if (mm == old_mm) we _must_ check |
106 | int cpu = smp_processor_id(); | 108 | * the cpu_vm_mask. If we do not we could |
107 | 109 | * corrupt the TLB state because of how | |
108 | /* Even if (mm == old_mm) we _must_ check | 110 | * smp_flush_tlb_{page,range,mm} on sparc64 |
109 | * the cpu_vm_mask. If we do not we could | 111 | * and lazy tlb switches work. -DaveM |
110 | * corrupt the TLB state because of how | 112 | */ |
111 | * smp_flush_tlb_{page,range,mm} on sparc64 | 113 | cpu = smp_processor_id(); |
112 | * and lazy tlb switches work. -DaveM | 114 | if (!ctx_valid || !cpu_isset(cpu, mm->cpu_vm_mask)) { |
113 | */ | 115 | cpu_set(cpu, mm->cpu_vm_mask); |
114 | if (!ctx_valid || !cpu_isset(cpu, mm->cpu_vm_mask)) { | 116 | __flush_tlb_mm(CTX_HWBITS(mm->context), |
115 | cpu_set(cpu, mm->cpu_vm_mask); | 117 | SECONDARY_CONTEXT); |
116 | __flush_tlb_mm(CTX_HWBITS(mm->context), | ||
117 | SECONDARY_CONTEXT); | ||
118 | } | ||
119 | } | 118 | } |
120 | spin_unlock(&mm->page_table_lock); | ||
121 | } | 119 | } |
122 | 120 | ||
123 | #define deactivate_mm(tsk,mm) do { } while (0) | 121 | #define deactivate_mm(tsk,mm) do { } while (0) |
@@ -127,6 +125,10 @@ static inline void activate_mm(struct mm_struct *active_mm, struct mm_struct *mm | |||
127 | { | 125 | { |
128 | int cpu; | 126 | int cpu; |
129 | 127 | ||
128 | /* Note: page_table_lock is used here to serialize switch_mm | ||
129 | * and activate_mm, and their calls to get_new_mmu_context. | ||
130 | * This use of page_table_lock is unrelated to its other uses. | ||
131 | */ | ||
130 | spin_lock(&mm->page_table_lock); | 132 | spin_lock(&mm->page_table_lock); |
131 | if (!CTX_VALID(mm->context)) | 133 | if (!CTX_VALID(mm->context)) |
132 | get_new_mmu_context(mm); | 134 | get_new_mmu_context(mm); |
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h index 9777a9cca88a..ee26a071c677 100644 --- a/include/asm-sparc64/termios.h +++ b/include/asm-sparc64/termios.h | |||
@@ -38,15 +38,6 @@ struct sunos_ttysize { | |||
38 | int st_columns; /* Columns on the terminal */ | 38 | int st_columns; /* Columns on the terminal */ |
39 | }; | 39 | }; |
40 | 40 | ||
41 | /* Used for packet mode */ | ||
42 | #define TIOCPKT_DATA 0 | ||
43 | #define TIOCPKT_FLUSHREAD 1 | ||
44 | #define TIOCPKT_FLUSHWRITE 2 | ||
45 | #define TIOCPKT_STOP 4 | ||
46 | #define TIOCPKT_START 8 | ||
47 | #define TIOCPKT_NOSTOP 16 | ||
48 | #define TIOCPKT_DOSTOP 32 | ||
49 | |||
50 | struct winsize { | 41 | struct winsize { |
51 | unsigned short ws_row; | 42 | unsigned short ws_row; |
52 | unsigned short ws_col; | 43 | unsigned short ws_col; |
diff --git a/include/asm-sparc64/tlb.h b/include/asm-sparc64/tlb.h index 66138d959df5..61c01882b562 100644 --- a/include/asm-sparc64/tlb.h +++ b/include/asm-sparc64/tlb.h | |||
@@ -58,11 +58,9 @@ static inline struct mmu_gather *tlb_gather_mmu(struct mm_struct *mm, unsigned i | |||
58 | static inline void tlb_flush_mmu(struct mmu_gather *mp) | 58 | static inline void tlb_flush_mmu(struct mmu_gather *mp) |
59 | { | 59 | { |
60 | if (mp->need_flush) { | 60 | if (mp->need_flush) { |
61 | free_pages_and_swap_cache(mp->pages, mp->pages_nr); | ||
62 | mp->pages_nr = 0; | ||
61 | mp->need_flush = 0; | 63 | mp->need_flush = 0; |
62 | if (!tlb_fast_mode(mp)) { | ||
63 | free_pages_and_swap_cache(mp->pages, mp->pages_nr); | ||
64 | mp->pages_nr = 0; | ||
65 | } | ||
66 | } | 64 | } |
67 | 65 | ||
68 | } | 66 | } |
@@ -78,11 +76,9 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un | |||
78 | { | 76 | { |
79 | tlb_flush_mmu(mp); | 77 | tlb_flush_mmu(mp); |
80 | 78 | ||
81 | if (mp->fullmm) { | 79 | if (mp->fullmm) |
82 | if (CTX_VALID(mp->mm->context)) | ||
83 | do_flush_tlb_mm(mp->mm); | ||
84 | mp->fullmm = 0; | 80 | mp->fullmm = 0; |
85 | } else | 81 | else |
86 | flush_tlb_pending(); | 82 | flush_tlb_pending(); |
87 | 83 | ||
88 | /* keep the page table cache within bounds */ | 84 | /* keep the page table cache within bounds */ |
@@ -93,11 +89,11 @@ static inline void tlb_finish_mmu(struct mmu_gather *mp, unsigned long start, un | |||
93 | 89 | ||
94 | static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) | 90 | static inline void tlb_remove_page(struct mmu_gather *mp, struct page *page) |
95 | { | 91 | { |
96 | mp->need_flush = 1; | ||
97 | if (tlb_fast_mode(mp)) { | 92 | if (tlb_fast_mode(mp)) { |
98 | free_page_and_swap_cache(page); | 93 | free_page_and_swap_cache(page); |
99 | return; | 94 | return; |
100 | } | 95 | } |
96 | mp->need_flush = 1; | ||
101 | mp->pages[mp->pages_nr++] = page; | 97 | mp->pages[mp->pages_nr++] = page; |
102 | if (mp->pages_nr >= FREE_PTE_NR) | 98 | if (mp->pages_nr >= FREE_PTE_NR) |
103 | tlb_flush_mmu(mp); | 99 | tlb_flush_mmu(mp); |
diff --git a/include/asm-sparc64/vuid_event.h b/include/asm-sparc64/vuid_event.h deleted file mode 100644 index 9ef4d17ad08f..000000000000 --- a/include/asm-sparc64/vuid_event.h +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* SunOS Virtual User Input Device (VUID) compatibility */ | ||
2 | |||
3 | typedef struct firm_event { | ||
4 | unsigned short id; /* tag for this event */ | ||
5 | unsigned char pair_type; /* unused by X11 */ | ||
6 | unsigned char pair; /* unused by X11 */ | ||
7 | int value; /* VKEY_UP, VKEY_DOWN or delta */ | ||
8 | struct timeval time; | ||
9 | } Firm_event; | ||
10 | |||
11 | enum { | ||
12 | FE_PAIR_NONE, | ||
13 | FE_PAIR_SET, | ||
14 | FE_PAIR_DELTA, | ||
15 | FE_PAIR_ABSOLUTE | ||
16 | }; | ||
17 | |||
18 | /* VUID stream formats */ | ||
19 | #define VUID_NATIVE 0 /* Native byte stream format */ | ||
20 | #define VUID_FIRM_EVENT 1 /* send firm_event structures */ | ||
21 | |||
22 | /* ioctls */ | ||
23 | /* Set input device byte stream format (any of VUID_{NATIVE,FIRM_EVENT}) */ | ||
24 | #define VUIDSFORMAT _IOW('v', 1, int) | ||
25 | /* Retrieve input device byte stream format */ | ||
26 | #define VUIDGFORMAT _IOR('v', 2, int) | ||
27 | |||
28 | /* Possible tag values */ | ||
29 | /* mouse buttons: */ | ||
30 | #define MS_LEFT 0x7f20 | ||
31 | #define MS_MIDDLE 0x7f21 | ||
32 | #define MS_RIGHT 0x7f22 | ||
33 | /* motion: */ | ||
34 | #define LOC_X_DELTA 0x7f80 | ||
35 | #define LOC_Y_DELTA 0x7f81 | ||
36 | #define LOC_X_ABSOLUTE 0x7f82 /* X compat, unsupported */ | ||
37 | #define LOC_Y_ABSOLUTE 0x7f83 /* X compat, unsupported */ | ||
38 | |||
39 | #define VKEY_UP 0 | ||
40 | #define VKEY_DOWN 1 | ||
diff --git a/include/linux/acct.h b/include/linux/acct.h index 19f70462b3be..93c5b3cdf951 100644 --- a/include/linux/acct.h +++ b/include/linux/acct.h | |||
@@ -117,12 +117,15 @@ struct acct_v3 | |||
117 | #include <linux/config.h> | 117 | #include <linux/config.h> |
118 | 118 | ||
119 | #ifdef CONFIG_BSD_PROCESS_ACCT | 119 | #ifdef CONFIG_BSD_PROCESS_ACCT |
120 | struct vfsmount; | ||
120 | struct super_block; | 121 | struct super_block; |
122 | extern void acct_auto_close_mnt(struct vfsmount *m); | ||
121 | extern void acct_auto_close(struct super_block *sb); | 123 | extern void acct_auto_close(struct super_block *sb); |
122 | extern void acct_process(long exitcode); | 124 | extern void acct_process(long exitcode); |
123 | extern void acct_update_integrals(struct task_struct *tsk); | 125 | extern void acct_update_integrals(struct task_struct *tsk); |
124 | extern void acct_clear_integrals(struct task_struct *tsk); | 126 | extern void acct_clear_integrals(struct task_struct *tsk); |
125 | #else | 127 | #else |
128 | #define acct_auto_close_mnt(x) do { } while (0) | ||
126 | #define acct_auto_close(x) do { } while (0) | 129 | #define acct_auto_close(x) do { } while (0) |
127 | #define acct_process(x) do { } while (0) | 130 | #define acct_process(x) do { } while (0) |
128 | #define acct_update_integrals(x) do { } while (0) | 131 | #define acct_update_integrals(x) do { } while (0) |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index ab04b4f9b0db..46a2ba617595 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -329,6 +329,7 @@ static inline int d_mountpoint(struct dentry *dentry) | |||
329 | } | 329 | } |
330 | 330 | ||
331 | extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *); | 331 | extern struct vfsmount *lookup_mnt(struct vfsmount *, struct dentry *); |
332 | extern struct vfsmount *__lookup_mnt(struct vfsmount *, struct dentry *, int); | ||
332 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); | 333 | extern struct dentry *lookup_create(struct nameidata *nd, int is_dir); |
333 | 334 | ||
334 | extern int sysctl_vfs_cache_pressure; | 335 | extern int sysctl_vfs_cache_pressure; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 9a593ef262ef..1b5f502a4b8f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -104,6 +104,10 @@ extern int dir_notify_enable; | |||
104 | #define MS_MOVE 8192 | 104 | #define MS_MOVE 8192 |
105 | #define MS_REC 16384 | 105 | #define MS_REC 16384 |
106 | #define MS_VERBOSE 32768 | 106 | #define MS_VERBOSE 32768 |
107 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ | ||
108 | #define MS_PRIVATE (1<<18) /* change to private */ | ||
109 | #define MS_SLAVE (1<<19) /* change to slave */ | ||
110 | #define MS_SHARED (1<<20) /* change to shared */ | ||
107 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ | 111 | #define MS_POSIXACL (1<<16) /* VFS does not apply the umask */ |
108 | #define MS_ACTIVE (1<<30) | 112 | #define MS_ACTIVE (1<<30) |
109 | #define MS_NOUSER (1<<31) | 113 | #define MS_NOUSER (1<<31) |
@@ -1249,7 +1253,12 @@ extern int unregister_filesystem(struct file_system_type *); | |||
1249 | extern struct vfsmount *kern_mount(struct file_system_type *); | 1253 | extern struct vfsmount *kern_mount(struct file_system_type *); |
1250 | extern int may_umount_tree(struct vfsmount *); | 1254 | extern int may_umount_tree(struct vfsmount *); |
1251 | extern int may_umount(struct vfsmount *); | 1255 | extern int may_umount(struct vfsmount *); |
1256 | extern void umount_tree(struct vfsmount *, int, struct list_head *); | ||
1257 | extern void release_mounts(struct list_head *); | ||
1252 | extern long do_mount(char *, char *, char *, unsigned long, void *); | 1258 | extern long do_mount(char *, char *, char *, unsigned long, void *); |
1259 | extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int); | ||
1260 | extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, | ||
1261 | struct vfsmount *); | ||
1253 | 1262 | ||
1254 | extern int vfs_statfs(struct super_block *, struct kstatfs *); | 1263 | extern int vfs_statfs(struct super_block *, struct kstatfs *); |
1255 | 1264 | ||
diff --git a/include/linux/mount.h b/include/linux/mount.h index f8f39937e301..dd4e83eba933 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -17,12 +17,14 @@ | |||
17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
18 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
19 | 19 | ||
20 | #define MNT_NOSUID 1 | 20 | #define MNT_NOSUID 0x01 |
21 | #define MNT_NODEV 2 | 21 | #define MNT_NODEV 0x02 |
22 | #define MNT_NOEXEC 4 | 22 | #define MNT_NOEXEC 0x04 |
23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ | ||
24 | #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ | ||
25 | #define MNT_PNODE_MASK 0x30 /* propogation flag mask */ | ||
23 | 26 | ||
24 | struct vfsmount | 27 | struct vfsmount { |
25 | { | ||
26 | struct list_head mnt_hash; | 28 | struct list_head mnt_hash; |
27 | struct vfsmount *mnt_parent; /* fs we are mounted on */ | 29 | struct vfsmount *mnt_parent; /* fs we are mounted on */ |
28 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ | 30 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ |
@@ -36,7 +38,12 @@ struct vfsmount | |||
36 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 38 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
37 | struct list_head mnt_list; | 39 | struct list_head mnt_list; |
38 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 40 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
41 | struct list_head mnt_share; /* circular list of shared mounts */ | ||
42 | struct list_head mnt_slave_list;/* list of slave mounts */ | ||
43 | struct list_head mnt_slave; /* slave list entry */ | ||
44 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | ||
39 | struct namespace *mnt_namespace; /* containing namespace */ | 45 | struct namespace *mnt_namespace; /* containing namespace */ |
46 | int mnt_pinned; | ||
40 | }; | 47 | }; |
41 | 48 | ||
42 | static inline struct vfsmount *mntget(struct vfsmount *mnt) | 49 | static inline struct vfsmount *mntget(struct vfsmount *mnt) |
@@ -46,15 +53,9 @@ static inline struct vfsmount *mntget(struct vfsmount *mnt) | |||
46 | return mnt; | 53 | return mnt; |
47 | } | 54 | } |
48 | 55 | ||
49 | extern void __mntput(struct vfsmount *mnt); | 56 | extern void mntput_no_expire(struct vfsmount *mnt); |
50 | 57 | extern void mnt_pin(struct vfsmount *mnt); | |
51 | static inline void mntput_no_expire(struct vfsmount *mnt) | 58 | extern void mnt_unpin(struct vfsmount *mnt); |
52 | { | ||
53 | if (mnt) { | ||
54 | if (atomic_dec_and_test(&mnt->mnt_count)) | ||
55 | __mntput(mnt); | ||
56 | } | ||
57 | } | ||
58 | 59 | ||
59 | static inline void mntput(struct vfsmount *mnt) | 60 | static inline void mntput(struct vfsmount *mnt) |
60 | { | 61 | { |
diff --git a/include/linux/namespace.h b/include/linux/namespace.h index 0e5a86f13b2f..6731977c4c13 100644 --- a/include/linux/namespace.h +++ b/include/linux/namespace.h | |||
@@ -9,7 +9,8 @@ struct namespace { | |||
9 | atomic_t count; | 9 | atomic_t count; |
10 | struct vfsmount * root; | 10 | struct vfsmount * root; |
11 | struct list_head list; | 11 | struct list_head list; |
12 | struct rw_semaphore sem; | 12 | wait_queue_head_t poll; |
13 | int event; | ||
13 | }; | 14 | }; |
14 | 15 | ||
15 | extern int copy_namespace(int, struct task_struct *); | 16 | extern int copy_namespace(int, struct task_struct *); |
diff --git a/include/linux/quota.h b/include/linux/quota.h index 700ead45084f..f33aeb22c26a 100644 --- a/include/linux/quota.h +++ b/include/linux/quota.h | |||
@@ -289,7 +289,6 @@ struct quota_info { | |||
289 | struct semaphore dqonoff_sem; /* Serialize quotaon & quotaoff */ | 289 | struct semaphore dqonoff_sem; /* Serialize quotaon & quotaoff */ |
290 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ | 290 | struct rw_semaphore dqptr_sem; /* serialize ops using quota_info struct, pointers from inode to dquots */ |
291 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ | 291 | struct inode *files[MAXQUOTAS]; /* inodes of quotafiles */ |
292 | struct vfsmount *mnt[MAXQUOTAS]; /* mountpoint entries of filesystems with quota files */ | ||
293 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ | 292 | struct mem_dqinfo info[MAXQUOTAS]; /* Information for each quota type */ |
294 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ | 293 | struct quota_format_ops *ops[MAXQUOTAS]; /* Operations for each type */ |
295 | }; | 294 | }; |