diff options
Diffstat (limited to 'include')
31 files changed, 207 insertions, 101 deletions
diff --git a/include/asm-powerpc/asm-compat.h b/include/asm-powerpc/asm-compat.h index 8ec2e1da68bf..8f0fe7971949 100644 --- a/include/asm-powerpc/asm-compat.h +++ b/include/asm-powerpc/asm-compat.h | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #define PPC_STL stringify_in_c(std) | 22 | #define PPC_STL stringify_in_c(std) |
| 23 | #define PPC_LCMPI stringify_in_c(cmpdi) | 23 | #define PPC_LCMPI stringify_in_c(cmpdi) |
| 24 | #define PPC_LONG stringify_in_c(.llong) | 24 | #define PPC_LONG stringify_in_c(.llong) |
| 25 | #define PPC_LONG_ALIGN stringify_in_c(.balign 8) | ||
| 25 | #define PPC_TLNEI stringify_in_c(tdnei) | 26 | #define PPC_TLNEI stringify_in_c(tdnei) |
| 26 | #define PPC_LLARX stringify_in_c(ldarx) | 27 | #define PPC_LLARX stringify_in_c(ldarx) |
| 27 | #define PPC_STLCX stringify_in_c(stdcx.) | 28 | #define PPC_STLCX stringify_in_c(stdcx.) |
| @@ -43,6 +44,7 @@ | |||
| 43 | #define PPC_STL stringify_in_c(stw) | 44 | #define PPC_STL stringify_in_c(stw) |
| 44 | #define PPC_LCMPI stringify_in_c(cmpwi) | 45 | #define PPC_LCMPI stringify_in_c(cmpwi) |
| 45 | #define PPC_LONG stringify_in_c(.long) | 46 | #define PPC_LONG stringify_in_c(.long) |
| 47 | #define PPC_LONG_ALIGN stringify_in_c(.balign 4) | ||
| 46 | #define PPC_TLNEI stringify_in_c(twnei) | 48 | #define PPC_TLNEI stringify_in_c(twnei) |
| 47 | #define PPC_LLARX stringify_in_c(lwarx) | 49 | #define PPC_LLARX stringify_in_c(lwarx) |
| 48 | #define PPC_STLCX stringify_in_c(stwcx.) | 50 | #define PPC_STLCX stringify_in_c(stwcx.) |
diff --git a/include/asm-powerpc/machdep.h b/include/asm-powerpc/machdep.h index 989922621e35..1233d735fd28 100644 --- a/include/asm-powerpc/machdep.h +++ b/include/asm-powerpc/machdep.h | |||
| @@ -80,7 +80,8 @@ struct machdep_calls { | |||
| 80 | long index, | 80 | long index, |
| 81 | long npages, | 81 | long npages, |
| 82 | unsigned long uaddr, | 82 | unsigned long uaddr, |
| 83 | enum dma_data_direction direction); | 83 | enum dma_data_direction direction, |
| 84 | struct dma_attrs *attrs); | ||
| 84 | void (*tce_free)(struct iommu_table *tbl, | 85 | void (*tce_free)(struct iommu_table *tbl, |
| 85 | long index, | 86 | long index, |
| 86 | long npages); | 87 | long npages); |
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index 73015f0139de..3a96d001cb75 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
| @@ -295,10 +295,10 @@ extern int icache_44x_need_flush; | |||
| 295 | #define _PAGE_PRESENT 0x00001 /* S: PTE contains a translation */ | 295 | #define _PAGE_PRESENT 0x00001 /* S: PTE contains a translation */ |
| 296 | #define _PAGE_USER 0x00002 /* S: User page (maps to UR) */ | 296 | #define _PAGE_USER 0x00002 /* S: User page (maps to UR) */ |
| 297 | #define _PAGE_FILE 0x00002 /* S: when !present: nonlinear file mapping */ | 297 | #define _PAGE_FILE 0x00002 /* S: when !present: nonlinear file mapping */ |
| 298 | #define _PAGE_ACCESSED 0x00004 /* S: Page referenced */ | 298 | #define _PAGE_RW 0x00004 /* S: Write permission (SW) */ |
| 299 | #define _PAGE_HWWRITE 0x00008 /* H: Dirty & RW, set in exception */ | 299 | #define _PAGE_DIRTY 0x00008 /* S: Page dirty */ |
| 300 | #define _PAGE_RW 0x00010 /* S: Write permission */ | 300 | #define _PAGE_HWEXEC 0x00010 /* H: SX permission */ |
| 301 | #define _PAGE_HWEXEC 0x00020 /* H: UX permission */ | 301 | #define _PAGE_ACCESSED 0x00020 /* S: Page referenced */ |
| 302 | 302 | ||
| 303 | #define _PAGE_ENDIAN 0x00040 /* H: E bit */ | 303 | #define _PAGE_ENDIAN 0x00040 /* H: E bit */ |
| 304 | #define _PAGE_GUARDED 0x00080 /* H: G bit */ | 304 | #define _PAGE_GUARDED 0x00080 /* H: G bit */ |
| @@ -307,21 +307,14 @@ extern int icache_44x_need_flush; | |||
| 307 | #define _PAGE_WRITETHRU 0x00400 /* H: W bit */ | 307 | #define _PAGE_WRITETHRU 0x00400 /* H: W bit */ |
| 308 | 308 | ||
| 309 | #ifdef CONFIG_PTE_64BIT | 309 | #ifdef CONFIG_PTE_64BIT |
| 310 | #define _PAGE_DIRTY 0x08000 /* S: Page dirty */ | ||
| 311 | |||
| 312 | /* ERPN in a PTE never gets cleared, ignore it */ | 310 | /* ERPN in a PTE never gets cleared, ignore it */ |
| 313 | #define _PTE_NONE_MASK 0xffffffffffff0000ULL | 311 | #define _PTE_NONE_MASK 0xffffffffffff0000ULL |
| 314 | #else | ||
| 315 | #define _PAGE_DIRTY 0x00800 /* S: Page dirty */ | ||
| 316 | #endif | 312 | #endif |
| 317 | 313 | ||
| 318 | #define _PMD_PRESENT 0 | 314 | #define _PMD_PRESENT 0 |
| 319 | #define _PMD_PRESENT_MASK (PAGE_MASK) | 315 | #define _PMD_PRESENT_MASK (PAGE_MASK) |
| 320 | #define _PMD_BAD (~PAGE_MASK) | 316 | #define _PMD_BAD (~PAGE_MASK) |
| 321 | 317 | ||
| 322 | /* Until my rework is finished, FSL BookE still needs atomic PTE updates */ | ||
| 323 | #define PTE_ATOMIC_UPDATES 1 | ||
| 324 | |||
| 325 | #elif defined(CONFIG_8xx) | 318 | #elif defined(CONFIG_8xx) |
| 326 | /* Definitions for 8xx embedded chips. */ | 319 | /* Definitions for 8xx embedded chips. */ |
| 327 | #define _PAGE_PRESENT 0x0001 /* Page is valid */ | 320 | #define _PAGE_PRESENT 0x0001 /* Page is valid */ |
diff --git a/include/asm-powerpc/pmi.h b/include/asm-powerpc/pmi.h index e1dc090748df..b4e91fbf5081 100644 --- a/include/asm-powerpc/pmi.h +++ b/include/asm-powerpc/pmi.h | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
| 31 | 31 | ||
| 32 | #define PMI_TYPE_FREQ_CHANGE 0x01 | 32 | #define PMI_TYPE_FREQ_CHANGE 0x01 |
| 33 | #define PMI_TYPE_POWER_BUTTON 0x02 | ||
| 33 | #define PMI_READ_TYPE 0 | 34 | #define PMI_READ_TYPE 0 |
| 34 | #define PMI_READ_DATA0 1 | 35 | #define PMI_READ_DATA0 1 |
| 35 | #define PMI_READ_DATA1 2 | 36 | #define PMI_READ_DATA1 2 |
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h index 81ffe3b3c1ce..f9e34c493cbb 100644 --- a/include/asm-powerpc/ps3.h +++ b/include/asm-powerpc/ps3.h | |||
| @@ -337,12 +337,18 @@ enum ps3_system_bus_device_type { | |||
| 337 | PS3_DEVICE_TYPE_LPM, | 337 | PS3_DEVICE_TYPE_LPM, |
| 338 | }; | 338 | }; |
| 339 | 339 | ||
| 340 | enum ps3_match_sub_id { | ||
| 341 | /* for PS3_MATCH_ID_GRAPHICS */ | ||
| 342 | PS3_MATCH_SUB_ID_FB = 1, | ||
| 343 | }; | ||
| 344 | |||
| 340 | /** | 345 | /** |
| 341 | * struct ps3_system_bus_device - a device on the system bus | 346 | * struct ps3_system_bus_device - a device on the system bus |
| 342 | */ | 347 | */ |
| 343 | 348 | ||
| 344 | struct ps3_system_bus_device { | 349 | struct ps3_system_bus_device { |
| 345 | enum ps3_match_id match_id; | 350 | enum ps3_match_id match_id; |
| 351 | enum ps3_match_sub_id match_sub_id; | ||
| 346 | enum ps3_system_bus_device_type dev_type; | 352 | enum ps3_system_bus_device_type dev_type; |
| 347 | 353 | ||
| 348 | u64 bus_id; /* SB */ | 354 | u64 bus_id; /* SB */ |
| @@ -371,6 +377,7 @@ int ps3_close_hv_device(struct ps3_system_bus_device *dev); | |||
| 371 | 377 | ||
| 372 | struct ps3_system_bus_driver { | 378 | struct ps3_system_bus_driver { |
| 373 | enum ps3_match_id match_id; | 379 | enum ps3_match_id match_id; |
| 380 | enum ps3_match_sub_id match_sub_id; | ||
| 374 | struct device_driver core; | 381 | struct device_driver core; |
| 375 | int (*probe)(struct ps3_system_bus_device *); | 382 | int (*probe)(struct ps3_system_bus_device *); |
| 376 | int (*remove)(struct ps3_system_bus_device *); | 383 | int (*remove)(struct ps3_system_bus_device *); |
diff --git a/include/asm-powerpc/reg.h b/include/asm-powerpc/reg.h index bbccadfee0d6..c6d1ab650778 100644 --- a/include/asm-powerpc/reg.h +++ b/include/asm-powerpc/reg.h | |||
| @@ -155,10 +155,12 @@ | |||
| 155 | #define CTRL_RUNLATCH 0x1 | 155 | #define CTRL_RUNLATCH 0x1 |
| 156 | #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ | 156 | #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ |
| 157 | #define DABR_TRANSLATION (1UL << 2) | 157 | #define DABR_TRANSLATION (1UL << 2) |
| 158 | #define SPRN_DABR2 0x13D /* e300 */ | ||
| 158 | #define SPRN_DABRX 0x3F7 /* Data Address Breakpoint Register Extension */ | 159 | #define SPRN_DABRX 0x3F7 /* Data Address Breakpoint Register Extension */ |
| 159 | #define DABRX_USER (1UL << 0) | 160 | #define DABRX_USER (1UL << 0) |
| 160 | #define DABRX_KERNEL (1UL << 1) | 161 | #define DABRX_KERNEL (1UL << 1) |
| 161 | #define SPRN_DAR 0x013 /* Data Address Register */ | 162 | #define SPRN_DAR 0x013 /* Data Address Register */ |
| 163 | #define SPRN_DBCR 0x136 /* e300 Data Breakpoint Control Reg */ | ||
| 162 | #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ | 164 | #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ |
| 163 | #define DSISR_NOHPTE 0x40000000 /* no translation found */ | 165 | #define DSISR_NOHPTE 0x40000000 /* no translation found */ |
| 164 | #define DSISR_PROTFAULT 0x08000000 /* protection fault */ | 166 | #define DSISR_PROTFAULT 0x08000000 /* protection fault */ |
| @@ -264,6 +266,8 @@ | |||
| 264 | #define HID1_PS (1<<16) /* 750FX PLL selection */ | 266 | #define HID1_PS (1<<16) /* 750FX PLL selection */ |
| 265 | #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ | 267 | #define SPRN_HID2 0x3F8 /* Hardware Implementation Register 2 */ |
| 266 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ | 268 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ |
| 269 | #define SPRN_IABR2 0x3FA /* 83xx */ | ||
| 270 | #define SPRN_IBCR 0x135 /* 83xx Insn Breakpoint Control Reg */ | ||
| 267 | #define SPRN_HID4 0x3F4 /* 970 HID4 */ | 271 | #define SPRN_HID4 0x3F4 /* 970 HID4 */ |
| 268 | #define SPRN_HID5 0x3F6 /* 970 HID5 */ | 272 | #define SPRN_HID5 0x3F6 /* 970 HID5 */ |
| 269 | #define SPRN_HID6 0x3F9 /* BE HID 6 */ | 273 | #define SPRN_HID6 0x3F9 /* BE HID 6 */ |
diff --git a/include/asm-powerpc/uaccess.h b/include/asm-powerpc/uaccess.h index 1a0736f8803f..bd0fb8495154 100644 --- a/include/asm-powerpc/uaccess.h +++ b/include/asm-powerpc/uaccess.h | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
| 8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
| 9 | #include <asm/asm-compat.h> | ||
| 9 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
| 10 | #include <asm/page.h> | 11 | #include <asm/page.h> |
| 11 | 12 | ||
| @@ -141,12 +142,11 @@ extern long __put_user_bad(void); | |||
| 141 | " b 2b\n" \ | 142 | " b 2b\n" \ |
| 142 | ".previous\n" \ | 143 | ".previous\n" \ |
| 143 | ".section __ex_table,\"a\"\n" \ | 144 | ".section __ex_table,\"a\"\n" \ |
| 144 | " .balign %5\n" \ | 145 | PPC_LONG_ALIGN "\n" \ |
| 145 | PPC_LONG "1b,3b\n" \ | 146 | PPC_LONG "1b,3b\n" \ |
| 146 | ".previous" \ | 147 | ".previous" \ |
| 147 | : "=r" (err) \ | 148 | : "=r" (err) \ |
| 148 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err),\ | 149 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err)) |
| 149 | "i"(sizeof(unsigned long))) | ||
| 150 | 150 | ||
| 151 | #ifdef __powerpc64__ | 151 | #ifdef __powerpc64__ |
| 152 | #define __put_user_asm2(x, ptr, retval) \ | 152 | #define __put_user_asm2(x, ptr, retval) \ |
| @@ -162,13 +162,12 @@ extern long __put_user_bad(void); | |||
| 162 | " b 3b\n" \ | 162 | " b 3b\n" \ |
| 163 | ".previous\n" \ | 163 | ".previous\n" \ |
| 164 | ".section __ex_table,\"a\"\n" \ | 164 | ".section __ex_table,\"a\"\n" \ |
| 165 | " .balign %5\n" \ | 165 | PPC_LONG_ALIGN "\n" \ |
| 166 | PPC_LONG "1b,4b\n" \ | 166 | PPC_LONG "1b,4b\n" \ |
| 167 | PPC_LONG "2b,4b\n" \ | 167 | PPC_LONG "2b,4b\n" \ |
| 168 | ".previous" \ | 168 | ".previous" \ |
| 169 | : "=r" (err) \ | 169 | : "=r" (err) \ |
| 170 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err),\ | 170 | : "r" (x), "b" (addr), "i" (-EFAULT), "0" (err)) |
| 171 | "i"(sizeof(unsigned long))) | ||
| 172 | #endif /* __powerpc64__ */ | 171 | #endif /* __powerpc64__ */ |
| 173 | 172 | ||
| 174 | #define __put_user_size(x, ptr, size, retval) \ | 173 | #define __put_user_size(x, ptr, size, retval) \ |
| @@ -226,12 +225,11 @@ extern long __get_user_bad(void); | |||
| 226 | " b 2b\n" \ | 225 | " b 2b\n" \ |
| 227 | ".previous\n" \ | 226 | ".previous\n" \ |
| 228 | ".section __ex_table,\"a\"\n" \ | 227 | ".section __ex_table,\"a\"\n" \ |
| 229 | " .balign %5\n" \ | 228 | PPC_LONG_ALIGN "\n" \ |
| 230 | PPC_LONG "1b,3b\n" \ | 229 | PPC_LONG "1b,3b\n" \ |
| 231 | ".previous" \ | 230 | ".previous" \ |
| 232 | : "=r" (err), "=r" (x) \ | 231 | : "=r" (err), "=r" (x) \ |
| 233 | : "b" (addr), "i" (-EFAULT), "0" (err), \ | 232 | : "b" (addr), "i" (-EFAULT), "0" (err)) |
| 234 | "i"(sizeof(unsigned long))) | ||
| 235 | 233 | ||
| 236 | #ifdef __powerpc64__ | 234 | #ifdef __powerpc64__ |
| 237 | #define __get_user_asm2(x, addr, err) \ | 235 | #define __get_user_asm2(x, addr, err) \ |
| @@ -249,13 +247,12 @@ extern long __get_user_bad(void); | |||
| 249 | " b 3b\n" \ | 247 | " b 3b\n" \ |
| 250 | ".previous\n" \ | 248 | ".previous\n" \ |
| 251 | ".section __ex_table,\"a\"\n" \ | 249 | ".section __ex_table,\"a\"\n" \ |
| 252 | " .balign %5\n" \ | 250 | PPC_LONG_ALIGN "\n" \ |
| 253 | PPC_LONG "1b,4b\n" \ | 251 | PPC_LONG "1b,4b\n" \ |
| 254 | PPC_LONG "2b,4b\n" \ | 252 | PPC_LONG "2b,4b\n" \ |
| 255 | ".previous" \ | 253 | ".previous" \ |
| 256 | : "=r" (err), "=&r" (x) \ | 254 | : "=r" (err), "=&r" (x) \ |
| 257 | : "b" (addr), "i" (-EFAULT), "0" (err), \ | 255 | : "b" (addr), "i" (-EFAULT), "0" (err)) |
| 258 | "i"(sizeof(unsigned long))) | ||
| 259 | #endif /* __powerpc64__ */ | 256 | #endif /* __powerpc64__ */ |
| 260 | 257 | ||
| 261 | #define __get_user_size(x, ptr, size, retval) \ | 258 | #define __get_user_size(x, ptr, size, retval) \ |
diff --git a/include/asm-powerpc/ucc_fast.h b/include/asm-powerpc/ucc_fast.h index f529f70b1d82..fce16abe7ee1 100644 --- a/include/asm-powerpc/ucc_fast.h +++ b/include/asm-powerpc/ucc_fast.h | |||
| @@ -156,11 +156,11 @@ struct ucc_fast_info { | |||
| 156 | 156 | ||
| 157 | struct ucc_fast_private { | 157 | struct ucc_fast_private { |
| 158 | struct ucc_fast_info *uf_info; | 158 | struct ucc_fast_info *uf_info; |
| 159 | struct ucc_fast *uf_regs; /* a pointer to memory map of UCC regs. */ | 159 | struct ucc_fast __iomem *uf_regs; /* a pointer to the UCC regs. */ |
| 160 | u32 *p_ucce; /* a pointer to the event register in memory. */ | 160 | u32 __iomem *p_ucce; /* a pointer to the event register in memory. */ |
| 161 | u32 *p_uccm; /* a pointer to the mask register in memory. */ | 161 | u32 __iomem *p_uccm; /* a pointer to the mask register in memory. */ |
| 162 | #ifdef CONFIG_UGETH_TX_ON_DEMAND | 162 | #ifdef CONFIG_UGETH_TX_ON_DEMAND |
| 163 | u16 *p_utodr; /* pointer to the transmit on demand register */ | 163 | u16 __iomem *p_utodr; /* pointer to the transmit on demand register */ |
| 164 | #endif | 164 | #endif |
| 165 | int enabled_tx; /* Whether channel is enabled for Tx (ENT) */ | 165 | int enabled_tx; /* Whether channel is enabled for Tx (ENT) */ |
| 166 | int enabled_rx; /* Whether channel is enabled for Rx (ENR) */ | 166 | int enabled_rx; /* Whether channel is enabled for Rx (ENR) */ |
diff --git a/include/linux/auxvec.h b/include/linux/auxvec.h index ad895455ab72..0da17d14fd13 100644 --- a/include/linux/auxvec.h +++ b/include/linux/auxvec.h | |||
| @@ -26,8 +26,10 @@ | |||
| 26 | 26 | ||
| 27 | #define AT_SECURE 23 /* secure mode boolean */ | 27 | #define AT_SECURE 23 /* secure mode boolean */ |
| 28 | 28 | ||
| 29 | #define AT_EXECFN 31 /* filename of program */ | ||
| 29 | #ifdef __KERNEL__ | 30 | #ifdef __KERNEL__ |
| 30 | #define AT_VECTOR_SIZE_BASE (14 + 2) /* NEW_AUX_ENT entries in auxiliary table */ | 31 | #define AT_VECTOR_SIZE_BASE 17 /* NEW_AUX_ENT entries in auxiliary table */ |
| 32 | /* number of "#define AT_.*" above, minus {AT_NULL, AT_IGNORE, AT_NOTELF} */ | ||
| 31 | #endif | 33 | #endif |
| 32 | 34 | ||
| 33 | #endif /* _LINUX_AUXVEC_H */ | 35 | #endif /* _LINUX_AUXVEC_H */ |
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 32755cdf68db..e1a6c046cea3 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
| @@ -44,6 +44,7 @@ struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, | |||
| 44 | const char *dest); | 44 | const char *dest); |
| 45 | 45 | ||
| 46 | void debugfs_remove(struct dentry *dentry); | 46 | void debugfs_remove(struct dentry *dentry); |
| 47 | void debugfs_remove_recursive(struct dentry *dentry); | ||
| 47 | 48 | ||
| 48 | struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | 49 | struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, |
| 49 | struct dentry *new_dir, const char *new_name); | 50 | struct dentry *new_dir, const char *new_name); |
| @@ -101,6 +102,9 @@ static inline struct dentry *debugfs_create_symlink(const char *name, | |||
| 101 | static inline void debugfs_remove(struct dentry *dentry) | 102 | static inline void debugfs_remove(struct dentry *dentry) |
| 102 | { } | 103 | { } |
| 103 | 104 | ||
| 105 | static inline void debugfs_remove_recursive(struct dentry *dentry) | ||
| 106 | { } | ||
| 107 | |||
| 104 | static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | 108 | static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, |
| 105 | struct dentry *new_dir, char *new_name) | 109 | struct dentry *new_dir, char *new_name) |
| 106 | { | 110 | { |
diff --git a/include/linux/device.h b/include/linux/device.h index f71a78d123ae..d24a47f80f9c 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/kobject.h> | 16 | #include <linux/kobject.h> |
| 17 | #include <linux/klist.h> | 17 | #include <linux/klist.h> |
| 18 | #include <linux/list.h> | 18 | #include <linux/list.h> |
| 19 | #include <linux/lockdep.h> | ||
| 19 | #include <linux/compiler.h> | 20 | #include <linux/compiler.h> |
| 20 | #include <linux/types.h> | 21 | #include <linux/types.h> |
| 21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
| @@ -24,17 +25,13 @@ | |||
| 24 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
| 25 | #include <asm/device.h> | 26 | #include <asm/device.h> |
| 26 | 27 | ||
| 27 | #define DEVICE_NAME_SIZE 50 | 28 | #define BUS_ID_SIZE 20 |
| 28 | /* DEVICE_NAME_HALF is really less than half to accommodate slop */ | ||
| 29 | #define DEVICE_NAME_HALF __stringify(20) | ||
| 30 | #define DEVICE_ID_SIZE 32 | ||
| 31 | #define BUS_ID_SIZE KOBJ_NAME_LEN | ||
| 32 | |||
| 33 | 29 | ||
| 34 | struct device; | 30 | struct device; |
| 35 | struct device_driver; | 31 | struct device_driver; |
| 36 | struct driver_private; | 32 | struct driver_private; |
| 37 | struct class; | 33 | struct class; |
| 34 | struct class_private; | ||
| 38 | struct bus_type; | 35 | struct bus_type; |
| 39 | struct bus_type_private; | 36 | struct bus_type_private; |
| 40 | 37 | ||
| @@ -186,13 +183,9 @@ struct class { | |||
| 186 | const char *name; | 183 | const char *name; |
| 187 | struct module *owner; | 184 | struct module *owner; |
| 188 | 185 | ||
| 189 | struct kset subsys; | ||
| 190 | struct list_head devices; | ||
| 191 | struct list_head interfaces; | ||
| 192 | struct kset class_dirs; | ||
| 193 | struct semaphore sem; /* locks children, devices, interfaces */ | ||
| 194 | struct class_attribute *class_attrs; | 186 | struct class_attribute *class_attrs; |
| 195 | struct device_attribute *dev_attrs; | 187 | struct device_attribute *dev_attrs; |
| 188 | struct kobject *dev_kobj; | ||
| 196 | 189 | ||
| 197 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); | 190 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); |
| 198 | 191 | ||
| @@ -203,13 +196,28 @@ struct class { | |||
| 203 | int (*resume)(struct device *dev); | 196 | int (*resume)(struct device *dev); |
| 204 | 197 | ||
| 205 | struct pm_ops *pm; | 198 | struct pm_ops *pm; |
| 199 | struct class_private *p; | ||
| 206 | }; | 200 | }; |
| 207 | 201 | ||
| 208 | extern int __must_check class_register(struct class *class); | 202 | extern struct kobject *sysfs_dev_block_kobj; |
| 203 | extern struct kobject *sysfs_dev_char_kobj; | ||
| 204 | extern int __must_check __class_register(struct class *class, | ||
| 205 | struct lock_class_key *key); | ||
| 209 | extern void class_unregister(struct class *class); | 206 | extern void class_unregister(struct class *class); |
| 210 | extern int class_for_each_device(struct class *class, void *data, | 207 | |
| 208 | /* This is a #define to keep the compiler from merging different | ||
| 209 | * instances of the __key variable */ | ||
| 210 | #define class_register(class) \ | ||
| 211 | ({ \ | ||
| 212 | static struct lock_class_key __key; \ | ||
| 213 | __class_register(class, &__key); \ | ||
| 214 | }) | ||
| 215 | |||
| 216 | extern int class_for_each_device(struct class *class, struct device *start, | ||
| 217 | void *data, | ||
| 211 | int (*fn)(struct device *dev, void *data)); | 218 | int (*fn)(struct device *dev, void *data)); |
| 212 | extern struct device *class_find_device(struct class *class, void *data, | 219 | extern struct device *class_find_device(struct class *class, |
| 220 | struct device *start, void *data, | ||
| 213 | int (*match)(struct device *, void *)); | 221 | int (*match)(struct device *, void *)); |
| 214 | 222 | ||
| 215 | struct class_attribute { | 223 | struct class_attribute { |
| @@ -237,9 +245,19 @@ struct class_interface { | |||
| 237 | extern int __must_check class_interface_register(struct class_interface *); | 245 | extern int __must_check class_interface_register(struct class_interface *); |
| 238 | extern void class_interface_unregister(struct class_interface *); | 246 | extern void class_interface_unregister(struct class_interface *); |
| 239 | 247 | ||
| 240 | extern struct class *class_create(struct module *owner, const char *name); | 248 | extern struct class * __must_check __class_create(struct module *owner, |
| 249 | const char *name, | ||
| 250 | struct lock_class_key *key); | ||
| 241 | extern void class_destroy(struct class *cls); | 251 | extern void class_destroy(struct class *cls); |
| 242 | 252 | ||
| 253 | /* This is a #define to keep the compiler from merging different | ||
| 254 | * instances of the __key variable */ | ||
| 255 | #define class_create(owner, name) \ | ||
| 256 | ({ \ | ||
| 257 | static struct lock_class_key __key; \ | ||
| 258 | __class_create(owner, name, &__key); \ | ||
| 259 | }) | ||
| 260 | |||
| 243 | /* | 261 | /* |
| 244 | * The type of device, "struct device" is embedded in. A class | 262 | * The type of device, "struct device" is embedded in. A class |
| 245 | * or bus can contain devices of different types | 263 | * or bus can contain devices of different types |
| @@ -468,14 +486,10 @@ extern struct device *device_create_vargs(struct class *cls, | |||
| 468 | const char *fmt, | 486 | const char *fmt, |
| 469 | va_list vargs); | 487 | va_list vargs); |
| 470 | extern struct device *device_create(struct class *cls, struct device *parent, | 488 | extern struct device *device_create(struct class *cls, struct device *parent, |
| 471 | dev_t devt, const char *fmt, ...) | 489 | dev_t devt, void *drvdata, |
| 472 | __attribute__((format(printf, 4, 5))); | 490 | const char *fmt, ...) |
| 473 | extern struct device *device_create_drvdata(struct class *cls, | ||
| 474 | struct device *parent, | ||
| 475 | dev_t devt, | ||
| 476 | void *drvdata, | ||
| 477 | const char *fmt, ...) | ||
| 478 | __attribute__((format(printf, 5, 6))); | 491 | __attribute__((format(printf, 5, 6))); |
| 492 | #define device_create_drvdata device_create | ||
| 479 | extern void device_destroy(struct class *cls, dev_t devt); | 493 | extern void device_destroy(struct class *cls, dev_t devt); |
| 480 | 494 | ||
| 481 | /* | 495 | /* |
diff --git a/include/linux/dma-attrs.h b/include/linux/dma-attrs.h index 1677e2bfa00c..71ad34eca6e3 100644 --- a/include/linux/dma-attrs.h +++ b/include/linux/dma-attrs.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | */ | 12 | */ |
| 13 | enum dma_attr { | 13 | enum dma_attr { |
| 14 | DMA_ATTR_WRITE_BARRIER, | 14 | DMA_ATTR_WRITE_BARRIER, |
| 15 | DMA_ATTR_WEAK_ORDERING, | ||
| 15 | DMA_ATTR_MAX, | 16 | DMA_ATTR_MAX, |
| 16 | }; | 17 | }; |
| 17 | 18 | ||
diff --git a/include/linux/eisa.h b/include/linux/eisa.h index fe806b6f030d..e61c0be2a459 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h | |||
| @@ -40,7 +40,7 @@ struct eisa_device { | |||
| 40 | u64 dma_mask; | 40 | u64 dma_mask; |
| 41 | struct device dev; /* generic device */ | 41 | struct device dev; /* generic device */ |
| 42 | #ifdef CONFIG_EISA_NAMES | 42 | #ifdef CONFIG_EISA_NAMES |
| 43 | char pretty_name[DEVICE_NAME_SIZE]; | 43 | char pretty_name[50]; |
| 44 | #endif | 44 | #endif |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
diff --git a/include/linux/fs_enet_pd.h b/include/linux/fs_enet_pd.h index 9bc045b8c478..0ba21ee0f58c 100644 --- a/include/linux/fs_enet_pd.h +++ b/include/linux/fs_enet_pd.h | |||
| @@ -135,11 +135,7 @@ struct fs_platform_info { | |||
| 135 | u32 device_flags; | 135 | u32 device_flags; |
| 136 | 136 | ||
| 137 | int phy_addr; /* the phy address (-1 no phy) */ | 137 | int phy_addr; /* the phy address (-1 no phy) */ |
| 138 | #ifdef CONFIG_PPC_CPM_NEW_BINDING | ||
| 139 | char bus_id[16]; | 138 | char bus_id[16]; |
| 140 | #else | ||
| 141 | const char* bus_id; | ||
| 142 | #endif | ||
| 143 | int phy_irq; /* the phy irq (if it exists) */ | 139 | int phy_irq; /* the phy irq (if it exists) */ |
| 144 | 140 | ||
| 145 | const struct fs_mii_bus_info *bus_info; | 141 | const struct fs_mii_bus_info *bus_info; |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index c415a496de3a..4e625e0094c8 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
| @@ -69,6 +69,7 @@ struct gianfar_mdio_data { | |||
| 69 | #define FSL_GIANFAR_DEV_HAS_VLAN 0x00000020 | 69 | #define FSL_GIANFAR_DEV_HAS_VLAN 0x00000020 |
| 70 | #define FSL_GIANFAR_DEV_HAS_EXTENDED_HASH 0x00000040 | 70 | #define FSL_GIANFAR_DEV_HAS_EXTENDED_HASH 0x00000040 |
| 71 | #define FSL_GIANFAR_DEV_HAS_PADDING 0x00000080 | 71 | #define FSL_GIANFAR_DEV_HAS_PADDING 0x00000080 |
| 72 | #define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET 0x00000100 | ||
| 72 | 73 | ||
| 73 | /* Flags in gianfar_platform_data */ | 74 | /* Flags in gianfar_platform_data */ |
| 74 | #define FSL_GIANFAR_BRD_HAS_PHY_INTR 0x00000001 /* set or use a timer */ | 75 | #define FSL_GIANFAR_BRD_HAS_PHY_INTR 0x00000001 /* set or use a timer */ |
| @@ -125,4 +126,10 @@ struct mpc8xx_pcmcia_ops { | |||
| 125 | int(*voltage_set)(int slot, int vcc, int vpp); | 126 | int(*voltage_set)(int slot, int vcc, int vpp); |
| 126 | }; | 127 | }; |
| 127 | 128 | ||
| 129 | /* Returns non-zero if the current suspend operation would | ||
| 130 | * lead to a deep sleep (i.e. power removed from the core, | ||
| 131 | * instead of just the clock). | ||
| 132 | */ | ||
| 133 | int fsl_deep_sleep(void); | ||
| 134 | |||
| 128 | #endif /* _FSL_DEVICE_H_ */ | 135 | #endif /* _FSL_DEVICE_H_ */ |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 39e709f88aa0..60f0d418ae32 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
| @@ -26,7 +26,6 @@ | |||
| 26 | #include <linux/wait.h> | 26 | #include <linux/wait.h> |
| 27 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
| 28 | 28 | ||
| 29 | #define KOBJ_NAME_LEN 20 | ||
| 30 | #define UEVENT_HELPER_PATH_LEN 256 | 29 | #define UEVENT_HELPER_PATH_LEN 256 |
| 31 | #define UEVENT_NUM_ENVP 32 /* number of env pointers */ | 30 | #define UEVENT_NUM_ENVP 32 /* number of env pointers */ |
| 32 | #define UEVENT_BUFFER_SIZE 2048 /* buffer for the variables */ | 31 | #define UEVENT_BUFFER_SIZE 2048 /* buffer for the variables */ |
| @@ -59,12 +58,12 @@ enum kobject_action { | |||
| 59 | 58 | ||
| 60 | struct kobject { | 59 | struct kobject { |
| 61 | const char *name; | 60 | const char *name; |
| 62 | struct kref kref; | ||
| 63 | struct list_head entry; | 61 | struct list_head entry; |
| 64 | struct kobject *parent; | 62 | struct kobject *parent; |
| 65 | struct kset *kset; | 63 | struct kset *kset; |
| 66 | struct kobj_type *ktype; | 64 | struct kobj_type *ktype; |
| 67 | struct sysfs_dirent *sd; | 65 | struct sysfs_dirent *sd; |
| 66 | struct kref kref; | ||
| 68 | unsigned int state_initialized:1; | 67 | unsigned int state_initialized:1; |
| 69 | unsigned int state_in_sysfs:1; | 68 | unsigned int state_in_sysfs:1; |
| 70 | unsigned int state_add_uevent_sent:1; | 69 | unsigned int state_add_uevent_sent:1; |
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index a9fae032ba81..9c1d95491f8b 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
| @@ -189,7 +189,7 @@ typedef union { | |||
| 189 | */ | 189 | */ |
| 190 | 190 | ||
| 191 | struct map_info { | 191 | struct map_info { |
| 192 | char *name; | 192 | const char *name; |
| 193 | unsigned long size; | 193 | unsigned long size; |
| 194 | resource_size_t phys; | 194 | resource_size_t phys; |
| 195 | #define NO_XIP (-1UL) | 195 | #define NO_XIP (-1UL) |
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 245f9098e171..8b5d49133ec6 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
| @@ -121,7 +121,7 @@ struct mtd_info { | |||
| 121 | u_int32_t oobavail; // Available OOB bytes per block | 121 | u_int32_t oobavail; // Available OOB bytes per block |
| 122 | 122 | ||
| 123 | // Kernel-only stuff starts here. | 123 | // Kernel-only stuff starts here. |
| 124 | char *name; | 124 | const char *name; |
| 125 | int index; | 125 | int index; |
| 126 | 126 | ||
| 127 | /* ecc layout structure pointer - read only ! */ | 127 | /* ecc layout structure pointer - read only ! */ |
diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h index 2ee97e9877a7..67db101d0eb8 100644 --- a/include/linux/of_gpio.h +++ b/include/linux/of_gpio.h | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #define __LINUX_OF_GPIO_H | 15 | #define __LINUX_OF_GPIO_H |
| 16 | 16 | ||
| 17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
| 18 | #include <asm/gpio.h> | 18 | #include <linux/gpio.h> |
| 19 | 19 | ||
| 20 | #ifdef CONFIG_OF_GPIO | 20 | #ifdef CONFIG_OF_GPIO |
| 21 | 21 | ||
diff --git a/include/linux/spi/max7301.h b/include/linux/spi/max7301.h new file mode 100644 index 000000000000..6dfd83f19b4b --- /dev/null +++ b/include/linux/spi/max7301.h | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #ifndef LINUX_SPI_MAX7301_H | ||
| 2 | #define LINUX_SPI_MAX7301_H | ||
| 3 | |||
| 4 | struct max7301_platform_data { | ||
| 5 | /* number assigned to the first GPIO */ | ||
| 6 | unsigned base; | ||
| 7 | }; | ||
| 8 | |||
| 9 | #endif | ||
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 387e428f1cdf..b9a76c972084 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
| @@ -733,7 +733,7 @@ struct spi_board_info { | |||
| 733 | * controller_data goes to spi_device.controller_data, | 733 | * controller_data goes to spi_device.controller_data, |
| 734 | * irq is copied too | 734 | * irq is copied too |
| 735 | */ | 735 | */ |
| 736 | char modalias[KOBJ_NAME_LEN]; | 736 | char modalias[32]; |
| 737 | const void *platform_data; | 737 | const void *platform_data; |
| 738 | void *controller_data; | 738 | void *controller_data; |
| 739 | int irq; | 739 | int irq; |
diff --git a/include/linux/synclink.h b/include/linux/synclink.h index 45f6bc82d317..c844a229acc9 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h | |||
| @@ -136,6 +136,7 @@ | |||
| 136 | #define MGSL_INTERFACE_RTS_EN 0x10 | 136 | #define MGSL_INTERFACE_RTS_EN 0x10 |
| 137 | #define MGSL_INTERFACE_LL 0x20 | 137 | #define MGSL_INTERFACE_LL 0x20 |
| 138 | #define MGSL_INTERFACE_RL 0x40 | 138 | #define MGSL_INTERFACE_RL 0x40 |
| 139 | #define MGSL_INTERFACE_MSB_FIRST 0x80 | ||
| 139 | 140 | ||
| 140 | typedef struct _MGSL_PARAMS | 141 | typedef struct _MGSL_PARAMS |
| 141 | { | 142 | { |
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index f2767bc6b735..f395bb3fa2f2 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
| @@ -99,8 +99,9 @@ extern void sysdev_unregister(struct sys_device *); | |||
| 99 | 99 | ||
| 100 | struct sysdev_attribute { | 100 | struct sysdev_attribute { |
| 101 | struct attribute attr; | 101 | struct attribute attr; |
| 102 | ssize_t (*show)(struct sys_device *, char *); | 102 | ssize_t (*show)(struct sys_device *, struct sysdev_attribute *, char *); |
| 103 | ssize_t (*store)(struct sys_device *, const char *, size_t); | 103 | ssize_t (*store)(struct sys_device *, struct sysdev_attribute *, |
| 104 | const char *, size_t); | ||
| 104 | }; | 105 | }; |
| 105 | 106 | ||
| 106 | 107 | ||
| @@ -118,4 +119,38 @@ struct sysdev_attribute { | |||
| 118 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); | 119 | extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *); |
| 119 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); | 120 | extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *); |
| 120 | 121 | ||
| 122 | struct sysdev_ext_attribute { | ||
| 123 | struct sysdev_attribute attr; | ||
| 124 | void *var; | ||
| 125 | }; | ||
| 126 | |||
| 127 | /* | ||
| 128 | * Support for simple variable sysdev attributes. | ||
| 129 | * The pointer to the variable is stored in a sysdev_ext_attribute | ||
| 130 | */ | ||
| 131 | |||
| 132 | /* Add more types as needed */ | ||
| 133 | |||
| 134 | extern ssize_t sysdev_show_ulong(struct sys_device *, struct sysdev_attribute *, | ||
| 135 | char *); | ||
| 136 | extern ssize_t sysdev_store_ulong(struct sys_device *, | ||
| 137 | struct sysdev_attribute *, const char *, size_t); | ||
| 138 | extern ssize_t sysdev_show_int(struct sys_device *, struct sysdev_attribute *, | ||
| 139 | char *); | ||
| 140 | extern ssize_t sysdev_store_int(struct sys_device *, | ||
| 141 | struct sysdev_attribute *, const char *, size_t); | ||
| 142 | |||
| 143 | #define _SYSDEV_ULONG_ATTR(_name, _mode, _var) \ | ||
| 144 | { _SYSDEV_ATTR(_name, _mode, sysdev_show_ulong, sysdev_store_ulong), \ | ||
| 145 | &(_var) } | ||
| 146 | #define SYSDEV_ULONG_ATTR(_name, _mode, _var) \ | ||
| 147 | struct sysdev_ext_attribute attr_##_name = \ | ||
| 148 | _SYSDEV_ULONG_ATTR(_name, _mode, _var); | ||
| 149 | #define _SYSDEV_INT_ATTR(_name, _mode, _var) \ | ||
| 150 | { _SYSDEV_ATTR(_name, _mode, sysdev_show_int, sysdev_store_int), \ | ||
| 151 | &(_var) } | ||
| 152 | #define SYSDEV_INT_ATTR(_name, _mode, _var) \ | ||
| 153 | struct sysdev_ext_attribute attr_##_name = \ | ||
| 154 | _SYSDEV_INT_ATTR(_name, _mode, _var); | ||
| 155 | |||
| 121 | #endif /* _SYSDEV_H_ */ | 156 | #endif /* _SYSDEV_H_ */ |
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 7858eac40aa7..37fa24152bd8 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h | |||
| @@ -101,6 +101,9 @@ void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr); | |||
| 101 | 101 | ||
| 102 | int __must_check sysfs_create_link(struct kobject *kobj, struct kobject *target, | 102 | int __must_check sysfs_create_link(struct kobject *kobj, struct kobject *target, |
| 103 | const char *name); | 103 | const char *name); |
| 104 | int __must_check sysfs_create_link_nowarn(struct kobject *kobj, | ||
| 105 | struct kobject *target, | ||
| 106 | const char *name); | ||
| 104 | void sysfs_remove_link(struct kobject *kobj, const char *name); | 107 | void sysfs_remove_link(struct kobject *kobj, const char *name); |
| 105 | 108 | ||
| 106 | int __must_check sysfs_create_group(struct kobject *kobj, | 109 | int __must_check sysfs_create_group(struct kobject *kobj, |
| @@ -180,6 +183,13 @@ static inline int sysfs_create_link(struct kobject *kobj, | |||
| 180 | return 0; | 183 | return 0; |
| 181 | } | 184 | } |
| 182 | 185 | ||
| 186 | static inline int sysfs_create_link_nowarn(struct kobject *kobj, | ||
| 187 | struct kobject *target, | ||
| 188 | const char *name) | ||
| 189 | { | ||
| 190 | return 0; | ||
| 191 | } | ||
| 192 | |||
| 183 | static inline void sysfs_remove_link(struct kobject *kobj, const char *name) | 193 | static inline void sysfs_remove_link(struct kobject *kobj, const char *name) |
| 184 | { | 194 | { |
| 185 | } | 195 | } |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 4e5833073aa6..e3579cb086e0 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
| @@ -317,8 +317,6 @@ extern void tty_wait_until_sent(struct tty_struct *tty, long timeout); | |||
| 317 | extern int tty_check_change(struct tty_struct *tty); | 317 | extern int tty_check_change(struct tty_struct *tty); |
| 318 | extern void stop_tty(struct tty_struct *tty); | 318 | extern void stop_tty(struct tty_struct *tty); |
| 319 | extern void start_tty(struct tty_struct *tty); | 319 | extern void start_tty(struct tty_struct *tty); |
| 320 | extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); | ||
| 321 | extern int tty_unregister_ldisc(int disc); | ||
| 322 | extern int tty_register_driver(struct tty_driver *driver); | 320 | extern int tty_register_driver(struct tty_driver *driver); |
| 323 | extern int tty_unregister_driver(struct tty_driver *driver); | 321 | extern int tty_unregister_driver(struct tty_driver *driver); |
| 324 | extern struct device *tty_register_device(struct tty_driver *driver, | 322 | extern struct device *tty_register_device(struct tty_driver *driver, |
| @@ -383,6 +381,15 @@ extern void tty_port_init(struct tty_port *port); | |||
| 383 | extern int tty_port_alloc_xmit_buf(struct tty_port *port); | 381 | extern int tty_port_alloc_xmit_buf(struct tty_port *port); |
| 384 | extern void tty_port_free_xmit_buf(struct tty_port *port); | 382 | extern void tty_port_free_xmit_buf(struct tty_port *port); |
| 385 | 383 | ||
| 384 | extern int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc); | ||
| 385 | extern int tty_unregister_ldisc(int disc); | ||
| 386 | extern int tty_set_ldisc(struct tty_struct *tty, int ldisc); | ||
| 387 | extern int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty); | ||
| 388 | extern void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty); | ||
| 389 | extern void tty_ldisc_init(struct tty_struct *tty); | ||
| 390 | extern void tty_ldisc_begin(void); | ||
| 391 | /* This last one is just for the tty layer internals and shouldn't be used elsewhere */ | ||
| 392 | extern void tty_ldisc_enable(struct tty_struct *tty); | ||
| 386 | 393 | ||
| 387 | 394 | ||
| 388 | /* n_tty.c */ | 395 | /* n_tty.c */ |
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index d2a003586761..e1065ac0d922 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h | |||
| @@ -135,7 +135,7 @@ | |||
| 135 | * | 135 | * |
| 136 | * Optional: | 136 | * Optional: |
| 137 | * | 137 | * |
| 138 | * void (*break_ctl)(struct tty_stuct *tty, int state); | 138 | * int (*break_ctl)(struct tty_stuct *tty, int state); |
| 139 | * | 139 | * |
| 140 | * This optional routine requests the tty driver to turn on or | 140 | * This optional routine requests the tty driver to turn on or |
| 141 | * off BREAK status on the RS-232 port. If state is -1, | 141 | * off BREAK status on the RS-232 port. If state is -1, |
| @@ -146,6 +146,10 @@ | |||
| 146 | * handle the following ioctls: TCSBRK, TCSBRKP, TIOCSBRK, | 146 | * handle the following ioctls: TCSBRK, TCSBRKP, TIOCSBRK, |
| 147 | * TIOCCBRK. | 147 | * TIOCCBRK. |
| 148 | * | 148 | * |
| 149 | * If the driver sets TTY_DRIVER_HARDWARE_BREAK then the interface | ||
| 150 | * will also be called with actual times and the hardware is expected | ||
| 151 | * to do the delay work itself. 0 and -1 are still used for on/off. | ||
| 152 | * | ||
| 149 | * Optional: Required for TCSBRK/BRKP/etc handling. | 153 | * Optional: Required for TCSBRK/BRKP/etc handling. |
| 150 | * | 154 | * |
| 151 | * void (*wait_until_sent)(struct tty_struct *tty, int timeout); | 155 | * void (*wait_until_sent)(struct tty_struct *tty, int timeout); |
| @@ -192,7 +196,7 @@ struct tty_operations { | |||
| 192 | void (*stop)(struct tty_struct *tty); | 196 | void (*stop)(struct tty_struct *tty); |
| 193 | void (*start)(struct tty_struct *tty); | 197 | void (*start)(struct tty_struct *tty); |
| 194 | void (*hangup)(struct tty_struct *tty); | 198 | void (*hangup)(struct tty_struct *tty); |
| 195 | void (*break_ctl)(struct tty_struct *tty, int state); | 199 | int (*break_ctl)(struct tty_struct *tty, int state); |
| 196 | void (*flush_buffer)(struct tty_struct *tty); | 200 | void (*flush_buffer)(struct tty_struct *tty); |
| 197 | void (*set_ldisc)(struct tty_struct *tty); | 201 | void (*set_ldisc)(struct tty_struct *tty); |
| 198 | void (*wait_until_sent)(struct tty_struct *tty, int timeout); | 202 | void (*wait_until_sent)(struct tty_struct *tty, int timeout); |
| @@ -285,12 +289,18 @@ extern struct tty_driver *tty_find_polling_driver(char *name, int *line); | |||
| 285 | * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead | 289 | * TTY_DRIVER_DEVPTS_MEM -- don't use the standard arrays, instead |
| 286 | * use dynamic memory keyed through the devpts filesystem. This | 290 | * use dynamic memory keyed through the devpts filesystem. This |
| 287 | * is only applicable to the pty driver. | 291 | * is only applicable to the pty driver. |
| 292 | * | ||
| 293 | * TTY_DRIVER_HARDWARE_BREAK -- hardware handles break signals. Pass | ||
| 294 | * the requested timeout to the caller instead of using a simple | ||
| 295 | * on/off interface. | ||
| 296 | * | ||
| 288 | */ | 297 | */ |
| 289 | #define TTY_DRIVER_INSTALLED 0x0001 | 298 | #define TTY_DRIVER_INSTALLED 0x0001 |
| 290 | #define TTY_DRIVER_RESET_TERMIOS 0x0002 | 299 | #define TTY_DRIVER_RESET_TERMIOS 0x0002 |
| 291 | #define TTY_DRIVER_REAL_RAW 0x0004 | 300 | #define TTY_DRIVER_REAL_RAW 0x0004 |
| 292 | #define TTY_DRIVER_DYNAMIC_DEV 0x0008 | 301 | #define TTY_DRIVER_DYNAMIC_DEV 0x0008 |
| 293 | #define TTY_DRIVER_DEVPTS_MEM 0x0010 | 302 | #define TTY_DRIVER_DEVPTS_MEM 0x0010 |
| 303 | #define TTY_DRIVER_HARDWARE_BREAK 0x0020 | ||
| 294 | 304 | ||
| 295 | /* tty driver types */ | 305 | /* tty driver types */ |
| 296 | #define TTY_DRIVER_TYPE_SYSTEM 0x0001 | 306 | #define TTY_DRIVER_TYPE_SYSTEM 0x0001 |
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index 973386d439da..cdf338d94b7f 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
| @@ -36,7 +36,7 @@ struct uio_mem { | |||
| 36 | struct uio_map *map; | 36 | struct uio_map *map; |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | #define MAX_UIO_MAPS 5 | 39 | #define MAX_UIO_MAPS 5 |
| 40 | 40 | ||
| 41 | struct uio_device; | 41 | struct uio_device; |
| 42 | 42 | ||
| @@ -53,6 +53,7 @@ struct uio_device; | |||
| 53 | * @mmap: mmap operation for this uio device | 53 | * @mmap: mmap operation for this uio device |
| 54 | * @open: open operation for this uio device | 54 | * @open: open operation for this uio device |
| 55 | * @release: release operation for this uio device | 55 | * @release: release operation for this uio device |
| 56 | * @irqcontrol: disable/enable irqs when 0/1 is written to /dev/uioX | ||
| 56 | */ | 57 | */ |
| 57 | struct uio_info { | 58 | struct uio_info { |
| 58 | struct uio_device *uio_dev; | 59 | struct uio_device *uio_dev; |
| @@ -66,6 +67,7 @@ struct uio_info { | |||
| 66 | int (*mmap)(struct uio_info *info, struct vm_area_struct *vma); | 67 | int (*mmap)(struct uio_info *info, struct vm_area_struct *vma); |
| 67 | int (*open)(struct uio_info *info, struct inode *inode); | 68 | int (*open)(struct uio_info *info, struct inode *inode); |
| 68 | int (*release)(struct uio_info *info, struct inode *inode); | 69 | int (*release)(struct uio_info *info, struct inode *inode); |
| 70 | int (*irqcontrol)(struct uio_info *info, s32 irq_on); | ||
| 69 | }; | 71 | }; |
| 70 | 72 | ||
| 71 | extern int __must_check | 73 | extern int __must_check |
| @@ -80,11 +82,11 @@ static inline int __must_check | |||
| 80 | extern void uio_unregister_device(struct uio_info *info); | 82 | extern void uio_unregister_device(struct uio_info *info); |
| 81 | extern void uio_event_notify(struct uio_info *info); | 83 | extern void uio_event_notify(struct uio_info *info); |
| 82 | 84 | ||
| 83 | /* defines for uio_device->irq */ | 85 | /* defines for uio_info->irq */ |
| 84 | #define UIO_IRQ_CUSTOM -1 | 86 | #define UIO_IRQ_CUSTOM -1 |
| 85 | #define UIO_IRQ_NONE -2 | 87 | #define UIO_IRQ_NONE -2 |
| 86 | 88 | ||
| 87 | /* defines for uio_device->memtype */ | 89 | /* defines for uio_mem->memtype */ |
| 88 | #define UIO_MEM_NONE 0 | 90 | #define UIO_MEM_NONE 0 |
| 89 | #define UIO_MEM_PHYS 1 | 91 | #define UIO_MEM_PHYS 1 |
| 90 | #define UIO_MEM_LOGICAL 2 | 92 | #define UIO_MEM_LOGICAL 2 |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 8f891cbaf9ab..09a3e6a7518f 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
| @@ -62,7 +62,7 @@ | |||
| 62 | */ | 62 | */ |
| 63 | struct usb_serial_port { | 63 | struct usb_serial_port { |
| 64 | struct usb_serial *serial; | 64 | struct usb_serial *serial; |
| 65 | struct tty_struct *tty; | 65 | struct tty_port port; |
| 66 | spinlock_t lock; | 66 | spinlock_t lock; |
| 67 | struct mutex mutex; | 67 | struct mutex mutex; |
| 68 | unsigned char number; | 68 | unsigned char number; |
| @@ -89,7 +89,6 @@ struct usb_serial_port { | |||
| 89 | 89 | ||
| 90 | wait_queue_head_t write_wait; | 90 | wait_queue_head_t write_wait; |
| 91 | struct work_struct work; | 91 | struct work_struct work; |
| 92 | int open_count; | ||
| 93 | char throttled; | 92 | char throttled; |
| 94 | char throttle_req; | 93 | char throttle_req; |
| 95 | char console; | 94 | char console; |
| @@ -217,22 +216,27 @@ struct usb_serial_driver { | |||
| 217 | int (*resume)(struct usb_serial *serial); | 216 | int (*resume)(struct usb_serial *serial); |
| 218 | 217 | ||
| 219 | /* serial function calls */ | 218 | /* serial function calls */ |
| 220 | int (*open)(struct usb_serial_port *port, struct file *filp); | 219 | /* Called by console with tty = NULL and by tty */ |
| 221 | void (*close)(struct usb_serial_port *port, struct file *filp); | 220 | int (*open)(struct tty_struct *tty, |
| 222 | int (*write)(struct usb_serial_port *port, const unsigned char *buf, | 221 | struct usb_serial_port *port, struct file *filp); |
| 223 | int count); | 222 | void (*close)(struct tty_struct *tty, |
| 224 | int (*write_room)(struct usb_serial_port *port); | 223 | struct usb_serial_port *port, struct file *filp); |
| 225 | int (*ioctl)(struct usb_serial_port *port, struct file *file, | 224 | int (*write)(struct tty_struct *tty, struct usb_serial_port *port, |
| 225 | const unsigned char *buf, int count); | ||
| 226 | /* Called only by the tty layer */ | ||
| 227 | int (*write_room)(struct tty_struct *tty); | ||
| 228 | int (*ioctl)(struct tty_struct *tty, struct file *file, | ||
| 226 | unsigned int cmd, unsigned long arg); | 229 | unsigned int cmd, unsigned long arg); |
| 227 | void (*set_termios)(struct usb_serial_port *port, struct ktermios *old); | 230 | void (*set_termios)(struct tty_struct *tty, |
| 228 | void (*break_ctl)(struct usb_serial_port *port, int break_state); | 231 | struct usb_serial_port *port, struct ktermios *old); |
| 229 | int (*chars_in_buffer)(struct usb_serial_port *port); | 232 | void (*break_ctl)(struct tty_struct *tty, int break_state); |
| 230 | void (*throttle)(struct usb_serial_port *port); | 233 | int (*chars_in_buffer)(struct tty_struct *tty); |
| 231 | void (*unthrottle)(struct usb_serial_port *port); | 234 | void (*throttle)(struct tty_struct *tty); |
| 232 | int (*tiocmget)(struct usb_serial_port *port, struct file *file); | 235 | void (*unthrottle)(struct tty_struct *tty); |
| 233 | int (*tiocmset)(struct usb_serial_port *port, struct file *file, | 236 | int (*tiocmget)(struct tty_struct *tty, struct file *file); |
| 237 | int (*tiocmset)(struct tty_struct *tty, struct file *file, | ||
| 234 | unsigned int set, unsigned int clear); | 238 | unsigned int set, unsigned int clear); |
| 235 | 239 | /* USB events */ | |
| 236 | void (*read_int_callback)(struct urb *urb); | 240 | void (*read_int_callback)(struct urb *urb); |
| 237 | void (*write_int_callback)(struct urb *urb); | 241 | void (*write_int_callback)(struct urb *urb); |
| 238 | void (*read_bulk_callback)(struct urb *urb); | 242 | void (*read_bulk_callback)(struct urb *urb); |
| @@ -270,19 +274,19 @@ static inline void usb_serial_console_disconnect(struct usb_serial *serial) {} | |||
| 270 | /* Functions needed by other parts of the usbserial core */ | 274 | /* Functions needed by other parts of the usbserial core */ |
| 271 | extern struct usb_serial *usb_serial_get_by_index(unsigned int minor); | 275 | extern struct usb_serial *usb_serial_get_by_index(unsigned int minor); |
| 272 | extern void usb_serial_put(struct usb_serial *serial); | 276 | extern void usb_serial_put(struct usb_serial *serial); |
| 273 | extern int usb_serial_generic_open(struct usb_serial_port *port, | 277 | extern int usb_serial_generic_open(struct tty_struct *tty, |
| 274 | struct file *filp); | 278 | struct usb_serial_port *port, struct file *filp); |
| 275 | extern int usb_serial_generic_write(struct usb_serial_port *port, | 279 | extern int usb_serial_generic_write(struct tty_struct *tty, |
| 276 | const unsigned char *buf, int count); | 280 | struct usb_serial_port *port, const unsigned char *buf, int count); |
| 277 | extern void usb_serial_generic_close(struct usb_serial_port *port, | 281 | extern void usb_serial_generic_close(struct tty_struct *tty, |
| 278 | struct file *filp); | 282 | struct usb_serial_port *port, struct file *filp); |
| 279 | extern int usb_serial_generic_resume(struct usb_serial *serial); | 283 | extern int usb_serial_generic_resume(struct usb_serial *serial); |
| 280 | extern int usb_serial_generic_write_room(struct usb_serial_port *port); | 284 | extern int usb_serial_generic_write_room(struct tty_struct *tty); |
| 281 | extern int usb_serial_generic_chars_in_buffer(struct usb_serial_port *port); | 285 | extern int usb_serial_generic_chars_in_buffer(struct tty_struct *tty); |
| 282 | extern void usb_serial_generic_read_bulk_callback(struct urb *urb); | 286 | extern void usb_serial_generic_read_bulk_callback(struct urb *urb); |
| 283 | extern void usb_serial_generic_write_bulk_callback(struct urb *urb); | 287 | extern void usb_serial_generic_write_bulk_callback(struct urb *urb); |
| 284 | extern void usb_serial_generic_throttle(struct usb_serial_port *port); | 288 | extern void usb_serial_generic_throttle(struct tty_struct *tty); |
| 285 | extern void usb_serial_generic_unthrottle(struct usb_serial_port *port); | 289 | extern void usb_serial_generic_unthrottle(struct tty_struct *tty); |
| 286 | extern void usb_serial_generic_shutdown(struct usb_serial *serial); | 290 | extern void usb_serial_generic_shutdown(struct usb_serial *serial); |
| 287 | extern int usb_serial_generic_register(int debug); | 291 | extern int usb_serial_generic_register(int debug); |
| 288 | extern void usb_serial_generic_deregister(void); | 292 | extern void usb_serial_generic_deregister(void); |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 1834fdfe82a7..a594bac4a77d 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
| @@ -623,7 +623,7 @@ struct Scsi_Host { | |||
| 623 | /* | 623 | /* |
| 624 | * Optional work queue to be utilized by the transport | 624 | * Optional work queue to be utilized by the transport |
| 625 | */ | 625 | */ |
| 626 | char work_q_name[KOBJ_NAME_LEN]; | 626 | char work_q_name[20]; |
| 627 | struct workqueue_struct *work_q; | 627 | struct workqueue_struct *work_q; |
| 628 | 628 | ||
| 629 | /* | 629 | /* |
diff --git a/include/scsi/scsi_transport_fc.h b/include/scsi/scsi_transport_fc.h index 06f72bab9df0..878373c32ef7 100644 --- a/include/scsi/scsi_transport_fc.h +++ b/include/scsi/scsi_transport_fc.h | |||
| @@ -489,9 +489,9 @@ struct fc_host_attrs { | |||
| 489 | u16 npiv_vports_inuse; | 489 | u16 npiv_vports_inuse; |
| 490 | 490 | ||
| 491 | /* work queues for rport state manipulation */ | 491 | /* work queues for rport state manipulation */ |
| 492 | char work_q_name[KOBJ_NAME_LEN]; | 492 | char work_q_name[20]; |
| 493 | struct workqueue_struct *work_q; | 493 | struct workqueue_struct *work_q; |
| 494 | char devloss_work_q_name[KOBJ_NAME_LEN]; | 494 | char devloss_work_q_name[20]; |
| 495 | struct workqueue_struct *devloss_work_q; | 495 | struct workqueue_struct *devloss_work_q; |
| 496 | }; | 496 | }; |
| 497 | 497 | ||
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index f5444e033cc9..8b6c91df4c7a 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
| @@ -198,7 +198,7 @@ struct iscsi_cls_host { | |||
| 198 | atomic_t nr_scans; | 198 | atomic_t nr_scans; |
| 199 | struct mutex mutex; | 199 | struct mutex mutex; |
| 200 | struct workqueue_struct *scan_workq; | 200 | struct workqueue_struct *scan_workq; |
| 201 | char scan_workq_name[KOBJ_NAME_LEN]; | 201 | char scan_workq_name[20]; |
| 202 | }; | 202 | }; |
| 203 | 203 | ||
| 204 | extern void iscsi_host_for_each_session(struct Scsi_Host *shost, | 204 | extern void iscsi_host_for_each_session(struct Scsi_Host *shost, |
