diff options
Diffstat (limited to 'include')
53 files changed, 772 insertions, 182 deletions
diff --git a/include/asm-generic/hardirq.h b/include/asm-generic/hardirq.h index 3d5d2c906ab3..23bb4dad4962 100644 --- a/include/asm-generic/hardirq.h +++ b/include/asm-generic/hardirq.h | |||
| @@ -11,19 +11,6 @@ typedef struct { | |||
| 11 | 11 | ||
| 12 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 12 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ |
| 13 | 13 | ||
| 14 | #ifndef HARDIRQ_BITS | ||
| 15 | #define HARDIRQ_BITS 8 | ||
| 16 | #endif | ||
| 17 | |||
| 18 | /* | ||
| 19 | * The hardirq mask has to be large enough to have | ||
| 20 | * space for potentially all IRQ sources in the system | ||
| 21 | * nesting on a single CPU: | ||
| 22 | */ | ||
| 23 | #if (1 << HARDIRQ_BITS) < NR_IRQS | ||
| 24 | # error HARDIRQ_BITS is too low! | ||
| 25 | #endif | ||
| 26 | |||
| 27 | #ifndef ack_bad_irq | 14 | #ifndef ack_bad_irq |
| 28 | static inline void ack_bad_irq(unsigned int irq) | 15 | static inline void ack_bad_irq(unsigned int irq) |
| 29 | { | 16 | { |
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index e410f602cab1..e2bd73e8f9c0 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
| @@ -129,6 +129,10 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addres | |||
| 129 | #define move_pte(pte, prot, old_addr, new_addr) (pte) | 129 | #define move_pte(pte, prot, old_addr, new_addr) (pte) |
| 130 | #endif | 130 | #endif |
| 131 | 131 | ||
| 132 | #ifndef pgprot_noncached | ||
| 133 | #define pgprot_noncached(prot) (prot) | ||
| 134 | #endif | ||
| 135 | |||
| 132 | #ifndef pgprot_writecombine | 136 | #ifndef pgprot_writecombine |
| 133 | #define pgprot_writecombine pgprot_noncached | 137 | #define pgprot_writecombine pgprot_noncached |
| 134 | #endif | 138 | #endif |
diff --git a/include/asm-generic/uaccess.h b/include/asm-generic/uaccess.h index 6d8cab22e294..b218b8513d04 100644 --- a/include/asm-generic/uaccess.h +++ b/include/asm-generic/uaccess.h | |||
| @@ -163,7 +163,7 @@ static inline __must_check long __copy_to_user(void __user *to, | |||
| 163 | #define put_user(x, ptr) \ | 163 | #define put_user(x, ptr) \ |
| 164 | ({ \ | 164 | ({ \ |
| 165 | might_sleep(); \ | 165 | might_sleep(); \ |
| 166 | __access_ok(ptr, sizeof (*ptr)) ? \ | 166 | access_ok(VERIFY_WRITE, ptr, sizeof(*ptr)) ? \ |
| 167 | __put_user(x, ptr) : \ | 167 | __put_user(x, ptr) : \ |
| 168 | -EFAULT; \ | 168 | -EFAULT; \ |
| 169 | }) | 169 | }) |
| @@ -219,7 +219,7 @@ extern int __put_user_bad(void) __attribute__((noreturn)); | |||
| 219 | #define get_user(x, ptr) \ | 219 | #define get_user(x, ptr) \ |
| 220 | ({ \ | 220 | ({ \ |
| 221 | might_sleep(); \ | 221 | might_sleep(); \ |
| 222 | __access_ok(ptr, sizeof (*ptr)) ? \ | 222 | access_ok(VERIFY_READ, ptr, sizeof(*ptr)) ? \ |
| 223 | __get_user(x, ptr) : \ | 223 | __get_user(x, ptr) : \ |
| 224 | -EFAULT; \ | 224 | -EFAULT; \ |
| 225 | }) | 225 | }) |
| @@ -244,7 +244,7 @@ static inline long copy_from_user(void *to, | |||
| 244 | const void __user * from, unsigned long n) | 244 | const void __user * from, unsigned long n) |
| 245 | { | 245 | { |
| 246 | might_sleep(); | 246 | might_sleep(); |
| 247 | if (__access_ok(from, n)) | 247 | if (access_ok(VERIFY_READ, from, n)) |
| 248 | return __copy_from_user(to, from, n); | 248 | return __copy_from_user(to, from, n); |
| 249 | else | 249 | else |
| 250 | return n; | 250 | return n; |
| @@ -254,7 +254,7 @@ static inline long copy_to_user(void __user *to, | |||
| 254 | const void *from, unsigned long n) | 254 | const void *from, unsigned long n) |
| 255 | { | 255 | { |
| 256 | might_sleep(); | 256 | might_sleep(); |
| 257 | if (__access_ok(to, n)) | 257 | if (access_ok(VERIFY_WRITE, to, n)) |
| 258 | return __copy_to_user(to, from, n); | 258 | return __copy_to_user(to, from, n); |
| 259 | else | 259 | else |
| 260 | return n; | 260 | return n; |
| @@ -278,7 +278,7 @@ __strncpy_from_user(char *dst, const char __user *src, long count) | |||
| 278 | static inline long | 278 | static inline long |
| 279 | strncpy_from_user(char *dst, const char __user *src, long count) | 279 | strncpy_from_user(char *dst, const char __user *src, long count) |
| 280 | { | 280 | { |
| 281 | if (!__access_ok(src, 1)) | 281 | if (!access_ok(VERIFY_READ, src, 1)) |
| 282 | return -EFAULT; | 282 | return -EFAULT; |
| 283 | return __strncpy_from_user(dst, src, count); | 283 | return __strncpy_from_user(dst, src, count); |
| 284 | } | 284 | } |
| @@ -291,6 +291,8 @@ strncpy_from_user(char *dst, const char __user *src, long count) | |||
| 291 | #ifndef strnlen_user | 291 | #ifndef strnlen_user |
| 292 | static inline long strnlen_user(const char __user *src, long n) | 292 | static inline long strnlen_user(const char __user *src, long n) |
| 293 | { | 293 | { |
| 294 | if (!access_ok(VERIFY_READ, src, 1)) | ||
| 295 | return 0; | ||
| 294 | return strlen((void * __force)src) + 1; | 296 | return strlen((void * __force)src) + 1; |
| 295 | } | 297 | } |
| 296 | #endif | 298 | #endif |
| @@ -316,7 +318,7 @@ static inline __must_check unsigned long | |||
| 316 | clear_user(void __user *to, unsigned long n) | 318 | clear_user(void __user *to, unsigned long n) |
| 317 | { | 319 | { |
| 318 | might_sleep(); | 320 | might_sleep(); |
| 319 | if (!__access_ok(to, n)) | 321 | if (!access_ok(VERIFY_WRITE, to, n)) |
| 320 | return n; | 322 | return n; |
| 321 | 323 | ||
| 322 | return __clear_user(to, n); | 324 | return __clear_user(to, n); |
diff --git a/include/asm-generic/unistd.h b/include/asm-generic/unistd.h index 5b34b6233d6d..1125e5a1ee5d 100644 --- a/include/asm-generic/unistd.h +++ b/include/asm-generic/unistd.h | |||
| @@ -618,8 +618,13 @@ __SYSCALL(__NR_migrate_pages, sys_migrate_pages) | |||
| 618 | __SYSCALL(__NR_move_pages, sys_move_pages) | 618 | __SYSCALL(__NR_move_pages, sys_move_pages) |
| 619 | #endif | 619 | #endif |
| 620 | 620 | ||
| 621 | #define __NR_rt_tgsigqueueinfo 240 | ||
| 622 | __SYSCALL(__NR_rt_tgsigqueueinfo, sys_rt_tgsigqueueinfo) | ||
| 623 | #define __NR_perf_counter_open 241 | ||
| 624 | __SYSCALL(__NR_perf_counter_open, sys_perf_counter_open) | ||
| 625 | |||
| 621 | #undef __NR_syscalls | 626 | #undef __NR_syscalls |
| 622 | #define __NR_syscalls 240 | 627 | #define __NR_syscalls 242 |
| 623 | 628 | ||
| 624 | /* | 629 | /* |
| 625 | * All syscalls below here should go away really, | 630 | * All syscalls below here should go away really, |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 55413e568f07..92b73b6140ff 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
| @@ -625,7 +625,7 @@ | |||
| 625 | *(.init.ramfs) \ | 625 | *(.init.ramfs) \ |
| 626 | VMLINUX_SYMBOL(__initramfs_end) = .; | 626 | VMLINUX_SYMBOL(__initramfs_end) = .; |
| 627 | #else | 627 | #else |
| 628 | #define INITRAMFS | 628 | #define INIT_RAM_FS |
| 629 | #endif | 629 | #endif |
| 630 | 630 | ||
| 631 | /** | 631 | /** |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 2643d848df90..4d668e05d458 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
| @@ -69,7 +69,6 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) | |||
| 69 | 69 | ||
| 70 | int cpu_up(unsigned int cpu); | 70 | int cpu_up(unsigned int cpu); |
| 71 | void notify_cpu_starting(unsigned int cpu); | 71 | void notify_cpu_starting(unsigned int cpu); |
| 72 | extern void cpu_hotplug_init(void); | ||
| 73 | extern void cpu_maps_update_begin(void); | 72 | extern void cpu_maps_update_begin(void); |
| 74 | extern void cpu_maps_update_done(void); | 73 | extern void cpu_maps_update_done(void); |
| 75 | 74 | ||
| @@ -84,10 +83,6 @@ static inline void unregister_cpu_notifier(struct notifier_block *nb) | |||
| 84 | { | 83 | { |
| 85 | } | 84 | } |
| 86 | 85 | ||
| 87 | static inline void cpu_hotplug_init(void) | ||
| 88 | { | ||
| 89 | } | ||
| 90 | |||
| 91 | static inline void cpu_maps_update_begin(void) | 86 | static inline void cpu_maps_update_begin(void) |
| 92 | { | 87 | { |
| 93 | } | 88 | } |
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h index 1a455f1f86d7..5619f8522738 100644 --- a/include/linux/dma_remapping.h +++ b/include/linux/dma_remapping.h | |||
| @@ -13,6 +13,10 @@ | |||
| 13 | #define DMA_PTE_WRITE (2) | 13 | #define DMA_PTE_WRITE (2) |
| 14 | #define DMA_PTE_SNP (1 << 11) | 14 | #define DMA_PTE_SNP (1 << 11) |
| 15 | 15 | ||
| 16 | #define CONTEXT_TT_MULTI_LEVEL 0 | ||
| 17 | #define CONTEXT_TT_DEV_IOTLB 1 | ||
| 18 | #define CONTEXT_TT_PASS_THROUGH 2 | ||
| 19 | |||
| 16 | struct intel_iommu; | 20 | struct intel_iommu; |
| 17 | struct dmar_domain; | 21 | struct dmar_domain; |
| 18 | struct root_entry; | 22 | struct root_entry; |
| @@ -21,11 +25,16 @@ extern void free_dmar_iommu(struct intel_iommu *iommu); | |||
| 21 | 25 | ||
| 22 | #ifdef CONFIG_DMAR | 26 | #ifdef CONFIG_DMAR |
| 23 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); | 27 | extern int iommu_calculate_agaw(struct intel_iommu *iommu); |
| 28 | extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu); | ||
| 24 | #else | 29 | #else |
| 25 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) | 30 | static inline int iommu_calculate_agaw(struct intel_iommu *iommu) |
| 26 | { | 31 | { |
| 27 | return 0; | 32 | return 0; |
| 28 | } | 33 | } |
| 34 | static inline int iommu_calculate_max_sagaw(struct intel_iommu *iommu) | ||
| 35 | { | ||
| 36 | return 0; | ||
| 37 | } | ||
| 29 | #endif | 38 | #endif |
| 30 | 39 | ||
| 31 | extern int dmar_disabled; | 40 | extern int dmar_disabled; |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index 10ff5c498824..1731fb5fd775 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
| @@ -188,6 +188,15 @@ struct dmar_rmrr_unit { | |||
| 188 | 188 | ||
| 189 | #define for_each_rmrr_units(rmrr) \ | 189 | #define for_each_rmrr_units(rmrr) \ |
| 190 | list_for_each_entry(rmrr, &dmar_rmrr_units, list) | 190 | list_for_each_entry(rmrr, &dmar_rmrr_units, list) |
| 191 | |||
| 192 | struct dmar_atsr_unit { | ||
| 193 | struct list_head list; /* list of ATSR units */ | ||
| 194 | struct acpi_dmar_header *hdr; /* ACPI header */ | ||
| 195 | struct pci_dev **devices; /* target devices */ | ||
| 196 | int devices_cnt; /* target device count */ | ||
| 197 | u8 include_all:1; /* include all ports */ | ||
| 198 | }; | ||
| 199 | |||
| 191 | /* Intel DMAR initialization functions */ | 200 | /* Intel DMAR initialization functions */ |
| 192 | extern int intel_iommu_init(void); | 201 | extern int intel_iommu_init(void); |
| 193 | #else | 202 | #else |
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index e584b7215e8b..9823946adbc5 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include <linux/completion.h> | 4 | #include <linux/completion.h> |
| 5 | #include <linux/device.h> | 5 | #include <linux/device.h> |
| 6 | #include <linux/dma-mapping.h> | ||
| 6 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
| 7 | #include <linux/kref.h> | 8 | #include <linux/kref.h> |
| 8 | #include <linux/list.h> | 9 | #include <linux/list.h> |
| @@ -355,4 +356,90 @@ int fw_run_transaction(struct fw_card *card, int tcode, int destination_id, | |||
| 355 | int generation, int speed, unsigned long long offset, | 356 | int generation, int speed, unsigned long long offset, |
| 356 | void *payload, size_t length); | 357 | void *payload, size_t length); |
| 357 | 358 | ||
| 359 | static inline int fw_stream_packet_destination_id(int tag, int channel, int sy) | ||
| 360 | { | ||
| 361 | return tag << 14 | channel << 8 | sy; | ||
| 362 | } | ||
| 363 | |||
| 364 | struct fw_descriptor { | ||
| 365 | struct list_head link; | ||
| 366 | size_t length; | ||
| 367 | u32 immediate; | ||
| 368 | u32 key; | ||
| 369 | const u32 *data; | ||
| 370 | }; | ||
| 371 | |||
| 372 | int fw_core_add_descriptor(struct fw_descriptor *desc); | ||
| 373 | void fw_core_remove_descriptor(struct fw_descriptor *desc); | ||
| 374 | |||
| 375 | /* | ||
| 376 | * The iso packet format allows for an immediate header/payload part | ||
| 377 | * stored in 'header' immediately after the packet info plus an | ||
| 378 | * indirect payload part that is pointer to by the 'payload' field. | ||
| 379 | * Applications can use one or the other or both to implement simple | ||
| 380 | * low-bandwidth streaming (e.g. audio) or more advanced | ||
| 381 | * scatter-gather streaming (e.g. assembling video frame automatically). | ||
| 382 | */ | ||
| 383 | struct fw_iso_packet { | ||
| 384 | u16 payload_length; /* Length of indirect payload. */ | ||
| 385 | u32 interrupt:1; /* Generate interrupt on this packet */ | ||
| 386 | u32 skip:1; /* Set to not send packet at all. */ | ||
| 387 | u32 tag:2; | ||
| 388 | u32 sy:4; | ||
| 389 | u32 header_length:8; /* Length of immediate header. */ | ||
| 390 | u32 header[0]; | ||
| 391 | }; | ||
| 392 | |||
| 393 | #define FW_ISO_CONTEXT_TRANSMIT 0 | ||
| 394 | #define FW_ISO_CONTEXT_RECEIVE 1 | ||
| 395 | |||
| 396 | #define FW_ISO_CONTEXT_MATCH_TAG0 1 | ||
| 397 | #define FW_ISO_CONTEXT_MATCH_TAG1 2 | ||
| 398 | #define FW_ISO_CONTEXT_MATCH_TAG2 4 | ||
| 399 | #define FW_ISO_CONTEXT_MATCH_TAG3 8 | ||
| 400 | #define FW_ISO_CONTEXT_MATCH_ALL_TAGS 15 | ||
| 401 | |||
| 402 | /* | ||
| 403 | * An iso buffer is just a set of pages mapped for DMA in the | ||
| 404 | * specified direction. Since the pages are to be used for DMA, they | ||
| 405 | * are not mapped into the kernel virtual address space. We store the | ||
| 406 | * DMA address in the page private. The helper function | ||
| 407 | * fw_iso_buffer_map() will map the pages into a given vma. | ||
| 408 | */ | ||
| 409 | struct fw_iso_buffer { | ||
| 410 | enum dma_data_direction direction; | ||
| 411 | struct page **pages; | ||
| 412 | int page_count; | ||
| 413 | }; | ||
| 414 | |||
| 415 | int fw_iso_buffer_init(struct fw_iso_buffer *buffer, struct fw_card *card, | ||
| 416 | int page_count, enum dma_data_direction direction); | ||
| 417 | void fw_iso_buffer_destroy(struct fw_iso_buffer *buffer, struct fw_card *card); | ||
| 418 | |||
| 419 | struct fw_iso_context; | ||
| 420 | typedef void (*fw_iso_callback_t)(struct fw_iso_context *context, | ||
| 421 | u32 cycle, size_t header_length, | ||
| 422 | void *header, void *data); | ||
| 423 | struct fw_iso_context { | ||
| 424 | struct fw_card *card; | ||
| 425 | int type; | ||
| 426 | int channel; | ||
| 427 | int speed; | ||
| 428 | size_t header_size; | ||
| 429 | fw_iso_callback_t callback; | ||
| 430 | void *callback_data; | ||
| 431 | }; | ||
| 432 | |||
| 433 | struct fw_iso_context *fw_iso_context_create(struct fw_card *card, | ||
| 434 | int type, int channel, int speed, size_t header_size, | ||
| 435 | fw_iso_callback_t callback, void *callback_data); | ||
| 436 | int fw_iso_context_queue(struct fw_iso_context *ctx, | ||
| 437 | struct fw_iso_packet *packet, | ||
| 438 | struct fw_iso_buffer *buffer, | ||
| 439 | unsigned long payload); | ||
| 440 | int fw_iso_context_start(struct fw_iso_context *ctx, | ||
| 441 | int cycle, int sync, int tags); | ||
| 442 | int fw_iso_context_stop(struct fw_iso_context *ctx); | ||
| 443 | void fw_iso_context_destroy(struct fw_iso_context *ctx); | ||
| 444 | |||
| 358 | #endif /* _LINUX_FIREWIRE_H */ | 445 | #endif /* _LINUX_FIREWIRE_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 74a57938c880..1ff5e4e01952 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -1107,6 +1107,7 @@ extern void locks_copy_lock(struct file_lock *, struct file_lock *); | |||
| 1107 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); | 1107 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); |
| 1108 | extern void locks_remove_posix(struct file *, fl_owner_t); | 1108 | extern void locks_remove_posix(struct file *, fl_owner_t); |
| 1109 | extern void locks_remove_flock(struct file *); | 1109 | extern void locks_remove_flock(struct file *); |
| 1110 | extern void locks_release_private(struct file_lock *); | ||
| 1110 | extern void posix_test_lock(struct file *, struct file_lock *); | 1111 | extern void posix_test_lock(struct file *, struct file_lock *); |
| 1111 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); | 1112 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); |
| 1112 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 1113 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index a05a5ef33391..2723513a5651 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -33,7 +33,7 @@ void hugetlb_report_meminfo(struct seq_file *); | |||
| 33 | int hugetlb_report_node_meminfo(int, char *); | 33 | int hugetlb_report_node_meminfo(int, char *); |
| 34 | unsigned long hugetlb_total_pages(void); | 34 | unsigned long hugetlb_total_pages(void); |
| 35 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 35 | int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
| 36 | unsigned long address, int write_access); | 36 | unsigned long address, unsigned int flags); |
| 37 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, | 37 | int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
| 38 | struct vm_area_struct *vma, | 38 | struct vm_area_struct *vma, |
| 39 | int acctflags); | 39 | int acctflags); |
| @@ -98,7 +98,7 @@ static inline void hugetlb_report_meminfo(struct seq_file *m) | |||
| 98 | #define pud_huge(x) 0 | 98 | #define pud_huge(x) 0 |
| 99 | #define is_hugepage_only_range(mm, addr, len) 0 | 99 | #define is_hugepage_only_range(mm, addr, len) 0 |
| 100 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) | 100 | #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
| 101 | #define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; }) | 101 | #define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) |
| 102 | 102 | ||
| 103 | #define hugetlb_change_protection(vma, address, end, newprot) | 103 | #define hugetlb_change_protection(vma, address, end, newprot) |
| 104 | 104 | ||
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index aa8c53171233..482dc91fd53a 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #define DMAR_PHMLIMIT_REG 0x78 /* pmrr high limit */ | 53 | #define DMAR_PHMLIMIT_REG 0x78 /* pmrr high limit */ |
| 54 | #define DMAR_IQH_REG 0x80 /* Invalidation queue head register */ | 54 | #define DMAR_IQH_REG 0x80 /* Invalidation queue head register */ |
| 55 | #define DMAR_IQT_REG 0x88 /* Invalidation queue tail register */ | 55 | #define DMAR_IQT_REG 0x88 /* Invalidation queue tail register */ |
| 56 | #define DMAR_IQ_SHIFT 4 /* Invalidation queue head/tail shift */ | ||
| 56 | #define DMAR_IQA_REG 0x90 /* Invalidation queue addr register */ | 57 | #define DMAR_IQA_REG 0x90 /* Invalidation queue addr register */ |
| 57 | #define DMAR_ICS_REG 0x98 /* Invalidation complete status register */ | 58 | #define DMAR_ICS_REG 0x98 /* Invalidation complete status register */ |
| 58 | #define DMAR_IRTA_REG 0xb8 /* Interrupt remapping table addr register */ | 59 | #define DMAR_IRTA_REG 0xb8 /* Interrupt remapping table addr register */ |
| @@ -120,8 +121,10 @@ static inline void dmar_writeq(void __iomem *addr, u64 val) | |||
| 120 | (ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16) | 121 | (ecap_iotlb_offset(e) + ecap_niotlb_iunits(e) * 16) |
| 121 | #define ecap_coherent(e) ((e) & 0x1) | 122 | #define ecap_coherent(e) ((e) & 0x1) |
| 122 | #define ecap_qis(e) ((e) & 0x2) | 123 | #define ecap_qis(e) ((e) & 0x2) |
| 124 | #define ecap_pass_through(e) ((e >> 6) & 0x1) | ||
| 123 | #define ecap_eim_support(e) ((e >> 4) & 0x1) | 125 | #define ecap_eim_support(e) ((e >> 4) & 0x1) |
| 124 | #define ecap_ir_support(e) ((e >> 3) & 0x1) | 126 | #define ecap_ir_support(e) ((e >> 3) & 0x1) |
| 127 | #define ecap_dev_iotlb_support(e) (((e) >> 2) & 0x1) | ||
| 125 | #define ecap_max_handle_mask(e) ((e >> 20) & 0xf) | 128 | #define ecap_max_handle_mask(e) ((e >> 20) & 0xf) |
| 126 | #define ecap_sc_support(e) ((e >> 7) & 0x1) /* Snooping Control */ | 129 | #define ecap_sc_support(e) ((e >> 7) & 0x1) /* Snooping Control */ |
| 127 | 130 | ||
| @@ -197,6 +200,8 @@ static inline void dmar_writeq(void __iomem *addr, u64 val) | |||
| 197 | #define DMA_FSTS_PPF ((u32)2) | 200 | #define DMA_FSTS_PPF ((u32)2) |
| 198 | #define DMA_FSTS_PFO ((u32)1) | 201 | #define DMA_FSTS_PFO ((u32)1) |
| 199 | #define DMA_FSTS_IQE (1 << 4) | 202 | #define DMA_FSTS_IQE (1 << 4) |
| 203 | #define DMA_FSTS_ICE (1 << 5) | ||
| 204 | #define DMA_FSTS_ITE (1 << 6) | ||
| 200 | #define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff) | 205 | #define dma_fsts_fault_record_index(s) (((s) >> 8) & 0xff) |
| 201 | 206 | ||
| 202 | /* FRCD_REG, 32 bits access */ | 207 | /* FRCD_REG, 32 bits access */ |
| @@ -225,7 +230,8 @@ do { \ | |||
| 225 | enum { | 230 | enum { |
| 226 | QI_FREE, | 231 | QI_FREE, |
| 227 | QI_IN_USE, | 232 | QI_IN_USE, |
| 228 | QI_DONE | 233 | QI_DONE, |
| 234 | QI_ABORT | ||
| 229 | }; | 235 | }; |
| 230 | 236 | ||
| 231 | #define QI_CC_TYPE 0x1 | 237 | #define QI_CC_TYPE 0x1 |
| @@ -254,6 +260,12 @@ enum { | |||
| 254 | #define QI_CC_DID(did) (((u64)did) << 16) | 260 | #define QI_CC_DID(did) (((u64)did) << 16) |
| 255 | #define QI_CC_GRAN(gran) (((u64)gran) >> (DMA_CCMD_INVL_GRANU_OFFSET-4)) | 261 | #define QI_CC_GRAN(gran) (((u64)gran) >> (DMA_CCMD_INVL_GRANU_OFFSET-4)) |
| 256 | 262 | ||
| 263 | #define QI_DEV_IOTLB_SID(sid) ((u64)((sid) & 0xffff) << 32) | ||
| 264 | #define QI_DEV_IOTLB_QDEP(qdep) (((qdep) & 0x1f) << 16) | ||
| 265 | #define QI_DEV_IOTLB_ADDR(addr) ((u64)(addr) & VTD_PAGE_MASK) | ||
| 266 | #define QI_DEV_IOTLB_SIZE 1 | ||
| 267 | #define QI_DEV_IOTLB_MAX_INVS 32 | ||
| 268 | |||
| 257 | struct qi_desc { | 269 | struct qi_desc { |
| 258 | u64 low, high; | 270 | u64 low, high; |
| 259 | }; | 271 | }; |
| @@ -280,10 +292,10 @@ struct ir_table { | |||
| 280 | #endif | 292 | #endif |
| 281 | 293 | ||
| 282 | struct iommu_flush { | 294 | struct iommu_flush { |
| 283 | int (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid, u8 fm, | 295 | void (*flush_context)(struct intel_iommu *iommu, u16 did, u16 sid, |
| 284 | u64 type, int non_present_entry_flush); | 296 | u8 fm, u64 type); |
| 285 | int (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr, | 297 | void (*flush_iotlb)(struct intel_iommu *iommu, u16 did, u64 addr, |
| 286 | unsigned int size_order, u64 type, int non_present_entry_flush); | 298 | unsigned int size_order, u64 type); |
| 287 | }; | 299 | }; |
| 288 | 300 | ||
| 289 | enum { | 301 | enum { |
| @@ -302,6 +314,7 @@ struct intel_iommu { | |||
| 302 | spinlock_t register_lock; /* protect register handling */ | 314 | spinlock_t register_lock; /* protect register handling */ |
| 303 | int seq_id; /* sequence id of the iommu */ | 315 | int seq_id; /* sequence id of the iommu */ |
| 304 | int agaw; /* agaw of this iommu */ | 316 | int agaw; /* agaw of this iommu */ |
| 317 | int msagaw; /* max sagaw of this iommu */ | ||
| 305 | unsigned int irq; | 318 | unsigned int irq; |
| 306 | unsigned char name[13]; /* Device Name */ | 319 | unsigned char name[13]; /* Device Name */ |
| 307 | 320 | ||
| @@ -329,6 +342,7 @@ static inline void __iommu_flush_cache( | |||
| 329 | } | 342 | } |
| 330 | 343 | ||
| 331 | extern struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev *dev); | 344 | extern struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev *dev); |
| 345 | extern int dmar_find_matched_atsr_unit(struct pci_dev *dev); | ||
| 332 | 346 | ||
| 333 | extern int alloc_iommu(struct dmar_drhd_unit *drhd); | 347 | extern int alloc_iommu(struct dmar_drhd_unit *drhd); |
| 334 | extern void free_iommu(struct intel_iommu *iommu); | 348 | extern void free_iommu(struct intel_iommu *iommu); |
| @@ -337,11 +351,12 @@ extern void dmar_disable_qi(struct intel_iommu *iommu); | |||
| 337 | extern int dmar_reenable_qi(struct intel_iommu *iommu); | 351 | extern int dmar_reenable_qi(struct intel_iommu *iommu); |
| 338 | extern void qi_global_iec(struct intel_iommu *iommu); | 352 | extern void qi_global_iec(struct intel_iommu *iommu); |
| 339 | 353 | ||
| 340 | extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, | 354 | extern void qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, |
| 341 | u8 fm, u64 type, int non_present_entry_flush); | 355 | u8 fm, u64 type); |
| 342 | extern int qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, | 356 | extern void qi_flush_iotlb(struct intel_iommu *iommu, u16 did, u64 addr, |
| 343 | unsigned int size_order, u64 type, | 357 | unsigned int size_order, u64 type); |
| 344 | int non_present_entry_flush); | 358 | extern void qi_flush_dev_iotlb(struct intel_iommu *iommu, u16 sid, u16 qdep, |
| 359 | u64 addr, unsigned mask); | ||
| 345 | 360 | ||
| 346 | extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); | 361 | extern int qi_submit_sync(struct qi_desc *desc, struct intel_iommu *iommu); |
| 347 | 362 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 32e4b2f72294..786e7b8cece9 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
| @@ -49,6 +49,8 @@ struct resource_list { | |||
| 49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ | 49 | #define IORESOURCE_SIZEALIGN 0x00020000 /* size indicates alignment */ |
| 50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ | 50 | #define IORESOURCE_STARTALIGN 0x00040000 /* start field is alignment */ |
| 51 | 51 | ||
| 52 | #define IORESOURCE_MEM_64 0x00100000 | ||
| 53 | |||
| 52 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ | 54 | #define IORESOURCE_EXCLUSIVE 0x08000000 /* Userland may not map this resource */ |
| 53 | #define IORESOURCE_DISABLED 0x10000000 | 55 | #define IORESOURCE_DISABLED 0x10000000 |
| 54 | #define IORESOURCE_UNSET 0x20000000 | 56 | #define IORESOURCE_UNSET 0x20000000 |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 51855dfd8adb..c325b187966b 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
| @@ -195,7 +195,7 @@ extern struct svc_procedure nlmsvc_procedures4[]; | |||
| 195 | extern int nlmsvc_grace_period; | 195 | extern int nlmsvc_grace_period; |
| 196 | extern unsigned long nlmsvc_timeout; | 196 | extern unsigned long nlmsvc_timeout; |
| 197 | extern int nsm_use_hostnames; | 197 | extern int nsm_use_hostnames; |
| 198 | extern int nsm_local_state; | 198 | extern u32 nsm_local_state; |
| 199 | 199 | ||
| 200 | /* | 200 | /* |
| 201 | * Lockd client functions | 201 | * Lockd client functions |
diff --git a/include/linux/mm.h b/include/linux/mm.h index cf260d848eb9..d006e93d5c93 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
| @@ -810,11 +810,11 @@ extern int vmtruncate_range(struct inode * inode, loff_t offset, loff_t end); | |||
| 810 | 810 | ||
| 811 | #ifdef CONFIG_MMU | 811 | #ifdef CONFIG_MMU |
| 812 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | 812 | extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
| 813 | unsigned long address, int write_access); | 813 | unsigned long address, unsigned int flags); |
| 814 | #else | 814 | #else |
| 815 | static inline int handle_mm_fault(struct mm_struct *mm, | 815 | static inline int handle_mm_fault(struct mm_struct *mm, |
| 816 | struct vm_area_struct *vma, unsigned long address, | 816 | struct vm_area_struct *vma, unsigned long address, |
| 817 | int write_access) | 817 | unsigned int flags) |
| 818 | { | 818 | { |
| 819 | /* should never happen if there's no MMU */ | 819 | /* should never happen if there's no MMU */ |
| 820 | BUG(); | 820 | BUG(); |
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h index 3a059298cc19..3beb2592b03f 100644 --- a/include/linux/mnt_namespace.h +++ b/include/linux/mnt_namespace.h | |||
| @@ -24,16 +24,10 @@ struct proc_mounts { | |||
| 24 | 24 | ||
| 25 | struct fs_struct; | 25 | struct fs_struct; |
| 26 | 26 | ||
| 27 | extern struct mnt_namespace *create_mnt_ns(struct vfsmount *mnt); | ||
| 27 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, | 28 | extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *, |
| 28 | struct fs_struct *); | 29 | struct fs_struct *); |
| 29 | extern void __put_mnt_ns(struct mnt_namespace *ns); | 30 | extern void put_mnt_ns(struct mnt_namespace *ns); |
| 30 | |||
| 31 | static inline void put_mnt_ns(struct mnt_namespace *ns) | ||
| 32 | { | ||
| 33 | if (atomic_dec_and_lock(&ns->count, &vfsmount_lock)) | ||
| 34 | /* releases vfsmount_lock */ | ||
| 35 | __put_mnt_ns(ns); | ||
| 36 | } | ||
| 37 | 31 | ||
| 38 | static inline void exit_mnt_ns(struct task_struct *p) | 32 | static inline void exit_mnt_ns(struct task_struct *p) |
| 39 | { | 33 | { |
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 7efb9be34662..4030ebada49e 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
| @@ -563,6 +563,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, | |||
| 563 | * @options: Option flags, e.g. 16bit buswidth | 563 | * @options: Option flags, e.g. 16bit buswidth |
| 564 | * @ecclayout: ecc layout info structure | 564 | * @ecclayout: ecc layout info structure |
| 565 | * @part_probe_types: NULL-terminated array of probe types | 565 | * @part_probe_types: NULL-terminated array of probe types |
| 566 | * @set_parts: platform specific function to set partitions | ||
| 566 | * @priv: hardware controller specific settings | 567 | * @priv: hardware controller specific settings |
| 567 | */ | 568 | */ |
| 568 | struct platform_nand_chip { | 569 | struct platform_nand_chip { |
| @@ -574,26 +575,41 @@ struct platform_nand_chip { | |||
| 574 | int chip_delay; | 575 | int chip_delay; |
| 575 | unsigned int options; | 576 | unsigned int options; |
| 576 | const char **part_probe_types; | 577 | const char **part_probe_types; |
| 578 | void (*set_parts)(uint64_t size, | ||
| 579 | struct platform_nand_chip *chip); | ||
| 577 | void *priv; | 580 | void *priv; |
| 578 | }; | 581 | }; |
| 579 | 582 | ||
| 583 | /* Keep gcc happy */ | ||
| 584 | struct platform_device; | ||
| 585 | |||
| 580 | /** | 586 | /** |
| 581 | * struct platform_nand_ctrl - controller level device structure | 587 | * struct platform_nand_ctrl - controller level device structure |
| 588 | * @probe: platform specific function to probe/setup hardware | ||
| 589 | * @remove: platform specific function to remove/teardown hardware | ||
| 582 | * @hwcontrol: platform specific hardware control structure | 590 | * @hwcontrol: platform specific hardware control structure |
| 583 | * @dev_ready: platform specific function to read ready/busy pin | 591 | * @dev_ready: platform specific function to read ready/busy pin |
| 584 | * @select_chip: platform specific chip select function | 592 | * @select_chip: platform specific chip select function |
| 585 | * @cmd_ctrl: platform specific function for controlling | 593 | * @cmd_ctrl: platform specific function for controlling |
| 586 | * ALE/CLE/nCE. Also used to write command and address | 594 | * ALE/CLE/nCE. Also used to write command and address |
| 595 | * @write_buf: platform specific function for write buffer | ||
| 596 | * @read_buf: platform specific function for read buffer | ||
| 587 | * @priv: private data to transport driver specific settings | 597 | * @priv: private data to transport driver specific settings |
| 588 | * | 598 | * |
| 589 | * All fields are optional and depend on the hardware driver requirements | 599 | * All fields are optional and depend on the hardware driver requirements |
| 590 | */ | 600 | */ |
| 591 | struct platform_nand_ctrl { | 601 | struct platform_nand_ctrl { |
| 602 | int (*probe)(struct platform_device *pdev); | ||
| 603 | void (*remove)(struct platform_device *pdev); | ||
| 592 | void (*hwcontrol)(struct mtd_info *mtd, int cmd); | 604 | void (*hwcontrol)(struct mtd_info *mtd, int cmd); |
| 593 | int (*dev_ready)(struct mtd_info *mtd); | 605 | int (*dev_ready)(struct mtd_info *mtd); |
| 594 | void (*select_chip)(struct mtd_info *mtd, int chip); | 606 | void (*select_chip)(struct mtd_info *mtd, int chip); |
| 595 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, | 607 | void (*cmd_ctrl)(struct mtd_info *mtd, int dat, |
| 596 | unsigned int ctrl); | 608 | unsigned int ctrl); |
| 609 | void (*write_buf)(struct mtd_info *mtd, | ||
| 610 | const uint8_t *buf, int len); | ||
| 611 | void (*read_buf)(struct mtd_info *mtd, | ||
| 612 | uint8_t *buf, int len); | ||
| 597 | void *priv; | 613 | void *priv; |
| 598 | }; | 614 | }; |
| 599 | 615 | ||
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 9aa2a9149b58..8ed873374381 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/mtd/onenand_regs.h> | 17 | #include <linux/mtd/onenand_regs.h> |
| 18 | #include <linux/mtd/bbm.h> | 18 | #include <linux/mtd/bbm.h> |
| 19 | 19 | ||
| 20 | #define MAX_DIES 2 | ||
| 20 | #define MAX_BUFFERRAM 2 | 21 | #define MAX_BUFFERRAM 2 |
| 21 | 22 | ||
| 22 | /* Scan and identify a OneNAND device */ | 23 | /* Scan and identify a OneNAND device */ |
| @@ -51,7 +52,12 @@ struct onenand_bufferram { | |||
| 51 | /** | 52 | /** |
| 52 | * struct onenand_chip - OneNAND Private Flash Chip Data | 53 | * struct onenand_chip - OneNAND Private Flash Chip Data |
| 53 | * @base: [BOARDSPECIFIC] address to access OneNAND | 54 | * @base: [BOARDSPECIFIC] address to access OneNAND |
| 55 | * @dies: [INTERN][FLEX-ONENAND] number of dies on chip | ||
| 56 | * @boundary: [INTERN][FLEX-ONENAND] Boundary of the dies | ||
| 57 | * @diesize: [INTERN][FLEX-ONENAND] Size of the dies | ||
| 54 | * @chipsize: [INTERN] the size of one chip for multichip arrays | 58 | * @chipsize: [INTERN] the size of one chip for multichip arrays |
| 59 | * FIXME For Flex-OneNAND, chipsize holds maximum possible | ||
| 60 | * device size ie when all blocks are considered MLC | ||
| 55 | * @device_id: [INTERN] device ID | 61 | * @device_id: [INTERN] device ID |
| 56 | * @density_mask: chip density, used for DDP devices | 62 | * @density_mask: chip density, used for DDP devices |
| 57 | * @verstion_id: [INTERN] version ID | 63 | * @verstion_id: [INTERN] version ID |
| @@ -68,6 +74,8 @@ struct onenand_bufferram { | |||
| 68 | * @command: [REPLACEABLE] hardware specific function for writing | 74 | * @command: [REPLACEABLE] hardware specific function for writing |
| 69 | * commands to the chip | 75 | * commands to the chip |
| 70 | * @wait: [REPLACEABLE] hardware specific function for wait on ready | 76 | * @wait: [REPLACEABLE] hardware specific function for wait on ready |
| 77 | * @bbt_wait: [REPLACEABLE] hardware specific function for bbt wait on ready | ||
| 78 | * @unlock_all: [REPLACEABLE] hardware specific function for unlock all | ||
| 71 | * @read_bufferram: [REPLACEABLE] hardware specific function for BufferRAM Area | 79 | * @read_bufferram: [REPLACEABLE] hardware specific function for BufferRAM Area |
| 72 | * @write_bufferram: [REPLACEABLE] hardware specific function for BufferRAM Area | 80 | * @write_bufferram: [REPLACEABLE] hardware specific function for BufferRAM Area |
| 73 | * @read_word: [REPLACEABLE] hardware specific function for read | 81 | * @read_word: [REPLACEABLE] hardware specific function for read |
| @@ -92,9 +100,13 @@ struct onenand_bufferram { | |||
| 92 | */ | 100 | */ |
| 93 | struct onenand_chip { | 101 | struct onenand_chip { |
| 94 | void __iomem *base; | 102 | void __iomem *base; |
| 103 | unsigned dies; | ||
| 104 | unsigned boundary[MAX_DIES]; | ||
| 105 | loff_t diesize[MAX_DIES]; | ||
| 95 | unsigned int chipsize; | 106 | unsigned int chipsize; |
| 96 | unsigned int device_id; | 107 | unsigned int device_id; |
| 97 | unsigned int version_id; | 108 | unsigned int version_id; |
| 109 | unsigned int technology; | ||
| 98 | unsigned int density_mask; | 110 | unsigned int density_mask; |
| 99 | unsigned int options; | 111 | unsigned int options; |
| 100 | 112 | ||
| @@ -108,6 +120,8 @@ struct onenand_chip { | |||
| 108 | 120 | ||
| 109 | int (*command)(struct mtd_info *mtd, int cmd, loff_t address, size_t len); | 121 | int (*command)(struct mtd_info *mtd, int cmd, loff_t address, size_t len); |
| 110 | int (*wait)(struct mtd_info *mtd, int state); | 122 | int (*wait)(struct mtd_info *mtd, int state); |
| 123 | int (*bbt_wait)(struct mtd_info *mtd, int state); | ||
| 124 | void (*unlock_all)(struct mtd_info *mtd); | ||
| 111 | int (*read_bufferram)(struct mtd_info *mtd, int area, | 125 | int (*read_bufferram)(struct mtd_info *mtd, int area, |
| 112 | unsigned char *buffer, int offset, size_t count); | 126 | unsigned char *buffer, int offset, size_t count); |
| 113 | int (*write_bufferram)(struct mtd_info *mtd, int area, | 127 | int (*write_bufferram)(struct mtd_info *mtd, int area, |
| @@ -145,6 +159,8 @@ struct onenand_chip { | |||
| 145 | #define ONENAND_SET_BUFFERRAM0(this) (this->bufferram_index = 0) | 159 | #define ONENAND_SET_BUFFERRAM0(this) (this->bufferram_index = 0) |
| 146 | #define ONENAND_SET_BUFFERRAM1(this) (this->bufferram_index = 1) | 160 | #define ONENAND_SET_BUFFERRAM1(this) (this->bufferram_index = 1) |
| 147 | 161 | ||
| 162 | #define FLEXONENAND(this) \ | ||
| 163 | (this->device_id & DEVICE_IS_FLEXONENAND) | ||
| 148 | #define ONENAND_GET_SYS_CFG1(this) \ | 164 | #define ONENAND_GET_SYS_CFG1(this) \ |
| 149 | (this->read_word(this->base + ONENAND_REG_SYS_CFG1)) | 165 | (this->read_word(this->base + ONENAND_REG_SYS_CFG1)) |
| 150 | #define ONENAND_SET_SYS_CFG1(v, this) \ | 166 | #define ONENAND_SET_SYS_CFG1(v, this) \ |
| @@ -153,6 +169,9 @@ struct onenand_chip { | |||
| 153 | #define ONENAND_IS_DDP(this) \ | 169 | #define ONENAND_IS_DDP(this) \ |
| 154 | (this->device_id & ONENAND_DEVICE_IS_DDP) | 170 | (this->device_id & ONENAND_DEVICE_IS_DDP) |
| 155 | 171 | ||
| 172 | #define ONENAND_IS_MLC(this) \ | ||
| 173 | (this->technology & ONENAND_TECHNOLOGY_IS_MLC) | ||
| 174 | |||
| 156 | #ifdef CONFIG_MTD_ONENAND_2X_PROGRAM | 175 | #ifdef CONFIG_MTD_ONENAND_2X_PROGRAM |
| 157 | #define ONENAND_IS_2PLANE(this) \ | 176 | #define ONENAND_IS_2PLANE(this) \ |
| 158 | (this->options & ONENAND_HAS_2PLANE) | 177 | (this->options & ONENAND_HAS_2PLANE) |
| @@ -169,6 +188,7 @@ struct onenand_chip { | |||
| 169 | #define ONENAND_HAS_CONT_LOCK (0x0001) | 188 | #define ONENAND_HAS_CONT_LOCK (0x0001) |
| 170 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) | 189 | #define ONENAND_HAS_UNLOCK_ALL (0x0002) |
| 171 | #define ONENAND_HAS_2PLANE (0x0004) | 190 | #define ONENAND_HAS_2PLANE (0x0004) |
| 191 | #define ONENAND_SKIP_UNLOCK_CHECK (0x0100) | ||
| 172 | #define ONENAND_PAGEBUF_ALLOC (0x1000) | 192 | #define ONENAND_PAGEBUF_ALLOC (0x1000) |
| 173 | #define ONENAND_OOBBUF_ALLOC (0x2000) | 193 | #define ONENAND_OOBBUF_ALLOC (0x2000) |
| 174 | 194 | ||
| @@ -176,6 +196,7 @@ struct onenand_chip { | |||
| 176 | * OneNAND Flash Manufacturer ID Codes | 196 | * OneNAND Flash Manufacturer ID Codes |
| 177 | */ | 197 | */ |
| 178 | #define ONENAND_MFR_SAMSUNG 0xec | 198 | #define ONENAND_MFR_SAMSUNG 0xec |
| 199 | #define ONENAND_MFR_NUMONYX 0x20 | ||
| 179 | 200 | ||
| 180 | /** | 201 | /** |
| 181 | * struct onenand_manufacturers - NAND Flash Manufacturer ID Structure | 202 | * struct onenand_manufacturers - NAND Flash Manufacturer ID Structure |
| @@ -189,5 +210,8 @@ struct onenand_manufacturers { | |||
| 189 | 210 | ||
| 190 | int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, | 211 | int onenand_bbt_read_oob(struct mtd_info *mtd, loff_t from, |
| 191 | struct mtd_oob_ops *ops); | 212 | struct mtd_oob_ops *ops); |
| 213 | unsigned onenand_block(struct onenand_chip *this, loff_t addr); | ||
| 214 | loff_t onenand_addr(struct onenand_chip *this, int block); | ||
| 215 | int flexonenand_region(struct mtd_info *mtd, loff_t addr); | ||
| 192 | 216 | ||
| 193 | #endif /* __LINUX_MTD_ONENAND_H */ | 217 | #endif /* __LINUX_MTD_ONENAND_H */ |
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h index 0c6bbe28f38c..86a6bbef6465 100644 --- a/include/linux/mtd/onenand_regs.h +++ b/include/linux/mtd/onenand_regs.h | |||
| @@ -67,6 +67,9 @@ | |||
| 67 | /* | 67 | /* |
| 68 | * Device ID Register F001h (R) | 68 | * Device ID Register F001h (R) |
| 69 | */ | 69 | */ |
| 70 | #define DEVICE_IS_FLEXONENAND (1 << 9) | ||
| 71 | #define FLEXONENAND_PI_MASK (0x3ff) | ||
| 72 | #define FLEXONENAND_PI_UNLOCK_SHIFT (14) | ||
| 70 | #define ONENAND_DEVICE_DENSITY_MASK (0xf) | 73 | #define ONENAND_DEVICE_DENSITY_MASK (0xf) |
| 71 | #define ONENAND_DEVICE_DENSITY_SHIFT (4) | 74 | #define ONENAND_DEVICE_DENSITY_SHIFT (4) |
| 72 | #define ONENAND_DEVICE_IS_DDP (1 << 3) | 75 | #define ONENAND_DEVICE_IS_DDP (1 << 3) |
| @@ -84,6 +87,11 @@ | |||
| 84 | #define ONENAND_VERSION_PROCESS_SHIFT (8) | 87 | #define ONENAND_VERSION_PROCESS_SHIFT (8) |
| 85 | 88 | ||
| 86 | /* | 89 | /* |
| 90 | * Technology Register F006h (R) | ||
| 91 | */ | ||
| 92 | #define ONENAND_TECHNOLOGY_IS_MLC (1 << 0) | ||
| 93 | |||
| 94 | /* | ||
| 87 | * Start Address 1 F100h (R/W) & Start Address 2 F101h (R/W) | 95 | * Start Address 1 F100h (R/W) & Start Address 2 F101h (R/W) |
| 88 | */ | 96 | */ |
| 89 | #define ONENAND_DDP_SHIFT (15) | 97 | #define ONENAND_DDP_SHIFT (15) |
| @@ -93,7 +101,8 @@ | |||
| 93 | /* | 101 | /* |
| 94 | * Start Address 8 F107h (R/W) | 102 | * Start Address 8 F107h (R/W) |
| 95 | */ | 103 | */ |
| 96 | #define ONENAND_FPA_MASK (0x3f) | 104 | /* Note: It's actually 0x3f in case of SLC */ |
| 105 | #define ONENAND_FPA_MASK (0x7f) | ||
| 97 | #define ONENAND_FPA_SHIFT (2) | 106 | #define ONENAND_FPA_SHIFT (2) |
| 98 | #define ONENAND_FSA_MASK (0x03) | 107 | #define ONENAND_FSA_MASK (0x03) |
| 99 | 108 | ||
| @@ -105,7 +114,8 @@ | |||
| 105 | #define ONENAND_BSA_BOOTRAM (0 << 2) | 114 | #define ONENAND_BSA_BOOTRAM (0 << 2) |
| 106 | #define ONENAND_BSA_DATARAM0 (2 << 2) | 115 | #define ONENAND_BSA_DATARAM0 (2 << 2) |
| 107 | #define ONENAND_BSA_DATARAM1 (3 << 2) | 116 | #define ONENAND_BSA_DATARAM1 (3 << 2) |
| 108 | #define ONENAND_BSC_MASK (0x03) | 117 | /* Note: It's actually 0x03 in case of SLC */ |
| 118 | #define ONENAND_BSC_MASK (0x07) | ||
| 109 | 119 | ||
| 110 | /* | 120 | /* |
| 111 | * Command Register F220h (R/W) | 121 | * Command Register F220h (R/W) |
| @@ -124,9 +134,13 @@ | |||
| 124 | #define ONENAND_CMD_RESET (0xF0) | 134 | #define ONENAND_CMD_RESET (0xF0) |
| 125 | #define ONENAND_CMD_OTP_ACCESS (0x65) | 135 | #define ONENAND_CMD_OTP_ACCESS (0x65) |
| 126 | #define ONENAND_CMD_READID (0x90) | 136 | #define ONENAND_CMD_READID (0x90) |
| 137 | #define FLEXONENAND_CMD_PI_UPDATE (0x05) | ||
| 138 | #define FLEXONENAND_CMD_PI_ACCESS (0x66) | ||
| 139 | #define FLEXONENAND_CMD_RECOVER_LSB (0x05) | ||
| 127 | 140 | ||
| 128 | /* NOTE: Those are not *REAL* commands */ | 141 | /* NOTE: Those are not *REAL* commands */ |
| 129 | #define ONENAND_CMD_BUFFERRAM (0x1978) | 142 | #define ONENAND_CMD_BUFFERRAM (0x1978) |
| 143 | #define FLEXONENAND_CMD_READ_PI (0x1985) | ||
| 130 | 144 | ||
| 131 | /* | 145 | /* |
| 132 | * System Configuration 1 Register F221h (R, R/W) | 146 | * System Configuration 1 Register F221h (R, R/W) |
| @@ -192,10 +206,12 @@ | |||
| 192 | #define ONENAND_ECC_1BIT_ALL (0x5555) | 206 | #define ONENAND_ECC_1BIT_ALL (0x5555) |
| 193 | #define ONENAND_ECC_2BIT (1 << 1) | 207 | #define ONENAND_ECC_2BIT (1 << 1) |
| 194 | #define ONENAND_ECC_2BIT_ALL (0xAAAA) | 208 | #define ONENAND_ECC_2BIT_ALL (0xAAAA) |
| 209 | #define FLEXONENAND_UNCORRECTABLE_ERROR (0x1010) | ||
| 195 | 210 | ||
| 196 | /* | 211 | /* |
| 197 | * One-Time Programmable (OTP) | 212 | * One-Time Programmable (OTP) |
| 198 | */ | 213 | */ |
| 214 | #define FLEXONENAND_OTP_LOCK_OFFSET (2048) | ||
| 199 | #define ONENAND_OTP_LOCK_OFFSET (14) | 215 | #define ONENAND_OTP_LOCK_OFFSET (14) |
| 200 | 216 | ||
| 201 | #endif /* __ONENAND_REG_H */ | 217 | #endif /* __ONENAND_REG_H */ |
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index 7535a74083b9..af6dcb992bc3 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
| @@ -40,7 +40,6 @@ struct mtd_partition { | |||
| 40 | uint64_t offset; /* offset within the master MTD space */ | 40 | uint64_t offset; /* offset within the master MTD space */ |
| 41 | uint32_t mask_flags; /* master MTD flags to mask out for this partition */ | 41 | uint32_t mask_flags; /* master MTD flags to mask out for this partition */ |
| 42 | struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/ | 42 | struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/ |
| 43 | struct mtd_info **mtdp; /* pointer to store the MTD object */ | ||
| 44 | }; | 43 | }; |
| 45 | 44 | ||
| 46 | #define MTDPART_OFS_NXTBLK (-2) | 45 | #define MTDPART_OFS_NXTBLK (-2) |
diff --git a/include/linux/nfs.h b/include/linux/nfs.h index 214d499718f7..f387919bbc59 100644 --- a/include/linux/nfs.h +++ b/include/linux/nfs.h | |||
| @@ -25,8 +25,9 @@ | |||
| 25 | #define NFSMODE_SOCK 0140000 | 25 | #define NFSMODE_SOCK 0140000 |
| 26 | #define NFSMODE_FIFO 0010000 | 26 | #define NFSMODE_FIFO 0010000 |
| 27 | 27 | ||
| 28 | #define NFS_MNT_PROGRAM 100005 | 28 | #define NFS_MNT_PROGRAM 100005 |
| 29 | #define NFS_MNT_PORT 627 | 29 | #define NFS_MNT_VERSION 1 |
| 30 | #define NFS_MNT3_VERSION 3 | ||
| 30 | 31 | ||
| 31 | /* | 32 | /* |
| 32 | * NFS stats. The good thing with these values is that NFSv3 errors are | 33 | * NFS stats. The good thing with these values is that NFSv3 errors are |
diff --git a/include/linux/nfs2.h b/include/linux/nfs2.h index 0ed9517138fc..fde24b30cc9e 100644 --- a/include/linux/nfs2.h +++ b/include/linux/nfs2.h | |||
| @@ -64,11 +64,4 @@ struct nfs2_fh { | |||
| 64 | #define NFSPROC_READDIR 16 | 64 | #define NFSPROC_READDIR 16 |
| 65 | #define NFSPROC_STATFS 17 | 65 | #define NFSPROC_STATFS 17 |
| 66 | 66 | ||
| 67 | #define NFS_MNT_PROGRAM 100005 | ||
| 68 | #define NFS_MNT_VERSION 1 | ||
| 69 | #define MNTPROC_NULL 0 | ||
| 70 | #define MNTPROC_MNT 1 | ||
| 71 | #define MNTPROC_UMNT 3 | ||
| 72 | #define MNTPROC_UMNTALL 4 | ||
| 73 | |||
| 74 | #endif /* _LINUX_NFS2_H */ | 67 | #endif /* _LINUX_NFS2_H */ |
diff --git a/include/linux/nfs3.h b/include/linux/nfs3.h index 539f3b550eab..ac33806ec7f9 100644 --- a/include/linux/nfs3.h +++ b/include/linux/nfs3.h | |||
| @@ -88,12 +88,7 @@ struct nfs3_fh { | |||
| 88 | #define NFS3PROC_PATHCONF 20 | 88 | #define NFS3PROC_PATHCONF 20 |
| 89 | #define NFS3PROC_COMMIT 21 | 89 | #define NFS3PROC_COMMIT 21 |
| 90 | 90 | ||
| 91 | #define NFS_MNT3_PROGRAM 100005 | ||
| 92 | #define NFS_MNT3_VERSION 3 | 91 | #define NFS_MNT3_VERSION 3 |
| 93 | #define MOUNTPROC3_NULL 0 | ||
| 94 | #define MOUNTPROC3_MNT 1 | ||
| 95 | #define MOUNTPROC3_UMNT 3 | ||
| 96 | #define MOUNTPROC3_UMNTALL 4 | ||
| 97 | 92 | ||
| 98 | 93 | ||
| 99 | #if defined(__KERNEL__) | 94 | #if defined(__KERNEL__) |
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index e3f0cbcbd0db..bd2eba530667 100644 --- a/include/linux/nfs4.h +++ b/include/linux/nfs4.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #define NFS4_FHSIZE 128 | 21 | #define NFS4_FHSIZE 128 |
| 22 | #define NFS4_MAXPATHLEN PATH_MAX | 22 | #define NFS4_MAXPATHLEN PATH_MAX |
| 23 | #define NFS4_MAXNAMLEN NAME_MAX | 23 | #define NFS4_MAXNAMLEN NAME_MAX |
| 24 | #define NFS4_OPAQUE_LIMIT 1024 | ||
| 24 | #define NFS4_MAX_SESSIONID_LEN 16 | 25 | #define NFS4_MAX_SESSIONID_LEN 16 |
| 25 | 26 | ||
| 26 | #define NFS4_ACCESS_READ 0x0001 | 27 | #define NFS4_ACCESS_READ 0x0001 |
| @@ -130,6 +131,16 @@ | |||
| 130 | 131 | ||
| 131 | #define NFS4_MAX_UINT64 (~(u64)0) | 132 | #define NFS4_MAX_UINT64 (~(u64)0) |
| 132 | 133 | ||
| 134 | /* An NFS4 sessions server must support at least NFS4_MAX_OPS operations. | ||
| 135 | * If a compound requires more operations, adjust NFS4_MAX_OPS accordingly. | ||
| 136 | */ | ||
| 137 | #define NFS4_MAX_OPS 8 | ||
| 138 | |||
| 139 | /* Our NFS4 client back channel server only wants the cb_sequene and the | ||
| 140 | * actual operation per compound | ||
| 141 | */ | ||
| 142 | #define NFS4_MAX_BACK_CHANNEL_OPS 2 | ||
| 143 | |||
| 133 | enum nfs4_acl_whotype { | 144 | enum nfs4_acl_whotype { |
| 134 | NFS4_ACL_WHO_NAMED = 0, | 145 | NFS4_ACL_WHO_NAMED = 0, |
| 135 | NFS4_ACL_WHO_OWNER, | 146 | NFS4_ACL_WHO_OWNER, |
| @@ -462,6 +473,13 @@ enum lock_type4 { | |||
| 462 | #define NFSPROC4_NULL 0 | 473 | #define NFSPROC4_NULL 0 |
| 463 | #define NFSPROC4_COMPOUND 1 | 474 | #define NFSPROC4_COMPOUND 1 |
| 464 | #define NFS4_MINOR_VERSION 0 | 475 | #define NFS4_MINOR_VERSION 0 |
| 476 | |||
| 477 | #if defined(CONFIG_NFS_V4_1) | ||
| 478 | #define NFS4_MAX_MINOR_VERSION 1 | ||
| 479 | #else | ||
| 480 | #define NFS4_MAX_MINOR_VERSION 0 | ||
| 481 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 482 | |||
| 465 | #define NFS4_DEBUG 1 | 483 | #define NFS4_DEBUG 1 |
| 466 | 484 | ||
| 467 | /* Index of predefined Linux client operations */ | 485 | /* Index of predefined Linux client operations */ |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 6ad75948cbf7..19fe15d12042 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
| @@ -4,11 +4,17 @@ | |||
| 4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
| 5 | #include <linux/backing-dev.h> | 5 | #include <linux/backing-dev.h> |
| 6 | #include <linux/wait.h> | 6 | #include <linux/wait.h> |
| 7 | #include <linux/nfs_xdr.h> | ||
| 8 | #include <linux/sunrpc/xprt.h> | ||
| 7 | 9 | ||
| 8 | #include <asm/atomic.h> | 10 | #include <asm/atomic.h> |
| 9 | 11 | ||
| 12 | struct nfs4_session; | ||
| 10 | struct nfs_iostats; | 13 | struct nfs_iostats; |
| 11 | struct nlm_host; | 14 | struct nlm_host; |
| 15 | struct nfs4_sequence_args; | ||
| 16 | struct nfs4_sequence_res; | ||
| 17 | struct nfs_server; | ||
| 12 | 18 | ||
| 13 | /* | 19 | /* |
| 14 | * The nfs_client identifies our client state to the server. | 20 | * The nfs_client identifies our client state to the server. |
| @@ -18,6 +24,7 @@ struct nfs_client { | |||
| 18 | int cl_cons_state; /* current construction state (-ve: init error) */ | 24 | int cl_cons_state; /* current construction state (-ve: init error) */ |
| 19 | #define NFS_CS_READY 0 /* ready to be used */ | 25 | #define NFS_CS_READY 0 /* ready to be used */ |
| 20 | #define NFS_CS_INITING 1 /* busy initialising */ | 26 | #define NFS_CS_INITING 1 /* busy initialising */ |
| 27 | #define NFS_CS_SESSION_INITING 2 /* busy initialising session */ | ||
| 21 | unsigned long cl_res_state; /* NFS resources state */ | 28 | unsigned long cl_res_state; /* NFS resources state */ |
| 22 | #define NFS_CS_CALLBACK 1 /* - callback started */ | 29 | #define NFS_CS_CALLBACK 1 /* - callback started */ |
| 23 | #define NFS_CS_IDMAP 2 /* - idmap started */ | 30 | #define NFS_CS_IDMAP 2 /* - idmap started */ |
| @@ -32,6 +39,7 @@ struct nfs_client { | |||
| 32 | const struct nfs_rpc_ops *rpc_ops; /* NFS protocol vector */ | 39 | const struct nfs_rpc_ops *rpc_ops; /* NFS protocol vector */ |
| 33 | int cl_proto; /* Network transport protocol */ | 40 | int cl_proto; /* Network transport protocol */ |
| 34 | 41 | ||
| 42 | u32 cl_minorversion;/* NFSv4 minorversion */ | ||
| 35 | struct rpc_cred *cl_machine_cred; | 43 | struct rpc_cred *cl_machine_cred; |
| 36 | 44 | ||
| 37 | #ifdef CONFIG_NFS_V4 | 45 | #ifdef CONFIG_NFS_V4 |
| @@ -63,7 +71,22 @@ struct nfs_client { | |||
| 63 | */ | 71 | */ |
| 64 | char cl_ipaddr[48]; | 72 | char cl_ipaddr[48]; |
| 65 | unsigned char cl_id_uniquifier; | 73 | unsigned char cl_id_uniquifier; |
| 66 | #endif | 74 | int (* cl_call_sync)(struct nfs_server *server, |
| 75 | struct rpc_message *msg, | ||
| 76 | struct nfs4_sequence_args *args, | ||
| 77 | struct nfs4_sequence_res *res, | ||
| 78 | int cache_reply); | ||
| 79 | #endif /* CONFIG_NFS_V4 */ | ||
| 80 | |||
| 81 | #ifdef CONFIG_NFS_V4_1 | ||
| 82 | /* clientid returned from EXCHANGE_ID, used by session operations */ | ||
| 83 | u64 cl_ex_clid; | ||
| 84 | /* The sequence id to use for the next CREATE_SESSION */ | ||
| 85 | u32 cl_seqid; | ||
| 86 | /* The flags used for obtaining the clientid during EXCHANGE_ID */ | ||
| 87 | u32 cl_exchange_flags; | ||
| 88 | struct nfs4_session *cl_session; /* sharred session */ | ||
| 89 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 67 | 90 | ||
| 68 | #ifdef CONFIG_NFS_FSCACHE | 91 | #ifdef CONFIG_NFS_FSCACHE |
| 69 | struct fscache_cookie *fscache; /* client index cache cookie */ | 92 | struct fscache_cookie *fscache; /* client index cache cookie */ |
| @@ -145,4 +168,46 @@ struct nfs_server { | |||
| 145 | #define NFS_CAP_ACLS (1U << 3) | 168 | #define NFS_CAP_ACLS (1U << 3) |
| 146 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) | 169 | #define NFS_CAP_ATOMIC_OPEN (1U << 4) |
| 147 | 170 | ||
| 171 | |||
| 172 | /* maximum number of slots to use */ | ||
| 173 | #define NFS4_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE | ||
| 174 | |||
| 175 | #if defined(CONFIG_NFS_V4_1) | ||
| 176 | |||
| 177 | /* Sessions */ | ||
| 178 | #define SLOT_TABLE_SZ (NFS4_MAX_SLOT_TABLE/(8*sizeof(long))) | ||
| 179 | struct nfs4_slot_table { | ||
| 180 | struct nfs4_slot *slots; /* seqid per slot */ | ||
| 181 | unsigned long used_slots[SLOT_TABLE_SZ]; /* used/unused bitmap */ | ||
| 182 | spinlock_t slot_tbl_lock; | ||
| 183 | struct rpc_wait_queue slot_tbl_waitq; /* allocators may wait here */ | ||
| 184 | int max_slots; /* # slots in table */ | ||
| 185 | int highest_used_slotid; /* sent to server on each SEQ. | ||
| 186 | * op for dynamic resizing */ | ||
| 187 | }; | ||
| 188 | |||
| 189 | static inline int slot_idx(struct nfs4_slot_table *tbl, struct nfs4_slot *sp) | ||
| 190 | { | ||
| 191 | return sp - tbl->slots; | ||
| 192 | } | ||
| 193 | |||
| 194 | /* | ||
| 195 | * Session related parameters | ||
| 196 | */ | ||
| 197 | struct nfs4_session { | ||
| 198 | struct nfs4_sessionid sess_id; | ||
| 199 | u32 flags; | ||
| 200 | unsigned long session_state; | ||
| 201 | u32 hash_alg; | ||
| 202 | u32 ssv_len; | ||
| 203 | |||
| 204 | /* The fore and back channel */ | ||
| 205 | struct nfs4_channel_attrs fc_attrs; | ||
| 206 | struct nfs4_slot_table fc_slot_table; | ||
| 207 | struct nfs4_channel_attrs bc_attrs; | ||
| 208 | struct nfs4_slot_table bc_slot_table; | ||
| 209 | struct nfs_client *clp; | ||
| 210 | }; | ||
| 211 | |||
| 212 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 148 | #endif | 213 | #endif |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index b89c34e40bc2..62f63fb0c4c8 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
| @@ -145,6 +145,44 @@ struct nfs4_change_info { | |||
| 145 | }; | 145 | }; |
| 146 | 146 | ||
| 147 | struct nfs_seqid; | 147 | struct nfs_seqid; |
| 148 | |||
| 149 | /* nfs41 sessions channel attributes */ | ||
| 150 | struct nfs4_channel_attrs { | ||
| 151 | u32 headerpadsz; | ||
| 152 | u32 max_rqst_sz; | ||
| 153 | u32 max_resp_sz; | ||
| 154 | u32 max_resp_sz_cached; | ||
| 155 | u32 max_ops; | ||
| 156 | u32 max_reqs; | ||
| 157 | }; | ||
| 158 | |||
| 159 | /* nfs41 sessions slot seqid */ | ||
| 160 | struct nfs4_slot { | ||
| 161 | u32 seq_nr; | ||
| 162 | }; | ||
| 163 | |||
| 164 | struct nfs4_sequence_args { | ||
| 165 | struct nfs4_session *sa_session; | ||
| 166 | u8 sa_slotid; | ||
| 167 | u8 sa_cache_this; | ||
| 168 | }; | ||
| 169 | |||
| 170 | struct nfs4_sequence_res { | ||
| 171 | struct nfs4_session *sr_session; | ||
| 172 | u8 sr_slotid; /* slot used to send request */ | ||
| 173 | unsigned long sr_renewal_time; | ||
| 174 | int sr_status; /* sequence operation status */ | ||
| 175 | }; | ||
| 176 | |||
| 177 | struct nfs4_get_lease_time_args { | ||
| 178 | struct nfs4_sequence_args la_seq_args; | ||
| 179 | }; | ||
| 180 | |||
| 181 | struct nfs4_get_lease_time_res { | ||
| 182 | struct nfs_fsinfo *lr_fsinfo; | ||
| 183 | struct nfs4_sequence_res lr_seq_res; | ||
| 184 | }; | ||
| 185 | |||
| 148 | /* | 186 | /* |
| 149 | * Arguments to the open call. | 187 | * Arguments to the open call. |
| 150 | */ | 188 | */ |
| @@ -165,6 +203,7 @@ struct nfs_openargs { | |||
| 165 | const struct nfs_server *server; /* Needed for ID mapping */ | 203 | const struct nfs_server *server; /* Needed for ID mapping */ |
| 166 | const u32 * bitmask; | 204 | const u32 * bitmask; |
| 167 | __u32 claim; | 205 | __u32 claim; |
| 206 | struct nfs4_sequence_args seq_args; | ||
| 168 | }; | 207 | }; |
| 169 | 208 | ||
| 170 | struct nfs_openres { | 209 | struct nfs_openres { |
| @@ -181,6 +220,7 @@ struct nfs_openres { | |||
| 181 | __u32 do_recall; | 220 | __u32 do_recall; |
| 182 | __u64 maxsize; | 221 | __u64 maxsize; |
| 183 | __u32 attrset[NFS4_BITMAP_SIZE]; | 222 | __u32 attrset[NFS4_BITMAP_SIZE]; |
| 223 | struct nfs4_sequence_res seq_res; | ||
| 184 | }; | 224 | }; |
| 185 | 225 | ||
| 186 | /* | 226 | /* |
| @@ -206,6 +246,7 @@ struct nfs_closeargs { | |||
| 206 | struct nfs_seqid * seqid; | 246 | struct nfs_seqid * seqid; |
| 207 | fmode_t fmode; | 247 | fmode_t fmode; |
| 208 | const u32 * bitmask; | 248 | const u32 * bitmask; |
| 249 | struct nfs4_sequence_args seq_args; | ||
| 209 | }; | 250 | }; |
| 210 | 251 | ||
| 211 | struct nfs_closeres { | 252 | struct nfs_closeres { |
| @@ -213,6 +254,7 @@ struct nfs_closeres { | |||
| 213 | struct nfs_fattr * fattr; | 254 | struct nfs_fattr * fattr; |
| 214 | struct nfs_seqid * seqid; | 255 | struct nfs_seqid * seqid; |
| 215 | const struct nfs_server *server; | 256 | const struct nfs_server *server; |
| 257 | struct nfs4_sequence_res seq_res; | ||
| 216 | }; | 258 | }; |
| 217 | /* | 259 | /* |
| 218 | * * Arguments to the lock,lockt, and locku call. | 260 | * * Arguments to the lock,lockt, and locku call. |
| @@ -233,12 +275,14 @@ struct nfs_lock_args { | |||
| 233 | unsigned char block : 1; | 275 | unsigned char block : 1; |
| 234 | unsigned char reclaim : 1; | 276 | unsigned char reclaim : 1; |
| 235 | unsigned char new_lock_owner : 1; | 277 | unsigned char new_lock_owner : 1; |
| 278 | struct nfs4_sequence_args seq_args; | ||
| 236 | }; | 279 | }; |
| 237 | 280 | ||
| 238 | struct nfs_lock_res { | 281 | struct nfs_lock_res { |
| 239 | nfs4_stateid stateid; | 282 | nfs4_stateid stateid; |
| 240 | struct nfs_seqid * lock_seqid; | 283 | struct nfs_seqid * lock_seqid; |
| 241 | struct nfs_seqid * open_seqid; | 284 | struct nfs_seqid * open_seqid; |
| 285 | struct nfs4_sequence_res seq_res; | ||
| 242 | }; | 286 | }; |
| 243 | 287 | ||
| 244 | struct nfs_locku_args { | 288 | struct nfs_locku_args { |
| @@ -246,32 +290,38 @@ struct nfs_locku_args { | |||
| 246 | struct file_lock * fl; | 290 | struct file_lock * fl; |
| 247 | struct nfs_seqid * seqid; | 291 | struct nfs_seqid * seqid; |
| 248 | nfs4_stateid * stateid; | 292 | nfs4_stateid * stateid; |
| 293 | struct nfs4_sequence_args seq_args; | ||
| 249 | }; | 294 | }; |
| 250 | 295 | ||
| 251 | struct nfs_locku_res { | 296 | struct nfs_locku_res { |
| 252 | nfs4_stateid stateid; | 297 | nfs4_stateid stateid; |
| 253 | struct nfs_seqid * seqid; | 298 | struct nfs_seqid * seqid; |
| 299 | struct nfs4_sequence_res seq_res; | ||
| 254 | }; | 300 | }; |
| 255 | 301 | ||
| 256 | struct nfs_lockt_args { | 302 | struct nfs_lockt_args { |
| 257 | struct nfs_fh * fh; | 303 | struct nfs_fh * fh; |
| 258 | struct file_lock * fl; | 304 | struct file_lock * fl; |
| 259 | struct nfs_lowner lock_owner; | 305 | struct nfs_lowner lock_owner; |
| 306 | struct nfs4_sequence_args seq_args; | ||
| 260 | }; | 307 | }; |
| 261 | 308 | ||
| 262 | struct nfs_lockt_res { | 309 | struct nfs_lockt_res { |
| 263 | struct file_lock * denied; /* LOCK, LOCKT failed */ | 310 | struct file_lock * denied; /* LOCK, LOCKT failed */ |
| 311 | struct nfs4_sequence_res seq_res; | ||
| 264 | }; | 312 | }; |
| 265 | 313 | ||
| 266 | struct nfs4_delegreturnargs { | 314 | struct nfs4_delegreturnargs { |
| 267 | const struct nfs_fh *fhandle; | 315 | const struct nfs_fh *fhandle; |
| 268 | const nfs4_stateid *stateid; | 316 | const nfs4_stateid *stateid; |
| 269 | const u32 * bitmask; | 317 | const u32 * bitmask; |
| 318 | struct nfs4_sequence_args seq_args; | ||
| 270 | }; | 319 | }; |
| 271 | 320 | ||
| 272 | struct nfs4_delegreturnres { | 321 | struct nfs4_delegreturnres { |
| 273 | struct nfs_fattr * fattr; | 322 | struct nfs_fattr * fattr; |
| 274 | const struct nfs_server *server; | 323 | const struct nfs_server *server; |
| 324 | struct nfs4_sequence_res seq_res; | ||
| 275 | }; | 325 | }; |
| 276 | 326 | ||
| 277 | /* | 327 | /* |
| @@ -284,12 +334,14 @@ struct nfs_readargs { | |||
| 284 | __u32 count; | 334 | __u32 count; |
| 285 | unsigned int pgbase; | 335 | unsigned int pgbase; |
| 286 | struct page ** pages; | 336 | struct page ** pages; |
| 337 | struct nfs4_sequence_args seq_args; | ||
| 287 | }; | 338 | }; |
| 288 | 339 | ||
| 289 | struct nfs_readres { | 340 | struct nfs_readres { |
| 290 | struct nfs_fattr * fattr; | 341 | struct nfs_fattr * fattr; |
| 291 | __u32 count; | 342 | __u32 count; |
| 292 | int eof; | 343 | int eof; |
| 344 | struct nfs4_sequence_res seq_res; | ||
| 293 | }; | 345 | }; |
| 294 | 346 | ||
| 295 | /* | 347 | /* |
| @@ -304,6 +356,7 @@ struct nfs_writeargs { | |||
| 304 | unsigned int pgbase; | 356 | unsigned int pgbase; |
| 305 | struct page ** pages; | 357 | struct page ** pages; |
| 306 | const u32 * bitmask; | 358 | const u32 * bitmask; |
| 359 | struct nfs4_sequence_args seq_args; | ||
| 307 | }; | 360 | }; |
| 308 | 361 | ||
| 309 | struct nfs_writeverf { | 362 | struct nfs_writeverf { |
| @@ -316,6 +369,7 @@ struct nfs_writeres { | |||
| 316 | struct nfs_writeverf * verf; | 369 | struct nfs_writeverf * verf; |
| 317 | __u32 count; | 370 | __u32 count; |
| 318 | const struct nfs_server *server; | 371 | const struct nfs_server *server; |
| 372 | struct nfs4_sequence_res seq_res; | ||
| 319 | }; | 373 | }; |
| 320 | 374 | ||
| 321 | /* | 375 | /* |
| @@ -325,12 +379,14 @@ struct nfs_removeargs { | |||
| 325 | const struct nfs_fh *fh; | 379 | const struct nfs_fh *fh; |
| 326 | struct qstr name; | 380 | struct qstr name; |
| 327 | const u32 * bitmask; | 381 | const u32 * bitmask; |
| 382 | struct nfs4_sequence_args seq_args; | ||
| 328 | }; | 383 | }; |
| 329 | 384 | ||
| 330 | struct nfs_removeres { | 385 | struct nfs_removeres { |
| 331 | const struct nfs_server *server; | 386 | const struct nfs_server *server; |
| 332 | struct nfs4_change_info cinfo; | 387 | struct nfs4_change_info cinfo; |
| 333 | struct nfs_fattr dir_attr; | 388 | struct nfs_fattr dir_attr; |
| 389 | struct nfs4_sequence_res seq_res; | ||
| 334 | }; | 390 | }; |
| 335 | 391 | ||
| 336 | /* | 392 | /* |
| @@ -383,6 +439,7 @@ struct nfs_setattrargs { | |||
| 383 | struct iattr * iap; | 439 | struct iattr * iap; |
| 384 | const struct nfs_server * server; /* Needed for name mapping */ | 440 | const struct nfs_server * server; /* Needed for name mapping */ |
| 385 | const u32 * bitmask; | 441 | const u32 * bitmask; |
| 442 | struct nfs4_sequence_args seq_args; | ||
| 386 | }; | 443 | }; |
| 387 | 444 | ||
| 388 | struct nfs_setaclargs { | 445 | struct nfs_setaclargs { |
| @@ -390,6 +447,11 @@ struct nfs_setaclargs { | |||
| 390 | size_t acl_len; | 447 | size_t acl_len; |
| 391 | unsigned int acl_pgbase; | 448 | unsigned int acl_pgbase; |
| 392 | struct page ** acl_pages; | 449 | struct page ** acl_pages; |
| 450 | struct nfs4_sequence_args seq_args; | ||
| 451 | }; | ||
| 452 | |||
| 453 | struct nfs_setaclres { | ||
| 454 | struct nfs4_sequence_res seq_res; | ||
| 393 | }; | 455 | }; |
| 394 | 456 | ||
| 395 | struct nfs_getaclargs { | 457 | struct nfs_getaclargs { |
| @@ -397,11 +459,18 @@ struct nfs_getaclargs { | |||
| 397 | size_t acl_len; | 459 | size_t acl_len; |
| 398 | unsigned int acl_pgbase; | 460 | unsigned int acl_pgbase; |
| 399 | struct page ** acl_pages; | 461 | struct page ** acl_pages; |
| 462 | struct nfs4_sequence_args seq_args; | ||
| 463 | }; | ||
| 464 | |||
| 465 | struct nfs_getaclres { | ||
| 466 | size_t acl_len; | ||
| 467 | struct nfs4_sequence_res seq_res; | ||
| 400 | }; | 468 | }; |
| 401 | 469 | ||
| 402 | struct nfs_setattrres { | 470 | struct nfs_setattrres { |
| 403 | struct nfs_fattr * fattr; | 471 | struct nfs_fattr * fattr; |
| 404 | const struct nfs_server * server; | 472 | const struct nfs_server * server; |
| 473 | struct nfs4_sequence_res seq_res; | ||
| 405 | }; | 474 | }; |
| 406 | 475 | ||
| 407 | struct nfs_linkargs { | 476 | struct nfs_linkargs { |
| @@ -583,6 +652,7 @@ struct nfs4_accessargs { | |||
| 583 | const struct nfs_fh * fh; | 652 | const struct nfs_fh * fh; |
| 584 | const u32 * bitmask; | 653 | const u32 * bitmask; |
| 585 | u32 access; | 654 | u32 access; |
| 655 | struct nfs4_sequence_args seq_args; | ||
| 586 | }; | 656 | }; |
| 587 | 657 | ||
| 588 | struct nfs4_accessres { | 658 | struct nfs4_accessres { |
| @@ -590,6 +660,7 @@ struct nfs4_accessres { | |||
| 590 | struct nfs_fattr * fattr; | 660 | struct nfs_fattr * fattr; |
| 591 | u32 supported; | 661 | u32 supported; |
| 592 | u32 access; | 662 | u32 access; |
| 663 | struct nfs4_sequence_res seq_res; | ||
| 593 | }; | 664 | }; |
| 594 | 665 | ||
| 595 | struct nfs4_create_arg { | 666 | struct nfs4_create_arg { |
| @@ -609,6 +680,7 @@ struct nfs4_create_arg { | |||
| 609 | const struct iattr * attrs; | 680 | const struct iattr * attrs; |
| 610 | const struct nfs_fh * dir_fh; | 681 | const struct nfs_fh * dir_fh; |
| 611 | const u32 * bitmask; | 682 | const u32 * bitmask; |
| 683 | struct nfs4_sequence_args seq_args; | ||
| 612 | }; | 684 | }; |
| 613 | 685 | ||
| 614 | struct nfs4_create_res { | 686 | struct nfs4_create_res { |
| @@ -617,21 +689,30 @@ struct nfs4_create_res { | |||
| 617 | struct nfs_fattr * fattr; | 689 | struct nfs_fattr * fattr; |
| 618 | struct nfs4_change_info dir_cinfo; | 690 | struct nfs4_change_info dir_cinfo; |
| 619 | struct nfs_fattr * dir_fattr; | 691 | struct nfs_fattr * dir_fattr; |
| 692 | struct nfs4_sequence_res seq_res; | ||
| 620 | }; | 693 | }; |
| 621 | 694 | ||
| 622 | struct nfs4_fsinfo_arg { | 695 | struct nfs4_fsinfo_arg { |
| 623 | const struct nfs_fh * fh; | 696 | const struct nfs_fh * fh; |
| 624 | const u32 * bitmask; | 697 | const u32 * bitmask; |
| 698 | struct nfs4_sequence_args seq_args; | ||
| 699 | }; | ||
| 700 | |||
| 701 | struct nfs4_fsinfo_res { | ||
| 702 | struct nfs_fsinfo *fsinfo; | ||
| 703 | struct nfs4_sequence_res seq_res; | ||
| 625 | }; | 704 | }; |
| 626 | 705 | ||
| 627 | struct nfs4_getattr_arg { | 706 | struct nfs4_getattr_arg { |
| 628 | const struct nfs_fh * fh; | 707 | const struct nfs_fh * fh; |
| 629 | const u32 * bitmask; | 708 | const u32 * bitmask; |
| 709 | struct nfs4_sequence_args seq_args; | ||
| 630 | }; | 710 | }; |
| 631 | 711 | ||
| 632 | struct nfs4_getattr_res { | 712 | struct nfs4_getattr_res { |
| 633 | const struct nfs_server * server; | 713 | const struct nfs_server * server; |
| 634 | struct nfs_fattr * fattr; | 714 | struct nfs_fattr * fattr; |
| 715 | struct nfs4_sequence_res seq_res; | ||
| 635 | }; | 716 | }; |
| 636 | 717 | ||
| 637 | struct nfs4_link_arg { | 718 | struct nfs4_link_arg { |
| @@ -639,6 +720,7 @@ struct nfs4_link_arg { | |||
| 639 | const struct nfs_fh * dir_fh; | 720 | const struct nfs_fh * dir_fh; |
| 640 | const struct qstr * name; | 721 | const struct qstr * name; |
| 641 | const u32 * bitmask; | 722 | const u32 * bitmask; |
| 723 | struct nfs4_sequence_args seq_args; | ||
| 642 | }; | 724 | }; |
| 643 | 725 | ||
| 644 | struct nfs4_link_res { | 726 | struct nfs4_link_res { |
| @@ -646,6 +728,7 @@ struct nfs4_link_res { | |||
| 646 | struct nfs_fattr * fattr; | 728 | struct nfs_fattr * fattr; |
| 647 | struct nfs4_change_info cinfo; | 729 | struct nfs4_change_info cinfo; |
| 648 | struct nfs_fattr * dir_attr; | 730 | struct nfs_fattr * dir_attr; |
| 731 | struct nfs4_sequence_res seq_res; | ||
| 649 | }; | 732 | }; |
| 650 | 733 | ||
| 651 | 734 | ||
| @@ -653,21 +736,30 @@ struct nfs4_lookup_arg { | |||
| 653 | const struct nfs_fh * dir_fh; | 736 | const struct nfs_fh * dir_fh; |
| 654 | const struct qstr * name; | 737 | const struct qstr * name; |
| 655 | const u32 * bitmask; | 738 | const u32 * bitmask; |
| 739 | struct nfs4_sequence_args seq_args; | ||
| 656 | }; | 740 | }; |
| 657 | 741 | ||
| 658 | struct nfs4_lookup_res { | 742 | struct nfs4_lookup_res { |
| 659 | const struct nfs_server * server; | 743 | const struct nfs_server * server; |
| 660 | struct nfs_fattr * fattr; | 744 | struct nfs_fattr * fattr; |
| 661 | struct nfs_fh * fh; | 745 | struct nfs_fh * fh; |
| 746 | struct nfs4_sequence_res seq_res; | ||
| 662 | }; | 747 | }; |
| 663 | 748 | ||
| 664 | struct nfs4_lookup_root_arg { | 749 | struct nfs4_lookup_root_arg { |
| 665 | const u32 * bitmask; | 750 | const u32 * bitmask; |
| 751 | struct nfs4_sequence_args seq_args; | ||
| 666 | }; | 752 | }; |
| 667 | 753 | ||
| 668 | struct nfs4_pathconf_arg { | 754 | struct nfs4_pathconf_arg { |
| 669 | const struct nfs_fh * fh; | 755 | const struct nfs_fh * fh; |
| 670 | const u32 * bitmask; | 756 | const u32 * bitmask; |
| 757 | struct nfs4_sequence_args seq_args; | ||
| 758 | }; | ||
| 759 | |||
| 760 | struct nfs4_pathconf_res { | ||
| 761 | struct nfs_pathconf *pathconf; | ||
| 762 | struct nfs4_sequence_res seq_res; | ||
| 671 | }; | 763 | }; |
| 672 | 764 | ||
| 673 | struct nfs4_readdir_arg { | 765 | struct nfs4_readdir_arg { |
| @@ -678,11 +770,13 @@ struct nfs4_readdir_arg { | |||
| 678 | struct page ** pages; /* zero-copy data */ | 770 | struct page ** pages; /* zero-copy data */ |
| 679 | unsigned int pgbase; /* zero-copy data */ | 771 | unsigned int pgbase; /* zero-copy data */ |
| 680 | const u32 * bitmask; | 772 | const u32 * bitmask; |
| 773 | struct nfs4_sequence_args seq_args; | ||
| 681 | }; | 774 | }; |
| 682 | 775 | ||
| 683 | struct nfs4_readdir_res { | 776 | struct nfs4_readdir_res { |
| 684 | nfs4_verifier verifier; | 777 | nfs4_verifier verifier; |
| 685 | unsigned int pgbase; | 778 | unsigned int pgbase; |
| 779 | struct nfs4_sequence_res seq_res; | ||
| 686 | }; | 780 | }; |
| 687 | 781 | ||
| 688 | struct nfs4_readlink { | 782 | struct nfs4_readlink { |
| @@ -690,6 +784,11 @@ struct nfs4_readlink { | |||
| 690 | unsigned int pgbase; | 784 | unsigned int pgbase; |
| 691 | unsigned int pglen; /* zero-copy data */ | 785 | unsigned int pglen; /* zero-copy data */ |
| 692 | struct page ** pages; /* zero-copy data */ | 786 | struct page ** pages; /* zero-copy data */ |
| 787 | struct nfs4_sequence_args seq_args; | ||
| 788 | }; | ||
| 789 | |||
| 790 | struct nfs4_readlink_res { | ||
| 791 | struct nfs4_sequence_res seq_res; | ||
| 693 | }; | 792 | }; |
| 694 | 793 | ||
| 695 | struct nfs4_rename_arg { | 794 | struct nfs4_rename_arg { |
| @@ -698,6 +797,7 @@ struct nfs4_rename_arg { | |||
| 698 | const struct qstr * old_name; | 797 | const struct qstr * old_name; |
| 699 | const struct qstr * new_name; | 798 | const struct qstr * new_name; |
| 700 | const u32 * bitmask; | 799 | const u32 * bitmask; |
| 800 | struct nfs4_sequence_args seq_args; | ||
| 701 | }; | 801 | }; |
| 702 | 802 | ||
| 703 | struct nfs4_rename_res { | 803 | struct nfs4_rename_res { |
| @@ -706,6 +806,7 @@ struct nfs4_rename_res { | |||
| 706 | struct nfs_fattr * old_fattr; | 806 | struct nfs_fattr * old_fattr; |
| 707 | struct nfs4_change_info new_cinfo; | 807 | struct nfs4_change_info new_cinfo; |
| 708 | struct nfs_fattr * new_fattr; | 808 | struct nfs_fattr * new_fattr; |
| 809 | struct nfs4_sequence_res seq_res; | ||
| 709 | }; | 810 | }; |
| 710 | 811 | ||
| 711 | #define NFS4_SETCLIENTID_NAMELEN (127) | 812 | #define NFS4_SETCLIENTID_NAMELEN (127) |
| @@ -724,6 +825,17 @@ struct nfs4_setclientid { | |||
| 724 | struct nfs4_statfs_arg { | 825 | struct nfs4_statfs_arg { |
| 725 | const struct nfs_fh * fh; | 826 | const struct nfs_fh * fh; |
| 726 | const u32 * bitmask; | 827 | const u32 * bitmask; |
| 828 | struct nfs4_sequence_args seq_args; | ||
| 829 | }; | ||
| 830 | |||
| 831 | struct nfs4_statfs_res { | ||
| 832 | struct nfs_fsstat *fsstat; | ||
| 833 | struct nfs4_sequence_res seq_res; | ||
| 834 | }; | ||
| 835 | |||
| 836 | struct nfs4_server_caps_arg { | ||
| 837 | struct nfs_fh *fhandle; | ||
| 838 | struct nfs4_sequence_args seq_args; | ||
| 727 | }; | 839 | }; |
| 728 | 840 | ||
| 729 | struct nfs4_server_caps_res { | 841 | struct nfs4_server_caps_res { |
| @@ -731,6 +843,7 @@ struct nfs4_server_caps_res { | |||
| 731 | u32 acl_bitmask; | 843 | u32 acl_bitmask; |
| 732 | u32 has_links; | 844 | u32 has_links; |
| 733 | u32 has_symlinks; | 845 | u32 has_symlinks; |
| 846 | struct nfs4_sequence_res seq_res; | ||
| 734 | }; | 847 | }; |
| 735 | 848 | ||
| 736 | struct nfs4_string { | 849 | struct nfs4_string { |
| @@ -765,10 +878,68 @@ struct nfs4_fs_locations_arg { | |||
| 765 | const struct qstr *name; | 878 | const struct qstr *name; |
| 766 | struct page *page; | 879 | struct page *page; |
| 767 | const u32 *bitmask; | 880 | const u32 *bitmask; |
| 881 | struct nfs4_sequence_args seq_args; | ||
| 882 | }; | ||
| 883 | |||
| 884 | struct nfs4_fs_locations_res { | ||
| 885 | struct nfs4_fs_locations *fs_locations; | ||
| 886 | struct nfs4_sequence_res seq_res; | ||
| 768 | }; | 887 | }; |
| 769 | 888 | ||
| 770 | #endif /* CONFIG_NFS_V4 */ | 889 | #endif /* CONFIG_NFS_V4 */ |
| 771 | 890 | ||
| 891 | struct nfstime4 { | ||
| 892 | u64 seconds; | ||
| 893 | u32 nseconds; | ||
| 894 | }; | ||
| 895 | |||
| 896 | #ifdef CONFIG_NFS_V4_1 | ||
| 897 | struct nfs_impl_id4 { | ||
| 898 | u32 domain_len; | ||
| 899 | char *domain; | ||
| 900 | u32 name_len; | ||
| 901 | char *name; | ||
| 902 | struct nfstime4 date; | ||
| 903 | }; | ||
| 904 | |||
| 905 | #define NFS4_EXCHANGE_ID_LEN (48) | ||
| 906 | struct nfs41_exchange_id_args { | ||
| 907 | struct nfs_client *client; | ||
| 908 | nfs4_verifier *verifier; | ||
| 909 | unsigned int id_len; | ||
| 910 | char id[NFS4_EXCHANGE_ID_LEN]; | ||
| 911 | u32 flags; | ||
| 912 | }; | ||
| 913 | |||
| 914 | struct server_owner { | ||
| 915 | uint64_t minor_id; | ||
| 916 | uint32_t major_id_sz; | ||
| 917 | char major_id[NFS4_OPAQUE_LIMIT]; | ||
| 918 | }; | ||
| 919 | |||
| 920 | struct server_scope { | ||
| 921 | uint32_t server_scope_sz; | ||
| 922 | char server_scope[NFS4_OPAQUE_LIMIT]; | ||
| 923 | }; | ||
| 924 | |||
| 925 | struct nfs41_exchange_id_res { | ||
| 926 | struct nfs_client *client; | ||
| 927 | u32 flags; | ||
| 928 | }; | ||
| 929 | |||
| 930 | struct nfs41_create_session_args { | ||
| 931 | struct nfs_client *client; | ||
| 932 | uint32_t flags; | ||
| 933 | uint32_t cb_program; | ||
| 934 | struct nfs4_channel_attrs fc_attrs; /* Fore Channel */ | ||
| 935 | struct nfs4_channel_attrs bc_attrs; /* Back Channel */ | ||
| 936 | }; | ||
| 937 | |||
| 938 | struct nfs41_create_session_res { | ||
| 939 | struct nfs_client *client; | ||
| 940 | }; | ||
| 941 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 942 | |||
| 772 | struct nfs_page; | 943 | struct nfs_page; |
| 773 | 944 | ||
| 774 | #define NFS_PAGEVEC_SIZE (8U) | 945 | #define NFS_PAGEVEC_SIZE (8U) |
diff --git a/include/linux/nfsd/cache.h b/include/linux/nfsd/cache.h index 5bccaab81056..3a3f58934f5e 100644 --- a/include/linux/nfsd/cache.h +++ b/include/linux/nfsd/cache.h | |||
| @@ -14,8 +14,7 @@ | |||
| 14 | #include <linux/uio.h> | 14 | #include <linux/uio.h> |
| 15 | 15 | ||
| 16 | /* | 16 | /* |
| 17 | * Representation of a reply cache entry. The first two members *must* | 17 | * Representation of a reply cache entry. |
| 18 | * be hash_next and hash_prev. | ||
| 19 | */ | 18 | */ |
| 20 | struct svc_cacherep { | 19 | struct svc_cacherep { |
| 21 | struct hlist_node c_hash; | 20 | struct hlist_node c_hash; |
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index afa19016c4a8..8f641c908450 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
| @@ -151,9 +151,15 @@ typedef struct svc_fh { | |||
| 151 | __u64 fh_pre_size; /* size before operation */ | 151 | __u64 fh_pre_size; /* size before operation */ |
| 152 | struct timespec fh_pre_mtime; /* mtime before oper */ | 152 | struct timespec fh_pre_mtime; /* mtime before oper */ |
| 153 | struct timespec fh_pre_ctime; /* ctime before oper */ | 153 | struct timespec fh_pre_ctime; /* ctime before oper */ |
| 154 | /* | ||
| 155 | * pre-op nfsv4 change attr: note must check IS_I_VERSION(inode) | ||
| 156 | * to find out if it is valid. | ||
| 157 | */ | ||
| 158 | u64 fh_pre_change; | ||
| 154 | 159 | ||
| 155 | /* Post-op attributes saved in fh_unlock */ | 160 | /* Post-op attributes saved in fh_unlock */ |
| 156 | struct kstat fh_post_attr; /* full attrs after operation */ | 161 | struct kstat fh_post_attr; /* full attrs after operation */ |
| 162 | u64 fh_post_change; /* nfsv4 change; see above */ | ||
| 157 | #endif /* CONFIG_NFSD_V3 */ | 163 | #endif /* CONFIG_NFSD_V3 */ |
| 158 | 164 | ||
| 159 | } svc_fh; | 165 | } svc_fh; |
| @@ -298,6 +304,7 @@ fill_pre_wcc(struct svc_fh *fhp) | |||
| 298 | fhp->fh_pre_mtime = inode->i_mtime; | 304 | fhp->fh_pre_mtime = inode->i_mtime; |
| 299 | fhp->fh_pre_ctime = inode->i_ctime; | 305 | fhp->fh_pre_ctime = inode->i_ctime; |
| 300 | fhp->fh_pre_size = inode->i_size; | 306 | fhp->fh_pre_size = inode->i_size; |
| 307 | fhp->fh_pre_change = inode->i_version; | ||
| 301 | fhp->fh_pre_saved = 1; | 308 | fhp->fh_pre_saved = 1; |
| 302 | } | 309 | } |
| 303 | } | 310 | } |
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h index 4d61c873feed..57ab2ed08459 100644 --- a/include/linux/nfsd/state.h +++ b/include/linux/nfsd/state.h | |||
| @@ -41,7 +41,6 @@ | |||
| 41 | #include <linux/kref.h> | 41 | #include <linux/kref.h> |
| 42 | #include <linux/sunrpc/clnt.h> | 42 | #include <linux/sunrpc/clnt.h> |
| 43 | 43 | ||
| 44 | #define NFS4_OPAQUE_LIMIT 1024 | ||
| 45 | typedef struct { | 44 | typedef struct { |
| 46 | u32 cl_boot; | 45 | u32 cl_boot; |
| 47 | u32 cl_id; | 46 | u32 cl_id; |
| @@ -61,15 +60,6 @@ typedef struct { | |||
| 61 | #define si_stateownerid si_opaque.so_stateownerid | 60 | #define si_stateownerid si_opaque.so_stateownerid |
| 62 | #define si_fileid si_opaque.so_fileid | 61 | #define si_fileid si_opaque.so_fileid |
| 63 | 62 | ||
| 64 | |||
| 65 | struct nfs4_cb_recall { | ||
| 66 | u32 cbr_ident; | ||
| 67 | int cbr_trunc; | ||
| 68 | stateid_t cbr_stateid; | ||
| 69 | struct knfsd_fh cbr_fh; | ||
| 70 | struct nfs4_delegation *cbr_dp; | ||
| 71 | }; | ||
| 72 | |||
| 73 | struct nfs4_delegation { | 63 | struct nfs4_delegation { |
| 74 | struct list_head dl_perfile; | 64 | struct list_head dl_perfile; |
| 75 | struct list_head dl_perclnt; | 65 | struct list_head dl_perclnt; |
| @@ -81,22 +71,25 @@ struct nfs4_delegation { | |||
| 81 | struct file *dl_vfs_file; | 71 | struct file *dl_vfs_file; |
| 82 | u32 dl_type; | 72 | u32 dl_type; |
| 83 | time_t dl_time; | 73 | time_t dl_time; |
| 84 | struct nfs4_cb_recall dl_recall; | 74 | /* For recall: */ |
| 75 | u32 dl_ident; | ||
| 76 | stateid_t dl_stateid; | ||
| 77 | struct knfsd_fh dl_fh; | ||
| 78 | int dl_retries; | ||
| 85 | }; | 79 | }; |
| 86 | 80 | ||
| 87 | #define dl_stateid dl_recall.cbr_stateid | ||
| 88 | #define dl_fh dl_recall.cbr_fh | ||
| 89 | |||
| 90 | /* client delegation callback info */ | 81 | /* client delegation callback info */ |
| 91 | struct nfs4_callback { | 82 | struct nfs4_cb_conn { |
| 92 | /* SETCLIENTID info */ | 83 | /* SETCLIENTID info */ |
| 93 | u32 cb_addr; | 84 | u32 cb_addr; |
| 94 | unsigned short cb_port; | 85 | unsigned short cb_port; |
| 95 | u32 cb_prog; | 86 | u32 cb_prog; |
| 96 | u32 cb_ident; | 87 | u32 cb_minorversion; |
| 88 | u32 cb_ident; /* minorversion 0 only */ | ||
| 97 | /* RPC client info */ | 89 | /* RPC client info */ |
| 98 | atomic_t cb_set; /* successful CB_NULL call */ | 90 | atomic_t cb_set; /* successful CB_NULL call */ |
| 99 | struct rpc_clnt * cb_client; | 91 | struct rpc_clnt * cb_client; |
| 92 | struct rpc_cred * cb_cred; | ||
| 100 | }; | 93 | }; |
| 101 | 94 | ||
| 102 | /* Maximum number of slots per session. 128 is useful for long haul TCP */ | 95 | /* Maximum number of slots per session. 128 is useful for long haul TCP */ |
| @@ -122,6 +115,17 @@ struct nfsd4_slot { | |||
| 122 | struct nfsd4_cache_entry sl_cache_entry; | 115 | struct nfsd4_cache_entry sl_cache_entry; |
| 123 | }; | 116 | }; |
| 124 | 117 | ||
| 118 | struct nfsd4_channel_attrs { | ||
| 119 | u32 headerpadsz; | ||
| 120 | u32 maxreq_sz; | ||
| 121 | u32 maxresp_sz; | ||
| 122 | u32 maxresp_cached; | ||
| 123 | u32 maxops; | ||
| 124 | u32 maxreqs; | ||
| 125 | u32 nr_rdma_attrs; | ||
| 126 | u32 rdma_attrs; | ||
| 127 | }; | ||
| 128 | |||
| 125 | struct nfsd4_session { | 129 | struct nfsd4_session { |
| 126 | struct kref se_ref; | 130 | struct kref se_ref; |
| 127 | struct list_head se_hash; /* hash by sessionid */ | 131 | struct list_head se_hash; /* hash by sessionid */ |
| @@ -129,11 +133,8 @@ struct nfsd4_session { | |||
| 129 | u32 se_flags; | 133 | u32 se_flags; |
| 130 | struct nfs4_client *se_client; /* for expire_client */ | 134 | struct nfs4_client *se_client; /* for expire_client */ |
| 131 | struct nfs4_sessionid se_sessionid; | 135 | struct nfs4_sessionid se_sessionid; |
| 132 | u32 se_fmaxreq_sz; | 136 | struct nfsd4_channel_attrs se_fchannel; |
| 133 | u32 se_fmaxresp_sz; | 137 | struct nfsd4_channel_attrs se_bchannel; |
| 134 | u32 se_fmaxresp_cached; | ||
| 135 | u32 se_fmaxops; | ||
| 136 | u32 se_fnumslots; | ||
| 137 | struct nfsd4_slot se_slots[]; /* forward channel slots */ | 138 | struct nfsd4_slot se_slots[]; /* forward channel slots */ |
| 138 | }; | 139 | }; |
| 139 | 140 | ||
| @@ -185,7 +186,7 @@ struct nfs4_client { | |||
| 185 | struct svc_cred cl_cred; /* setclientid principal */ | 186 | struct svc_cred cl_cred; /* setclientid principal */ |
| 186 | clientid_t cl_clientid; /* generated by server */ | 187 | clientid_t cl_clientid; /* generated by server */ |
| 187 | nfs4_verifier cl_confirm; /* generated by server */ | 188 | nfs4_verifier cl_confirm; /* generated by server */ |
| 188 | struct nfs4_callback cl_callback; /* callback info */ | 189 | struct nfs4_cb_conn cl_cb_conn; /* callback info */ |
| 189 | atomic_t cl_count; /* ref count */ | 190 | atomic_t cl_count; /* ref count */ |
| 190 | u32 cl_firststate; /* recovery dir creation */ | 191 | u32 cl_firststate; /* recovery dir creation */ |
| 191 | 192 | ||
diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h index f80d6013fdc3..2bacf7535069 100644 --- a/include/linux/nfsd/xdr4.h +++ b/include/linux/nfsd/xdr4.h | |||
| @@ -64,10 +64,13 @@ static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs) | |||
| 64 | 64 | ||
| 65 | struct nfsd4_change_info { | 65 | struct nfsd4_change_info { |
| 66 | u32 atomic; | 66 | u32 atomic; |
| 67 | bool change_supported; | ||
| 67 | u32 before_ctime_sec; | 68 | u32 before_ctime_sec; |
| 68 | u32 before_ctime_nsec; | 69 | u32 before_ctime_nsec; |
| 70 | u64 before_change; | ||
| 69 | u32 after_ctime_sec; | 71 | u32 after_ctime_sec; |
| 70 | u32 after_ctime_nsec; | 72 | u32 after_ctime_nsec; |
| 73 | u64 after_change; | ||
| 71 | }; | 74 | }; |
| 72 | 75 | ||
| 73 | struct nfsd4_access { | 76 | struct nfsd4_access { |
| @@ -363,17 +366,6 @@ struct nfsd4_exchange_id { | |||
| 363 | int spa_how; | 366 | int spa_how; |
| 364 | }; | 367 | }; |
| 365 | 368 | ||
| 366 | struct nfsd4_channel_attrs { | ||
| 367 | u32 headerpadsz; | ||
| 368 | u32 maxreq_sz; | ||
| 369 | u32 maxresp_sz; | ||
| 370 | u32 maxresp_cached; | ||
| 371 | u32 maxops; | ||
| 372 | u32 maxreqs; | ||
| 373 | u32 nr_rdma_attrs; | ||
| 374 | u32 rdma_attrs; | ||
| 375 | }; | ||
| 376 | |||
| 377 | struct nfsd4_create_session { | 369 | struct nfsd4_create_session { |
| 378 | clientid_t clientid; | 370 | clientid_t clientid; |
| 379 | struct nfs4_sessionid sessionid; | 371 | struct nfs4_sessionid sessionid; |
| @@ -503,10 +495,16 @@ set_change_info(struct nfsd4_change_info *cinfo, struct svc_fh *fhp) | |||
| 503 | { | 495 | { |
| 504 | BUG_ON(!fhp->fh_pre_saved || !fhp->fh_post_saved); | 496 | BUG_ON(!fhp->fh_pre_saved || !fhp->fh_post_saved); |
| 505 | cinfo->atomic = 1; | 497 | cinfo->atomic = 1; |
| 506 | cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec; | 498 | cinfo->change_supported = IS_I_VERSION(fhp->fh_dentry->d_inode); |
| 507 | cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec; | 499 | if (cinfo->change_supported) { |
| 508 | cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec; | 500 | cinfo->before_change = fhp->fh_pre_change; |
| 509 | cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec; | 501 | cinfo->after_change = fhp->fh_post_change; |
| 502 | } else { | ||
| 503 | cinfo->before_ctime_sec = fhp->fh_pre_ctime.tv_sec; | ||
| 504 | cinfo->before_ctime_nsec = fhp->fh_pre_ctime.tv_nsec; | ||
| 505 | cinfo->after_ctime_sec = fhp->fh_post_attr.ctime.tv_sec; | ||
| 506 | cinfo->after_ctime_nsec = fhp->fh_post_attr.ctime.tv_nsec; | ||
| 507 | } | ||
| 510 | } | 508 | } |
| 511 | 509 | ||
| 512 | int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *); | 510 | int nfs4svc_encode_voidres(struct svc_rqst *, __be32 *, void *); |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 092e82e0048c..93a7c08f869d 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
| @@ -15,7 +15,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | |||
| 15 | { | 15 | { |
| 16 | struct pci_bus *pbus = pdev->bus; | 16 | struct pci_bus *pbus = pdev->bus; |
| 17 | /* Find a PCI root bus */ | 17 | /* Find a PCI root bus */ |
| 18 | while (pbus->parent) | 18 | while (!pci_is_root_bus(pbus)) |
| 19 | pbus = pbus->parent; | 19 | pbus = pbus->parent; |
| 20 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 20 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
| 21 | pbus->number); | 21 | pbus->number); |
| @@ -23,7 +23,7 @@ static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | |||
| 23 | 23 | ||
| 24 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) | 24 | static inline acpi_handle acpi_pci_get_bridge_handle(struct pci_bus *pbus) |
| 25 | { | 25 | { |
| 26 | if (pbus->parent) | 26 | if (!pci_is_root_bus(pbus)) |
| 27 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); | 27 | return DEVICE_ACPI_HANDLE(&(pbus->self->dev)); |
| 28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), | 28 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pbus), |
| 29 | pbus->number); | 29 | pbus->number); |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 8e366bb0705f..d304ddf412d0 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
| @@ -196,6 +196,7 @@ struct pci_cap_saved_state { | |||
| 196 | struct pcie_link_state; | 196 | struct pcie_link_state; |
| 197 | struct pci_vpd; | 197 | struct pci_vpd; |
| 198 | struct pci_sriov; | 198 | struct pci_sriov; |
| 199 | struct pci_ats; | ||
| 199 | 200 | ||
| 200 | /* | 201 | /* |
| 201 | * The pci_dev structure is used to describe PCI devices. | 202 | * The pci_dev structure is used to describe PCI devices. |
| @@ -293,6 +294,7 @@ struct pci_dev { | |||
| 293 | struct pci_sriov *sriov; /* SR-IOV capability related */ | 294 | struct pci_sriov *sriov; /* SR-IOV capability related */ |
| 294 | struct pci_dev *physfn; /* the PF this VF is associated with */ | 295 | struct pci_dev *physfn; /* the PF this VF is associated with */ |
| 295 | }; | 296 | }; |
| 297 | struct pci_ats *ats; /* Address Translation Service */ | ||
| 296 | #endif | 298 | #endif |
| 297 | }; | 299 | }; |
| 298 | 300 | ||
| @@ -607,8 +609,6 @@ extern void pci_sort_breadthfirst(void); | |||
| 607 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, | 609 | struct pci_dev __deprecated *pci_find_device(unsigned int vendor, |
| 608 | unsigned int device, | 610 | unsigned int device, |
| 609 | struct pci_dev *from); | 611 | struct pci_dev *from); |
| 610 | struct pci_dev __deprecated *pci_find_slot(unsigned int bus, | ||
| 611 | unsigned int devfn); | ||
| 612 | #endif /* CONFIG_PCI_LEGACY */ | 612 | #endif /* CONFIG_PCI_LEGACY */ |
| 613 | 613 | ||
| 614 | enum pci_lost_interrupt_reason { | 614 | enum pci_lost_interrupt_reason { |
| @@ -647,6 +647,7 @@ int pci_bus_write_config_word(struct pci_bus *bus, unsigned int devfn, | |||
| 647 | int where, u16 val); | 647 | int where, u16 val); |
| 648 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, | 648 | int pci_bus_write_config_dword(struct pci_bus *bus, unsigned int devfn, |
| 649 | int where, u32 val); | 649 | int where, u32 val); |
| 650 | struct pci_ops *pci_bus_set_ops(struct pci_bus *bus, struct pci_ops *ops); | ||
| 650 | 651 | ||
| 651 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) | 652 | static inline int pci_read_config_byte(struct pci_dev *dev, int where, u8 *val) |
| 652 | { | 653 | { |
| @@ -711,8 +712,8 @@ int pcix_get_mmrbc(struct pci_dev *dev); | |||
| 711 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); | 712 | int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc); |
| 712 | int pcie_get_readrq(struct pci_dev *dev); | 713 | int pcie_get_readrq(struct pci_dev *dev); |
| 713 | int pcie_set_readrq(struct pci_dev *dev, int rq); | 714 | int pcie_set_readrq(struct pci_dev *dev, int rq); |
| 715 | int __pci_reset_function(struct pci_dev *dev); | ||
| 714 | int pci_reset_function(struct pci_dev *dev); | 716 | int pci_reset_function(struct pci_dev *dev); |
| 715 | int pci_execute_reset_function(struct pci_dev *dev); | ||
| 716 | void pci_update_resource(struct pci_dev *dev, int resno); | 717 | void pci_update_resource(struct pci_dev *dev, int resno); |
| 717 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); | 718 | int __must_check pci_assign_resource(struct pci_dev *dev, int i); |
| 718 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); | 719 | int pci_select_bars(struct pci_dev *dev, unsigned long flags); |
| @@ -732,7 +733,7 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state); | |||
| 732 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); | 733 | pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state); |
| 733 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); | 734 | bool pci_pme_capable(struct pci_dev *dev, pci_power_t state); |
| 734 | void pci_pme_active(struct pci_dev *dev, bool enable); | 735 | void pci_pme_active(struct pci_dev *dev, bool enable); |
| 735 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable); | 736 | int pci_enable_wake(struct pci_dev *dev, pci_power_t state, bool enable); |
| 736 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); | 737 | int pci_wake_from_d3(struct pci_dev *dev, bool enable); |
| 737 | pci_power_t pci_target_state(struct pci_dev *dev); | 738 | pci_power_t pci_target_state(struct pci_dev *dev); |
| 738 | int pci_prepare_to_sleep(struct pci_dev *dev); | 739 | int pci_prepare_to_sleep(struct pci_dev *dev); |
| @@ -798,7 +799,7 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, | |||
| 798 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | 799 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, |
| 799 | int pass); | 800 | int pass); |
| 800 | 801 | ||
| 801 | void pci_walk_bus(struct pci_bus *top, void (*cb)(struct pci_dev *, void *), | 802 | void pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), |
| 802 | void *userdata); | 803 | void *userdata); |
| 803 | int pci_cfg_space_size_ext(struct pci_dev *dev); | 804 | int pci_cfg_space_size_ext(struct pci_dev *dev); |
| 804 | int pci_cfg_space_size(struct pci_dev *dev); | 805 | int pci_cfg_space_size(struct pci_dev *dev); |
| @@ -888,6 +889,17 @@ static inline int pcie_aspm_enabled(void) | |||
| 888 | extern int pcie_aspm_enabled(void); | 889 | extern int pcie_aspm_enabled(void); |
| 889 | #endif | 890 | #endif |
| 890 | 891 | ||
| 892 | #ifndef CONFIG_PCIE_ECRC | ||
| 893 | static inline void pcie_set_ecrc_checking(struct pci_dev *dev) | ||
| 894 | { | ||
| 895 | return; | ||
| 896 | } | ||
| 897 | static inline void pcie_ecrc_get_policy(char *str) {}; | ||
| 898 | #else | ||
| 899 | extern void pcie_set_ecrc_checking(struct pci_dev *dev); | ||
| 900 | extern void pcie_ecrc_get_policy(char *str); | ||
| 901 | #endif | ||
| 902 | |||
| 891 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) | 903 | #define pci_enable_msi(pdev) pci_enable_msi_block(pdev, 1) |
| 892 | 904 | ||
| 893 | #ifdef CONFIG_HT_IRQ | 905 | #ifdef CONFIG_HT_IRQ |
| @@ -944,12 +956,6 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor, | |||
| 944 | return NULL; | 956 | return NULL; |
| 945 | } | 957 | } |
| 946 | 958 | ||
| 947 | static inline struct pci_dev *pci_find_slot(unsigned int bus, | ||
| 948 | unsigned int devfn) | ||
| 949 | { | ||
| 950 | return NULL; | ||
| 951 | } | ||
| 952 | |||
| 953 | static inline struct pci_dev *pci_get_device(unsigned int vendor, | 959 | static inline struct pci_dev *pci_get_device(unsigned int vendor, |
| 954 | unsigned int device, | 960 | unsigned int device, |
| 955 | struct pci_dev *from) | 961 | struct pci_dev *from) |
| @@ -1105,6 +1111,10 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, | |||
| 1105 | 1111 | ||
| 1106 | #include <asm/pci.h> | 1112 | #include <asm/pci.h> |
| 1107 | 1113 | ||
| 1114 | #ifndef PCIBIOS_MAX_MEM_32 | ||
| 1115 | #define PCIBIOS_MAX_MEM_32 (-1) | ||
| 1116 | #endif | ||
| 1117 | |||
| 1108 | /* these helpers provide future and backwards compatibility | 1118 | /* these helpers provide future and backwards compatibility |
| 1109 | * for accessing popular PCI BAR info */ | 1119 | * for accessing popular PCI BAR info */ |
| 1110 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) | 1120 | #define pci_resource_start(dev, bar) ((dev)->resource[(bar)].start) |
| @@ -1261,5 +1271,10 @@ static inline irqreturn_t pci_sriov_migration(struct pci_dev *dev) | |||
| 1261 | } | 1271 | } |
| 1262 | #endif | 1272 | #endif |
| 1263 | 1273 | ||
| 1274 | #if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE) | ||
| 1275 | extern void pci_hp_create_module_link(struct pci_slot *pci_slot); | ||
| 1276 | extern void pci_hp_remove_module_link(struct pci_slot *pci_slot); | ||
| 1277 | #endif | ||
| 1278 | |||
| 1264 | #endif /* __KERNEL__ */ | 1279 | #endif /* __KERNEL__ */ |
| 1265 | #endif /* LINUX_PCI_H */ | 1280 | #endif /* LINUX_PCI_H */ |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index 20998746518e..b3646cd7fd5a 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
| @@ -66,17 +66,10 @@ enum pcie_link_speed { | |||
| 66 | PCIE_LNK_SPEED_UNKNOWN = 0xFF, | 66 | PCIE_LNK_SPEED_UNKNOWN = 0xFF, |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | struct hotplug_slot; | ||
| 70 | struct hotplug_slot_attribute { | ||
| 71 | struct attribute attr; | ||
| 72 | ssize_t (*show)(struct hotplug_slot *, char *); | ||
| 73 | ssize_t (*store)(struct hotplug_slot *, const char *, size_t); | ||
| 74 | }; | ||
| 75 | #define to_hotplug_attr(n) container_of(n, struct hotplug_slot_attribute, attr); | ||
| 76 | |||
| 77 | /** | 69 | /** |
| 78 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use | 70 | * struct hotplug_slot_ops -the callbacks that the hotplug pci core can use |
| 79 | * @owner: The module owner of this structure | 71 | * @owner: The module owner of this structure |
| 72 | * @mod_name: The module name (KBUILD_MODNAME) of this structure | ||
| 80 | * @enable_slot: Called when the user wants to enable a specific pci slot | 73 | * @enable_slot: Called when the user wants to enable a specific pci slot |
| 81 | * @disable_slot: Called when the user wants to disable a specific pci slot | 74 | * @disable_slot: Called when the user wants to disable a specific pci slot |
| 82 | * @set_attention_status: Called to set the specific slot's attention LED to | 75 | * @set_attention_status: Called to set the specific slot's attention LED to |
| @@ -109,6 +102,7 @@ struct hotplug_slot_attribute { | |||
| 109 | */ | 102 | */ |
| 110 | struct hotplug_slot_ops { | 103 | struct hotplug_slot_ops { |
| 111 | struct module *owner; | 104 | struct module *owner; |
| 105 | const char *mod_name; | ||
| 112 | int (*enable_slot) (struct hotplug_slot *slot); | 106 | int (*enable_slot) (struct hotplug_slot *slot); |
| 113 | int (*disable_slot) (struct hotplug_slot *slot); | 107 | int (*disable_slot) (struct hotplug_slot *slot); |
| 114 | int (*set_attention_status) (struct hotplug_slot *slot, u8 value); | 108 | int (*set_attention_status) (struct hotplug_slot *slot, u8 value); |
| @@ -167,12 +161,21 @@ static inline const char *hotplug_slot_name(const struct hotplug_slot *slot) | |||
| 167 | return pci_slot_name(slot->pci_slot); | 161 | return pci_slot_name(slot->pci_slot); |
| 168 | } | 162 | } |
| 169 | 163 | ||
| 170 | extern int pci_hp_register(struct hotplug_slot *, struct pci_bus *, int nr, | 164 | extern int __pci_hp_register(struct hotplug_slot *slot, struct pci_bus *pbus, |
| 171 | const char *name); | 165 | int nr, const char *name, |
| 166 | struct module *owner, const char *mod_name); | ||
| 172 | extern int pci_hp_deregister(struct hotplug_slot *slot); | 167 | extern int pci_hp_deregister(struct hotplug_slot *slot); |
| 173 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 168 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
| 174 | struct hotplug_slot_info *info); | 169 | struct hotplug_slot_info *info); |
| 175 | 170 | ||
| 171 | static inline int pci_hp_register(struct hotplug_slot *slot, | ||
| 172 | struct pci_bus *pbus, | ||
| 173 | int devnr, const char *name) | ||
| 174 | { | ||
| 175 | return __pci_hp_register(slot, pbus, devnr, name, | ||
| 176 | THIS_MODULE, KBUILD_MODNAME); | ||
| 177 | } | ||
| 178 | |||
| 176 | /* PCI Setting Record (Type 0) */ | 179 | /* PCI Setting Record (Type 0) */ |
| 177 | struct hpp_type0 { | 180 | struct hpp_type0 { |
| 178 | u32 revision; | 181 | u32 revision; |
diff --git a/include/linux/pci_regs.h b/include/linux/pci_regs.h index 616bf8b3c8b5..fcaee42c7ac2 100644 --- a/include/linux/pci_regs.h +++ b/include/linux/pci_regs.h | |||
| @@ -295,8 +295,9 @@ | |||
| 295 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ | 295 | #define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ |
| 296 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ | 296 | #define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ |
| 297 | #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ | 297 | #define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ |
| 298 | #define PCI_MSI_MASK_32 12 /* Mask bits register for 32-bit devices */ | ||
| 298 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ | 299 | #define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ |
| 299 | #define PCI_MSI_MASK_BIT 16 /* Mask bits register */ | 300 | #define PCI_MSI_MASK_64 16 /* Mask bits register for 64-bit devices */ |
| 300 | 301 | ||
| 301 | /* MSI-X registers (these are at offset PCI_MSIX_FLAGS) */ | 302 | /* MSI-X registers (these are at offset PCI_MSIX_FLAGS) */ |
| 302 | #define PCI_MSIX_FLAGS 2 | 303 | #define PCI_MSIX_FLAGS 2 |
| @@ -304,7 +305,6 @@ | |||
| 304 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) | 305 | #define PCI_MSIX_FLAGS_ENABLE (1 << 15) |
| 305 | #define PCI_MSIX_FLAGS_MASKALL (1 << 14) | 306 | #define PCI_MSIX_FLAGS_MASKALL (1 << 14) |
| 306 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) | 307 | #define PCI_MSIX_FLAGS_BIRMASK (7 << 0) |
| 307 | #define PCI_MSIX_FLAGS_BITMASK (1 << 0) | ||
| 308 | 308 | ||
| 309 | /* CompactPCI Hotswap Register */ | 309 | /* CompactPCI Hotswap Register */ |
| 310 | 310 | ||
| @@ -502,6 +502,7 @@ | |||
| 502 | #define PCI_EXT_CAP_ID_DSN 3 | 502 | #define PCI_EXT_CAP_ID_DSN 3 |
| 503 | #define PCI_EXT_CAP_ID_PWR 4 | 503 | #define PCI_EXT_CAP_ID_PWR 4 |
| 504 | #define PCI_EXT_CAP_ID_ARI 14 | 504 | #define PCI_EXT_CAP_ID_ARI 14 |
| 505 | #define PCI_EXT_CAP_ID_ATS 15 | ||
| 505 | #define PCI_EXT_CAP_ID_SRIOV 16 | 506 | #define PCI_EXT_CAP_ID_SRIOV 16 |
| 506 | 507 | ||
| 507 | /* Advanced Error Reporting */ | 508 | /* Advanced Error Reporting */ |
| @@ -620,6 +621,15 @@ | |||
| 620 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ | 621 | #define PCI_ARI_CTRL_ACS 0x0002 /* ACS Function Groups Enable */ |
| 621 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ | 622 | #define PCI_ARI_CTRL_FG(x) (((x) >> 4) & 7) /* Function Group */ |
| 622 | 623 | ||
| 624 | /* Address Translation Service */ | ||
| 625 | #define PCI_ATS_CAP 0x04 /* ATS Capability Register */ | ||
| 626 | #define PCI_ATS_CAP_QDEP(x) ((x) & 0x1f) /* Invalidate Queue Depth */ | ||
| 627 | #define PCI_ATS_MAX_QDEP 32 /* Max Invalidate Queue Depth */ | ||
| 628 | #define PCI_ATS_CTRL 0x06 /* ATS Control Register */ | ||
| 629 | #define PCI_ATS_CTRL_ENABLE 0x8000 /* ATS Enable */ | ||
| 630 | #define PCI_ATS_CTRL_STU(x) ((x) & 0x1f) /* Smallest Translation Unit */ | ||
| 631 | #define PCI_ATS_MIN_STU 12 /* shift of minimum STU block */ | ||
| 632 | |||
| 623 | /* Single Root I/O Virtualization */ | 633 | /* Single Root I/O Virtualization */ |
| 624 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ | 634 | #define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */ |
| 625 | #define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ | 635 | #define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */ |
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h index 16e39c7a67fc..e73e2429a1b1 100644 --- a/include/linux/rfkill.h +++ b/include/linux/rfkill.h | |||
| @@ -160,8 +160,9 @@ struct rfkill * __must_check rfkill_alloc(const char *name, | |||
| 160 | * the rfkill structure. Before calling this function the driver needs | 160 | * the rfkill structure. Before calling this function the driver needs |
| 161 | * to be ready to service method calls from rfkill. | 161 | * to be ready to service method calls from rfkill. |
| 162 | * | 162 | * |
| 163 | * If the software blocked state is not set before registration, | 163 | * If rfkill_init_sw_state() is not called before registration, |
| 164 | * set_block will be called to initialize it to a default value. | 164 | * set_block() will be called to initialize the software blocked state |
| 165 | * to a default value. | ||
| 165 | * | 166 | * |
| 166 | * If the hardware blocked state is not set before registration, | 167 | * If the hardware blocked state is not set before registration, |
| 167 | * it is assumed to be unblocked. | 168 | * it is assumed to be unblocked. |
| @@ -234,9 +235,11 @@ bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); | |||
| 234 | * rfkill drivers that get events when the soft-blocked state changes | 235 | * rfkill drivers that get events when the soft-blocked state changes |
| 235 | * (yes, some platforms directly act on input but allow changing again) | 236 | * (yes, some platforms directly act on input but allow changing again) |
| 236 | * use this function to notify the rfkill core (and through that also | 237 | * use this function to notify the rfkill core (and through that also |
| 237 | * userspace) of the current state. It is not necessary to notify on | 238 | * userspace) of the current state. |
| 238 | * resume; since hibernation can always change the soft-blocked state, | 239 | * |
| 239 | * the rfkill core will unconditionally restore the previous state. | 240 | * Drivers should also call this function after resume if the state has |
| 241 | * been changed by the user. This only makes sense for "persistent" | ||
| 242 | * devices (see rfkill_init_sw_state()). | ||
| 240 | * | 243 | * |
| 241 | * This function can be called in any context, even from within rfkill | 244 | * This function can be called in any context, even from within rfkill |
| 242 | * callbacks. | 245 | * callbacks. |
| @@ -247,6 +250,22 @@ bool __must_check rfkill_set_hw_state(struct rfkill *rfkill, bool blocked); | |||
| 247 | bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked); | 250 | bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked); |
| 248 | 251 | ||
| 249 | /** | 252 | /** |
| 253 | * rfkill_init_sw_state - Initialize persistent software block state | ||
| 254 | * @rfkill: pointer to the rfkill class to modify. | ||
| 255 | * @state: the current software block state to set | ||
| 256 | * | ||
| 257 | * rfkill drivers that preserve their software block state over power off | ||
| 258 | * use this function to notify the rfkill core (and through that also | ||
| 259 | * userspace) of their initial state. It should only be used before | ||
| 260 | * registration. | ||
| 261 | * | ||
| 262 | * In addition, it marks the device as "persistent", an attribute which | ||
| 263 | * can be read by userspace. Persistent devices are expected to preserve | ||
| 264 | * their own state when suspended. | ||
| 265 | */ | ||
| 266 | void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked); | ||
| 267 | |||
| 268 | /** | ||
| 250 | * rfkill_set_states - Set the internal rfkill block states | 269 | * rfkill_set_states - Set the internal rfkill block states |
| 251 | * @rfkill: pointer to the rfkill class to modify. | 270 | * @rfkill: pointer to the rfkill class to modify. |
| 252 | * @sw: the current software block state to set | 271 | * @sw: the current software block state to set |
| @@ -307,6 +326,10 @@ static inline bool rfkill_set_sw_state(struct rfkill *rfkill, bool blocked) | |||
| 307 | return blocked; | 326 | return blocked; |
| 308 | } | 327 | } |
| 309 | 328 | ||
| 329 | static inline void rfkill_init_sw_state(struct rfkill *rfkill, bool blocked) | ||
| 330 | { | ||
| 331 | } | ||
| 332 | |||
| 310 | static inline void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw) | 333 | static inline void rfkill_set_states(struct rfkill *rfkill, bool sw, bool hw) |
| 311 | { | 334 | { |
| 312 | } | 335 | } |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 6fd80c4243f1..23d2fb051f97 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -171,6 +171,9 @@ | |||
| 171 | /* Timberdale UART */ | 171 | /* Timberdale UART */ |
| 172 | #define PORT_TIMBUART 87 | 172 | #define PORT_TIMBUART 87 |
| 173 | 173 | ||
| 174 | /* Qualcomm MSM SoCs */ | ||
| 175 | #define PORT_MSM 88 | ||
| 176 | |||
| 174 | #ifdef __KERNEL__ | 177 | #ifdef __KERNEL__ |
| 175 | 178 | ||
| 176 | #include <linux/compiler.h> | 179 | #include <linux/compiler.h> |
diff --git a/include/linux/serial_reg.h b/include/linux/serial_reg.h index 96c0d93fc2ca..850db2e80510 100644 --- a/include/linux/serial_reg.h +++ b/include/linux/serial_reg.h | |||
| @@ -323,6 +323,7 @@ | |||
| 323 | #define UART_OMAP_MVER 0x14 /* Module version register */ | 323 | #define UART_OMAP_MVER 0x14 /* Module version register */ |
| 324 | #define UART_OMAP_SYSC 0x15 /* System configuration register */ | 324 | #define UART_OMAP_SYSC 0x15 /* System configuration register */ |
| 325 | #define UART_OMAP_SYSS 0x16 /* System status register */ | 325 | #define UART_OMAP_SYSS 0x16 /* System status register */ |
| 326 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | ||
| 326 | 327 | ||
| 327 | #endif /* _LINUX_SERIAL_REG_H */ | 328 | #endif /* _LINUX_SERIAL_REG_H */ |
| 328 | 329 | ||
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h new file mode 100644 index 000000000000..6508f0dc0eff --- /dev/null +++ b/include/linux/sunrpc/bc_xprt.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | /****************************************************************************** | ||
| 2 | |||
| 3 | (c) 2008 NetApp. All Rights Reserved. | ||
| 4 | |||
| 5 | NetApp provides this source code under the GPL v2 License. | ||
| 6 | The GPL v2 license is available at | ||
| 7 | http://opensource.org/licenses/gpl-license.php. | ||
| 8 | |||
| 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 10 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 11 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
| 12 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
| 13 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| 14 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| 15 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
| 16 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 17 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
| 18 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
| 19 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 20 | |||
| 21 | ******************************************************************************/ | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Functions to create and manage the backchannel | ||
| 25 | */ | ||
| 26 | |||
| 27 | #ifndef _LINUX_SUNRPC_BC_XPRT_H | ||
| 28 | #define _LINUX_SUNRPC_BC_XPRT_H | ||
| 29 | |||
| 30 | #include <linux/sunrpc/svcsock.h> | ||
| 31 | #include <linux/sunrpc/xprt.h> | ||
| 32 | #include <linux/sunrpc/sched.h> | ||
| 33 | |||
| 34 | #ifdef CONFIG_NFS_V4_1 | ||
| 35 | struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | ||
| 36 | void xprt_free_bc_request(struct rpc_rqst *req); | ||
| 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | ||
| 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | ||
| 39 | void bc_release_request(struct rpc_task *); | ||
| 40 | int bc_send(struct rpc_rqst *req); | ||
| 41 | #else /* CONFIG_NFS_V4_1 */ | ||
| 42 | static inline int xprt_setup_backchannel(struct rpc_xprt *xprt, | ||
| 43 | unsigned int min_reqs) | ||
| 44 | { | ||
| 45 | return 0; | ||
| 46 | } | ||
| 47 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 48 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | ||
| 49 | |||
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index c39a21040dcb..37881f1a0bd7 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
| @@ -143,6 +143,7 @@ int rpc_call_sync(struct rpc_clnt *clnt, | |||
| 143 | const struct rpc_message *msg, int flags); | 143 | const struct rpc_message *msg, int flags); |
| 144 | struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, | 144 | struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred, |
| 145 | int flags); | 145 | int flags); |
| 146 | void rpc_restart_call_prepare(struct rpc_task *); | ||
| 146 | void rpc_restart_call(struct rpc_task *); | 147 | void rpc_restart_call(struct rpc_task *); |
| 147 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | 148 | void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); |
| 148 | size_t rpc_max_payload(struct rpc_clnt *); | 149 | size_t rpc_max_payload(struct rpc_clnt *); |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 64981a2f1cae..401097781fc0 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
| @@ -210,6 +210,8 @@ struct rpc_wait_queue { | |||
| 210 | */ | 210 | */ |
| 211 | struct rpc_task *rpc_new_task(const struct rpc_task_setup *); | 211 | struct rpc_task *rpc_new_task(const struct rpc_task_setup *); |
| 212 | struct rpc_task *rpc_run_task(const struct rpc_task_setup *); | 212 | struct rpc_task *rpc_run_task(const struct rpc_task_setup *); |
| 213 | struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req, | ||
| 214 | const struct rpc_call_ops *ops); | ||
| 213 | void rpc_put_task(struct rpc_task *); | 215 | void rpc_put_task(struct rpc_task *); |
| 214 | void rpc_exit_task(struct rpc_task *); | 216 | void rpc_exit_task(struct rpc_task *); |
| 215 | void rpc_release_calldata(const struct rpc_call_ops *, void *); | 217 | void rpc_release_calldata(const struct rpc_call_ops *, void *); |
| @@ -237,6 +239,7 @@ void rpc_show_tasks(void); | |||
| 237 | int rpc_init_mempool(void); | 239 | int rpc_init_mempool(void); |
| 238 | void rpc_destroy_mempool(void); | 240 | void rpc_destroy_mempool(void); |
| 239 | extern struct workqueue_struct *rpciod_workqueue; | 241 | extern struct workqueue_struct *rpciod_workqueue; |
| 242 | void rpc_prepare_task(struct rpc_task *task); | ||
| 240 | 243 | ||
| 241 | static inline void rpc_exit(struct rpc_task *task, int status) | 244 | static inline void rpc_exit(struct rpc_task *task, int status) |
| 242 | { | 245 | { |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index 2a30775959e9..ea8009695c69 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
| @@ -96,6 +96,15 @@ struct svc_serv { | |||
| 96 | svc_thread_fn sv_function; /* main function for threads */ | 96 | svc_thread_fn sv_function; /* main function for threads */ |
| 97 | unsigned int sv_drc_max_pages; /* Total pages for DRC */ | 97 | unsigned int sv_drc_max_pages; /* Total pages for DRC */ |
| 98 | unsigned int sv_drc_pages_used;/* DRC pages used */ | 98 | unsigned int sv_drc_pages_used;/* DRC pages used */ |
| 99 | #if defined(CONFIG_NFS_V4_1) | ||
| 100 | struct list_head sv_cb_list; /* queue for callback requests | ||
| 101 | * that arrive over the same | ||
| 102 | * connection */ | ||
| 103 | spinlock_t sv_cb_lock; /* protects the svc_cb_list */ | ||
| 104 | wait_queue_head_t sv_cb_waitq; /* sleep here if there are no | ||
| 105 | * entries in the svc_cb_list */ | ||
| 106 | struct svc_xprt *bc_xprt; | ||
| 107 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 99 | }; | 108 | }; |
| 100 | 109 | ||
| 101 | /* | 110 | /* |
| @@ -411,6 +420,8 @@ int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int); | |||
| 411 | int svc_pool_stats_open(struct svc_serv *serv, struct file *file); | 420 | int svc_pool_stats_open(struct svc_serv *serv, struct file *file); |
| 412 | void svc_destroy(struct svc_serv *); | 421 | void svc_destroy(struct svc_serv *); |
| 413 | int svc_process(struct svc_rqst *); | 422 | int svc_process(struct svc_rqst *); |
| 423 | int bc_svc_process(struct svc_serv *, struct rpc_rqst *, | ||
| 424 | struct svc_rqst *); | ||
| 414 | int svc_register(const struct svc_serv *, const int, | 425 | int svc_register(const struct svc_serv *, const int, |
| 415 | const unsigned short, const unsigned short); | 426 | const unsigned short, const unsigned short); |
| 416 | 427 | ||
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index 0d9cb6ef28b0..2223ae0b5ed5 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
| @@ -83,7 +83,7 @@ int svc_port_is_privileged(struct sockaddr *sin); | |||
| 83 | int svc_print_xprts(char *buf, int maxlen); | 83 | int svc_print_xprts(char *buf, int maxlen); |
| 84 | struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, | 84 | struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, |
| 85 | const sa_family_t af, const unsigned short port); | 85 | const sa_family_t af, const unsigned short port); |
| 86 | int svc_xprt_names(struct svc_serv *serv, char *buf, int buflen); | 86 | int svc_xprt_names(struct svc_serv *serv, char *buf, const int buflen); |
| 87 | 87 | ||
| 88 | static inline void svc_xprt_get(struct svc_xprt *xprt) | 88 | static inline void svc_xprt_get(struct svc_xprt *xprt) |
| 89 | { | 89 | { |
| @@ -118,7 +118,7 @@ static inline unsigned short svc_addr_port(const struct sockaddr *sa) | |||
| 118 | return 0; | 118 | return 0; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | static inline size_t svc_addr_len(struct sockaddr *sa) | 121 | static inline size_t svc_addr_len(const struct sockaddr *sa) |
| 122 | { | 122 | { |
| 123 | switch (sa->sa_family) { | 123 | switch (sa->sa_family) { |
| 124 | case AF_INET: | 124 | case AF_INET: |
| @@ -126,7 +126,8 @@ static inline size_t svc_addr_len(struct sockaddr *sa) | |||
| 126 | case AF_INET6: | 126 | case AF_INET6: |
| 127 | return sizeof(struct sockaddr_in6); | 127 | return sizeof(struct sockaddr_in6); |
| 128 | } | 128 | } |
| 129 | return -EAFNOSUPPORT; | 129 | |
| 130 | return 0; | ||
| 130 | } | 131 | } |
| 131 | 132 | ||
| 132 | static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) | 133 | static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 483e10380aae..04dba23c59f2 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
| @@ -38,10 +38,15 @@ int svc_recv(struct svc_rqst *, long); | |||
| 38 | int svc_send(struct svc_rqst *); | 38 | int svc_send(struct svc_rqst *); |
| 39 | void svc_drop(struct svc_rqst *); | 39 | void svc_drop(struct svc_rqst *); |
| 40 | void svc_sock_update_bufs(struct svc_serv *serv); | 40 | void svc_sock_update_bufs(struct svc_serv *serv); |
| 41 | int svc_sock_names(char *buf, struct svc_serv *serv, char *toclose); | 41 | int svc_sock_names(struct svc_serv *serv, char *buf, |
| 42 | int svc_addsock(struct svc_serv *serv, int fd, char *name_return); | 42 | const size_t buflen, |
| 43 | const char *toclose); | ||
| 44 | int svc_addsock(struct svc_serv *serv, const int fd, | ||
| 45 | char *name_return, const size_t len); | ||
| 43 | void svc_init_xprt_sock(void); | 46 | void svc_init_xprt_sock(void); |
| 44 | void svc_cleanup_xprt_sock(void); | 47 | void svc_cleanup_xprt_sock(void); |
| 48 | struct svc_xprt *svc_sock_create(struct svc_serv *serv, int prot); | ||
| 49 | void svc_sock_destroy(struct svc_xprt *); | ||
| 45 | 50 | ||
| 46 | /* | 51 | /* |
| 47 | * svc_makesock socket characteristics | 52 | * svc_makesock socket characteristics |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 08afe43118f4..1175d58efc2e 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
| @@ -67,7 +67,8 @@ struct rpc_rqst { | |||
| 67 | struct rpc_task * rq_task; /* RPC task data */ | 67 | struct rpc_task * rq_task; /* RPC task data */ |
| 68 | __be32 rq_xid; /* request XID */ | 68 | __be32 rq_xid; /* request XID */ |
| 69 | int rq_cong; /* has incremented xprt->cong */ | 69 | int rq_cong; /* has incremented xprt->cong */ |
| 70 | int rq_received; /* receive completed */ | 70 | int rq_reply_bytes_recvd; /* number of reply */ |
| 71 | /* bytes received */ | ||
| 71 | u32 rq_seqno; /* gss seq no. used on req. */ | 72 | u32 rq_seqno; /* gss seq no. used on req. */ |
| 72 | int rq_enc_pages_num; | 73 | int rq_enc_pages_num; |
| 73 | struct page **rq_enc_pages; /* scratch pages for use by | 74 | struct page **rq_enc_pages; /* scratch pages for use by |
| @@ -97,6 +98,12 @@ struct rpc_rqst { | |||
| 97 | 98 | ||
| 98 | unsigned long rq_xtime; /* when transmitted */ | 99 | unsigned long rq_xtime; /* when transmitted */ |
| 99 | int rq_ntrans; | 100 | int rq_ntrans; |
| 101 | |||
| 102 | #if defined(CONFIG_NFS_V4_1) | ||
| 103 | struct list_head rq_bc_list; /* Callback service list */ | ||
| 104 | unsigned long rq_bc_pa_state; /* Backchannel prealloc state */ | ||
| 105 | struct list_head rq_bc_pa_list; /* Backchannel prealloc list */ | ||
| 106 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 100 | }; | 107 | }; |
| 101 | #define rq_svec rq_snd_buf.head | 108 | #define rq_svec rq_snd_buf.head |
| 102 | #define rq_slen rq_snd_buf.len | 109 | #define rq_slen rq_snd_buf.len |
| @@ -174,6 +181,15 @@ struct rpc_xprt { | |||
| 174 | spinlock_t reserve_lock; /* lock slot table */ | 181 | spinlock_t reserve_lock; /* lock slot table */ |
| 175 | u32 xid; /* Next XID value to use */ | 182 | u32 xid; /* Next XID value to use */ |
| 176 | struct rpc_task * snd_task; /* Task blocked in send */ | 183 | struct rpc_task * snd_task; /* Task blocked in send */ |
| 184 | #if defined(CONFIG_NFS_V4_1) | ||
| 185 | struct svc_serv *bc_serv; /* The RPC service which will */ | ||
| 186 | /* process the callback */ | ||
| 187 | unsigned int bc_alloc_count; /* Total number of preallocs */ | ||
| 188 | spinlock_t bc_pa_lock; /* Protects the preallocated | ||
| 189 | * items */ | ||
| 190 | struct list_head bc_pa_list; /* List of preallocated | ||
| 191 | * backchannel rpc_rqst's */ | ||
| 192 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 177 | struct list_head recv; | 193 | struct list_head recv; |
| 178 | 194 | ||
| 179 | struct { | 195 | struct { |
| @@ -192,6 +208,26 @@ struct rpc_xprt { | |||
| 192 | const char *address_strings[RPC_DISPLAY_MAX]; | 208 | const char *address_strings[RPC_DISPLAY_MAX]; |
| 193 | }; | 209 | }; |
| 194 | 210 | ||
| 211 | #if defined(CONFIG_NFS_V4_1) | ||
| 212 | /* | ||
| 213 | * Backchannel flags | ||
| 214 | */ | ||
| 215 | #define RPC_BC_PA_IN_USE 0x0001 /* Preallocated backchannel */ | ||
| 216 | /* buffer in use */ | ||
| 217 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 218 | |||
| 219 | #if defined(CONFIG_NFS_V4_1) | ||
| 220 | static inline int bc_prealloc(struct rpc_rqst *req) | ||
| 221 | { | ||
| 222 | return test_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); | ||
| 223 | } | ||
| 224 | #else | ||
| 225 | static inline int bc_prealloc(struct rpc_rqst *req) | ||
| 226 | { | ||
| 227 | return 0; | ||
| 228 | } | ||
| 229 | #endif /* CONFIG_NFS_V4_1 */ | ||
| 230 | |||
| 195 | struct xprt_create { | 231 | struct xprt_create { |
| 196 | int ident; /* XPRT_TRANSPORT identifier */ | 232 | int ident; /* XPRT_TRANSPORT identifier */ |
| 197 | struct sockaddr * srcaddr; /* optional local address */ | 233 | struct sockaddr * srcaddr; /* optional local address */ |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index f24eceecc5a6..8a025d510904 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
| @@ -348,6 +348,7 @@ struct v4l2_pix_format { | |||
| 348 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ | 348 | #define V4L2_PIX_FMT_SQ905C v4l2_fourcc('9', '0', '5', 'C') /* compressed RGGB bayer */ |
| 349 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ | 349 | #define V4L2_PIX_FMT_PJPG v4l2_fourcc('P', 'J', 'P', 'G') /* Pixart 73xx JPEG */ |
| 350 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ | 350 | #define V4L2_PIX_FMT_YVYU v4l2_fourcc('Y', 'V', 'Y', 'U') /* 16 YVU 4:2:2 */ |
| 351 | #define V4L2_PIX_FMT_OV511 v4l2_fourcc('O', '5', '1', '1') /* ov511 JPEG */ | ||
| 351 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ | 352 | #define V4L2_PIX_FMT_OV518 v4l2_fourcc('O', '5', '1', '8') /* ov518 JPEG */ |
| 352 | 353 | ||
| 353 | /* | 354 | /* |
| @@ -894,9 +895,10 @@ enum v4l2_colorfx { | |||
| 894 | V4L2_COLORFX_BW = 1, | 895 | V4L2_COLORFX_BW = 1, |
| 895 | V4L2_COLORFX_SEPIA = 2, | 896 | V4L2_COLORFX_SEPIA = 2, |
| 896 | }; | 897 | }; |
| 898 | #define V4L2_CID_AUTOBRIGHTNESS (V4L2_CID_BASE+32) | ||
| 897 | 899 | ||
| 898 | /* last CID + 1 */ | 900 | /* last CID + 1 */ |
| 899 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+32) | 901 | #define V4L2_CID_LASTP1 (V4L2_CID_BASE+33) |
| 900 | 902 | ||
| 901 | /* MPEG-class control IDs defined by V4L2 */ | 903 | /* MPEG-class control IDs defined by V4L2 */ |
| 902 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) | 904 | #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) |
diff --git a/include/media/ir-common.h b/include/media/ir-common.h index 7b5b91f60425..9dcb632f6083 100644 --- a/include/media/ir-common.h +++ b/include/media/ir-common.h | |||
| @@ -162,6 +162,8 @@ extern IR_KEYTAB_TYPE ir_codes_ati_tv_wonder_hd_600[IR_KEYTAB_SIZE]; | |||
| 162 | extern IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE]; | 162 | extern IR_KEYTAB_TYPE ir_codes_kworld_plus_tv_analog[IR_KEYTAB_SIZE]; |
| 163 | extern IR_KEYTAB_TYPE ir_codes_kaiomy[IR_KEYTAB_SIZE]; | 163 | extern IR_KEYTAB_TYPE ir_codes_kaiomy[IR_KEYTAB_SIZE]; |
| 164 | extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE]; | 164 | extern IR_KEYTAB_TYPE ir_codes_dm1105_nec[IR_KEYTAB_SIZE]; |
| 165 | extern IR_KEYTAB_TYPE ir_codes_evga_indtube[IR_KEYTAB_SIZE]; | ||
| 166 | |||
| 165 | #endif | 167 | #endif |
| 166 | 168 | ||
| 167 | /* | 169 | /* |
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index c48c24e4d0fa..33a18426ab9b 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
| @@ -153,6 +153,22 @@ struct v4l2_subdev *v4l2_i2c_new_probed_subdev(struct v4l2_device *v4l2_dev, | |||
| 153 | struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev, | 153 | struct v4l2_subdev *v4l2_i2c_new_probed_subdev_addr(struct v4l2_device *v4l2_dev, |
| 154 | struct i2c_adapter *adapter, | 154 | struct i2c_adapter *adapter, |
| 155 | const char *module_name, const char *client_type, u8 addr); | 155 | const char *module_name, const char *client_type, u8 addr); |
| 156 | |||
| 157 | /* Load an i2c module and return an initialized v4l2_subdev struct. | ||
| 158 | Only call request_module if module_name != NULL. | ||
| 159 | The client_type argument is the name of the chip that's on the adapter. */ | ||
| 160 | struct v4l2_subdev *v4l2_i2c_new_subdev_cfg(struct v4l2_device *v4l2_dev, | ||
| 161 | struct i2c_adapter *adapter, | ||
| 162 | const char *module_name, const char *client_type, | ||
| 163 | int irq, void *platform_data, | ||
| 164 | u8 addr, const unsigned short *probe_addrs); | ||
| 165 | |||
| 166 | struct i2c_board_info; | ||
| 167 | |||
| 168 | struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, | ||
| 169 | struct i2c_adapter *adapter, const char *module_name, | ||
| 170 | struct i2c_board_info *info, const unsigned short *probe_addrs); | ||
| 171 | |||
| 156 | /* Initialize an v4l2_subdev with data from an i2c_client struct */ | 172 | /* Initialize an v4l2_subdev with data from an i2c_client struct */ |
| 157 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, | 173 | void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, |
| 158 | const struct v4l2_subdev_ops *ops); | 174 | const struct v4l2_subdev_ops *ops); |
| @@ -193,4 +209,14 @@ struct v4l2_routing { | |||
| 193 | u32 output; | 209 | u32 output; |
| 194 | }; | 210 | }; |
| 195 | 211 | ||
| 212 | /* ------------------------------------------------------------------------- */ | ||
| 213 | |||
| 214 | /* Miscellaneous helper functions */ | ||
| 215 | |||
| 216 | void v4l_bound_align_image(unsigned int *w, unsigned int wmin, | ||
| 217 | unsigned int wmax, unsigned int walign, | ||
| 218 | unsigned int *h, unsigned int hmin, | ||
| 219 | unsigned int hmax, unsigned int halign, | ||
| 220 | unsigned int salign); | ||
| 221 | |||
| 196 | #endif /* V4L2_COMMON_H_ */ | 222 | #endif /* V4L2_COMMON_H_ */ |
diff --git a/include/media/v4l2-i2c-drv.h b/include/media/v4l2-i2c-drv.h index 10a2882c3cbf..74bf741d1a9b 100644 --- a/include/media/v4l2-i2c-drv.h +++ b/include/media/v4l2-i2c-drv.h | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | /* NOTE: the full version of this header is in the v4l-dvb repository | 24 | /* NOTE: the full version of this header is in the v4l-dvb repository |
| 25 | * and allows v4l i2c drivers to be compiled on older kernels as well. | 25 | * and allows v4l i2c drivers to be compiled on pre-2.6.26 kernels. |
| 26 | * The version of this header as it appears in the kernel is a stripped | 26 | * The version of this header as it appears in the kernel is a stripped |
| 27 | * version (without all the backwards compatibility stuff) and so it | 27 | * version (without all the backwards compatibility stuff) and so it |
| 28 | * looks a bit odd. | 28 | * looks a bit odd. |
| @@ -30,6 +30,9 @@ | |||
| 30 | * If you look at the full version then you will understand the reason | 30 | * If you look at the full version then you will understand the reason |
| 31 | * for introducing this header since you really don't want to have all | 31 | * for introducing this header since you really don't want to have all |
| 32 | * the tricky backwards compatibility code in each and every i2c driver. | 32 | * the tricky backwards compatibility code in each and every i2c driver. |
| 33 | * | ||
| 34 | * If the i2c driver will never be compiled for pre-2.6.26 kernels, then | ||
| 35 | * DO NOT USE this header! Just write it as a regular i2c driver. | ||
| 33 | */ | 36 | */ |
| 34 | 37 | ||
| 35 | #ifndef __V4L2_I2C_DRV_H__ | 38 | #ifndef __V4L2_I2C_DRV_H__ |
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index a503e1cee78b..5dcb36785529 100644 --- a/include/media/v4l2-subdev.h +++ b/include/media/v4l2-subdev.h | |||
| @@ -79,7 +79,11 @@ struct v4l2_decode_vbi_line { | |||
| 79 | not yet implemented) since ops provide proper type-checking. | 79 | not yet implemented) since ops provide proper type-checking. |
| 80 | */ | 80 | */ |
| 81 | 81 | ||
| 82 | /* init: initialize the sensor registors to some sort of reasonable default | 82 | /* s_config: if set, then it is always called by the v4l2_i2c_new_subdev* |
| 83 | functions after the v4l2_subdev was registered. It is used to pass | ||
| 84 | platform data to the subdev which can be used during initialization. | ||
| 85 | |||
| 86 | init: initialize the sensor registors to some sort of reasonable default | ||
| 83 | values. Do not use for new drivers and should be removed in existing | 87 | values. Do not use for new drivers and should be removed in existing |
| 84 | drivers. | 88 | drivers. |
| 85 | 89 | ||
| @@ -96,6 +100,7 @@ struct v4l2_decode_vbi_line { | |||
| 96 | struct v4l2_subdev_core_ops { | 100 | struct v4l2_subdev_core_ops { |
| 97 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); | 101 | int (*g_chip_ident)(struct v4l2_subdev *sd, struct v4l2_dbg_chip_ident *chip); |
| 98 | int (*log_status)(struct v4l2_subdev *sd); | 102 | int (*log_status)(struct v4l2_subdev *sd); |
| 103 | int (*s_config)(struct v4l2_subdev *sd, int irq, void *platform_data); | ||
| 99 | int (*init)(struct v4l2_subdev *sd, u32 val); | 104 | int (*init)(struct v4l2_subdev *sd, u32 val); |
| 100 | int (*load_fw)(struct v4l2_subdev *sd); | 105 | int (*load_fw)(struct v4l2_subdev *sd); |
| 101 | int (*reset)(struct v4l2_subdev *sd, u32 val); | 106 | int (*reset)(struct v4l2_subdev *sd, u32 val); |
diff --git a/include/mtd/Kbuild b/include/mtd/Kbuild index 8eb018f96002..192f8fb7d546 100644 --- a/include/mtd/Kbuild +++ b/include/mtd/Kbuild | |||
| @@ -1,5 +1,4 @@ | |||
| 1 | header-y += inftl-user.h | 1 | header-y += inftl-user.h |
| 2 | header-y += jffs2-user.h | ||
| 3 | header-y += mtd-abi.h | 2 | header-y += mtd-abi.h |
| 4 | header-y += mtd-user.h | 3 | header-y += mtd-user.h |
| 5 | header-y += nftl-user.h | 4 | header-y += nftl-user.h |
diff --git a/include/mtd/jffs2-user.h b/include/mtd/jffs2-user.h deleted file mode 100644 index fa94b0eb67c1..000000000000 --- a/include/mtd/jffs2-user.h +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * JFFS2 definitions for use in user space only | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef __JFFS2_USER_H__ | ||
| 6 | #define __JFFS2_USER_H__ | ||
| 7 | |||
| 8 | /* This file is blessed for inclusion by userspace */ | ||
| 9 | #include <linux/jffs2.h> | ||
| 10 | #include <linux/types.h> | ||
| 11 | #include <endian.h> | ||
| 12 | #include <byteswap.h> | ||
| 13 | |||
| 14 | #undef cpu_to_je16 | ||
| 15 | #undef cpu_to_je32 | ||
| 16 | #undef cpu_to_jemode | ||
| 17 | #undef je16_to_cpu | ||
| 18 | #undef je32_to_cpu | ||
| 19 | #undef jemode_to_cpu | ||
| 20 | |||
| 21 | extern int target_endian; | ||
| 22 | |||
| 23 | #define t16(x) ({ __u16 __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_16(__b); }) | ||
| 24 | #define t32(x) ({ __u32 __b = (x); (target_endian==__BYTE_ORDER)?__b:bswap_32(__b); }) | ||
| 25 | |||
| 26 | #define cpu_to_je16(x) ((jint16_t){t16(x)}) | ||
| 27 | #define cpu_to_je32(x) ((jint32_t){t32(x)}) | ||
| 28 | #define cpu_to_jemode(x) ((jmode_t){t32(x)}) | ||
| 29 | |||
| 30 | #define je16_to_cpu(x) (t16((x).v16)) | ||
| 31 | #define je32_to_cpu(x) (t32((x).v32)) | ||
| 32 | #define jemode_to_cpu(x) (t32((x).m)) | ||
| 33 | |||
| 34 | #endif /* __JFFS2_USER_H__ */ | ||
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index b6595b3c68b6..be51ae2bd0ff 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
| @@ -12,12 +12,24 @@ struct erase_info_user { | |||
| 12 | __u32 length; | 12 | __u32 length; |
| 13 | }; | 13 | }; |
| 14 | 14 | ||
| 15 | struct erase_info_user64 { | ||
| 16 | __u64 start; | ||
| 17 | __u64 length; | ||
| 18 | }; | ||
| 19 | |||
| 15 | struct mtd_oob_buf { | 20 | struct mtd_oob_buf { |
| 16 | __u32 start; | 21 | __u32 start; |
| 17 | __u32 length; | 22 | __u32 length; |
| 18 | unsigned char __user *ptr; | 23 | unsigned char __user *ptr; |
| 19 | }; | 24 | }; |
| 20 | 25 | ||
| 26 | struct mtd_oob_buf64 { | ||
| 27 | __u64 start; | ||
| 28 | __u32 pad; | ||
| 29 | __u32 length; | ||
| 30 | __u64 usr_ptr; | ||
| 31 | }; | ||
| 32 | |||
| 21 | #define MTD_ABSENT 0 | 33 | #define MTD_ABSENT 0 |
| 22 | #define MTD_RAM 1 | 34 | #define MTD_RAM 1 |
| 23 | #define MTD_ROM 2 | 35 | #define MTD_ROM 2 |
| @@ -95,6 +107,9 @@ struct otp_info { | |||
| 95 | #define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout) | 107 | #define ECCGETLAYOUT _IOR('M', 17, struct nand_ecclayout) |
| 96 | #define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats) | 108 | #define ECCGETSTATS _IOR('M', 18, struct mtd_ecc_stats) |
| 97 | #define MTDFILEMODE _IO('M', 19) | 109 | #define MTDFILEMODE _IO('M', 19) |
| 110 | #define MEMERASE64 _IOW('M', 20, struct erase_info_user64) | ||
| 111 | #define MEMWRITEOOB64 _IOWR('M', 21, struct mtd_oob_buf64) | ||
| 112 | #define MEMREADOOB64 _IOWR('M', 22, struct mtd_oob_buf64) | ||
| 98 | 113 | ||
| 99 | /* | 114 | /* |
| 100 | * Obsolete legacy interface. Keep it in order not to break userspace | 115 | * Obsolete legacy interface. Keep it in order not to break userspace |
diff --git a/include/net/iucv/af_iucv.h b/include/net/iucv/af_iucv.h index 21ee49ffcbaf..f82a1e877372 100644 --- a/include/net/iucv/af_iucv.h +++ b/include/net/iucv/af_iucv.h | |||
| @@ -94,8 +94,6 @@ unsigned int iucv_sock_poll(struct file *file, struct socket *sock, | |||
| 94 | poll_table *wait); | 94 | poll_table *wait); |
| 95 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); | 95 | void iucv_sock_link(struct iucv_sock_list *l, struct sock *s); |
| 96 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); | 96 | void iucv_sock_unlink(struct iucv_sock_list *l, struct sock *s); |
| 97 | int iucv_sock_wait_state(struct sock *sk, int state, int state2, | ||
| 98 | unsigned long timeo); | ||
| 99 | int iucv_sock_wait_cnt(struct sock *sk, unsigned long timeo); | 97 | int iucv_sock_wait_cnt(struct sock *sk, unsigned long timeo); |
| 100 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); | 98 | void iucv_accept_enqueue(struct sock *parent, struct sock *sk); |
| 101 | void iucv_accept_unlink(struct sock *sk); | 99 | void iucv_accept_unlink(struct sock *sk); |
