diff options
53 files changed, 316 insertions, 265 deletions
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index 1ce5ae329c04..5210a51c90fd 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
@@ -64,7 +64,6 @@ Description: | |||
64 | Writing a non-zero value to this attribute will | 64 | Writing a non-zero value to this attribute will |
65 | force a rescan of all PCI buses in the system, and | 65 | force a rescan of all PCI buses in the system, and |
66 | re-discover previously removed devices. | 66 | re-discover previously removed devices. |
67 | Depends on CONFIG_HOTPLUG. | ||
68 | 67 | ||
69 | What: /sys/bus/pci/devices/.../msi_irqs/ | 68 | What: /sys/bus/pci/devices/.../msi_irqs/ |
70 | Date: September, 2011 | 69 | Date: September, 2011 |
@@ -90,7 +89,6 @@ Contact: Linux PCI developers <linux-pci@vger.kernel.org> | |||
90 | Description: | 89 | Description: |
91 | Writing a non-zero value to this attribute will | 90 | Writing a non-zero value to this attribute will |
92 | hot-remove the PCI device and any of its children. | 91 | hot-remove the PCI device and any of its children. |
93 | Depends on CONFIG_HOTPLUG. | ||
94 | 92 | ||
95 | What: /sys/bus/pci/devices/.../pci_bus/.../rescan | 93 | What: /sys/bus/pci/devices/.../pci_bus/.../rescan |
96 | Date: May 2011 | 94 | Date: May 2011 |
@@ -99,7 +97,7 @@ Description: | |||
99 | Writing a non-zero value to this attribute will | 97 | Writing a non-zero value to this attribute will |
100 | force a rescan of the bus and all child buses, | 98 | force a rescan of the bus and all child buses, |
101 | and re-discover devices removed earlier from this | 99 | and re-discover devices removed earlier from this |
102 | part of the device tree. Depends on CONFIG_HOTPLUG. | 100 | part of the device tree. |
103 | 101 | ||
104 | What: /sys/bus/pci/devices/.../rescan | 102 | What: /sys/bus/pci/devices/.../rescan |
105 | Date: January 2009 | 103 | Date: January 2009 |
@@ -109,7 +107,6 @@ Description: | |||
109 | force a rescan of the device's parent bus and all | 107 | force a rescan of the device's parent bus and all |
110 | child buses, and re-discover devices removed earlier | 108 | child buses, and re-discover devices removed earlier |
111 | from this part of the device tree. | 109 | from this part of the device tree. |
112 | Depends on CONFIG_HOTPLUG. | ||
113 | 110 | ||
114 | What: /sys/bus/pci/devices/.../reset | 111 | What: /sys/bus/pci/devices/.../reset |
115 | Date: July 2009 | 112 | Date: July 2009 |
diff --git a/Documentation/HOWTO b/Documentation/HOWTO index a9f288ff54f9..27faae3e3846 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO | |||
@@ -112,7 +112,7 @@ required reading: | |||
112 | 112 | ||
113 | Other excellent descriptions of how to create patches properly are: | 113 | Other excellent descriptions of how to create patches properly are: |
114 | "The Perfect Patch" | 114 | "The Perfect Patch" |
115 | http://userweb.kernel.org/~akpm/stuff/tpp.txt | 115 | http://kerneltrap.org/node/3737 |
116 | "Linux kernel patch submission format" | 116 | "Linux kernel patch submission format" |
117 | http://linux.yyz.us/patch-format.html | 117 | http://linux.yyz.us/patch-format.html |
118 | 118 | ||
diff --git a/Documentation/SubmitChecklist b/Documentation/SubmitChecklist index dc0e33210d7e..2b7e32dfe00d 100644 --- a/Documentation/SubmitChecklist +++ b/Documentation/SubmitChecklist | |||
@@ -105,5 +105,5 @@ kernel patches. | |||
105 | same time, just various/random combinations of them]: | 105 | same time, just various/random combinations of them]: |
106 | 106 | ||
107 | CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI, | 107 | CONFIG_SMP, CONFIG_SYSFS, CONFIG_PROC_FS, CONFIG_INPUT, CONFIG_PCI, |
108 | CONFIG_BLOCK, CONFIG_PM, CONFIG_HOTPLUG, CONFIG_MAGIC_SYSRQ, | 108 | CONFIG_BLOCK, CONFIG_PM, CONFIG_MAGIC_SYSRQ, |
109 | CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y) | 109 | CONFIG_NET, CONFIG_INET=n (but latter with CONFIG_NET=y) |
diff --git a/Documentation/cpu-hotplug.txt b/Documentation/cpu-hotplug.txt index 9f401350f502..0efd1b905b9d 100644 --- a/Documentation/cpu-hotplug.txt +++ b/Documentation/cpu-hotplug.txt | |||
@@ -128,7 +128,7 @@ A: When doing make defconfig, Enable CPU hotplug support | |||
128 | 128 | ||
129 | "Processor type and Features" -> Support for Hotpluggable CPUs | 129 | "Processor type and Features" -> Support for Hotpluggable CPUs |
130 | 130 | ||
131 | Make sure that you have CONFIG_HOTPLUG, and CONFIG_SMP turned on as well. | 131 | Make sure that you have CONFIG_SMP turned on as well. |
132 | 132 | ||
133 | You would need to enable CONFIG_HOTPLUG_CPU for SMP suspend/resume support | 133 | You would need to enable CONFIG_HOTPLUG_CPU for SMP suspend/resume support |
134 | as well. | 134 | as well. |
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches index 843751c41fea..46286460462b 100644 --- a/Documentation/hwmon/submitting-patches +++ b/Documentation/hwmon/submitting-patches | |||
@@ -27,8 +27,7 @@ increase the chances of your change being accepted. | |||
27 | explicitly below the patch header. | 27 | explicitly below the patch header. |
28 | 28 | ||
29 | * If your patch (or the driver) is affected by configuration options such as | 29 | * If your patch (or the driver) is affected by configuration options such as |
30 | CONFIG_SMP or CONFIG_HOTPLUG, make sure it compiles for all configuration | 30 | CONFIG_SMP, make sure it compiles for all configuration variants. |
31 | variants. | ||
32 | 31 | ||
33 | 32 | ||
34 | 2. Adding functionality to existing drivers | 33 | 2. Adding functionality to existing drivers |
diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index 3f429ed8b3b8..213859e69e88 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt | |||
@@ -165,7 +165,7 @@ Searching in menuconfig: | |||
165 | Example: | 165 | Example: |
166 | /hotplug | 166 | /hotplug |
167 | This lists all config symbols that contain "hotplug", | 167 | This lists all config symbols that contain "hotplug", |
168 | e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG. | 168 | e.g., HOTPLUG_CPU, MEMORY_HOTPLUG. |
169 | 169 | ||
170 | For search help, enter / followed TAB-TAB-TAB (to highlight | 170 | For search help, enter / followed TAB-TAB-TAB (to highlight |
171 | <Help>) and Enter. This will tell you that you can also use | 171 | <Help>) and Enter. This will tell you that you can also use |
diff --git a/Documentation/usb/hotplug.txt b/Documentation/usb/hotplug.txt index 4c945716a660..6424b130485c 100644 --- a/Documentation/usb/hotplug.txt +++ b/Documentation/usb/hotplug.txt | |||
@@ -33,9 +33,9 @@ you get the best hotplugging when you configure a highly modular system. | |||
33 | 33 | ||
34 | KERNEL HOTPLUG HELPER (/sbin/hotplug) | 34 | KERNEL HOTPLUG HELPER (/sbin/hotplug) |
35 | 35 | ||
36 | When you compile with CONFIG_HOTPLUG, you get a new kernel parameter: | 36 | There is a kernel parameter: /proc/sys/kernel/hotplug, which normally |
37 | /proc/sys/kernel/hotplug, which normally holds the pathname "/sbin/hotplug". | 37 | holds the pathname "/sbin/hotplug". That parameter names a program |
38 | That parameter names a program which the kernel may invoke at various times. | 38 | which the kernel may invoke at various times. |
39 | 39 | ||
40 | The /sbin/hotplug program can be invoked by any subsystem as part of its | 40 | The /sbin/hotplug program can be invoked by any subsystem as part of its |
41 | reaction to a configuration change, from a thread in that subsystem. | 41 | reaction to a configuration change, from a thread in that subsystem. |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 136f263ed47b..b5190158ceaf 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1552,7 +1552,7 @@ config NR_CPUS | |||
1552 | 1552 | ||
1553 | config HOTPLUG_CPU | 1553 | config HOTPLUG_CPU |
1554 | bool "Support for hot-pluggable CPUs" | 1554 | bool "Support for hot-pluggable CPUs" |
1555 | depends on SMP && HOTPLUG | 1555 | depends on SMP |
1556 | help | 1556 | help |
1557 | Say Y here to experiment with turning CPUs off and on. CPUs | 1557 | Say Y here to experiment with turning CPUs off and on. CPUs |
1558 | can be controlled through /sys/devices/system/cpu. | 1558 | can be controlled through /sys/devices/system/cpu. |
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index 1e9be5d25e56..85c3fb6c93c2 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c | |||
@@ -288,24 +288,16 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs, | |||
288 | 288 | ||
289 | if (strcmp(".ARM.exidx.init.text", secname) == 0) | 289 | if (strcmp(".ARM.exidx.init.text", secname) == 0) |
290 | maps[ARM_SEC_INIT].unw_sec = s; | 290 | maps[ARM_SEC_INIT].unw_sec = s; |
291 | else if (strcmp(".ARM.exidx.devinit.text", secname) == 0) | ||
292 | maps[ARM_SEC_DEVINIT].unw_sec = s; | ||
293 | else if (strcmp(".ARM.exidx", secname) == 0) | 291 | else if (strcmp(".ARM.exidx", secname) == 0) |
294 | maps[ARM_SEC_CORE].unw_sec = s; | 292 | maps[ARM_SEC_CORE].unw_sec = s; |
295 | else if (strcmp(".ARM.exidx.exit.text", secname) == 0) | 293 | else if (strcmp(".ARM.exidx.exit.text", secname) == 0) |
296 | maps[ARM_SEC_EXIT].unw_sec = s; | 294 | maps[ARM_SEC_EXIT].unw_sec = s; |
297 | else if (strcmp(".ARM.exidx.devexit.text", secname) == 0) | ||
298 | maps[ARM_SEC_DEVEXIT].unw_sec = s; | ||
299 | else if (strcmp(".init.text", secname) == 0) | 295 | else if (strcmp(".init.text", secname) == 0) |
300 | maps[ARM_SEC_INIT].txt_sec = s; | 296 | maps[ARM_SEC_INIT].txt_sec = s; |
301 | else if (strcmp(".devinit.text", secname) == 0) | ||
302 | maps[ARM_SEC_DEVINIT].txt_sec = s; | ||
303 | else if (strcmp(".text", secname) == 0) | 297 | else if (strcmp(".text", secname) == 0) |
304 | maps[ARM_SEC_CORE].txt_sec = s; | 298 | maps[ARM_SEC_CORE].txt_sec = s; |
305 | else if (strcmp(".exit.text", secname) == 0) | 299 | else if (strcmp(".exit.text", secname) == 0) |
306 | maps[ARM_SEC_EXIT].txt_sec = s; | 300 | maps[ARM_SEC_EXIT].txt_sec = s; |
307 | else if (strcmp(".devexit.text", secname) == 0) | ||
308 | maps[ARM_SEC_DEVEXIT].txt_sec = s; | ||
309 | } | 301 | } |
310 | 302 | ||
311 | for (i = 0; i < ARM_SEC_MAX; i++) | 303 | for (i = 0; i < ARM_SEC_MAX; i++) |
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index a871b8e00fca..fa25e4e425f6 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S | |||
@@ -70,10 +70,6 @@ SECTIONS | |||
70 | ARM_EXIT_DISCARD(EXIT_TEXT) | 70 | ARM_EXIT_DISCARD(EXIT_TEXT) |
71 | ARM_EXIT_DISCARD(EXIT_DATA) | 71 | ARM_EXIT_DISCARD(EXIT_DATA) |
72 | EXIT_CALL | 72 | EXIT_CALL |
73 | #ifndef CONFIG_HOTPLUG | ||
74 | *(.ARM.exidx.devexit.text) | ||
75 | *(.ARM.extab.devexit.text) | ||
76 | #endif | ||
77 | #ifndef CONFIG_MMU | 73 | #ifndef CONFIG_MMU |
78 | *(.fixup) | 74 | *(.fixup) |
79 | *(__ex_table) | 75 | *(__ex_table) |
diff --git a/arch/arm/mach-ixp4xx/Kconfig b/arch/arm/mach-ixp4xx/Kconfig index 73a2d905af8a..30e1ebe3a891 100644 --- a/arch/arm/mach-ixp4xx/Kconfig +++ b/arch/arm/mach-ixp4xx/Kconfig | |||
@@ -235,7 +235,6 @@ config IXP4XX_QMGR | |||
235 | config IXP4XX_NPE | 235 | config IXP4XX_NPE |
236 | tristate "IXP4xx Network Processor Engine support" | 236 | tristate "IXP4xx Network Processor Engine support" |
237 | select FW_LOADER | 237 | select FW_LOADER |
238 | select HOTPLUG | ||
239 | help | 238 | help |
240 | This driver supports IXP4xx built-in network coprocessors | 239 | This driver supports IXP4xx built-in network coprocessors |
241 | and is automatically selected by Ethernet and HSS drivers. | 240 | and is automatically selected by Ethernet and HSS drivers. |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index a117652b5fea..b573827d0416 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -253,7 +253,7 @@ config NR_CPUS | |||
253 | 253 | ||
254 | config HOTPLUG_CPU | 254 | config HOTPLUG_CPU |
255 | bool "Support for hot-pluggable CPUs" | 255 | bool "Support for hot-pluggable CPUs" |
256 | depends on SMP && HOTPLUG | 256 | depends on SMP |
257 | default y | 257 | default y |
258 | 258 | ||
259 | config BF_REV_MIN | 259 | config BF_REV_MIN |
diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig index c55971a40c34..ab725edbc680 100644 --- a/arch/cris/arch-v32/drivers/Kconfig +++ b/arch/cris/arch-v32/drivers/Kconfig | |||
@@ -617,7 +617,6 @@ config ETRAX_PV_CHANGEABLE_BITS | |||
617 | config ETRAX_CARDBUS | 617 | config ETRAX_CARDBUS |
618 | bool "Cardbus support" | 618 | bool "Cardbus support" |
619 | depends on ETRAX_ARCH_V32 | 619 | depends on ETRAX_ARCH_V32 |
620 | select HOTPLUG | ||
621 | help | 620 | help |
622 | Enabled the ETRAX Cardbus driver. | 621 | Enabled the ETRAX Cardbus driver. |
623 | 622 | ||
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 1a2b7749b047..5a768ad8e893 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -376,7 +376,6 @@ config NR_CPUS | |||
376 | config HOTPLUG_CPU | 376 | config HOTPLUG_CPU |
377 | bool "Support for hot-pluggable CPUs" | 377 | bool "Support for hot-pluggable CPUs" |
378 | depends on SMP | 378 | depends on SMP |
379 | select HOTPLUG | ||
380 | default n | 379 | default n |
381 | ---help--- | 380 | ---help--- |
382 | Say Y here to experiment with turning CPUs off and on. CPUs | 381 | Say Y here to experiment with turning CPUs off and on. CPUs |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 7a58ab933b20..e433b90507fb 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -962,7 +962,7 @@ config SYS_HAS_EARLY_PRINTK | |||
962 | 962 | ||
963 | config HOTPLUG_CPU | 963 | config HOTPLUG_CPU |
964 | bool "Support for hot-pluggable CPUs" | 964 | bool "Support for hot-pluggable CPUs" |
965 | depends on SMP && HOTPLUG && SYS_SUPPORTS_HOTPLUG_CPU | 965 | depends on SMP && SYS_SUPPORTS_HOTPLUG_CPU |
966 | help | 966 | help |
967 | Say Y here to allow turning CPUs off and on. CPUs can be | 967 | Say Y here to allow turning CPUs off and on. CPUs can be |
968 | controlled through /sys/devices/system/cpu. | 968 | controlled through /sys/devices/system/cpu. |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 6507dabdd5dd..2a2aea5aae5b 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -254,7 +254,6 @@ config IRQSTACKS | |||
254 | config HOTPLUG_CPU | 254 | config HOTPLUG_CPU |
255 | bool | 255 | bool |
256 | default y if SMP | 256 | default y if SMP |
257 | select HOTPLUG | ||
258 | 257 | ||
259 | config ARCH_SELECT_MEMORY_MODEL | 258 | config ARCH_SELECT_MEMORY_MODEL |
260 | def_bool y | 259 | def_bool y |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index c33e3ad2c8fd..508e3fe934d2 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -341,7 +341,7 @@ config SWIOTLB | |||
341 | 341 | ||
342 | config HOTPLUG_CPU | 342 | config HOTPLUG_CPU |
343 | bool "Support for enabling/disabling CPUs" | 343 | bool "Support for enabling/disabling CPUs" |
344 | depends on SMP && HOTPLUG && (PPC_PSERIES || \ | 344 | depends on SMP && (PPC_PSERIES || \ |
345 | PPC_PMAC || PPC_POWERNV || (PPC_85xx && !PPC_E500MC)) | 345 | PPC_PMAC || PPC_POWERNV || (PPC_85xx && !PPC_E500MC)) |
346 | ---help--- | 346 | ---help--- |
347 | Say Y here to be able to disable and re-enable individual | 347 | Say Y here to be able to disable and re-enable individual |
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c index 023ec8a13f38..7df1c5edda87 100644 --- a/arch/powerpc/mm/tlb_hash64.c +++ b/arch/powerpc/mm/tlb_hash64.c | |||
@@ -183,8 +183,8 @@ void tlb_flush(struct mmu_gather *tlb) | |||
183 | * since 64K pages may overlap with other bridges when using 64K pages | 183 | * since 64K pages may overlap with other bridges when using 64K pages |
184 | * with 4K HW pages on IO space. | 184 | * with 4K HW pages on IO space. |
185 | * | 185 | * |
186 | * Because of that usage pattern, it's only available with CONFIG_HOTPLUG | 186 | * Because of that usage pattern, it is implemented for small size rather |
187 | * and is implemented for small size rather than speed. | 187 | * than speed. |
188 | */ | 188 | */ |
189 | void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, | 189 | void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, |
190 | unsigned long end) | 190 | unsigned long end) |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index da183c5a103c..22f75b504f7f 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -301,7 +301,6 @@ config HOTPLUG_CPU | |||
301 | def_bool y | 301 | def_bool y |
302 | prompt "Support for hot-pluggable CPUs" | 302 | prompt "Support for hot-pluggable CPUs" |
303 | depends on SMP | 303 | depends on SMP |
304 | select HOTPLUG | ||
305 | help | 304 | help |
306 | Say Y here to be able to turn CPUs off and on. CPUs | 305 | Say Y here to be able to turn CPUs off and on. CPUs |
307 | can be controlled through /sys/devices/system/cpu/cpu#. | 306 | can be controlled through /sys/devices/system/cpu/cpu#. |
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 8c868cf2cf93..1020dd85431a 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -748,7 +748,7 @@ config NR_CPUS | |||
748 | 748 | ||
749 | config HOTPLUG_CPU | 749 | config HOTPLUG_CPU |
750 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 750 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" |
751 | depends on SMP && HOTPLUG | 751 | depends on SMP |
752 | help | 752 | help |
753 | Say Y here to experiment with turning CPUs off and on. CPUs | 753 | Say Y here to experiment with turning CPUs off and on. CPUs |
754 | can be controlled through /sys/devices/system/cpu. | 754 | can be controlled through /sys/devices/system/cpu. |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 9ac9f1666339..a00cbd356db5 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -243,7 +243,6 @@ config SECCOMP | |||
243 | config HOTPLUG_CPU | 243 | config HOTPLUG_CPU |
244 | bool "Support for hot-pluggable CPUs" | 244 | bool "Support for hot-pluggable CPUs" |
245 | depends on SPARC64 && SMP | 245 | depends on SPARC64 && SMP |
246 | select HOTPLUG | ||
247 | help | 246 | help |
248 | Say Y here to experiment with turning CPUs off and on. CPUs | 247 | Say Y here to experiment with turning CPUs off and on. CPUs |
249 | can be controlled through /sys/devices/system/cpu/cpu#. | 248 | can be controlled through /sys/devices/system/cpu/cpu#. |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index fe120da25625..c49b4dc8ffe0 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1725,7 +1725,7 @@ config PHYSICAL_ALIGN | |||
1725 | 1725 | ||
1726 | config HOTPLUG_CPU | 1726 | config HOTPLUG_CPU |
1727 | bool "Support for hot-pluggable CPUs" | 1727 | bool "Support for hot-pluggable CPUs" |
1728 | depends on SMP && HOTPLUG | 1728 | depends on SMP |
1729 | ---help--- | 1729 | ---help--- |
1730 | Say Y here to allow turning CPUs off and on. CPUs can be | 1730 | Say Y here to allow turning CPUs off and on. CPUs can be |
1731 | controlled through /sys/devices/system/cpu. | 1731 | controlled through /sys/devices/system/cpu. |
diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 07abd9d76f7f..5daa2599ed48 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig | |||
@@ -2,7 +2,6 @@ menu "Generic Driver Options" | |||
2 | 2 | ||
3 | config UEVENT_HELPER_PATH | 3 | config UEVENT_HELPER_PATH |
4 | string "path to uevent helper" | 4 | string "path to uevent helper" |
5 | depends on HOTPLUG | ||
6 | default "" | 5 | default "" |
7 | help | 6 | help |
8 | Path to uevent helper program forked by the kernel for | 7 | Path to uevent helper program forked by the kernel for |
@@ -23,7 +22,6 @@ config UEVENT_HELPER_PATH | |||
23 | 22 | ||
24 | config DEVTMPFS | 23 | config DEVTMPFS |
25 | bool "Maintain a devtmpfs filesystem to mount at /dev" | 24 | bool "Maintain a devtmpfs filesystem to mount at /dev" |
26 | depends on HOTPLUG | ||
27 | help | 25 | help |
28 | This creates a tmpfs/ramfs filesystem instance early at bootup. | 26 | This creates a tmpfs/ramfs filesystem instance early at bootup. |
29 | In this filesystem, the kernel driver core maintains device | 27 | In this filesystem, the kernel driver core maintains device |
diff --git a/drivers/base/core.c b/drivers/base/core.c index 2499cefdcdf2..6fdc53d46fa0 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c | |||
@@ -193,12 +193,12 @@ ssize_t device_show_bool(struct device *dev, struct device_attribute *attr, | |||
193 | EXPORT_SYMBOL_GPL(device_show_bool); | 193 | EXPORT_SYMBOL_GPL(device_show_bool); |
194 | 194 | ||
195 | /** | 195 | /** |
196 | * device_release - free device structure. | 196 | * device_release - free device structure. |
197 | * @kobj: device's kobject. | 197 | * @kobj: device's kobject. |
198 | * | 198 | * |
199 | * This is called once the reference count for the object | 199 | * This is called once the reference count for the object |
200 | * reaches 0. We forward the call to the device's release | 200 | * reaches 0. We forward the call to the device's release |
201 | * method, which should handle actually freeing the structure. | 201 | * method, which should handle actually freeing the structure. |
202 | */ | 202 | */ |
203 | static void device_release(struct kobject *kobj) | 203 | static void device_release(struct kobject *kobj) |
204 | { | 204 | { |
@@ -1334,8 +1334,8 @@ const char *device_get_devnode(struct device *dev, | |||
1334 | /** | 1334 | /** |
1335 | * device_for_each_child - device child iterator. | 1335 | * device_for_each_child - device child iterator. |
1336 | * @parent: parent struct device. | 1336 | * @parent: parent struct device. |
1337 | * @data: data for the callback. | ||
1338 | * @fn: function to be called for each device. | 1337 | * @fn: function to be called for each device. |
1338 | * @data: data for the callback. | ||
1339 | * | 1339 | * |
1340 | * Iterate over @parent's child devices, and call @fn for each, | 1340 | * Iterate over @parent's child devices, and call @fn for each, |
1341 | * passing it @data. | 1341 | * passing it @data. |
@@ -1363,8 +1363,8 @@ int device_for_each_child(struct device *parent, void *data, | |||
1363 | /** | 1363 | /** |
1364 | * device_find_child - device iterator for locating a particular device. | 1364 | * device_find_child - device iterator for locating a particular device. |
1365 | * @parent: parent struct device | 1365 | * @parent: parent struct device |
1366 | * @data: Data to pass to match function | ||
1367 | * @match: Callback function to check device | 1366 | * @match: Callback function to check device |
1367 | * @data: Data to pass to match function | ||
1368 | * | 1368 | * |
1369 | * This is similar to the device_for_each_child() function above, but it | 1369 | * This is similar to the device_for_each_child() function above, but it |
1370 | * returns a reference to a device that is 'found' for later use, as | 1370 | * returns a reference to a device that is 'found' for later use, as |
@@ -1374,6 +1374,8 @@ int device_for_each_child(struct device *parent, void *data, | |||
1374 | * if it does. If the callback returns non-zero and a reference to the | 1374 | * if it does. If the callback returns non-zero and a reference to the |
1375 | * current device can be obtained, this function will return to the caller | 1375 | * current device can be obtained, this function will return to the caller |
1376 | * and not iterate over any more devices. | 1376 | * and not iterate over any more devices. |
1377 | * | ||
1378 | * NOTE: you will need to drop the reference with put_device() after use. | ||
1377 | */ | 1379 | */ |
1378 | struct device *device_find_child(struct device *parent, void *data, | 1380 | struct device *device_find_child(struct device *parent, void *data, |
1379 | int (*match)(struct device *dev, void *data)) | 1381 | int (*match)(struct device *dev, void *data)) |
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 3d48fc887ef4..c377673320ed 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -85,18 +85,21 @@ static ssize_t __ref store_online(struct device *dev, | |||
85 | } | 85 | } |
86 | static DEVICE_ATTR(online, 0644, show_online, store_online); | 86 | static DEVICE_ATTR(online, 0644, show_online, store_online); |
87 | 87 | ||
88 | static void __cpuinit register_cpu_control(struct cpu *cpu) | 88 | static struct attribute *hotplug_cpu_attrs[] = { |
89 | { | 89 | &dev_attr_online.attr, |
90 | device_create_file(&cpu->dev, &dev_attr_online); | 90 | NULL |
91 | } | 91 | }; |
92 | |||
93 | static struct attribute_group hotplug_cpu_attr_group = { | ||
94 | .attrs = hotplug_cpu_attrs, | ||
95 | }; | ||
96 | |||
92 | void unregister_cpu(struct cpu *cpu) | 97 | void unregister_cpu(struct cpu *cpu) |
93 | { | 98 | { |
94 | int logical_cpu = cpu->dev.id; | 99 | int logical_cpu = cpu->dev.id; |
95 | 100 | ||
96 | unregister_cpu_under_node(logical_cpu, cpu_to_node(logical_cpu)); | 101 | unregister_cpu_under_node(logical_cpu, cpu_to_node(logical_cpu)); |
97 | 102 | ||
98 | device_remove_file(&cpu->dev, &dev_attr_online); | ||
99 | |||
100 | device_unregister(&cpu->dev); | 103 | device_unregister(&cpu->dev); |
101 | per_cpu(cpu_sys_devices, logical_cpu) = NULL; | 104 | per_cpu(cpu_sys_devices, logical_cpu) = NULL; |
102 | return; | 105 | return; |
@@ -122,11 +125,6 @@ static ssize_t cpu_release_store(struct device *dev, | |||
122 | static DEVICE_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); | 125 | static DEVICE_ATTR(probe, S_IWUSR, NULL, cpu_probe_store); |
123 | static DEVICE_ATTR(release, S_IWUSR, NULL, cpu_release_store); | 126 | static DEVICE_ATTR(release, S_IWUSR, NULL, cpu_release_store); |
124 | #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */ | 127 | #endif /* CONFIG_ARCH_CPU_PROBE_RELEASE */ |
125 | |||
126 | #else /* ... !CONFIG_HOTPLUG_CPU */ | ||
127 | static inline void register_cpu_control(struct cpu *cpu) | ||
128 | { | ||
129 | } | ||
130 | #endif /* CONFIG_HOTPLUG_CPU */ | 128 | #endif /* CONFIG_HOTPLUG_CPU */ |
131 | 129 | ||
132 | #ifdef CONFIG_KEXEC | 130 | #ifdef CONFIG_KEXEC |
@@ -164,8 +162,35 @@ static ssize_t show_crash_notes_size(struct device *dev, | |||
164 | return rc; | 162 | return rc; |
165 | } | 163 | } |
166 | static DEVICE_ATTR(crash_notes_size, 0400, show_crash_notes_size, NULL); | 164 | static DEVICE_ATTR(crash_notes_size, 0400, show_crash_notes_size, NULL); |
165 | |||
166 | static struct attribute *crash_note_cpu_attrs[] = { | ||
167 | &dev_attr_crash_notes.attr, | ||
168 | &dev_attr_crash_notes_size.attr, | ||
169 | NULL | ||
170 | }; | ||
171 | |||
172 | static struct attribute_group crash_note_cpu_attr_group = { | ||
173 | .attrs = crash_note_cpu_attrs, | ||
174 | }; | ||
167 | #endif | 175 | #endif |
168 | 176 | ||
177 | static const struct attribute_group *common_cpu_attr_groups[] = { | ||
178 | #ifdef CONFIG_KEXEC | ||
179 | &crash_note_cpu_attr_group, | ||
180 | #endif | ||
181 | NULL | ||
182 | }; | ||
183 | |||
184 | static const struct attribute_group *hotplugable_cpu_attr_groups[] = { | ||
185 | #ifdef CONFIG_KEXEC | ||
186 | &crash_note_cpu_attr_group, | ||
187 | #endif | ||
188 | #ifdef CONFIG_HOTPLUG_CPU | ||
189 | &hotplug_cpu_attr_group, | ||
190 | #endif | ||
191 | NULL | ||
192 | }; | ||
193 | |||
169 | /* | 194 | /* |
170 | * Print cpu online, possible, present, and system maps | 195 | * Print cpu online, possible, present, and system maps |
171 | */ | 196 | */ |
@@ -280,21 +305,15 @@ int __cpuinit register_cpu(struct cpu *cpu, int num) | |||
280 | #ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE | 305 | #ifdef CONFIG_ARCH_HAS_CPU_AUTOPROBE |
281 | cpu->dev.bus->uevent = arch_cpu_uevent; | 306 | cpu->dev.bus->uevent = arch_cpu_uevent; |
282 | #endif | 307 | #endif |
308 | cpu->dev.groups = common_cpu_attr_groups; | ||
309 | if (cpu->hotpluggable) | ||
310 | cpu->dev.groups = hotplugable_cpu_attr_groups; | ||
283 | error = device_register(&cpu->dev); | 311 | error = device_register(&cpu->dev); |
284 | if (!error && cpu->hotpluggable) | ||
285 | register_cpu_control(cpu); | ||
286 | if (!error) | 312 | if (!error) |
287 | per_cpu(cpu_sys_devices, num) = &cpu->dev; | 313 | per_cpu(cpu_sys_devices, num) = &cpu->dev; |
288 | if (!error) | 314 | if (!error) |
289 | register_cpu_under_node(num, cpu_to_node(num)); | 315 | register_cpu_under_node(num, cpu_to_node(num)); |
290 | 316 | ||
291 | #ifdef CONFIG_KEXEC | ||
292 | if (!error) | ||
293 | error = device_create_file(&cpu->dev, &dev_attr_crash_notes); | ||
294 | if (!error) | ||
295 | error = device_create_file(&cpu->dev, | ||
296 | &dev_attr_crash_notes_size); | ||
297 | #endif | ||
298 | return error; | 317 | return error; |
299 | } | 318 | } |
300 | 319 | ||
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 01e21037d8fe..a439602ea919 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/pm.h> | 27 | #include <linux/pm.h> |
28 | #include <linux/suspend.h> | 28 | #include <linux/suspend.h> |
29 | #include <linux/syscore_ops.h> | 29 | #include <linux/syscore_ops.h> |
30 | #include <linux/reboot.h> | ||
30 | 31 | ||
31 | #include <generated/utsrelease.h> | 32 | #include <generated/utsrelease.h> |
32 | 33 | ||
@@ -127,9 +128,11 @@ struct firmware_buf { | |||
127 | size_t size; | 128 | size_t size; |
128 | #ifdef CONFIG_FW_LOADER_USER_HELPER | 129 | #ifdef CONFIG_FW_LOADER_USER_HELPER |
129 | bool is_paged_buf; | 130 | bool is_paged_buf; |
131 | bool need_uevent; | ||
130 | struct page **pages; | 132 | struct page **pages; |
131 | int nr_pages; | 133 | int nr_pages; |
132 | int page_array_size; | 134 | int page_array_size; |
135 | struct list_head pending_list; | ||
133 | #endif | 136 | #endif |
134 | char fw_id[]; | 137 | char fw_id[]; |
135 | }; | 138 | }; |
@@ -171,6 +174,9 @@ static struct firmware_buf *__allocate_fw_buf(const char *fw_name, | |||
171 | strcpy(buf->fw_id, fw_name); | 174 | strcpy(buf->fw_id, fw_name); |
172 | buf->fwc = fwc; | 175 | buf->fwc = fwc; |
173 | init_completion(&buf->completion); | 176 | init_completion(&buf->completion); |
177 | #ifdef CONFIG_FW_LOADER_USER_HELPER | ||
178 | INIT_LIST_HEAD(&buf->pending_list); | ||
179 | #endif | ||
174 | 180 | ||
175 | pr_debug("%s: fw-%s buf=%p\n", __func__, fw_name, buf); | 181 | pr_debug("%s: fw-%s buf=%p\n", __func__, fw_name, buf); |
176 | 182 | ||
@@ -212,18 +218,6 @@ static int fw_lookup_and_allocate_buf(const char *fw_name, | |||
212 | return tmp ? 0 : -ENOMEM; | 218 | return tmp ? 0 : -ENOMEM; |
213 | } | 219 | } |
214 | 220 | ||
215 | static struct firmware_buf *fw_lookup_buf(const char *fw_name) | ||
216 | { | ||
217 | struct firmware_buf *tmp; | ||
218 | struct firmware_cache *fwc = &fw_cache; | ||
219 | |||
220 | spin_lock(&fwc->lock); | ||
221 | tmp = __fw_lookup_buf(fw_name); | ||
222 | spin_unlock(&fwc->lock); | ||
223 | |||
224 | return tmp; | ||
225 | } | ||
226 | |||
227 | static void __fw_free_buf(struct kref *ref) | 221 | static void __fw_free_buf(struct kref *ref) |
228 | { | 222 | { |
229 | struct firmware_buf *buf = to_fwbuf(ref); | 223 | struct firmware_buf *buf = to_fwbuf(ref); |
@@ -446,10 +440,8 @@ static struct firmware_priv *to_firmware_priv(struct device *dev) | |||
446 | return container_of(dev, struct firmware_priv, dev); | 440 | return container_of(dev, struct firmware_priv, dev); |
447 | } | 441 | } |
448 | 442 | ||
449 | static void fw_load_abort(struct firmware_priv *fw_priv) | 443 | static void __fw_load_abort(struct firmware_buf *buf) |
450 | { | 444 | { |
451 | struct firmware_buf *buf = fw_priv->buf; | ||
452 | |||
453 | /* | 445 | /* |
454 | * There is a small window in which user can write to 'loading' | 446 | * There is a small window in which user can write to 'loading' |
455 | * between loading done and disappearance of 'loading' | 447 | * between loading done and disappearance of 'loading' |
@@ -457,8 +449,16 @@ static void fw_load_abort(struct firmware_priv *fw_priv) | |||
457 | if (test_bit(FW_STATUS_DONE, &buf->status)) | 449 | if (test_bit(FW_STATUS_DONE, &buf->status)) |
458 | return; | 450 | return; |
459 | 451 | ||
452 | list_del_init(&buf->pending_list); | ||
460 | set_bit(FW_STATUS_ABORT, &buf->status); | 453 | set_bit(FW_STATUS_ABORT, &buf->status); |
461 | complete_all(&buf->completion); | 454 | complete_all(&buf->completion); |
455 | } | ||
456 | |||
457 | static void fw_load_abort(struct firmware_priv *fw_priv) | ||
458 | { | ||
459 | struct firmware_buf *buf = fw_priv->buf; | ||
460 | |||
461 | __fw_load_abort(buf); | ||
462 | 462 | ||
463 | /* avoid user action after loading abort */ | 463 | /* avoid user action after loading abort */ |
464 | fw_priv->buf = NULL; | 464 | fw_priv->buf = NULL; |
@@ -467,6 +467,25 @@ static void fw_load_abort(struct firmware_priv *fw_priv) | |||
467 | #define is_fw_load_aborted(buf) \ | 467 | #define is_fw_load_aborted(buf) \ |
468 | test_bit(FW_STATUS_ABORT, &(buf)->status) | 468 | test_bit(FW_STATUS_ABORT, &(buf)->status) |
469 | 469 | ||
470 | static LIST_HEAD(pending_fw_head); | ||
471 | |||
472 | /* reboot notifier for avoid deadlock with usermode_lock */ | ||
473 | static int fw_shutdown_notify(struct notifier_block *unused1, | ||
474 | unsigned long unused2, void *unused3) | ||
475 | { | ||
476 | mutex_lock(&fw_lock); | ||
477 | while (!list_empty(&pending_fw_head)) | ||
478 | __fw_load_abort(list_first_entry(&pending_fw_head, | ||
479 | struct firmware_buf, | ||
480 | pending_list)); | ||
481 | mutex_unlock(&fw_lock); | ||
482 | return NOTIFY_DONE; | ||
483 | } | ||
484 | |||
485 | static struct notifier_block fw_shutdown_nb = { | ||
486 | .notifier_call = fw_shutdown_notify, | ||
487 | }; | ||
488 | |||
470 | static ssize_t firmware_timeout_show(struct class *class, | 489 | static ssize_t firmware_timeout_show(struct class *class, |
471 | struct class_attribute *attr, | 490 | struct class_attribute *attr, |
472 | char *buf) | 491 | char *buf) |
@@ -509,8 +528,6 @@ static void fw_dev_release(struct device *dev) | |||
509 | struct firmware_priv *fw_priv = to_firmware_priv(dev); | 528 | struct firmware_priv *fw_priv = to_firmware_priv(dev); |
510 | 529 | ||
511 | kfree(fw_priv); | 530 | kfree(fw_priv); |
512 | |||
513 | module_put(THIS_MODULE); | ||
514 | } | 531 | } |
515 | 532 | ||
516 | static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env) | 533 | static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env) |
@@ -619,6 +636,7 @@ static ssize_t firmware_loading_store(struct device *dev, | |||
619 | * is completed. | 636 | * is completed. |
620 | * */ | 637 | * */ |
621 | fw_map_pages_buf(fw_buf); | 638 | fw_map_pages_buf(fw_buf); |
639 | list_del_init(&fw_buf->pending_list); | ||
622 | complete_all(&fw_buf->completion); | 640 | complete_all(&fw_buf->completion); |
623 | break; | 641 | break; |
624 | } | 642 | } |
@@ -838,9 +856,6 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent, | |||
838 | 856 | ||
839 | dev_set_uevent_suppress(f_dev, true); | 857 | dev_set_uevent_suppress(f_dev, true); |
840 | 858 | ||
841 | /* Need to pin this module until class device is destroyed */ | ||
842 | __module_get(THIS_MODULE); | ||
843 | |||
844 | retval = device_add(f_dev); | 859 | retval = device_add(f_dev); |
845 | if (retval) { | 860 | if (retval) { |
846 | dev_err(f_dev, "%s: device_register failed\n", __func__); | 861 | dev_err(f_dev, "%s: device_register failed\n", __func__); |
@@ -860,6 +875,7 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent, | |||
860 | } | 875 | } |
861 | 876 | ||
862 | if (uevent) { | 877 | if (uevent) { |
878 | buf->need_uevent = true; | ||
863 | dev_set_uevent_suppress(f_dev, false); | 879 | dev_set_uevent_suppress(f_dev, false); |
864 | dev_dbg(f_dev, "firmware: requesting %s\n", buf->fw_id); | 880 | dev_dbg(f_dev, "firmware: requesting %s\n", buf->fw_id); |
865 | if (timeout != MAX_SCHEDULE_TIMEOUT) | 881 | if (timeout != MAX_SCHEDULE_TIMEOUT) |
@@ -868,6 +884,10 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent, | |||
868 | kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD); | 884 | kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD); |
869 | } | 885 | } |
870 | 886 | ||
887 | mutex_lock(&fw_lock); | ||
888 | list_add(&buf->pending_list, &pending_fw_head); | ||
889 | mutex_unlock(&fw_lock); | ||
890 | |||
871 | wait_for_completion(&buf->completion); | 891 | wait_for_completion(&buf->completion); |
872 | 892 | ||
873 | cancel_delayed_work_sync(&fw_priv->timeout_work); | 893 | cancel_delayed_work_sync(&fw_priv->timeout_work); |
@@ -895,6 +915,23 @@ static int fw_load_from_user_helper(struct firmware *firmware, | |||
895 | fw_priv->buf = firmware->priv; | 915 | fw_priv->buf = firmware->priv; |
896 | return _request_firmware_load(fw_priv, uevent, timeout); | 916 | return _request_firmware_load(fw_priv, uevent, timeout); |
897 | } | 917 | } |
918 | |||
919 | #ifdef CONFIG_PM_SLEEP | ||
920 | /* kill pending requests without uevent to avoid blocking suspend */ | ||
921 | static void kill_requests_without_uevent(void) | ||
922 | { | ||
923 | struct firmware_buf *buf; | ||
924 | struct firmware_buf *next; | ||
925 | |||
926 | mutex_lock(&fw_lock); | ||
927 | list_for_each_entry_safe(buf, next, &pending_fw_head, pending_list) { | ||
928 | if (!buf->need_uevent) | ||
929 | __fw_load_abort(buf); | ||
930 | } | ||
931 | mutex_unlock(&fw_lock); | ||
932 | } | ||
933 | #endif | ||
934 | |||
898 | #else /* CONFIG_FW_LOADER_USER_HELPER */ | 935 | #else /* CONFIG_FW_LOADER_USER_HELPER */ |
899 | static inline int | 936 | static inline int |
900 | fw_load_from_user_helper(struct firmware *firmware, const char *name, | 937 | fw_load_from_user_helper(struct firmware *firmware, const char *name, |
@@ -907,6 +944,10 @@ fw_load_from_user_helper(struct firmware *firmware, const char *name, | |||
907 | /* No abort during direct loading */ | 944 | /* No abort during direct loading */ |
908 | #define is_fw_load_aborted(buf) false | 945 | #define is_fw_load_aborted(buf) false |
909 | 946 | ||
947 | #ifdef CONFIG_PM_SLEEP | ||
948 | static inline void kill_requests_without_uevent(void) { } | ||
949 | #endif | ||
950 | |||
910 | #endif /* CONFIG_FW_LOADER_USER_HELPER */ | 951 | #endif /* CONFIG_FW_LOADER_USER_HELPER */ |
911 | 952 | ||
912 | 953 | ||
@@ -974,7 +1015,8 @@ _request_firmware_prepare(struct firmware **firmware_p, const char *name, | |||
974 | return 1; /* need to load */ | 1015 | return 1; /* need to load */ |
975 | } | 1016 | } |
976 | 1017 | ||
977 | static int assign_firmware_buf(struct firmware *fw, struct device *device) | 1018 | static int assign_firmware_buf(struct firmware *fw, struct device *device, |
1019 | bool skip_cache) | ||
978 | { | 1020 | { |
979 | struct firmware_buf *buf = fw->priv; | 1021 | struct firmware_buf *buf = fw->priv; |
980 | 1022 | ||
@@ -991,7 +1033,7 @@ static int assign_firmware_buf(struct firmware *fw, struct device *device) | |||
991 | * device may has been deleted already, but the problem | 1033 | * device may has been deleted already, but the problem |
992 | * should be fixed in devres or driver core. | 1034 | * should be fixed in devres or driver core. |
993 | */ | 1035 | */ |
994 | if (device) | 1036 | if (device && !skip_cache) |
995 | fw_add_devm_name(device, buf->fw_id); | 1037 | fw_add_devm_name(device, buf->fw_id); |
996 | 1038 | ||
997 | /* | 1039 | /* |
@@ -1047,8 +1089,10 @@ _request_firmware(const struct firmware **firmware_p, const char *name, | |||
1047 | if (!fw_get_filesystem_firmware(device, fw->priv)) | 1089 | if (!fw_get_filesystem_firmware(device, fw->priv)) |
1048 | ret = fw_load_from_user_helper(fw, name, device, | 1090 | ret = fw_load_from_user_helper(fw, name, device, |
1049 | uevent, nowait, timeout); | 1091 | uevent, nowait, timeout); |
1092 | |||
1093 | /* don't cache firmware handled without uevent */ | ||
1050 | if (!ret) | 1094 | if (!ret) |
1051 | ret = assign_firmware_buf(fw, device); | 1095 | ret = assign_firmware_buf(fw, device, !uevent); |
1052 | 1096 | ||
1053 | usermodehelper_read_unlock(); | 1097 | usermodehelper_read_unlock(); |
1054 | 1098 | ||
@@ -1086,8 +1130,15 @@ int | |||
1086 | request_firmware(const struct firmware **firmware_p, const char *name, | 1130 | request_firmware(const struct firmware **firmware_p, const char *name, |
1087 | struct device *device) | 1131 | struct device *device) |
1088 | { | 1132 | { |
1089 | return _request_firmware(firmware_p, name, device, true, false); | 1133 | int ret; |
1134 | |||
1135 | /* Need to pin this module until return */ | ||
1136 | __module_get(THIS_MODULE); | ||
1137 | ret = _request_firmware(firmware_p, name, device, true, false); | ||
1138 | module_put(THIS_MODULE); | ||
1139 | return ret; | ||
1090 | } | 1140 | } |
1141 | EXPORT_SYMBOL(request_firmware); | ||
1091 | 1142 | ||
1092 | /** | 1143 | /** |
1093 | * release_firmware: - release the resource associated with a firmware image | 1144 | * release_firmware: - release the resource associated with a firmware image |
@@ -1101,6 +1152,7 @@ void release_firmware(const struct firmware *fw) | |||
1101 | kfree(fw); | 1152 | kfree(fw); |
1102 | } | 1153 | } |
1103 | } | 1154 | } |
1155 | EXPORT_SYMBOL(release_firmware); | ||
1104 | 1156 | ||
1105 | /* Async support */ | 1157 | /* Async support */ |
1106 | struct firmware_work { | 1158 | struct firmware_work { |
@@ -1181,6 +1233,10 @@ request_firmware_nowait( | |||
1181 | schedule_work(&fw_work->work); | 1233 | schedule_work(&fw_work->work); |
1182 | return 0; | 1234 | return 0; |
1183 | } | 1235 | } |
1236 | EXPORT_SYMBOL(request_firmware_nowait); | ||
1237 | |||
1238 | #ifdef CONFIG_PM_SLEEP | ||
1239 | static ASYNC_DOMAIN_EXCLUSIVE(fw_cache_domain); | ||
1184 | 1240 | ||
1185 | /** | 1241 | /** |
1186 | * cache_firmware - cache one firmware image in kernel memory space | 1242 | * cache_firmware - cache one firmware image in kernel memory space |
@@ -1196,7 +1252,7 @@ request_firmware_nowait( | |||
1196 | * Return !0 otherwise | 1252 | * Return !0 otherwise |
1197 | * | 1253 | * |
1198 | */ | 1254 | */ |
1199 | int cache_firmware(const char *fw_name) | 1255 | static int cache_firmware(const char *fw_name) |
1200 | { | 1256 | { |
1201 | int ret; | 1257 | int ret; |
1202 | const struct firmware *fw; | 1258 | const struct firmware *fw; |
@@ -1212,6 +1268,18 @@ int cache_firmware(const char *fw_name) | |||
1212 | return ret; | 1268 | return ret; |
1213 | } | 1269 | } |
1214 | 1270 | ||
1271 | static struct firmware_buf *fw_lookup_buf(const char *fw_name) | ||
1272 | { | ||
1273 | struct firmware_buf *tmp; | ||
1274 | struct firmware_cache *fwc = &fw_cache; | ||
1275 | |||
1276 | spin_lock(&fwc->lock); | ||
1277 | tmp = __fw_lookup_buf(fw_name); | ||
1278 | spin_unlock(&fwc->lock); | ||
1279 | |||
1280 | return tmp; | ||
1281 | } | ||
1282 | |||
1215 | /** | 1283 | /** |
1216 | * uncache_firmware - remove one cached firmware image | 1284 | * uncache_firmware - remove one cached firmware image |
1217 | * @fw_name: the firmware image name | 1285 | * @fw_name: the firmware image name |
@@ -1223,7 +1291,7 @@ int cache_firmware(const char *fw_name) | |||
1223 | * Return !0 otherwise | 1291 | * Return !0 otherwise |
1224 | * | 1292 | * |
1225 | */ | 1293 | */ |
1226 | int uncache_firmware(const char *fw_name) | 1294 | static int uncache_firmware(const char *fw_name) |
1227 | { | 1295 | { |
1228 | struct firmware_buf *buf; | 1296 | struct firmware_buf *buf; |
1229 | struct firmware fw; | 1297 | struct firmware fw; |
@@ -1242,9 +1310,6 @@ int uncache_firmware(const char *fw_name) | |||
1242 | return -EINVAL; | 1310 | return -EINVAL; |
1243 | } | 1311 | } |
1244 | 1312 | ||
1245 | #ifdef CONFIG_PM_SLEEP | ||
1246 | static ASYNC_DOMAIN_EXCLUSIVE(fw_cache_domain); | ||
1247 | |||
1248 | static struct fw_cache_entry *alloc_fw_cache_entry(const char *name) | 1313 | static struct fw_cache_entry *alloc_fw_cache_entry(const char *name) |
1249 | { | 1314 | { |
1250 | struct fw_cache_entry *fce; | 1315 | struct fw_cache_entry *fce; |
@@ -1464,6 +1529,7 @@ static int fw_pm_notify(struct notifier_block *notify_block, | |||
1464 | switch (mode) { | 1529 | switch (mode) { |
1465 | case PM_HIBERNATION_PREPARE: | 1530 | case PM_HIBERNATION_PREPARE: |
1466 | case PM_SUSPEND_PREPARE: | 1531 | case PM_SUSPEND_PREPARE: |
1532 | kill_requests_without_uevent(); | ||
1467 | device_cache_fw_images(); | 1533 | device_cache_fw_images(); |
1468 | break; | 1534 | break; |
1469 | 1535 | ||
@@ -1526,6 +1592,7 @@ static int __init firmware_class_init(void) | |||
1526 | { | 1592 | { |
1527 | fw_cache_init(); | 1593 | fw_cache_init(); |
1528 | #ifdef CONFIG_FW_LOADER_USER_HELPER | 1594 | #ifdef CONFIG_FW_LOADER_USER_HELPER |
1595 | register_reboot_notifier(&fw_shutdown_nb); | ||
1529 | return class_register(&firmware_class); | 1596 | return class_register(&firmware_class); |
1530 | #else | 1597 | #else |
1531 | return 0; | 1598 | return 0; |
@@ -1539,15 +1606,10 @@ static void __exit firmware_class_exit(void) | |||
1539 | unregister_pm_notifier(&fw_cache.pm_notify); | 1606 | unregister_pm_notifier(&fw_cache.pm_notify); |
1540 | #endif | 1607 | #endif |
1541 | #ifdef CONFIG_FW_LOADER_USER_HELPER | 1608 | #ifdef CONFIG_FW_LOADER_USER_HELPER |
1609 | unregister_reboot_notifier(&fw_shutdown_nb); | ||
1542 | class_unregister(&firmware_class); | 1610 | class_unregister(&firmware_class); |
1543 | #endif | 1611 | #endif |
1544 | } | 1612 | } |
1545 | 1613 | ||
1546 | fs_initcall(firmware_class_init); | 1614 | fs_initcall(firmware_class_init); |
1547 | module_exit(firmware_class_exit); | 1615 | module_exit(firmware_class_exit); |
1548 | |||
1549 | EXPORT_SYMBOL(release_firmware); | ||
1550 | EXPORT_SYMBOL(request_firmware); | ||
1551 | EXPORT_SYMBOL(request_firmware_nowait); | ||
1552 | EXPORT_SYMBOL_GPL(cache_firmware); | ||
1553 | EXPORT_SYMBOL_GPL(uncache_firmware); | ||
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 14f8a6954da0..e315051cfeeb 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -77,22 +77,6 @@ static void memory_block_release(struct device *dev) | |||
77 | kfree(mem); | 77 | kfree(mem); |
78 | } | 78 | } |
79 | 79 | ||
80 | /* | ||
81 | * register_memory - Setup a sysfs device for a memory block | ||
82 | */ | ||
83 | static | ||
84 | int register_memory(struct memory_block *memory) | ||
85 | { | ||
86 | int error; | ||
87 | |||
88 | memory->dev.bus = &memory_subsys; | ||
89 | memory->dev.id = memory->start_section_nr / sections_per_block; | ||
90 | memory->dev.release = memory_block_release; | ||
91 | |||
92 | error = device_register(&memory->dev); | ||
93 | return error; | ||
94 | } | ||
95 | |||
96 | unsigned long __weak memory_block_size_bytes(void) | 80 | unsigned long __weak memory_block_size_bytes(void) |
97 | { | 81 | { |
98 | return MIN_MEMORY_BLOCK_SIZE; | 82 | return MIN_MEMORY_BLOCK_SIZE; |
@@ -371,11 +355,6 @@ static DEVICE_ATTR(state, 0644, show_mem_state, store_mem_state); | |||
371 | static DEVICE_ATTR(phys_device, 0444, show_phys_device, NULL); | 355 | static DEVICE_ATTR(phys_device, 0444, show_phys_device, NULL); |
372 | static DEVICE_ATTR(removable, 0444, show_mem_removable, NULL); | 356 | static DEVICE_ATTR(removable, 0444, show_mem_removable, NULL); |
373 | 357 | ||
374 | #define mem_create_simple_file(mem, attr_name) \ | ||
375 | device_create_file(&mem->dev, &dev_attr_##attr_name) | ||
376 | #define mem_remove_simple_file(mem, attr_name) \ | ||
377 | device_remove_file(&mem->dev, &dev_attr_##attr_name) | ||
378 | |||
379 | /* | 358 | /* |
380 | * Block size attribute stuff | 359 | * Block size attribute stuff |
381 | */ | 360 | */ |
@@ -388,12 +367,6 @@ print_block_size(struct device *dev, struct device_attribute *attr, | |||
388 | 367 | ||
389 | static DEVICE_ATTR(block_size_bytes, 0444, print_block_size, NULL); | 368 | static DEVICE_ATTR(block_size_bytes, 0444, print_block_size, NULL); |
390 | 369 | ||
391 | static int block_size_init(void) | ||
392 | { | ||
393 | return device_create_file(memory_subsys.dev_root, | ||
394 | &dev_attr_block_size_bytes); | ||
395 | } | ||
396 | |||
397 | /* | 370 | /* |
398 | * Some architectures will have custom drivers to do this, and | 371 | * Some architectures will have custom drivers to do this, and |
399 | * will not need to do it from userspace. The fake hot-add code | 372 | * will not need to do it from userspace. The fake hot-add code |
@@ -429,17 +402,8 @@ memory_probe_store(struct device *dev, struct device_attribute *attr, | |||
429 | out: | 402 | out: |
430 | return ret; | 403 | return ret; |
431 | } | 404 | } |
432 | static DEVICE_ATTR(probe, S_IWUSR, NULL, memory_probe_store); | ||
433 | 405 | ||
434 | static int memory_probe_init(void) | 406 | static DEVICE_ATTR(probe, S_IWUSR, NULL, memory_probe_store); |
435 | { | ||
436 | return device_create_file(memory_subsys.dev_root, &dev_attr_probe); | ||
437 | } | ||
438 | #else | ||
439 | static inline int memory_probe_init(void) | ||
440 | { | ||
441 | return 0; | ||
442 | } | ||
443 | #endif | 407 | #endif |
444 | 408 | ||
445 | #ifdef CONFIG_MEMORY_FAILURE | 409 | #ifdef CONFIG_MEMORY_FAILURE |
@@ -485,23 +449,6 @@ store_hard_offline_page(struct device *dev, | |||
485 | 449 | ||
486 | static DEVICE_ATTR(soft_offline_page, S_IWUSR, NULL, store_soft_offline_page); | 450 | static DEVICE_ATTR(soft_offline_page, S_IWUSR, NULL, store_soft_offline_page); |
487 | static DEVICE_ATTR(hard_offline_page, S_IWUSR, NULL, store_hard_offline_page); | 451 | static DEVICE_ATTR(hard_offline_page, S_IWUSR, NULL, store_hard_offline_page); |
488 | |||
489 | static __init int memory_fail_init(void) | ||
490 | { | ||
491 | int err; | ||
492 | |||
493 | err = device_create_file(memory_subsys.dev_root, | ||
494 | &dev_attr_soft_offline_page); | ||
495 | if (!err) | ||
496 | err = device_create_file(memory_subsys.dev_root, | ||
497 | &dev_attr_hard_offline_page); | ||
498 | return err; | ||
499 | } | ||
500 | #else | ||
501 | static inline int memory_fail_init(void) | ||
502 | { | ||
503 | return 0; | ||
504 | } | ||
505 | #endif | 452 | #endif |
506 | 453 | ||
507 | /* | 454 | /* |
@@ -546,6 +493,41 @@ struct memory_block *find_memory_block(struct mem_section *section) | |||
546 | return find_memory_block_hinted(section, NULL); | 493 | return find_memory_block_hinted(section, NULL); |
547 | } | 494 | } |
548 | 495 | ||
496 | static struct attribute *memory_memblk_attrs[] = { | ||
497 | &dev_attr_phys_index.attr, | ||
498 | &dev_attr_end_phys_index.attr, | ||
499 | &dev_attr_state.attr, | ||
500 | &dev_attr_phys_device.attr, | ||
501 | &dev_attr_removable.attr, | ||
502 | NULL | ||
503 | }; | ||
504 | |||
505 | static struct attribute_group memory_memblk_attr_group = { | ||
506 | .attrs = memory_memblk_attrs, | ||
507 | }; | ||
508 | |||
509 | static const struct attribute_group *memory_memblk_attr_groups[] = { | ||
510 | &memory_memblk_attr_group, | ||
511 | NULL, | ||
512 | }; | ||
513 | |||
514 | /* | ||
515 | * register_memory - Setup a sysfs device for a memory block | ||
516 | */ | ||
517 | static | ||
518 | int register_memory(struct memory_block *memory) | ||
519 | { | ||
520 | int error; | ||
521 | |||
522 | memory->dev.bus = &memory_subsys; | ||
523 | memory->dev.id = memory->start_section_nr / sections_per_block; | ||
524 | memory->dev.release = memory_block_release; | ||
525 | memory->dev.groups = memory_memblk_attr_groups; | ||
526 | |||
527 | error = device_register(&memory->dev); | ||
528 | return error; | ||
529 | } | ||
530 | |||
549 | static int init_memory_block(struct memory_block **memory, | 531 | static int init_memory_block(struct memory_block **memory, |
550 | struct mem_section *section, unsigned long state) | 532 | struct mem_section *section, unsigned long state) |
551 | { | 533 | { |
@@ -569,16 +551,6 @@ static int init_memory_block(struct memory_block **memory, | |||
569 | mem->phys_device = arch_get_memory_phys_device(start_pfn); | 551 | mem->phys_device = arch_get_memory_phys_device(start_pfn); |
570 | 552 | ||
571 | ret = register_memory(mem); | 553 | ret = register_memory(mem); |
572 | if (!ret) | ||
573 | ret = mem_create_simple_file(mem, phys_index); | ||
574 | if (!ret) | ||
575 | ret = mem_create_simple_file(mem, end_phys_index); | ||
576 | if (!ret) | ||
577 | ret = mem_create_simple_file(mem, state); | ||
578 | if (!ret) | ||
579 | ret = mem_create_simple_file(mem, phys_device); | ||
580 | if (!ret) | ||
581 | ret = mem_create_simple_file(mem, removable); | ||
582 | 554 | ||
583 | *memory = mem; | 555 | *memory = mem; |
584 | return ret; | 556 | return ret; |
@@ -656,14 +628,9 @@ static int remove_memory_block(unsigned long node_id, | |||
656 | unregister_mem_sect_under_nodes(mem, __section_nr(section)); | 628 | unregister_mem_sect_under_nodes(mem, __section_nr(section)); |
657 | 629 | ||
658 | mem->section_count--; | 630 | mem->section_count--; |
659 | if (mem->section_count == 0) { | 631 | if (mem->section_count == 0) |
660 | mem_remove_simple_file(mem, phys_index); | ||
661 | mem_remove_simple_file(mem, end_phys_index); | ||
662 | mem_remove_simple_file(mem, state); | ||
663 | mem_remove_simple_file(mem, phys_device); | ||
664 | mem_remove_simple_file(mem, removable); | ||
665 | unregister_memory(mem); | 632 | unregister_memory(mem); |
666 | } else | 633 | else |
667 | kobject_put(&mem->dev.kobj); | 634 | kobject_put(&mem->dev.kobj); |
668 | 635 | ||
669 | mutex_unlock(&mem_sysfs_mutex); | 636 | mutex_unlock(&mem_sysfs_mutex); |
@@ -700,6 +667,29 @@ bool is_memblock_offlined(struct memory_block *mem) | |||
700 | return mem->state == MEM_OFFLINE; | 667 | return mem->state == MEM_OFFLINE; |
701 | } | 668 | } |
702 | 669 | ||
670 | static struct attribute *memory_root_attrs[] = { | ||
671 | #ifdef CONFIG_ARCH_MEMORY_PROBE | ||
672 | &dev_attr_probe.attr, | ||
673 | #endif | ||
674 | |||
675 | #ifdef CONFIG_MEMORY_FAILURE | ||
676 | &dev_attr_soft_offline_page.attr, | ||
677 | &dev_attr_hard_offline_page.attr, | ||
678 | #endif | ||
679 | |||
680 | &dev_attr_block_size_bytes.attr, | ||
681 | NULL | ||
682 | }; | ||
683 | |||
684 | static struct attribute_group memory_root_attr_group = { | ||
685 | .attrs = memory_root_attrs, | ||
686 | }; | ||
687 | |||
688 | static const struct attribute_group *memory_root_attr_groups[] = { | ||
689 | &memory_root_attr_group, | ||
690 | NULL, | ||
691 | }; | ||
692 | |||
703 | /* | 693 | /* |
704 | * Initialize the sysfs support for memory devices... | 694 | * Initialize the sysfs support for memory devices... |
705 | */ | 695 | */ |
@@ -711,7 +701,7 @@ int __init memory_dev_init(void) | |||
711 | unsigned long block_sz; | 701 | unsigned long block_sz; |
712 | struct memory_block *mem = NULL; | 702 | struct memory_block *mem = NULL; |
713 | 703 | ||
714 | ret = subsys_system_register(&memory_subsys, NULL); | 704 | ret = subsys_system_register(&memory_subsys, memory_root_attr_groups); |
715 | if (ret) | 705 | if (ret) |
716 | goto out; | 706 | goto out; |
717 | 707 | ||
@@ -734,15 +724,6 @@ int __init memory_dev_init(void) | |||
734 | ret = err; | 724 | ret = err; |
735 | } | 725 | } |
736 | 726 | ||
737 | err = memory_probe_init(); | ||
738 | if (!ret) | ||
739 | ret = err; | ||
740 | err = memory_fail_init(); | ||
741 | if (!ret) | ||
742 | ret = err; | ||
743 | err = block_size_init(); | ||
744 | if (!ret) | ||
745 | ret = err; | ||
746 | out: | 727 | out: |
747 | if (ret) | 728 | if (ret) |
748 | printk(KERN_ERR "%s() failed: %d\n", __func__, ret); | 729 | printk(KERN_ERR "%s() failed: %d\n", __func__, ret); |
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 9eda84246ffd..ed75cf6ef9c9 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -523,11 +523,13 @@ static void platform_drv_shutdown(struct device *_dev) | |||
523 | } | 523 | } |
524 | 524 | ||
525 | /** | 525 | /** |
526 | * platform_driver_register - register a driver for platform-level devices | 526 | * __platform_driver_register - register a driver for platform-level devices |
527 | * @drv: platform driver structure | 527 | * @drv: platform driver structure |
528 | */ | 528 | */ |
529 | int platform_driver_register(struct platform_driver *drv) | 529 | int __platform_driver_register(struct platform_driver *drv, |
530 | struct module *owner) | ||
530 | { | 531 | { |
532 | drv->driver.owner = owner; | ||
531 | drv->driver.bus = &platform_bus_type; | 533 | drv->driver.bus = &platform_bus_type; |
532 | if (drv->probe) | 534 | if (drv->probe) |
533 | drv->driver.probe = platform_drv_probe; | 535 | drv->driver.probe = platform_drv_probe; |
@@ -538,7 +540,7 @@ int platform_driver_register(struct platform_driver *drv) | |||
538 | 540 | ||
539 | return driver_register(&drv->driver); | 541 | return driver_register(&drv->driver); |
540 | } | 542 | } |
541 | EXPORT_SYMBOL_GPL(platform_driver_register); | 543 | EXPORT_SYMBOL_GPL(__platform_driver_register); |
542 | 544 | ||
543 | /** | 545 | /** |
544 | * platform_driver_unregister - unregister a driver for platform-level devices | 546 | * platform_driver_unregister - unregister a driver for platform-level devices |
diff --git a/drivers/char/pcmcia/Kconfig b/drivers/char/pcmcia/Kconfig index 2a166d56738a..b27f5342fe76 100644 --- a/drivers/char/pcmcia/Kconfig +++ b/drivers/char/pcmcia/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | menu "PCMCIA character devices" | 5 | menu "PCMCIA character devices" |
6 | depends on HOTPLUG && PCMCIA!=n | 6 | depends on PCMCIA!=n |
7 | 7 | ||
8 | config SYNCLINK_CS | 8 | config SYNCLINK_CS |
9 | tristate "SyncLink PC Card support" | 9 | tristate "SyncLink PC Card support" |
diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig index e443f2c1dfd1..a697a64d5383 100644 --- a/drivers/edac/Kconfig +++ b/drivers/edac/Kconfig | |||
@@ -145,7 +145,7 @@ config EDAC_E7XXX | |||
145 | 145 | ||
146 | config EDAC_E752X | 146 | config EDAC_E752X |
147 | tristate "Intel e752x (e7520, e7525, e7320) and 3100" | 147 | tristate "Intel e752x (e7520, e7525, e7320) and 3100" |
148 | depends on EDAC_MM_EDAC && PCI && X86 && HOTPLUG | 148 | depends on EDAC_MM_EDAC && PCI && X86 |
149 | help | 149 | help |
150 | Support for error detection and correction on the Intel | 150 | Support for error detection and correction on the Intel |
151 | E7520, E7525, E7320 server chipsets. | 151 | E7520, E7525, E7320 server chipsets. |
diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig index 93876302fb2e..074787281c94 100644 --- a/drivers/firmware/Kconfig +++ b/drivers/firmware/Kconfig | |||
@@ -64,6 +64,7 @@ config DELL_RBU | |||
64 | tristate "BIOS update support for DELL systems via sysfs" | 64 | tristate "BIOS update support for DELL systems via sysfs" |
65 | depends on X86 | 65 | depends on X86 |
66 | select FW_LOADER | 66 | select FW_LOADER |
67 | select FW_LOADER_USER_HELPER | ||
67 | help | 68 | help |
68 | Say m if you want to have the option of updating the BIOS for your | 69 | Say m if you want to have the option of updating the BIOS for your |
69 | DELL system. Note you need a Dell OpenManage or Dell Update package (DUP) | 70 | DELL system. Note you need a Dell OpenManage or Dell Update package (DUP) |
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 80889d5f95f5..8dacd4c9ee87 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -135,7 +135,7 @@ config PHANTOM | |||
135 | 135 | ||
136 | config INTEL_MID_PTI | 136 | config INTEL_MID_PTI |
137 | tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" | 137 | tristate "Parallel Trace Interface for MIPI P1149.7 cJTAG standard" |
138 | depends on PCI && TTY | 138 | depends on PCI && TTY && (X86_INTEL_MID || COMPILE_TEST) |
139 | default n | 139 | default n |
140 | help | 140 | help |
141 | The PTI (Parallel Trace Interface) driver directs | 141 | The PTI (Parallel Trace Interface) driver directs |
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 6d51aa68ec7a..77497f140d68 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig | |||
@@ -55,7 +55,6 @@ config PCI_STUB | |||
55 | config XEN_PCIDEV_FRONTEND | 55 | config XEN_PCIDEV_FRONTEND |
56 | tristate "Xen PCI Frontend" | 56 | tristate "Xen PCI Frontend" |
57 | depends on PCI && X86 && XEN | 57 | depends on PCI && X86 && XEN |
58 | select HOTPLUG | ||
59 | select PCI_XEN | 58 | select PCI_XEN |
60 | select XEN_XENBUS_FRONTEND | 59 | select XEN_XENBUS_FRONTEND |
61 | default y | 60 | default y |
@@ -113,7 +112,6 @@ config PCI_IOAPIC | |||
113 | tristate "PCI IO-APIC hotplug support" if X86 | 112 | tristate "PCI IO-APIC hotplug support" if X86 |
114 | depends on PCI | 113 | depends on PCI |
115 | depends on ACPI | 114 | depends on ACPI |
116 | depends on HOTPLUG | ||
117 | default !X86 | 115 | default !X86 |
118 | 116 | ||
119 | config PCI_LABEL | 117 | config PCI_LABEL |
diff --git a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig index 9fcb87f353d4..bb7ebb22db01 100644 --- a/drivers/pci/hotplug/Kconfig +++ b/drivers/pci/hotplug/Kconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | menuconfig HOTPLUG_PCI | 5 | menuconfig HOTPLUG_PCI |
6 | tristate "Support for PCI Hotplug" | 6 | tristate "Support for PCI Hotplug" |
7 | depends on PCI && HOTPLUG && SYSFS | 7 | depends on PCI && SYSFS |
8 | ---help--- | 8 | ---help--- |
9 | Say Y here if you have a motherboard with a PCI Hotplug controller. | 9 | Say Y here if you have a motherboard with a PCI Hotplug controller. |
10 | This allows you to add and remove PCI cards while the machine is | 10 | This allows you to add and remove PCI cards while the machine is |
diff --git a/drivers/pcmcia/Kconfig b/drivers/pcmcia/Kconfig index 6f6193168281..0c657d6af03d 100644 --- a/drivers/pcmcia/Kconfig +++ b/drivers/pcmcia/Kconfig | |||
@@ -4,7 +4,6 @@ | |||
4 | 4 | ||
5 | menuconfig PCCARD | 5 | menuconfig PCCARD |
6 | tristate "PCCard (PCMCIA/CardBus) support" | 6 | tristate "PCCard (PCMCIA/CardBus) support" |
7 | depends on HOTPLUG | ||
8 | ---help--- | 7 | ---help--- |
9 | Say Y here if you want to attach PCMCIA- or PC-cards to your Linux | 8 | Say Y here if you want to attach PCMCIA- or PC-cards to your Linux |
10 | computer. These are credit-card size devices such as network cards, | 9 | computer. These are credit-card size devices such as network cards, |
diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig index 1ea6f1dbbedd..5be73ba0519a 100644 --- a/drivers/ptp/Kconfig +++ b/drivers/ptp/Kconfig | |||
@@ -72,6 +72,7 @@ config DP83640_PHY | |||
72 | 72 | ||
73 | config PTP_1588_CLOCK_PCH | 73 | config PTP_1588_CLOCK_PCH |
74 | tristate "Intel PCH EG20T as PTP clock" | 74 | tristate "Intel PCH EG20T as PTP clock" |
75 | depends on X86 || COMPILE_TEST | ||
75 | select PTP_1588_CLOCK | 76 | select PTP_1588_CLOCK |
76 | help | 77 | help |
77 | This driver adds support for using the PCH EG20T as a PTP | 78 | This driver adds support for using the PCH EG20T as a PTP |
diff --git a/drivers/staging/media/go7007/go7007.txt b/drivers/staging/media/go7007/go7007.txt index fcb3e235abbf..dc0026cff9f6 100644 --- a/drivers/staging/media/go7007/go7007.txt +++ b/drivers/staging/media/go7007/go7007.txt | |||
@@ -78,7 +78,6 @@ All vendor-built kernels should already be configured properly. However, | |||
78 | for custom-built kernels, the following options need to be enabled in the | 78 | for custom-built kernels, the following options need to be enabled in the |
79 | kernel as built-in or modules: | 79 | kernel as built-in or modules: |
80 | 80 | ||
81 | CONFIG_HOTPLUG - Support for hot-pluggable devices | ||
82 | CONFIG_MODULES - Enable loadable module support | 81 | CONFIG_MODULES - Enable loadable module support |
83 | CONFIG_KMOD - Automatic kernel module loading | 82 | CONFIG_KMOD - Automatic kernel module loading |
84 | CONFIG_FW_LOADER - Hotplug firmware loading support | 83 | CONFIG_FW_LOADER - Hotplug firmware loading support |
diff --git a/drivers/video/geode/Kconfig b/drivers/video/geode/Kconfig index 21e351a14593..1e8555284786 100644 --- a/drivers/video/geode/Kconfig +++ b/drivers/video/geode/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # | 3 | # |
4 | config FB_GEODE | 4 | config FB_GEODE |
5 | bool "AMD Geode family framebuffer support" | 5 | bool "AMD Geode family framebuffer support" |
6 | depends on FB && PCI && X86 | 6 | depends on FB && PCI && (X86_32 || (X86 && COMPILE_TEST)) |
7 | ---help--- | 7 | ---help--- |
8 | Say 'Y' here to allow you to select framebuffer drivers for | 8 | Say 'Y' here to allow you to select framebuffer drivers for |
9 | the AMD Geode family of processors. | 9 | the AMD Geode family of processors. |
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index c5ca6ae5a30c..63146295153b 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/debugfs.h> | 21 | #include <linux/debugfs.h> |
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/slab.h> | 23 | #include <linux/slab.h> |
24 | #include <linux/atomic.h> | ||
24 | 25 | ||
25 | static ssize_t default_read_file(struct file *file, char __user *buf, | 26 | static ssize_t default_read_file(struct file *file, char __user *buf, |
26 | size_t count, loff_t *ppos) | 27 | size_t count, loff_t *ppos) |
@@ -403,6 +404,47 @@ struct dentry *debugfs_create_size_t(const char *name, umode_t mode, | |||
403 | } | 404 | } |
404 | EXPORT_SYMBOL_GPL(debugfs_create_size_t); | 405 | EXPORT_SYMBOL_GPL(debugfs_create_size_t); |
405 | 406 | ||
407 | static int debugfs_atomic_t_set(void *data, u64 val) | ||
408 | { | ||
409 | atomic_set((atomic_t *)data, val); | ||
410 | return 0; | ||
411 | } | ||
412 | static int debugfs_atomic_t_get(void *data, u64 *val) | ||
413 | { | ||
414 | *val = atomic_read((atomic_t *)data); | ||
415 | return 0; | ||
416 | } | ||
417 | DEFINE_SIMPLE_ATTRIBUTE(fops_atomic_t, debugfs_atomic_t_get, | ||
418 | debugfs_atomic_t_set, "%lld\n"); | ||
419 | DEFINE_SIMPLE_ATTRIBUTE(fops_atomic_t_ro, debugfs_atomic_t_get, NULL, "%lld\n"); | ||
420 | DEFINE_SIMPLE_ATTRIBUTE(fops_atomic_t_wo, NULL, debugfs_atomic_t_set, "%lld\n"); | ||
421 | |||
422 | /** | ||
423 | * debugfs_create_atomic_t - create a debugfs file that is used to read and | ||
424 | * write an atomic_t value | ||
425 | * @name: a pointer to a string containing the name of the file to create. | ||
426 | * @mode: the permission that the file should have | ||
427 | * @parent: a pointer to the parent dentry for this file. This should be a | ||
428 | * directory dentry if set. If this parameter is %NULL, then the | ||
429 | * file will be created in the root of the debugfs filesystem. | ||
430 | * @value: a pointer to the variable that the file should read to and write | ||
431 | * from. | ||
432 | */ | ||
433 | struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, | ||
434 | struct dentry *parent, atomic_t *value) | ||
435 | { | ||
436 | /* if there are no write bits set, make read only */ | ||
437 | if (!(mode & S_IWUGO)) | ||
438 | return debugfs_create_file(name, mode, parent, value, | ||
439 | &fops_atomic_t_ro); | ||
440 | /* if there are no read bits set, make write only */ | ||
441 | if (!(mode & S_IRUGO)) | ||
442 | return debugfs_create_file(name, mode, parent, value, | ||
443 | &fops_atomic_t_wo); | ||
444 | |||
445 | return debugfs_create_file(name, mode, parent, value, &fops_atomic_t); | ||
446 | } | ||
447 | EXPORT_SYMBOL_GPL(debugfs_create_atomic_t); | ||
406 | 448 | ||
407 | static ssize_t read_file_bool(struct file *file, char __user *user_buf, | 449 | static ssize_t read_file_bool(struct file *file, char __user *user_buf, |
408 | size_t count, loff_t *ppos) | 450 | size_t count, loff_t *ppos) |
@@ -431,6 +473,7 @@ static ssize_t write_file_bool(struct file *file, const char __user *user_buf, | |||
431 | if (copy_from_user(buf, user_buf, buf_size)) | 473 | if (copy_from_user(buf, user_buf, buf_size)) |
432 | return -EFAULT; | 474 | return -EFAULT; |
433 | 475 | ||
476 | buf[buf_size] = '\0'; | ||
434 | if (strtobool(buf, &bv) == 0) | 477 | if (strtobool(buf, &bv) == 0) |
435 | *val = bv; | 478 | *val = bv; |
436 | 479 | ||
diff --git a/fs/gfs2/Kconfig b/fs/gfs2/Kconfig index 5a376ab81feb..90c6a8faaecb 100644 --- a/fs/gfs2/Kconfig +++ b/fs/gfs2/Kconfig | |||
@@ -20,13 +20,12 @@ config GFS2_FS | |||
20 | be found here: http://sources.redhat.com/cluster | 20 | be found here: http://sources.redhat.com/cluster |
21 | 21 | ||
22 | The "nolock" lock module is now built in to GFS2 by default. If | 22 | The "nolock" lock module is now built in to GFS2 by default. If |
23 | you want to use the DLM, be sure to enable HOTPLUG and IPv4/6 | 23 | you want to use the DLM, be sure to enable IPv4/6 networking. |
24 | networking. | ||
25 | 24 | ||
26 | config GFS2_FS_LOCKING_DLM | 25 | config GFS2_FS_LOCKING_DLM |
27 | bool "GFS2 DLM locking" | 26 | bool "GFS2 DLM locking" |
28 | depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && \ | 27 | depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && \ |
29 | HOTPLUG && CONFIGFS_FS && SYSFS && (DLM=y || DLM=GFS2_FS) | 28 | CONFIGFS_FS && SYSFS && (DLM=y || DLM=GFS2_FS) |
30 | help | 29 | help |
31 | Multiple node locking module for GFS2 | 30 | Multiple node locking module for GFS2 |
32 | 31 | ||
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c index 4cfd742d260d..e068e744dbdd 100644 --- a/fs/sysfs/dir.c +++ b/fs/sysfs/dir.c | |||
@@ -74,7 +74,7 @@ static int sysfs_sd_compare(const struct sysfs_dirent *left, | |||
74 | } | 74 | } |
75 | 75 | ||
76 | /** | 76 | /** |
77 | * sysfs_link_subling - link sysfs_dirent into sibling rbtree | 77 | * sysfs_link_sibling - link sysfs_dirent into sibling rbtree |
78 | * @sd: sysfs_dirent of interest | 78 | * @sd: sysfs_dirent of interest |
79 | * | 79 | * |
80 | * Link @sd into its sibling rbtree which starts from | 80 | * Link @sd into its sibling rbtree which starts from |
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 602f56db0442..d2bb7ed8fa74 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c | |||
@@ -449,10 +449,12 @@ void sysfs_notify_dirent(struct sysfs_dirent *sd) | |||
449 | 449 | ||
450 | spin_lock_irqsave(&sysfs_open_dirent_lock, flags); | 450 | spin_lock_irqsave(&sysfs_open_dirent_lock, flags); |
451 | 451 | ||
452 | od = sd->s_attr.open; | 452 | if (!WARN_ON(sysfs_type(sd) != SYSFS_KOBJ_ATTR)) { |
453 | if (od) { | 453 | od = sd->s_attr.open; |
454 | atomic_inc(&od->event); | 454 | if (od) { |
455 | wake_up_interruptible(&od->poll); | 455 | atomic_inc(&od->event); |
456 | wake_up_interruptible(&od->poll); | ||
457 | } | ||
456 | } | 458 | } |
457 | 459 | ||
458 | spin_unlock_irqrestore(&sysfs_open_dirent_lock, flags); | 460 | spin_unlock_irqrestore(&sysfs_open_dirent_lock, flags); |
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index 0ce3ccf7f401..3e2837a633ed 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include <linux/security.h> | 24 | #include <linux/security.h> |
25 | #include "sysfs.h" | 25 | #include "sysfs.h" |
26 | 26 | ||
27 | extern struct super_block * sysfs_sb; | ||
28 | |||
29 | static const struct address_space_operations sysfs_aops = { | 27 | static const struct address_space_operations sysfs_aops = { |
30 | .readpage = simple_readpage, | 28 | .readpage = simple_readpage, |
31 | .write_begin = simple_write_begin, | 29 | .write_begin = simple_write_begin, |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index eb58d2d7d971..4f2737208c42 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -68,14 +68,6 @@ | |||
68 | * are handled as text/data or they can be discarded (which | 68 | * are handled as text/data or they can be discarded (which |
69 | * often happens at runtime) | 69 | * often happens at runtime) |
70 | */ | 70 | */ |
71 | #ifdef CONFIG_HOTPLUG | ||
72 | #define DEV_KEEP(sec) *(.dev##sec) | ||
73 | #define DEV_DISCARD(sec) | ||
74 | #else | ||
75 | #define DEV_KEEP(sec) | ||
76 | #define DEV_DISCARD(sec) *(.dev##sec) | ||
77 | #endif | ||
78 | |||
79 | #ifdef CONFIG_HOTPLUG_CPU | 71 | #ifdef CONFIG_HOTPLUG_CPU |
80 | #define CPU_KEEP(sec) *(.cpu##sec) | 72 | #define CPU_KEEP(sec) *(.cpu##sec) |
81 | #define CPU_DISCARD(sec) | 73 | #define CPU_DISCARD(sec) |
@@ -182,8 +174,6 @@ | |||
182 | *(.data) \ | 174 | *(.data) \ |
183 | *(.ref.data) \ | 175 | *(.ref.data) \ |
184 | *(.data..shared_aligned) /* percpu related */ \ | 176 | *(.data..shared_aligned) /* percpu related */ \ |
185 | DEV_KEEP(init.data) \ | ||
186 | DEV_KEEP(exit.data) \ | ||
187 | CPU_KEEP(init.data) \ | 177 | CPU_KEEP(init.data) \ |
188 | CPU_KEEP(exit.data) \ | 178 | CPU_KEEP(exit.data) \ |
189 | MEM_KEEP(init.data) \ | 179 | MEM_KEEP(init.data) \ |
@@ -372,8 +362,6 @@ | |||
372 | /* __*init sections */ \ | 362 | /* __*init sections */ \ |
373 | __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \ | 363 | __init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) { \ |
374 | *(.ref.rodata) \ | 364 | *(.ref.rodata) \ |
375 | DEV_KEEP(init.rodata) \ | ||
376 | DEV_KEEP(exit.rodata) \ | ||
377 | CPU_KEEP(init.rodata) \ | 365 | CPU_KEEP(init.rodata) \ |
378 | CPU_KEEP(exit.rodata) \ | 366 | CPU_KEEP(exit.rodata) \ |
379 | MEM_KEEP(init.rodata) \ | 367 | MEM_KEEP(init.rodata) \ |
@@ -416,8 +404,6 @@ | |||
416 | *(.text.hot) \ | 404 | *(.text.hot) \ |
417 | *(.text) \ | 405 | *(.text) \ |
418 | *(.ref.text) \ | 406 | *(.ref.text) \ |
419 | DEV_KEEP(init.text) \ | ||
420 | DEV_KEEP(exit.text) \ | ||
421 | CPU_KEEP(init.text) \ | 407 | CPU_KEEP(init.text) \ |
422 | CPU_KEEP(exit.text) \ | 408 | CPU_KEEP(exit.text) \ |
423 | MEM_KEEP(init.text) \ | 409 | MEM_KEEP(init.text) \ |
@@ -503,7 +489,6 @@ | |||
503 | /* init and exit section handling */ | 489 | /* init and exit section handling */ |
504 | #define INIT_DATA \ | 490 | #define INIT_DATA \ |
505 | *(.init.data) \ | 491 | *(.init.data) \ |
506 | DEV_DISCARD(init.data) \ | ||
507 | CPU_DISCARD(init.data) \ | 492 | CPU_DISCARD(init.data) \ |
508 | MEM_DISCARD(init.data) \ | 493 | MEM_DISCARD(init.data) \ |
509 | KERNEL_CTORS() \ | 494 | KERNEL_CTORS() \ |
@@ -511,7 +496,6 @@ | |||
511 | *(.init.rodata) \ | 496 | *(.init.rodata) \ |
512 | FTRACE_EVENTS() \ | 497 | FTRACE_EVENTS() \ |
513 | TRACE_SYSCALLS() \ | 498 | TRACE_SYSCALLS() \ |
514 | DEV_DISCARD(init.rodata) \ | ||
515 | CPU_DISCARD(init.rodata) \ | 499 | CPU_DISCARD(init.rodata) \ |
516 | MEM_DISCARD(init.rodata) \ | 500 | MEM_DISCARD(init.rodata) \ |
517 | CLK_OF_TABLES() \ | 501 | CLK_OF_TABLES() \ |
@@ -521,14 +505,11 @@ | |||
521 | 505 | ||
522 | #define INIT_TEXT \ | 506 | #define INIT_TEXT \ |
523 | *(.init.text) \ | 507 | *(.init.text) \ |
524 | DEV_DISCARD(init.text) \ | ||
525 | CPU_DISCARD(init.text) \ | 508 | CPU_DISCARD(init.text) \ |
526 | MEM_DISCARD(init.text) | 509 | MEM_DISCARD(init.text) |
527 | 510 | ||
528 | #define EXIT_DATA \ | 511 | #define EXIT_DATA \ |
529 | *(.exit.data) \ | 512 | *(.exit.data) \ |
530 | DEV_DISCARD(exit.data) \ | ||
531 | DEV_DISCARD(exit.rodata) \ | ||
532 | CPU_DISCARD(exit.data) \ | 513 | CPU_DISCARD(exit.data) \ |
533 | CPU_DISCARD(exit.rodata) \ | 514 | CPU_DISCARD(exit.rodata) \ |
534 | MEM_DISCARD(exit.data) \ | 515 | MEM_DISCARD(exit.data) \ |
@@ -536,7 +517,6 @@ | |||
536 | 517 | ||
537 | #define EXIT_TEXT \ | 518 | #define EXIT_TEXT \ |
538 | *(.exit.text) \ | 519 | *(.exit.text) \ |
539 | DEV_DISCARD(exit.text) \ | ||
540 | CPU_DISCARD(exit.text) \ | 520 | CPU_DISCARD(exit.text) \ |
541 | MEM_DISCARD(exit.text) | 521 | MEM_DISCARD(exit.text) |
542 | 522 | ||
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 63f2465807d4..d68b4ea7343c 100644 --- a/include/linux/debugfs.h +++ b/include/linux/debugfs.h | |||
@@ -79,6 +79,8 @@ struct dentry *debugfs_create_x64(const char *name, umode_t mode, | |||
79 | struct dentry *parent, u64 *value); | 79 | struct dentry *parent, u64 *value); |
80 | struct dentry *debugfs_create_size_t(const char *name, umode_t mode, | 80 | struct dentry *debugfs_create_size_t(const char *name, umode_t mode, |
81 | struct dentry *parent, size_t *value); | 81 | struct dentry *parent, size_t *value); |
82 | struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, | ||
83 | struct dentry *parent, atomic_t *value); | ||
82 | struct dentry *debugfs_create_bool(const char *name, umode_t mode, | 84 | struct dentry *debugfs_create_bool(const char *name, umode_t mode, |
83 | struct dentry *parent, u32 *value); | 85 | struct dentry *parent, u32 *value); |
84 | 86 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index c0a126125325..9d4835a8f8b8 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -80,6 +80,7 @@ extern void bus_remove_file(struct bus_type *, struct bus_attribute *); | |||
80 | * bus-specific setup | 80 | * bus-specific setup |
81 | * @p: The private data of the driver core, only the driver core can | 81 | * @p: The private data of the driver core, only the driver core can |
82 | * touch this. | 82 | * touch this. |
83 | * @lock_key: Lock class key for use by the lock validator | ||
83 | * | 84 | * |
84 | * A bus is a channel between the processor and one or more devices. For the | 85 | * A bus is a channel between the processor and one or more devices. For the |
85 | * purposes of the device model, all devices are connected via a bus, even if | 86 | * purposes of the device model, all devices are connected via a bus, even if |
@@ -635,6 +636,7 @@ struct acpi_dev_node { | |||
635 | * segment limitations. | 636 | * segment limitations. |
636 | * @dma_pools: Dma pools (if dma'ble device). | 637 | * @dma_pools: Dma pools (if dma'ble device). |
637 | * @dma_mem: Internal for coherent mem override. | 638 | * @dma_mem: Internal for coherent mem override. |
639 | * @cma_area: Contiguous memory area for dma allocations | ||
638 | * @archdata: For arch-specific additions. | 640 | * @archdata: For arch-specific additions. |
639 | * @of_node: Associated device tree node. | 641 | * @of_node: Associated device tree node. |
640 | * @acpi_node: Associated ACPI device node. | 642 | * @acpi_node: Associated ACPI device node. |
@@ -648,6 +650,7 @@ struct acpi_dev_node { | |||
648 | * @release: Callback to free the device after all references have | 650 | * @release: Callback to free the device after all references have |
649 | * gone away. This should be set by the allocator of the | 651 | * gone away. This should be set by the allocator of the |
650 | * device (i.e. the bus driver that discovered the device). | 652 | * device (i.e. the bus driver that discovered the device). |
653 | * @iommu_group: IOMMU group the device belongs to. | ||
651 | * | 654 | * |
652 | * At the lowest level, every device in a Linux system is represented by an | 655 | * At the lowest level, every device in a Linux system is represented by an |
653 | * instance of struct device. The device structure contains the information | 656 | * instance of struct device. The device structure contains the information |
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index e4279fedb93a..e154c1005cd1 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
@@ -47,8 +47,6 @@ int request_firmware_nowait( | |||
47 | void (*cont)(const struct firmware *fw, void *context)); | 47 | void (*cont)(const struct firmware *fw, void *context)); |
48 | 48 | ||
49 | void release_firmware(const struct firmware *fw); | 49 | void release_firmware(const struct firmware *fw); |
50 | int cache_firmware(const char *name); | ||
51 | int uncache_firmware(const char *name); | ||
52 | #else | 50 | #else |
53 | static inline int request_firmware(const struct firmware **fw, | 51 | static inline int request_firmware(const struct firmware **fw, |
54 | const char *name, | 52 | const char *name, |
@@ -68,15 +66,6 @@ static inline void release_firmware(const struct firmware *fw) | |||
68 | { | 66 | { |
69 | } | 67 | } |
70 | 68 | ||
71 | static inline int cache_firmware(const char *name) | ||
72 | { | ||
73 | return -ENOENT; | ||
74 | } | ||
75 | |||
76 | static inline int uncache_firmware(const char *name) | ||
77 | { | ||
78 | return -EINVAL; | ||
79 | } | ||
80 | #endif | 69 | #endif |
81 | 70 | ||
82 | #endif | 71 | #endif |
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 9abf1db6aea6..cd46ee58b9dc 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h | |||
@@ -180,7 +180,13 @@ struct platform_driver { | |||
180 | const struct platform_device_id *id_table; | 180 | const struct platform_device_id *id_table; |
181 | }; | 181 | }; |
182 | 182 | ||
183 | extern int platform_driver_register(struct platform_driver *); | 183 | /* |
184 | * use a macro to avoid include chaining to get THIS_MODULE | ||
185 | */ | ||
186 | #define platform_driver_register(drv) \ | ||
187 | __platform_driver_register(drv, THIS_MODULE) | ||
188 | extern int __platform_driver_register(struct platform_driver *, | ||
189 | struct module *); | ||
184 | extern void platform_driver_unregister(struct platform_driver *); | 190 | extern void platform_driver_unregister(struct platform_driver *); |
185 | 191 | ||
186 | /* non-hotpluggable platform devices may use this so that probe() and | 192 | /* non-hotpluggable platform devices may use this so that probe() and |
diff --git a/init/Kconfig b/init/Kconfig index 2d9b83104dcf..1e825c299ea5 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -53,6 +53,20 @@ config CROSS_COMPILE | |||
53 | need to set this unless you want the configured kernel build | 53 | need to set this unless you want the configured kernel build |
54 | directory to select the cross-compiler automatically. | 54 | directory to select the cross-compiler automatically. |
55 | 55 | ||
56 | config COMPILE_TEST | ||
57 | bool "Compile also drivers which will not load" | ||
58 | default n | ||
59 | help | ||
60 | Some drivers can be compiled on a different platform than they are | ||
61 | intended to be run on. Despite they cannot be loaded there (or even | ||
62 | when they load they cannot be used due to missing HW support), | ||
63 | developers still, opposing to distributors, might want to build such | ||
64 | drivers to compile-test them. | ||
65 | |||
66 | If you are a developer and want to build everything available, say Y | ||
67 | here. If you are a user/distributor, say N here to exclude useless | ||
68 | drivers to be distributed. | ||
69 | |||
56 | config LOCALVERSION | 70 | config LOCALVERSION |
57 | string "Local version - append to kernel release" | 71 | string "Local version - append to kernel release" |
58 | help | 72 | help |
@@ -1245,9 +1259,6 @@ config SYSCTL_ARCH_UNALIGN_ALLOW | |||
1245 | the unaligned access emulation. | 1259 | the unaligned access emulation. |
1246 | see arch/parisc/kernel/unaligned.c for reference | 1260 | see arch/parisc/kernel/unaligned.c for reference |
1247 | 1261 | ||
1248 | config HOTPLUG | ||
1249 | def_bool y | ||
1250 | |||
1251 | config HAVE_PCSPKR_PLATFORM | 1262 | config HAVE_PCSPKR_PLATFORM |
1252 | bool | 1263 | bool |
1253 | 1264 | ||
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 5dfdc9ea180b..9c39de095ba9 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -100,7 +100,6 @@ config PM_SLEEP_SMP | |||
100 | depends on SMP | 100 | depends on SMP |
101 | depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE | 101 | depends on ARCH_SUSPEND_POSSIBLE || ARCH_HIBERNATION_POSSIBLE |
102 | depends on PM_SLEEP | 102 | depends on PM_SLEEP |
103 | select HOTPLUG | ||
104 | select HOTPLUG_CPU | 103 | select HOTPLUG_CPU |
105 | 104 | ||
106 | config PM_AUTOSLEEP | 105 | config PM_AUTOSLEEP |
diff --git a/lib/fault-inject.c b/lib/fault-inject.c index c5c7a762b850..d7d501ea856d 100644 --- a/lib/fault-inject.c +++ b/lib/fault-inject.c | |||
@@ -182,27 +182,6 @@ static struct dentry *debugfs_create_stacktrace_depth( | |||
182 | 182 | ||
183 | #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */ | 183 | #endif /* CONFIG_FAULT_INJECTION_STACKTRACE_FILTER */ |
184 | 184 | ||
185 | static int debugfs_atomic_t_set(void *data, u64 val) | ||
186 | { | ||
187 | atomic_set((atomic_t *)data, val); | ||
188 | return 0; | ||
189 | } | ||
190 | |||
191 | static int debugfs_atomic_t_get(void *data, u64 *val) | ||
192 | { | ||
193 | *val = atomic_read((atomic_t *)data); | ||
194 | return 0; | ||
195 | } | ||
196 | |||
197 | DEFINE_SIMPLE_ATTRIBUTE(fops_atomic_t, debugfs_atomic_t_get, | ||
198 | debugfs_atomic_t_set, "%lld\n"); | ||
199 | |||
200 | static struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, | ||
201 | struct dentry *parent, atomic_t *value) | ||
202 | { | ||
203 | return debugfs_create_file(name, mode, parent, value, &fops_atomic_t); | ||
204 | } | ||
205 | |||
206 | struct dentry *fault_create_debugfs_attr(const char *name, | 185 | struct dentry *fault_create_debugfs_attr(const char *name, |
207 | struct dentry *parent, struct fault_attr *attr) | 186 | struct dentry *parent, struct fault_attr *attr) |
208 | { | 187 | { |
diff --git a/lib/kobject.c b/lib/kobject.c index b7e29a6056d3..4a1f33d43548 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -805,7 +805,7 @@ static struct kset *kset_create(const char *name, | |||
805 | kset = kzalloc(sizeof(*kset), GFP_KERNEL); | 805 | kset = kzalloc(sizeof(*kset), GFP_KERNEL); |
806 | if (!kset) | 806 | if (!kset) |
807 | return NULL; | 807 | return NULL; |
808 | retval = kobject_set_name(&kset->kobj, name); | 808 | retval = kobject_set_name(&kset->kobj, "%s", name); |
809 | if (retval) { | 809 | if (retval) { |
810 | kfree(kset); | 810 | kfree(kset); |
811 | return NULL; | 811 | return NULL; |
diff --git a/mm/Kconfig b/mm/Kconfig index e742d06285b7..f5e698e30d4a 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -173,7 +173,7 @@ config HAVE_BOOTMEM_INFO_NODE | |||
173 | config MEMORY_HOTPLUG | 173 | config MEMORY_HOTPLUG |
174 | bool "Allow for memory hot-add" | 174 | bool "Allow for memory hot-add" |
175 | depends on SPARSEMEM || X86_64_ACPI_NUMA | 175 | depends on SPARSEMEM || X86_64_ACPI_NUMA |
176 | depends on HOTPLUG && ARCH_ENABLE_MEMORY_HOTPLUG | 176 | depends on ARCH_ENABLE_MEMORY_HOTPLUG |
177 | depends on (IA64 || X86 || PPC_BOOK3S_64 || SUPERH || S390) | 177 | depends on (IA64 || X86 || PPC_BOOK3S_64 || SUPERH || S390) |
178 | 178 | ||
179 | config MEMORY_HOTPLUG_SPARSE | 179 | config MEMORY_HOTPLUG_SPARSE |