diff options
Diffstat (limited to 'include')
31 files changed, 329 insertions, 158 deletions
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h index ff8d27af4786..a11cc9d32591 100644 --- a/include/drm/drm_edid.h +++ b/include/drm/drm_edid.h | |||
@@ -69,8 +69,8 @@ struct detailed_pixel_timing { | |||
69 | u8 hborder; | 69 | u8 hborder; |
70 | u8 vborder; | 70 | u8 vborder; |
71 | u8 unknown0:1; | 71 | u8 unknown0:1; |
72 | u8 vsync_positive:1; | ||
73 | u8 hsync_positive:1; | 72 | u8 hsync_positive:1; |
73 | u8 vsync_positive:1; | ||
74 | u8 separate_sync:2; | 74 | u8 separate_sync:2; |
75 | u8 stereo:1; | 75 | u8 stereo:1; |
76 | u8 unknown6:1; | 76 | u8 unknown6:1; |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 08a86d5cdf1b..9a061accd8b8 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -89,6 +89,8 @@ enum { | |||
89 | ATA_ID_DLF = 128, | 89 | ATA_ID_DLF = 128, |
90 | ATA_ID_CSFO = 129, | 90 | ATA_ID_CSFO = 129, |
91 | ATA_ID_CFA_POWER = 160, | 91 | ATA_ID_CFA_POWER = 160, |
92 | ATA_ID_CFA_KEY_MGMT = 162, | ||
93 | ATA_ID_CFA_MODES = 163, | ||
92 | ATA_ID_ROT_SPEED = 217, | 94 | ATA_ID_ROT_SPEED = 217, |
93 | ATA_ID_PIO4 = (1 << 1), | 95 | ATA_ID_PIO4 = (1 << 1), |
94 | 96 | ||
diff --git a/include/linux/bio.h b/include/linux/bio.h index 1b16108a5417..d8bd43bfdcf5 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -531,7 +531,7 @@ extern void bio_integrity_endio(struct bio *, int); | |||
531 | extern void bio_integrity_advance(struct bio *, unsigned int); | 531 | extern void bio_integrity_advance(struct bio *, unsigned int); |
532 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); | 532 | extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); |
533 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); | 533 | extern void bio_integrity_split(struct bio *, struct bio_pair *, int); |
534 | extern int bio_integrity_clone(struct bio *, struct bio *, struct bio_set *); | 534 | extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *); |
535 | extern int bioset_integrity_create(struct bio_set *, int); | 535 | extern int bioset_integrity_create(struct bio_set *, int); |
536 | extern void bioset_integrity_free(struct bio_set *); | 536 | extern void bioset_integrity_free(struct bio_set *); |
537 | extern void bio_integrity_init_slab(void); | 537 | extern void bio_integrity_init_slab(void); |
@@ -542,7 +542,7 @@ extern void bio_integrity_init_slab(void); | |||
542 | #define bioset_integrity_create(a, b) (0) | 542 | #define bioset_integrity_create(a, b) (0) |
543 | #define bio_integrity_prep(a) (0) | 543 | #define bio_integrity_prep(a) (0) |
544 | #define bio_integrity_enabled(a) (0) | 544 | #define bio_integrity_enabled(a) (0) |
545 | #define bio_integrity_clone(a, b, c) (0) | 545 | #define bio_integrity_clone(a, b, c,d ) (0) |
546 | #define bioset_integrity_free(a) do { } while (0) | 546 | #define bioset_integrity_free(a) do { } while (0) |
547 | #define bio_integrity_free(a, b) do { } while (0) | 547 | #define bio_integrity_free(a, b) do { } while (0) |
548 | #define bio_integrity_endio(a, b) do { } while (0) | 548 | #define bio_integrity_endio(a, b) do { } while (0) |
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h index 95837bfb5256..455d83219fae 100644 --- a/include/linux/bootmem.h +++ b/include/linux/bootmem.h | |||
@@ -65,23 +65,20 @@ extern void free_bootmem(unsigned long addr, unsigned long size); | |||
65 | #define BOOTMEM_DEFAULT 0 | 65 | #define BOOTMEM_DEFAULT 0 |
66 | #define BOOTMEM_EXCLUSIVE (1<<0) | 66 | #define BOOTMEM_EXCLUSIVE (1<<0) |
67 | 67 | ||
68 | extern int reserve_bootmem(unsigned long addr, | ||
69 | unsigned long size, | ||
70 | int flags); | ||
68 | extern int reserve_bootmem_node(pg_data_t *pgdat, | 71 | extern int reserve_bootmem_node(pg_data_t *pgdat, |
69 | unsigned long physaddr, | 72 | unsigned long physaddr, |
70 | unsigned long size, | 73 | unsigned long size, |
71 | int flags); | 74 | int flags); |
72 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | ||
73 | extern int reserve_bootmem(unsigned long addr, unsigned long size, int flags); | ||
74 | #endif | ||
75 | 75 | ||
76 | extern void *__alloc_bootmem_nopanic(unsigned long size, | 76 | extern void *__alloc_bootmem(unsigned long size, |
77 | unsigned long align, | 77 | unsigned long align, |
78 | unsigned long goal); | 78 | unsigned long goal); |
79 | extern void *__alloc_bootmem(unsigned long size, | 79 | extern void *__alloc_bootmem_nopanic(unsigned long size, |
80 | unsigned long align, | 80 | unsigned long align, |
81 | unsigned long goal); | 81 | unsigned long goal); |
82 | extern void *__alloc_bootmem_low(unsigned long size, | ||
83 | unsigned long align, | ||
84 | unsigned long goal); | ||
85 | extern void *__alloc_bootmem_node(pg_data_t *pgdat, | 82 | extern void *__alloc_bootmem_node(pg_data_t *pgdat, |
86 | unsigned long size, | 83 | unsigned long size, |
87 | unsigned long align, | 84 | unsigned long align, |
@@ -90,30 +87,35 @@ extern void *__alloc_bootmem_node_nopanic(pg_data_t *pgdat, | |||
90 | unsigned long size, | 87 | unsigned long size, |
91 | unsigned long align, | 88 | unsigned long align, |
92 | unsigned long goal); | 89 | unsigned long goal); |
90 | extern void *__alloc_bootmem_low(unsigned long size, | ||
91 | unsigned long align, | ||
92 | unsigned long goal); | ||
93 | extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, | 93 | extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, |
94 | unsigned long size, | 94 | unsigned long size, |
95 | unsigned long align, | 95 | unsigned long align, |
96 | unsigned long goal); | 96 | unsigned long goal); |
97 | #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE | 97 | |
98 | #define alloc_bootmem(x) \ | 98 | #define alloc_bootmem(x) \ |
99 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 99 | __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
100 | #define alloc_bootmem_nopanic(x) \ | 100 | #define alloc_bootmem_nopanic(x) \ |
101 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 101 | __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
102 | #define alloc_bootmem_low(x) \ | ||
103 | __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) | ||
104 | #define alloc_bootmem_pages(x) \ | 102 | #define alloc_bootmem_pages(x) \ |
105 | __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 103 | __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
106 | #define alloc_bootmem_pages_nopanic(x) \ | 104 | #define alloc_bootmem_pages_nopanic(x) \ |
107 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 105 | __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
108 | #define alloc_bootmem_low_pages(x) \ | ||
109 | __alloc_bootmem_low(x, PAGE_SIZE, 0) | ||
110 | #define alloc_bootmem_node(pgdat, x) \ | 106 | #define alloc_bootmem_node(pgdat, x) \ |
111 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) | 107 | __alloc_bootmem_node(pgdat, x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) |
112 | #define alloc_bootmem_pages_node(pgdat, x) \ | 108 | #define alloc_bootmem_pages_node(pgdat, x) \ |
113 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | 109 | __alloc_bootmem_node(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) |
110 | #define alloc_bootmem_pages_node_nopanic(pgdat, x) \ | ||
111 | __alloc_bootmem_node_nopanic(pgdat, x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) | ||
112 | |||
113 | #define alloc_bootmem_low(x) \ | ||
114 | __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) | ||
115 | #define alloc_bootmem_low_pages(x) \ | ||
116 | __alloc_bootmem_low(x, PAGE_SIZE, 0) | ||
114 | #define alloc_bootmem_low_pages_node(pgdat, x) \ | 117 | #define alloc_bootmem_low_pages_node(pgdat, x) \ |
115 | __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) | 118 | __alloc_bootmem_low_node(pgdat, x, PAGE_SIZE, 0) |
116 | #endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ | ||
117 | 119 | ||
118 | extern int reserve_bootmem_generic(unsigned long addr, unsigned long size, | 120 | extern int reserve_bootmem_generic(unsigned long addr, unsigned long size, |
119 | int flags); | 121 | int flags); |
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 1514d534deeb..a3ed7cb8ca34 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -52,7 +52,15 @@ | |||
52 | #define __deprecated __attribute__((deprecated)) | 52 | #define __deprecated __attribute__((deprecated)) |
53 | #define __packed __attribute__((packed)) | 53 | #define __packed __attribute__((packed)) |
54 | #define __weak __attribute__((weak)) | 54 | #define __weak __attribute__((weak)) |
55 | #define __naked __attribute__((naked)) | 55 | |
56 | /* | ||
57 | * it doesn't make sense on ARM (currently the only user of __naked) to trace | ||
58 | * naked functions because then mcount is called without stack and frame pointer | ||
59 | * being set up and there is no chance to restore the lr register to the value | ||
60 | * before mcount was called. | ||
61 | */ | ||
62 | #define __naked __attribute__((naked)) notrace | ||
63 | |||
56 | #define __noreturn __attribute__((noreturn)) | 64 | #define __noreturn __attribute__((noreturn)) |
57 | 65 | ||
58 | /* | 66 | /* |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 384b38d3e8e2..161042746afc 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -234,7 +234,6 @@ struct cpufreq_driver { | |||
234 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); | 234 | int (*suspend) (struct cpufreq_policy *policy, pm_message_t pmsg); |
235 | int (*resume) (struct cpufreq_policy *policy); | 235 | int (*resume) (struct cpufreq_policy *policy); |
236 | struct freq_attr **attr; | 236 | struct freq_attr **attr; |
237 | bool hide_interface; | ||
238 | }; | 237 | }; |
239 | 238 | ||
240 | /* flags */ | 239 | /* flags */ |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index f0413845f20e..1956c8d46d32 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -97,7 +97,6 @@ typedef struct { DECLARE_BITMAP(bits, DMA_TX_TYPE_END); } dma_cap_mask_t; | |||
97 | 97 | ||
98 | /** | 98 | /** |
99 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan | 99 | * struct dma_chan_percpu - the per-CPU part of struct dma_chan |
100 | * @refcount: local_t used for open-coded "bigref" counting | ||
101 | * @memcpy_count: transaction counter | 100 | * @memcpy_count: transaction counter |
102 | * @bytes_transferred: byte counter | 101 | * @bytes_transferred: byte counter |
103 | */ | 102 | */ |
@@ -114,9 +113,6 @@ struct dma_chan_percpu { | |||
114 | * @cookie: last cookie value returned to client | 113 | * @cookie: last cookie value returned to client |
115 | * @chan_id: channel ID for sysfs | 114 | * @chan_id: channel ID for sysfs |
116 | * @dev: class device for sysfs | 115 | * @dev: class device for sysfs |
117 | * @refcount: kref, used in "bigref" slow-mode | ||
118 | * @slow_ref: indicates that the DMA channel is free | ||
119 | * @rcu: the DMA channel's RCU head | ||
120 | * @device_node: used to add this to the device chan list | 116 | * @device_node: used to add this to the device chan list |
121 | * @local: per-cpu pointer to a struct dma_chan_percpu | 117 | * @local: per-cpu pointer to a struct dma_chan_percpu |
122 | * @client-count: how many clients are using this channel | 118 | * @client-count: how many clients are using this channel |
@@ -213,8 +209,6 @@ struct dma_async_tx_descriptor { | |||
213 | * @global_node: list_head for global dma_device_list | 209 | * @global_node: list_head for global dma_device_list |
214 | * @cap_mask: one or more dma_capability flags | 210 | * @cap_mask: one or more dma_capability flags |
215 | * @max_xor: maximum number of xor sources, 0 if no capability | 211 | * @max_xor: maximum number of xor sources, 0 if no capability |
216 | * @refcount: reference count | ||
217 | * @done: IO completion struct | ||
218 | * @dev_id: unique device ID | 212 | * @dev_id: unique device ID |
219 | * @dev: struct device reference for dma mapping api | 213 | * @dev: struct device reference for dma mapping api |
220 | * @device_alloc_chan_resources: allocate resources and return the | 214 | * @device_alloc_chan_resources: allocate resources and return the |
@@ -227,6 +221,7 @@ struct dma_async_tx_descriptor { | |||
227 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation | 221 | * @device_prep_dma_interrupt: prepares an end of chain interrupt operation |
228 | * @device_prep_slave_sg: prepares a slave dma operation | 222 | * @device_prep_slave_sg: prepares a slave dma operation |
229 | * @device_terminate_all: terminate all pending operations | 223 | * @device_terminate_all: terminate all pending operations |
224 | * @device_is_tx_complete: poll for transaction completion | ||
230 | * @device_issue_pending: push pending transactions to hardware | 225 | * @device_issue_pending: push pending transactions to hardware |
231 | */ | 226 | */ |
232 | struct dma_device { | 227 | struct dma_device { |
diff --git a/include/linux/dmar.h b/include/linux/dmar.h index f28440784cf0..2f3427468956 100644 --- a/include/linux/dmar.h +++ b/include/linux/dmar.h | |||
@@ -24,10 +24,10 @@ | |||
24 | #include <linux/acpi.h> | 24 | #include <linux/acpi.h> |
25 | #include <linux/types.h> | 25 | #include <linux/types.h> |
26 | #include <linux/msi.h> | 26 | #include <linux/msi.h> |
27 | #include <linux/irqreturn.h> | ||
27 | 28 | ||
28 | #if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) | ||
29 | struct intel_iommu; | 29 | struct intel_iommu; |
30 | 30 | #if defined(CONFIG_DMAR) || defined(CONFIG_INTR_REMAP) | |
31 | struct dmar_drhd_unit { | 31 | struct dmar_drhd_unit { |
32 | struct list_head list; /* list of drhd units */ | 32 | struct list_head list; /* list of drhd units */ |
33 | struct acpi_dmar_header *hdr; /* ACPI header */ | 33 | struct acpi_dmar_header *hdr; /* ACPI header */ |
@@ -49,7 +49,7 @@ extern int dmar_dev_scope_init(void); | |||
49 | 49 | ||
50 | /* Intel IOMMU detection */ | 50 | /* Intel IOMMU detection */ |
51 | extern void detect_intel_iommu(void); | 51 | extern void detect_intel_iommu(void); |
52 | 52 | extern int enable_drhd_fault_handling(void); | |
53 | 53 | ||
54 | extern int parse_ioapics_under_ir(void); | 54 | extern int parse_ioapics_under_ir(void); |
55 | extern int alloc_iommu(struct dmar_drhd_unit *); | 55 | extern int alloc_iommu(struct dmar_drhd_unit *); |
@@ -63,12 +63,12 @@ static inline int dmar_table_init(void) | |||
63 | { | 63 | { |
64 | return -ENODEV; | 64 | return -ENODEV; |
65 | } | 65 | } |
66 | static inline int enable_drhd_fault_handling(void) | ||
67 | { | ||
68 | return -1; | ||
69 | } | ||
66 | #endif /* !CONFIG_DMAR && !CONFIG_INTR_REMAP */ | 70 | #endif /* !CONFIG_DMAR && !CONFIG_INTR_REMAP */ |
67 | 71 | ||
68 | #ifdef CONFIG_INTR_REMAP | ||
69 | extern int intr_remapping_enabled; | ||
70 | extern int enable_intr_remapping(int); | ||
71 | |||
72 | struct irte { | 72 | struct irte { |
73 | union { | 73 | union { |
74 | struct { | 74 | struct { |
@@ -97,6 +97,10 @@ struct irte { | |||
97 | __u64 high; | 97 | __u64 high; |
98 | }; | 98 | }; |
99 | }; | 99 | }; |
100 | #ifdef CONFIG_INTR_REMAP | ||
101 | extern int intr_remapping_enabled; | ||
102 | extern int enable_intr_remapping(int); | ||
103 | |||
100 | extern int get_irte(int irq, struct irte *entry); | 104 | extern int get_irte(int irq, struct irte *entry); |
101 | extern int modify_irte(int irq, struct irte *irte_modified); | 105 | extern int modify_irte(int irq, struct irte *irte_modified); |
102 | extern int alloc_irte(struct intel_iommu *iommu, int irq, u16 count); | 106 | extern int alloc_irte(struct intel_iommu *iommu, int irq, u16 count); |
@@ -111,14 +115,40 @@ extern int irq_remapped(int irq); | |||
111 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); | 115 | extern struct intel_iommu *map_dev_to_ir(struct pci_dev *dev); |
112 | extern struct intel_iommu *map_ioapic_to_ir(int apic); | 116 | extern struct intel_iommu *map_ioapic_to_ir(int apic); |
113 | #else | 117 | #else |
118 | static inline int alloc_irte(struct intel_iommu *iommu, int irq, u16 count) | ||
119 | { | ||
120 | return -1; | ||
121 | } | ||
122 | static inline int modify_irte(int irq, struct irte *irte_modified) | ||
123 | { | ||
124 | return -1; | ||
125 | } | ||
126 | static inline int free_irte(int irq) | ||
127 | { | ||
128 | return -1; | ||
129 | } | ||
130 | static inline int map_irq_to_irte_handle(int irq, u16 *sub_handle) | ||
131 | { | ||
132 | return -1; | ||
133 | } | ||
134 | static inline int set_irte_irq(int irq, struct intel_iommu *iommu, u16 index, | ||
135 | u16 sub_handle) | ||
136 | { | ||
137 | return -1; | ||
138 | } | ||
139 | static inline struct intel_iommu *map_dev_to_ir(struct pci_dev *dev) | ||
140 | { | ||
141 | return NULL; | ||
142 | } | ||
143 | static inline struct intel_iommu *map_ioapic_to_ir(int apic) | ||
144 | { | ||
145 | return NULL; | ||
146 | } | ||
114 | #define irq_remapped(irq) (0) | 147 | #define irq_remapped(irq) (0) |
115 | #define enable_intr_remapping(mode) (-1) | 148 | #define enable_intr_remapping(mode) (-1) |
116 | #define intr_remapping_enabled (0) | 149 | #define intr_remapping_enabled (0) |
117 | #endif | 150 | #endif |
118 | 151 | ||
119 | #ifdef CONFIG_DMAR | ||
120 | extern const char *dmar_get_fault_reason(u8 fault_reason); | ||
121 | |||
122 | /* Can't use the common MSI interrupt functions | 152 | /* Can't use the common MSI interrupt functions |
123 | * since DMAR is not a pci device | 153 | * since DMAR is not a pci device |
124 | */ | 154 | */ |
@@ -127,8 +157,10 @@ extern void dmar_msi_mask(unsigned int irq); | |||
127 | extern void dmar_msi_read(int irq, struct msi_msg *msg); | 157 | extern void dmar_msi_read(int irq, struct msi_msg *msg); |
128 | extern void dmar_msi_write(int irq, struct msi_msg *msg); | 158 | extern void dmar_msi_write(int irq, struct msi_msg *msg); |
129 | extern int dmar_set_interrupt(struct intel_iommu *iommu); | 159 | extern int dmar_set_interrupt(struct intel_iommu *iommu); |
160 | extern irqreturn_t dmar_fault(int irq, void *dev_id); | ||
130 | extern int arch_setup_dmar_msi(unsigned int irq); | 161 | extern int arch_setup_dmar_msi(unsigned int irq); |
131 | 162 | ||
163 | #ifdef CONFIG_DMAR | ||
132 | extern int iommu_detected, no_iommu; | 164 | extern int iommu_detected, no_iommu; |
133 | extern struct list_head dmar_rmrr_units; | 165 | extern struct list_head dmar_rmrr_units; |
134 | struct dmar_rmrr_unit { | 166 | struct dmar_rmrr_unit { |
diff --git a/include/linux/hdreg.h b/include/linux/hdreg.h index c37e9241fae7..ed21bd3dbd25 100644 --- a/include/linux/hdreg.h +++ b/include/linux/hdreg.h | |||
@@ -511,7 +511,6 @@ struct hd_driveid { | |||
511 | unsigned short words69_70[2]; /* reserved words 69-70 | 511 | unsigned short words69_70[2]; /* reserved words 69-70 |
512 | * future command overlap and queuing | 512 | * future command overlap and queuing |
513 | */ | 513 | */ |
514 | /* HDIO_GET_IDENTITY currently returns only words 0 through 70 */ | ||
515 | unsigned short words71_74[4]; /* reserved words 71-74 | 514 | unsigned short words71_74[4]; /* reserved words 71-74 |
516 | * for IDENTIFY PACKET DEVICE command | 515 | * for IDENTIFY PACKET DEVICE command |
517 | */ | 516 | */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index fe235b65207e..25087aead657 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -797,6 +797,7 @@ typedef struct hwif_s { | |||
797 | struct scatterlist *sg_table; | 797 | struct scatterlist *sg_table; |
798 | int sg_max_nents; /* Maximum number of entries in it */ | 798 | int sg_max_nents; /* Maximum number of entries in it */ |
799 | int sg_nents; /* Current number of entries in it */ | 799 | int sg_nents; /* Current number of entries in it */ |
800 | int orig_sg_nents; | ||
800 | int sg_dma_direction; /* dma transfer direction */ | 801 | int sg_dma_direction; /* dma transfer direction */ |
801 | 802 | ||
802 | /* data phase of the active command (currently only valid for PIO/DMA) */ | 803 | /* data phase of the active command (currently only valid for PIO/DMA) */ |
@@ -866,6 +867,7 @@ struct ide_host { | |||
866 | unsigned int n_ports; | 867 | unsigned int n_ports; |
867 | struct device *dev[2]; | 868 | struct device *dev[2]; |
868 | unsigned int (*init_chipset)(struct pci_dev *); | 869 | unsigned int (*init_chipset)(struct pci_dev *); |
870 | irq_handler_t irq_handler; | ||
869 | unsigned long host_flags; | 871 | unsigned long host_flags; |
870 | void *host_priv; | 872 | void *host_priv; |
871 | ide_hwif_t *cur_port; /* for hosts requiring serialization */ | 873 | ide_hwif_t *cur_port; /* for hosts requiring serialization */ |
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h index d2e3cbfba14f..78c1262e8704 100644 --- a/include/linux/intel-iommu.h +++ b/include/linux/intel-iommu.h | |||
@@ -292,6 +292,8 @@ struct intel_iommu { | |||
292 | spinlock_t register_lock; /* protect register handling */ | 292 | spinlock_t register_lock; /* protect register handling */ |
293 | int seq_id; /* sequence id of the iommu */ | 293 | int seq_id; /* sequence id of the iommu */ |
294 | int agaw; /* agaw of this iommu */ | 294 | int agaw; /* agaw of this iommu */ |
295 | unsigned int irq; | ||
296 | unsigned char name[13]; /* Device Name */ | ||
295 | 297 | ||
296 | #ifdef CONFIG_DMAR | 298 | #ifdef CONFIG_DMAR |
297 | unsigned long *domain_ids; /* bitmap of domains */ | 299 | unsigned long *domain_ids; /* bitmap of domains */ |
@@ -299,8 +301,6 @@ struct intel_iommu { | |||
299 | spinlock_t lock; /* protect context, domain ids */ | 301 | spinlock_t lock; /* protect context, domain ids */ |
300 | struct root_entry *root_entry; /* virtual address */ | 302 | struct root_entry *root_entry; /* virtual address */ |
301 | 303 | ||
302 | unsigned int irq; | ||
303 | unsigned char name[7]; /* Device Name */ | ||
304 | struct iommu_flush flush; | 304 | struct iommu_flush flush; |
305 | #endif | 305 | #endif |
306 | struct q_inval *qi; /* Queued invalidation info */ | 306 | struct q_inval *qi; /* Queued invalidation info */ |
@@ -321,6 +321,7 @@ extern struct dmar_drhd_unit * dmar_find_matched_drhd_unit(struct pci_dev *dev); | |||
321 | extern int alloc_iommu(struct dmar_drhd_unit *drhd); | 321 | extern int alloc_iommu(struct dmar_drhd_unit *drhd); |
322 | extern void free_iommu(struct intel_iommu *iommu); | 322 | extern void free_iommu(struct intel_iommu *iommu); |
323 | extern int dmar_enable_qi(struct intel_iommu *iommu); | 323 | extern int dmar_enable_qi(struct intel_iommu *iommu); |
324 | extern void dmar_disable_qi(struct intel_iommu *iommu); | ||
324 | extern void qi_global_iec(struct intel_iommu *iommu); | 325 | extern void qi_global_iec(struct intel_iommu *iommu); |
325 | 326 | ||
326 | extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, | 327 | extern int qi_flush_context(struct intel_iommu *iommu, u16 did, u16 sid, |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 5d87bc09a1f5..dc18b87ed722 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -275,7 +275,7 @@ enum { | |||
275 | * advised to wait only for the following duration before | 275 | * advised to wait only for the following duration before |
276 | * doing SRST. | 276 | * doing SRST. |
277 | */ | 277 | */ |
278 | ATA_TMOUT_PMP_SRST_WAIT = 1000, | 278 | ATA_TMOUT_PMP_SRST_WAIT = 5000, |
279 | 279 | ||
280 | /* ATA bus states */ | 280 | /* ATA bus states */ |
281 | BUS_UNKNOWN = 0, | 281 | BUS_UNKNOWN = 0, |
@@ -530,6 +530,7 @@ struct ata_queued_cmd { | |||
530 | unsigned long flags; /* ATA_QCFLAG_xxx */ | 530 | unsigned long flags; /* ATA_QCFLAG_xxx */ |
531 | unsigned int tag; | 531 | unsigned int tag; |
532 | unsigned int n_elem; | 532 | unsigned int n_elem; |
533 | unsigned int orig_n_elem; | ||
533 | 534 | ||
534 | int dma_dir; | 535 | int dma_dir; |
535 | 536 | ||
@@ -750,7 +751,8 @@ struct ata_port { | |||
750 | acpi_handle acpi_handle; | 751 | acpi_handle acpi_handle; |
751 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ | 752 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ |
752 | #endif | 753 | #endif |
753 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ | 754 | /* owned by EH */ |
755 | u8 sector_buf[ATA_SECT_SIZE] ____cacheline_aligned; | ||
754 | }; | 756 | }; |
755 | 757 | ||
756 | /* The following initializer overrides a method to NULL whether one of | 758 | /* The following initializer overrides a method to NULL whether one of |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index aa6fe7026de7..51855dfd8adb 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -346,6 +346,7 @@ static inline int __nlm_cmp_addr4(const struct sockaddr *sap1, | |||
346 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; | 346 | return sin1->sin_addr.s_addr == sin2->sin_addr.s_addr; |
347 | } | 347 | } |
348 | 348 | ||
349 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | ||
349 | static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, | 350 | static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, |
350 | const struct sockaddr *sap2) | 351 | const struct sockaddr *sap2) |
351 | { | 352 | { |
@@ -353,6 +354,13 @@ static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, | |||
353 | const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2; | 354 | const struct sockaddr_in6 *sin2 = (const struct sockaddr_in6 *)sap2; |
354 | return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr); | 355 | return ipv6_addr_equal(&sin1->sin6_addr, &sin2->sin6_addr); |
355 | } | 356 | } |
357 | #else /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */ | ||
358 | static inline int __nlm_cmp_addr6(const struct sockaddr *sap1, | ||
359 | const struct sockaddr *sap2) | ||
360 | { | ||
361 | return 0; | ||
362 | } | ||
363 | #endif /* !(CONFIG_IPV6 || CONFIG_IPV6_MODULE) */ | ||
356 | 364 | ||
357 | /* | 365 | /* |
358 | * Compare two host addresses | 366 | * Compare two host addresses |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 065cdf8c09fb..b1ea37fc7a24 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -104,6 +104,7 @@ extern unsigned int kobjsize(const void *objp); | |||
104 | #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ | 104 | #define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */ |
105 | #define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ | 105 | #define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ |
106 | #define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */ | 106 | #define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */ |
107 | #define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */ | ||
107 | 108 | ||
108 | #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ | 109 | #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ |
109 | #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS | 110 | #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS |
@@ -145,7 +146,7 @@ extern pgprot_t protection_map[16]; | |||
145 | */ | 146 | */ |
146 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) | 147 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) |
147 | { | 148 | { |
148 | return ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff); | 149 | return (vma->vm_flags & VM_PFN_AT_MMAP); |
149 | } | 150 | } |
150 | 151 | ||
151 | static inline int is_pfn_mapping(struct vm_area_struct *vma) | 152 | static inline int is_pfn_mapping(struct vm_area_struct *vma) |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 92915e81443f..d84feb7bdbf0 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -276,4 +276,7 @@ struct mm_struct { | |||
276 | #endif | 276 | #endif |
277 | }; | 277 | }; |
278 | 278 | ||
279 | /* Future-safe accessor for struct mm_struct's cpu_vm_mask. */ | ||
280 | #define mm_cpumask(mm) (&(mm)->cpu_vm_mask) | ||
281 | |||
279 | #endif /* _LINUX_MM_TYPES_H */ | 282 | #endif /* _LINUX_MM_TYPES_H */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ec54785d34f9..659366734f3f 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -1079,6 +1079,7 @@ extern void synchronize_net(void); | |||
1079 | extern int register_netdevice_notifier(struct notifier_block *nb); | 1079 | extern int register_netdevice_notifier(struct notifier_block *nb); |
1080 | extern int unregister_netdevice_notifier(struct notifier_block *nb); | 1080 | extern int unregister_netdevice_notifier(struct notifier_block *nb); |
1081 | extern int init_dummy_netdev(struct net_device *dev); | 1081 | extern int init_dummy_netdev(struct net_device *dev); |
1082 | extern void netdev_resync_ops(struct net_device *dev); | ||
1082 | 1083 | ||
1083 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); | 1084 | extern int call_netdevice_notifiers(unsigned long val, struct net_device *dev); |
1084 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); | 1085 | extern struct net_device *dev_get_by_index(struct net *net, int ifindex); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index a550b528319f..2e5f00066afd 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -406,6 +406,8 @@ struct nfs3_setaclargs { | |||
406 | int mask; | 406 | int mask; |
407 | struct posix_acl * acl_access; | 407 | struct posix_acl * acl_access; |
408 | struct posix_acl * acl_default; | 408 | struct posix_acl * acl_default; |
409 | size_t len; | ||
410 | unsigned int npages; | ||
409 | struct page ** pages; | 411 | struct page ** pages; |
410 | }; | 412 | }; |
411 | 413 | ||
diff --git a/include/linux/nfsacl.h b/include/linux/nfsacl.h index 54487a99beb8..43011b69297c 100644 --- a/include/linux/nfsacl.h +++ b/include/linux/nfsacl.h | |||
@@ -37,6 +37,9 @@ | |||
37 | #define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \ | 37 | #define NFSACL_MAXPAGES ((2*(8+12*NFS_ACL_MAX_ENTRIES) + PAGE_SIZE-1) \ |
38 | >> PAGE_SHIFT) | 38 | >> PAGE_SHIFT) |
39 | 39 | ||
40 | #define NFS_ACL_MAX_ENTRIES_INLINE (5) | ||
41 | #define NFS_ACL_INLINE_BUFSIZE ((2*(2+3*NFS_ACL_MAX_ENTRIES_INLINE)) << 2) | ||
42 | |||
40 | static inline unsigned int | 43 | static inline unsigned int |
41 | nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) | 44 | nfsacl_size(struct posix_acl *acl_access, struct posix_acl *acl_default) |
42 | { | 45 | { |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 3577ffd90d45..ee5615d65211 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/slab.h> /* For kmalloc() */ | 5 | #include <linux/slab.h> /* For kmalloc() */ |
6 | #include <linux/smp.h> | 6 | #include <linux/smp.h> |
7 | #include <linux/cpumask.h> | 7 | #include <linux/cpumask.h> |
8 | #include <linux/pfn.h> | ||
8 | 9 | ||
9 | #include <asm/percpu.h> | 10 | #include <asm/percpu.h> |
10 | 11 | ||
@@ -52,17 +53,18 @@ | |||
52 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | 53 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) |
53 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | 54 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) |
54 | 55 | ||
55 | /* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */ | 56 | /* enough to cover all DEFINE_PER_CPUs in modules */ |
56 | #ifndef PERCPU_ENOUGH_ROOM | ||
57 | #ifdef CONFIG_MODULES | 57 | #ifdef CONFIG_MODULES |
58 | #define PERCPU_MODULE_RESERVE 8192 | 58 | #define PERCPU_MODULE_RESERVE (8 << 10) |
59 | #else | 59 | #else |
60 | #define PERCPU_MODULE_RESERVE 0 | 60 | #define PERCPU_MODULE_RESERVE 0 |
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #ifndef PERCPU_ENOUGH_ROOM | ||
63 | #define PERCPU_ENOUGH_ROOM \ | 64 | #define PERCPU_ENOUGH_ROOM \ |
64 | (__per_cpu_end - __per_cpu_start + PERCPU_MODULE_RESERVE) | 65 | (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \ |
65 | #endif /* PERCPU_ENOUGH_ROOM */ | 66 | PERCPU_MODULE_RESERVE) |
67 | #endif | ||
66 | 68 | ||
67 | /* | 69 | /* |
68 | * Must be an lvalue. Since @var must be a simple identifier, | 70 | * Must be an lvalue. Since @var must be a simple identifier, |
@@ -76,52 +78,94 @@ | |||
76 | 78 | ||
77 | #ifdef CONFIG_SMP | 79 | #ifdef CONFIG_SMP |
78 | 80 | ||
81 | #ifdef CONFIG_HAVE_DYNAMIC_PER_CPU_AREA | ||
82 | |||
83 | /* minimum unit size, also is the maximum supported allocation size */ | ||
84 | #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(64 << 10) | ||
85 | |||
86 | /* | ||
87 | * PERCPU_DYNAMIC_RESERVE indicates the amount of free area to piggy | ||
88 | * back on the first chunk for dynamic percpu allocation if arch is | ||
89 | * manually allocating and mapping it for faster access (as a part of | ||
90 | * large page mapping for example). | ||
91 | * | ||
92 | * The following values give between one and two pages of free space | ||
93 | * after typical minimal boot (2-way SMP, single disk and NIC) with | ||
94 | * both defconfig and a distro config on x86_64 and 32. More | ||
95 | * intelligent way to determine this would be nice. | ||
96 | */ | ||
97 | #if BITS_PER_LONG > 32 | ||
98 | #define PERCPU_DYNAMIC_RESERVE (20 << 10) | ||
99 | #else | ||
100 | #define PERCPU_DYNAMIC_RESERVE (12 << 10) | ||
101 | #endif | ||
102 | |||
103 | extern void *pcpu_base_addr; | ||
104 | |||
105 | typedef struct page * (*pcpu_get_page_fn_t)(unsigned int cpu, int pageno); | ||
106 | typedef void (*pcpu_populate_pte_fn_t)(unsigned long addr); | ||
107 | |||
108 | extern size_t __init pcpu_setup_first_chunk(pcpu_get_page_fn_t get_page_fn, | ||
109 | size_t static_size, size_t reserved_size, | ||
110 | ssize_t dyn_size, ssize_t unit_size, | ||
111 | void *base_addr, | ||
112 | pcpu_populate_pte_fn_t populate_pte_fn); | ||
113 | |||
114 | extern ssize_t __init pcpu_embed_first_chunk( | ||
115 | size_t static_size, size_t reserved_size, | ||
116 | ssize_t dyn_size, ssize_t unit_size); | ||
117 | |||
118 | /* | ||
119 | * Use this to get to a cpu's version of the per-cpu object | ||
120 | * dynamically allocated. Non-atomic access to the current CPU's | ||
121 | * version should probably be combined with get_cpu()/put_cpu(). | ||
122 | */ | ||
123 | #define per_cpu_ptr(ptr, cpu) SHIFT_PERCPU_PTR((ptr), per_cpu_offset((cpu))) | ||
124 | |||
125 | extern void *__alloc_reserved_percpu(size_t size, size_t align); | ||
126 | |||
127 | #else /* CONFIG_HAVE_DYNAMIC_PER_CPU_AREA */ | ||
128 | |||
79 | struct percpu_data { | 129 | struct percpu_data { |
80 | void *ptrs[1]; | 130 | void *ptrs[1]; |
81 | }; | 131 | }; |
82 | 132 | ||
83 | #define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata) | 133 | #define __percpu_disguise(pdata) (struct percpu_data *)~(unsigned long)(pdata) |
84 | /* | 134 | |
85 | * Use this to get to a cpu's version of the per-cpu object dynamically | 135 | #define per_cpu_ptr(ptr, cpu) \ |
86 | * allocated. Non-atomic access to the current CPU's version should | 136 | ({ \ |
87 | * probably be combined with get_cpu()/put_cpu(). | 137 | struct percpu_data *__p = __percpu_disguise(ptr); \ |
88 | */ | 138 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ |
89 | #define percpu_ptr(ptr, cpu) \ | ||
90 | ({ \ | ||
91 | struct percpu_data *__p = __percpu_disguise(ptr); \ | ||
92 | (__typeof__(ptr))__p->ptrs[(cpu)]; \ | ||
93 | }) | 139 | }) |
94 | 140 | ||
95 | extern void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask); | 141 | #endif /* CONFIG_HAVE_DYNAMIC_PER_CPU_AREA */ |
96 | extern void percpu_free(void *__pdata); | 142 | |
143 | extern void *__alloc_percpu(size_t size, size_t align); | ||
144 | extern void free_percpu(void *__pdata); | ||
97 | 145 | ||
98 | #else /* CONFIG_SMP */ | 146 | #else /* CONFIG_SMP */ |
99 | 147 | ||
100 | #define percpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) | 148 | #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); (ptr); }) |
101 | 149 | ||
102 | static __always_inline void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask) | 150 | static inline void *__alloc_percpu(size_t size, size_t align) |
103 | { | 151 | { |
104 | return kzalloc(size, gfp); | 152 | /* |
153 | * Can't easily make larger alignment work with kmalloc. WARN | ||
154 | * on it. Larger alignment should only be used for module | ||
155 | * percpu sections on SMP for which this path isn't used. | ||
156 | */ | ||
157 | WARN_ON_ONCE(align > SMP_CACHE_BYTES); | ||
158 | return kzalloc(size, GFP_KERNEL); | ||
105 | } | 159 | } |
106 | 160 | ||
107 | static inline void percpu_free(void *__pdata) | 161 | static inline void free_percpu(void *p) |
108 | { | 162 | { |
109 | kfree(__pdata); | 163 | kfree(p); |
110 | } | 164 | } |
111 | 165 | ||
112 | #endif /* CONFIG_SMP */ | 166 | #endif /* CONFIG_SMP */ |
113 | 167 | ||
114 | #define percpu_alloc_mask(size, gfp, mask) \ | 168 | #define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type), \ |
115 | __percpu_alloc_mask((size), (gfp), &(mask)) | 169 | __alignof__(type)) |
116 | |||
117 | #define percpu_alloc(size, gfp) percpu_alloc_mask((size), (gfp), cpu_online_map) | ||
118 | |||
119 | /* (legacy) interface for use without CPU hotplug handling */ | ||
120 | |||
121 | #define __alloc_percpu(size) percpu_alloc_mask((size), GFP_KERNEL, \ | ||
122 | cpu_possible_map) | ||
123 | #define alloc_percpu(type) (type *)__alloc_percpu(sizeof(type)) | ||
124 | #define free_percpu(ptr) percpu_free((ptr)) | ||
125 | #define per_cpu_ptr(ptr, cpu) percpu_ptr((ptr), (cpu)) | ||
126 | 170 | ||
127 | #endif /* __LINUX_PERCPU_H */ | 171 | #endif /* __LINUX_PERCPU_H */ |
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h index f3f697df1d71..80044a4f3ab9 100644 --- a/include/linux/rcuclassic.h +++ b/include/linux/rcuclassic.h | |||
@@ -181,4 +181,10 @@ extern long rcu_batches_completed_bh(void); | |||
181 | #define rcu_enter_nohz() do { } while (0) | 181 | #define rcu_enter_nohz() do { } while (0) |
182 | #define rcu_exit_nohz() do { } while (0) | 182 | #define rcu_exit_nohz() do { } while (0) |
183 | 183 | ||
184 | /* A context switch is a grace period for rcuclassic. */ | ||
185 | static inline int rcu_blocking_is_gp(void) | ||
186 | { | ||
187 | return num_online_cpus() == 1; | ||
188 | } | ||
189 | |||
184 | #endif /* __LINUX_RCUCLASSIC_H */ | 190 | #endif /* __LINUX_RCUCLASSIC_H */ |
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 921340a7b71c..528343e6da51 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -52,6 +52,9 @@ struct rcu_head { | |||
52 | void (*func)(struct rcu_head *head); | 52 | void (*func)(struct rcu_head *head); |
53 | }; | 53 | }; |
54 | 54 | ||
55 | /* Internal to kernel, but needed by rcupreempt.h. */ | ||
56 | extern int rcu_scheduler_active; | ||
57 | |||
55 | #if defined(CONFIG_CLASSIC_RCU) | 58 | #if defined(CONFIG_CLASSIC_RCU) |
56 | #include <linux/rcuclassic.h> | 59 | #include <linux/rcuclassic.h> |
57 | #elif defined(CONFIG_TREE_RCU) | 60 | #elif defined(CONFIG_TREE_RCU) |
@@ -265,6 +268,7 @@ extern void rcu_barrier_sched(void); | |||
265 | 268 | ||
266 | /* Internal to kernel */ | 269 | /* Internal to kernel */ |
267 | extern void rcu_init(void); | 270 | extern void rcu_init(void); |
271 | extern void rcu_scheduler_starting(void); | ||
268 | extern int rcu_needs_cpu(int cpu); | 272 | extern int rcu_needs_cpu(int cpu); |
269 | 273 | ||
270 | #endif /* __LINUX_RCUPDATE_H */ | 274 | #endif /* __LINUX_RCUPDATE_H */ |
diff --git a/include/linux/rcupreempt.h b/include/linux/rcupreempt.h index 3e05c09b54a2..74304b4538d8 100644 --- a/include/linux/rcupreempt.h +++ b/include/linux/rcupreempt.h | |||
@@ -142,4 +142,19 @@ static inline void rcu_exit_nohz(void) | |||
142 | #define rcu_exit_nohz() do { } while (0) | 142 | #define rcu_exit_nohz() do { } while (0) |
143 | #endif /* CONFIG_NO_HZ */ | 143 | #endif /* CONFIG_NO_HZ */ |
144 | 144 | ||
145 | /* | ||
146 | * A context switch is a grace period for rcupreempt synchronize_rcu() | ||
147 | * only during early boot, before the scheduler has been initialized. | ||
148 | * So, how the heck do we get a context switch? Well, if the caller | ||
149 | * invokes synchronize_rcu(), they are willing to accept a context | ||
150 | * switch, so we simply pretend that one happened. | ||
151 | * | ||
152 | * After boot, there might be a blocked or preempted task in an RCU | ||
153 | * read-side critical section, so we cannot then take the fastpath. | ||
154 | */ | ||
155 | static inline int rcu_blocking_is_gp(void) | ||
156 | { | ||
157 | return num_online_cpus() == 1 && !rcu_scheduler_active; | ||
158 | } | ||
159 | |||
145 | #endif /* __LINUX_RCUPREEMPT_H */ | 160 | #endif /* __LINUX_RCUPREEMPT_H */ |
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index d4368b7975c3..a722fb67bb2d 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h | |||
@@ -326,4 +326,10 @@ static inline void rcu_exit_nohz(void) | |||
326 | } | 326 | } |
327 | #endif /* CONFIG_NO_HZ */ | 327 | #endif /* CONFIG_NO_HZ */ |
328 | 328 | ||
329 | /* A context switch is a grace period for rcutree. */ | ||
330 | static inline int rcu_blocking_is_gp(void) | ||
331 | { | ||
332 | return num_online_cpus() == 1; | ||
333 | } | ||
334 | |||
329 | #endif /* __LINUX_RCUTREE_H */ | 335 | #endif /* __LINUX_RCUTREE_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index f0a50b20e8a0..46d680643f89 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1418,6 +1418,9 @@ struct task_struct { | |||
1418 | #endif | 1418 | #endif |
1419 | }; | 1419 | }; |
1420 | 1420 | ||
1421 | /* Future-safe accessor for struct task_struct's cpus_allowed. */ | ||
1422 | #define tsk_cpumask(tsk) (&(tsk)->cpus_allowed) | ||
1423 | |||
1421 | /* | 1424 | /* |
1422 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT | 1425 | * Priority of a process goes from 0..MAX_PRIO-1, valid RT |
1423 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH | 1426 | * priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH |
@@ -2303,9 +2306,13 @@ extern long sched_group_rt_runtime(struct task_group *tg); | |||
2303 | extern int sched_group_set_rt_period(struct task_group *tg, | 2306 | extern int sched_group_set_rt_period(struct task_group *tg, |
2304 | long rt_period_us); | 2307 | long rt_period_us); |
2305 | extern long sched_group_rt_period(struct task_group *tg); | 2308 | extern long sched_group_rt_period(struct task_group *tg); |
2309 | extern int sched_rt_can_attach(struct task_group *tg, struct task_struct *tsk); | ||
2306 | #endif | 2310 | #endif |
2307 | #endif | 2311 | #endif |
2308 | 2312 | ||
2313 | extern int task_can_switch_user(struct user_struct *up, | ||
2314 | struct task_struct *tsk); | ||
2315 | |||
2309 | #ifdef CONFIG_TASK_XACCT | 2316 | #ifdef CONFIG_TASK_XACCT |
2310 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) | 2317 | static inline void add_rchar(struct task_struct *tsk, ssize_t amt) |
2311 | { | 2318 | { |
diff --git a/include/linux/serio.h b/include/linux/serio.h index 1bcb357a01a1..e0417e4d3f15 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -212,7 +212,7 @@ static inline void serio_unpin_driver(struct serio *serio) | |||
212 | #define SERIO_FUJITSU 0x35 | 212 | #define SERIO_FUJITSU 0x35 |
213 | #define SERIO_ZHENHUA 0x36 | 213 | #define SERIO_ZHENHUA 0x36 |
214 | #define SERIO_INEXIO 0x37 | 214 | #define SERIO_INEXIO 0x37 |
215 | #define SERIO_TOUCHIT213 0x37 | 215 | #define SERIO_TOUCHIT213 0x38 |
216 | #define SERIO_W8001 0x39 | 216 | #define SERIO_W8001 0x39 |
217 | 217 | ||
218 | #endif | 218 | #endif |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 9c0890c7a06a..a43ebec3a7b9 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -95,6 +95,9 @@ extern struct vm_struct *remove_vm_area(const void *addr); | |||
95 | 95 | ||
96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 96 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
97 | struct page ***pages); | 97 | struct page ***pages); |
98 | extern int map_kernel_range_noflush(unsigned long start, unsigned long size, | ||
99 | pgprot_t prot, struct page **pages); | ||
100 | extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size); | ||
98 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); | 101 | extern void unmap_kernel_range(unsigned long addr, unsigned long size); |
99 | 102 | ||
100 | /* Allocate/destroy a 'vmalloc' VM area. */ | 103 | /* Allocate/destroy a 'vmalloc' VM area. */ |
@@ -110,5 +113,6 @@ extern long vwrite(char *buf, char *addr, unsigned long count); | |||
110 | */ | 113 | */ |
111 | extern rwlock_t vmlist_lock; | 114 | extern rwlock_t vmlist_lock; |
112 | extern struct vm_struct *vmlist; | 115 | extern struct vm_struct *vmlist; |
116 | extern __init void vm_area_register_early(struct vm_struct *vm, size_t align); | ||
113 | 117 | ||
114 | #endif /* _LINUX_VMALLOC_H */ | 118 | #endif /* _LINUX_VMALLOC_H */ |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 6fc13d905c5f..ded434b032a4 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -109,11 +109,6 @@ extern struct list_head net_namespace_list; | |||
109 | #ifdef CONFIG_NET_NS | 109 | #ifdef CONFIG_NET_NS |
110 | extern void __put_net(struct net *net); | 110 | extern void __put_net(struct net *net); |
111 | 111 | ||
112 | static inline int net_alive(struct net *net) | ||
113 | { | ||
114 | return net && atomic_read(&net->count); | ||
115 | } | ||
116 | |||
117 | static inline struct net *get_net(struct net *net) | 112 | static inline struct net *get_net(struct net *net) |
118 | { | 113 | { |
119 | atomic_inc(&net->count); | 114 | atomic_inc(&net->count); |
@@ -145,11 +140,6 @@ int net_eq(const struct net *net1, const struct net *net2) | |||
145 | } | 140 | } |
146 | #else | 141 | #else |
147 | 142 | ||
148 | static inline int net_alive(struct net *net) | ||
149 | { | ||
150 | return 1; | ||
151 | } | ||
152 | |||
153 | static inline struct net *get_net(struct net *net) | 143 | static inline struct net *get_net(struct net *net) |
154 | { | 144 | { |
155 | return net; | 145 | return net; |
@@ -234,6 +224,23 @@ struct pernet_operations { | |||
234 | void (*exit)(struct net *net); | 224 | void (*exit)(struct net *net); |
235 | }; | 225 | }; |
236 | 226 | ||
227 | /* | ||
228 | * Use these carefully. If you implement a network device and it | ||
229 | * needs per network namespace operations use device pernet operations, | ||
230 | * otherwise use pernet subsys operations. | ||
231 | * | ||
232 | * This is critically important. Most of the network code cleanup | ||
233 | * runs with the assumption that dev_remove_pack has been called so no | ||
234 | * new packets will arrive during and after the cleanup functions have | ||
235 | * been called. dev_remove_pack is not per namespace so instead the | ||
236 | * guarantee of no more packets arriving in a network namespace is | ||
237 | * provided by ensuring that all network devices and all sockets have | ||
238 | * left the network namespace before the cleanup methods are called. | ||
239 | * | ||
240 | * For the longest time the ipv4 icmp code was registered as a pernet | ||
241 | * device which caused kernel oops, and panics during network | ||
242 | * namespace cleanup. So please don't get this wrong. | ||
243 | */ | ||
237 | extern int register_pernet_subsys(struct pernet_operations *); | 244 | extern int register_pernet_subsys(struct pernet_operations *); |
238 | extern void unregister_pernet_subsys(struct pernet_operations *); | 245 | extern void unregister_pernet_subsys(struct pernet_operations *); |
239 | extern int register_pernet_gen_subsys(int *id, struct pernet_operations *); | 246 | extern int register_pernet_gen_subsys(int *id, struct pernet_operations *); |
diff --git a/include/scsi/fc/fc_fcoe.h b/include/scsi/fc/fc_fcoe.h index 57aaa8f0d613..f271d9cc0fc2 100644 --- a/include/scsi/fc/fc_fcoe.h +++ b/include/scsi/fc/fc_fcoe.h | |||
@@ -31,10 +31,6 @@ | |||
31 | #define ETH_P_FCOE 0x8906 /* FCOE ether type */ | 31 | #define ETH_P_FCOE 0x8906 /* FCOE ether type */ |
32 | #endif | 32 | #endif |
33 | 33 | ||
34 | #ifndef ETH_P_8021Q | ||
35 | #define ETH_P_8021Q 0x8100 | ||
36 | #endif | ||
37 | |||
38 | /* | 34 | /* |
39 | * FC_FCOE_OUI hasn't been standardized yet. XXX TBD. | 35 | * FC_FCOE_OUI hasn't been standardized yet. XXX TBD. |
40 | */ | 36 | */ |
diff --git a/include/scsi/fc/fc_fs.h b/include/scsi/fc/fc_fs.h index 3e4801d2bdbb..1b7af3a64c7c 100644 --- a/include/scsi/fc/fc_fs.h +++ b/include/scsi/fc/fc_fs.h | |||
@@ -337,4 +337,9 @@ enum fc_pf_rjt_reason { | |||
337 | FC_RJT_VENDOR = 0xff, /* vendor specific reject */ | 337 | FC_RJT_VENDOR = 0xff, /* vendor specific reject */ |
338 | }; | 338 | }; |
339 | 339 | ||
340 | /* default timeout values */ | ||
341 | |||
342 | #define FC_DEF_E_D_TOV 2000UL | ||
343 | #define FC_DEF_R_A_TOV 10000UL | ||
344 | |||
340 | #endif /* _FC_FS_H_ */ | 345 | #endif /* _FC_FS_H_ */ |
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 9f2876397dda..a2e126b86e3e 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
@@ -68,9 +68,6 @@ | |||
68 | /* | 68 | /* |
69 | * FC HBA status | 69 | * FC HBA status |
70 | */ | 70 | */ |
71 | #define FC_PAUSE (1 << 1) | ||
72 | #define FC_LINK_UP (1 << 0) | ||
73 | |||
74 | enum fc_lport_state { | 71 | enum fc_lport_state { |
75 | LPORT_ST_NONE = 0, | 72 | LPORT_ST_NONE = 0, |
76 | LPORT_ST_FLOGI, | 73 | LPORT_ST_FLOGI, |
@@ -339,31 +336,17 @@ struct fc_exch { | |||
339 | 336 | ||
340 | struct libfc_function_template { | 337 | struct libfc_function_template { |
341 | 338 | ||
342 | /** | ||
343 | * Mandatory Fields | ||
344 | * | ||
345 | * These handlers must be implemented by the LLD. | ||
346 | */ | ||
347 | |||
348 | /* | 339 | /* |
349 | * Interface to send a FC frame | 340 | * Interface to send a FC frame |
350 | */ | ||
351 | int (*frame_send)(struct fc_lport *lp, struct fc_frame *fp); | ||
352 | |||
353 | /** | ||
354 | * Optional Fields | ||
355 | * | 341 | * |
356 | * The LLD may choose to implement any of the following handlers. | 342 | * STATUS: REQUIRED |
357 | * If LLD doesn't specify hander and leaves its pointer NULL then | ||
358 | * the default libfc function will be used for that handler. | ||
359 | */ | ||
360 | |||
361 | /** | ||
362 | * ELS/CT interfaces | ||
363 | */ | 343 | */ |
344 | int (*frame_send)(struct fc_lport *lp, struct fc_frame *fp); | ||
364 | 345 | ||
365 | /* | 346 | /* |
366 | * elsct_send - sends ELS/CT frame | 347 | * Interface to send ELS/CT frames |
348 | * | ||
349 | * STATUS: OPTIONAL | ||
367 | */ | 350 | */ |
368 | struct fc_seq *(*elsct_send)(struct fc_lport *lport, | 351 | struct fc_seq *(*elsct_send)(struct fc_lport *lport, |
369 | struct fc_rport *rport, | 352 | struct fc_rport *rport, |
@@ -373,9 +356,6 @@ struct libfc_function_template { | |||
373 | struct fc_frame *fp, | 356 | struct fc_frame *fp, |
374 | void *arg), | 357 | void *arg), |
375 | void *arg, u32 timer_msec); | 358 | void *arg, u32 timer_msec); |
376 | /** | ||
377 | * Exhance Manager interfaces | ||
378 | */ | ||
379 | 359 | ||
380 | /* | 360 | /* |
381 | * Send the FC frame payload using a new exchange and sequence. | 361 | * Send the FC frame payload using a new exchange and sequence. |
@@ -407,6 +387,8 @@ struct libfc_function_template { | |||
407 | * timer_msec argument is specified. The timer is canceled when | 387 | * timer_msec argument is specified. The timer is canceled when |
408 | * it fires or when the exchange is done. The exchange timeout handler | 388 | * it fires or when the exchange is done. The exchange timeout handler |
409 | * is registered by EM layer. | 389 | * is registered by EM layer. |
390 | * | ||
391 | * STATUS: OPTIONAL | ||
410 | */ | 392 | */ |
411 | struct fc_seq *(*exch_seq_send)(struct fc_lport *lp, | 393 | struct fc_seq *(*exch_seq_send)(struct fc_lport *lp, |
412 | struct fc_frame *fp, | 394 | struct fc_frame *fp, |
@@ -418,14 +400,18 @@ struct libfc_function_template { | |||
418 | void *arg, unsigned int timer_msec); | 400 | void *arg, unsigned int timer_msec); |
419 | 401 | ||
420 | /* | 402 | /* |
421 | * send a frame using existing sequence and exchange. | 403 | * Send a frame using an existing sequence and exchange. |
404 | * | ||
405 | * STATUS: OPTIONAL | ||
422 | */ | 406 | */ |
423 | int (*seq_send)(struct fc_lport *lp, struct fc_seq *sp, | 407 | int (*seq_send)(struct fc_lport *lp, struct fc_seq *sp, |
424 | struct fc_frame *fp); | 408 | struct fc_frame *fp); |
425 | 409 | ||
426 | /* | 410 | /* |
427 | * Send ELS response using mainly infomation | 411 | * Send an ELS response using infomation from a previous |
428 | * in exchange and sequence in EM layer. | 412 | * exchange and sequence. |
413 | * | ||
414 | * STATUS: OPTIONAL | ||
429 | */ | 415 | */ |
430 | void (*seq_els_rsp_send)(struct fc_seq *sp, enum fc_els_cmd els_cmd, | 416 | void (*seq_els_rsp_send)(struct fc_seq *sp, enum fc_els_cmd els_cmd, |
431 | struct fc_seq_els_data *els_data); | 417 | struct fc_seq_els_data *els_data); |
@@ -437,6 +423,8 @@ struct libfc_function_template { | |||
437 | * A timer_msec can be specified for abort timeout, if non-zero | 423 | * A timer_msec can be specified for abort timeout, if non-zero |
438 | * timer_msec value is specified then exchange resp handler | 424 | * timer_msec value is specified then exchange resp handler |
439 | * will be called with timeout error if no response to abort. | 425 | * will be called with timeout error if no response to abort. |
426 | * | ||
427 | * STATUS: OPTIONAL | ||
440 | */ | 428 | */ |
441 | int (*seq_exch_abort)(const struct fc_seq *req_sp, | 429 | int (*seq_exch_abort)(const struct fc_seq *req_sp, |
442 | unsigned int timer_msec); | 430 | unsigned int timer_msec); |
@@ -444,6 +432,8 @@ struct libfc_function_template { | |||
444 | /* | 432 | /* |
445 | * Indicate that an exchange/sequence tuple is complete and the memory | 433 | * Indicate that an exchange/sequence tuple is complete and the memory |
446 | * allocated for the related objects may be freed. | 434 | * allocated for the related objects may be freed. |
435 | * | ||
436 | * STATUS: OPTIONAL | ||
447 | */ | 437 | */ |
448 | void (*exch_done)(struct fc_seq *sp); | 438 | void (*exch_done)(struct fc_seq *sp); |
449 | 439 | ||
@@ -451,6 +441,8 @@ struct libfc_function_template { | |||
451 | * Assigns a EM and a free XID for an new exchange and then | 441 | * Assigns a EM and a free XID for an new exchange and then |
452 | * allocates a new exchange and sequence pair. | 442 | * allocates a new exchange and sequence pair. |
453 | * The fp can be used to determine free XID. | 443 | * The fp can be used to determine free XID. |
444 | * | ||
445 | * STATUS: OPTIONAL | ||
454 | */ | 446 | */ |
455 | struct fc_exch *(*exch_get)(struct fc_lport *lp, struct fc_frame *fp); | 447 | struct fc_exch *(*exch_get)(struct fc_lport *lp, struct fc_frame *fp); |
456 | 448 | ||
@@ -458,12 +450,16 @@ struct libfc_function_template { | |||
458 | * Release previously assigned XID by exch_get API. | 450 | * Release previously assigned XID by exch_get API. |
459 | * The LLD may implement this if XID is assigned by LLD | 451 | * The LLD may implement this if XID is assigned by LLD |
460 | * in exch_get(). | 452 | * in exch_get(). |
453 | * | ||
454 | * STATUS: OPTIONAL | ||
461 | */ | 455 | */ |
462 | void (*exch_put)(struct fc_lport *lp, struct fc_exch_mgr *mp, | 456 | void (*exch_put)(struct fc_lport *lp, struct fc_exch_mgr *mp, |
463 | u16 ex_id); | 457 | u16 ex_id); |
464 | 458 | ||
465 | /* | 459 | /* |
466 | * Start a new sequence on the same exchange/sequence tuple. | 460 | * Start a new sequence on the same exchange/sequence tuple. |
461 | * | ||
462 | * STATUS: OPTIONAL | ||
467 | */ | 463 | */ |
468 | struct fc_seq *(*seq_start_next)(struct fc_seq *sp); | 464 | struct fc_seq *(*seq_start_next)(struct fc_seq *sp); |
469 | 465 | ||
@@ -471,26 +467,38 @@ struct libfc_function_template { | |||
471 | * Reset an exchange manager, completing all sequences and exchanges. | 467 | * Reset an exchange manager, completing all sequences and exchanges. |
472 | * If s_id is non-zero, reset only exchanges originating from that FID. | 468 | * If s_id is non-zero, reset only exchanges originating from that FID. |
473 | * If d_id is non-zero, reset only exchanges sending to that FID. | 469 | * If d_id is non-zero, reset only exchanges sending to that FID. |
470 | * | ||
471 | * STATUS: OPTIONAL | ||
474 | */ | 472 | */ |
475 | void (*exch_mgr_reset)(struct fc_exch_mgr *, | 473 | void (*exch_mgr_reset)(struct fc_lport *, |
476 | u32 s_id, u32 d_id); | 474 | u32 s_id, u32 d_id); |
477 | 475 | ||
478 | void (*rport_flush_queue)(void); | 476 | /* |
479 | /** | 477 | * Flush the rport work queue. Generally used before shutdown. |
480 | * Local Port interfaces | 478 | * |
479 | * STATUS: OPTIONAL | ||
481 | */ | 480 | */ |
481 | void (*rport_flush_queue)(void); | ||
482 | 482 | ||
483 | /* | 483 | /* |
484 | * Receive a frame to a local port. | 484 | * Receive a frame for a local port. |
485 | * | ||
486 | * STATUS: OPTIONAL | ||
485 | */ | 487 | */ |
486 | void (*lport_recv)(struct fc_lport *lp, struct fc_seq *sp, | 488 | void (*lport_recv)(struct fc_lport *lp, struct fc_seq *sp, |
487 | struct fc_frame *fp); | 489 | struct fc_frame *fp); |
488 | 490 | ||
491 | /* | ||
492 | * Reset the local port. | ||
493 | * | ||
494 | * STATUS: OPTIONAL | ||
495 | */ | ||
489 | int (*lport_reset)(struct fc_lport *); | 496 | int (*lport_reset)(struct fc_lport *); |
490 | 497 | ||
491 | /** | 498 | /* |
492 | * Remote Port interfaces | 499 | * Create a remote port |
493 | */ | 500 | */ |
501 | struct fc_rport *(*rport_create)(struct fc_disc_port *); | ||
494 | 502 | ||
495 | /* | 503 | /* |
496 | * Initiates the RP state machine. It is called from the LP module. | 504 | * Initiates the RP state machine. It is called from the LP module. |
@@ -500,26 +508,33 @@ struct libfc_function_template { | |||
500 | * - PLOGI | 508 | * - PLOGI |
501 | * - PRLI | 509 | * - PRLI |
502 | * - RTV | 510 | * - RTV |
511 | * | ||
512 | * STATUS: OPTIONAL | ||
503 | */ | 513 | */ |
504 | int (*rport_login)(struct fc_rport *rport); | 514 | int (*rport_login)(struct fc_rport *rport); |
505 | 515 | ||
506 | /* | 516 | /* |
507 | * Logoff, and remove the rport from the transport if | 517 | * Logoff, and remove the rport from the transport if |
508 | * it had been added. This will send a LOGO to the target. | 518 | * it had been added. This will send a LOGO to the target. |
519 | * | ||
520 | * STATUS: OPTIONAL | ||
509 | */ | 521 | */ |
510 | int (*rport_logoff)(struct fc_rport *rport); | 522 | int (*rport_logoff)(struct fc_rport *rport); |
511 | 523 | ||
512 | /* | 524 | /* |
513 | * Recieve a request from a remote port. | 525 | * Recieve a request from a remote port. |
526 | * | ||
527 | * STATUS: OPTIONAL | ||
514 | */ | 528 | */ |
515 | void (*rport_recv_req)(struct fc_seq *, struct fc_frame *, | 529 | void (*rport_recv_req)(struct fc_seq *, struct fc_frame *, |
516 | struct fc_rport *); | 530 | struct fc_rport *); |
517 | 531 | ||
518 | struct fc_rport *(*rport_lookup)(const struct fc_lport *, u32); | 532 | /* |
519 | 533 | * lookup an rport by it's port ID. | |
520 | /** | 534 | * |
521 | * FCP interfaces | 535 | * STATUS: OPTIONAL |
522 | */ | 536 | */ |
537 | struct fc_rport *(*rport_lookup)(const struct fc_lport *, u32); | ||
523 | 538 | ||
524 | /* | 539 | /* |
525 | * Send a fcp cmd from fsp pkt. | 540 | * Send a fcp cmd from fsp pkt. |
@@ -527,30 +542,38 @@ struct libfc_function_template { | |||
527 | * | 542 | * |
528 | * The resp handler is called when FCP_RSP received. | 543 | * The resp handler is called when FCP_RSP received. |
529 | * | 544 | * |
545 | * STATUS: OPTIONAL | ||
530 | */ | 546 | */ |
531 | int (*fcp_cmd_send)(struct fc_lport *lp, struct fc_fcp_pkt *fsp, | 547 | int (*fcp_cmd_send)(struct fc_lport *lp, struct fc_fcp_pkt *fsp, |
532 | void (*resp)(struct fc_seq *, struct fc_frame *fp, | 548 | void (*resp)(struct fc_seq *, struct fc_frame *fp, |
533 | void *arg)); | 549 | void *arg)); |
534 | 550 | ||
535 | /* | 551 | /* |
536 | * Used at least durring linkdown and reset | 552 | * Cleanup the FCP layer, used durring link down and reset |
553 | * | ||
554 | * STATUS: OPTIONAL | ||
537 | */ | 555 | */ |
538 | void (*fcp_cleanup)(struct fc_lport *lp); | 556 | void (*fcp_cleanup)(struct fc_lport *lp); |
539 | 557 | ||
540 | /* | 558 | /* |
541 | * Abort all I/O on a local port | 559 | * Abort all I/O on a local port |
560 | * | ||
561 | * STATUS: OPTIONAL | ||
542 | */ | 562 | */ |
543 | void (*fcp_abort_io)(struct fc_lport *lp); | 563 | void (*fcp_abort_io)(struct fc_lport *lp); |
544 | 564 | ||
545 | /** | 565 | /* |
546 | * Discovery interfaces | 566 | * Receive a request for the discovery layer. |
567 | * | ||
568 | * STATUS: OPTIONAL | ||
547 | */ | 569 | */ |
548 | |||
549 | void (*disc_recv_req)(struct fc_seq *, | 570 | void (*disc_recv_req)(struct fc_seq *, |
550 | struct fc_frame *, struct fc_lport *); | 571 | struct fc_frame *, struct fc_lport *); |
551 | 572 | ||
552 | /* | 573 | /* |
553 | * Start discovery for a local port. | 574 | * Start discovery for a local port. |
575 | * | ||
576 | * STATUS: OPTIONAL | ||
554 | */ | 577 | */ |
555 | void (*disc_start)(void (*disc_callback)(struct fc_lport *, | 578 | void (*disc_start)(void (*disc_callback)(struct fc_lport *, |
556 | enum fc_disc_event), | 579 | enum fc_disc_event), |
@@ -559,6 +582,8 @@ struct libfc_function_template { | |||
559 | /* | 582 | /* |
560 | * Stop discovery for a given lport. This will remove | 583 | * Stop discovery for a given lport. This will remove |
561 | * all discovered rports | 584 | * all discovered rports |
585 | * | ||
586 | * STATUS: OPTIONAL | ||
562 | */ | 587 | */ |
563 | void (*disc_stop) (struct fc_lport *); | 588 | void (*disc_stop) (struct fc_lport *); |
564 | 589 | ||
@@ -566,6 +591,8 @@ struct libfc_function_template { | |||
566 | * Stop discovery for a given lport. This will block | 591 | * Stop discovery for a given lport. This will block |
567 | * until all discovered rports are deleted from the | 592 | * until all discovered rports are deleted from the |
568 | * FC transport class | 593 | * FC transport class |
594 | * | ||
595 | * STATUS: OPTIONAL | ||
569 | */ | 596 | */ |
570 | void (*disc_stop_final) (struct fc_lport *); | 597 | void (*disc_stop_final) (struct fc_lport *); |
571 | }; | 598 | }; |
@@ -603,7 +630,8 @@ struct fc_lport { | |||
603 | 630 | ||
604 | /* Operational Information */ | 631 | /* Operational Information */ |
605 | struct libfc_function_template tt; | 632 | struct libfc_function_template tt; |
606 | u16 link_status; | 633 | u8 link_up; |
634 | u8 qfull; | ||
607 | enum fc_lport_state state; | 635 | enum fc_lport_state state; |
608 | unsigned long boot_time; | 636 | unsigned long boot_time; |
609 | 637 | ||
@@ -637,7 +665,7 @@ struct fc_lport { | |||
637 | struct delayed_work disc_work; | 665 | struct delayed_work disc_work; |
638 | }; | 666 | }; |
639 | 667 | ||
640 | /** | 668 | /* |
641 | * FC_LPORT HELPER FUNCTIONS | 669 | * FC_LPORT HELPER FUNCTIONS |
642 | *****************************/ | 670 | *****************************/ |
643 | static inline void *lport_priv(const struct fc_lport *lp) | 671 | static inline void *lport_priv(const struct fc_lport *lp) |
@@ -669,7 +697,7 @@ static inline void fc_lport_state_enter(struct fc_lport *lp, | |||
669 | } | 697 | } |
670 | 698 | ||
671 | 699 | ||
672 | /** | 700 | /* |
673 | * LOCAL PORT LAYER | 701 | * LOCAL PORT LAYER |
674 | *****************************/ | 702 | *****************************/ |
675 | int fc_lport_init(struct fc_lport *lp); | 703 | int fc_lport_init(struct fc_lport *lp); |
@@ -704,12 +732,6 @@ void fc_linkup(struct fc_lport *); | |||
704 | void fc_linkdown(struct fc_lport *); | 732 | void fc_linkdown(struct fc_lport *); |
705 | 733 | ||
706 | /* | 734 | /* |
707 | * Pause and unpause traffic. | ||
708 | */ | ||
709 | void fc_pause(struct fc_lport *); | ||
710 | void fc_unpause(struct fc_lport *); | ||
711 | |||
712 | /* | ||
713 | * Configure the local port. | 735 | * Configure the local port. |
714 | */ | 736 | */ |
715 | int fc_lport_config(struct fc_lport *); | 737 | int fc_lport_config(struct fc_lport *); |
@@ -725,19 +747,19 @@ int fc_lport_reset(struct fc_lport *); | |||
725 | int fc_set_mfs(struct fc_lport *lp, u32 mfs); | 747 | int fc_set_mfs(struct fc_lport *lp, u32 mfs); |
726 | 748 | ||
727 | 749 | ||
728 | /** | 750 | /* |
729 | * REMOTE PORT LAYER | 751 | * REMOTE PORT LAYER |
730 | *****************************/ | 752 | *****************************/ |
731 | int fc_rport_init(struct fc_lport *lp); | 753 | int fc_rport_init(struct fc_lport *lp); |
732 | void fc_rport_terminate_io(struct fc_rport *rp); | 754 | void fc_rport_terminate_io(struct fc_rport *rp); |
733 | 755 | ||
734 | /** | 756 | /* |
735 | * DISCOVERY LAYER | 757 | * DISCOVERY LAYER |
736 | *****************************/ | 758 | *****************************/ |
737 | int fc_disc_init(struct fc_lport *lp); | 759 | int fc_disc_init(struct fc_lport *lp); |
738 | 760 | ||
739 | 761 | ||
740 | /** | 762 | /* |
741 | * SCSI LAYER | 763 | * SCSI LAYER |
742 | *****************************/ | 764 | *****************************/ |
743 | /* | 765 | /* |
@@ -798,7 +820,7 @@ int fc_change_queue_type(struct scsi_device *sdev, int tag_type); | |||
798 | */ | 820 | */ |
799 | void fc_fcp_destroy(struct fc_lport *); | 821 | void fc_fcp_destroy(struct fc_lport *); |
800 | 822 | ||
801 | /** | 823 | /* |
802 | * ELS/CT interface | 824 | * ELS/CT interface |
803 | *****************************/ | 825 | *****************************/ |
804 | /* | 826 | /* |
@@ -807,7 +829,7 @@ void fc_fcp_destroy(struct fc_lport *); | |||
807 | int fc_elsct_init(struct fc_lport *lp); | 829 | int fc_elsct_init(struct fc_lport *lp); |
808 | 830 | ||
809 | 831 | ||
810 | /** | 832 | /* |
811 | * EXCHANGE MANAGER LAYER | 833 | * EXCHANGE MANAGER LAYER |
812 | *****************************/ | 834 | *****************************/ |
813 | /* | 835 | /* |
@@ -916,7 +938,7 @@ struct fc_seq *fc_seq_start_next(struct fc_seq *sp); | |||
916 | * If s_id is non-zero, reset only exchanges originating from that FID. | 938 | * If s_id is non-zero, reset only exchanges originating from that FID. |
917 | * If d_id is non-zero, reset only exchanges sending to that FID. | 939 | * If d_id is non-zero, reset only exchanges sending to that FID. |
918 | */ | 940 | */ |
919 | void fc_exch_mgr_reset(struct fc_exch_mgr *, u32 s_id, u32 d_id); | 941 | void fc_exch_mgr_reset(struct fc_lport *, u32 s_id, u32 d_id); |
920 | 942 | ||
921 | /* | 943 | /* |
922 | * Functions for fc_functions_template | 944 | * Functions for fc_functions_template |
diff --git a/include/scsi/libfcoe.h b/include/scsi/libfcoe.h index 89fdbb9a6a1b..941818f29f59 100644 --- a/include/scsi/libfcoe.h +++ b/include/scsi/libfcoe.h | |||
@@ -46,6 +46,7 @@ struct fcoe_softc { | |||
46 | struct net_device *phys_dev; /* device with ethtool_ops */ | 46 | struct net_device *phys_dev; /* device with ethtool_ops */ |
47 | struct packet_type fcoe_packet_type; | 47 | struct packet_type fcoe_packet_type; |
48 | struct sk_buff_head fcoe_pending_queue; | 48 | struct sk_buff_head fcoe_pending_queue; |
49 | u8 fcoe_pending_queue_active; | ||
49 | 50 | ||
50 | u8 dest_addr[ETH_ALEN]; | 51 | u8 dest_addr[ETH_ALEN]; |
51 | u8 ctl_src_addr[ETH_ALEN]; | 52 | u8 ctl_src_addr[ETH_ALEN]; |
@@ -58,16 +59,10 @@ struct fcoe_softc { | |||
58 | u8 address_mode; | 59 | u8 address_mode; |
59 | }; | 60 | }; |
60 | 61 | ||
61 | static inline struct fcoe_softc *fcoe_softc( | ||
62 | const struct fc_lport *lp) | ||
63 | { | ||
64 | return (struct fcoe_softc *)lport_priv(lp); | ||
65 | } | ||
66 | |||
67 | static inline struct net_device *fcoe_netdev( | 62 | static inline struct net_device *fcoe_netdev( |
68 | const struct fc_lport *lp) | 63 | const struct fc_lport *lp) |
69 | { | 64 | { |
70 | return fcoe_softc(lp)->real_dev; | 65 | return ((struct fcoe_softc *)lport_priv(lp))->real_dev; |
71 | } | 66 | } |
72 | 67 | ||
73 | static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb) | 68 | static inline struct fcoe_hdr *skb_fcoe_header(const struct sk_buff *skb) |