Skip to contentSkip to conversation

x86, microcode: __ref / __refdata cleanups

PATCH In review Mathias Krause 2 participants 5 messages Jul 19, 2015 – Jul 20, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover x86, microcode: __ref / __refdata cleanups

Hi Boris,

two small cleanups for wrongly annotated variables / functions. They used to require that annotation for __cpuinit but as that one is gone since v3.11 we can drop the __ref / __refdata annotation, too.

Please apply.

Mathias Krause (2):
x86, microcode: Drop bogus __refdata annotation of cpu notifier x86, microcode: Drop bogus __ref annotation of show_saved_mc()

 arch/x86/kernel/cpu/microcode/core.c        |    2 +-
 arch/x86/kernel/cpu/microcode/intel_early.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/2 x86, microcode: Drop bogus __refdata annotation of cpu notifier

The __cpuinit annotation was dropped from mc_cpu_callback() in commit 148f9bb87745 ("x86: delete __cpuinit usage from all x86 files"), vanishing the need for the __refdata annotation of mc_cpu_notifier.

Cc Paul Gortmaker <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Ingo Molnar <[email protected]>
---
 arch/x86/kernel/cpu/microcode/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/microcode/core.c +1 -1
index 6236a54a63f4..532026d48096 100644
@@ -460,7 +460,7 @@ mc_cpu_callback(struct notifier_block *nb, unsigned long action, void *hcpu)
 	return NOTIFY_OK;
 }
 
-static struct notifier_block __refdata mc_cpu_notifier = {
+static struct notifier_block mc_cpu_notifier = {
 	.notifier_call	= mc_cpu_callback,
 };
 
Signature · 1 line
1.7.10.4
#2 lore raw

PATCH 2/2 x86, microcode: Drop bogus __ref annotation of show_saved_mc()

In reply to Mathias Krause

show_saved_mc() does not reference any .init / .exit sections. Drop the bogus annotation.

Cc Thomas Gleixner <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Ingo Molnar <[email protected]>

---
Test build with '#define DEBUG'.

 arch/x86/kernel/cpu/microcode/intel_early.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/microcode/intel_early.c +1 -1
index 8187b7247d1c..37ea89c11520 100644
@@ -390,7 +390,7 @@ static int collect_cpu_info_early(struct ucode_cpu_info *uci)
 }
 
 #ifdef DEBUG
-static void __ref show_saved_mc(void)
+static void show_saved_mc(void)
 {
 	int i, j;
 	unsigned int sig, pf, rev, total_size, data_size, date;
Signature · 1 line
1.7.10.4
#3 lore raw
In reply to Mathias Krause
Quoted 9 lines · Mathias Krause

Hi Boris,

two small cleanups for wrongly annotated variables / functions. They used to require that annotation for __cpuinit but as that one is gone since v3.11 we can drop the __ref / __refdata annotation, too.

Please apply.

Quoted 7 lines

Mathias Krause (2):
x86, microcode: Drop bogus __refdata annotation of cpu notifier x86, microcode: Drop bogus __ref annotation of show_saved_mc()

 arch/x86/kernel/cpu/microcode/core.c        |    2 +-
 arch/x86/kernel/cpu/microcode/intel_early.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Please merge this into the single x86 patch of the previous series that gets rid of __ref/__refdata. There's no need to create unnecessary churn.

Thanks,

Ingo

#4 lore raw
Quoted 7 lines · Ingo Molnar
Quoted 3 lines · Mathias Krause
 arch/x86/kernel/cpu/microcode/core.c        |    2 +-
 arch/x86/kernel/cpu/microcode/intel_early.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Please merge this into the single x86 patch of the previous series that gets rid of __ref/__refdata. There's no need to create unnecessary churn.

Will do. Just thought it may make sense to split the series due to different maintainers (x86 vs. microcode).

What's your opinion on [1], btw? Should patch 2 go through the tip tree as well?

[1] https://lkml.org/lkml/2015/7/19/214

Thanks,
Mathias