diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/sections.h | 6 | ||||
-rw-r--r-- | include/asm-mips/pgtable-32.h | 2 | ||||
-rw-r--r-- | include/asm-parisc/sections.h | 5 | ||||
-rw-r--r-- | include/asm-x86/acpi.h | 2 | ||||
-rw-r--r-- | include/asm-x86/cpufeature.h | 1 | ||||
-rw-r--r-- | include/asm-x86/idle.h | 2 | ||||
-rw-r--r-- | include/asm-x86/kgdb.h | 24 | ||||
-rw-r--r-- | include/linux/ata.h | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 2 | ||||
-rw-r--r-- | include/linux/cnt32_to_63.h | 80 | ||||
-rw-r--r-- | include/linux/ioport.h | 4 | ||||
-rw-r--r-- | include/linux/memstick.h | 97 | ||||
-rw-r--r-- | include/linux/mlx4/device.h | 4 | ||||
-rw-r--r-- | include/linux/mmzone.h | 12 | ||||
-rw-r--r-- | include/linux/pci.h | 8 | ||||
-rw-r--r-- | include/linux/pnp.h | 7 | ||||
-rw-r--r-- | include/linux/smb.h | 2 | ||||
-rw-r--r-- | include/net/9p/9p.h | 1 | ||||
-rw-r--r-- | include/net/9p/transport.h | 9 | ||||
-rw-r--r-- | include/net/netlink.h | 2 | ||||
-rw-r--r-- | include/net/sctp/sm.h | 3 | ||||
-rw-r--r-- | include/scsi/scsi.h | 14 |
22 files changed, 209 insertions, 80 deletions
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 8feeae1f2369..79a7ff925bf8 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -14,4 +14,10 @@ extern char __kprobes_text_start[], __kprobes_text_end[]; | |||
14 | extern char __initdata_begin[], __initdata_end[]; | 14 | extern char __initdata_begin[], __initdata_end[]; |
15 | extern char __start_rodata[], __end_rodata[]; | 15 | extern char __start_rodata[], __end_rodata[]; |
16 | 16 | ||
17 | /* function descriptor handling (if any). Override | ||
18 | * in asm/sections.h */ | ||
19 | #ifndef dereference_function_descriptor | ||
20 | #define dereference_function_descriptor(p) (p) | ||
21 | #endif | ||
22 | |||
17 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 23 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index 4396e9ffd418..55813d6150c7 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h | |||
@@ -57,7 +57,7 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
57 | #define PMD_ORDER 1 | 57 | #define PMD_ORDER 1 |
58 | #define PTE_ORDER 0 | 58 | #define PTE_ORDER 0 |
59 | 59 | ||
60 | #define PTRS_PER_PGD ((PAGE_SIZE << PGD_ORDER) / sizeof(pgd_t)) | 60 | #define PTRS_PER_PGD (USER_PTRS_PER_PGD * 2) |
61 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) | 61 | #define PTRS_PER_PTE ((PAGE_SIZE << PTE_ORDER) / sizeof(pte_t)) |
62 | 62 | ||
63 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) | 63 | #define USER_PTRS_PER_PGD (0x80000000UL/PGDIR_SIZE) |
diff --git a/include/asm-parisc/sections.h b/include/asm-parisc/sections.h index fdd43ec42ec5..9d13c3507ad6 100644 --- a/include/asm-parisc/sections.h +++ b/include/asm-parisc/sections.h | |||
@@ -4,4 +4,9 @@ | |||
4 | /* nothing to see, move along */ | 4 | /* nothing to see, move along */ |
5 | #include <asm-generic/sections.h> | 5 | #include <asm-generic/sections.h> |
6 | 6 | ||
7 | #ifdef CONFIG_64BIT | ||
8 | #undef dereference_function_descriptor | ||
9 | void *dereference_function_descriptor(void *); | ||
10 | #endif | ||
11 | |||
7 | #endif | 12 | #endif |
diff --git a/include/asm-x86/acpi.h b/include/asm-x86/acpi.h index 635d764dc13e..35d1743b57ac 100644 --- a/include/asm-x86/acpi.h +++ b/include/asm-x86/acpi.h | |||
@@ -140,6 +140,8 @@ static inline unsigned int acpi_processor_cstate_check(unsigned int max_cstate) | |||
140 | boot_cpu_data.x86_model <= 0x05 && | 140 | boot_cpu_data.x86_model <= 0x05 && |
141 | boot_cpu_data.x86_mask < 0x0A) | 141 | boot_cpu_data.x86_mask < 0x0A) |
142 | return 1; | 142 | return 1; |
143 | else if (boot_cpu_has(X86_FEATURE_AMDC1E)) | ||
144 | return 1; | ||
143 | else | 145 | else |
144 | return max_cstate; | 146 | return max_cstate; |
145 | } | 147 | } |
diff --git a/include/asm-x86/cpufeature.h b/include/asm-x86/cpufeature.h index 9489283a4bcf..cfcfb0a806ba 100644 --- a/include/asm-x86/cpufeature.h +++ b/include/asm-x86/cpufeature.h | |||
@@ -81,6 +81,7 @@ | |||
81 | #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ | 81 | #define X86_FEATURE_LFENCE_RDTSC (3*32+18) /* Lfence synchronizes RDTSC */ |
82 | #define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ | 82 | #define X86_FEATURE_11AP (3*32+19) /* Bad local APIC aka 11AP */ |
83 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ | 83 | #define X86_FEATURE_NOPL (3*32+20) /* The NOPL (0F 1F) instructions */ |
84 | #define X86_FEATURE_AMDC1E (3*32+21) /* AMD C1E detected */ | ||
84 | 85 | ||
85 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 86 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
86 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ | 87 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ |
diff --git a/include/asm-x86/idle.h b/include/asm-x86/idle.h index d240e5b30a45..cbb649123612 100644 --- a/include/asm-x86/idle.h +++ b/include/asm-x86/idle.h | |||
@@ -10,4 +10,6 @@ void idle_notifier_register(struct notifier_block *n); | |||
10 | void enter_idle(void); | 10 | void enter_idle(void); |
11 | void exit_idle(void); | 11 | void exit_idle(void); |
12 | 12 | ||
13 | void c1e_remove_cpu(int cpu); | ||
14 | |||
13 | #endif | 15 | #endif |
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h index 484c47554f3b..94d63db10365 100644 --- a/include/asm-x86/kgdb.h +++ b/include/asm-x86/kgdb.h | |||
@@ -39,12 +39,13 @@ enum regnames { | |||
39 | GDB_FS, /* 14 */ | 39 | GDB_FS, /* 14 */ |
40 | GDB_GS, /* 15 */ | 40 | GDB_GS, /* 15 */ |
41 | }; | 41 | }; |
42 | #define NUMREGBYTES ((GDB_GS+1)*4) | ||
42 | #else /* ! CONFIG_X86_32 */ | 43 | #else /* ! CONFIG_X86_32 */ |
43 | enum regnames { | 44 | enum regnames64 { |
44 | GDB_AX, /* 0 */ | 45 | GDB_AX, /* 0 */ |
45 | GDB_DX, /* 1 */ | 46 | GDB_BX, /* 1 */ |
46 | GDB_CX, /* 2 */ | 47 | GDB_CX, /* 2 */ |
47 | GDB_BX, /* 3 */ | 48 | GDB_DX, /* 3 */ |
48 | GDB_SI, /* 4 */ | 49 | GDB_SI, /* 4 */ |
49 | GDB_DI, /* 5 */ | 50 | GDB_DI, /* 5 */ |
50 | GDB_BP, /* 6 */ | 51 | GDB_BP, /* 6 */ |
@@ -58,18 +59,15 @@ enum regnames { | |||
58 | GDB_R14, /* 14 */ | 59 | GDB_R14, /* 14 */ |
59 | GDB_R15, /* 15 */ | 60 | GDB_R15, /* 15 */ |
60 | GDB_PC, /* 16 */ | 61 | GDB_PC, /* 16 */ |
61 | GDB_PS, /* 17 */ | ||
62 | }; | 62 | }; |
63 | #endif /* CONFIG_X86_32 */ | ||
64 | 63 | ||
65 | /* | 64 | enum regnames32 { |
66 | * Number of bytes of registers: | 65 | GDB_PS = 34, |
67 | */ | 66 | GDB_CS, |
68 | #ifdef CONFIG_X86_32 | 67 | GDB_SS, |
69 | # define NUMREGBYTES 64 | 68 | }; |
70 | #else | 69 | #define NUMREGBYTES ((GDB_SS+1)*4) |
71 | # define NUMREGBYTES ((GDB_PS+1)*8) | 70 | #endif /* CONFIG_X86_32 */ |
72 | #endif | ||
73 | 71 | ||
74 | static inline void arch_kgdb_breakpoint(void) | 72 | static inline void arch_kgdb_breakpoint(void) |
75 | { | 73 | { |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 1ce19c1ef0e9..8a12d718c169 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -745,7 +745,7 @@ static inline int ata_ok(u8 status) | |||
745 | static inline int lba_28_ok(u64 block, u32 n_block) | 745 | static inline int lba_28_ok(u64 block, u32 n_block) |
746 | { | 746 | { |
747 | /* check the ending block number */ | 747 | /* check the ending block number */ |
748 | return ((block + n_block - 1) < ((u64)1 << 28)) && (n_block <= 256); | 748 | return ((block + n_block) < ((u64)1 << 28)) && (n_block <= 256); |
749 | } | 749 | } |
750 | 750 | ||
751 | static inline int lba_48_ok(u64 block, u32 n_block) | 751 | static inline int lba_48_ok(u64 block, u32 n_block) |
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 44710d7e7bff..53ea933cf60b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -843,8 +843,6 @@ extern int blkdev_issue_flush(struct block_device *, sector_t *); | |||
843 | */ | 843 | */ |
844 | extern int blk_verify_command(struct blk_cmd_filter *filter, | 844 | extern int blk_verify_command(struct blk_cmd_filter *filter, |
845 | unsigned char *cmd, int has_write_perm); | 845 | unsigned char *cmd, int has_write_perm); |
846 | extern int blk_register_filter(struct gendisk *disk); | ||
847 | extern void blk_unregister_filter(struct gendisk *disk); | ||
848 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); | 846 | extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); |
849 | 847 | ||
850 | #define MAX_PHYS_SEGMENTS 128 | 848 | #define MAX_PHYS_SEGMENTS 128 |
diff --git a/include/linux/cnt32_to_63.h b/include/linux/cnt32_to_63.h new file mode 100644 index 000000000000..8c0f9505b48c --- /dev/null +++ b/include/linux/cnt32_to_63.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * Extend a 32-bit counter to 63 bits | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Created: December 3, 2006 | ||
6 | * Copyright: MontaVista Software, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 | ||
10 | * as published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __LINUX_CNT32_TO_63_H__ | ||
14 | #define __LINUX_CNT32_TO_63_H__ | ||
15 | |||
16 | #include <linux/compiler.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <asm/byteorder.h> | ||
19 | |||
20 | /* this is used only to give gcc a clue about good code generation */ | ||
21 | union cnt32_to_63 { | ||
22 | struct { | ||
23 | #if defined(__LITTLE_ENDIAN) | ||
24 | u32 lo, hi; | ||
25 | #elif defined(__BIG_ENDIAN) | ||
26 | u32 hi, lo; | ||
27 | #endif | ||
28 | }; | ||
29 | u64 val; | ||
30 | }; | ||
31 | |||
32 | |||
33 | /** | ||
34 | * cnt32_to_63 - Expand a 32-bit counter to a 63-bit counter | ||
35 | * @cnt_lo: The low part of the counter | ||
36 | * | ||
37 | * Many hardware clock counters are only 32 bits wide and therefore have | ||
38 | * a relatively short period making wrap-arounds rather frequent. This | ||
39 | * is a problem when implementing sched_clock() for example, where a 64-bit | ||
40 | * non-wrapping monotonic value is expected to be returned. | ||
41 | * | ||
42 | * To overcome that limitation, let's extend a 32-bit counter to 63 bits | ||
43 | * in a completely lock free fashion. Bits 0 to 31 of the clock are provided | ||
44 | * by the hardware while bits 32 to 62 are stored in memory. The top bit in | ||
45 | * memory is used to synchronize with the hardware clock half-period. When | ||
46 | * the top bit of both counters (hardware and in memory) differ then the | ||
47 | * memory is updated with a new value, incrementing it when the hardware | ||
48 | * counter wraps around. | ||
49 | * | ||
50 | * Because a word store in memory is atomic then the incremented value will | ||
51 | * always be in synch with the top bit indicating to any potential concurrent | ||
52 | * reader if the value in memory is up to date or not with regards to the | ||
53 | * needed increment. And any race in updating the value in memory is harmless | ||
54 | * as the same value would simply be stored more than once. | ||
55 | * | ||
56 | * The only restriction for the algorithm to work properly is that this | ||
57 | * code must be executed at least once per each half period of the 32-bit | ||
58 | * counter to properly update the state bit in memory. This is usually not a | ||
59 | * problem in practice, but if it is then a kernel timer could be scheduled | ||
60 | * to manage for this code to be executed often enough. | ||
61 | * | ||
62 | * Note that the top bit (bit 63) in the returned value should be considered | ||
63 | * as garbage. It is not cleared here because callers are likely to use a | ||
64 | * multiplier on the returned value which can get rid of the top bit | ||
65 | * implicitly by making the multiplier even, therefore saving on a runtime | ||
66 | * clear-bit instruction. Otherwise caller must remember to clear the top | ||
67 | * bit explicitly. | ||
68 | */ | ||
69 | #define cnt32_to_63(cnt_lo) \ | ||
70 | ({ \ | ||
71 | static volatile u32 __m_cnt_hi; \ | ||
72 | union cnt32_to_63 __x; \ | ||
73 | __x.hi = __m_cnt_hi; \ | ||
74 | __x.lo = (cnt_lo); \ | ||
75 | if (unlikely((s32)(__x.hi ^ __x.lo) < 0)) \ | ||
76 | __m_cnt_hi = __x.hi = (__x.hi ^ 0x80000000) + (__x.hi >> 31); \ | ||
77 | __x.val; \ | ||
78 | }) | ||
79 | |||
80 | #endif | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 8d3b7a9afd17..350033e8f4e1 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -159,9 +159,9 @@ extern struct resource * __devm_request_region(struct device *dev, | |||
159 | struct resource *parent, resource_size_t start, | 159 | struct resource *parent, resource_size_t start, |
160 | resource_size_t n, const char *name); | 160 | resource_size_t n, const char *name); |
161 | 161 | ||
162 | #define devm_release_region(start,n) \ | 162 | #define devm_release_region(dev, start, n) \ |
163 | __devm_release_region(dev, &ioport_resource, (start), (n)) | 163 | __devm_release_region(dev, &ioport_resource, (start), (n)) |
164 | #define devm_release_mem_region(start,n) \ | 164 | #define devm_release_mem_region(dev, start, n) \ |
165 | __devm_release_region(dev, &iomem_resource, (start), (n)) | 165 | __devm_release_region(dev, &iomem_resource, (start), (n)) |
166 | 166 | ||
167 | extern void __devm_release_region(struct device *dev, struct resource *parent, | 167 | extern void __devm_release_region(struct device *dev, struct resource *parent, |
diff --git a/include/linux/memstick.h b/include/linux/memstick.h index a9f998a3f48b..d0c37e682234 100644 --- a/include/linux/memstick.h +++ b/include/linux/memstick.h | |||
@@ -21,30 +21,30 @@ | |||
21 | struct ms_status_register { | 21 | struct ms_status_register { |
22 | unsigned char reserved; | 22 | unsigned char reserved; |
23 | unsigned char interrupt; | 23 | unsigned char interrupt; |
24 | #define MEMSTICK_INT_CMDNAK 0x0001 | 24 | #define MEMSTICK_INT_CMDNAK 0x01 |
25 | #define MEMSTICK_INT_IOREQ 0x0008 | 25 | #define MEMSTICK_INT_IOREQ 0x08 |
26 | #define MEMSTICK_INT_IOBREQ 0x0010 | 26 | #define MEMSTICK_INT_IOBREQ 0x10 |
27 | #define MEMSTICK_INT_BREQ 0x0020 | 27 | #define MEMSTICK_INT_BREQ 0x20 |
28 | #define MEMSTICK_INT_ERR 0x0040 | 28 | #define MEMSTICK_INT_ERR 0x40 |
29 | #define MEMSTICK_INT_CED 0x0080 | 29 | #define MEMSTICK_INT_CED 0x80 |
30 | 30 | ||
31 | unsigned char status0; | 31 | unsigned char status0; |
32 | #define MEMSTICK_STATUS0_WP 0x0001 | 32 | #define MEMSTICK_STATUS0_WP 0x01 |
33 | #define MEMSTICK_STATUS0_SL 0x0002 | 33 | #define MEMSTICK_STATUS0_SL 0x02 |
34 | #define MEMSTICK_STATUS0_BF 0x0010 | 34 | #define MEMSTICK_STATUS0_BF 0x10 |
35 | #define MEMSTICK_STATUS0_BE 0x0020 | 35 | #define MEMSTICK_STATUS0_BE 0x20 |
36 | #define MEMSTICK_STATUS0_FB0 0x0040 | 36 | #define MEMSTICK_STATUS0_FB0 0x40 |
37 | #define MEMSTICK_STATUS0_MB 0x0080 | 37 | #define MEMSTICK_STATUS0_MB 0x80 |
38 | 38 | ||
39 | unsigned char status1; | 39 | unsigned char status1; |
40 | #define MEMSTICK_STATUS1_UCFG 0x0001 | 40 | #define MEMSTICK_STATUS1_UCFG 0x01 |
41 | #define MEMSTICK_STATUS1_FGER 0x0002 | 41 | #define MEMSTICK_STATUS1_FGER 0x02 |
42 | #define MEMSTICK_STATUS1_UCEX 0x0004 | 42 | #define MEMSTICK_STATUS1_UCEX 0x04 |
43 | #define MEMSTICK_STATUS1_EXER 0x0008 | 43 | #define MEMSTICK_STATUS1_EXER 0x08 |
44 | #define MEMSTICK_STATUS1_UCDT 0x0010 | 44 | #define MEMSTICK_STATUS1_UCDT 0x10 |
45 | #define MEMSTICK_STATUS1_DTER 0x0020 | 45 | #define MEMSTICK_STATUS1_DTER 0x20 |
46 | #define MEMSTICK_STATUS1_FBI 0x0040 | 46 | #define MEMSTICK_STATUS1_FB1 0x40 |
47 | #define MEMSTICK_STATUS1_MB 0x0080 | 47 | #define MEMSTICK_STATUS1_MB 0x80 |
48 | } __attribute__((packed)); | 48 | } __attribute__((packed)); |
49 | 49 | ||
50 | struct ms_id_register { | 50 | struct ms_id_register { |
@@ -56,32 +56,32 @@ struct ms_id_register { | |||
56 | 56 | ||
57 | struct ms_param_register { | 57 | struct ms_param_register { |
58 | unsigned char system; | 58 | unsigned char system; |
59 | #define MEMSTICK_SYS_ATEN 0xc0 | ||
60 | #define MEMSTICK_SYS_BAMD 0x80 | ||
61 | #define MEMSTICK_SYS_PAM 0x08 | 59 | #define MEMSTICK_SYS_PAM 0x08 |
60 | #define MEMSTICK_SYS_BAMD 0x80 | ||
62 | 61 | ||
63 | unsigned char block_address_msb; | 62 | unsigned char block_address_msb; |
64 | unsigned short block_address; | 63 | unsigned short block_address; |
65 | unsigned char cp; | 64 | unsigned char cp; |
66 | #define MEMSTICK_CP_BLOCK 0x0000 | 65 | #define MEMSTICK_CP_BLOCK 0x00 |
67 | #define MEMSTICK_CP_PAGE 0x0020 | 66 | #define MEMSTICK_CP_PAGE 0x20 |
68 | #define MEMSTICK_CP_EXTRA 0x0040 | 67 | #define MEMSTICK_CP_EXTRA 0x40 |
69 | #define MEMSTICK_CP_OVERWRITE 0x0080 | 68 | #define MEMSTICK_CP_OVERWRITE 0x80 |
70 | 69 | ||
71 | unsigned char page_address; | 70 | unsigned char page_address; |
72 | } __attribute__((packed)); | 71 | } __attribute__((packed)); |
73 | 72 | ||
74 | struct ms_extra_data_register { | 73 | struct ms_extra_data_register { |
75 | unsigned char overwrite_flag; | 74 | unsigned char overwrite_flag; |
76 | #define MEMSTICK_OVERWRITE_UPDATA 0x0010 | 75 | #define MEMSTICK_OVERWRITE_UDST 0x10 |
77 | #define MEMSTICK_OVERWRITE_PAGE 0x0060 | 76 | #define MEMSTICK_OVERWRITE_PGST1 0x20 |
78 | #define MEMSTICK_OVERWRITE_BLOCK 0x0080 | 77 | #define MEMSTICK_OVERWRITE_PGST0 0x40 |
78 | #define MEMSTICK_OVERWRITE_BKST 0x80 | ||
79 | 79 | ||
80 | unsigned char management_flag; | 80 | unsigned char management_flag; |
81 | #define MEMSTICK_MANAGEMENT_SYSTEM 0x0004 | 81 | #define MEMSTICK_MANAGEMENT_SYSFLG 0x04 |
82 | #define MEMSTICK_MANAGEMENT_TRANS_TABLE 0x0008 | 82 | #define MEMSTICK_MANAGEMENT_ATFLG 0x08 |
83 | #define MEMSTICK_MANAGEMENT_COPY 0x0010 | 83 | #define MEMSTICK_MANAGEMENT_SCMS1 0x10 |
84 | #define MEMSTICK_MANAGEMENT_ACCESS 0x0020 | 84 | #define MEMSTICK_MANAGEMENT_SCMS0 0x20 |
85 | 85 | ||
86 | unsigned short logical_address; | 86 | unsigned short logical_address; |
87 | } __attribute__((packed)); | 87 | } __attribute__((packed)); |
@@ -96,9 +96,9 @@ struct ms_register { | |||
96 | 96 | ||
97 | struct mspro_param_register { | 97 | struct mspro_param_register { |
98 | unsigned char system; | 98 | unsigned char system; |
99 | #define MEMSTICK_SYS_SERIAL 0x80 | ||
100 | #define MEMSTICK_SYS_PAR4 0x00 | 99 | #define MEMSTICK_SYS_PAR4 0x00 |
101 | #define MEMSTICK_SYS_PAR8 0x40 | 100 | #define MEMSTICK_SYS_PAR8 0x40 |
101 | #define MEMSTICK_SYS_SERIAL 0x80 | ||
102 | 102 | ||
103 | unsigned short data_count; | 103 | unsigned short data_count; |
104 | unsigned int data_address; | 104 | unsigned int data_address; |
@@ -147,7 +147,7 @@ struct ms_register_addr { | |||
147 | unsigned char w_length; | 147 | unsigned char w_length; |
148 | } __attribute__((packed)); | 148 | } __attribute__((packed)); |
149 | 149 | ||
150 | enum { | 150 | enum memstick_tpc { |
151 | MS_TPC_READ_MG_STATUS = 0x01, | 151 | MS_TPC_READ_MG_STATUS = 0x01, |
152 | MS_TPC_READ_LONG_DATA = 0x02, | 152 | MS_TPC_READ_LONG_DATA = 0x02, |
153 | MS_TPC_READ_SHORT_DATA = 0x03, | 153 | MS_TPC_READ_SHORT_DATA = 0x03, |
@@ -167,7 +167,7 @@ enum { | |||
167 | MS_TPC_SET_CMD = 0x0e | 167 | MS_TPC_SET_CMD = 0x0e |
168 | }; | 168 | }; |
169 | 169 | ||
170 | enum { | 170 | enum memstick_command { |
171 | MS_CMD_BLOCK_END = 0x33, | 171 | MS_CMD_BLOCK_END = 0x33, |
172 | MS_CMD_RESET = 0x3c, | 172 | MS_CMD_RESET = 0x3c, |
173 | MS_CMD_BLOCK_WRITE = 0x55, | 173 | MS_CMD_BLOCK_WRITE = 0x55, |
@@ -201,8 +201,6 @@ enum { | |||
201 | 201 | ||
202 | /*** Driver structures and functions ***/ | 202 | /*** Driver structures and functions ***/ |
203 | 203 | ||
204 | #define MEMSTICK_PART_SHIFT 3 | ||
205 | |||
206 | enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; | 204 | enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; |
207 | 205 | ||
208 | #define MEMSTICK_POWER_OFF 0 | 206 | #define MEMSTICK_POWER_OFF 0 |
@@ -215,24 +213,27 @@ enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; | |||
215 | struct memstick_host; | 213 | struct memstick_host; |
216 | struct memstick_driver; | 214 | struct memstick_driver; |
217 | 215 | ||
216 | struct memstick_device_id { | ||
217 | unsigned char match_flags; | ||
218 | #define MEMSTICK_MATCH_ALL 0x01 | 218 | #define MEMSTICK_MATCH_ALL 0x01 |
219 | 219 | ||
220 | unsigned char type; | ||
220 | #define MEMSTICK_TYPE_LEGACY 0xff | 221 | #define MEMSTICK_TYPE_LEGACY 0xff |
221 | #define MEMSTICK_TYPE_DUO 0x00 | 222 | #define MEMSTICK_TYPE_DUO 0x00 |
222 | #define MEMSTICK_TYPE_PRO 0x01 | 223 | #define MEMSTICK_TYPE_PRO 0x01 |
223 | 224 | ||
225 | unsigned char category; | ||
224 | #define MEMSTICK_CATEGORY_STORAGE 0xff | 226 | #define MEMSTICK_CATEGORY_STORAGE 0xff |
225 | #define MEMSTICK_CATEGORY_STORAGE_DUO 0x00 | 227 | #define MEMSTICK_CATEGORY_STORAGE_DUO 0x00 |
228 | #define MEMSTICK_CATEGORY_IO 0x01 | ||
229 | #define MEMSTICK_CATEGORY_IO_PRO 0x10 | ||
226 | 230 | ||
227 | #define MEMSTICK_CLASS_GENERIC 0xff | ||
228 | #define MEMSTICK_CLASS_GENERIC_DUO 0x00 | ||
229 | |||
230 | |||
231 | struct memstick_device_id { | ||
232 | unsigned char match_flags; | ||
233 | unsigned char type; | ||
234 | unsigned char category; | ||
235 | unsigned char class; | 231 | unsigned char class; |
232 | #define MEMSTICK_CLASS_FLASH 0xff | ||
233 | #define MEMSTICK_CLASS_DUO 0x00 | ||
234 | #define MEMSTICK_CLASS_ROM 0x01 | ||
235 | #define MEMSTICK_CLASS_RO 0x02 | ||
236 | #define MEMSTICK_CLASS_WP 0x03 | ||
236 | }; | 237 | }; |
237 | 238 | ||
238 | struct memstick_request { | 239 | struct memstick_request { |
@@ -319,9 +320,9 @@ void memstick_suspend_host(struct memstick_host *host); | |||
319 | void memstick_resume_host(struct memstick_host *host); | 320 | void memstick_resume_host(struct memstick_host *host); |
320 | 321 | ||
321 | void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, | 322 | void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, |
322 | struct scatterlist *sg); | 323 | const struct scatterlist *sg); |
323 | void memstick_init_req(struct memstick_request *mrq, unsigned char tpc, | 324 | void memstick_init_req(struct memstick_request *mrq, unsigned char tpc, |
324 | void *buf, size_t length); | 325 | const void *buf, size_t length); |
325 | int memstick_next_req(struct memstick_host *host, | 326 | int memstick_next_req(struct memstick_host *host, |
326 | struct memstick_request **mrq); | 327 | struct memstick_request **mrq); |
327 | void memstick_new_req(struct memstick_host *host); | 328 | void memstick_new_req(struct memstick_host *host); |
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h index 655ea0d1ee14..b2f944468313 100644 --- a/include/linux/mlx4/device.h +++ b/include/linux/mlx4/device.h | |||
@@ -141,6 +141,10 @@ enum { | |||
141 | MLX4_STAT_RATE_OFFSET = 5 | 141 | MLX4_STAT_RATE_OFFSET = 5 |
142 | }; | 142 | }; |
143 | 143 | ||
144 | enum { | ||
145 | MLX4_MTT_FLAG_PRESENT = 1 | ||
146 | }; | ||
147 | |||
144 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) | 148 | static inline u64 mlx4_fw_ver(u64 major, u64 minor, u64 subminor) |
145 | { | 149 | { |
146 | return (major << 32) | (minor << 16) | subminor; | 150 | return (major << 32) | (minor << 16) | subminor; |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 443bc7cd8c62..428328a05fa1 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -751,8 +751,9 @@ static inline int zonelist_node_idx(struct zoneref *zoneref) | |||
751 | * | 751 | * |
752 | * This function returns the next zone at or below a given zone index that is | 752 | * This function returns the next zone at or below a given zone index that is |
753 | * within the allowed nodemask using a cursor as the starting point for the | 753 | * within the allowed nodemask using a cursor as the starting point for the |
754 | * search. The zoneref returned is a cursor that is used as the next starting | 754 | * search. The zoneref returned is a cursor that represents the current zone |
755 | * point for future calls to next_zones_zonelist(). | 755 | * being examined. It should be advanced by one before calling |
756 | * next_zones_zonelist again. | ||
756 | */ | 757 | */ |
757 | struct zoneref *next_zones_zonelist(struct zoneref *z, | 758 | struct zoneref *next_zones_zonelist(struct zoneref *z, |
758 | enum zone_type highest_zoneidx, | 759 | enum zone_type highest_zoneidx, |
@@ -768,9 +769,8 @@ struct zoneref *next_zones_zonelist(struct zoneref *z, | |||
768 | * | 769 | * |
769 | * This function returns the first zone at or below a given zone index that is | 770 | * This function returns the first zone at or below a given zone index that is |
770 | * within the allowed nodemask. The zoneref returned is a cursor that can be | 771 | * within the allowed nodemask. The zoneref returned is a cursor that can be |
771 | * used to iterate the zonelist with next_zones_zonelist. The cursor should | 772 | * used to iterate the zonelist with next_zones_zonelist by advancing it by |
772 | * not be used by the caller as it does not match the value of the zone | 773 | * one before calling. |
773 | * returned. | ||
774 | */ | 774 | */ |
775 | static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, | 775 | static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, |
776 | enum zone_type highest_zoneidx, | 776 | enum zone_type highest_zoneidx, |
@@ -795,7 +795,7 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, | |||
795 | #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ | 795 | #define for_each_zone_zonelist_nodemask(zone, z, zlist, highidx, nodemask) \ |
796 | for (z = first_zones_zonelist(zlist, highidx, nodemask, &zone); \ | 796 | for (z = first_zones_zonelist(zlist, highidx, nodemask, &zone); \ |
797 | zone; \ | 797 | zone; \ |
798 | z = next_zones_zonelist(z, highidx, nodemask, &zone)) \ | 798 | z = next_zones_zonelist(++z, highidx, nodemask, &zone)) \ |
799 | 799 | ||
800 | /** | 800 | /** |
801 | * for_each_zone_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index | 801 | * for_each_zone_zonelist - helper macro to iterate over valid zones in a zonelist at or below a given zone index |
diff --git a/include/linux/pci.h b/include/linux/pci.h index c0e14008a3c2..98dc6243a706 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -534,7 +534,7 @@ extern void pci_sort_breadthfirst(void); | |||
534 | #ifdef CONFIG_PCI_LEGACY | 534 | #ifdef CONFIG_PCI_LEGACY |
535 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, | 535 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, |
536 | unsigned int device, | 536 | unsigned int device, |
537 | const struct pci_dev *from); | 537 | struct pci_dev *from); |
538 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, | 538 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, |
539 | unsigned int devfn); | 539 | unsigned int devfn); |
540 | #endif /* CONFIG_PCI_LEGACY */ | 540 | #endif /* CONFIG_PCI_LEGACY */ |
@@ -550,7 +550,7 @@ struct pci_dev *pci_get_device(unsigned int vendor, unsigned int device, | |||
550 | struct pci_dev *from); | 550 | struct pci_dev *from); |
551 | struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, | 551 | struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, |
552 | unsigned int ss_vendor, unsigned int ss_device, | 552 | unsigned int ss_vendor, unsigned int ss_device, |
553 | const struct pci_dev *from); | 553 | struct pci_dev *from); |
554 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); | 554 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn); |
555 | struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); | 555 | struct pci_dev *pci_get_bus_and_slot(unsigned int bus, unsigned int devfn); |
556 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); | 556 | struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from); |
@@ -816,7 +816,7 @@ _PCI_NOP_ALL(write,) | |||
816 | 816 | ||
817 | static inline struct pci_dev *pci_find_device(unsigned int vendor, | 817 | static inline struct pci_dev *pci_find_device(unsigned int vendor, |
818 | unsigned int device, | 818 | unsigned int device, |
819 | const struct pci_dev *from) | 819 | struct pci_dev *from) |
820 | { | 820 | { |
821 | return NULL; | 821 | return NULL; |
822 | } | 822 | } |
@@ -838,7 +838,7 @@ static inline struct pci_dev *pci_get_subsys(unsigned int vendor, | |||
838 | unsigned int device, | 838 | unsigned int device, |
839 | unsigned int ss_vendor, | 839 | unsigned int ss_vendor, |
840 | unsigned int ss_device, | 840 | unsigned int ss_device, |
841 | const struct pci_dev *from) | 841 | struct pci_dev *from) |
842 | { | 842 | { |
843 | return NULL; | 843 | return NULL; |
844 | } | 844 | } |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 1ce54b63085d..be764e514e35 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -21,7 +21,14 @@ struct pnp_dev; | |||
21 | /* | 21 | /* |
22 | * Resource Management | 22 | * Resource Management |
23 | */ | 23 | */ |
24 | #ifdef CONFIG_PNP | ||
24 | struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); | 25 | struct resource *pnp_get_resource(struct pnp_dev *, unsigned int, unsigned int); |
26 | #else | ||
27 | static inline struct resource *pnp_get_resource(struct pnp_dev *dev, unsigned int type, unsigned int num) | ||
28 | { | ||
29 | return NULL; | ||
30 | } | ||
31 | #endif | ||
25 | 32 | ||
26 | static inline int pnp_resource_valid(struct resource *res) | 33 | static inline int pnp_resource_valid(struct resource *res) |
27 | { | 34 | { |
diff --git a/include/linux/smb.h b/include/linux/smb.h index caa43b2370cb..82fefddc5987 100644 --- a/include/linux/smb.h +++ b/include/linux/smb.h | |||
@@ -11,7 +11,9 @@ | |||
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/magic.h> | 13 | #include <linux/magic.h> |
14 | #ifdef __KERNEL__ | ||
14 | #include <linux/time.h> | 15 | #include <linux/time.h> |
16 | #endif | ||
15 | 17 | ||
16 | enum smb_protocol { | 18 | enum smb_protocol { |
17 | SMB_PROTOCOL_NONE, | 19 | SMB_PROTOCOL_NONE, |
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index b3d3e27c6299..c3626c0ba9d3 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -596,4 +596,5 @@ int p9_idpool_check(int id, struct p9_idpool *p); | |||
596 | int p9_error_init(void); | 596 | int p9_error_init(void); |
597 | int p9_errstr2errno(char *, int); | 597 | int p9_errstr2errno(char *, int); |
598 | int p9_trans_fd_init(void); | 598 | int p9_trans_fd_init(void); |
599 | void p9_trans_fd_exit(void); | ||
599 | #endif /* NET_9P_H */ | 600 | #endif /* NET_9P_H */ |
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h index 0db3a4038dc0..3ca737120a90 100644 --- a/include/net/9p/transport.h +++ b/include/net/9p/transport.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #ifndef NET_9P_TRANSPORT_H | 26 | #ifndef NET_9P_TRANSPORT_H |
27 | #define NET_9P_TRANSPORT_H | 27 | #define NET_9P_TRANSPORT_H |
28 | 28 | ||
29 | #include <linux/module.h> | ||
30 | |||
29 | /** | 31 | /** |
30 | * enum p9_trans_status - different states of underlying transports | 32 | * enum p9_trans_status - different states of underlying transports |
31 | * @Connected: transport is connected and healthy | 33 | * @Connected: transport is connected and healthy |
@@ -91,9 +93,12 @@ struct p9_trans_module { | |||
91 | int maxsize; /* max message size of transport */ | 93 | int maxsize; /* max message size of transport */ |
92 | int def; /* this transport should be default */ | 94 | int def; /* this transport should be default */ |
93 | struct p9_trans * (*create)(const char *, char *, int, unsigned char); | 95 | struct p9_trans * (*create)(const char *, char *, int, unsigned char); |
96 | struct module *owner; | ||
94 | }; | 97 | }; |
95 | 98 | ||
96 | void v9fs_register_trans(struct p9_trans_module *m); | 99 | void v9fs_register_trans(struct p9_trans_module *m); |
97 | struct p9_trans_module *v9fs_match_trans(const substring_t *name); | 100 | void v9fs_unregister_trans(struct p9_trans_module *m); |
98 | struct p9_trans_module *v9fs_default_trans(void); | 101 | struct p9_trans_module *v9fs_get_trans_by_name(const substring_t *name); |
102 | struct p9_trans_module *v9fs_get_default_trans(void); | ||
103 | void v9fs_put_trans(struct p9_trans_module *m); | ||
99 | #endif /* NET_9P_TRANSPORT_H */ | 104 | #endif /* NET_9P_TRANSPORT_H */ |
diff --git a/include/net/netlink.h b/include/net/netlink.h index 76c43ff38f64..3643bbb8e585 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -698,7 +698,7 @@ static inline int nla_len(const struct nlattr *nla) | |||
698 | */ | 698 | */ |
699 | static inline int nla_ok(const struct nlattr *nla, int remaining) | 699 | static inline int nla_ok(const struct nlattr *nla, int remaining) |
700 | { | 700 | { |
701 | return remaining >= sizeof(*nla) && | 701 | return remaining >= (int) sizeof(*nla) && |
702 | nla->nla_len >= sizeof(*nla) && | 702 | nla->nla_len >= sizeof(*nla) && |
703 | nla->nla_len <= remaining; | 703 | nla->nla_len <= remaining; |
704 | } | 704 | } |
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 24811732bdb2..029a54a02396 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -227,6 +227,9 @@ struct sctp_chunk *sctp_make_abort_violation(const struct sctp_association *, | |||
227 | const struct sctp_chunk *, | 227 | const struct sctp_chunk *, |
228 | const __u8 *, | 228 | const __u8 *, |
229 | const size_t ); | 229 | const size_t ); |
230 | struct sctp_chunk *sctp_make_violation_paramlen(const struct sctp_association *, | ||
231 | const struct sctp_chunk *, | ||
232 | struct sctp_paramhdr *); | ||
230 | struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, | 233 | struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, |
231 | const struct sctp_transport *, | 234 | const struct sctp_transport *, |
232 | const void *payload, | 235 | const void *payload, |
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 5c40cc537d4c..192f8716aa9e 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -309,6 +309,20 @@ struct scsi_lun { | |||
309 | }; | 309 | }; |
310 | 310 | ||
311 | /* | 311 | /* |
312 | * The Well Known LUNS (SAM-3) in our int representation of a LUN | ||
313 | */ | ||
314 | #define SCSI_W_LUN_BASE 0xc100 | ||
315 | #define SCSI_W_LUN_REPORT_LUNS (SCSI_W_LUN_BASE + 1) | ||
316 | #define SCSI_W_LUN_ACCESS_CONTROL (SCSI_W_LUN_BASE + 2) | ||
317 | #define SCSI_W_LUN_TARGET_LOG_PAGE (SCSI_W_LUN_BASE + 3) | ||
318 | |||
319 | static inline int scsi_is_wlun(unsigned int lun) | ||
320 | { | ||
321 | return (lun & 0xff00) == SCSI_W_LUN_BASE; | ||
322 | } | ||
323 | |||
324 | |||
325 | /* | ||
312 | * MESSAGE CODES | 326 | * MESSAGE CODES |
313 | */ | 327 | */ |
314 | 328 | ||