diff options
Diffstat (limited to 'include/linux')
73 files changed, 555 insertions, 492 deletions
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 37bfa19d806..f30fa92a44a 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -145,7 +145,6 @@ header-y += sound.h | |||
145 | header-y += taskstats.h | 145 | header-y += taskstats.h |
146 | header-y += telephony.h | 146 | header-y += telephony.h |
147 | header-y += termios.h | 147 | header-y += termios.h |
148 | header-y += ticable.h | ||
149 | header-y += times.h | 148 | header-y += times.h |
150 | header-y += tiocl.h | 149 | header-y += tiocl.h |
151 | header-y += tipc.h | 150 | header-y += tipc.h |
@@ -154,6 +153,7 @@ header-y += toshiba.h | |||
154 | header-y += ultrasound.h | 153 | header-y += ultrasound.h |
155 | header-y += un.h | 154 | header-y += un.h |
156 | header-y += utime.h | 155 | header-y += utime.h |
156 | header-y += veth.h | ||
157 | header-y += video_decoder.h | 157 | header-y += video_decoder.h |
158 | header-y += video_encoder.h | 158 | header-y += video_encoder.h |
159 | header-y += videotext.h | 159 | header-y += videotext.h |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 8ccedf7a0a5..63f2e6ed698 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <acpi/acpi_drivers.h> | 40 | #include <acpi/acpi_drivers.h> |
41 | #include <acpi/acpi_numa.h> | 41 | #include <acpi/acpi_numa.h> |
42 | #include <asm/acpi.h> | 42 | #include <asm/acpi.h> |
43 | #include <linux/dmi.h> | ||
43 | 44 | ||
44 | 45 | ||
45 | #ifdef CONFIG_ACPI | 46 | #ifdef CONFIG_ACPI |
@@ -132,6 +133,11 @@ extern unsigned long acpi_realmode_flags; | |||
132 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); | 133 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); |
133 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 134 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
134 | 135 | ||
136 | #ifdef CONFIG_X86_IO_APIC | ||
137 | extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity); | ||
138 | #else | ||
139 | #define acpi_get_override_irq(bus, trigger, polarity) (-1) | ||
140 | #endif | ||
135 | /* | 141 | /* |
136 | * This function undoes the effect of one call to acpi_register_gsi(). | 142 | * This function undoes the effect of one call to acpi_register_gsi(). |
137 | * If this matches the last registration, any IRQ resources for gsi | 143 | * If this matches the last registration, any IRQ resources for gsi |
@@ -187,7 +193,9 @@ extern int ec_transaction(u8 command, | |||
187 | #endif /*CONFIG_ACPI_EC*/ | 193 | #endif /*CONFIG_ACPI_EC*/ |
188 | 194 | ||
189 | extern int acpi_blacklisted(void); | 195 | extern int acpi_blacklisted(void); |
190 | extern void acpi_bios_year(char *s); | 196 | #ifdef CONFIG_DMI |
197 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | ||
198 | #endif | ||
191 | 199 | ||
192 | #ifdef CONFIG_ACPI_NUMA | 200 | #ifdef CONFIG_ACPI_NUMA |
193 | int acpi_get_pxm(acpi_handle handle); | 201 | int acpi_get_pxm(acpi_handle handle); |
@@ -221,5 +229,5 @@ static inline int acpi_boot_table_init(void) | |||
221 | return 0; | 229 | return 0; |
222 | } | 230 | } |
223 | 231 | ||
224 | #endif /* CONFIG_ACPI */ | 232 | #endif /* !CONFIG_ACPI */ |
225 | #endif /*_LINUX_ACPI_H*/ | 233 | #endif /*_LINUX_ACPI_H*/ |
diff --git a/include/linux/apm_bios.h b/include/linux/apm_bios.h index 9754baa1492..01a6244c9bc 100644 --- a/include/linux/apm_bios.h +++ b/include/linux/apm_bios.h | |||
@@ -18,6 +18,9 @@ | |||
18 | 18 | ||
19 | #include <linux/types.h> | 19 | #include <linux/types.h> |
20 | 20 | ||
21 | typedef unsigned short apm_event_t; | ||
22 | typedef unsigned short apm_eventinfo_t; | ||
23 | |||
21 | struct apm_bios_info { | 24 | struct apm_bios_info { |
22 | __u16 version; | 25 | __u16 version; |
23 | __u16 cseg; | 26 | __u16 cseg; |
@@ -32,9 +35,6 @@ struct apm_bios_info { | |||
32 | 35 | ||
33 | #ifdef __KERNEL__ | 36 | #ifdef __KERNEL__ |
34 | 37 | ||
35 | typedef unsigned short apm_event_t; | ||
36 | typedef unsigned short apm_eventinfo_t; | ||
37 | |||
38 | #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8) | 38 | #define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8) |
39 | #define APM_CS_16 (APM_CS + 8) | 39 | #define APM_CS_16 (APM_CS + 8) |
40 | #define APM_DS (APM_CS_16 + 8) | 40 | #define APM_DS (APM_CS_16 + 8) |
diff --git a/include/linux/ata.h b/include/linux/ata.h index 5c4e54a2a8d..e672e80202a 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -190,6 +190,8 @@ enum { | |||
190 | ATA_CMD_READ_LOG_EXT = 0x2f, | 190 | ATA_CMD_READ_LOG_EXT = 0x2f, |
191 | ATA_CMD_PMP_READ = 0xE4, | 191 | ATA_CMD_PMP_READ = 0xE4, |
192 | ATA_CMD_PMP_WRITE = 0xE8, | 192 | ATA_CMD_PMP_WRITE = 0xE8, |
193 | ATA_CMD_CONF_OVERLAY = 0xB1, | ||
194 | ATA_CMD_SEC_FREEZE_LOCK = 0xF5, | ||
193 | 195 | ||
194 | /* READ_LOG_EXT pages */ | 196 | /* READ_LOG_EXT pages */ |
195 | ATA_LOG_SATA_NCQ = 0x10, | 197 | ATA_LOG_SATA_NCQ = 0x10, |
@@ -239,6 +241,19 @@ enum { | |||
239 | SATA_AN = 0x05, /* Asynchronous Notification */ | 241 | SATA_AN = 0x05, /* Asynchronous Notification */ |
240 | SATA_DIPM = 0x03, /* Device Initiated Power Management */ | 242 | SATA_DIPM = 0x03, /* Device Initiated Power Management */ |
241 | 243 | ||
244 | /* feature values for SET_MAX */ | ||
245 | ATA_SET_MAX_ADDR = 0x00, | ||
246 | ATA_SET_MAX_PASSWD = 0x01, | ||
247 | ATA_SET_MAX_LOCK = 0x02, | ||
248 | ATA_SET_MAX_UNLOCK = 0x03, | ||
249 | ATA_SET_MAX_FREEZE_LOCK = 0x04, | ||
250 | |||
251 | /* feature values for DEVICE CONFIGURATION OVERLAY */ | ||
252 | ATA_DCO_RESTORE = 0xC0, | ||
253 | ATA_DCO_FREEZE_LOCK = 0xC1, | ||
254 | ATA_DCO_IDENTIFY = 0xC2, | ||
255 | ATA_DCO_SET = 0xC3, | ||
256 | |||
242 | /* ATAPI stuff */ | 257 | /* ATAPI stuff */ |
243 | ATAPI_PKT_DMA = (1 << 0), | 258 | ATAPI_PKT_DMA = (1 << 0), |
244 | ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: | 259 | ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: |
@@ -539,8 +554,6 @@ static inline int ata_drive_40wire(const u16 *dev_id) | |||
539 | 554 | ||
540 | static inline int ata_drive_40wire_relaxed(const u16 *dev_id) | 555 | static inline int ata_drive_40wire_relaxed(const u16 *dev_id) |
541 | { | 556 | { |
542 | if (ata_id_is_sata(dev_id)) | ||
543 | return 0; /* SATA */ | ||
544 | if ((dev_id[93] & 0x2000) == 0x2000) | 557 | if ((dev_id[93] & 0x2000) == 0x2000) |
545 | return 0; /* 80 wire */ | 558 | return 0; /* 80 wire */ |
546 | return 1; | 559 | return 1; |
diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index d62fcee9a08..9ec43186ba8 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h | |||
@@ -30,3 +30,10 @@ SUBSYS(cpu_cgroup) | |||
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | /* */ | 32 | /* */ |
33 | |||
34 | #ifdef CONFIG_CGROUP_CPUACCT | ||
35 | SUBSYS(cpuacct) | ||
36 | #endif | ||
37 | |||
38 | /* */ | ||
39 | |||
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index b79c5756936..92f2029a34f 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -107,7 +107,6 @@ extern void unlock_cpu_hotplug(void); | |||
107 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) | 107 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) |
108 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) | 108 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) |
109 | int cpu_down(unsigned int cpu); | 109 | int cpu_down(unsigned int cpu); |
110 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | ||
111 | 110 | ||
112 | #else /* CONFIG_HOTPLUG_CPU */ | 111 | #else /* CONFIG_HOTPLUG_CPU */ |
113 | 112 | ||
@@ -122,9 +121,6 @@ static inline void cpuhotplug_mutex_unlock(struct mutex *cpu_hp_mutex) | |||
122 | /* These aren't inline functions due to a GCC bug. */ | 121 | /* These aren't inline functions due to a GCC bug. */ |
123 | #define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) | 122 | #define register_hotcpu_notifier(nb) ({ (void)(nb); 0; }) |
124 | #define unregister_hotcpu_notifier(nb) ({ (void)(nb); }) | 123 | #define unregister_hotcpu_notifier(nb) ({ (void)(nb); }) |
125 | |||
126 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ | ||
127 | static inline int cpu_is_offline(int cpu) { return 0; } | ||
128 | #endif /* CONFIG_HOTPLUG_CPU */ | 124 | #endif /* CONFIG_HOTPLUG_CPU */ |
129 | 125 | ||
130 | #ifdef CONFIG_PM_SLEEP_SMP | 126 | #ifdef CONFIG_PM_SLEEP_SMP |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 16a51546db4..c4e00161a24 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -92,6 +92,7 @@ struct cpuidle_device { | |||
92 | struct kobject kobj; | 92 | struct kobject kobj; |
93 | struct completion kobj_unregister; | 93 | struct completion kobj_unregister; |
94 | void *governor_data; | 94 | void *governor_data; |
95 | struct cpuidle_state *safe_state; | ||
95 | }; | 96 | }; |
96 | 97 | ||
97 | DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); | 98 | DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); |
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 23f55140ccd..85bd790c201 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h | |||
@@ -397,6 +397,8 @@ extern cpumask_t cpu_present_map; | |||
397 | #define cpu_present(cpu) ((cpu) == 0) | 397 | #define cpu_present(cpu) ((cpu) == 0) |
398 | #endif | 398 | #endif |
399 | 399 | ||
400 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | ||
401 | |||
400 | #ifdef CONFIG_SMP | 402 | #ifdef CONFIG_SMP |
401 | extern int nr_cpu_ids; | 403 | extern int nr_cpu_ids; |
402 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) | 404 | #define any_online_cpu(mask) __any_online_cpu(&(mask)) |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index b8b7c51389f..e765e191663 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -115,6 +115,7 @@ struct io_restrictions { | |||
115 | unsigned short max_hw_segments; | 115 | unsigned short max_hw_segments; |
116 | unsigned short hardsect_size; | 116 | unsigned short hardsect_size; |
117 | unsigned int max_segment_size; | 117 | unsigned int max_segment_size; |
118 | unsigned int max_hw_sectors; | ||
118 | unsigned long seg_boundary_mask; | 119 | unsigned long seg_boundary_mask; |
119 | unsigned long bounce_pfn; | 120 | unsigned long bounce_pfn; |
120 | unsigned char no_cluster; /* inverted so that 0 is default */ | 121 | unsigned char no_cluster; /* inverted so that 0 is default */ |
diff --git a/include/linux/device.h b/include/linux/device.h index 2e15822fe40..1880208964d 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -25,75 +25,69 @@ | |||
25 | #include <asm/device.h> | 25 | #include <asm/device.h> |
26 | 26 | ||
27 | #define DEVICE_NAME_SIZE 50 | 27 | #define DEVICE_NAME_SIZE 50 |
28 | #define DEVICE_NAME_HALF __stringify(20) /* Less than half to accommodate slop */ | 28 | /* DEVICE_NAME_HALF is really less than half to accommodate slop */ |
29 | #define DEVICE_NAME_HALF __stringify(20) | ||
29 | #define DEVICE_ID_SIZE 32 | 30 | #define DEVICE_ID_SIZE 32 |
30 | #define BUS_ID_SIZE KOBJ_NAME_LEN | 31 | #define BUS_ID_SIZE KOBJ_NAME_LEN |
31 | 32 | ||
32 | 33 | ||
33 | struct device; | 34 | struct device; |
34 | struct device_driver; | 35 | struct device_driver; |
36 | struct driver_private; | ||
35 | struct class; | 37 | struct class; |
36 | struct class_device; | 38 | struct class_device; |
37 | struct bus_type; | 39 | struct bus_type; |
40 | struct bus_type_private; | ||
38 | 41 | ||
39 | struct bus_attribute { | 42 | struct bus_attribute { |
40 | struct attribute attr; | 43 | struct attribute attr; |
41 | ssize_t (*show)(struct bus_type *, char * buf); | 44 | ssize_t (*show)(struct bus_type *bus, char *buf); |
42 | ssize_t (*store)(struct bus_type *, const char * buf, size_t count); | 45 | ssize_t (*store)(struct bus_type *bus, const char *buf, size_t count); |
43 | }; | 46 | }; |
44 | 47 | ||
45 | #define BUS_ATTR(_name,_mode,_show,_store) \ | 48 | #define BUS_ATTR(_name, _mode, _show, _store) \ |
46 | struct bus_attribute bus_attr_##_name = __ATTR(_name,_mode,_show,_store) | 49 | struct bus_attribute bus_attr_##_name = __ATTR(_name, _mode, _show, _store) |
47 | 50 | ||
48 | extern int __must_check bus_create_file(struct bus_type *, | 51 | extern int __must_check bus_create_file(struct bus_type *, |
49 | struct bus_attribute *); | 52 | struct bus_attribute *); |
50 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | 53 | extern void bus_remove_file(struct bus_type *, struct bus_attribute *); |
51 | 54 | ||
52 | struct bus_type { | 55 | struct bus_type { |
53 | const char * name; | 56 | const char *name; |
54 | struct module * owner; | 57 | struct bus_attribute *bus_attrs; |
58 | struct device_attribute *dev_attrs; | ||
59 | struct driver_attribute *drv_attrs; | ||
55 | 60 | ||
56 | struct kset subsys; | 61 | int (*match)(struct device *dev, struct device_driver *drv); |
57 | struct kset drivers; | 62 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); |
58 | struct kset devices; | 63 | int (*probe)(struct device *dev); |
59 | struct klist klist_devices; | 64 | int (*remove)(struct device *dev); |
60 | struct klist klist_drivers; | 65 | void (*shutdown)(struct device *dev); |
61 | |||
62 | struct blocking_notifier_head bus_notifier; | ||
63 | |||
64 | struct bus_attribute * bus_attrs; | ||
65 | struct device_attribute * dev_attrs; | ||
66 | struct driver_attribute * drv_attrs; | ||
67 | |||
68 | int (*match)(struct device * dev, struct device_driver * drv); | ||
69 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); | ||
70 | int (*probe)(struct device * dev); | ||
71 | int (*remove)(struct device * dev); | ||
72 | void (*shutdown)(struct device * dev); | ||
73 | 66 | ||
74 | int (*suspend)(struct device * dev, pm_message_t state); | 67 | int (*suspend)(struct device *dev, pm_message_t state); |
75 | int (*suspend_late)(struct device * dev, pm_message_t state); | 68 | int (*suspend_late)(struct device *dev, pm_message_t state); |
76 | int (*resume_early)(struct device * dev); | 69 | int (*resume_early)(struct device *dev); |
77 | int (*resume)(struct device * dev); | 70 | int (*resume)(struct device *dev); |
78 | 71 | ||
79 | unsigned int drivers_autoprobe:1; | 72 | struct bus_type_private *p; |
80 | }; | 73 | }; |
81 | 74 | ||
82 | extern int __must_check bus_register(struct bus_type * bus); | 75 | extern int __must_check bus_register(struct bus_type *bus); |
83 | extern void bus_unregister(struct bus_type * bus); | 76 | extern void bus_unregister(struct bus_type *bus); |
84 | 77 | ||
85 | extern int __must_check bus_rescan_devices(struct bus_type * bus); | 78 | extern int __must_check bus_rescan_devices(struct bus_type *bus); |
86 | 79 | ||
87 | /* iterator helpers for buses */ | 80 | /* iterator helpers for buses */ |
88 | 81 | ||
89 | int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, | 82 | int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data, |
90 | int (*fn)(struct device *, void *)); | 83 | int (*fn)(struct device *dev, void *data)); |
91 | struct device * bus_find_device(struct bus_type *bus, struct device *start, | 84 | struct device *bus_find_device(struct bus_type *bus, struct device *start, |
92 | void *data, int (*match)(struct device *, void *)); | 85 | void *data, |
86 | int (*match)(struct device *dev, void *data)); | ||
93 | 87 | ||
94 | int __must_check bus_for_each_drv(struct bus_type *bus, | 88 | int __must_check bus_for_each_drv(struct bus_type *bus, |
95 | struct device_driver *start, void *data, | 89 | struct device_driver *start, void *data, |
96 | int (*fn)(struct device_driver *, void *)); | 90 | int (*fn)(struct device_driver *, void *)); |
97 | 91 | ||
98 | /* | 92 | /* |
99 | * Bus notifiers: Get notified of addition/removal of devices | 93 | * Bus notifiers: Get notified of addition/removal of devices |
@@ -118,111 +112,128 @@ extern int bus_unregister_notifier(struct bus_type *bus, | |||
118 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be | 112 | #define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be |
119 | unbound */ | 113 | unbound */ |
120 | 114 | ||
115 | extern struct kset *bus_get_kset(struct bus_type *bus); | ||
116 | extern struct klist *bus_get_device_klist(struct bus_type *bus); | ||
117 | |||
121 | struct device_driver { | 118 | struct device_driver { |
122 | const char * name; | 119 | const char *name; |
123 | struct bus_type * bus; | 120 | struct bus_type *bus; |
124 | 121 | ||
125 | struct kobject kobj; | 122 | struct module *owner; |
126 | struct klist klist_devices; | 123 | const char *mod_name; /* used for built-in modules */ |
127 | struct klist_node knode_bus; | ||
128 | 124 | ||
129 | struct module * owner; | 125 | int (*probe) (struct device *dev); |
130 | const char * mod_name; /* used for built-in modules */ | 126 | int (*remove) (struct device *dev); |
131 | struct module_kobject * mkobj; | 127 | void (*shutdown) (struct device *dev); |
128 | int (*suspend) (struct device *dev, pm_message_t state); | ||
129 | int (*resume) (struct device *dev); | ||
130 | struct attribute_group **groups; | ||
132 | 131 | ||
133 | int (*probe) (struct device * dev); | 132 | struct driver_private *p; |
134 | int (*remove) (struct device * dev); | ||
135 | void (*shutdown) (struct device * dev); | ||
136 | int (*suspend) (struct device * dev, pm_message_t state); | ||
137 | int (*resume) (struct device * dev); | ||
138 | }; | 133 | }; |
139 | 134 | ||
140 | 135 | ||
141 | extern int __must_check driver_register(struct device_driver * drv); | 136 | extern int __must_check driver_register(struct device_driver *drv); |
142 | extern void driver_unregister(struct device_driver * drv); | 137 | extern void driver_unregister(struct device_driver *drv); |
143 | 138 | ||
144 | extern struct device_driver * get_driver(struct device_driver * drv); | 139 | extern struct device_driver *get_driver(struct device_driver *drv); |
145 | extern void put_driver(struct device_driver * drv); | 140 | extern void put_driver(struct device_driver *drv); |
146 | extern struct device_driver *driver_find(const char *name, struct bus_type *bus); | 141 | extern struct device_driver *driver_find(const char *name, |
142 | struct bus_type *bus); | ||
147 | extern int driver_probe_done(void); | 143 | extern int driver_probe_done(void); |
148 | 144 | ||
149 | /* sysfs interface for exporting driver attributes */ | 145 | /* sysfs interface for exporting driver attributes */ |
150 | 146 | ||
151 | struct driver_attribute { | 147 | struct driver_attribute { |
152 | struct attribute attr; | 148 | struct attribute attr; |
153 | ssize_t (*show)(struct device_driver *, char * buf); | 149 | ssize_t (*show)(struct device_driver *driver, char *buf); |
154 | ssize_t (*store)(struct device_driver *, const char * buf, size_t count); | 150 | ssize_t (*store)(struct device_driver *driver, const char *buf, |
151 | size_t count); | ||
155 | }; | 152 | }; |
156 | 153 | ||
157 | #define DRIVER_ATTR(_name,_mode,_show,_store) \ | 154 | #define DRIVER_ATTR(_name, _mode, _show, _store) \ |
158 | struct driver_attribute driver_attr_##_name = __ATTR(_name,_mode,_show,_store) | 155 | struct driver_attribute driver_attr_##_name = \ |
156 | __ATTR(_name, _mode, _show, _store) | ||
159 | 157 | ||
160 | extern int __must_check driver_create_file(struct device_driver *, | 158 | extern int __must_check driver_create_file(struct device_driver *driver, |
161 | struct driver_attribute *); | 159 | struct driver_attribute *attr); |
162 | extern void driver_remove_file(struct device_driver *, struct driver_attribute *); | 160 | extern void driver_remove_file(struct device_driver *driver, |
161 | struct driver_attribute *attr); | ||
163 | 162 | ||
164 | extern int __must_check driver_for_each_device(struct device_driver * drv, | 163 | extern int __must_check driver_add_kobj(struct device_driver *drv, |
165 | struct device *start, void *data, | 164 | struct kobject *kobj, |
166 | int (*fn)(struct device *, void *)); | 165 | const char *fmt, ...); |
167 | struct device * driver_find_device(struct device_driver *drv, | 166 | |
168 | struct device *start, void *data, | 167 | extern int __must_check driver_for_each_device(struct device_driver *drv, |
169 | int (*match)(struct device *, void *)); | 168 | struct device *start, |
169 | void *data, | ||
170 | int (*fn)(struct device *dev, | ||
171 | void *)); | ||
172 | struct device *driver_find_device(struct device_driver *drv, | ||
173 | struct device *start, void *data, | ||
174 | int (*match)(struct device *dev, void *data)); | ||
170 | 175 | ||
171 | /* | 176 | /* |
172 | * device classes | 177 | * device classes |
173 | */ | 178 | */ |
174 | struct class { | 179 | struct class { |
175 | const char * name; | 180 | const char *name; |
176 | struct module * owner; | 181 | struct module *owner; |
177 | 182 | ||
178 | struct kset subsys; | 183 | struct kset subsys; |
179 | struct list_head children; | 184 | struct list_head children; |
180 | struct list_head devices; | 185 | struct list_head devices; |
181 | struct list_head interfaces; | 186 | struct list_head interfaces; |
182 | struct kset class_dirs; | 187 | struct kset class_dirs; |
183 | struct semaphore sem; /* locks both the children and interfaces lists */ | 188 | struct semaphore sem; /* locks children, devices, interfaces */ |
184 | 189 | struct class_attribute *class_attrs; | |
185 | struct class_attribute * class_attrs; | 190 | struct class_device_attribute *class_dev_attrs; |
186 | struct class_device_attribute * class_dev_attrs; | 191 | struct device_attribute *dev_attrs; |
187 | struct device_attribute * dev_attrs; | ||
188 | 192 | ||
189 | int (*uevent)(struct class_device *dev, struct kobj_uevent_env *env); | 193 | int (*uevent)(struct class_device *dev, struct kobj_uevent_env *env); |
190 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); | 194 | int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env); |
191 | 195 | ||
192 | void (*release)(struct class_device *dev); | 196 | void (*release)(struct class_device *dev); |
193 | void (*class_release)(struct class *class); | 197 | void (*class_release)(struct class *class); |
194 | void (*dev_release)(struct device *dev); | 198 | void (*dev_release)(struct device *dev); |
195 | 199 | ||
196 | int (*suspend)(struct device *, pm_message_t state); | 200 | int (*suspend)(struct device *dev, pm_message_t state); |
197 | int (*resume)(struct device *); | 201 | int (*resume)(struct device *dev); |
198 | }; | 202 | }; |
199 | 203 | ||
200 | extern int __must_check class_register(struct class *); | 204 | extern int __must_check class_register(struct class *class); |
201 | extern void class_unregister(struct class *); | 205 | extern void class_unregister(struct class *class); |
206 | extern int class_for_each_device(struct class *class, void *data, | ||
207 | int (*fn)(struct device *dev, void *data)); | ||
208 | extern struct device *class_find_device(struct class *class, void *data, | ||
209 | int (*match)(struct device *, void *)); | ||
210 | extern struct class_device *class_find_child(struct class *class, void *data, | ||
211 | int (*match)(struct class_device *, void *)); | ||
202 | 212 | ||
203 | 213 | ||
204 | struct class_attribute { | 214 | struct class_attribute { |
205 | struct attribute attr; | 215 | struct attribute attr; |
206 | ssize_t (*show)(struct class *, char * buf); | 216 | ssize_t (*show)(struct class *class, char *buf); |
207 | ssize_t (*store)(struct class *, const char * buf, size_t count); | 217 | ssize_t (*store)(struct class *class, const char *buf, size_t count); |
208 | }; | 218 | }; |
209 | 219 | ||
210 | #define CLASS_ATTR(_name,_mode,_show,_store) \ | 220 | #define CLASS_ATTR(_name, _mode, _show, _store) \ |
211 | struct class_attribute class_attr_##_name = __ATTR(_name,_mode,_show,_store) | 221 | struct class_attribute class_attr_##_name = __ATTR(_name, _mode, _show, _store) |
212 | 222 | ||
213 | extern int __must_check class_create_file(struct class *, | 223 | extern int __must_check class_create_file(struct class *class, |
214 | const struct class_attribute *); | 224 | const struct class_attribute *attr); |
215 | extern void class_remove_file(struct class *, const struct class_attribute *); | 225 | extern void class_remove_file(struct class *class, |
226 | const struct class_attribute *attr); | ||
216 | 227 | ||
217 | struct class_device_attribute { | 228 | struct class_device_attribute { |
218 | struct attribute attr; | 229 | struct attribute attr; |
219 | ssize_t (*show)(struct class_device *, char * buf); | 230 | ssize_t (*show)(struct class_device *, char *buf); |
220 | ssize_t (*store)(struct class_device *, const char * buf, size_t count); | 231 | ssize_t (*store)(struct class_device *, const char *buf, size_t count); |
221 | }; | 232 | }; |
222 | 233 | ||
223 | #define CLASS_DEVICE_ATTR(_name,_mode,_show,_store) \ | 234 | #define CLASS_DEVICE_ATTR(_name, _mode, _show, _store) \ |
224 | struct class_device_attribute class_device_attr_##_name = \ | 235 | struct class_device_attribute class_device_attr_##_name = \ |
225 | __ATTR(_name,_mode,_show,_store) | 236 | __ATTR(_name, _mode, _show, _store) |
226 | 237 | ||
227 | extern int __must_check class_device_create_file(struct class_device *, | 238 | extern int __must_check class_device_create_file(struct class_device *, |
228 | const struct class_device_attribute *); | 239 | const struct class_device_attribute *); |
@@ -255,26 +266,24 @@ struct class_device { | |||
255 | struct list_head node; | 266 | struct list_head node; |
256 | 267 | ||
257 | struct kobject kobj; | 268 | struct kobject kobj; |
258 | struct class * class; /* required */ | 269 | struct class *class; |
259 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 270 | dev_t devt; |
260 | struct device * dev; /* not necessary, but nice to have */ | 271 | struct device *dev; |
261 | void * class_data; /* class-specific data */ | 272 | void *class_data; |
262 | struct class_device *parent; /* parent of this child device, if there is one */ | 273 | struct class_device *parent; |
263 | struct attribute_group ** groups; /* optional groups */ | 274 | struct attribute_group **groups; |
264 | 275 | ||
265 | void (*release)(struct class_device *dev); | 276 | void (*release)(struct class_device *dev); |
266 | int (*uevent)(struct class_device *dev, struct kobj_uevent_env *env); | 277 | int (*uevent)(struct class_device *dev, struct kobj_uevent_env *env); |
267 | char class_id[BUS_ID_SIZE]; /* unique to this class */ | 278 | char class_id[BUS_ID_SIZE]; |
268 | }; | 279 | }; |
269 | 280 | ||
270 | static inline void * | 281 | static inline void *class_get_devdata(struct class_device *dev) |
271 | class_get_devdata (struct class_device *dev) | ||
272 | { | 282 | { |
273 | return dev->class_data; | 283 | return dev->class_data; |
274 | } | 284 | } |
275 | 285 | ||
276 | static inline void | 286 | static inline void class_set_devdata(struct class_device *dev, void *data) |
277 | class_set_devdata (struct class_device *dev, void *data) | ||
278 | { | 287 | { |
279 | dev->class_data = data; | 288 | dev->class_data = data; |
280 | } | 289 | } |
@@ -286,10 +295,10 @@ extern void class_device_initialize(struct class_device *); | |||
286 | extern int __must_check class_device_add(struct class_device *); | 295 | extern int __must_check class_device_add(struct class_device *); |
287 | extern void class_device_del(struct class_device *); | 296 | extern void class_device_del(struct class_device *); |
288 | 297 | ||
289 | extern struct class_device * class_device_get(struct class_device *); | 298 | extern struct class_device *class_device_get(struct class_device *); |
290 | extern void class_device_put(struct class_device *); | 299 | extern void class_device_put(struct class_device *); |
291 | 300 | ||
292 | extern void class_device_remove_file(struct class_device *, | 301 | extern void class_device_remove_file(struct class_device *, |
293 | const struct class_device_attribute *); | 302 | const struct class_device_attribute *); |
294 | extern int __must_check class_device_create_bin_file(struct class_device *, | 303 | extern int __must_check class_device_create_bin_file(struct class_device *, |
295 | struct bin_attribute *); | 304 | struct bin_attribute *); |
@@ -316,7 +325,7 @@ extern struct class_device *class_device_create(struct class *cls, | |||
316 | dev_t devt, | 325 | dev_t devt, |
317 | struct device *device, | 326 | struct device *device, |
318 | const char *fmt, ...) | 327 | const char *fmt, ...) |
319 | __attribute__((format(printf,5,6))); | 328 | __attribute__((format(printf, 5, 6))); |
320 | extern void class_device_destroy(struct class *cls, dev_t devt); | 329 | extern void class_device_destroy(struct class *cls, dev_t devt); |
321 | 330 | ||
322 | /* | 331 | /* |
@@ -333,8 +342,8 @@ struct device_type { | |||
333 | struct attribute_group **groups; | 342 | struct attribute_group **groups; |
334 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); | 343 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); |
335 | void (*release)(struct device *dev); | 344 | void (*release)(struct device *dev); |
336 | int (*suspend)(struct device * dev, pm_message_t state); | 345 | int (*suspend)(struct device *dev, pm_message_t state); |
337 | int (*resume)(struct device * dev); | 346 | int (*resume)(struct device *dev); |
338 | }; | 347 | }; |
339 | 348 | ||
340 | /* interface for exporting device attributes */ | 349 | /* interface for exporting device attributes */ |
@@ -346,18 +355,19 @@ struct device_attribute { | |||
346 | const char *buf, size_t count); | 355 | const char *buf, size_t count); |
347 | }; | 356 | }; |
348 | 357 | ||
349 | #define DEVICE_ATTR(_name,_mode,_show,_store) \ | 358 | #define DEVICE_ATTR(_name, _mode, _show, _store) \ |
350 | struct device_attribute dev_attr_##_name = __ATTR(_name,_mode,_show,_store) | 359 | struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) |
351 | 360 | ||
352 | extern int __must_check device_create_file(struct device *device, | 361 | extern int __must_check device_create_file(struct device *device, |
353 | struct device_attribute * entry); | 362 | struct device_attribute *entry); |
354 | extern void device_remove_file(struct device * dev, struct device_attribute * attr); | 363 | extern void device_remove_file(struct device *dev, |
364 | struct device_attribute *attr); | ||
355 | extern int __must_check device_create_bin_file(struct device *dev, | 365 | extern int __must_check device_create_bin_file(struct device *dev, |
356 | struct bin_attribute *attr); | 366 | struct bin_attribute *attr); |
357 | extern void device_remove_bin_file(struct device *dev, | 367 | extern void device_remove_bin_file(struct device *dev, |
358 | struct bin_attribute *attr); | 368 | struct bin_attribute *attr); |
359 | extern int device_schedule_callback_owner(struct device *dev, | 369 | extern int device_schedule_callback_owner(struct device *dev, |
360 | void (*func)(struct device *), struct module *owner); | 370 | void (*func)(struct device *dev), struct module *owner); |
361 | 371 | ||
362 | /* This is a macro to avoid include problems with THIS_MODULE */ | 372 | /* This is a macro to avoid include problems with THIS_MODULE */ |
363 | #define device_schedule_callback(dev, func) \ | 373 | #define device_schedule_callback(dev, func) \ |
@@ -368,21 +378,21 @@ typedef void (*dr_release_t)(struct device *dev, void *res); | |||
368 | typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data); | 378 | typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data); |
369 | 379 | ||
370 | #ifdef CONFIG_DEBUG_DEVRES | 380 | #ifdef CONFIG_DEBUG_DEVRES |
371 | extern void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp, | 381 | extern void *__devres_alloc(dr_release_t release, size_t size, gfp_t gfp, |
372 | const char *name); | 382 | const char *name); |
373 | #define devres_alloc(release, size, gfp) \ | 383 | #define devres_alloc(release, size, gfp) \ |
374 | __devres_alloc(release, size, gfp, #release) | 384 | __devres_alloc(release, size, gfp, #release) |
375 | #else | 385 | #else |
376 | extern void * devres_alloc(dr_release_t release, size_t size, gfp_t gfp); | 386 | extern void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp); |
377 | #endif | 387 | #endif |
378 | extern void devres_free(void *res); | 388 | extern void devres_free(void *res); |
379 | extern void devres_add(struct device *dev, void *res); | 389 | extern void devres_add(struct device *dev, void *res); |
380 | extern void * devres_find(struct device *dev, dr_release_t release, | 390 | extern void *devres_find(struct device *dev, dr_release_t release, |
381 | dr_match_t match, void *match_data); | ||
382 | extern void * devres_get(struct device *dev, void *new_res, | ||
383 | dr_match_t match, void *match_data); | 391 | dr_match_t match, void *match_data); |
384 | extern void * devres_remove(struct device *dev, dr_release_t release, | 392 | extern void *devres_get(struct device *dev, void *new_res, |
385 | dr_match_t match, void *match_data); | 393 | dr_match_t match, void *match_data); |
394 | extern void *devres_remove(struct device *dev, dr_release_t release, | ||
395 | dr_match_t match, void *match_data); | ||
386 | extern int devres_destroy(struct device *dev, dr_release_t release, | 396 | extern int devres_destroy(struct device *dev, dr_release_t release, |
387 | dr_match_t match, void *match_data); | 397 | dr_match_t match, void *match_data); |
388 | 398 | ||
@@ -399,7 +409,7 @@ extern void devm_kfree(struct device *dev, void *p); | |||
399 | 409 | ||
400 | struct device { | 410 | struct device { |
401 | struct klist klist_children; | 411 | struct klist klist_children; |
402 | struct klist_node knode_parent; /* node in sibling list */ | 412 | struct klist_node knode_parent; /* node in sibling list */ |
403 | struct klist_node knode_driver; | 413 | struct klist_node knode_driver; |
404 | struct klist_node knode_bus; | 414 | struct klist_node knode_bus; |
405 | struct device *parent; | 415 | struct device *parent; |
@@ -414,7 +424,7 @@ struct device { | |||
414 | * its driver. | 424 | * its driver. |
415 | */ | 425 | */ |
416 | 426 | ||
417 | struct bus_type * bus; /* type of bus device is on */ | 427 | struct bus_type *bus; /* type of bus device is on */ |
418 | struct device_driver *driver; /* which driver has allocated this | 428 | struct device_driver *driver; /* which driver has allocated this |
419 | device */ | 429 | device */ |
420 | void *driver_data; /* data private to the driver */ | 430 | void *driver_data; /* data private to the driver */ |
@@ -445,10 +455,10 @@ struct device { | |||
445 | /* class_device migration path */ | 455 | /* class_device migration path */ |
446 | struct list_head node; | 456 | struct list_head node; |
447 | struct class *class; | 457 | struct class *class; |
448 | dev_t devt; /* dev_t, creates the sysfs "dev" */ | 458 | dev_t devt; /* dev_t, creates the sysfs "dev" */ |
449 | struct attribute_group **groups; /* optional groups */ | 459 | struct attribute_group **groups; /* optional groups */ |
450 | 460 | ||
451 | void (*release)(struct device * dev); | 461 | void (*release)(struct device *dev); |
452 | }; | 462 | }; |
453 | 463 | ||
454 | #ifdef CONFIG_NUMA | 464 | #ifdef CONFIG_NUMA |
@@ -470,14 +480,12 @@ static inline void set_dev_node(struct device *dev, int node) | |||
470 | } | 480 | } |
471 | #endif | 481 | #endif |
472 | 482 | ||
473 | static inline void * | 483 | static inline void *dev_get_drvdata(struct device *dev) |
474 | dev_get_drvdata (struct device *dev) | ||
475 | { | 484 | { |
476 | return dev->driver_data; | 485 | return dev->driver_data; |
477 | } | 486 | } |
478 | 487 | ||
479 | static inline void | 488 | static inline void dev_set_drvdata(struct device *dev, void *data) |
480 | dev_set_drvdata (struct device *dev, void *data) | ||
481 | { | 489 | { |
482 | dev->driver_data = data; | 490 | dev->driver_data = data; |
483 | } | 491 | } |
@@ -492,15 +500,15 @@ void driver_init(void); | |||
492 | /* | 500 | /* |
493 | * High level routines for use by the bus drivers | 501 | * High level routines for use by the bus drivers |
494 | */ | 502 | */ |
495 | extern int __must_check device_register(struct device * dev); | 503 | extern int __must_check device_register(struct device *dev); |
496 | extern void device_unregister(struct device * dev); | 504 | extern void device_unregister(struct device *dev); |
497 | extern void device_initialize(struct device * dev); | 505 | extern void device_initialize(struct device *dev); |
498 | extern int __must_check device_add(struct device * dev); | 506 | extern int __must_check device_add(struct device *dev); |
499 | extern void device_del(struct device * dev); | 507 | extern void device_del(struct device *dev); |
500 | extern int device_for_each_child(struct device *, void *, | 508 | extern int device_for_each_child(struct device *dev, void *data, |
501 | int (*fn)(struct device *, void *)); | 509 | int (*fn)(struct device *dev, void *data)); |
502 | extern struct device *device_find_child(struct device *, void *data, | 510 | extern struct device *device_find_child(struct device *dev, void *data, |
503 | int (*match)(struct device *, void *)); | 511 | int (*match)(struct device *dev, void *data)); |
504 | extern int device_rename(struct device *dev, char *new_name); | 512 | extern int device_rename(struct device *dev, char *new_name); |
505 | extern int device_move(struct device *dev, struct device *new_parent); | 513 | extern int device_move(struct device *dev, struct device *new_parent); |
506 | 514 | ||
@@ -509,8 +517,8 @@ extern int device_move(struct device *dev, struct device *new_parent); | |||
509 | * for information on use. | 517 | * for information on use. |
510 | */ | 518 | */ |
511 | extern int __must_check device_bind_driver(struct device *dev); | 519 | extern int __must_check device_bind_driver(struct device *dev); |
512 | extern void device_release_driver(struct device * dev); | 520 | extern void device_release_driver(struct device *dev); |
513 | extern int __must_check device_attach(struct device * dev); | 521 | extern int __must_check device_attach(struct device *dev); |
514 | extern int __must_check driver_attach(struct device_driver *drv); | 522 | extern int __must_check driver_attach(struct device_driver *drv); |
515 | extern int __must_check device_reprobe(struct device *dev); | 523 | extern int __must_check device_reprobe(struct device *dev); |
516 | 524 | ||
@@ -519,8 +527,16 @@ extern int __must_check device_reprobe(struct device *dev); | |||
519 | */ | 527 | */ |
520 | extern struct device *device_create(struct class *cls, struct device *parent, | 528 | extern struct device *device_create(struct class *cls, struct device *parent, |
521 | dev_t devt, const char *fmt, ...) | 529 | dev_t devt, const char *fmt, ...) |
522 | __attribute__((format(printf,4,5))); | 530 | __attribute__((format(printf, 4, 5))); |
523 | extern void device_destroy(struct class *cls, dev_t devt); | 531 | extern void device_destroy(struct class *cls, dev_t devt); |
532 | #ifdef CONFIG_PM_SLEEP | ||
533 | extern void destroy_suspended_device(struct class *cls, dev_t devt); | ||
534 | #else /* !CONFIG_PM_SLEEP */ | ||
535 | static inline void destroy_suspended_device(struct class *cls, dev_t devt) | ||
536 | { | ||
537 | device_destroy(cls, devt); | ||
538 | } | ||
539 | #endif /* !CONFIG_PM_SLEEP */ | ||
524 | 540 | ||
525 | /* | 541 | /* |
526 | * Platform "fixup" functions - allow the platform to have their say | 542 | * Platform "fixup" functions - allow the platform to have their say |
@@ -528,17 +544,17 @@ extern void device_destroy(struct class *cls, dev_t devt); | |||
528 | * know about. | 544 | * know about. |
529 | */ | 545 | */ |
530 | /* Notify platform of device discovery */ | 546 | /* Notify platform of device discovery */ |
531 | extern int (*platform_notify)(struct device * dev); | 547 | extern int (*platform_notify)(struct device *dev); |
532 | 548 | ||
533 | extern int (*platform_notify_remove)(struct device * dev); | 549 | extern int (*platform_notify_remove)(struct device *dev); |
534 | 550 | ||
535 | 551 | ||
536 | /** | 552 | /** |
537 | * get_device - atomically increment the reference count for the device. | 553 | * get_device - atomically increment the reference count for the device. |
538 | * | 554 | * |
539 | */ | 555 | */ |
540 | extern struct device * get_device(struct device * dev); | 556 | extern struct device *get_device(struct device *dev); |
541 | extern void put_device(struct device * dev); | 557 | extern void put_device(struct device *dev); |
542 | 558 | ||
543 | 559 | ||
544 | /* drivers/base/power/shutdown.c */ | 560 | /* drivers/base/power/shutdown.c */ |
@@ -547,22 +563,33 @@ extern void device_shutdown(void); | |||
547 | /* drivers/base/sys.c */ | 563 | /* drivers/base/sys.c */ |
548 | extern void sysdev_shutdown(void); | 564 | extern void sysdev_shutdown(void); |
549 | 565 | ||
550 | |||
551 | /* drivers/base/firmware.c */ | ||
552 | extern int __must_check firmware_register(struct kset *); | ||
553 | extern void firmware_unregister(struct kset *); | ||
554 | |||
555 | /* debugging and troubleshooting/diagnostic helpers. */ | 566 | /* debugging and troubleshooting/diagnostic helpers. */ |
556 | extern const char *dev_driver_string(struct device *dev); | 567 | extern const char *dev_driver_string(struct device *dev); |
557 | #define dev_printk(level, dev, format, arg...) \ | 568 | #define dev_printk(level, dev, format, arg...) \ |
558 | printk(level "%s %s: " format , dev_driver_string(dev) , (dev)->bus_id , ## arg) | 569 | printk(level "%s %s: " format , dev_driver_string(dev) , \ |
570 | (dev)->bus_id , ## arg) | ||
571 | |||
572 | #define dev_emerg(dev, format, arg...) \ | ||
573 | dev_printk(KERN_EMERG , dev , format , ## arg) | ||
574 | #define dev_alert(dev, format, arg...) \ | ||
575 | dev_printk(KERN_ALERT , dev , format , ## arg) | ||
576 | #define dev_crit(dev, format, arg...) \ | ||
577 | dev_printk(KERN_CRIT , dev , format , ## arg) | ||
578 | #define dev_err(dev, format, arg...) \ | ||
579 | dev_printk(KERN_ERR , dev , format , ## arg) | ||
580 | #define dev_warn(dev, format, arg...) \ | ||
581 | dev_printk(KERN_WARNING , dev , format , ## arg) | ||
582 | #define dev_notice(dev, format, arg...) \ | ||
583 | dev_printk(KERN_NOTICE , dev , format , ## arg) | ||
584 | #define dev_info(dev, format, arg...) \ | ||
585 | dev_printk(KERN_INFO , dev , format , ## arg) | ||
559 | 586 | ||
560 | #ifdef DEBUG | 587 | #ifdef DEBUG |
561 | #define dev_dbg(dev, format, arg...) \ | 588 | #define dev_dbg(dev, format, arg...) \ |
562 | dev_printk(KERN_DEBUG , dev , format , ## arg) | 589 | dev_printk(KERN_DEBUG , dev , format , ## arg) |
563 | #else | 590 | #else |
564 | static inline int __attribute__ ((format (printf, 2, 3))) | 591 | static inline int __attribute__ ((format (printf, 2, 3))) |
565 | dev_dbg(struct device * dev, const char * fmt, ...) | 592 | dev_dbg(struct device *dev, const char *fmt, ...) |
566 | { | 593 | { |
567 | return 0; | 594 | return 0; |
568 | } | 595 | } |
@@ -572,21 +599,12 @@ dev_dbg(struct device * dev, const char * fmt, ...) | |||
572 | #define dev_vdbg dev_dbg | 599 | #define dev_vdbg dev_dbg |
573 | #else | 600 | #else |
574 | static inline int __attribute__ ((format (printf, 2, 3))) | 601 | static inline int __attribute__ ((format (printf, 2, 3))) |
575 | dev_vdbg(struct device * dev, const char * fmt, ...) | 602 | dev_vdbg(struct device *dev, const char *fmt, ...) |
576 | { | 603 | { |
577 | return 0; | 604 | return 0; |
578 | } | 605 | } |
579 | #endif | 606 | #endif |
580 | 607 | ||
581 | #define dev_err(dev, format, arg...) \ | ||
582 | dev_printk(KERN_ERR , dev , format , ## arg) | ||
583 | #define dev_info(dev, format, arg...) \ | ||
584 | dev_printk(KERN_INFO , dev , format , ## arg) | ||
585 | #define dev_warn(dev, format, arg...) \ | ||
586 | dev_printk(KERN_WARNING , dev , format , ## arg) | ||
587 | #define dev_notice(dev, format, arg...) \ | ||
588 | dev_printk(KERN_NOTICE , dev , format , ## arg) | ||
589 | |||
590 | /* Create alias, so I can be autoloaded. */ | 608 | /* Create alias, so I can be autoloaded. */ |
591 | #define MODULE_ALIAS_CHARDEV(major,minor) \ | 609 | #define MODULE_ALIAS_CHARDEV(major,minor) \ |
592 | MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) | 610 | MODULE_ALIAS("char-major-" __stringify(major) "-" __stringify(minor)) |
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index a3b6035b6c8..55c9a6952f4 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -132,7 +132,7 @@ struct dma_chan { | |||
132 | 132 | ||
133 | /* sysfs */ | 133 | /* sysfs */ |
134 | int chan_id; | 134 | int chan_id; |
135 | struct class_device class_dev; | 135 | struct device dev; |
136 | 136 | ||
137 | struct kref refcount; | 137 | struct kref refcount; |
138 | int slow_ref; | 138 | int slow_ref; |
@@ -142,6 +142,7 @@ struct dma_chan { | |||
142 | struct dma_chan_percpu *local; | 142 | struct dma_chan_percpu *local; |
143 | }; | 143 | }; |
144 | 144 | ||
145 | #define to_dma_chan(p) container_of(p, struct dma_chan, dev) | ||
145 | 146 | ||
146 | void dma_chan_cleanup(struct kref *kref); | 147 | void dma_chan_cleanup(struct kref *kref); |
147 | 148 | ||
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 00fc7a9c35e..5b42a659a30 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -78,6 +78,8 @@ extern const struct dmi_device * dmi_find_device(int type, const char *name, | |||
78 | extern void dmi_scan_machine(void); | 78 | extern void dmi_scan_machine(void); |
79 | extern int dmi_get_year(int field); | 79 | extern int dmi_get_year(int field); |
80 | extern int dmi_name_in_vendors(const char *str); | 80 | extern int dmi_name_in_vendors(const char *str); |
81 | extern int dmi_available; | ||
82 | extern char *dmi_get_slot(int slot); | ||
81 | 83 | ||
82 | #else | 84 | #else |
83 | 85 | ||
@@ -87,6 +89,8 @@ static inline const struct dmi_device * dmi_find_device(int type, const char *na | |||
87 | const struct dmi_device *from) { return NULL; } | 89 | const struct dmi_device *from) { return NULL; } |
88 | static inline int dmi_get_year(int year) { return 0; } | 90 | static inline int dmi_get_year(int year) { return 0; } |
89 | static inline int dmi_name_in_vendors(const char *s) { return 0; } | 91 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
92 | #define dmi_available 0 | ||
93 | static inline char *dmi_get_slot(int slot) { return NULL; } | ||
90 | 94 | ||
91 | #endif | 95 | #endif |
92 | 96 | ||
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index e8f42133a61..639624b55fb 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h | |||
@@ -119,7 +119,7 @@ extern void elv_put_request(struct request_queue *, struct request *); | |||
119 | /* | 119 | /* |
120 | * io scheduler registration | 120 | * io scheduler registration |
121 | */ | 121 | */ |
122 | extern int elv_register(struct elevator_type *); | 122 | extern void elv_register(struct elevator_type *); |
123 | extern void elv_unregister(struct elevator_type *); | 123 | extern void elv_unregister(struct elevator_type *); |
124 | 124 | ||
125 | /* | 125 | /* |
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 0f6c86c634f..84cec2aa9f1 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -563,11 +563,4 @@ enum { | |||
563 | ~EXT2_DIR_ROUND) | 563 | ~EXT2_DIR_ROUND) |
564 | #define EXT2_MAX_REC_LEN ((1<<16)-1) | 564 | #define EXT2_MAX_REC_LEN ((1<<16)-1) |
565 | 565 | ||
566 | static inline ext2_fsblk_t | ||
567 | ext2_group_first_block_no(struct super_block *sb, unsigned long group_no) | ||
568 | { | ||
569 | return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) + | ||
570 | le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block); | ||
571 | } | ||
572 | |||
573 | #endif /* _LINUX_EXT2_FS_H */ | 566 | #endif /* _LINUX_EXT2_FS_H */ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index b3ec4a496d6..21398a5d688 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1476,7 +1476,7 @@ extern void drop_collected_mounts(struct vfsmount *); | |||
1476 | extern int vfs_statfs(struct dentry *, struct kstatfs *); | 1476 | extern int vfs_statfs(struct dentry *, struct kstatfs *); |
1477 | 1477 | ||
1478 | /* /sys/fs */ | 1478 | /* /sys/fs */ |
1479 | extern struct kset fs_subsys; | 1479 | extern struct kobject *fs_kobj; |
1480 | 1480 | ||
1481 | #define FLOCK_VERIFY_READ 1 | 1481 | #define FLOCK_VERIFY_READ 1 |
1482 | #define FLOCK_VERIFY_WRITE 2 | 1482 | #define FLOCK_VERIFY_WRITE 2 |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index d0c437028c8..5c86f1196c3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -16,6 +16,7 @@ | |||
16 | * - add lk_flags in fuse_lk_in | 16 | * - add lk_flags in fuse_lk_in |
17 | * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in | 17 | * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in |
18 | * - add blksize field to fuse_attr | 18 | * - add blksize field to fuse_attr |
19 | * - add file flags field to fuse_read_in and fuse_write_in | ||
19 | */ | 20 | */ |
20 | 21 | ||
21 | #include <asm/types.h> | 22 | #include <asm/types.h> |
@@ -280,6 +281,8 @@ struct fuse_read_in { | |||
280 | __u32 size; | 281 | __u32 size; |
281 | __u32 read_flags; | 282 | __u32 read_flags; |
282 | __u64 lock_owner; | 283 | __u64 lock_owner; |
284 | __u32 flags; | ||
285 | __u32 padding; | ||
283 | }; | 286 | }; |
284 | 287 | ||
285 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 | 288 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 |
@@ -290,6 +293,8 @@ struct fuse_write_in { | |||
290 | __u32 size; | 293 | __u32 size; |
291 | __u32 write_flags; | 294 | __u32 write_flags; |
292 | __u64 lock_owner; | 295 | __u64 lock_owner; |
296 | __u32 flags; | ||
297 | __u32 padding; | ||
293 | }; | 298 | }; |
294 | 299 | ||
295 | struct fuse_write_out { | 300 | struct fuse_write_out { |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index a47b8025d39..1dbea0ac569 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -10,9 +10,19 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/kdev_t.h> | ||
13 | 14 | ||
14 | #ifdef CONFIG_BLOCK | 15 | #ifdef CONFIG_BLOCK |
15 | 16 | ||
17 | #define kobj_to_dev(k) container_of(k, struct device, kobj) | ||
18 | #define dev_to_disk(device) container_of(device, struct gendisk, dev) | ||
19 | #define dev_to_part(device) container_of(device, struct hd_struct, dev) | ||
20 | |||
21 | extern struct device_type disk_type; | ||
22 | extern struct device_type part_type; | ||
23 | extern struct kobject *block_depr; | ||
24 | extern struct class block_class; | ||
25 | |||
16 | enum { | 26 | enum { |
17 | /* These three have identical behaviour; use the second one if DOS FDISK gets | 27 | /* These three have identical behaviour; use the second one if DOS FDISK gets |
18 | confused about extended/logical partitions starting past cylinder 1023. */ | 28 | confused about extended/logical partitions starting past cylinder 1023. */ |
@@ -84,7 +94,7 @@ struct partition { | |||
84 | struct hd_struct { | 94 | struct hd_struct { |
85 | sector_t start_sect; | 95 | sector_t start_sect; |
86 | sector_t nr_sects; | 96 | sector_t nr_sects; |
87 | struct kobject kobj; | 97 | struct device dev; |
88 | struct kobject *holder_dir; | 98 | struct kobject *holder_dir; |
89 | unsigned ios[2], sectors[2]; /* READs and WRITEs */ | 99 | unsigned ios[2], sectors[2]; /* READs and WRITEs */ |
90 | int policy, partno; | 100 | int policy, partno; |
@@ -117,15 +127,14 @@ struct gendisk { | |||
117 | * disks that can't be partitioned. */ | 127 | * disks that can't be partitioned. */ |
118 | char disk_name[32]; /* name of major driver */ | 128 | char disk_name[32]; /* name of major driver */ |
119 | struct hd_struct **part; /* [indexed by minor] */ | 129 | struct hd_struct **part; /* [indexed by minor] */ |
120 | int part_uevent_suppress; | ||
121 | struct block_device_operations *fops; | 130 | struct block_device_operations *fops; |
122 | struct request_queue *queue; | 131 | struct request_queue *queue; |
123 | void *private_data; | 132 | void *private_data; |
124 | sector_t capacity; | 133 | sector_t capacity; |
125 | 134 | ||
126 | int flags; | 135 | int flags; |
127 | struct device *driverfs_dev; | 136 | struct device *driverfs_dev; // FIXME: remove |
128 | struct kobject kobj; | 137 | struct device dev; |
129 | struct kobject *holder_dir; | 138 | struct kobject *holder_dir; |
130 | struct kobject *slave_dir; | 139 | struct kobject *slave_dir; |
131 | 140 | ||
@@ -143,13 +152,6 @@ struct gendisk { | |||
143 | struct work_struct async_notify; | 152 | struct work_struct async_notify; |
144 | }; | 153 | }; |
145 | 154 | ||
146 | /* Structure for sysfs attributes on block devices */ | ||
147 | struct disk_attribute { | ||
148 | struct attribute attr; | ||
149 | ssize_t (*show)(struct gendisk *, char *); | ||
150 | ssize_t (*store)(struct gendisk *, const char *, size_t); | ||
151 | }; | ||
152 | |||
153 | /* | 155 | /* |
154 | * Macros to operate on percpu disk statistics: | 156 | * Macros to operate on percpu disk statistics: |
155 | * | 157 | * |
@@ -411,7 +413,8 @@ struct unixware_disklabel { | |||
411 | #define ADDPART_FLAG_RAID 1 | 413 | #define ADDPART_FLAG_RAID 1 |
412 | #define ADDPART_FLAG_WHOLEDISK 2 | 414 | #define ADDPART_FLAG_WHOLEDISK 2 |
413 | 415 | ||
414 | char *disk_name (struct gendisk *hd, int part, char *buf); | 416 | extern dev_t blk_lookup_devt(const char *name); |
417 | extern char *disk_name (struct gendisk *hd, int part, char *buf); | ||
415 | 418 | ||
416 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); | 419 | extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); |
417 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); | 420 | extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); |
@@ -423,12 +426,12 @@ extern struct gendisk *alloc_disk(int minors); | |||
423 | extern struct kobject *get_disk(struct gendisk *disk); | 426 | extern struct kobject *get_disk(struct gendisk *disk); |
424 | extern void put_disk(struct gendisk *disk); | 427 | extern void put_disk(struct gendisk *disk); |
425 | extern void genhd_media_change_notify(struct gendisk *disk); | 428 | extern void genhd_media_change_notify(struct gendisk *disk); |
426 | extern void blk_register_region(dev_t dev, unsigned long range, | 429 | extern void blk_register_region(dev_t devt, unsigned long range, |
427 | struct module *module, | 430 | struct module *module, |
428 | struct kobject *(*probe)(dev_t, int *, void *), | 431 | struct kobject *(*probe)(dev_t, int *, void *), |
429 | int (*lock)(dev_t, void *), | 432 | int (*lock)(dev_t, void *), |
430 | void *data); | 433 | void *data); |
431 | extern void blk_unregister_region(dev_t dev, unsigned long range); | 434 | extern void blk_unregister_region(dev_t devt, unsigned long range); |
432 | 435 | ||
433 | static inline struct block_device *bdget_disk(struct gendisk *disk, int index) | 436 | static inline struct block_device *bdget_disk(struct gendisk *disk, int index) |
434 | { | 437 | { |
@@ -441,6 +444,12 @@ static inline struct block_device *bdget_disk(struct gendisk *disk, int index) | |||
441 | 444 | ||
442 | static inline void printk_all_partitions(void) { } | 445 | static inline void printk_all_partitions(void) { } |
443 | 446 | ||
447 | static inline dev_t blk_lookup_devt(const char *name) | ||
448 | { | ||
449 | dev_t devt = MKDEV(0, 0); | ||
450 | return devt; | ||
451 | } | ||
452 | |||
444 | #endif /* CONFIG_BLOCK */ | 453 | #endif /* CONFIG_BLOCK */ |
445 | 454 | ||
446 | #endif | 455 | #endif |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 24968790bc3..30d606afcaf 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -33,7 +33,7 @@ void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); | |||
33 | 33 | ||
34 | extern unsigned long max_huge_pages; | 34 | extern unsigned long max_huge_pages; |
35 | extern unsigned long hugepages_treat_as_movable; | 35 | extern unsigned long hugepages_treat_as_movable; |
36 | extern int hugetlb_dynamic_pool; | 36 | extern unsigned long nr_overcommit_huge_pages; |
37 | extern const unsigned long hugetlb_zero, hugetlb_infinity; | 37 | extern const unsigned long hugetlb_zero, hugetlb_infinity; |
38 | extern int sysctl_hugetlb_shm_group; | 38 | extern int sysctl_hugetlb_shm_group; |
39 | 39 | ||
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 88c81403eb3..e18017d4575 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h | |||
@@ -23,6 +23,10 @@ | |||
23 | #ifndef LINUX_I2C_ID_H | 23 | #ifndef LINUX_I2C_ID_H |
24 | #define LINUX_I2C_ID_H | 24 | #define LINUX_I2C_ID_H |
25 | 25 | ||
26 | /* Please note that I2C driver IDs are optional. They are only needed if a | ||
27 | legacy chip driver needs to identify a bus or a bus driver needs to | ||
28 | identify a legacy client. If you don't need them, just don't set them. */ | ||
29 | |||
26 | /* | 30 | /* |
27 | * ---- Driver types ----------------------------------------------------- | 31 | * ---- Driver types ----------------------------------------------------- |
28 | */ | 32 | */ |
diff --git a/include/linux/ide.h b/include/linux/ide.h index dc75ccbcf99..9a6a41e7079 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -1255,6 +1255,7 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *); | |||
1255 | 1255 | ||
1256 | #ifdef CONFIG_BLK_DEV_IDEDMA | 1256 | #ifdef CONFIG_BLK_DEV_IDEDMA |
1257 | int __ide_dma_bad_drive(ide_drive_t *); | 1257 | int __ide_dma_bad_drive(ide_drive_t *); |
1258 | int ide_id_dma_bug(ide_drive_t *); | ||
1258 | 1259 | ||
1259 | u8 ide_find_dma_mode(ide_drive_t *, u8); | 1260 | u8 ide_find_dma_mode(ide_drive_t *, u8); |
1260 | 1261 | ||
@@ -1264,7 +1265,6 @@ static inline u8 ide_max_dma_mode(ide_drive_t *drive) | |||
1264 | } | 1265 | } |
1265 | 1266 | ||
1266 | void ide_dma_off(ide_drive_t *); | 1267 | void ide_dma_off(ide_drive_t *); |
1267 | void ide_dma_verbose(ide_drive_t *); | ||
1268 | int ide_set_dma(ide_drive_t *); | 1268 | int ide_set_dma(ide_drive_t *); |
1269 | ide_startstop_t ide_dma_intr(ide_drive_t *); | 1269 | ide_startstop_t ide_dma_intr(ide_drive_t *); |
1270 | 1270 | ||
@@ -1287,6 +1287,7 @@ extern void ide_dma_timeout(ide_drive_t *); | |||
1287 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ | 1287 | #endif /* CONFIG_BLK_DEV_IDEDMA_PCI */ |
1288 | 1288 | ||
1289 | #else | 1289 | #else |
1290 | static inline int ide_id_dma_bug(ide_drive_t *drive) { return 0; } | ||
1290 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } | 1291 | static inline u8 ide_find_dma_mode(ide_drive_t *drive, u8 speed) { return 0; } |
1291 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } | 1292 | static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; } |
1292 | static inline void ide_dma_off(ide_drive_t *drive) { ; } | 1293 | static inline void ide_dma_off(ide_drive_t *drive) { ; } |
@@ -1333,8 +1334,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data) | |||
1333 | hwif->hwif_data = data; | 1334 | hwif->hwif_data = data; |
1334 | } | 1335 | } |
1335 | 1336 | ||
1336 | /* ide-lib.c */ | 1337 | const char *ide_xfer_verbose(u8 mode); |
1337 | extern char *ide_xfer_verbose(u8 xfer_rate); | ||
1338 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); | 1338 | extern void ide_toggle_bounce(ide_drive_t *drive, int on); |
1339 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); | 1339 | extern int ide_set_xfer_rate(ide_drive_t *drive, u8 rate); |
1340 | 1340 | ||
diff --git a/include/linux/if_bonding.h b/include/linux/if_bonding.h index 84598fa2e9d..65c2d247068 100644 --- a/include/linux/if_bonding.h +++ b/include/linux/if_bonding.h | |||
@@ -85,7 +85,8 @@ | |||
85 | 85 | ||
86 | /* hashing types */ | 86 | /* hashing types */ |
87 | #define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */ | 87 | #define BOND_XMIT_POLICY_LAYER2 0 /* layer 2 (MAC only), default */ |
88 | #define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ MAC) */ | 88 | #define BOND_XMIT_POLICY_LAYER34 1 /* layer 3+4 (IP ^ (TCP || UDP)) */ |
89 | #define BOND_XMIT_POLICY_LAYER23 2 /* layer 2+3 (IP ^ MAC) */ | ||
89 | 90 | ||
90 | typedef struct ifbond { | 91 | typedef struct ifbond { |
91 | __s32 bond_mode; | 92 | __s32 bond_mode; |
diff --git a/include/linux/inet_lro.h b/include/linux/inet_lro.h index 1246d46abbc..80335b7d77c 100644 --- a/include/linux/inet_lro.h +++ b/include/linux/inet_lro.h | |||
@@ -91,6 +91,9 @@ struct net_lro_mgr { | |||
91 | int max_desc; /* Max number of LRO descriptors */ | 91 | int max_desc; /* Max number of LRO descriptors */ |
92 | int max_aggr; /* Max number of LRO packets to be aggregated */ | 92 | int max_aggr; /* Max number of LRO packets to be aggregated */ |
93 | 93 | ||
94 | int frag_align_pad; /* Padding required to properly align layer 3 | ||
95 | * headers in generated skb when using frags */ | ||
96 | |||
94 | struct net_lro_desc *lro_arr; /* Array of LRO descriptors */ | 97 | struct net_lro_desc *lro_arr; /* Array of LRO descriptors */ |
95 | 98 | ||
96 | /* | 99 | /* |
diff --git a/include/linux/input.h b/include/linux/input.h index b45f240a8c4..2075d6da2a3 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -530,6 +530,11 @@ struct input_absinfo { | |||
530 | #define KEY_DOLLAR 0x1b2 | 530 | #define KEY_DOLLAR 0x1b2 |
531 | #define KEY_EURO 0x1b3 | 531 | #define KEY_EURO 0x1b3 |
532 | 532 | ||
533 | #define KEY_FRAMEBACK 0x1b4 /* Consumer - transport controls */ | ||
534 | #define KEY_FRAMEFORWARD 0x1b5 | ||
535 | |||
536 | #define KEY_CONTEXT_MENU 0x1b6 /* GenDesc - system context menu */ | ||
537 | |||
533 | #define KEY_DEL_EOL 0x1c0 | 538 | #define KEY_DEL_EOL 0x1c0 |
534 | #define KEY_DEL_EOS 0x1c1 | 539 | #define KEY_DEL_EOS 0x1c1 |
535 | #define KEY_INS_LINE 0x1c2 | 540 | #define KEY_INS_LINE 0x1c2 |
diff --git a/include/linux/irq.h b/include/linux/irq.h index efc88538b2b..4669be08061 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -339,6 +339,13 @@ extern void | |||
339 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | 339 | __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, |
340 | const char *name); | 340 | const char *name); |
341 | 341 | ||
342 | /* caller has locked the irq_desc and both params are valid */ | ||
343 | static inline void __set_irq_handler_unlocked(int irq, | ||
344 | irq_flow_handler_t handler) | ||
345 | { | ||
346 | irq_desc[irq].handle_irq = handler; | ||
347 | } | ||
348 | |||
342 | /* | 349 | /* |
343 | * Set a highlevel flow handler for a given IRQ: | 350 | * Set a highlevel flow handler for a given IRQ: |
344 | */ | 351 | */ |
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 16e7ed855a1..d9ecd13393b 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h | |||
@@ -439,6 +439,8 @@ struct transaction_s | |||
439 | /* | 439 | /* |
440 | * Transaction's current state | 440 | * Transaction's current state |
441 | * [no locking - only kjournald alters this] | 441 | * [no locking - only kjournald alters this] |
442 | * [j_list_lock] guards transition of a transaction into T_FINISHED | ||
443 | * state and subsequent call of __journal_drop_transaction() | ||
442 | * FIXME: needs barriers | 444 | * FIXME: needs barriers |
443 | * KLUDGE: [use j_state_lock] | 445 | * KLUDGE: [use j_state_lock] |
444 | */ | 446 | */ |
diff --git a/include/linux/kd.h b/include/linux/kd.h index c91fc0c9c49..15f2853ea58 100644 --- a/include/linux/kd.h +++ b/include/linux/kd.h | |||
@@ -126,7 +126,7 @@ struct kbdiacrs { | |||
126 | #define KDSKBDIACR 0x4B4B /* write kernel accent table */ | 126 | #define KDSKBDIACR 0x4B4B /* write kernel accent table */ |
127 | 127 | ||
128 | struct kbdiacruc { | 128 | struct kbdiacruc { |
129 | __u32 diacr, base, result; | 129 | unsigned int diacr, base, result; |
130 | }; | 130 | }; |
131 | struct kbdiacrsuc { | 131 | struct kbdiacrsuc { |
132 | unsigned int kb_cnt; /* number of entries in following array */ | 132 | unsigned int kb_cnt; /* number of entries in following array */ |
diff --git a/include/linux/key.h b/include/linux/key.h index fcdbd5ed227..a70b8a8f200 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -290,7 +290,7 @@ extern void key_init(void); | |||
290 | #define key_get(k) ({ NULL; }) | 290 | #define key_get(k) ({ NULL; }) |
291 | #define key_put(k) do { } while(0) | 291 | #define key_put(k) do { } while(0) |
292 | #define key_ref_put(k) do { } while(0) | 292 | #define key_ref_put(k) do { } while(0) |
293 | #define make_key_ref(k) ({ NULL; }) | 293 | #define make_key_ref(k, p) ({ NULL; }) |
294 | #define key_ref_to_ptr(k) ({ NULL; }) | 294 | #define key_ref_to_ptr(k) ({ NULL; }) |
295 | #define is_key_possessed(k) 0 | 295 | #define is_key_possessed(k) 0 |
296 | #define alloc_uid_keyring(u,c) 0 | 296 | #define alloc_uid_keyring(u,c) 0 |
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 4a0d27f475d..caa3f411f15 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h | |||
@@ -3,15 +3,14 @@ | |||
3 | * | 3 | * |
4 | * Copyright (c) 2002-2003 Patrick Mochel | 4 | * Copyright (c) 2002-2003 Patrick Mochel |
5 | * Copyright (c) 2002-2003 Open Source Development Labs | 5 | * Copyright (c) 2002-2003 Open Source Development Labs |
6 | * Copyright (c) 2006-2007 Greg Kroah-Hartman <greg@kroah.com> | 6 | * Copyright (c) 2006-2008 Greg Kroah-Hartman <greg@kroah.com> |
7 | * Copyright (c) 2006-2007 Novell Inc. | 7 | * Copyright (c) 2006-2008 Novell Inc. |
8 | * | 8 | * |
9 | * This file is released under the GPLv2. | 9 | * This file is released under the GPLv2. |
10 | * | 10 | * |
11 | * | ||
12 | * Please read Documentation/kobject.txt before using the kobject | 11 | * Please read Documentation/kobject.txt before using the kobject |
13 | * interface, ESPECIALLY the parts about reference counts and object | 12 | * interface, ESPECIALLY the parts about reference counts and object |
14 | * destructors. | 13 | * destructors. |
15 | */ | 14 | */ |
16 | 15 | ||
17 | #ifndef _KOBJECT_H_ | 16 | #ifndef _KOBJECT_H_ |
@@ -61,48 +60,54 @@ enum kobject_action { | |||
61 | }; | 60 | }; |
62 | 61 | ||
63 | struct kobject { | 62 | struct kobject { |
64 | const char * k_name; | 63 | const char *name; |
65 | struct kref kref; | 64 | struct kref kref; |
66 | struct list_head entry; | 65 | struct list_head entry; |
67 | struct kobject * parent; | 66 | struct kobject *parent; |
68 | struct kset * kset; | 67 | struct kset *kset; |
69 | struct kobj_type * ktype; | 68 | struct kobj_type *ktype; |
70 | struct sysfs_dirent * sd; | 69 | struct sysfs_dirent *sd; |
70 | unsigned int state_initialized:1; | ||
71 | unsigned int state_in_sysfs:1; | ||
72 | unsigned int state_add_uevent_sent:1; | ||
73 | unsigned int state_remove_uevent_sent:1; | ||
71 | }; | 74 | }; |
72 | 75 | ||
73 | extern int kobject_set_name(struct kobject *, const char *, ...) | 76 | extern int kobject_set_name(struct kobject *kobj, const char *name, ...) |
74 | __attribute__((format(printf,2,3))); | 77 | __attribute__((format(printf, 2, 3))); |
75 | 78 | ||
76 | static inline const char * kobject_name(const struct kobject * kobj) | 79 | static inline const char *kobject_name(const struct kobject *kobj) |
77 | { | 80 | { |
78 | return kobj->k_name; | 81 | return kobj->name; |
79 | } | 82 | } |
80 | 83 | ||
81 | extern void kobject_init(struct kobject *); | 84 | extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); |
82 | extern void kobject_cleanup(struct kobject *); | 85 | extern int __must_check kobject_add(struct kobject *kobj, |
86 | struct kobject *parent, | ||
87 | const char *fmt, ...); | ||
88 | extern int __must_check kobject_init_and_add(struct kobject *kobj, | ||
89 | struct kobj_type *ktype, | ||
90 | struct kobject *parent, | ||
91 | const char *fmt, ...); | ||
92 | |||
93 | extern void kobject_del(struct kobject *kobj); | ||
83 | 94 | ||
84 | extern int __must_check kobject_add(struct kobject *); | 95 | extern struct kobject * __must_check kobject_create(void); |
85 | extern void kobject_del(struct kobject *); | 96 | extern struct kobject * __must_check kobject_create_and_add(const char *name, |
97 | struct kobject *parent); | ||
86 | 98 | ||
87 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); | 99 | extern int __must_check kobject_rename(struct kobject *, const char *new_name); |
88 | extern int __must_check kobject_move(struct kobject *, struct kobject *); | 100 | extern int __must_check kobject_move(struct kobject *, struct kobject *); |
89 | 101 | ||
90 | extern int __must_check kobject_register(struct kobject *); | 102 | extern struct kobject *kobject_get(struct kobject *kobj); |
91 | extern void kobject_unregister(struct kobject *); | 103 | extern void kobject_put(struct kobject *kobj); |
92 | |||
93 | extern struct kobject * kobject_get(struct kobject *); | ||
94 | extern void kobject_put(struct kobject *); | ||
95 | |||
96 | extern struct kobject *kobject_kset_add_dir(struct kset *kset, | ||
97 | struct kobject *, const char *); | ||
98 | extern struct kobject *kobject_add_dir(struct kobject *, const char *); | ||
99 | 104 | ||
100 | extern char * kobject_get_path(struct kobject *, gfp_t); | 105 | extern char *kobject_get_path(struct kobject *kobj, gfp_t flag); |
101 | 106 | ||
102 | struct kobj_type { | 107 | struct kobj_type { |
103 | void (*release)(struct kobject *); | 108 | void (*release)(struct kobject *kobj); |
104 | struct sysfs_ops * sysfs_ops; | 109 | struct sysfs_ops *sysfs_ops; |
105 | struct attribute ** default_attrs; | 110 | struct attribute **default_attrs; |
106 | }; | 111 | }; |
107 | 112 | ||
108 | struct kobj_uevent_env { | 113 | struct kobj_uevent_env { |
@@ -119,6 +124,16 @@ struct kset_uevent_ops { | |||
119 | struct kobj_uevent_env *env); | 124 | struct kobj_uevent_env *env); |
120 | }; | 125 | }; |
121 | 126 | ||
127 | struct kobj_attribute { | ||
128 | struct attribute attr; | ||
129 | ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, | ||
130 | char *buf); | ||
131 | ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, | ||
132 | const char *buf, size_t count); | ||
133 | }; | ||
134 | |||
135 | extern struct sysfs_ops kobj_sysfs_ops; | ||
136 | |||
122 | /** | 137 | /** |
123 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. | 138 | * struct kset - a set of kobjects of a specific type, belonging to a specific subsystem. |
124 | * | 139 | * |
@@ -128,7 +143,6 @@ struct kset_uevent_ops { | |||
128 | * define the attribute callbacks and other common events that happen to | 143 | * define the attribute callbacks and other common events that happen to |
129 | * a kobject. | 144 | * a kobject. |
130 | * | 145 | * |
131 | * @ktype: the struct kobj_type for this specific kset | ||
132 | * @list: the list of all kobjects for this kset | 146 | * @list: the list of all kobjects for this kset |
133 | * @list_lock: a lock for iterating over the kobjects | 147 | * @list_lock: a lock for iterating over the kobjects |
134 | * @kobj: the embedded kobject for this kset (recursion, isn't it fun...) | 148 | * @kobj: the embedded kobject for this kset (recursion, isn't it fun...) |
@@ -138,99 +152,49 @@ struct kset_uevent_ops { | |||
138 | * desired. | 152 | * desired. |
139 | */ | 153 | */ |
140 | struct kset { | 154 | struct kset { |
141 | struct kobj_type *ktype; | 155 | struct list_head list; |
142 | struct list_head list; | 156 | spinlock_t list_lock; |
143 | spinlock_t list_lock; | 157 | struct kobject kobj; |
144 | struct kobject kobj; | 158 | struct kset_uevent_ops *uevent_ops; |
145 | struct kset_uevent_ops *uevent_ops; | ||
146 | }; | 159 | }; |
147 | 160 | ||
161 | extern void kset_init(struct kset *kset); | ||
162 | extern int __must_check kset_register(struct kset *kset); | ||
163 | extern void kset_unregister(struct kset *kset); | ||
164 | extern struct kset * __must_check kset_create_and_add(const char *name, | ||
165 | struct kset_uevent_ops *u, | ||
166 | struct kobject *parent_kobj); | ||
148 | 167 | ||
149 | extern void kset_init(struct kset * k); | 168 | static inline struct kset *to_kset(struct kobject *kobj) |
150 | extern int __must_check kset_add(struct kset * k); | ||
151 | extern int __must_check kset_register(struct kset * k); | ||
152 | extern void kset_unregister(struct kset * k); | ||
153 | |||
154 | static inline struct kset * to_kset(struct kobject * kobj) | ||
155 | { | 169 | { |
156 | return kobj ? container_of(kobj,struct kset,kobj) : NULL; | 170 | return kobj ? container_of(kobj, struct kset, kobj) : NULL; |
157 | } | 171 | } |
158 | 172 | ||
159 | static inline struct kset * kset_get(struct kset * k) | 173 | static inline struct kset *kset_get(struct kset *k) |
160 | { | 174 | { |
161 | return k ? to_kset(kobject_get(&k->kobj)) : NULL; | 175 | return k ? to_kset(kobject_get(&k->kobj)) : NULL; |
162 | } | 176 | } |
163 | 177 | ||
164 | static inline void kset_put(struct kset * k) | 178 | static inline void kset_put(struct kset *k) |
165 | { | 179 | { |
166 | kobject_put(&k->kobj); | 180 | kobject_put(&k->kobj); |
167 | } | 181 | } |
168 | 182 | ||
169 | static inline struct kobj_type * get_ktype(struct kobject * k) | 183 | static inline struct kobj_type *get_ktype(struct kobject *kobj) |
170 | { | 184 | { |
171 | if (k->kset && k->kset->ktype) | 185 | return kobj->ktype; |
172 | return k->kset->ktype; | ||
173 | else | ||
174 | return k->ktype; | ||
175 | } | 186 | } |
176 | 187 | ||
177 | extern struct kobject * kset_find_obj(struct kset *, const char *); | 188 | extern struct kobject *kset_find_obj(struct kset *, const char *); |
178 | |||
179 | |||
180 | /* | ||
181 | * Use this when initializing an embedded kset with no other | ||
182 | * fields to initialize. | ||
183 | */ | ||
184 | #define set_kset_name(str) .kset = { .kobj = { .k_name = str } } | ||
185 | |||
186 | |||
187 | #define decl_subsys(_name,_type,_uevent_ops) \ | ||
188 | struct kset _name##_subsys = { \ | ||
189 | .kobj = { .k_name = __stringify(_name) }, \ | ||
190 | .ktype = _type, \ | ||
191 | .uevent_ops =_uevent_ops, \ | ||
192 | } | ||
193 | #define decl_subsys_name(_varname,_name,_type,_uevent_ops) \ | ||
194 | struct kset _varname##_subsys = { \ | ||
195 | .kobj = { .k_name = __stringify(_name) }, \ | ||
196 | .ktype = _type, \ | ||
197 | .uevent_ops =_uevent_ops, \ | ||
198 | } | ||
199 | |||
200 | /* The global /sys/kernel/ subsystem for people to chain off of */ | ||
201 | extern struct kset kernel_subsys; | ||
202 | /* The global /sys/hypervisor/ subsystem */ | ||
203 | extern struct kset hypervisor_subsys; | ||
204 | |||
205 | /* | ||
206 | * Helpers for setting the kset of registered objects. | ||
207 | * Often, a registered object belongs to a kset embedded in a | ||
208 | * subsystem. These do no magic, just make the resulting code | ||
209 | * easier to follow. | ||
210 | */ | ||
211 | |||
212 | /** | ||
213 | * kobj_set_kset_s(obj,subsys) - set kset for embedded kobject. | ||
214 | * @obj: ptr to some object type. | ||
215 | * @subsys: a subsystem object (not a ptr). | ||
216 | * | ||
217 | * Can be used for any object type with an embedded ->kobj. | ||
218 | */ | ||
219 | |||
220 | #define kobj_set_kset_s(obj,subsys) \ | ||
221 | (obj)->kobj.kset = &(subsys) | ||
222 | |||
223 | extern int __must_check subsystem_register(struct kset *); | ||
224 | extern void subsystem_unregister(struct kset *); | ||
225 | |||
226 | struct subsys_attribute { | ||
227 | struct attribute attr; | ||
228 | ssize_t (*show)(struct kset *, char *); | ||
229 | ssize_t (*store)(struct kset *, const char *, size_t); | ||
230 | }; | ||
231 | 189 | ||
232 | extern int __must_check subsys_create_file(struct kset *, | 190 | /* The global /sys/kernel/ kobject for people to chain off of */ |
233 | struct subsys_attribute *); | 191 | extern struct kobject *kernel_kobj; |
192 | /* The global /sys/hypervisor/ kobject for people to chain off of */ | ||
193 | extern struct kobject *hypervisor_kobj; | ||
194 | /* The global /sys/power/ kobject for people to chain off of */ | ||
195 | extern struct kobject *power_kobj; | ||
196 | /* The global /sys/firmware/ kobject for people to chain off of */ | ||
197 | extern struct kobject *firmware_kobj; | ||
234 | 198 | ||
235 | #if defined(CONFIG_HOTPLUG) | 199 | #if defined(CONFIG_HOTPLUG) |
236 | int kobject_uevent(struct kobject *kobj, enum kobject_action action); | 200 | int kobject_uevent(struct kobject *kobj, enum kobject_action action); |
@@ -243,18 +207,20 @@ int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | |||
243 | int kobject_action_type(const char *buf, size_t count, | 207 | int kobject_action_type(const char *buf, size_t count, |
244 | enum kobject_action *type); | 208 | enum kobject_action *type); |
245 | #else | 209 | #else |
246 | static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action) | 210 | static inline int kobject_uevent(struct kobject *kobj, |
211 | enum kobject_action action) | ||
247 | { return 0; } | 212 | { return 0; } |
248 | static inline int kobject_uevent_env(struct kobject *kobj, | 213 | static inline int kobject_uevent_env(struct kobject *kobj, |
249 | enum kobject_action action, | 214 | enum kobject_action action, |
250 | char *envp[]) | 215 | char *envp[]) |
251 | { return 0; } | 216 | { return 0; } |
252 | 217 | ||
253 | static inline int add_uevent_var(struct kobj_uevent_env *env, const char *format, ...) | 218 | static inline int add_uevent_var(struct kobj_uevent_env *env, |
219 | const char *format, ...) | ||
254 | { return 0; } | 220 | { return 0; } |
255 | 221 | ||
256 | static inline int kobject_action_type(const char *buf, size_t count, | 222 | static inline int kobject_action_type(const char *buf, size_t count, |
257 | enum kobject_action *type) | 223 | enum kobject_action *type) |
258 | { return -EINVAL; } | 224 | { return -EINVAL; } |
259 | #endif | 225 | #endif |
260 | 226 | ||
diff --git a/include/linux/kref.h b/include/linux/kref.h index 6fee3539893..5d185635786 100644 --- a/include/linux/kref.h +++ b/include/linux/kref.h | |||
@@ -24,6 +24,7 @@ struct kref { | |||
24 | atomic_t refcount; | 24 | atomic_t refcount; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | void kref_set(struct kref *kref, int num); | ||
27 | void kref_init(struct kref *kref); | 28 | void kref_init(struct kref *kref); |
28 | void kref_get(struct kref *kref); | 29 | void kref_get(struct kref *kref); |
29 | int kref_put(struct kref *kref, void (*release) (struct kref *kref)); | 30 | int kref_put(struct kref *kref, void (*release) (struct kref *kref)); |
diff --git a/include/linux/leds.h b/include/linux/leds.h index dc1178f6184..b4130ff58d0 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
@@ -14,6 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/spinlock.h> | 16 | #include <linux/spinlock.h> |
17 | #include <linux/rwsem.h> | ||
17 | 18 | ||
18 | struct device; | 19 | struct device; |
19 | /* | 20 | /* |
@@ -43,7 +44,7 @@ struct led_classdev { | |||
43 | 44 | ||
44 | #ifdef CONFIG_LEDS_TRIGGERS | 45 | #ifdef CONFIG_LEDS_TRIGGERS |
45 | /* Protects the trigger data below */ | 46 | /* Protects the trigger data below */ |
46 | rwlock_t trigger_lock; | 47 | struct rw_semaphore trigger_lock; |
47 | 48 | ||
48 | struct led_trigger *trigger; | 49 | struct led_trigger *trigger; |
49 | struct list_head trig_list; | 50 | struct list_head trig_list; |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 56a5673aeba..124033cb5e9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -119,6 +119,8 @@ enum { | |||
119 | ATA_DEF_BUSY_WAIT = 10000, | 119 | ATA_DEF_BUSY_WAIT = 10000, |
120 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, | 120 | ATA_SHORT_PAUSE = (HZ >> 6) + 1, |
121 | 121 | ||
122 | ATAPI_MAX_DRAIN = 16 << 10, | ||
123 | |||
122 | ATA_SHT_EMULATED = 1, | 124 | ATA_SHT_EMULATED = 1, |
123 | ATA_SHT_CMD_PER_LUN = 1, | 125 | ATA_SHT_CMD_PER_LUN = 1, |
124 | ATA_SHT_THIS_ID = -1, | 126 | ATA_SHT_THIS_ID = -1, |
@@ -211,7 +213,7 @@ enum { | |||
211 | 213 | ||
212 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ | 214 | ATA_PFLAG_SUSPENDED = (1 << 17), /* port is suspended (power) */ |
213 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ | 215 | ATA_PFLAG_PM_PENDING = (1 << 18), /* PM operation pending */ |
214 | ATA_PFLAG_GTM_VALID = (1 << 19), /* acpi_gtm data valid */ | 216 | ATA_PFLAG_INIT_GTM_VALID = (1 << 19), /* initial gtm data valid */ |
215 | 217 | ||
216 | /* struct ata_queued_cmd flags */ | 218 | /* struct ata_queued_cmd flags */ |
217 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ | 219 | ATA_QCFLAG_ACTIVE = (1 << 0), /* cmd not yet ack'd to scsi lyer */ |
@@ -340,6 +342,7 @@ enum { | |||
340 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ | 342 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ |
341 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ | 343 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ |
342 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ | 344 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ |
345 | ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ | ||
343 | 346 | ||
344 | /* DMA mask for user DMA control: User visible values; DO NOT | 347 | /* DMA mask for user DMA control: User visible values; DO NOT |
345 | renumber */ | 348 | renumber */ |
@@ -497,6 +500,7 @@ struct ata_device { | |||
497 | struct scsi_device *sdev; /* attached SCSI device */ | 500 | struct scsi_device *sdev; /* attached SCSI device */ |
498 | #ifdef CONFIG_ATA_ACPI | 501 | #ifdef CONFIG_ATA_ACPI |
499 | acpi_handle acpi_handle; | 502 | acpi_handle acpi_handle; |
503 | union acpi_object *gtf_cache; | ||
500 | #endif | 504 | #endif |
501 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 505 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ |
502 | u64 n_sectors; /* size of device, if ATA */ | 506 | u64 n_sectors; /* size of device, if ATA */ |
@@ -652,7 +656,7 @@ struct ata_port { | |||
652 | 656 | ||
653 | #ifdef CONFIG_ATA_ACPI | 657 | #ifdef CONFIG_ATA_ACPI |
654 | acpi_handle acpi_handle; | 658 | acpi_handle acpi_handle; |
655 | struct ata_acpi_gtm acpi_gtm; | 659 | struct ata_acpi_gtm __acpi_init_gtm; /* use ata_acpi_init_gtm() */ |
656 | #endif | 660 | #endif |
657 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ | 661 | u8 sector_buf[ATA_SECT_SIZE]; /* owned by EH */ |
658 | }; | 662 | }; |
@@ -771,8 +775,6 @@ static inline int ata_port_is_dummy(struct ata_port *ap) | |||
771 | 775 | ||
772 | extern void sata_print_link_status(struct ata_link *link); | 776 | extern void sata_print_link_status(struct ata_link *link); |
773 | extern void ata_port_probe(struct ata_port *); | 777 | extern void ata_port_probe(struct ata_port *); |
774 | extern void __sata_phy_reset(struct ata_port *ap); | ||
775 | extern void sata_phy_reset(struct ata_port *ap); | ||
776 | extern void ata_bus_reset(struct ata_port *ap); | 778 | extern void ata_bus_reset(struct ata_port *ap); |
777 | extern int sata_set_spd(struct ata_link *link); | 779 | extern int sata_set_spd(struct ata_link *link); |
778 | extern int sata_link_debounce(struct ata_link *link, | 780 | extern int sata_link_debounce(struct ata_link *link, |
@@ -940,10 +942,20 @@ enum { | |||
940 | 942 | ||
941 | /* libata-acpi.c */ | 943 | /* libata-acpi.c */ |
942 | #ifdef CONFIG_ATA_ACPI | 944 | #ifdef CONFIG_ATA_ACPI |
945 | static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) | ||
946 | { | ||
947 | if (ap->pflags & ATA_PFLAG_INIT_GTM_VALID) | ||
948 | return &ap->__acpi_init_gtm; | ||
949 | return NULL; | ||
950 | } | ||
943 | extern int ata_acpi_cbl_80wire(struct ata_port *ap); | 951 | extern int ata_acpi_cbl_80wire(struct ata_port *ap); |
944 | int ata_acpi_stm(const struct ata_port *ap, struct ata_acpi_gtm *stm); | 952 | int ata_acpi_stm(struct ata_port *ap, const struct ata_acpi_gtm *stm); |
945 | int ata_acpi_gtm(const struct ata_port *ap, struct ata_acpi_gtm *stm); | 953 | int ata_acpi_gtm(struct ata_port *ap, struct ata_acpi_gtm *stm); |
946 | #else | 954 | #else |
955 | static inline const struct ata_acpi_gtm *ata_acpi_init_gtm(struct ata_port *ap) | ||
956 | { | ||
957 | return NULL; | ||
958 | } | ||
947 | static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } | 959 | static inline int ata_acpi_cbl_80wire(struct ata_port *ap) { return 0; } |
948 | #endif | 960 | #endif |
949 | 961 | ||
@@ -994,8 +1006,6 @@ extern void sata_pmp_do_eh(struct ata_port *ap, | |||
994 | /* | 1006 | /* |
995 | * EH | 1007 | * EH |
996 | */ | 1008 | */ |
997 | extern void ata_eng_timeout(struct ata_port *ap); | ||
998 | |||
999 | extern void ata_port_schedule_eh(struct ata_port *ap); | 1009 | extern void ata_port_schedule_eh(struct ata_port *ap); |
1000 | extern int ata_link_abort(struct ata_link *link); | 1010 | extern int ata_link_abort(struct ata_link *link); |
1001 | extern int ata_port_abort(struct ata_port *ap); | 1011 | extern int ata_port_abort(struct ata_port *ap); |
@@ -1016,18 +1026,18 @@ extern void ata_do_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
1016 | * printk helpers | 1026 | * printk helpers |
1017 | */ | 1027 | */ |
1018 | #define ata_port_printk(ap, lv, fmt, args...) \ | 1028 | #define ata_port_printk(ap, lv, fmt, args...) \ |
1019 | printk(lv"ata%u: "fmt, (ap)->print_id , ##args) | 1029 | printk("%sata%u: "fmt, lv, (ap)->print_id , ##args) |
1020 | 1030 | ||
1021 | #define ata_link_printk(link, lv, fmt, args...) do { \ | 1031 | #define ata_link_printk(link, lv, fmt, args...) do { \ |
1022 | if ((link)->ap->nr_pmp_links) \ | 1032 | if ((link)->ap->nr_pmp_links) \ |
1023 | printk(lv"ata%u.%02u: "fmt, (link)->ap->print_id, \ | 1033 | printk("%sata%u.%02u: "fmt, lv, (link)->ap->print_id, \ |
1024 | (link)->pmp , ##args); \ | 1034 | (link)->pmp , ##args); \ |
1025 | else \ | 1035 | else \ |
1026 | printk(lv"ata%u: "fmt, (link)->ap->print_id , ##args); \ | 1036 | printk("%sata%u: "fmt, lv, (link)->ap->print_id , ##args); \ |
1027 | } while(0) | 1037 | } while(0) |
1028 | 1038 | ||
1029 | #define ata_dev_printk(dev, lv, fmt, args...) \ | 1039 | #define ata_dev_printk(dev, lv, fmt, args...) \ |
1030 | printk(lv"ata%u.%02u: "fmt, (dev)->link->ap->print_id, \ | 1040 | printk("%sata%u.%02u: "fmt, lv, (dev)->link->ap->print_id, \ |
1031 | (dev)->link->pmp + (dev)->devno , ##args) | 1041 | (dev)->link->pmp + (dev)->devno , ##args) |
1032 | 1042 | ||
1033 | /* | 1043 | /* |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 520238cbae5..1b7b95c67ac 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/prio_tree.h> | 12 | #include <linux/prio_tree.h> |
13 | #include <linux/debug_locks.h> | 13 | #include <linux/debug_locks.h> |
14 | #include <linux/mm_types.h> | 14 | #include <linux/mm_types.h> |
15 | #include <linux/security.h> | ||
15 | 16 | ||
16 | struct mempolicy; | 17 | struct mempolicy; |
17 | struct anon_vma; | 18 | struct anon_vma; |
@@ -513,6 +514,21 @@ static inline void set_page_links(struct page *page, enum zone_type zone, | |||
513 | } | 514 | } |
514 | 515 | ||
515 | /* | 516 | /* |
517 | * If a hint addr is less than mmap_min_addr change hint to be as | ||
518 | * low as possible but still greater than mmap_min_addr | ||
519 | */ | ||
520 | static inline unsigned long round_hint_to_min(unsigned long hint) | ||
521 | { | ||
522 | #ifdef CONFIG_SECURITY | ||
523 | hint &= PAGE_MASK; | ||
524 | if (((void *)hint != NULL) && | ||
525 | (hint < mmap_min_addr)) | ||
526 | return PAGE_ALIGN(mmap_min_addr); | ||
527 | #endif | ||
528 | return hint; | ||
529 | } | ||
530 | |||
531 | /* | ||
516 | * Some inline functions in vmstat.h depend on page_zone() | 532 | * Some inline functions in vmstat.h depend on page_zone() |
517 | */ | 533 | */ |
518 | #include <linux/vmstat.h> | 534 | #include <linux/vmstat.h> |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 125eee1407f..7ab962fa1d7 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -118,10 +118,6 @@ struct mmc_host { | |||
118 | unsigned int removed:1; /* host is being removed */ | 118 | unsigned int removed:1; /* host is being removed */ |
119 | #endif | 119 | #endif |
120 | 120 | ||
121 | unsigned int mode; /* current card mode of host */ | ||
122 | #define MMC_MODE_MMC 0 | ||
123 | #define MMC_MODE_SD 1 | ||
124 | |||
125 | struct mmc_card *card; /* device attached to this host */ | 121 | struct mmc_card *card; /* device attached to this host */ |
126 | 122 | ||
127 | wait_queue_head_t wq; | 123 | wait_queue_head_t wq; |
diff --git a/include/linux/module.h b/include/linux/module.h index 2cbc0b87e32..c97bdb7eb95 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -574,7 +574,9 @@ struct device_driver; | |||
574 | #ifdef CONFIG_SYSFS | 574 | #ifdef CONFIG_SYSFS |
575 | struct module; | 575 | struct module; |
576 | 576 | ||
577 | extern struct kset module_subsys; | 577 | extern struct kset *module_kset; |
578 | extern struct kobj_type module_ktype; | ||
579 | extern int module_sysfs_initialized; | ||
578 | 580 | ||
579 | int mod_sysfs_init(struct module *mod); | 581 | int mod_sysfs_init(struct module *mod); |
580 | int mod_sysfs_setup(struct module *mod, | 582 | int mod_sysfs_setup(struct module *mod, |
@@ -607,21 +609,6 @@ static inline void module_remove_modinfo_attrs(struct module *mod) | |||
607 | 609 | ||
608 | #endif /* CONFIG_SYSFS */ | 610 | #endif /* CONFIG_SYSFS */ |
609 | 611 | ||
610 | #if defined(CONFIG_SYSFS) && defined(CONFIG_MODULES) | ||
611 | |||
612 | void module_add_driver(struct module *mod, struct device_driver *drv); | ||
613 | void module_remove_driver(struct device_driver *drv); | ||
614 | |||
615 | #else /* not both CONFIG_SYSFS && CONFIG_MODULES */ | ||
616 | |||
617 | static inline void module_add_driver(struct module *mod, struct device_driver *drv) | ||
618 | { } | ||
619 | |||
620 | static inline void module_remove_driver(struct device_driver *drv) | ||
621 | { } | ||
622 | |||
623 | #endif | ||
624 | |||
625 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) | 612 | #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x) |
626 | 613 | ||
627 | /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ | 614 | /* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */ |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 1e6af4f174b..b0813c3286b 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -319,21 +319,29 @@ struct napi_struct { | |||
319 | enum | 319 | enum |
320 | { | 320 | { |
321 | NAPI_STATE_SCHED, /* Poll is scheduled */ | 321 | NAPI_STATE_SCHED, /* Poll is scheduled */ |
322 | NAPI_STATE_DISABLE, /* Disable pending */ | ||
322 | }; | 323 | }; |
323 | 324 | ||
324 | extern void FASTCALL(__napi_schedule(struct napi_struct *n)); | 325 | extern void FASTCALL(__napi_schedule(struct napi_struct *n)); |
325 | 326 | ||
327 | static inline int napi_disable_pending(struct napi_struct *n) | ||
328 | { | ||
329 | return test_bit(NAPI_STATE_DISABLE, &n->state); | ||
330 | } | ||
331 | |||
326 | /** | 332 | /** |
327 | * napi_schedule_prep - check if napi can be scheduled | 333 | * napi_schedule_prep - check if napi can be scheduled |
328 | * @n: napi context | 334 | * @n: napi context |
329 | * | 335 | * |
330 | * Test if NAPI routine is already running, and if not mark | 336 | * Test if NAPI routine is already running, and if not mark |
331 | * it as running. This is used as a condition variable | 337 | * it as running. This is used as a condition variable |
332 | * insure only one NAPI poll instance runs | 338 | * insure only one NAPI poll instance runs. We also make |
339 | * sure there is no pending NAPI disable. | ||
333 | */ | 340 | */ |
334 | static inline int napi_schedule_prep(struct napi_struct *n) | 341 | static inline int napi_schedule_prep(struct napi_struct *n) |
335 | { | 342 | { |
336 | return !test_and_set_bit(NAPI_STATE_SCHED, &n->state); | 343 | return !napi_disable_pending(n) && |
344 | !test_and_set_bit(NAPI_STATE_SCHED, &n->state); | ||
337 | } | 345 | } |
338 | 346 | ||
339 | /** | 347 | /** |
@@ -389,8 +397,10 @@ static inline void napi_complete(struct napi_struct *n) | |||
389 | */ | 397 | */ |
390 | static inline void napi_disable(struct napi_struct *n) | 398 | static inline void napi_disable(struct napi_struct *n) |
391 | { | 399 | { |
400 | set_bit(NAPI_STATE_DISABLE, &n->state); | ||
392 | while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) | 401 | while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) |
393 | msleep(1); | 402 | msleep(1); |
403 | clear_bit(NAPI_STATE_DISABLE, &n->state); | ||
394 | } | 404 | } |
395 | 405 | ||
396 | /** | 406 | /** |
@@ -1268,7 +1278,7 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) | |||
1268 | static inline int netif_rx_schedule_prep(struct net_device *dev, | 1278 | static inline int netif_rx_schedule_prep(struct net_device *dev, |
1269 | struct napi_struct *napi) | 1279 | struct napi_struct *napi) |
1270 | { | 1280 | { |
1271 | return netif_running(dev) && napi_schedule_prep(napi); | 1281 | return napi_schedule_prep(napi); |
1272 | } | 1282 | } |
1273 | 1283 | ||
1274 | /* Add interface to tail of rx poll list. This assumes that _prep has | 1284 | /* Add interface to tail of rx poll list. This assumes that _prep has |
@@ -1277,7 +1287,6 @@ static inline int netif_rx_schedule_prep(struct net_device *dev, | |||
1277 | static inline void __netif_rx_schedule(struct net_device *dev, | 1287 | static inline void __netif_rx_schedule(struct net_device *dev, |
1278 | struct napi_struct *napi) | 1288 | struct napi_struct *napi) |
1279 | { | 1289 | { |
1280 | dev_hold(dev); | ||
1281 | __napi_schedule(napi); | 1290 | __napi_schedule(napi); |
1282 | } | 1291 | } |
1283 | 1292 | ||
@@ -1308,7 +1317,6 @@ static inline void __netif_rx_complete(struct net_device *dev, | |||
1308 | struct napi_struct *napi) | 1317 | struct napi_struct *napi) |
1309 | { | 1318 | { |
1310 | __napi_complete(napi); | 1319 | __napi_complete(napi); |
1311 | dev_put(dev); | ||
1312 | } | 1320 | } |
1313 | 1321 | ||
1314 | /* Remove interface from poll list: it must be in the poll list | 1322 | /* Remove interface from poll list: it must be in the poll list |
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h index 533ee351a27..499aa937590 100644 --- a/include/linux/netfilter_bridge.h +++ b/include/linux/netfilter_bridge.h | |||
@@ -50,7 +50,8 @@ enum nf_br_hook_priorities { | |||
50 | extern int nf_bridge_copy_header(struct sk_buff *skb); | 50 | extern int nf_bridge_copy_header(struct sk_buff *skb); |
51 | static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) | 51 | static inline int nf_bridge_maybe_copy_header(struct sk_buff *skb) |
52 | { | 52 | { |
53 | if (skb->nf_bridge) | 53 | if (skb->nf_bridge && |
54 | skb->nf_bridge->mask & (BRNF_BRIDGED | BRNF_BRIDGED_DNAT)) | ||
54 | return nf_bridge_copy_header(skb); | 55 | return nf_bridge_copy_header(skb); |
55 | return 0; | 56 | return 0; |
56 | } | 57 | } |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index e82a6ebc725..2d15d4aac09 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -422,7 +422,6 @@ extern long nfs_sync_mapping_wait(struct address_space *, struct writeback_contr | |||
422 | extern int nfs_wb_all(struct inode *inode); | 422 | extern int nfs_wb_all(struct inode *inode); |
423 | extern int nfs_wb_nocommit(struct inode *inode); | 423 | extern int nfs_wb_nocommit(struct inode *inode); |
424 | extern int nfs_wb_page(struct inode *inode, struct page* page); | 424 | extern int nfs_wb_page(struct inode *inode, struct page* page); |
425 | extern int nfs_wb_page_priority(struct inode *inode, struct page* page, int how); | ||
426 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); | 425 | extern int nfs_wb_page_cancel(struct inode *inode, struct page* page); |
427 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) | 426 | #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) |
428 | extern int nfs_commit_inode(struct inode *, int); | 427 | extern int nfs_commit_inode(struct inode *, int); |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index ab4cb6ecd47..8f67e8f2a3c 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -174,7 +174,7 @@ extern int pci_hp_register (struct hotplug_slot *slot); | |||
174 | extern int pci_hp_deregister (struct hotplug_slot *slot); | 174 | extern int pci_hp_deregister (struct hotplug_slot *slot); |
175 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, | 175 | extern int __must_check pci_hp_change_slot_info (struct hotplug_slot *slot, |
176 | struct hotplug_slot_info *info); | 176 | struct hotplug_slot_info *info); |
177 | extern struct kset pci_hotplug_slots_subsys; | 177 | extern struct kset *pci_hotplug_slots_kset; |
178 | 178 | ||
179 | /* PCI Setting Record (Type 0) */ | 179 | /* PCI Setting Record (Type 0) */ |
180 | struct hpp_type0 { | 180 | struct hpp_type0 { |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 1ee009e8fec..7f2215139e9 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1237,6 +1237,10 @@ | |||
1237 | #define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 | 1237 | #define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761 |
1238 | #define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 | 1238 | #define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762 |
1239 | #define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 | 1239 | #define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763 |
1240 | #define PCI_DEVICE_ID_NVIDIA_NVENET_36 0x0AB0 | ||
1241 | #define PCI_DEVICE_ID_NVIDIA_NVENET_37 0x0AB1 | ||
1242 | #define PCI_DEVICE_ID_NVIDIA_NVENET_38 0x0AB2 | ||
1243 | #define PCI_DEVICE_ID_NVIDIA_NVENET_39 0x0AB3 | ||
1240 | 1244 | ||
1241 | #define PCI_VENDOR_ID_IMS 0x10e0 | 1245 | #define PCI_VENDOR_ID_IMS 0x10e0 |
1242 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 | 1246 | #define PCI_DEVICE_ID_IMS_TT128 0x9128 |
@@ -2144,6 +2148,7 @@ | |||
2144 | #define PCI_DEVICE_ID_JMICRON_JMB365 0x2365 | 2148 | #define PCI_DEVICE_ID_JMICRON_JMB365 0x2365 |
2145 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 | 2149 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 |
2146 | #define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 | 2150 | #define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 |
2151 | #define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 | ||
2147 | 2152 | ||
2148 | #define PCI_VENDOR_ID_KORENIX 0x1982 | 2153 | #define PCI_VENDOR_ID_KORENIX 0x1982 |
2149 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2154 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
@@ -2317,6 +2322,8 @@ | |||
2317 | #define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914 | 2322 | #define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914 |
2318 | #define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919 | 2323 | #define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919 |
2319 | #define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 | 2324 | #define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 |
2325 | #define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916 | ||
2326 | #define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918 | ||
2320 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2327 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2321 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2328 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2322 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2329 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
diff --git a/include/linux/phy.h b/include/linux/phy.h index f0742b6aaa6..554836edd91 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h | |||
@@ -58,6 +58,8 @@ typedef enum { | |||
58 | PHY_INTERFACE_MODE_RMII, | 58 | PHY_INTERFACE_MODE_RMII, |
59 | PHY_INTERFACE_MODE_RGMII, | 59 | PHY_INTERFACE_MODE_RGMII, |
60 | PHY_INTERFACE_MODE_RGMII_ID, | 60 | PHY_INTERFACE_MODE_RGMII_ID, |
61 | PHY_INTERFACE_MODE_RGMII_RXID, | ||
62 | PHY_INTERFACE_MODE_RGMII_TXID, | ||
61 | PHY_INTERFACE_MODE_RTBI | 63 | PHY_INTERFACE_MODE_RTBI |
62 | } phy_interface_t; | 64 | } phy_interface_t; |
63 | 65 | ||
@@ -401,6 +403,7 @@ int phy_mii_ioctl(struct phy_device *phydev, | |||
401 | int phy_start_interrupts(struct phy_device *phydev); | 403 | int phy_start_interrupts(struct phy_device *phydev); |
402 | void phy_print_status(struct phy_device *phydev); | 404 | void phy_print_status(struct phy_device *phydev); |
403 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id); | 405 | struct phy_device* phy_device_create(struct mii_bus *bus, int addr, int phy_id); |
406 | void phy_device_free(struct phy_device *phydev); | ||
404 | 407 | ||
405 | extern struct bus_type mdio_bus_type; | 408 | extern struct bus_type mdio_bus_type; |
406 | #endif /* __PHY_H */ | 409 | #endif /* __PHY_H */ |
diff --git a/include/linux/pktcdvd.h b/include/linux/pktcdvd.h index 5ea4f05683f..04b4d7330e6 100644 --- a/include/linux/pktcdvd.h +++ b/include/linux/pktcdvd.h | |||
@@ -290,7 +290,7 @@ struct pktcdvd_device | |||
290 | int write_congestion_off; | 290 | int write_congestion_off; |
291 | int write_congestion_on; | 291 | int write_congestion_on; |
292 | 292 | ||
293 | struct class_device *clsdev; /* sysfs pktcdvd[0-7] class dev */ | 293 | struct device *dev; /* sysfs pktcdvd[0-7] dev */ |
294 | struct pktcdvd_kobj *kobj_stat; /* sysfs pktcdvd[0-7]/stat/ */ | 294 | struct pktcdvd_kobj *kobj_stat; /* sysfs pktcdvd[0-7]/stat/ */ |
295 | struct pktcdvd_kobj *kobj_wqueue; /* sysfs pktcdvd[0-7]/write_queue/ */ | 295 | struct pktcdvd_kobj *kobj_wqueue; /* sysfs pktcdvd[0-7]/write_queue/ */ |
296 | 296 | ||
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index e80804316cd..3261681c82a 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -35,7 +35,7 @@ extern struct resource *platform_get_resource_byname(struct platform_device *, u | |||
35 | extern int platform_get_irq_byname(struct platform_device *, char *); | 35 | extern int platform_get_irq_byname(struct platform_device *, char *); |
36 | extern int platform_add_devices(struct platform_device **, int); | 36 | extern int platform_add_devices(struct platform_device **, int); |
37 | 37 | ||
38 | extern struct platform_device *platform_device_register_simple(char *, int id, | 38 | extern struct platform_device *platform_device_register_simple(const char *, int id, |
39 | struct resource *, unsigned int); | 39 | struct resource *, unsigned int); |
40 | 40 | ||
41 | extern struct platform_device *platform_device_alloc(const char *name, int id); | 41 | extern struct platform_device *platform_device_alloc(const char *name, int id); |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 09a309b7b5d..b78e0295adf 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -246,6 +246,15 @@ static inline int call_platform_enable_wakeup(struct device *dev, int is_on) | |||
246 | device_set_wakeup_enable(dev,val); \ | 246 | device_set_wakeup_enable(dev,val); \ |
247 | } while(0) | 247 | } while(0) |
248 | 248 | ||
249 | /* | ||
250 | * Global Power Management flags | ||
251 | * Used to keep APM and ACPI from both being active | ||
252 | */ | ||
253 | extern unsigned int pm_flags; | ||
254 | |||
255 | #define PM_APM 1 | ||
256 | #define PM_ACPI 2 | ||
257 | |||
249 | #endif /* __KERNEL__ */ | 258 | #endif /* __KERNEL__ */ |
250 | 259 | ||
251 | #endif /* _LINUX_PM_H */ | 260 | #endif /* _LINUX_PM_H */ |
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h index 514729a4468..446f4f42b95 100644 --- a/include/linux/pm_legacy.h +++ b/include/linux/pm_legacy.h | |||
@@ -4,10 +4,6 @@ | |||
4 | 4 | ||
5 | #ifdef CONFIG_PM_LEGACY | 5 | #ifdef CONFIG_PM_LEGACY |
6 | 6 | ||
7 | extern int pm_active; | ||
8 | |||
9 | #define PM_IS_ACTIVE() (pm_active != 0) | ||
10 | |||
11 | /* | 7 | /* |
12 | * Register a device with power management | 8 | * Register a device with power management |
13 | */ | 9 | */ |
@@ -21,8 +17,6 @@ int __deprecated pm_send_all(pm_request_t rqst, void *data); | |||
21 | 17 | ||
22 | #else /* CONFIG_PM_LEGACY */ | 18 | #else /* CONFIG_PM_LEGACY */ |
23 | 19 | ||
24 | #define PM_IS_ACTIVE() 0 | ||
25 | |||
26 | static inline struct pm_dev *pm_register(pm_dev_t type, | 20 | static inline struct pm_dev *pm_register(pm_dev_t type, |
27 | unsigned long id, | 21 | unsigned long id, |
28 | pm_callback callback) | 22 | pm_callback callback) |
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 664d68cb1fb..2a6d62c7d2d 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <linux/errno.h> | 13 | #include <linux/errno.h> |
14 | #include <linux/mod_devicetable.h> | 14 | #include <linux/mod_devicetable.h> |
15 | 15 | ||
16 | #define PNP_MAX_PORT 8 | 16 | #define PNP_MAX_PORT 40 |
17 | #define PNP_MAX_MEM 4 | 17 | #define PNP_MAX_MEM 12 |
18 | #define PNP_MAX_IRQ 2 | 18 | #define PNP_MAX_IRQ 2 |
19 | #define PNP_MAX_DMA 2 | 19 | #define PNP_MAX_DMA 2 |
20 | #define PNP_NAME_LEN 50 | 20 | #define PNP_NAME_LEN 50 |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 1273c6ec535..a5316829215 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -48,6 +48,8 @@ typedef int (read_proc_t)(char *page, char **start, off_t off, | |||
48 | typedef int (write_proc_t)(struct file *file, const char __user *buffer, | 48 | typedef int (write_proc_t)(struct file *file, const char __user *buffer, |
49 | unsigned long count, void *data); | 49 | unsigned long count, void *data); |
50 | typedef int (get_info_t)(char *, char **, off_t, int); | 50 | typedef int (get_info_t)(char *, char **, off_t, int); |
51 | typedef struct proc_dir_entry *(shadow_proc_t)(struct task_struct *task, | ||
52 | struct proc_dir_entry *pde); | ||
51 | 53 | ||
52 | struct proc_dir_entry { | 54 | struct proc_dir_entry { |
53 | unsigned int low_ino; | 55 | unsigned int low_ino; |
@@ -75,10 +77,10 @@ struct proc_dir_entry { | |||
75 | read_proc_t *read_proc; | 77 | read_proc_t *read_proc; |
76 | write_proc_t *write_proc; | 78 | write_proc_t *write_proc; |
77 | atomic_t count; /* use count */ | 79 | atomic_t count; /* use count */ |
78 | int deleted; /* delete flag */ | ||
79 | int pde_users; /* number of callers into module in progress */ | 80 | int pde_users; /* number of callers into module in progress */ |
80 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ | 81 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ |
81 | struct completion *pde_unload_completion; | 82 | struct completion *pde_unload_completion; |
83 | shadow_proc_t *shadow_proc; | ||
82 | }; | 84 | }; |
83 | 85 | ||
84 | struct kcore_list { | 86 | struct kcore_list { |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index ae8146abd74..3ea5750a0f7 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -97,6 +97,7 @@ extern void __ptrace_link(struct task_struct *child, | |||
97 | extern void __ptrace_unlink(struct task_struct *child); | 97 | extern void __ptrace_unlink(struct task_struct *child); |
98 | extern void ptrace_untrace(struct task_struct *child); | 98 | extern void ptrace_untrace(struct task_struct *child); |
99 | extern int ptrace_may_attach(struct task_struct *task); | 99 | extern int ptrace_may_attach(struct task_struct *task); |
100 | extern int __ptrace_may_attach(struct task_struct *task); | ||
100 | 101 | ||
101 | static inline void ptrace_link(struct task_struct *child, | 102 | static inline void ptrace_link(struct task_struct *child, |
102 | struct task_struct *new_parent) | 103 | struct task_struct *new_parent) |
diff --git a/include/linux/quicklist.h b/include/linux/quicklist.h index 9371c6116df..39b66713a0b 100644 --- a/include/linux/quicklist.h +++ b/include/linux/quicklist.h | |||
@@ -56,14 +56,6 @@ static inline void __quicklist_free(int nr, void (*dtor)(void *), void *p, | |||
56 | struct page *page) | 56 | struct page *page) |
57 | { | 57 | { |
58 | struct quicklist *q; | 58 | struct quicklist *q; |
59 | int nid = page_to_nid(page); | ||
60 | |||
61 | if (unlikely(nid != numa_node_id())) { | ||
62 | if (dtor) | ||
63 | dtor(p); | ||
64 | __free_page(page); | ||
65 | return; | ||
66 | } | ||
67 | 59 | ||
68 | q = &get_cpu_var(quicklist)[nr]; | 60 | q = &get_cpu_var(quicklist)[nr]; |
69 | *(void **)p = q->page; | 61 | *(void **)p = q->page; |
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 6d5e4a46781..f2d0d152772 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h | |||
@@ -133,6 +133,9 @@ struct rtc_class_ops { | |||
133 | #define RTC_DEVICE_NAME_SIZE 20 | 133 | #define RTC_DEVICE_NAME_SIZE 20 |
134 | struct rtc_task; | 134 | struct rtc_task; |
135 | 135 | ||
136 | /* flags */ | ||
137 | #define RTC_DEV_BUSY 0 | ||
138 | |||
136 | struct rtc_device | 139 | struct rtc_device |
137 | { | 140 | { |
138 | struct device dev; | 141 | struct device dev; |
@@ -145,7 +148,7 @@ struct rtc_device | |||
145 | struct mutex ops_lock; | 148 | struct mutex ops_lock; |
146 | 149 | ||
147 | struct cdev char_dev; | 150 | struct cdev char_dev; |
148 | struct mutex char_lock; | 151 | unsigned long flags; |
149 | 152 | ||
150 | unsigned long irq_data; | 153 | unsigned long irq_data; |
151 | spinlock_t irq_lock; | 154 | spinlock_t irq_lock; |
diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h index 25973504414..e3ff21dbac5 100644 --- a/include/linux/scatterlist.h +++ b/include/linux/scatterlist.h | |||
@@ -26,6 +26,16 @@ | |||
26 | 26 | ||
27 | #define SG_MAGIC 0x87654321 | 27 | #define SG_MAGIC 0x87654321 |
28 | 28 | ||
29 | /* | ||
30 | * We overload the LSB of the page pointer to indicate whether it's | ||
31 | * a valid sg entry, or whether it points to the start of a new scatterlist. | ||
32 | * Those low bits are there for everyone! (thanks mason :-) | ||
33 | */ | ||
34 | #define sg_is_chain(sg) ((sg)->page_link & 0x01) | ||
35 | #define sg_is_last(sg) ((sg)->page_link & 0x02) | ||
36 | #define sg_chain_ptr(sg) \ | ||
37 | ((struct scatterlist *) ((sg)->page_link & ~0x03)) | ||
38 | |||
29 | /** | 39 | /** |
30 | * sg_assign_page - Assign a given page to an SG entry | 40 | * sg_assign_page - Assign a given page to an SG entry |
31 | * @sg: SG entry | 41 | * @sg: SG entry |
@@ -47,6 +57,7 @@ static inline void sg_assign_page(struct scatterlist *sg, struct page *page) | |||
47 | BUG_ON((unsigned long) page & 0x03); | 57 | BUG_ON((unsigned long) page & 0x03); |
48 | #ifdef CONFIG_DEBUG_SG | 58 | #ifdef CONFIG_DEBUG_SG |
49 | BUG_ON(sg->sg_magic != SG_MAGIC); | 59 | BUG_ON(sg->sg_magic != SG_MAGIC); |
60 | BUG_ON(sg_is_chain(sg)); | ||
50 | #endif | 61 | #endif |
51 | sg->page_link = page_link | (unsigned long) page; | 62 | sg->page_link = page_link | (unsigned long) page; |
52 | } | 63 | } |
@@ -73,7 +84,14 @@ static inline void sg_set_page(struct scatterlist *sg, struct page *page, | |||
73 | sg->length = len; | 84 | sg->length = len; |
74 | } | 85 | } |
75 | 86 | ||
76 | #define sg_page(sg) ((struct page *) ((sg)->page_link & ~0x3)) | 87 | static inline struct page *sg_page(struct scatterlist *sg) |
88 | { | ||
89 | #ifdef CONFIG_DEBUG_SG | ||
90 | BUG_ON(sg->sg_magic != SG_MAGIC); | ||
91 | BUG_ON(sg_is_chain(sg)); | ||
92 | #endif | ||
93 | return (struct page *)((sg)->page_link & ~0x3); | ||
94 | } | ||
77 | 95 | ||
78 | /** | 96 | /** |
79 | * sg_set_buf - Set sg entry to point at given data | 97 | * sg_set_buf - Set sg entry to point at given data |
@@ -88,16 +106,6 @@ static inline void sg_set_buf(struct scatterlist *sg, const void *buf, | |||
88 | sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); | 106 | sg_set_page(sg, virt_to_page(buf), buflen, offset_in_page(buf)); |
89 | } | 107 | } |
90 | 108 | ||
91 | /* | ||
92 | * We overload the LSB of the page pointer to indicate whether it's | ||
93 | * a valid sg entry, or whether it points to the start of a new scatterlist. | ||
94 | * Those low bits are there for everyone! (thanks mason :-) | ||
95 | */ | ||
96 | #define sg_is_chain(sg) ((sg)->page_link & 0x01) | ||
97 | #define sg_is_last(sg) ((sg)->page_link & 0x02) | ||
98 | #define sg_chain_ptr(sg) \ | ||
99 | ((struct scatterlist *) ((sg)->page_link & ~0x03)) | ||
100 | |||
101 | /** | 109 | /** |
102 | * sg_next - return the next scatterlist entry in a list | 110 | * sg_next - return the next scatterlist entry in a list |
103 | * @sg: The current sg entry | 111 | * @sg: The current sg entry |
@@ -179,6 +187,13 @@ static inline void sg_chain(struct scatterlist *prv, unsigned int prv_nents, | |||
179 | #ifndef ARCH_HAS_SG_CHAIN | 187 | #ifndef ARCH_HAS_SG_CHAIN |
180 | BUG(); | 188 | BUG(); |
181 | #endif | 189 | #endif |
190 | |||
191 | /* | ||
192 | * offset and length are unused for chain entry. Clear them. | ||
193 | */ | ||
194 | prv[prv_nents - 1].offset = 0; | ||
195 | prv[prv_nents - 1].length = 0; | ||
196 | |||
182 | /* | 197 | /* |
183 | * Set lowest bit to indicate a link pointer, and make sure to clear | 198 | * Set lowest bit to indicate a link pointer, and make sure to clear |
184 | * the termination bit if it happens to be set. | 199 | * the termination bit if it happens to be set. |
diff --git a/include/linux/sched.h b/include/linux/sched.h index ee800e7a70d..d6eacda765c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -282,6 +282,10 @@ static inline void touch_all_softlockup_watchdogs(void) | |||
282 | 282 | ||
283 | /* Attach to any functions which should be ignored in wchan output. */ | 283 | /* Attach to any functions which should be ignored in wchan output. */ |
284 | #define __sched __attribute__((__section__(".sched.text"))) | 284 | #define __sched __attribute__((__section__(".sched.text"))) |
285 | |||
286 | /* Linker adds these: start and end of __sched functions */ | ||
287 | extern char __sched_text_start[], __sched_text_end[]; | ||
288 | |||
285 | /* Is this address in the __sched functions? */ | 289 | /* Is this address in the __sched functions? */ |
286 | extern int in_sched_functions(unsigned long addr); | 290 | extern int in_sched_functions(unsigned long addr); |
287 | 291 | ||
@@ -548,18 +552,13 @@ struct user_struct { | |||
548 | #ifdef CONFIG_FAIR_USER_SCHED | 552 | #ifdef CONFIG_FAIR_USER_SCHED |
549 | struct task_group *tg; | 553 | struct task_group *tg; |
550 | #ifdef CONFIG_SYSFS | 554 | #ifdef CONFIG_SYSFS |
551 | struct kset kset; | 555 | struct kobject kobj; |
552 | struct subsys_attribute user_attr; | ||
553 | struct work_struct work; | 556 | struct work_struct work; |
554 | #endif | 557 | #endif |
555 | #endif | 558 | #endif |
556 | }; | 559 | }; |
557 | 560 | ||
558 | #ifdef CONFIG_FAIR_USER_SCHED | 561 | extern int uids_sysfs_init(void); |
559 | extern int uids_kobject_init(void); | ||
560 | #else | ||
561 | static inline int uids_kobject_init(void) { return 0; } | ||
562 | #endif | ||
563 | 562 | ||
564 | extern struct user_struct *find_user(uid_t); | 563 | extern struct user_struct *find_user(uid_t); |
565 | 564 | ||
@@ -1251,13 +1250,6 @@ struct pid_namespace; | |||
1251 | * | 1250 | * |
1252 | * set_task_vxid() : assigns a virtual id to a task; | 1251 | * set_task_vxid() : assigns a virtual id to a task; |
1253 | * | 1252 | * |
1254 | * task_ppid_nr_ns() : the parent's id as seen from the namespace specified. | ||
1255 | * the result depends on the namespace and whether the | ||
1256 | * task in question is the namespace's init. e.g. for the | ||
1257 | * namespace's init this will return 0 when called from | ||
1258 | * the namespace of this init, or appropriate id otherwise. | ||
1259 | * | ||
1260 | * | ||
1261 | * see also pid_nr() etc in include/linux/pid.h | 1253 | * see also pid_nr() etc in include/linux/pid.h |
1262 | */ | 1254 | */ |
1263 | 1255 | ||
@@ -1313,12 +1305,6 @@ static inline pid_t task_session_vnr(struct task_struct *tsk) | |||
1313 | } | 1305 | } |
1314 | 1306 | ||
1315 | 1307 | ||
1316 | static inline pid_t task_ppid_nr_ns(struct task_struct *tsk, | ||
1317 | struct pid_namespace *ns) | ||
1318 | { | ||
1319 | return pid_nr_ns(task_pid(rcu_dereference(tsk->real_parent)), ns); | ||
1320 | } | ||
1321 | |||
1322 | /** | 1308 | /** |
1323 | * pid_alive - check that a task structure is not stale | 1309 | * pid_alive - check that a task structure is not stale |
1324 | * @p: Task structure to be checked. | 1310 | * @p: Task structure to be checked. |
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index 827b85bbf38..1ee2c05142f 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h | |||
@@ -63,6 +63,8 @@ struct screen_info { | |||
63 | 63 | ||
64 | #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ | 64 | #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ |
65 | 65 | ||
66 | #define VIDEO_TYPE_EFI 0x70 /* EFI graphic mode */ | ||
67 | |||
66 | #ifdef __KERNEL__ | 68 | #ifdef __KERNEL__ |
67 | extern struct screen_info screen_info; | 69 | extern struct screen_info screen_info; |
68 | 70 | ||
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 6a5203fb9cf..9963f81fea9 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -437,7 +437,7 @@ uart_handle_sysrq_char(struct uart_port *port, unsigned int ch) | |||
437 | #ifdef SUPPORT_SYSRQ | 437 | #ifdef SUPPORT_SYSRQ |
438 | if (port->sysrq) { | 438 | if (port->sysrq) { |
439 | if (ch && time_before(jiffies, port->sysrq)) { | 439 | if (ch && time_before(jiffies, port->sysrq)) { |
440 | handle_sysrq(ch, port->info->tty); | 440 | handle_sysrq(ch, port->info ? port->info->tty : NULL); |
441 | port->sysrq = 0; | 441 | port->sysrq = 0; |
442 | return 1; | 442 | return 1; |
443 | } | 443 | } |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 91140fe8c11..bddd50bd687 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -356,7 +356,6 @@ static inline struct sk_buff *alloc_skb_fclone(unsigned int size, | |||
356 | return __alloc_skb(size, priority, 1, -1); | 356 | return __alloc_skb(size, priority, 1, -1); |
357 | } | 357 | } |
358 | 358 | ||
359 | extern void kfree_skbmem(struct sk_buff *skb); | ||
360 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); | 359 | extern struct sk_buff *skb_morph(struct sk_buff *dst, struct sk_buff *src); |
361 | extern struct sk_buff *skb_clone(struct sk_buff *skb, | 360 | extern struct sk_buff *skb_clone(struct sk_buff *skb, |
362 | gfp_t priority); | 361 | gfp_t priority); |
diff --git a/include/linux/slab.h b/include/linux/slab.h index f3a8eecd99f..f62caaad94e 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
@@ -271,5 +271,10 @@ static inline void *kzalloc(size_t size, gfp_t flags) | |||
271 | return kmalloc(size, flags | __GFP_ZERO); | 271 | return kmalloc(size, flags | __GFP_ZERO); |
272 | } | 272 | } |
273 | 273 | ||
274 | #ifdef CONFIG_SLABINFO | ||
275 | extern const struct seq_operations slabinfo_op; | ||
276 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | ||
277 | #endif | ||
278 | |||
274 | #endif /* __KERNEL__ */ | 279 | #endif /* __KERNEL__ */ |
275 | #endif /* _LINUX_SLAB_H */ | 280 | #endif /* _LINUX_SLAB_H */ |
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 32bdc2ffd71..fcc48096ee6 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -95,7 +95,4 @@ found: | |||
95 | 95 | ||
96 | #endif /* CONFIG_NUMA */ | 96 | #endif /* CONFIG_NUMA */ |
97 | 97 | ||
98 | extern const struct seq_operations slabinfo_op; | ||
99 | ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); | ||
100 | |||
101 | #endif /* _LINUX_SLAB_DEF_H */ | 98 | #endif /* _LINUX_SLAB_DEF_H */ |
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index 3347c72b848..3912cf16361 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h | |||
@@ -88,11 +88,6 @@ enum { | |||
88 | CTL_SLOTTABLE_TCP, | 88 | CTL_SLOTTABLE_TCP, |
89 | CTL_MIN_RESVPORT, | 89 | CTL_MIN_RESVPORT, |
90 | CTL_MAX_RESVPORT, | 90 | CTL_MAX_RESVPORT, |
91 | CTL_SLOTTABLE_RDMA, | ||
92 | CTL_RDMA_MAXINLINEREAD, | ||
93 | CTL_RDMA_MAXINLINEWRITE, | ||
94 | CTL_RDMA_WRITEPADDING, | ||
95 | CTL_RDMA_MEMREG, | ||
96 | }; | 91 | }; |
97 | 92 | ||
98 | #endif /* _LINUX_SUNRPC_DEBUG_H_ */ | 93 | #endif /* _LINUX_SUNRPC_DEBUG_H_ */ |
diff --git a/include/linux/sunrpc/xprtsock.h b/include/linux/sunrpc/xprtsock.h index 2c6c2c2783d..c2a46c45c8f 100644 --- a/include/linux/sunrpc/xprtsock.h +++ b/include/linux/sunrpc/xprtsock.h | |||
@@ -9,12 +9,6 @@ | |||
9 | 9 | ||
10 | #ifdef __KERNEL__ | 10 | #ifdef __KERNEL__ |
11 | 11 | ||
12 | /* | ||
13 | * Socket transport setup operations | ||
14 | */ | ||
15 | struct rpc_xprt *xs_setup_udp(struct xprt_create *args); | ||
16 | struct rpc_xprt *xs_setup_tcp(struct xprt_create *args); | ||
17 | |||
18 | int init_socket_xprt(void); | 12 | int init_socket_xprt(void); |
19 | void cleanup_socket_xprt(void); | 13 | void cleanup_socket_xprt(void); |
20 | 14 | ||
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index e99171f01b4..4f5047df8a9 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -70,7 +70,6 @@ enum | |||
70 | CTL_ABI=9, /* Binary emulation */ | 70 | CTL_ABI=9, /* Binary emulation */ |
71 | CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ | 71 | CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ |
72 | CTL_ARLAN=254, /* arlan wireless driver */ | 72 | CTL_ARLAN=254, /* arlan wireless driver */ |
73 | CTL_APPLDATA=2120, /* s390 appldata */ | ||
74 | CTL_S390DBF=5677, /* s390 debug */ | 73 | CTL_S390DBF=5677, /* s390 debug */ |
75 | CTL_SUNRPC=7249, /* sunrpc debug */ | 74 | CTL_SUNRPC=7249, /* sunrpc debug */ |
76 | CTL_PM=9899, /* frv power management */ | 75 | CTL_PM=9899, /* frv power management */ |
@@ -207,11 +206,6 @@ enum | |||
207 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ | 206 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ |
208 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ | 207 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ |
209 | VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ | 208 | VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ |
210 | |||
211 | /* s390 vm cmm sysctls */ | ||
212 | VM_CMM_PAGES=1111, | ||
213 | VM_CMM_TIMED_PAGES=1112, | ||
214 | VM_CMM_TIMEOUT=1113, | ||
215 | }; | 209 | }; |
216 | 210 | ||
217 | 211 | ||
diff --git a/include/linux/sysdev.h b/include/linux/sysdev.h index e285746588d..f752e73bf97 100644 --- a/include/linux/sysdev.h +++ b/include/linux/sysdev.h | |||
@@ -29,6 +29,7 @@ | |||
29 | struct sys_device; | 29 | struct sys_device; |
30 | 30 | ||
31 | struct sysdev_class { | 31 | struct sysdev_class { |
32 | const char *name; | ||
32 | struct list_head drivers; | 33 | struct list_head drivers; |
33 | 34 | ||
34 | /* Default operations for these types of devices */ | 35 | /* Default operations for these types of devices */ |
diff --git a/include/linux/tc_act/Kbuild b/include/linux/tc_act/Kbuild index 78dfbac3637..6dac0d7365c 100644 --- a/include/linux/tc_act/Kbuild +++ b/include/linux/tc_act/Kbuild | |||
@@ -2,3 +2,4 @@ header-y += tc_gact.h | |||
2 | header-y += tc_ipt.h | 2 | header-y += tc_ipt.h |
3 | header-y += tc_mirred.h | 3 | header-y += tc_mirred.h |
4 | header-y += tc_pedit.h | 4 | header-y += tc_pedit.h |
5 | header-y += tc_nat.h | ||
diff --git a/include/linux/thread_info.h b/include/linux/thread_info.h index 1c4eb41dbd8..9c4ad755d7e 100644 --- a/include/linux/thread_info.h +++ b/include/linux/thread_info.h | |||
@@ -7,12 +7,25 @@ | |||
7 | #ifndef _LINUX_THREAD_INFO_H | 7 | #ifndef _LINUX_THREAD_INFO_H |
8 | #define _LINUX_THREAD_INFO_H | 8 | #define _LINUX_THREAD_INFO_H |
9 | 9 | ||
10 | #include <linux/types.h> | ||
11 | |||
10 | /* | 12 | /* |
11 | * System call restart block. | 13 | * System call restart block. |
12 | */ | 14 | */ |
13 | struct restart_block { | 15 | struct restart_block { |
14 | long (*fn)(struct restart_block *); | 16 | long (*fn)(struct restart_block *); |
15 | unsigned long arg0, arg1, arg2, arg3; | 17 | union { |
18 | struct { | ||
19 | unsigned long arg0, arg1, arg2, arg3; | ||
20 | }; | ||
21 | /* For futex_wait */ | ||
22 | struct { | ||
23 | u32 *uaddr; | ||
24 | u32 val; | ||
25 | u32 flags; | ||
26 | u64 time; | ||
27 | } futex; | ||
28 | }; | ||
16 | }; | 29 | }; |
17 | 30 | ||
18 | extern long do_no_restart_syscall(struct restart_block *parm); | 31 | extern long do_no_restart_syscall(struct restart_block *parm); |
diff --git a/include/linux/ticable.h b/include/linux/ticable.h deleted file mode 100644 index 8c2212086dc..00000000000 --- a/include/linux/ticable.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* Hey EMACS -*- linux-c -*- | ||
2 | * | ||
3 | * tipar/tiser/tiusb - low level driver for handling link cables | ||
4 | * designed for Texas Instruments graphing calculators. | ||
5 | * | ||
6 | * Copyright (C) 2000-2002, Romain Lievin <roms@lpg.ticalc.org> | ||
7 | * | ||
8 | * Redistribution of this file is permitted under the terms of the GNU | ||
9 | * Public License (GPL) | ||
10 | */ | ||
11 | |||
12 | #ifndef _TICABLE_H | ||
13 | #define _TICABLE_H 1 | ||
14 | |||
15 | /* Internal default constants for the kernel module */ | ||
16 | #define TIMAXTIME 15 /* 1.5 seconds */ | ||
17 | #define IO_DELAY 10 /* 10 micro-seconds */ | ||
18 | |||
19 | /* Major & minor number for character devices */ | ||
20 | #define TIPAR_MAJOR 115 /* 0 to 7 */ | ||
21 | #define TIPAR_MINOR 0 | ||
22 | |||
23 | #define TISER_MAJOR 115 /* 8 to 15 */ | ||
24 | #define TISER_MINOR 8 | ||
25 | |||
26 | #define TIUSB_MAJOR 115 /* 16 to 31 */ | ||
27 | #define TIUSB_MINOR 16 | ||
28 | |||
29 | /* | ||
30 | * Request values for the 'ioctl' function. | ||
31 | */ | ||
32 | #define IOCTL_TIPAR_DELAY _IOW('p', 0xa8, int) /* set delay */ | ||
33 | #define IOCTL_TIPAR_TIMEOUT _IOW('p', 0xa9, int) /* set timeout */ | ||
34 | |||
35 | #define IOCTL_TISER_DELAY _IOW('p', 0xa0, int) /* set delay */ | ||
36 | #define IOCTL_TISER_TIMEOUT _IOW('p', 0xa1, int) /* set timeout */ | ||
37 | |||
38 | #define IOCTL_TIUSB_TIMEOUT _IOW('N', 0x20, int) /* set timeout */ | ||
39 | #define IOCTL_TIUSB_RESET_DEVICE _IOW('N', 0x21, int) /* reset device */ | ||
40 | #define IOCTL_TIUSB_RESET_PIPES _IOW('N', 0x22, int) /* reset both pipes*/ | ||
41 | #define IOCTL_TIUSB_GET_MAXPS _IOR('N', 0x23, int) /* max packet size */ | ||
42 | #define IOCTL_TIUSB_GET_DEVID _IOR('N', 0x24, int) /* get device type */ | ||
43 | |||
44 | #endif /* TICABLE_H */ | ||
diff --git a/include/linux/tifm.h b/include/linux/tifm.h index 6b3a31805c7..2096b76d0ce 100644 --- a/include/linux/tifm.h +++ b/include/linux/tifm.h | |||
@@ -120,7 +120,7 @@ struct tifm_adapter { | |||
120 | struct completion *finish_me; | 120 | struct completion *finish_me; |
121 | 121 | ||
122 | struct work_struct media_switcher; | 122 | struct work_struct media_switcher; |
123 | struct class_device cdev; | 123 | struct device dev; |
124 | 124 | ||
125 | void (*eject)(struct tifm_adapter *fm, | 125 | void (*eject)(struct tifm_adapter *fm, |
126 | struct tifm_dev *sock); | 126 | struct tifm_dev *sock); |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 37ac3ff90fa..24c6a2b5951 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -137,6 +137,7 @@ struct timex { | |||
137 | #define ADJ_TIMECONST 0x0020 /* pll time constant */ | 137 | #define ADJ_TIMECONST 0x0020 /* pll time constant */ |
138 | #define ADJ_TICK 0x4000 /* tick value */ | 138 | #define ADJ_TICK 0x4000 /* tick value */ |
139 | #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ | 139 | #define ADJ_OFFSET_SINGLESHOT 0x8001 /* old-fashioned adjtime */ |
140 | #define ADJ_OFFSET_SS_READ 0xa001 /* read-only adjtime */ | ||
140 | 141 | ||
141 | /* xntp 3.4 compatibility names */ | 142 | /* xntp 3.4 compatibility names */ |
142 | #define MOD_OFFSET ADJ_OFFSET | 143 | #define MOD_OFFSET ADJ_OFFSET |
diff --git a/include/linux/tty.h b/include/linux/tty.h index c555f5442bd..defd2ab7244 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -319,6 +319,7 @@ extern speed_t tty_termios_input_baud_rate(struct ktermios *termios); | |||
319 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed_t obaud); | 319 | extern void tty_termios_encode_baud_rate(struct ktermios *termios, speed_t ibaud, speed_t obaud); |
320 | extern void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud); | 320 | extern void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud); |
321 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); | 321 | extern void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old); |
322 | extern int tty_termios_hw_change(struct ktermios *a, struct ktermios *b); | ||
322 | 323 | ||
323 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); | 324 | extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); |
324 | extern void tty_ldisc_deref(struct tty_ldisc *); | 325 | extern void tty_ldisc_deref(struct tty_ldisc *); |
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h index 44c28e94df5..973386d439d 100644 --- a/include/linux/uio_driver.h +++ b/include/linux/uio_driver.h | |||
@@ -18,20 +18,22 @@ | |||
18 | #include <linux/fs.h> | 18 | #include <linux/fs.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | 20 | ||
21 | struct uio_map; | ||
22 | |||
21 | /** | 23 | /** |
22 | * struct uio_mem - description of a UIO memory region | 24 | * struct uio_mem - description of a UIO memory region |
23 | * @kobj: kobject for this mapping | ||
24 | * @addr: address of the device's memory | 25 | * @addr: address of the device's memory |
25 | * @size: size of IO | 26 | * @size: size of IO |
26 | * @memtype: type of memory addr points to | 27 | * @memtype: type of memory addr points to |
27 | * @internal_addr: ioremap-ped version of addr, for driver internal use | 28 | * @internal_addr: ioremap-ped version of addr, for driver internal use |
29 | * @map: for use by the UIO core only. | ||
28 | */ | 30 | */ |
29 | struct uio_mem { | 31 | struct uio_mem { |
30 | struct kobject kobj; | ||
31 | unsigned long addr; | 32 | unsigned long addr; |
32 | unsigned long size; | 33 | unsigned long size; |
33 | int memtype; | 34 | int memtype; |
34 | void __iomem *internal_addr; | 35 | void __iomem *internal_addr; |
36 | struct uio_map *map; | ||
35 | }; | 37 | }; |
36 | 38 | ||
37 | #define MAX_UIO_MAPS 5 | 39 | #define MAX_UIO_MAPS 5 |
diff --git a/include/linux/usb.h b/include/linux/usb.h index c5c8f169d3c..5fc8ff73b7b 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -107,6 +107,7 @@ enum usb_interface_condition { | |||
107 | * @condition: binding state of the interface: not bound, binding | 107 | * @condition: binding state of the interface: not bound, binding |
108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) | 108 | * (in probe()), bound to a driver, or unbinding (in disconnect()) |
109 | * @is_active: flag set when the interface is bound and not suspended. | 109 | * @is_active: flag set when the interface is bound and not suspended. |
110 | * @sysfs_files_created: sysfs attributes exist | ||
110 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup | 111 | * @needs_remote_wakeup: flag set when the driver requires remote-wakeup |
111 | * capability during autosuspend. | 112 | * capability during autosuspend. |
112 | * @dev: driver model's view of this device | 113 | * @dev: driver model's view of this device |
@@ -157,6 +158,7 @@ struct usb_interface { | |||
157 | * bound to */ | 158 | * bound to */ |
158 | enum usb_interface_condition condition; /* state of binding */ | 159 | enum usb_interface_condition condition; /* state of binding */ |
159 | unsigned is_active:1; /* the interface is not suspended */ | 160 | unsigned is_active:1; /* the interface is not suspended */ |
161 | unsigned sysfs_files_created:1; /* the sysfs attributes exist */ | ||
160 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ | 162 | unsigned needs_remote_wakeup:1; /* driver requires remote wakeup */ |
161 | 163 | ||
162 | struct device dev; /* interface specific device info */ | 164 | struct device dev; /* interface specific device info */ |
diff --git a/include/linux/usb_usual.h b/include/linux/usb_usual.h index 1b792b9286b..a417b09b8b3 100644 --- a/include/linux/usb_usual.h +++ b/include/linux/usb_usual.h | |||
@@ -48,7 +48,10 @@ | |||
48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ | 48 | US_FLAG(IGNORE_DEVICE, 0x00000800) \ |
49 | /* Don't claim device */ \ | 49 | /* Don't claim device */ \ |
50 | US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ | 50 | US_FLAG(CAPACITY_HEURISTICS, 0x00001000) \ |
51 | /* sometimes sizes is too big */ | 51 | /* sometimes sizes is too big */ \ |
52 | US_FLAG(MAX_SECTORS_MIN,0x00002000) \ | ||
53 | /* Sets max_sectors to arch min */ | ||
54 | |||
52 | 55 | ||
53 | #define US_FLAG(name, value) US_FL_##name = value , | 56 | #define US_FLAG(name, value) US_FL_##name = value , |
54 | enum { US_DO_ALL_FLAGS }; | 57 | enum { US_DO_ALL_FLAGS }; |
diff --git a/include/linux/usbdevice_fs.h b/include/linux/usbdevice_fs.h index 342dd5a7e8b..8ca5a7fbc9e 100644 --- a/include/linux/usbdevice_fs.h +++ b/include/linux/usbdevice_fs.h | |||
@@ -102,7 +102,8 @@ struct usbdevfs_urb { | |||
102 | int start_frame; | 102 | int start_frame; |
103 | int number_of_packets; | 103 | int number_of_packets; |
104 | int error_count; | 104 | int error_count; |
105 | unsigned int signr; /* signal to be sent on error, -1 if none should be sent */ | 105 | unsigned int signr; /* signal to be sent on completion, |
106 | or 0 if none should be sent. */ | ||
106 | void *usercontext; | 107 | void *usercontext; |
107 | struct usbdevfs_iso_packet_desc iso_frame_desc[0]; | 108 | struct usbdevfs_iso_packet_desc iso_frame_desc[0]; |
108 | }; | 109 | }; |
diff --git a/include/linux/veth.h b/include/linux/veth.h new file mode 100644 index 00000000000..3354c1eb424 --- /dev/null +++ b/include/linux/veth.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef __NET_VETH_H_ | ||
2 | #define __NET_VETH_H_ | ||
3 | |||
4 | enum { | ||
5 | VETH_INFO_UNSPEC, | ||
6 | VETH_INFO_PEER, | ||
7 | |||
8 | __VETH_INFO_MAX | ||
9 | #define VETH_INFO_MAX (__VETH_INFO_MAX - 1) | ||
10 | }; | ||
11 | |||
12 | #endif | ||
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h index 7daafdc2514..7f28c32d9ac 100644 --- a/include/linux/workqueue.h +++ b/include/linux/workqueue.h | |||
@@ -149,19 +149,27 @@ struct execute_work { | |||
149 | 149 | ||
150 | extern struct workqueue_struct * | 150 | extern struct workqueue_struct * |
151 | __create_workqueue_key(const char *name, int singlethread, | 151 | __create_workqueue_key(const char *name, int singlethread, |
152 | int freezeable, struct lock_class_key *key); | 152 | int freezeable, struct lock_class_key *key, |
153 | const char *lock_name); | ||
153 | 154 | ||
154 | #ifdef CONFIG_LOCKDEP | 155 | #ifdef CONFIG_LOCKDEP |
155 | #define __create_workqueue(name, singlethread, freezeable) \ | 156 | #define __create_workqueue(name, singlethread, freezeable) \ |
156 | ({ \ | 157 | ({ \ |
157 | static struct lock_class_key __key; \ | 158 | static struct lock_class_key __key; \ |
159 | const char *__lock_name; \ | ||
160 | \ | ||
161 | if (__builtin_constant_p(name)) \ | ||
162 | __lock_name = (name); \ | ||
163 | else \ | ||
164 | __lock_name = #name; \ | ||
158 | \ | 165 | \ |
159 | __create_workqueue_key((name), (singlethread), \ | 166 | __create_workqueue_key((name), (singlethread), \ |
160 | (freezeable), &__key); \ | 167 | (freezeable), &__key, \ |
168 | __lock_name); \ | ||
161 | }) | 169 | }) |
162 | #else | 170 | #else |
163 | #define __create_workqueue(name, singlethread, freezeable) \ | 171 | #define __create_workqueue(name, singlethread, freezeable) \ |
164 | __create_workqueue_key((name), (singlethread), (freezeable), NULL) | 172 | __create_workqueue_key((name), (singlethread), (freezeable), NULL, NULL) |
165 | #endif | 173 | #endif |
166 | 174 | ||
167 | #define create_workqueue(name) __create_workqueue((name), 0, 0) | 175 | #define create_workqueue(name) __create_workqueue((name), 0, 0) |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index bef7d66601c..c6148bbf125 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -62,7 +62,6 @@ struct writeback_control { | |||
62 | unsigned for_reclaim:1; /* Invoked from the page allocator */ | 62 | unsigned for_reclaim:1; /* Invoked from the page allocator */ |
63 | unsigned for_writepages:1; /* This is a writepages() call */ | 63 | unsigned for_writepages:1; /* This is a writepages() call */ |
64 | unsigned range_cyclic:1; /* range_start is cyclic */ | 64 | unsigned range_cyclic:1; /* range_start is cyclic */ |
65 | unsigned more_io:1; /* more io to be dispatched */ | ||
66 | }; | 65 | }; |
67 | 66 | ||
68 | /* | 67 | /* |