History

kernel: delete __cpuinit usage from all core kernel files

The __cpuinit type of throwaway sections might have made sense some time ago when RAM was more constrained, but now the savings do not offset the cost and complications. For example, the fix in commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time") is a good example of the nasty type of bugs that can be created with improper use of the various __init prefixes. After a discussion on LKML[1] it was decided that cpuinit should go the way of devinit and be phased out. Once all the users are gone, we can then finally remove the macros themselves from linux/init.h. This removes all the uses of the __cpuinit macros from C files in the core kernel directories (kernel, init, lib, mm, and include) that don't really have a specific maintainer. [1] https://lkml.org/lkml/2013/5/20/589

Paul Gortmaker committed 13 years ago

Commit 0db06281 parent 49fb4c627 files · +62 −59Browse files

Showing the changes to kernel/workqueue.c (1 of 27 files). Show all

Unified · Split

kernel/workqueue.c+2−2
@@ -4644,7 +4644,7 @@ static void restore_unbound_workers_cpumask(struct worker_pool *pool, int cpu) · 4643 unmodified lines
4644 * Workqueues should be brought up before normal priority CPU notifiers.4644 * Workqueues should be brought up before normal priority CPU notifiers.
4645 * This will be registered high priority CPU notifier.4645 * This will be registered high priority CPU notifier.
4646 */4646 */
4647static int __cpuinit workqueue_cpu_up_callback(struct notifier_block *nfb,4647static int workqueue_cpu_up_callback(struct notifier_block *nfb,
4648 unsigned long action,4648 unsigned long action,
4649 void *hcpu)4649 void *hcpu)
4650{4650{
@@ -4697,7 +4697,7 @@ static int __cpuinit workqueue_cpu_up_callback(struct notifier_block *nfb, · 46 unmodified lines
4697 * Workqueues should be brought down after normal priority CPU notifiers.4697 * Workqueues should be brought down after normal priority CPU notifiers.
4698 * This will be registered as low priority CPU notifier.4698 * This will be registered as low priority CPU notifier.
4699 */4699 */
4700static int __cpuinit workqueue_cpu_down_callback(struct notifier_block *nfb,4700static int workqueue_cpu_down_callback(struct notifier_block *nfb,
4701 unsigned long action,4701 unsigned long action,
4702 void *hcpu)4702 void *hcpu)
4703{4703{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t