diff options
49 files changed, 278 insertions, 252 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 49d993cee512..365e79f4fbf2 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -1528,7 +1528,7 @@ config NR_CPUS | |||
1528 | 1528 | ||
1529 | config HOTPLUG_CPU | 1529 | config HOTPLUG_CPU |
1530 | bool "Support for hot-pluggable CPUs" | 1530 | bool "Support for hot-pluggable CPUs" |
1531 | depends on SMP && HOTPLUG | 1531 | depends on SMP |
1532 | help | 1532 | help |
1533 | Say Y here to experiment with turning CPUs off and on. CPUs | 1533 | Say Y here to experiment with turning CPUs off and on. CPUs |
1534 | can be controlled through /sys/devices/system/cpu. | 1534 | 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 685692c94f05..ae917f3965f1 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 4b1f9265887f..6ede2292f67e 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 | ||
@@ -446,10 +452,9 @@ static struct firmware_priv *to_firmware_priv(struct device *dev) | |||
446 | return container_of(dev, struct firmware_priv, dev); | 452 | return container_of(dev, struct firmware_priv, dev); |
447 | } | 453 | } |
448 | 454 | ||
449 | static void fw_load_abort(struct firmware_priv *fw_priv) | 455 | static void fw_load_abort(struct firmware_buf *buf) |
450 | { | 456 | { |
451 | struct firmware_buf *buf = fw_priv->buf; | 457 | list_del_init(&buf->pending_list); |
452 | |||
453 | set_bit(FW_STATUS_ABORT, &buf->status); | 458 | set_bit(FW_STATUS_ABORT, &buf->status); |
454 | complete_all(&buf->completion); | 459 | complete_all(&buf->completion); |
455 | } | 460 | } |
@@ -457,6 +462,25 @@ static void fw_load_abort(struct firmware_priv *fw_priv) | |||
457 | #define is_fw_load_aborted(buf) \ | 462 | #define is_fw_load_aborted(buf) \ |
458 | test_bit(FW_STATUS_ABORT, &(buf)->status) | 463 | test_bit(FW_STATUS_ABORT, &(buf)->status) |
459 | 464 | ||
465 | static LIST_HEAD(pending_fw_head); | ||
466 | |||
467 | /* reboot notifier for avoid deadlock with usermode_lock */ | ||
468 | static int fw_shutdown_notify(struct notifier_block *unused1, | ||
469 | unsigned long unused2, void *unused3) | ||
470 | { | ||
471 | mutex_lock(&fw_lock); | ||
472 | while (!list_empty(&pending_fw_head)) | ||
473 | fw_load_abort(list_first_entry(&pending_fw_head, | ||
474 | struct firmware_buf, | ||
475 | pending_list)); | ||
476 | mutex_unlock(&fw_lock); | ||
477 | return NOTIFY_DONE; | ||
478 | } | ||
479 | |||
480 | static struct notifier_block fw_shutdown_nb = { | ||
481 | .notifier_call = fw_shutdown_notify, | ||
482 | }; | ||
483 | |||
460 | static ssize_t firmware_timeout_show(struct class *class, | 484 | static ssize_t firmware_timeout_show(struct class *class, |
461 | struct class_attribute *attr, | 485 | struct class_attribute *attr, |
462 | char *buf) | 486 | char *buf) |
@@ -499,8 +523,6 @@ static void fw_dev_release(struct device *dev) | |||
499 | struct firmware_priv *fw_priv = to_firmware_priv(dev); | 523 | struct firmware_priv *fw_priv = to_firmware_priv(dev); |
500 | 524 | ||
501 | kfree(fw_priv); | 525 | kfree(fw_priv); |
502 | |||
503 | module_put(THIS_MODULE); | ||
504 | } | 526 | } |
505 | 527 | ||
506 | static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env) | 528 | static int firmware_uevent(struct device *dev, struct kobj_uevent_env *env) |
@@ -604,6 +626,7 @@ static ssize_t firmware_loading_store(struct device *dev, | |||
604 | * is completed. | 626 | * is completed. |
605 | * */ | 627 | * */ |
606 | fw_map_pages_buf(fw_buf); | 628 | fw_map_pages_buf(fw_buf); |
629 | list_del_init(&fw_buf->pending_list); | ||
607 | complete_all(&fw_buf->completion); | 630 | complete_all(&fw_buf->completion); |
608 | break; | 631 | break; |
609 | } | 632 | } |
@@ -612,7 +635,7 @@ static ssize_t firmware_loading_store(struct device *dev, | |||
612 | dev_err(dev, "%s: unexpected value (%d)\n", __func__, loading); | 635 | dev_err(dev, "%s: unexpected value (%d)\n", __func__, loading); |
613 | /* fallthrough */ | 636 | /* fallthrough */ |
614 | case -1: | 637 | case -1: |
615 | fw_load_abort(fw_priv); | 638 | fw_load_abort(fw_buf); |
616 | break; | 639 | break; |
617 | } | 640 | } |
618 | out: | 641 | out: |
@@ -680,7 +703,7 @@ static int fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size) | |||
680 | new_pages = kmalloc(new_array_size * sizeof(void *), | 703 | new_pages = kmalloc(new_array_size * sizeof(void *), |
681 | GFP_KERNEL); | 704 | GFP_KERNEL); |
682 | if (!new_pages) { | 705 | if (!new_pages) { |
683 | fw_load_abort(fw_priv); | 706 | fw_load_abort(buf); |
684 | return -ENOMEM; | 707 | return -ENOMEM; |
685 | } | 708 | } |
686 | memcpy(new_pages, buf->pages, | 709 | memcpy(new_pages, buf->pages, |
@@ -697,7 +720,7 @@ static int fw_realloc_buffer(struct firmware_priv *fw_priv, int min_size) | |||
697 | alloc_page(GFP_KERNEL | __GFP_HIGHMEM); | 720 | alloc_page(GFP_KERNEL | __GFP_HIGHMEM); |
698 | 721 | ||
699 | if (!buf->pages[buf->nr_pages]) { | 722 | if (!buf->pages[buf->nr_pages]) { |
700 | fw_load_abort(fw_priv); | 723 | fw_load_abort(buf); |
701 | return -ENOMEM; | 724 | return -ENOMEM; |
702 | } | 725 | } |
703 | buf->nr_pages++; | 726 | buf->nr_pages++; |
@@ -781,7 +804,7 @@ static void firmware_class_timeout_work(struct work_struct *work) | |||
781 | mutex_unlock(&fw_lock); | 804 | mutex_unlock(&fw_lock); |
782 | return; | 805 | return; |
783 | } | 806 | } |
784 | fw_load_abort(fw_priv); | 807 | fw_load_abort(fw_priv->buf); |
785 | mutex_unlock(&fw_lock); | 808 | mutex_unlock(&fw_lock); |
786 | } | 809 | } |
787 | 810 | ||
@@ -827,9 +850,6 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent, | |||
827 | 850 | ||
828 | dev_set_uevent_suppress(f_dev, true); | 851 | dev_set_uevent_suppress(f_dev, true); |
829 | 852 | ||
830 | /* Need to pin this module until class device is destroyed */ | ||
831 | __module_get(THIS_MODULE); | ||
832 | |||
833 | retval = device_add(f_dev); | 853 | retval = device_add(f_dev); |
834 | if (retval) { | 854 | if (retval) { |
835 | dev_err(f_dev, "%s: device_register failed\n", __func__); | 855 | dev_err(f_dev, "%s: device_register failed\n", __func__); |
@@ -849,6 +869,7 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent, | |||
849 | } | 869 | } |
850 | 870 | ||
851 | if (uevent) { | 871 | if (uevent) { |
872 | buf->need_uevent = true; | ||
852 | dev_set_uevent_suppress(f_dev, false); | 873 | dev_set_uevent_suppress(f_dev, false); |
853 | dev_dbg(f_dev, "firmware: requesting %s\n", buf->fw_id); | 874 | dev_dbg(f_dev, "firmware: requesting %s\n", buf->fw_id); |
854 | if (timeout != MAX_SCHEDULE_TIMEOUT) | 875 | if (timeout != MAX_SCHEDULE_TIMEOUT) |
@@ -857,6 +878,10 @@ static int _request_firmware_load(struct firmware_priv *fw_priv, bool uevent, | |||
857 | kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD); | 878 | kobject_uevent(&fw_priv->dev.kobj, KOBJ_ADD); |
858 | } | 879 | } |
859 | 880 | ||
881 | mutex_lock(&fw_lock); | ||
882 | list_add(&buf->pending_list, &pending_fw_head); | ||
883 | mutex_unlock(&fw_lock); | ||
884 | |||
860 | wait_for_completion(&buf->completion); | 885 | wait_for_completion(&buf->completion); |
861 | 886 | ||
862 | cancel_delayed_work_sync(&fw_priv->timeout_work); | 887 | cancel_delayed_work_sync(&fw_priv->timeout_work); |
@@ -886,6 +911,23 @@ static int fw_load_from_user_helper(struct firmware *firmware, | |||
886 | fw_priv->buf = firmware->priv; | 911 | fw_priv->buf = firmware->priv; |
887 | return _request_firmware_load(fw_priv, uevent, timeout); | 912 | return _request_firmware_load(fw_priv, uevent, timeout); |
888 | } | 913 | } |
914 | |||
915 | #ifdef CONFIG_PM_SLEEP | ||
916 | /* kill pending requests without uevent to avoid blocking suspend */ | ||
917 | static void kill_requests_without_uevent(void) | ||
918 | { | ||
919 | struct firmware_buf *buf; | ||
920 | struct firmware_buf *next; | ||
921 | |||
922 | mutex_lock(&fw_lock); | ||
923 | list_for_each_entry_safe(buf, next, &pending_fw_head, pending_list) { | ||
924 | if (!buf->need_uevent) | ||
925 | fw_load_abort(buf); | ||
926 | } | ||
927 | mutex_unlock(&fw_lock); | ||
928 | } | ||
929 | #endif | ||
930 | |||
889 | #else /* CONFIG_FW_LOADER_USER_HELPER */ | 931 | #else /* CONFIG_FW_LOADER_USER_HELPER */ |
890 | static inline int | 932 | static inline int |
891 | fw_load_from_user_helper(struct firmware *firmware, const char *name, | 933 | fw_load_from_user_helper(struct firmware *firmware, const char *name, |
@@ -898,6 +940,10 @@ fw_load_from_user_helper(struct firmware *firmware, const char *name, | |||
898 | /* No abort during direct loading */ | 940 | /* No abort during direct loading */ |
899 | #define is_fw_load_aborted(buf) false | 941 | #define is_fw_load_aborted(buf) false |
900 | 942 | ||
943 | #ifdef CONFIG_PM_SLEEP | ||
944 | static inline void kill_requests_without_uevent(void) { } | ||
945 | #endif | ||
946 | |||
901 | #endif /* CONFIG_FW_LOADER_USER_HELPER */ | 947 | #endif /* CONFIG_FW_LOADER_USER_HELPER */ |
902 | 948 | ||
903 | 949 | ||
@@ -965,7 +1011,8 @@ _request_firmware_prepare(struct firmware **firmware_p, const char *name, | |||
965 | return 1; /* need to load */ | 1011 | return 1; /* need to load */ |
966 | } | 1012 | } |
967 | 1013 | ||
968 | static int assign_firmware_buf(struct firmware *fw, struct device *device) | 1014 | static int assign_firmware_buf(struct firmware *fw, struct device *device, |
1015 | bool skip_cache) | ||
969 | { | 1016 | { |
970 | struct firmware_buf *buf = fw->priv; | 1017 | struct firmware_buf *buf = fw->priv; |
971 | 1018 | ||
@@ -982,7 +1029,7 @@ static int assign_firmware_buf(struct firmware *fw, struct device *device) | |||
982 | * device may has been deleted already, but the problem | 1029 | * device may has been deleted already, but the problem |
983 | * should be fixed in devres or driver core. | 1030 | * should be fixed in devres or driver core. |
984 | */ | 1031 | */ |
985 | if (device) | 1032 | if (device && !skip_cache) |
986 | fw_add_devm_name(device, buf->fw_id); | 1033 | fw_add_devm_name(device, buf->fw_id); |
987 | 1034 | ||
988 | /* | 1035 | /* |
@@ -1038,8 +1085,10 @@ _request_firmware(const struct firmware **firmware_p, const char *name, | |||
1038 | if (!fw_get_filesystem_firmware(device, fw->priv)) | 1085 | if (!fw_get_filesystem_firmware(device, fw->priv)) |
1039 | ret = fw_load_from_user_helper(fw, name, device, | 1086 | ret = fw_load_from_user_helper(fw, name, device, |
1040 | uevent, nowait, timeout); | 1087 | uevent, nowait, timeout); |
1088 | |||
1089 | /* don't cache firmware handled without uevent */ | ||
1041 | if (!ret) | 1090 | if (!ret) |
1042 | ret = assign_firmware_buf(fw, device); | 1091 | ret = assign_firmware_buf(fw, device, !uevent); |
1043 | 1092 | ||
1044 | usermodehelper_read_unlock(); | 1093 | usermodehelper_read_unlock(); |
1045 | 1094 | ||
@@ -1077,8 +1126,15 @@ int | |||
1077 | request_firmware(const struct firmware **firmware_p, const char *name, | 1126 | request_firmware(const struct firmware **firmware_p, const char *name, |
1078 | struct device *device) | 1127 | struct device *device) |
1079 | { | 1128 | { |
1080 | return _request_firmware(firmware_p, name, device, true, false); | 1129 | int ret; |
1130 | |||
1131 | /* Need to pin this module until return */ | ||
1132 | __module_get(THIS_MODULE); | ||
1133 | ret = _request_firmware(firmware_p, name, device, true, false); | ||
1134 | module_put(THIS_MODULE); | ||
1135 | return ret; | ||
1081 | } | 1136 | } |
1137 | EXPORT_SYMBOL(request_firmware); | ||
1082 | 1138 | ||
1083 | /** | 1139 | /** |
1084 | * release_firmware: - release the resource associated with a firmware image | 1140 | * release_firmware: - release the resource associated with a firmware image |
@@ -1092,6 +1148,7 @@ void release_firmware(const struct firmware *fw) | |||
1092 | kfree(fw); | 1148 | kfree(fw); |
1093 | } | 1149 | } |
1094 | } | 1150 | } |
1151 | EXPORT_SYMBOL(release_firmware); | ||
1095 | 1152 | ||
1096 | /* Async support */ | 1153 | /* Async support */ |
1097 | struct firmware_work { | 1154 | struct firmware_work { |
@@ -1172,6 +1229,7 @@ request_firmware_nowait( | |||
1172 | schedule_work(&fw_work->work); | 1229 | schedule_work(&fw_work->work); |
1173 | return 0; | 1230 | return 0; |
1174 | } | 1231 | } |
1232 | EXPORT_SYMBOL(request_firmware_nowait); | ||
1175 | 1233 | ||
1176 | /** | 1234 | /** |
1177 | * cache_firmware - cache one firmware image in kernel memory space | 1235 | * cache_firmware - cache one firmware image in kernel memory space |
@@ -1187,7 +1245,7 @@ request_firmware_nowait( | |||
1187 | * Return !0 otherwise | 1245 | * Return !0 otherwise |
1188 | * | 1246 | * |
1189 | */ | 1247 | */ |
1190 | int cache_firmware(const char *fw_name) | 1248 | static int cache_firmware(const char *fw_name) |
1191 | { | 1249 | { |
1192 | int ret; | 1250 | int ret; |
1193 | const struct firmware *fw; | 1251 | const struct firmware *fw; |
@@ -1214,7 +1272,7 @@ int cache_firmware(const char *fw_name) | |||
1214 | * Return !0 otherwise | 1272 | * Return !0 otherwise |
1215 | * | 1273 | * |
1216 | */ | 1274 | */ |
1217 | int uncache_firmware(const char *fw_name) | 1275 | static int uncache_firmware(const char *fw_name) |
1218 | { | 1276 | { |
1219 | struct firmware_buf *buf; | 1277 | struct firmware_buf *buf; |
1220 | struct firmware fw; | 1278 | struct firmware fw; |
@@ -1455,6 +1513,7 @@ static int fw_pm_notify(struct notifier_block *notify_block, | |||
1455 | switch (mode) { | 1513 | switch (mode) { |
1456 | case PM_HIBERNATION_PREPARE: | 1514 | case PM_HIBERNATION_PREPARE: |
1457 | case PM_SUSPEND_PREPARE: | 1515 | case PM_SUSPEND_PREPARE: |
1516 | kill_requests_without_uevent(); | ||
1458 | device_cache_fw_images(); | 1517 | device_cache_fw_images(); |
1459 | break; | 1518 | break; |
1460 | 1519 | ||
@@ -1517,6 +1576,7 @@ static int __init firmware_class_init(void) | |||
1517 | { | 1576 | { |
1518 | fw_cache_init(); | 1577 | fw_cache_init(); |
1519 | #ifdef CONFIG_FW_LOADER_USER_HELPER | 1578 | #ifdef CONFIG_FW_LOADER_USER_HELPER |
1579 | register_reboot_notifier(&fw_shutdown_nb); | ||
1520 | return class_register(&firmware_class); | 1580 | return class_register(&firmware_class); |
1521 | #else | 1581 | #else |
1522 | return 0; | 1582 | return 0; |
@@ -1530,15 +1590,10 @@ static void __exit firmware_class_exit(void) | |||
1530 | unregister_pm_notifier(&fw_cache.pm_notify); | 1590 | unregister_pm_notifier(&fw_cache.pm_notify); |
1531 | #endif | 1591 | #endif |
1532 | #ifdef CONFIG_FW_LOADER_USER_HELPER | 1592 | #ifdef CONFIG_FW_LOADER_USER_HELPER |
1593 | unregister_reboot_notifier(&fw_shutdown_nb); | ||
1533 | class_unregister(&firmware_class); | 1594 | class_unregister(&firmware_class); |
1534 | #endif | 1595 | #endif |
1535 | } | 1596 | } |
1536 | 1597 | ||
1537 | fs_initcall(firmware_class_init); | 1598 | fs_initcall(firmware_class_init); |
1538 | module_exit(firmware_class_exit); | 1599 | module_exit(firmware_class_exit); |
1539 | |||
1540 | EXPORT_SYMBOL(release_firmware); | ||
1541 | EXPORT_SYMBOL(request_firmware); | ||
1542 | EXPORT_SYMBOL(request_firmware_nowait); | ||
1543 | EXPORT_SYMBOL_GPL(cache_firmware); | ||
1544 | 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/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 b90f85bf5f81..1c6362491bdf 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/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/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 e8e0e71b29d5..17c9a70f4a27 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/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..55ccdf6640ff 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -1245,9 +1245,6 @@ config SYSCTL_ARCH_UNALIGN_ALLOW | |||
1245 | the unaligned access emulation. | 1245 | the unaligned access emulation. |
1246 | see arch/parisc/kernel/unaligned.c for reference | 1246 | see arch/parisc/kernel/unaligned.c for reference |
1247 | 1247 | ||
1248 | config HOTPLUG | ||
1249 | def_bool y | ||
1250 | |||
1251 | config HAVE_PCSPKR_PLATFORM | 1248 | config HAVE_PCSPKR_PLATFORM |
1252 | bool | 1249 | bool |
1253 | 1250 | ||
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 |