diff options
Diffstat (limited to 'include')
41 files changed, 357 insertions, 429 deletions
diff --git a/include/asm-cris/a.out.h b/include/asm-cris/a.out.h deleted file mode 100644 index c82e9f9b75f6..000000000000 --- a/include/asm-cris/a.out.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifndef __CRIS_A_OUT_H__ | ||
2 | #define __CRIS_A_OUT_H__ | ||
3 | |||
4 | /* we don't support a.out binaries on Linux/CRIS anyway, so this is | ||
5 | * not really used but still needed because binfmt_elf.c for some reason | ||
6 | * wants to know about a.out even if there is no interpreter available... | ||
7 | */ | ||
8 | |||
9 | struct exec | ||
10 | { | ||
11 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ | ||
12 | unsigned a_text; /* length of text, in bytes */ | ||
13 | unsigned a_data; /* length of data, in bytes */ | ||
14 | unsigned a_bss; /* length of uninitialized data area for file, in bytes */ | ||
15 | unsigned a_syms; /* length of symbol table data in file, in bytes */ | ||
16 | unsigned a_entry; /* start address */ | ||
17 | unsigned a_trsize; /* length of relocation info for text, in bytes */ | ||
18 | unsigned a_drsize; /* length of relocation info for data, in bytes */ | ||
19 | }; | ||
20 | |||
21 | |||
22 | #define N_TRSIZE(a) ((a).a_trsize) | ||
23 | #define N_DRSIZE(a) ((a).a_drsize) | ||
24 | #define N_SYMSIZE(a) ((a).a_syms) | ||
25 | |||
26 | #endif | ||
diff --git a/include/asm-generic/statfs.h b/include/asm-generic/statfs.h index 1d01043e797d..6129d6802149 100644 --- a/include/asm-generic/statfs.h +++ b/include/asm-generic/statfs.h | |||
@@ -6,33 +6,64 @@ | |||
6 | typedef __kernel_fsid_t fsid_t; | 6 | typedef __kernel_fsid_t fsid_t; |
7 | #endif | 7 | #endif |
8 | 8 | ||
9 | /* | ||
10 | * Most 64-bit platforms use 'long', while most 32-bit platforms use '__u32'. | ||
11 | * Yes, they differ in signedness as well as size. | ||
12 | * Special cases can override it for themselves -- except for S390x, which | ||
13 | * is just a little too special for us. And MIPS, which I'm not touching | ||
14 | * with a 10' pole. | ||
15 | */ | ||
16 | #ifndef __statfs_word | ||
17 | #if BITS_PER_LONG == 64 | ||
18 | #define __statfs_word long | ||
19 | #else | ||
20 | #define __statfs_word __u32 | ||
21 | #endif | ||
22 | #endif | ||
23 | |||
9 | struct statfs { | 24 | struct statfs { |
10 | __u32 f_type; | 25 | __statfs_word f_type; |
11 | __u32 f_bsize; | 26 | __statfs_word f_bsize; |
12 | __u32 f_blocks; | 27 | __statfs_word f_blocks; |
13 | __u32 f_bfree; | 28 | __statfs_word f_bfree; |
14 | __u32 f_bavail; | 29 | __statfs_word f_bavail; |
15 | __u32 f_files; | 30 | __statfs_word f_files; |
16 | __u32 f_ffree; | 31 | __statfs_word f_ffree; |
17 | __kernel_fsid_t f_fsid; | 32 | __kernel_fsid_t f_fsid; |
18 | __u32 f_namelen; | 33 | __statfs_word f_namelen; |
19 | __u32 f_frsize; | 34 | __statfs_word f_frsize; |
20 | __u32 f_spare[5]; | 35 | __statfs_word f_spare[5]; |
21 | }; | 36 | }; |
22 | 37 | ||
38 | /* | ||
39 | * ARM needs to avoid the 32-bit padding at the end, for consistency | ||
40 | * between EABI and OABI | ||
41 | */ | ||
42 | #ifndef ARCH_PACK_STATFS64 | ||
43 | #define ARCH_PACK_STATFS64 | ||
44 | #endif | ||
45 | |||
23 | struct statfs64 { | 46 | struct statfs64 { |
24 | __u32 f_type; | 47 | __statfs_word f_type; |
25 | __u32 f_bsize; | 48 | __statfs_word f_bsize; |
26 | __u64 f_blocks; | 49 | __u64 f_blocks; |
27 | __u64 f_bfree; | 50 | __u64 f_bfree; |
28 | __u64 f_bavail; | 51 | __u64 f_bavail; |
29 | __u64 f_files; | 52 | __u64 f_files; |
30 | __u64 f_ffree; | 53 | __u64 f_ffree; |
31 | __kernel_fsid_t f_fsid; | 54 | __kernel_fsid_t f_fsid; |
32 | __u32 f_namelen; | 55 | __statfs_word f_namelen; |
33 | __u32 f_frsize; | 56 | __statfs_word f_frsize; |
34 | __u32 f_spare[5]; | 57 | __statfs_word f_spare[5]; |
35 | }; | 58 | } ARCH_PACK_STATFS64; |
59 | |||
60 | /* | ||
61 | * IA64 and x86_64 need to avoid the 32-bit padding at the end, | ||
62 | * to be compatible with the i386 ABI | ||
63 | */ | ||
64 | #ifndef ARCH_PACK_COMPAT_STATFS64 | ||
65 | #define ARCH_PACK_COMPAT_STATFS64 | ||
66 | #endif | ||
36 | 67 | ||
37 | struct compat_statfs64 { | 68 | struct compat_statfs64 { |
38 | __u32 f_type; | 69 | __u32 f_type; |
@@ -46,6 +77,6 @@ struct compat_statfs64 { | |||
46 | __u32 f_namelen; | 77 | __u32 f_namelen; |
47 | __u32 f_frsize; | 78 | __u32 f_frsize; |
48 | __u32 f_spare[5]; | 79 | __u32 f_spare[5]; |
49 | }; | 80 | } ARCH_PACK_COMPAT_STATFS64; |
50 | 81 | ||
51 | #endif | 82 | #endif |
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h deleted file mode 100644 index ab150f5c1666..000000000000 --- a/include/asm-m32r/a.out.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef _ASM_M32R_A_OUT_H | ||
2 | #define _ASM_M32R_A_OUT_H | ||
3 | |||
4 | struct exec | ||
5 | { | ||
6 | unsigned long a_info; /* Use macros N_MAGIC, etc for access */ | ||
7 | unsigned a_text; /* length of text, in bytes */ | ||
8 | unsigned a_data; /* length of data, in bytes */ | ||
9 | unsigned a_bss; /* length of uninitialized data area for file, in bytes */ | ||
10 | unsigned a_syms; /* length of symbol table data in file, in bytes */ | ||
11 | unsigned a_entry; /* start address */ | ||
12 | unsigned a_trsize; /* length of relocation info for text, in bytes */ | ||
13 | unsigned a_drsize; /* length of relocation info for data, in bytes */ | ||
14 | }; | ||
15 | |||
16 | #define N_TRSIZE(a) ((a).a_trsize) | ||
17 | #define N_DRSIZE(a) ((a).a_drsize) | ||
18 | #define N_SYMSIZE(a) ((a).a_syms) | ||
19 | |||
20 | #endif /* _ASM_M32R_A_OUT_H */ | ||
diff --git a/include/asm-parisc/a.out.h b/include/asm-parisc/a.out.h deleted file mode 100644 index eb04e34c5bb1..000000000000 --- a/include/asm-parisc/a.out.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | #ifndef __PARISC_A_OUT_H__ | ||
2 | #define __PARISC_A_OUT_H__ | ||
3 | |||
4 | struct exec | ||
5 | { | ||
6 | unsigned int a_info; /* Use macros N_MAGIC, etc for access */ | ||
7 | unsigned a_text; /* length of text, in bytes */ | ||
8 | unsigned a_data; /* length of data, in bytes */ | ||
9 | unsigned a_bss; /* length of uninitialized data area for file, in bytes */ | ||
10 | unsigned a_syms; /* length of symbol table data in file, in bytes */ | ||
11 | unsigned a_entry; /* start address */ | ||
12 | unsigned a_trsize; /* length of relocation info for text, in bytes */ | ||
13 | unsigned a_drsize; /* length of relocation info for data, in bytes */ | ||
14 | }; | ||
15 | |||
16 | #define N_TRSIZE(a) ((a).a_trsize) | ||
17 | #define N_DRSIZE(a) ((a).a_drsize) | ||
18 | #define N_SYMSIZE(a) ((a).a_syms) | ||
19 | |||
20 | #endif /* __A_OUT_GNU_H__ */ | ||
diff --git a/include/asm-parisc/statfs.h b/include/asm-parisc/statfs.h index 1d2b8130b23d..324bea905dc6 100644 --- a/include/asm-parisc/statfs.h +++ b/include/asm-parisc/statfs.h | |||
@@ -1,58 +1,7 @@ | |||
1 | #ifndef _PARISC_STATFS_H | 1 | #ifndef _PARISC_STATFS_H |
2 | #define _PARISC_STATFS_H | 2 | #define _PARISC_STATFS_H |
3 | 3 | ||
4 | #ifndef __KERNEL_STRICT_NAMES | 4 | #define __statfs_word long |
5 | 5 | #include <asm-generic/statfs.h> | |
6 | #include <linux/types.h> | ||
7 | |||
8 | typedef __kernel_fsid_t fsid_t; | ||
9 | |||
10 | #endif | ||
11 | |||
12 | /* | ||
13 | * It appears that PARISC could be 64 _or_ 32 bit. | ||
14 | * 64-bit fields must be explicitly 64-bit in statfs64. | ||
15 | */ | ||
16 | struct statfs { | ||
17 | long f_type; | ||
18 | long f_bsize; | ||
19 | long f_blocks; | ||
20 | long f_bfree; | ||
21 | long f_bavail; | ||
22 | long f_files; | ||
23 | long f_ffree; | ||
24 | __kernel_fsid_t f_fsid; | ||
25 | long f_namelen; | ||
26 | long f_frsize; | ||
27 | long f_spare[5]; | ||
28 | }; | ||
29 | |||
30 | struct statfs64 { | ||
31 | long f_type; | ||
32 | long f_bsize; | ||
33 | __u64 f_blocks; | ||
34 | __u64 f_bfree; | ||
35 | __u64 f_bavail; | ||
36 | __u64 f_files; | ||
37 | __u64 f_ffree; | ||
38 | __kernel_fsid_t f_fsid; | ||
39 | long f_namelen; | ||
40 | long f_frsize; | ||
41 | long f_spare[5]; | ||
42 | }; | ||
43 | |||
44 | struct compat_statfs64 { | ||
45 | __u32 f_type; | ||
46 | __u32 f_bsize; | ||
47 | __u64 f_blocks; | ||
48 | __u64 f_bfree; | ||
49 | __u64 f_bavail; | ||
50 | __u64 f_files; | ||
51 | __u64 f_ffree; | ||
52 | __kernel_fsid_t f_fsid; | ||
53 | __u32 f_namelen; | ||
54 | __u32 f_frsize; | ||
55 | __u32 f_spare[5]; | ||
56 | }; | ||
57 | 6 | ||
58 | #endif | 7 | #endif |
diff --git a/include/asm-x86/desc.h b/include/asm-x86/desc.h index ebc307817e98..f06adac7938c 100644 --- a/include/asm-x86/desc.h +++ b/include/asm-x86/desc.h | |||
@@ -351,20 +351,16 @@ static inline void set_system_intr_gate(unsigned int n, void *addr) | |||
351 | _set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS); | 351 | _set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS); |
352 | } | 352 | } |
353 | 353 | ||
354 | static inline void set_trap_gate(unsigned int n, void *addr) | 354 | static inline void set_system_trap_gate(unsigned int n, void *addr) |
355 | { | 355 | { |
356 | BUG_ON((unsigned)n > 0xFF); | 356 | BUG_ON((unsigned)n > 0xFF); |
357 | _set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS); | 357 | _set_gate(n, GATE_TRAP, addr, 0x3, 0, __KERNEL_CS); |
358 | } | 358 | } |
359 | 359 | ||
360 | static inline void set_system_gate(unsigned int n, void *addr) | 360 | static inline void set_trap_gate(unsigned int n, void *addr) |
361 | { | 361 | { |
362 | BUG_ON((unsigned)n > 0xFF); | 362 | BUG_ON((unsigned)n > 0xFF); |
363 | #ifdef CONFIG_X86_32 | 363 | _set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS); |
364 | _set_gate(n, GATE_TRAP, addr, 0x3, 0, __KERNEL_CS); | ||
365 | #else | ||
366 | _set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS); | ||
367 | #endif | ||
368 | } | 364 | } |
369 | 365 | ||
370 | static inline void set_task_gate(unsigned int n, unsigned int gdt_entry) | 366 | static inline void set_task_gate(unsigned int n, unsigned int gdt_entry) |
@@ -379,7 +375,7 @@ static inline void set_intr_gate_ist(int n, void *addr, unsigned ist) | |||
379 | _set_gate(n, GATE_INTERRUPT, addr, 0, ist, __KERNEL_CS); | 375 | _set_gate(n, GATE_INTERRUPT, addr, 0, ist, __KERNEL_CS); |
380 | } | 376 | } |
381 | 377 | ||
382 | static inline void set_system_gate_ist(int n, void *addr, unsigned ist) | 378 | static inline void set_system_intr_gate_ist(int n, void *addr, unsigned ist) |
383 | { | 379 | { |
384 | BUG_ON((unsigned)n > 0xFF); | 380 | BUG_ON((unsigned)n > 0xFF); |
385 | _set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS); | 381 | _set_gate(n, GATE_INTERRUPT, addr, 0x3, ist, __KERNEL_CS); |
diff --git a/include/asm-x86/es7000/mpparse.h b/include/asm-x86/es7000/mpparse.h index 7b5c889d8e7d..ed5a3caae141 100644 --- a/include/asm-x86/es7000/mpparse.h +++ b/include/asm-x86/es7000/mpparse.h | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | extern int parse_unisys_oem (char *oemptr); | 6 | extern int parse_unisys_oem (char *oemptr); |
7 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | 7 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); |
8 | extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr); | ||
8 | extern void setup_unisys(void); | 9 | extern void setup_unisys(void); |
9 | 10 | ||
10 | #ifndef CONFIG_X86_GENERICARCH | 11 | #ifndef CONFIG_X86_GENERICARCH |
diff --git a/include/asm-x86/fixmap_32.h b/include/asm-x86/fixmap_32.h index 784e3e759866..8844002da0e0 100644 --- a/include/asm-x86/fixmap_32.h +++ b/include/asm-x86/fixmap_32.h | |||
@@ -94,10 +94,10 @@ enum fixed_addresses { | |||
94 | * can have a single pgd entry and a single pte table: | 94 | * can have a single pgd entry and a single pte table: |
95 | */ | 95 | */ |
96 | #define NR_FIX_BTMAPS 64 | 96 | #define NR_FIX_BTMAPS 64 |
97 | #define FIX_BTMAPS_NESTING 4 | 97 | #define FIX_BTMAPS_SLOTS 4 |
98 | FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 - | 98 | FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 - |
99 | (__end_of_permanent_fixed_addresses & 255), | 99 | (__end_of_permanent_fixed_addresses & 255), |
100 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_NESTING - 1, | 100 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, |
101 | FIX_WP_TEST, | 101 | FIX_WP_TEST, |
102 | #ifdef CONFIG_ACPI | 102 | #ifdef CONFIG_ACPI |
103 | FIX_ACPI_BEGIN, | 103 | FIX_ACPI_BEGIN, |
diff --git a/include/asm-x86/fixmap_64.h b/include/asm-x86/fixmap_64.h index dafb24bc0424..dab4751d1307 100644 --- a/include/asm-x86/fixmap_64.h +++ b/include/asm-x86/fixmap_64.h | |||
@@ -49,6 +49,7 @@ enum fixed_addresses { | |||
49 | #ifdef CONFIG_PARAVIRT | 49 | #ifdef CONFIG_PARAVIRT |
50 | FIX_PARAVIRT_BOOTMAP, | 50 | FIX_PARAVIRT_BOOTMAP, |
51 | #endif | 51 | #endif |
52 | __end_of_permanent_fixed_addresses, | ||
52 | #ifdef CONFIG_ACPI | 53 | #ifdef CONFIG_ACPI |
53 | FIX_ACPI_BEGIN, | 54 | FIX_ACPI_BEGIN, |
54 | FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1, | 55 | FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1, |
@@ -56,19 +57,18 @@ enum fixed_addresses { | |||
56 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | 57 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT |
57 | FIX_OHCI1394_BASE, | 58 | FIX_OHCI1394_BASE, |
58 | #endif | 59 | #endif |
59 | __end_of_permanent_fixed_addresses, | ||
60 | /* | 60 | /* |
61 | * 256 temporary boot-time mappings, used by early_ioremap(), | 61 | * 256 temporary boot-time mappings, used by early_ioremap(), |
62 | * before ioremap() is functional. | 62 | * before ioremap() is functional. |
63 | * | 63 | * |
64 | * We round it up to the next 512 pages boundary so that we | 64 | * We round it up to the next 256 pages boundary so that we |
65 | * can have a single pgd entry and a single pte table: | 65 | * can have a single pgd entry and a single pte table: |
66 | */ | 66 | */ |
67 | #define NR_FIX_BTMAPS 64 | 67 | #define NR_FIX_BTMAPS 64 |
68 | #define FIX_BTMAPS_NESTING 4 | 68 | #define FIX_BTMAPS_SLOTS 4 |
69 | FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 512 - | 69 | FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 - |
70 | (__end_of_permanent_fixed_addresses & 511), | 70 | (__end_of_permanent_fixed_addresses & 255), |
71 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_NESTING - 1, | 71 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, |
72 | __end_of_fixed_addresses | 72 | __end_of_fixed_addresses |
73 | }; | 73 | }; |
74 | 74 | ||
diff --git a/include/asm-x86/io.h b/include/asm-x86/io.h index 72b7719523bf..a233f835e0b5 100644 --- a/include/asm-x86/io.h +++ b/include/asm-x86/io.h | |||
@@ -5,20 +5,6 @@ | |||
5 | 5 | ||
6 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
7 | 7 | ||
8 | /* | ||
9 | * early_ioremap() and early_iounmap() are for temporary early boot-time | ||
10 | * mappings, before the real ioremap() is functional. | ||
11 | * A boot-time mapping is currently limited to at most 16 pages. | ||
12 | */ | ||
13 | #ifndef __ASSEMBLY__ | ||
14 | extern void early_ioremap_init(void); | ||
15 | extern void early_ioremap_clear(void); | ||
16 | extern void early_ioremap_reset(void); | ||
17 | extern void *early_ioremap(unsigned long offset, unsigned long size); | ||
18 | extern void early_iounmap(void *addr, unsigned long size); | ||
19 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | ||
20 | #endif | ||
21 | |||
22 | #define build_mmio_read(name, size, type, reg, barrier) \ | 8 | #define build_mmio_read(name, size, type, reg, barrier) \ |
23 | static inline type name(const volatile void __iomem *addr) \ | 9 | static inline type name(const volatile void __iomem *addr) \ |
24 | { type ret; asm volatile("mov" size " %1,%0":reg (ret) \ | 10 | { type ret; asm volatile("mov" size " %1,%0":reg (ret) \ |
@@ -97,6 +83,7 @@ extern void early_ioremap_init(void); | |||
97 | extern void early_ioremap_clear(void); | 83 | extern void early_ioremap_clear(void); |
98 | extern void early_ioremap_reset(void); | 84 | extern void early_ioremap_reset(void); |
99 | extern void *early_ioremap(unsigned long offset, unsigned long size); | 85 | extern void *early_ioremap(unsigned long offset, unsigned long size); |
86 | extern void *early_memremap(unsigned long offset, unsigned long size); | ||
100 | extern void early_iounmap(void *addr, unsigned long size); | 87 | extern void early_iounmap(void *addr, unsigned long size); |
101 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | 88 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); |
102 | 89 | ||
diff --git a/include/asm-x86/io_64.h b/include/asm-x86/io_64.h index 64429e9431a8..ee6e086b7dfe 100644 --- a/include/asm-x86/io_64.h +++ b/include/asm-x86/io_64.h | |||
@@ -165,9 +165,6 @@ static inline void *phys_to_virt(unsigned long address) | |||
165 | 165 | ||
166 | #include <asm-generic/iomap.h> | 166 | #include <asm-generic/iomap.h> |
167 | 167 | ||
168 | extern void *early_ioremap(unsigned long addr, unsigned long size); | ||
169 | extern void early_iounmap(void *addr, unsigned long size); | ||
170 | |||
171 | /* | 168 | /* |
172 | * This one maps high address device memory and turns off caching for that area. | 169 | * This one maps high address device memory and turns off caching for that area. |
173 | * it's useful if some control registers are in such an area and write combining | 170 | * it's useful if some control registers are in such an area and write combining |
diff --git a/include/asm-x86/ioctls.h b/include/asm-x86/ioctls.h index 336603512399..06752a649044 100644 --- a/include/asm-x86/ioctls.h +++ b/include/asm-x86/ioctls.h | |||
@@ -51,9 +51,15 @@ | |||
51 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) | 51 | #define TCSETS2 _IOW('T', 0x2B, struct termios2) |
52 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) | 52 | #define TCSETSW2 _IOW('T', 0x2C, struct termios2) |
53 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) | 53 | #define TCSETSF2 _IOW('T', 0x2D, struct termios2) |
54 | #define TIOCGRS485 0x542E | ||
55 | #define TIOCSRS485 0x542F | ||
54 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) | 56 | #define TIOCGPTN _IOR('T', 0x30, unsigned int) |
55 | /* Get Pty Number (of pty-mux device) */ | 57 | /* Get Pty Number (of pty-mux device) */ |
56 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ | 58 | #define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */ |
59 | #define TCGETX 0x5432 /* SYS5 TCGETX compatibility */ | ||
60 | #define TCSETX 0x5433 | ||
61 | #define TCSETXF 0x5434 | ||
62 | #define TCSETXW 0x5435 | ||
57 | 63 | ||
58 | #define FIONCLEX 0x5450 | 64 | #define FIONCLEX 0x5450 |
59 | #define FIOCLEX 0x5451 | 65 | #define FIOCLEX 0x5451 |
diff --git a/include/asm-x86/irqflags.h b/include/asm-x86/irqflags.h index 424acb48cd61..2bdab21f0898 100644 --- a/include/asm-x86/irqflags.h +++ b/include/asm-x86/irqflags.h | |||
@@ -166,27 +166,6 @@ static inline int raw_irqs_disabled(void) | |||
166 | return raw_irqs_disabled_flags(flags); | 166 | return raw_irqs_disabled_flags(flags); |
167 | } | 167 | } |
168 | 168 | ||
169 | /* | ||
170 | * makes the traced hardirq state match with the machine state | ||
171 | * | ||
172 | * should be a rarely used function, only in places where its | ||
173 | * otherwise impossible to know the irq state, like in traps. | ||
174 | */ | ||
175 | static inline void trace_hardirqs_fixup_flags(unsigned long flags) | ||
176 | { | ||
177 | if (raw_irqs_disabled_flags(flags)) | ||
178 | trace_hardirqs_off(); | ||
179 | else | ||
180 | trace_hardirqs_on(); | ||
181 | } | ||
182 | |||
183 | static inline void trace_hardirqs_fixup(void) | ||
184 | { | ||
185 | unsigned long flags = __raw_local_save_flags(); | ||
186 | |||
187 | trace_hardirqs_fixup_flags(flags); | ||
188 | } | ||
189 | |||
190 | #else | 169 | #else |
191 | 170 | ||
192 | #ifdef CONFIG_X86_64 | 171 | #ifdef CONFIG_X86_64 |
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h index 5ec3ad3e825c..fbbab66ee9df 100644 --- a/include/asm-x86/kdebug.h +++ b/include/asm-x86/kdebug.h | |||
@@ -27,10 +27,9 @@ extern void printk_address(unsigned long address, int reliable); | |||
27 | extern void die(const char *, struct pt_regs *,long); | 27 | extern void die(const char *, struct pt_regs *,long); |
28 | extern int __must_check __die(const char *, struct pt_regs *, long); | 28 | extern int __must_check __die(const char *, struct pt_regs *, long); |
29 | extern void show_registers(struct pt_regs *regs); | 29 | extern void show_registers(struct pt_regs *regs); |
30 | extern void __show_registers(struct pt_regs *, int all); | ||
31 | extern void show_trace(struct task_struct *t, struct pt_regs *regs, | 30 | extern void show_trace(struct task_struct *t, struct pt_regs *regs, |
32 | unsigned long *sp, unsigned long bp); | 31 | unsigned long *sp, unsigned long bp); |
33 | extern void __show_regs(struct pt_regs *regs); | 32 | extern void __show_regs(struct pt_regs *regs, int all); |
34 | extern void show_regs(struct pt_regs *regs); | 33 | extern void show_regs(struct pt_regs *regs); |
35 | extern unsigned long oops_begin(void); | 34 | extern unsigned long oops_begin(void); |
36 | extern void oops_end(unsigned long, struct pt_regs *, int signr); | 35 | extern void oops_end(unsigned long, struct pt_regs *, int signr); |
diff --git a/include/asm-x86/kprobes.h b/include/asm-x86/kprobes.h index bd8407863c13..8a0748d01036 100644 --- a/include/asm-x86/kprobes.h +++ b/include/asm-x86/kprobes.h | |||
@@ -82,15 +82,6 @@ struct kprobe_ctlblk { | |||
82 | struct prev_kprobe prev_kprobe; | 82 | struct prev_kprobe prev_kprobe; |
83 | }; | 83 | }; |
84 | 84 | ||
85 | /* trap3/1 are intr gates for kprobes. So, restore the status of IF, | ||
86 | * if necessary, before executing the original int3/1 (trap) handler. | ||
87 | */ | ||
88 | static inline void restore_interrupts(struct pt_regs *regs) | ||
89 | { | ||
90 | if (regs->flags & X86_EFLAGS_IF) | ||
91 | local_irq_enable(); | ||
92 | } | ||
93 | |||
94 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); | 85 | extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr); |
95 | extern int kprobe_exceptions_notify(struct notifier_block *self, | 86 | extern int kprobe_exceptions_notify(struct notifier_block *self, |
96 | unsigned long val, void *data); | 87 | unsigned long val, void *data); |
diff --git a/include/asm-x86/mach-default/mach_traps.h b/include/asm-x86/mach-default/mach_traps.h index de9ac3f5c4ce..ff8778f26b84 100644 --- a/include/asm-x86/mach-default/mach_traps.h +++ b/include/asm-x86/mach-default/mach_traps.h | |||
@@ -7,12 +7,6 @@ | |||
7 | 7 | ||
8 | #include <asm/mc146818rtc.h> | 8 | #include <asm/mc146818rtc.h> |
9 | 9 | ||
10 | static inline void clear_mem_error(unsigned char reason) | ||
11 | { | ||
12 | reason = (reason & 0xf) | 4; | ||
13 | outb(reason, 0x61); | ||
14 | } | ||
15 | |||
16 | static inline unsigned char get_nmi_reason(void) | 10 | static inline unsigned char get_nmi_reason(void) |
17 | { | 11 | { |
18 | return inb(0x61); | 12 | return inb(0x61); |
diff --git a/include/asm-x86/module.h b/include/asm-x86/module.h index 48dc3e0c07d9..864f2005fc1d 100644 --- a/include/asm-x86/module.h +++ b/include/asm-x86/module.h | |||
@@ -52,8 +52,6 @@ struct mod_arch_specific {}; | |||
52 | #define MODULE_PROC_FAMILY "EFFICEON " | 52 | #define MODULE_PROC_FAMILY "EFFICEON " |
53 | #elif defined CONFIG_MWINCHIPC6 | 53 | #elif defined CONFIG_MWINCHIPC6 |
54 | #define MODULE_PROC_FAMILY "WINCHIPC6 " | 54 | #define MODULE_PROC_FAMILY "WINCHIPC6 " |
55 | #elif defined CONFIG_MWINCHIP2 | ||
56 | #define MODULE_PROC_FAMILY "WINCHIP2 " | ||
57 | #elif defined CONFIG_MWINCHIP3D | 55 | #elif defined CONFIG_MWINCHIP3D |
58 | #define MODULE_PROC_FAMILY "WINCHIP3D " | 56 | #define MODULE_PROC_FAMILY "WINCHIP3D " |
59 | #elif defined CONFIG_MCYRIXIII | 57 | #elif defined CONFIG_MCYRIXIII |
diff --git a/include/asm-x86/nmi.h b/include/asm-x86/nmi.h index d5e715f024dc..a53f829a97c5 100644 --- a/include/asm-x86/nmi.h +++ b/include/asm-x86/nmi.h | |||
@@ -15,10 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | int do_nmi_callback(struct pt_regs *regs, int cpu); | 16 | int do_nmi_callback(struct pt_regs *regs, int cpu); |
17 | 17 | ||
18 | #ifdef CONFIG_X86_64 | ||
19 | extern void default_do_nmi(struct pt_regs *); | ||
20 | #endif | ||
21 | |||
22 | extern void die_nmi(char *str, struct pt_regs *regs, int do_panic); | 18 | extern void die_nmi(char *str, struct pt_regs *regs, int do_panic); |
23 | extern int check_nmi_watchdog(void); | 19 | extern int check_nmi_watchdog(void); |
24 | extern int nmi_watchdog_enabled; | 20 | extern int nmi_watchdog_enabled; |
diff --git a/include/asm-x86/page.h b/include/asm-x86/page.h index c91574776751..d4f1d5791fc1 100644 --- a/include/asm-x86/page.h +++ b/include/asm-x86/page.h | |||
@@ -179,6 +179,7 @@ static inline pteval_t native_pte_flags(pte_t pte) | |||
179 | #endif /* CONFIG_PARAVIRT */ | 179 | #endif /* CONFIG_PARAVIRT */ |
180 | 180 | ||
181 | #define __pa(x) __phys_addr((unsigned long)(x)) | 181 | #define __pa(x) __phys_addr((unsigned long)(x)) |
182 | #define __pa_nodebug(x) __phys_addr_nodebug((unsigned long)(x)) | ||
182 | /* __pa_symbol should be used for C visible symbols. | 183 | /* __pa_symbol should be used for C visible symbols. |
183 | This seems to be the official gcc blessed way to do such arithmetic. */ | 184 | This seems to be the official gcc blessed way to do such arithmetic. */ |
184 | #define __pa_symbol(x) __pa(__phys_reloc_hide((unsigned long)(x))) | 185 | #define __pa_symbol(x) __pa(__phys_reloc_hide((unsigned long)(x))) |
@@ -188,9 +189,14 @@ static inline pteval_t native_pte_flags(pte_t pte) | |||
188 | #define __boot_va(x) __va(x) | 189 | #define __boot_va(x) __va(x) |
189 | #define __boot_pa(x) __pa(x) | 190 | #define __boot_pa(x) __pa(x) |
190 | 191 | ||
192 | /* | ||
193 | * virt_to_page(kaddr) returns a valid pointer if and only if | ||
194 | * virt_addr_valid(kaddr) returns true. | ||
195 | */ | ||
191 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 196 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
192 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 197 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
193 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 198 | extern bool __virt_addr_valid(unsigned long kaddr); |
199 | #define virt_addr_valid(kaddr) __virt_addr_valid((unsigned long) (kaddr)) | ||
194 | 200 | ||
195 | #endif /* __ASSEMBLY__ */ | 201 | #endif /* __ASSEMBLY__ */ |
196 | 202 | ||
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index 9c5a737a9af9..e8d80d1de237 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h | |||
@@ -20,6 +20,12 @@ | |||
20 | #endif | 20 | #endif |
21 | #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) | 21 | #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) |
22 | 22 | ||
23 | #define STACKFAULT_STACK 0 | ||
24 | #define DOUBLEFAULT_STACK 1 | ||
25 | #define NMI_STACK 0 | ||
26 | #define DEBUG_STACK 0 | ||
27 | #define MCE_STACK 0 | ||
28 | #define N_EXCEPTION_STACKS 1 | ||
23 | 29 | ||
24 | #ifdef CONFIG_X86_PAE | 30 | #ifdef CONFIG_X86_PAE |
25 | /* 44=32+12, the limit we can fit into an unsigned long pfn */ | 31 | /* 44=32+12, the limit we can fit into an unsigned long pfn */ |
@@ -73,11 +79,11 @@ typedef struct page *pgtable_t; | |||
73 | #endif | 79 | #endif |
74 | 80 | ||
75 | #ifndef __ASSEMBLY__ | 81 | #ifndef __ASSEMBLY__ |
76 | #define __phys_addr_const(x) ((x) - PAGE_OFFSET) | 82 | #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET) |
77 | #ifdef CONFIG_DEBUG_VIRTUAL | 83 | #ifdef CONFIG_DEBUG_VIRTUAL |
78 | extern unsigned long __phys_addr(unsigned long); | 84 | extern unsigned long __phys_addr(unsigned long); |
79 | #else | 85 | #else |
80 | #define __phys_addr(x) ((x) - PAGE_OFFSET) | 86 | #define __phys_addr(x) __phys_addr_nodebug(x) |
81 | #endif | 87 | #endif |
82 | #define __phys_reloc_hide(x) RELOC_HIDE((x), 0) | 88 | #define __phys_reloc_hide(x) RELOC_HIDE((x), 0) |
83 | 89 | ||
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index ed932453ef26..182f9d4c570f 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -15,7 +15,7 @@ | |||
15 | #define _PAGE_BIT_PAT 7 /* on 4KB pages */ | 15 | #define _PAGE_BIT_PAT 7 /* on 4KB pages */ |
16 | #define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */ | 16 | #define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */ |
17 | #define _PAGE_BIT_UNUSED1 9 /* available for programmer */ | 17 | #define _PAGE_BIT_UNUSED1 9 /* available for programmer */ |
18 | #define _PAGE_BIT_UNUSED2 10 | 18 | #define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */ |
19 | #define _PAGE_BIT_UNUSED3 11 | 19 | #define _PAGE_BIT_UNUSED3 11 |
20 | #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ | 20 | #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ |
21 | #define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 | 21 | #define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 |
@@ -32,7 +32,7 @@ | |||
32 | #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE) | 32 | #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE) |
33 | #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL) | 33 | #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL) |
34 | #define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1) | 34 | #define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1) |
35 | #define _PAGE_UNUSED2 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED2) | 35 | #define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP) |
36 | #define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3) | 36 | #define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3) |
37 | #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) | 37 | #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) |
38 | #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) | 38 | #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) |
@@ -99,6 +99,11 @@ | |||
99 | #define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE) | 99 | #define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE) |
100 | #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) | 100 | #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) |
101 | 101 | ||
102 | #define __PAGE_KERNEL_IO (__PAGE_KERNEL | _PAGE_IOMAP) | ||
103 | #define __PAGE_KERNEL_IO_NOCACHE (__PAGE_KERNEL_NOCACHE | _PAGE_IOMAP) | ||
104 | #define __PAGE_KERNEL_IO_UC_MINUS (__PAGE_KERNEL_UC_MINUS | _PAGE_IOMAP) | ||
105 | #define __PAGE_KERNEL_IO_WC (__PAGE_KERNEL_WC | _PAGE_IOMAP) | ||
106 | |||
102 | #define PAGE_KERNEL __pgprot(__PAGE_KERNEL) | 107 | #define PAGE_KERNEL __pgprot(__PAGE_KERNEL) |
103 | #define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO) | 108 | #define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO) |
104 | #define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC) | 109 | #define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC) |
@@ -113,6 +118,11 @@ | |||
113 | #define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL) | 118 | #define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL) |
114 | #define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE) | 119 | #define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE) |
115 | 120 | ||
121 | #define PAGE_KERNEL_IO __pgprot(__PAGE_KERNEL_IO) | ||
122 | #define PAGE_KERNEL_IO_NOCACHE __pgprot(__PAGE_KERNEL_IO_NOCACHE) | ||
123 | #define PAGE_KERNEL_IO_UC_MINUS __pgprot(__PAGE_KERNEL_IO_UC_MINUS) | ||
124 | #define PAGE_KERNEL_IO_WC __pgprot(__PAGE_KERNEL_IO_WC) | ||
125 | |||
116 | /* xwr */ | 126 | /* xwr */ |
117 | #define __P000 PAGE_NONE | 127 | #define __P000 PAGE_NONE |
118 | #define __P001 PAGE_READONLY | 128 | #define __P001 PAGE_READONLY |
@@ -196,7 +206,7 @@ static inline int pte_exec(pte_t pte) | |||
196 | 206 | ||
197 | static inline int pte_special(pte_t pte) | 207 | static inline int pte_special(pte_t pte) |
198 | { | 208 | { |
199 | return pte_val(pte) & _PAGE_SPECIAL; | 209 | return pte_flags(pte) & _PAGE_SPECIAL; |
200 | } | 210 | } |
201 | 211 | ||
202 | static inline unsigned long pte_pfn(pte_t pte) | 212 | static inline unsigned long pte_pfn(pte_t pte) |
diff --git a/include/asm-x86/ptrace.h b/include/asm-x86/ptrace.h index ac578f11c1c5..a2025525a15a 100644 --- a/include/asm-x86/ptrace.h +++ b/include/asm-x86/ptrace.h | |||
@@ -174,12 +174,8 @@ extern unsigned long profile_pc(struct pt_regs *regs); | |||
174 | 174 | ||
175 | extern unsigned long | 175 | extern unsigned long |
176 | convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs); | 176 | convert_ip_to_linear(struct task_struct *child, struct pt_regs *regs); |
177 | |||
178 | #ifdef CONFIG_X86_32 | ||
179 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, | 177 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, |
180 | int error_code, int si_code); | 178 | int error_code, int si_code); |
181 | #endif | ||
182 | |||
183 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); | 179 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); |
184 | 180 | ||
185 | extern long syscall_trace_enter(struct pt_regs *); | 181 | extern long syscall_trace_enter(struct pt_regs *); |
diff --git a/include/asm-x86/segment.h b/include/asm-x86/segment.h index ea5f0a8686f7..5d6e69454891 100644 --- a/include/asm-x86/segment.h +++ b/include/asm-x86/segment.h | |||
@@ -131,12 +131,6 @@ | |||
131 | * Matching rules for certain types of segments. | 131 | * Matching rules for certain types of segments. |
132 | */ | 132 | */ |
133 | 133 | ||
134 | /* Matches only __KERNEL_CS, ignoring PnP / USER / APM segments */ | ||
135 | #define SEGMENT_IS_KERNEL_CODE(x) (((x) & 0xfc) == GDT_ENTRY_KERNEL_CS * 8) | ||
136 | |||
137 | /* Matches __KERNEL_CS and __USER_CS (they must be 2 entries apart) */ | ||
138 | #define SEGMENT_IS_FLAT_CODE(x) (((x) & 0xec) == GDT_ENTRY_KERNEL_CS * 8) | ||
139 | |||
140 | /* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ | 134 | /* Matches PNP_CS32 and PNP_CS16 (they must be consecutive) */ |
141 | #define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) | 135 | #define SEGMENT_IS_PNP_CODE(x) (((x) & 0xf4) == GDT_ENTRY_PNPBIOS_BASE * 8) |
142 | 136 | ||
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index 6df2615f9138..a6afc29f2dd9 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -141,6 +141,8 @@ void play_dead_common(void); | |||
141 | void native_send_call_func_ipi(cpumask_t mask); | 141 | void native_send_call_func_ipi(cpumask_t mask); |
142 | void native_send_call_func_single_ipi(int cpu); | 142 | void native_send_call_func_single_ipi(int cpu); |
143 | 143 | ||
144 | extern void prefill_possible_map(void); | ||
145 | |||
144 | void smp_store_cpu_info(int id); | 146 | void smp_store_cpu_info(int id); |
145 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) | 147 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) |
146 | 148 | ||
@@ -149,15 +151,11 @@ static inline int num_booting_cpus(void) | |||
149 | { | 151 | { |
150 | return cpus_weight(cpu_callout_map); | 152 | return cpus_weight(cpu_callout_map); |
151 | } | 153 | } |
152 | #endif /* CONFIG_SMP */ | ||
153 | |||
154 | #if defined(CONFIG_SMP) && defined(CONFIG_HOTPLUG_CPU) | ||
155 | extern void prefill_possible_map(void); | ||
156 | #else | 154 | #else |
157 | static inline void prefill_possible_map(void) | 155 | static inline void prefill_possible_map(void) |
158 | { | 156 | { |
159 | } | 157 | } |
160 | #endif | 158 | #endif /* CONFIG_SMP */ |
161 | 159 | ||
162 | extern unsigned disabled_cpus __cpuinitdata; | 160 | extern unsigned disabled_cpus __cpuinitdata; |
163 | 161 | ||
diff --git a/include/asm-x86/statfs.h b/include/asm-x86/statfs.h index 3f005bc3aa5b..ca5dc19dd461 100644 --- a/include/asm-x86/statfs.h +++ b/include/asm-x86/statfs.h | |||
@@ -1,63 +1,12 @@ | |||
1 | #ifndef ASM_X86__STATFS_H | 1 | #ifndef ASM_X86__STATFS_H |
2 | #define ASM_X86__STATFS_H | 2 | #define ASM_X86__STATFS_H |
3 | 3 | ||
4 | #ifdef __i386__ | ||
5 | #include <asm-generic/statfs.h> | ||
6 | #else | ||
7 | |||
8 | #ifndef __KERNEL_STRICT_NAMES | ||
9 | |||
10 | #include <linux/types.h> | ||
11 | |||
12 | typedef __kernel_fsid_t fsid_t; | ||
13 | |||
14 | #endif | ||
15 | |||
16 | /* | 4 | /* |
17 | * This is ugly -- we're already 64-bit clean, so just duplicate the | 5 | * We need compat_statfs64 to be packed, because the i386 ABI won't |
18 | * definitions. | 6 | * add padding at the end to bring it to a multiple of 8 bytes, but |
7 | * the x86_64 ABI will. | ||
19 | */ | 8 | */ |
20 | struct statfs { | 9 | #define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed,aligned(4))) |
21 | long f_type; | ||
22 | long f_bsize; | ||
23 | long f_blocks; | ||
24 | long f_bfree; | ||
25 | long f_bavail; | ||
26 | long f_files; | ||
27 | long f_ffree; | ||
28 | __kernel_fsid_t f_fsid; | ||
29 | long f_namelen; | ||
30 | long f_frsize; | ||
31 | long f_spare[5]; | ||
32 | }; | ||
33 | |||
34 | struct statfs64 { | ||
35 | long f_type; | ||
36 | long f_bsize; | ||
37 | long f_blocks; | ||
38 | long f_bfree; | ||
39 | long f_bavail; | ||
40 | long f_files; | ||
41 | long f_ffree; | ||
42 | __kernel_fsid_t f_fsid; | ||
43 | long f_namelen; | ||
44 | long f_frsize; | ||
45 | long f_spare[5]; | ||
46 | }; | ||
47 | 10 | ||
48 | struct compat_statfs64 { | 11 | #include <asm-generic/statfs.h> |
49 | __u32 f_type; | ||
50 | __u32 f_bsize; | ||
51 | __u64 f_blocks; | ||
52 | __u64 f_bfree; | ||
53 | __u64 f_bavail; | ||
54 | __u64 f_files; | ||
55 | __u64 f_ffree; | ||
56 | __kernel_fsid_t f_fsid; | ||
57 | __u32 f_namelen; | ||
58 | __u32 f_frsize; | ||
59 | __u32 f_spare[5]; | ||
60 | } __attribute__((packed)); | ||
61 | |||
62 | #endif /* !__i386__ */ | ||
63 | #endif /* ASM_X86__STATFS_H */ | 12 | #endif /* ASM_X86__STATFS_H */ |
diff --git a/include/asm-x86/system.h b/include/asm-x86/system.h index 34505dd7b24d..b20c894660f9 100644 --- a/include/asm-x86/system.h +++ b/include/asm-x86/system.h | |||
@@ -64,7 +64,10 @@ do { \ | |||
64 | \ | 64 | \ |
65 | /* regparm parameters for __switch_to(): */ \ | 65 | /* regparm parameters for __switch_to(): */ \ |
66 | [prev] "a" (prev), \ | 66 | [prev] "a" (prev), \ |
67 | [next] "d" (next)); \ | 67 | [next] "d" (next) \ |
68 | \ | ||
69 | : /* reloaded segment registers */ \ | ||
70 | "memory"); \ | ||
68 | } while (0) | 71 | } while (0) |
69 | 72 | ||
70 | /* | 73 | /* |
diff --git a/include/asm-x86/traps.h b/include/asm-x86/traps.h index 7a692baa51ae..6c3dc2c65751 100644 --- a/include/asm-x86/traps.h +++ b/include/asm-x86/traps.h | |||
@@ -3,7 +3,12 @@ | |||
3 | 3 | ||
4 | #include <asm/debugreg.h> | 4 | #include <asm/debugreg.h> |
5 | 5 | ||
6 | /* Common in X86_32 and X86_64 */ | 6 | #ifdef CONFIG_X86_32 |
7 | #define dotraplinkage | ||
8 | #else | ||
9 | #define dotraplinkage asmlinkage | ||
10 | #endif | ||
11 | |||
7 | asmlinkage void divide_error(void); | 12 | asmlinkage void divide_error(void); |
8 | asmlinkage void debug(void); | 13 | asmlinkage void debug(void); |
9 | asmlinkage void nmi(void); | 14 | asmlinkage void nmi(void); |
@@ -12,31 +17,47 @@ asmlinkage void overflow(void); | |||
12 | asmlinkage void bounds(void); | 17 | asmlinkage void bounds(void); |
13 | asmlinkage void invalid_op(void); | 18 | asmlinkage void invalid_op(void); |
14 | asmlinkage void device_not_available(void); | 19 | asmlinkage void device_not_available(void); |
20 | #ifdef CONFIG_X86_64 | ||
21 | asmlinkage void double_fault(void); | ||
22 | #endif | ||
15 | asmlinkage void coprocessor_segment_overrun(void); | 23 | asmlinkage void coprocessor_segment_overrun(void); |
16 | asmlinkage void invalid_TSS(void); | 24 | asmlinkage void invalid_TSS(void); |
17 | asmlinkage void segment_not_present(void); | 25 | asmlinkage void segment_not_present(void); |
18 | asmlinkage void stack_segment(void); | 26 | asmlinkage void stack_segment(void); |
19 | asmlinkage void general_protection(void); | 27 | asmlinkage void general_protection(void); |
20 | asmlinkage void page_fault(void); | 28 | asmlinkage void page_fault(void); |
29 | asmlinkage void spurious_interrupt_bug(void); | ||
21 | asmlinkage void coprocessor_error(void); | 30 | asmlinkage void coprocessor_error(void); |
22 | asmlinkage void simd_coprocessor_error(void); | ||
23 | asmlinkage void alignment_check(void); | 31 | asmlinkage void alignment_check(void); |
24 | asmlinkage void spurious_interrupt_bug(void); | ||
25 | #ifdef CONFIG_X86_MCE | 32 | #ifdef CONFIG_X86_MCE |
26 | asmlinkage void machine_check(void); | 33 | asmlinkage void machine_check(void); |
27 | #endif /* CONFIG_X86_MCE */ | 34 | #endif /* CONFIG_X86_MCE */ |
35 | asmlinkage void simd_coprocessor_error(void); | ||
28 | 36 | ||
29 | void do_divide_error(struct pt_regs *, long); | 37 | dotraplinkage void do_divide_error(struct pt_regs *, long); |
30 | void do_overflow(struct pt_regs *, long); | 38 | dotraplinkage void do_debug(struct pt_regs *, long); |
31 | void do_bounds(struct pt_regs *, long); | 39 | dotraplinkage void do_nmi(struct pt_regs *, long); |
32 | void do_coprocessor_segment_overrun(struct pt_regs *, long); | 40 | dotraplinkage void do_int3(struct pt_regs *, long); |
33 | void do_invalid_TSS(struct pt_regs *, long); | 41 | dotraplinkage void do_overflow(struct pt_regs *, long); |
34 | void do_segment_not_present(struct pt_regs *, long); | 42 | dotraplinkage void do_bounds(struct pt_regs *, long); |
35 | void do_stack_segment(struct pt_regs *, long); | 43 | dotraplinkage void do_invalid_op(struct pt_regs *, long); |
36 | void do_alignment_check(struct pt_regs *, long); | 44 | dotraplinkage void do_device_not_available(struct pt_regs *, long); |
37 | void do_invalid_op(struct pt_regs *, long); | 45 | dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long); |
38 | void do_general_protection(struct pt_regs *, long); | 46 | dotraplinkage void do_invalid_TSS(struct pt_regs *, long); |
39 | void do_nmi(struct pt_regs *, long); | 47 | dotraplinkage void do_segment_not_present(struct pt_regs *, long); |
48 | dotraplinkage void do_stack_segment(struct pt_regs *, long); | ||
49 | dotraplinkage void do_general_protection(struct pt_regs *, long); | ||
50 | dotraplinkage void do_page_fault(struct pt_regs *, unsigned long); | ||
51 | dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *, long); | ||
52 | dotraplinkage void do_coprocessor_error(struct pt_regs *, long); | ||
53 | dotraplinkage void do_alignment_check(struct pt_regs *, long); | ||
54 | #ifdef CONFIG_X86_MCE | ||
55 | dotraplinkage void do_machine_check(struct pt_regs *, long); | ||
56 | #endif | ||
57 | dotraplinkage void do_simd_coprocessor_error(struct pt_regs *, long); | ||
58 | #ifdef CONFIG_X86_32 | ||
59 | dotraplinkage void do_iret_error(struct pt_regs *, long); | ||
60 | #endif | ||
40 | 61 | ||
41 | static inline int get_si_code(unsigned long condition) | 62 | static inline int get_si_code(unsigned long condition) |
42 | { | 63 | { |
@@ -52,31 +73,9 @@ extern int panic_on_unrecovered_nmi; | |||
52 | extern int kstack_depth_to_print; | 73 | extern int kstack_depth_to_print; |
53 | 74 | ||
54 | #ifdef CONFIG_X86_32 | 75 | #ifdef CONFIG_X86_32 |
55 | |||
56 | void do_iret_error(struct pt_regs *, long); | ||
57 | void do_int3(struct pt_regs *, long); | ||
58 | void do_debug(struct pt_regs *, long); | ||
59 | void math_error(void __user *); | 76 | void math_error(void __user *); |
60 | void do_coprocessor_error(struct pt_regs *, long); | ||
61 | void do_simd_coprocessor_error(struct pt_regs *, long); | ||
62 | void do_spurious_interrupt_bug(struct pt_regs *, long); | ||
63 | unsigned long patch_espfix_desc(unsigned long, unsigned long); | 77 | unsigned long patch_espfix_desc(unsigned long, unsigned long); |
64 | asmlinkage void math_emulate(long); | 78 | asmlinkage void math_emulate(long); |
79 | #endif | ||
65 | 80 | ||
66 | void do_page_fault(struct pt_regs *regs, unsigned long error_code); | ||
67 | |||
68 | #else /* CONFIG_X86_32 */ | ||
69 | |||
70 | asmlinkage void double_fault(void); | ||
71 | |||
72 | asmlinkage void do_int3(struct pt_regs *, long); | ||
73 | asmlinkage void do_stack_segment(struct pt_regs *, long); | ||
74 | asmlinkage void do_debug(struct pt_regs *, unsigned long); | ||
75 | asmlinkage void do_coprocessor_error(struct pt_regs *); | ||
76 | asmlinkage void do_simd_coprocessor_error(struct pt_regs *); | ||
77 | asmlinkage void do_spurious_interrupt_bug(struct pt_regs *); | ||
78 | |||
79 | asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code); | ||
80 | |||
81 | #endif /* CONFIG_X86_32 */ | ||
82 | #endif /* ASM_X86__TRAPS_H */ | 81 | #endif /* ASM_X86__TRAPS_H */ |
diff --git a/include/asm-xtensa/a.out.h b/include/asm-xtensa/a.out.h deleted file mode 100644 index fdf13702924a..000000000000 --- a/include/asm-xtensa/a.out.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-xtensa/a.out.h | ||
3 | * | ||
4 | * Dummy a.out file. Xtensa does not support the a.out format, but the kernel | ||
5 | * seems to depend on it. | ||
6 | * | ||
7 | * This file is subject to the terms and conditions of the GNU General Public | ||
8 | * License. See the file "COPYING" in the main directory of this archive | ||
9 | * for more details. | ||
10 | * | ||
11 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
12 | */ | ||
13 | |||
14 | #ifndef _XTENSA_A_OUT_H | ||
15 | #define _XTENSA_A_OUT_H | ||
16 | |||
17 | struct exec | ||
18 | { | ||
19 | unsigned long a_info; | ||
20 | unsigned a_text; | ||
21 | unsigned a_data; | ||
22 | unsigned a_bss; | ||
23 | unsigned a_syms; | ||
24 | unsigned a_entry; | ||
25 | unsigned a_trsize; | ||
26 | unsigned a_drsize; | ||
27 | }; | ||
28 | |||
29 | #endif /* _XTENSA_A_OUT_H */ | ||
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h index 154769cad3f3..5ce0e5fd712e 100644 --- a/include/linux/devpts_fs.h +++ b/include/linux/devpts_fs.h | |||
@@ -17,20 +17,31 @@ | |||
17 | 17 | ||
18 | #ifdef CONFIG_UNIX98_PTYS | 18 | #ifdef CONFIG_UNIX98_PTYS |
19 | 19 | ||
20 | int devpts_new_index(void); | 20 | int devpts_new_index(struct inode *ptmx_inode); |
21 | void devpts_kill_index(int idx); | 21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); |
22 | int devpts_pty_new(struct tty_struct *tty); /* mknod in devpts */ | 22 | /* mknod in devpts */ |
23 | struct tty_struct *devpts_get_tty(int number); /* get tty structure */ | 23 | int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty); |
24 | void devpts_pty_kill(int number); /* unlink */ | 24 | /* get tty structure */ |
25 | struct tty_struct *devpts_get_tty(struct inode *pts_inode, int number); | ||
26 | /* unlink */ | ||
27 | void devpts_pty_kill(struct tty_struct *tty); | ||
25 | 28 | ||
26 | #else | 29 | #else |
27 | 30 | ||
28 | /* Dummy stubs in the no-pty case */ | 31 | /* Dummy stubs in the no-pty case */ |
29 | static inline int devpts_new_index(void) { return -EINVAL; } | 32 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } |
30 | static inline void devpts_kill_index(int idx) { } | 33 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } |
31 | static inline int devpts_pty_new(struct tty_struct *tty) { return -EINVAL; } | 34 | static inline int devpts_pty_new(struct inode *ptmx_inode, |
32 | static inline struct tty_struct *devpts_get_tty(int number) { return NULL; } | 35 | struct tty_struct *tty) |
33 | static inline void devpts_pty_kill(int number) { } | 36 | { |
37 | return -EINVAL; | ||
38 | } | ||
39 | static inline struct tty_struct *devpts_get_tty(struct inode *pts_inode, | ||
40 | int number) | ||
41 | { | ||
42 | return NULL; | ||
43 | } | ||
44 | static inline void devpts_pty_kill(struct tty_struct *tty) { } | ||
34 | 45 | ||
35 | #endif | 46 | #endif |
36 | 47 | ||
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 2a063b64133f..e5084eb5943a 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -2,29 +2,9 @@ | |||
2 | #define __DMI_H__ | 2 | #define __DMI_H__ |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/mod_devicetable.h> | ||
5 | 6 | ||
6 | enum dmi_field { | 7 | /* enum dmi_field is in mod_devicetable.h */ |
7 | DMI_NONE, | ||
8 | DMI_BIOS_VENDOR, | ||
9 | DMI_BIOS_VERSION, | ||
10 | DMI_BIOS_DATE, | ||
11 | DMI_SYS_VENDOR, | ||
12 | DMI_PRODUCT_NAME, | ||
13 | DMI_PRODUCT_VERSION, | ||
14 | DMI_PRODUCT_SERIAL, | ||
15 | DMI_PRODUCT_UUID, | ||
16 | DMI_BOARD_VENDOR, | ||
17 | DMI_BOARD_NAME, | ||
18 | DMI_BOARD_VERSION, | ||
19 | DMI_BOARD_SERIAL, | ||
20 | DMI_BOARD_ASSET_TAG, | ||
21 | DMI_CHASSIS_VENDOR, | ||
22 | DMI_CHASSIS_TYPE, | ||
23 | DMI_CHASSIS_VERSION, | ||
24 | DMI_CHASSIS_SERIAL, | ||
25 | DMI_CHASSIS_ASSET_TAG, | ||
26 | DMI_STRING_MAX, | ||
27 | }; | ||
28 | 8 | ||
29 | enum dmi_device_type { | 9 | enum dmi_device_type { |
30 | DMI_DEV_TYPE_ANY = 0, | 10 | DMI_DEV_TYPE_ANY = 0, |
@@ -48,23 +28,6 @@ struct dmi_header { | |||
48 | u16 handle; | 28 | u16 handle; |
49 | }; | 29 | }; |
50 | 30 | ||
51 | /* | ||
52 | * DMI callbacks for problem boards | ||
53 | */ | ||
54 | struct dmi_strmatch { | ||
55 | u8 slot; | ||
56 | char *substr; | ||
57 | }; | ||
58 | |||
59 | struct dmi_system_id { | ||
60 | int (*callback)(const struct dmi_system_id *); | ||
61 | const char *ident; | ||
62 | struct dmi_strmatch matches[4]; | ||
63 | void *driver_data; | ||
64 | }; | ||
65 | |||
66 | #define DMI_MATCH(a, b) { a, b } | ||
67 | |||
68 | struct dmi_device { | 31 | struct dmi_device { |
69 | struct list_head list; | 32 | struct list_head list; |
70 | int type; | 33 | int type; |
diff --git a/include/linux/hpet.h b/include/linux/hpet.h index 2dc29ce6c8e4..79f63a27bcef 100644 --- a/include/linux/hpet.h +++ b/include/linux/hpet.h | |||
@@ -37,6 +37,7 @@ struct hpet { | |||
37 | #define hpet_compare _u1._hpet_compare | 37 | #define hpet_compare _u1._hpet_compare |
38 | 38 | ||
39 | #define HPET_MAX_TIMERS (32) | 39 | #define HPET_MAX_TIMERS (32) |
40 | #define HPET_MAX_IRQ (32) | ||
40 | 41 | ||
41 | /* | 42 | /* |
42 | * HPET general capabilities register | 43 | * HPET general capabilities register |
@@ -64,7 +65,7 @@ struct hpet { | |||
64 | */ | 65 | */ |
65 | 66 | ||
66 | #define Tn_INT_ROUTE_CAP_MASK (0xffffffff00000000ULL) | 67 | #define Tn_INT_ROUTE_CAP_MASK (0xffffffff00000000ULL) |
67 | #define Tn_INI_ROUTE_CAP_SHIFT (32UL) | 68 | #define Tn_INT_ROUTE_CAP_SHIFT (32UL) |
68 | #define Tn_FSB_INT_DELCAP_MASK (0x8000UL) | 69 | #define Tn_FSB_INT_DELCAP_MASK (0x8000UL) |
69 | #define Tn_FSB_INT_DELCAP_SHIFT (15) | 70 | #define Tn_FSB_INT_DELCAP_SHIFT (15) |
70 | #define Tn_FSB_EN_CNF_MASK (0x4000UL) | 71 | #define Tn_FSB_EN_CNF_MASK (0x4000UL) |
@@ -91,23 +92,14 @@ struct hpet { | |||
91 | * exported interfaces | 92 | * exported interfaces |
92 | */ | 93 | */ |
93 | 94 | ||
94 | struct hpet_task { | ||
95 | void (*ht_func) (void *); | ||
96 | void *ht_data; | ||
97 | void *ht_opaque; | ||
98 | }; | ||
99 | |||
100 | struct hpet_data { | 95 | struct hpet_data { |
101 | unsigned long hd_phys_address; | 96 | unsigned long hd_phys_address; |
102 | void __iomem *hd_address; | 97 | void __iomem *hd_address; |
103 | unsigned short hd_nirqs; | 98 | unsigned short hd_nirqs; |
104 | unsigned short hd_flags; | ||
105 | unsigned int hd_state; /* timer allocated */ | 99 | unsigned int hd_state; /* timer allocated */ |
106 | unsigned int hd_irq[HPET_MAX_TIMERS]; | 100 | unsigned int hd_irq[HPET_MAX_TIMERS]; |
107 | }; | 101 | }; |
108 | 102 | ||
109 | #define HPET_DATA_PLATFORM 0x0001 /* platform call to hpet_alloc */ | ||
110 | |||
111 | static inline void hpet_reserve_timer(struct hpet_data *hd, int timer) | 103 | static inline void hpet_reserve_timer(struct hpet_data *hd, int timer) |
112 | { | 104 | { |
113 | hd->hd_state |= (1 << timer); | 105 | hd->hd_state |= (1 << timer); |
@@ -125,7 +117,7 @@ struct hpet_info { | |||
125 | unsigned short hi_timer; | 117 | unsigned short hi_timer; |
126 | }; | 118 | }; |
127 | 119 | ||
128 | #define HPET_INFO_PERIODIC 0x0001 /* timer is periodic */ | 120 | #define HPET_INFO_PERIODIC 0x0010 /* periodic-capable comparator */ |
129 | 121 | ||
130 | #define HPET_IE_ON _IO('h', 0x01) /* interrupt on */ | 122 | #define HPET_IE_ON _IO('h', 0x01) /* interrupt on */ |
131 | #define HPET_IE_OFF _IO('h', 0x02) /* interrupt off */ | 123 | #define HPET_IE_OFF _IO('h', 0x02) /* interrupt off */ |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 66c3499478b5..d2e91ea998fd 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -967,6 +967,9 @@ struct journal_s | |||
967 | #define JBD2_FLUSHED 0x008 /* The journal superblock has been flushed */ | 967 | #define JBD2_FLUSHED 0x008 /* The journal superblock has been flushed */ |
968 | #define JBD2_LOADED 0x010 /* The journal superblock has been loaded */ | 968 | #define JBD2_LOADED 0x010 /* The journal superblock has been loaded */ |
969 | #define JBD2_BARRIER 0x020 /* Use IDE barriers */ | 969 | #define JBD2_BARRIER 0x020 /* Use IDE barriers */ |
970 | #define JBD2_ABORT_ON_SYNCDATA_ERR 0x040 /* Abort the journal on file | ||
971 | * data write error in ordered | ||
972 | * mode */ | ||
970 | 973 | ||
971 | /* | 974 | /* |
972 | * Function declarations for the journaling transaction and buffer | 975 | * Function declarations for the journaling transaction and buffer |
@@ -1060,7 +1063,7 @@ extern void jbd2_journal_clear_features | |||
1060 | (journal_t *, unsigned long, unsigned long, unsigned long); | 1063 | (journal_t *, unsigned long, unsigned long, unsigned long); |
1061 | extern int jbd2_journal_create (journal_t *); | 1064 | extern int jbd2_journal_create (journal_t *); |
1062 | extern int jbd2_journal_load (journal_t *journal); | 1065 | extern int jbd2_journal_load (journal_t *journal); |
1063 | extern void jbd2_journal_destroy (journal_t *); | 1066 | extern int jbd2_journal_destroy (journal_t *); |
1064 | extern int jbd2_journal_recover (journal_t *journal); | 1067 | extern int jbd2_journal_recover (journal_t *journal); |
1065 | extern int jbd2_journal_wipe (journal_t *, int); | 1068 | extern int jbd2_journal_wipe (journal_t *, int); |
1066 | extern int jbd2_journal_skip_recovery (journal_t *); | 1069 | extern int jbd2_journal_skip_recovery (journal_t *); |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index c4db5827963d..3481a7d5bc0a 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
@@ -388,5 +388,52 @@ struct i2c_device_id { | |||
388 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | 388 | __attribute__((aligned(sizeof(kernel_ulong_t)))); |
389 | }; | 389 | }; |
390 | 390 | ||
391 | /* dmi */ | ||
392 | enum dmi_field { | ||
393 | DMI_NONE, | ||
394 | DMI_BIOS_VENDOR, | ||
395 | DMI_BIOS_VERSION, | ||
396 | DMI_BIOS_DATE, | ||
397 | DMI_SYS_VENDOR, | ||
398 | DMI_PRODUCT_NAME, | ||
399 | DMI_PRODUCT_VERSION, | ||
400 | DMI_PRODUCT_SERIAL, | ||
401 | DMI_PRODUCT_UUID, | ||
402 | DMI_BOARD_VENDOR, | ||
403 | DMI_BOARD_NAME, | ||
404 | DMI_BOARD_VERSION, | ||
405 | DMI_BOARD_SERIAL, | ||
406 | DMI_BOARD_ASSET_TAG, | ||
407 | DMI_CHASSIS_VENDOR, | ||
408 | DMI_CHASSIS_TYPE, | ||
409 | DMI_CHASSIS_VERSION, | ||
410 | DMI_CHASSIS_SERIAL, | ||
411 | DMI_CHASSIS_ASSET_TAG, | ||
412 | DMI_STRING_MAX, | ||
413 | }; | ||
414 | |||
415 | struct dmi_strmatch { | ||
416 | unsigned char slot; | ||
417 | char substr[79]; | ||
418 | }; | ||
419 | |||
420 | #ifndef __KERNEL__ | ||
421 | struct dmi_system_id { | ||
422 | kernel_ulong_t callback; | ||
423 | kernel_ulong_t ident; | ||
424 | struct dmi_strmatch matches[4]; | ||
425 | kernel_ulong_t driver_data | ||
426 | __attribute__((aligned(sizeof(kernel_ulong_t)))); | ||
427 | }; | ||
428 | #else | ||
429 | struct dmi_system_id { | ||
430 | int (*callback)(const struct dmi_system_id *); | ||
431 | const char *ident; | ||
432 | struct dmi_strmatch matches[4]; | ||
433 | void *driver_data; | ||
434 | }; | ||
435 | #endif | ||
436 | |||
437 | #define DMI_MATCH(a, b) { a, b } | ||
391 | 438 | ||
392 | #endif /* LINUX_MOD_DEVICETABLE_H */ | 439 | #endif /* LINUX_MOD_DEVICETABLE_H */ |
diff --git a/include/linux/oprofile.h b/include/linux/oprofile.h index 041bb31100f4..bcb8f725427c 100644 --- a/include/linux/oprofile.h +++ b/include/linux/oprofile.h | |||
@@ -36,6 +36,8 @@ | |||
36 | #define XEN_ENTER_SWITCH_CODE 10 | 36 | #define XEN_ENTER_SWITCH_CODE 10 |
37 | #define SPU_PROFILING_CODE 11 | 37 | #define SPU_PROFILING_CODE 11 |
38 | #define SPU_CTX_SWITCH_CODE 12 | 38 | #define SPU_CTX_SWITCH_CODE 12 |
39 | #define IBS_FETCH_CODE 13 | ||
40 | #define IBS_OP_CODE 14 | ||
39 | 41 | ||
40 | struct super_block; | 42 | struct super_block; |
41 | struct dentry; | 43 | struct dentry; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index f63b5455801c..1176f1f177e2 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1533,7 +1533,9 @@ | |||
1533 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 | 1533 | #define PCI_DEVICE_ID_MARVELL_GT64260 0x6430 |
1534 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 | 1534 | #define PCI_DEVICE_ID_MARVELL_MV64360 0x6460 |
1535 | #define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 | 1535 | #define PCI_DEVICE_ID_MARVELL_MV64460 0x6480 |
1536 | #define PCI_DEVICE_ID_MARVELL_CAFE_SD 0x4101 | 1536 | #define PCI_DEVICE_ID_MARVELL_88ALP01_NAND 0x4100 |
1537 | #define PCI_DEVICE_ID_MARVELL_88ALP01_SD 0x4101 | ||
1538 | #define PCI_DEVICE_ID_MARVELL_88ALP01_CCIC 0x4102 | ||
1537 | 1539 | ||
1538 | #define PCI_VENDOR_ID_V3 0x11b0 | 1540 | #define PCI_VENDOR_ID_V3 0x11b0 |
1539 | #define PCI_DEVICE_ID_V3_V960 0x0001 | 1541 | #define PCI_DEVICE_ID_V3_V960 0x0001 |
diff --git a/include/linux/serial.h b/include/linux/serial.h index deb714314fb1..1ea8d9265bf6 100644 --- a/include/linux/serial.h +++ b/include/linux/serial.h | |||
@@ -173,6 +173,22 @@ struct serial_icounter_struct { | |||
173 | int reserved[9]; | 173 | int reserved[9]; |
174 | }; | 174 | }; |
175 | 175 | ||
176 | /* | ||
177 | * Serial interface for controlling RS485 settings on chips with suitable | ||
178 | * support. Set with TIOCSRS485 and get with TIOCGRS485 if supported by your | ||
179 | * platform. The set function returns the new state, with any unsupported bits | ||
180 | * reverted appropriately. | ||
181 | */ | ||
182 | |||
183 | struct serial_rs485 { | ||
184 | __u32 flags; /* RS485 feature flags */ | ||
185 | #define SER_RS485_ENABLED (1 << 0) | ||
186 | #define SER_RS485_RTS_ON_SEND (1 << 1) | ||
187 | #define SER_RS485_RTS_AFTER_SEND (1 << 2) | ||
188 | __u32 delay_rts_before_send; /* Milliseconds */ | ||
189 | __u32 padding[6]; /* Memory is cheap, new structs | ||
190 | are a royal PITA .. */ | ||
191 | }; | ||
176 | 192 | ||
177 | #ifdef __KERNEL__ | 193 | #ifdef __KERNEL__ |
178 | #include <linux/compiler.h> | 194 | #include <linux/compiler.h> |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 3b2f6c04855e..e27f216361fc 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -241,7 +241,7 @@ typedef unsigned int __bitwise__ upf_t; | |||
241 | 241 | ||
242 | struct uart_port { | 242 | struct uart_port { |
243 | spinlock_t lock; /* port lock */ | 243 | spinlock_t lock; /* port lock */ |
244 | unsigned int iobase; /* in/out[bwl] */ | 244 | unsigned long iobase; /* in/out[bwl] */ |
245 | unsigned char __iomem *membase; /* read/write[bwl] */ | 245 | unsigned char __iomem *membase; /* read/write[bwl] */ |
246 | unsigned int irq; /* irq number */ | 246 | unsigned int irq; /* irq number */ |
247 | unsigned int uartclk; /* base uart clock */ | 247 | unsigned int uartclk; /* base uart clock */ |
diff --git a/include/linux/termios.h b/include/linux/termios.h index 478662889f48..2acd0c1f8a2a 100644 --- a/include/linux/termios.h +++ b/include/linux/termios.h | |||
@@ -4,4 +4,19 @@ | |||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | #include <asm/termios.h> | 5 | #include <asm/termios.h> |
6 | 6 | ||
7 | #define NFF 5 | ||
8 | |||
9 | struct termiox | ||
10 | { | ||
11 | __u16 x_hflag; | ||
12 | __u16 x_cflag; | ||
13 | __u16 x_rflag[NFF]; | ||
14 | __u16 x_sflag; | ||
15 | }; | ||
16 | |||
17 | #define RTSXOFF 0x0001 /* RTS flow control on input */ | ||
18 | #define CTSXON 0x0002 /* CTS flow control on output */ | ||
19 | #define DTRXOFF 0x0004 /* DTR flow control on input */ | ||
20 | #define DSRXON 0x0008 /* DCD flow control on output */ | ||
21 | |||
7 | #endif | 22 | #endif |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 0cbec74ec086..3b8121d4e36f 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -23,7 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ | 24 | #define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ |
25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ | 25 | #define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ |
26 | #define NR_LDISCS 18 | 26 | #define NR_LDISCS 19 |
27 | 27 | ||
28 | /* line disciplines */ | 28 | /* line disciplines */ |
29 | #define N_TTY 0 | 29 | #define N_TTY 0 |
@@ -45,6 +45,7 @@ | |||
45 | #define N_HCI 15 /* Bluetooth HCI UART */ | 45 | #define N_HCI 15 /* Bluetooth HCI UART */ |
46 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ | 46 | #define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */ |
47 | #define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ | 47 | #define N_SLCAN 17 /* Serial / USB serial CAN Adaptors */ |
48 | #define N_PPS 18 /* Pulse per Second */ | ||
48 | 49 | ||
49 | /* | 50 | /* |
50 | * This character is the same as _POSIX_VDISABLE: it cannot be used as | 51 | * This character is the same as _POSIX_VDISABLE: it cannot be used as |
@@ -181,6 +182,7 @@ struct signal_struct; | |||
181 | 182 | ||
182 | struct tty_port { | 183 | struct tty_port { |
183 | struct tty_struct *tty; /* Back pointer */ | 184 | struct tty_struct *tty; /* Back pointer */ |
185 | spinlock_t lock; /* Lock protecting tty field */ | ||
184 | int blocked_open; /* Waiting to open */ | 186 | int blocked_open; /* Waiting to open */ |
185 | int count; /* Usage count */ | 187 | int count; /* Usage count */ |
186 | wait_queue_head_t open_wait; /* Open waiters */ | 188 | wait_queue_head_t open_wait; /* Open waiters */ |
@@ -208,6 +210,7 @@ struct tty_operations; | |||
208 | 210 | ||
209 | struct tty_struct { | 211 | struct tty_struct { |
210 | int magic; | 212 | int magic; |
213 | struct kref kref; | ||
211 | struct tty_driver *driver; | 214 | struct tty_driver *driver; |
212 | const struct tty_operations *ops; | 215 | const struct tty_operations *ops; |
213 | int index; | 216 | int index; |
@@ -217,6 +220,7 @@ struct tty_struct { | |||
217 | spinlock_t ctrl_lock; | 220 | spinlock_t ctrl_lock; |
218 | /* Termios values are protected by the termios mutex */ | 221 | /* Termios values are protected by the termios mutex */ |
219 | struct ktermios *termios, *termios_locked; | 222 | struct ktermios *termios, *termios_locked; |
223 | struct termiox *termiox; /* May be NULL for unsupported */ | ||
220 | char name[64]; | 224 | char name[64]; |
221 | struct pid *pgrp; /* Protected by ctrl lock */ | 225 | struct pid *pgrp; /* Protected by ctrl lock */ |
222 | struct pid *session; | 226 | struct pid *session; |
@@ -310,6 +314,25 @@ extern int kmsg_redirect; | |||
310 | extern void console_init(void); | 314 | extern void console_init(void); |
311 | extern int vcs_init(void); | 315 | extern int vcs_init(void); |
312 | 316 | ||
317 | extern struct class *tty_class; | ||
318 | |||
319 | /** | ||
320 | * tty_kref_get - get a tty reference | ||
321 | * @tty: tty device | ||
322 | * | ||
323 | * Return a new reference to a tty object. The caller must hold | ||
324 | * sufficient locks/counts to ensure that their existing reference cannot | ||
325 | * go away | ||
326 | */ | ||
327 | |||
328 | extern inline struct tty_struct *tty_kref_get(struct tty_struct *tty) | ||
329 | { | ||
330 | if (tty) | ||
331 | kref_get(&tty->kref); | ||
332 | return tty; | ||
333 | } | ||
334 | extern void tty_kref_put(struct tty_struct *tty); | ||
335 | |||
313 | extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, | 336 | extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, |
314 | const char *routine); | 337 | const char *routine); |
315 | extern char *tty_name(struct tty_struct *tty, char *buf); | 338 | extern char *tty_name(struct tty_struct *tty, char *buf); |
@@ -333,13 +356,15 @@ extern void tty_throttle(struct tty_struct *tty); | |||
333 | extern void tty_unthrottle(struct tty_struct *tty); | 356 | extern void tty_unthrottle(struct tty_struct *tty); |
334 | extern int tty_do_resize(struct tty_struct *tty, struct tty_struct *real_tty, | 357 | extern int tty_do_resize(struct tty_struct *tty, struct tty_struct *real_tty, |
335 | struct winsize *ws); | 358 | struct winsize *ws); |
336 | 359 | extern void tty_shutdown(struct tty_struct *tty); | |
360 | extern void tty_free_termios(struct tty_struct *tty); | ||
337 | extern int is_current_pgrp_orphaned(void); | 361 | extern int is_current_pgrp_orphaned(void); |
338 | extern struct pid *tty_get_pgrp(struct tty_struct *tty); | 362 | extern struct pid *tty_get_pgrp(struct tty_struct *tty); |
339 | extern int is_ignored(int sig); | 363 | extern int is_ignored(int sig); |
340 | extern int tty_signal(int sig, struct tty_struct *tty); | 364 | extern int tty_signal(int sig, struct tty_struct *tty); |
341 | extern void tty_hangup(struct tty_struct *tty); | 365 | extern void tty_hangup(struct tty_struct *tty); |
342 | extern void tty_vhangup(struct tty_struct *tty); | 366 | extern void tty_vhangup(struct tty_struct *tty); |
367 | extern void tty_vhangup_self(void); | ||
343 | extern void tty_unhangup(struct file *filp); | 368 | extern void tty_unhangup(struct file *filp); |
344 | extern int tty_hung_up_p(struct file *filp); | 369 | extern int tty_hung_up_p(struct file *filp); |
345 | extern void do_SAK(struct tty_struct *tty); | 370 | extern void do_SAK(struct tty_struct *tty); |
@@ -347,6 +372,9 @@ extern void __do_SAK(struct tty_struct *tty); | |||
347 | extern void disassociate_ctty(int priv); | 372 | extern void disassociate_ctty(int priv); |
348 | extern void no_tty(void); | 373 | extern void no_tty(void); |
349 | extern void tty_flip_buffer_push(struct tty_struct *tty); | 374 | extern void tty_flip_buffer_push(struct tty_struct *tty); |
375 | extern void tty_buffer_free_all(struct tty_struct *tty); | ||
376 | extern void tty_buffer_flush(struct tty_struct *tty); | ||
377 | extern void tty_buffer_init(struct tty_struct *tty); | ||
350 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); | 378 | extern speed_t tty_get_baud_rate(struct tty_struct *tty); |
351 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); | 379 | extern speed_t tty_termios_baud_rate(struct ktermios *termios); |
352 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | 380 | extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); |
@@ -372,6 +400,15 @@ extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg); | |||
372 | extern dev_t tty_devnum(struct tty_struct *tty); | 400 | extern dev_t tty_devnum(struct tty_struct *tty); |
373 | extern void proc_clear_tty(struct task_struct *p); | 401 | extern void proc_clear_tty(struct task_struct *p); |
374 | extern struct tty_struct *get_current_tty(void); | 402 | extern struct tty_struct *get_current_tty(void); |
403 | extern void tty_default_fops(struct file_operations *fops); | ||
404 | extern struct tty_struct *alloc_tty_struct(void); | ||
405 | extern void free_tty_struct(struct tty_struct *tty); | ||
406 | extern void initialize_tty_struct(struct tty_struct *tty, | ||
407 | struct tty_driver *driver, int idx); | ||
408 | extern struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx, | ||
409 | int first_ok); | ||
410 | extern void tty_release_dev(struct file *filp); | ||
411 | extern int tty_init_termios(struct tty_struct *tty); | ||
375 | 412 | ||
376 | extern struct mutex tty_mutex; | 413 | extern struct mutex tty_mutex; |
377 | 414 | ||
@@ -382,6 +419,8 @@ extern int tty_write_lock(struct tty_struct *tty, int ndelay); | |||
382 | extern void tty_port_init(struct tty_port *port); | 419 | extern void tty_port_init(struct tty_port *port); |
383 | extern int tty_port_alloc_xmit_buf(struct tty_port *port); | 420 | extern int tty_port_alloc_xmit_buf(struct tty_port *port); |
384 | extern void tty_port_free_xmit_buf(struct tty_port *port); | 421 | extern void tty_port_free_xmit_buf(struct tty_port *port); |
422 | extern struct tty_struct *tty_port_tty_get(struct tty_port *port); | ||
423 | extern void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty); | ||
385 | 424 | ||
386 | extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); | 425 | extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); |
387 | extern int tty_unregister_ldisc(int disc); | 426 | extern int tty_unregister_ldisc(int disc); |
@@ -427,7 +466,7 @@ static inline void tty_audit_push_task(struct task_struct *tsk, | |||
427 | #endif | 466 | #endif |
428 | 467 | ||
429 | /* tty_ioctl.c */ | 468 | /* tty_ioctl.c */ |
430 | extern int n_tty_ioctl(struct tty_struct *tty, struct file *file, | 469 | extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, |
431 | unsigned int cmd, unsigned long arg); | 470 | unsigned int cmd, unsigned long arg); |
432 | 471 | ||
433 | /* serial.c */ | 472 | /* serial.c */ |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 16d27944c321..78416b901589 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
@@ -7,6 +7,28 @@ | |||
7 | * defined; unless noted otherwise, they are optional, and can be | 7 | * defined; unless noted otherwise, they are optional, and can be |
8 | * filled in with a null pointer. | 8 | * filled in with a null pointer. |
9 | * | 9 | * |
10 | * struct tty_struct * (*lookup)(struct tty_driver *self, int idx) | ||
11 | * | ||
12 | * Return the tty device corresponding to idx, NULL if there is not | ||
13 | * one currently in use and an ERR_PTR value on error. Called under | ||
14 | * tty_mutex (for now!) | ||
15 | * | ||
16 | * Optional method. Default behaviour is to use the ttys array | ||
17 | * | ||
18 | * int (*install)(struct tty_driver *self, struct tty_struct *tty) | ||
19 | * | ||
20 | * Install a new tty into the tty driver internal tables. Used in | ||
21 | * conjunction with lookup and remove methods. | ||
22 | * | ||
23 | * Optional method. Default behaviour is to use the ttys array | ||
24 | * | ||
25 | * void (*remove)(struct tty_driver *self, struct tty_struct *tty) | ||
26 | * | ||
27 | * Remove a closed tty from the tty driver internal tables. Used in | ||
28 | * conjunction with lookup and remove methods. | ||
29 | * | ||
30 | * Optional method. Default behaviour is to use the ttys array | ||
31 | * | ||
10 | * int (*open)(struct tty_struct * tty, struct file * filp); | 32 | * int (*open)(struct tty_struct * tty, struct file * filp); |
11 | * | 33 | * |
12 | * This routine is called when a particular tty device is opened. | 34 | * This routine is called when a particular tty device is opened. |
@@ -21,6 +43,11 @@ | |||
21 | * | 43 | * |
22 | * Required method. | 44 | * Required method. |
23 | * | 45 | * |
46 | * void (*shutdown)(struct tty_struct * tty); | ||
47 | * | ||
48 | * This routine is called when a particular tty device is closed for | ||
49 | * the last time freeing up the resources. | ||
50 | * | ||
24 | * int (*write)(struct tty_struct * tty, | 51 | * int (*write)(struct tty_struct * tty, |
25 | * const unsigned char *buf, int count); | 52 | * const unsigned char *buf, int count); |
26 | * | 53 | * |
@@ -180,6 +207,14 @@ | |||
180 | * not force errors here if they are not resizable objects (eg a serial | 207 | * not force errors here if they are not resizable objects (eg a serial |
181 | * line). See tty_do_resize() if you need to wrap the standard method | 208 | * line). See tty_do_resize() if you need to wrap the standard method |
182 | * in your own logic - the usual case. | 209 | * in your own logic - the usual case. |
210 | * | ||
211 | * void (*set_termiox)(struct tty_struct *tty, struct termiox *new); | ||
212 | * | ||
213 | * Called when the device receives a termiox based ioctl. Passes down | ||
214 | * the requested data from user space. This method will not be invoked | ||
215 | * unless the tty also has a valid tty->termiox pointer. | ||
216 | * | ||
217 | * Optional: Called under the termios lock | ||
183 | */ | 218 | */ |
184 | 219 | ||
185 | #include <linux/fs.h> | 220 | #include <linux/fs.h> |
@@ -190,8 +225,13 @@ struct tty_struct; | |||
190 | struct tty_driver; | 225 | struct tty_driver; |
191 | 226 | ||
192 | struct tty_operations { | 227 | struct tty_operations { |
228 | struct tty_struct * (*lookup)(struct tty_driver *driver, | ||
229 | struct inode *inode, int idx); | ||
230 | int (*install)(struct tty_driver *driver, struct tty_struct *tty); | ||
231 | void (*remove)(struct tty_driver *driver, struct tty_struct *tty); | ||
193 | int (*open)(struct tty_struct * tty, struct file * filp); | 232 | int (*open)(struct tty_struct * tty, struct file * filp); |
194 | void (*close)(struct tty_struct * tty, struct file * filp); | 233 | void (*close)(struct tty_struct * tty, struct file * filp); |
234 | void (*shutdown)(struct tty_struct *tty); | ||
195 | int (*write)(struct tty_struct * tty, | 235 | int (*write)(struct tty_struct * tty, |
196 | const unsigned char *buf, int count); | 236 | const unsigned char *buf, int count); |
197 | int (*put_char)(struct tty_struct *tty, unsigned char ch); | 237 | int (*put_char)(struct tty_struct *tty, unsigned char ch); |
@@ -220,6 +260,7 @@ struct tty_operations { | |||
220 | unsigned int set, unsigned int clear); | 260 | unsigned int set, unsigned int clear); |
221 | int (*resize)(struct tty_struct *tty, struct tty_struct *real_tty, | 261 | int (*resize)(struct tty_struct *tty, struct tty_struct *real_tty, |
222 | struct winsize *ws); | 262 | struct winsize *ws); |
263 | int (*set_termiox)(struct tty_struct *tty, struct termiox *tnew); | ||
223 | #ifdef CONFIG_CONSOLE_POLL | 264 | #ifdef CONFIG_CONSOLE_POLL |
224 | int (*poll_init)(struct tty_driver *driver, int line, char *options); | 265 | int (*poll_init)(struct tty_driver *driver, int line, char *options); |
225 | int (*poll_get_char)(struct tty_driver *driver, int line); | 266 | int (*poll_get_char)(struct tty_driver *driver, int line); |
@@ -229,6 +270,7 @@ struct tty_operations { | |||
229 | 270 | ||
230 | struct tty_driver { | 271 | struct tty_driver { |
231 | int magic; /* magic number for this structure */ | 272 | int magic; /* magic number for this structure */ |
273 | struct kref kref; /* Reference management */ | ||
232 | struct cdev cdev; | 274 | struct cdev cdev; |
233 | struct module *owner; | 275 | struct module *owner; |
234 | const char *driver_name; | 276 | const char *driver_name; |
@@ -242,7 +284,6 @@ struct tty_driver { | |||
242 | short subtype; /* subtype of tty driver */ | 284 | short subtype; /* subtype of tty driver */ |
243 | struct ktermios init_termios; /* Initial termios */ | 285 | struct ktermios init_termios; /* Initial termios */ |
244 | int flags; /* tty driver flags */ | 286 | int flags; /* tty driver flags */ |
245 | int refcount; /* for loadable tty drivers */ | ||
246 | struct proc_dir_entry *proc_entry; /* /proc fs entry */ | 287 | struct proc_dir_entry *proc_entry; /* /proc fs entry */ |
247 | struct tty_driver *other; /* only used for the PTY driver */ | 288 | struct tty_driver *other; /* only used for the PTY driver */ |
248 | 289 | ||
@@ -264,12 +305,19 @@ struct tty_driver { | |||
264 | 305 | ||
265 | extern struct list_head tty_drivers; | 306 | extern struct list_head tty_drivers; |
266 | 307 | ||
267 | struct tty_driver *alloc_tty_driver(int lines); | 308 | extern struct tty_driver *alloc_tty_driver(int lines); |
268 | void put_tty_driver(struct tty_driver *driver); | 309 | extern void put_tty_driver(struct tty_driver *driver); |
269 | void tty_set_operations(struct tty_driver *driver, | 310 | extern void tty_set_operations(struct tty_driver *driver, |
270 | const struct tty_operations *op); | 311 | const struct tty_operations *op); |
271 | extern struct tty_driver *tty_find_polling_driver(char *name, int *line); | 312 | extern struct tty_driver *tty_find_polling_driver(char *name, int *line); |
272 | 313 | ||
314 | extern void tty_driver_kref_put(struct tty_driver *driver); | ||
315 | extern inline struct tty_driver *tty_driver_kref_get(struct tty_driver *d) | ||
316 | { | ||
317 | kref_get(&d->kref); | ||
318 | return d; | ||
319 | } | ||
320 | |||
273 | /* tty driver magic number */ | 321 | /* tty driver magic number */ |
274 | #define TTY_DRIVER_MAGIC 0x5402 | 322 | #define TTY_DRIVER_MAGIC 0x5402 |
275 | 323 | ||
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 1cbd0a7db4e6..2f1113467f70 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h | |||
@@ -96,7 +96,7 @@ void change_console(struct vc_data *new_vc); | |||
96 | void reset_vc(struct vc_data *vc); | 96 | void reset_vc(struct vc_data *vc); |
97 | extern int unbind_con_driver(const struct consw *csw, int first, int last, | 97 | extern int unbind_con_driver(const struct consw *csw, int first, int last, |
98 | int deflt); | 98 | int deflt); |
99 | int vty_init(void); | 99 | int vty_init(const struct file_operations *console_fops); |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * vc_screen.c shares this temporary buffer with the console write code so that | 102 | * vc_screen.c shares this temporary buffer with the console write code so that |