* [PATCH 0/5] x86: __ref / __refdata cleanup
@ 2015-07-19 16:22 Mathias Krause
2015-07-19 16:22 ` [PATCH 1/5] x86, ACPI: Get rid of the acpi_map_cpu() wrapper Mathias Krause
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Mathias Krause @ 2015-07-19 16:22 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: linux-kernel, x86, Mathias Krause
This series drops quite a few -- relatively speaking -- __ref /
__refdata annotations in the x86 code. They used to be needed in
__cpuinit times but those are long gone. Now those annotations may
only serve as an additional error source, hiding legitimate section
mismatches. So we better get rid of them.
Please apply.
Mathias Krause (5):
x86, ACPI: Get rid of the acpi_map_cpu() wrapper
x86, apic: Drop bogus __refdata annotation of cpu notifier
x86, cpuid: Drop bogus __refdata annotation of cpu notifier
x86, smpboot: Drop bogus __ref annotation from remove_cpu_from_maps()
x86, topology: Drop bogus __ref annotations
arch/x86/kernel/acpi/boot.c | 8 +-------
arch/x86/kernel/apic/x2apic_cluster.c | 2 +-
arch/x86/kernel/cpuid.c | 2 +-
arch/x86/kernel/smpboot.c | 2 +-
arch/x86/kernel/topology.c | 4 ++--
5 files changed, 6 insertions(+), 12 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/5] x86, ACPI: Get rid of the acpi_map_cpu() wrapper
2015-07-19 16:22 [PATCH 0/5] x86: __ref / __refdata cleanup Mathias Krause
@ 2015-07-19 16:22 ` Mathias Krause
2015-07-19 16:22 ` [PATCH 2/5] x86, apic: Drop bogus __refdata annotation of cpu notifier Mathias Krause
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Mathias Krause @ 2015-07-19 16:22 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: linux-kernel, x86, Mathias Krause, Rafael J. Wysocki,
Paul Gortmaker
The __cpuinit annotation was dropped from acpi_processor_set_pdc()
in commit fe7bf106ebc2 ("acpi: delete __cpuinit usage from all acpi
files"), vanishing the need for the __ref annotated acpi_map_cpu()
wrapper.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/x86/kernel/acpi/boot.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index e49ee24da85e..75e8bad53798 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -710,7 +710,7 @@ static void acpi_map_cpu2node(acpi_handle handle, int cpu, int physid)
#endif
}
-static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu)
+int acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, int *pcpu)
{
int cpu;
@@ -726,12 +726,6 @@ static int _acpi_map_lsapic(acpi_handle handle, int physid, int *pcpu)
*pcpu = cpu;
return 0;
}
-
-/* wrapper to silence section mismatch warning */
-int __ref acpi_map_cpu(acpi_handle handle, phys_cpuid_t physid, int *pcpu)
-{
- return _acpi_map_lsapic(handle, physid, pcpu);
-}
EXPORT_SYMBOL(acpi_map_cpu);
int acpi_unmap_cpu(int cpu)
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/5] x86, apic: Drop bogus __refdata annotation of cpu notifier
2015-07-19 16:22 [PATCH 0/5] x86: __ref / __refdata cleanup Mathias Krause
2015-07-19 16:22 ` [PATCH 1/5] x86, ACPI: Get rid of the acpi_map_cpu() wrapper Mathias Krause
@ 2015-07-19 16:22 ` Mathias Krause
2015-07-19 16:22 ` [PATCH 3/5] x86, cpuid: " Mathias Krause
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Mathias Krause @ 2015-07-19 16:22 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: linux-kernel, x86, Mathias Krause, Paul Gortmaker
The __cpuinit annotation was dropped from update_clusterinfo() in commit
148f9bb87745 ("x86: delete __cpuinit usage from all x86 files"),
vanishing the need for the __refdata annotation of x2apic_cpu_notifier.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/x86/kernel/apic/x2apic_cluster.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
index ab3219b3fbda..e709bc276feb 100644
--- a/arch/x86/kernel/apic/x2apic_cluster.c
+++ b/arch/x86/kernel/apic/x2apic_cluster.c
@@ -182,7 +182,7 @@ update_clusterinfo(struct notifier_block *nfb, unsigned long action, void *hcpu)
return notifier_from_errno(err);
}
-static struct notifier_block __refdata x2apic_cpu_notifier = {
+static struct notifier_block x2apic_cpu_notifier = {
.notifier_call = update_clusterinfo,
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/5] x86, cpuid: Drop bogus __refdata annotation of cpu notifier
2015-07-19 16:22 [PATCH 0/5] x86: __ref / __refdata cleanup Mathias Krause
2015-07-19 16:22 ` [PATCH 1/5] x86, ACPI: Get rid of the acpi_map_cpu() wrapper Mathias Krause
2015-07-19 16:22 ` [PATCH 2/5] x86, apic: Drop bogus __refdata annotation of cpu notifier Mathias Krause
@ 2015-07-19 16:22 ` Mathias Krause
2015-07-19 16:22 ` [PATCH 4/5] x86, smpboot: Drop bogus __ref annotation from remove_cpu_from_maps() Mathias Krause
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Mathias Krause @ 2015-07-19 16:22 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: linux-kernel, x86, Mathias Krause, Paul Gortmaker
The __cpuinit annotation was dropped from cpuid_class_cpu_callback()
in commit 148f9bb87745 ("x86: delete __cpuinit usage from all x86
files"), vanishing the need for the __refdata annotation of
cpuid_class_cpu_notifier.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/x86/kernel/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 83741a71558f..bd3507da39f0 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -170,7 +170,7 @@ static int cpuid_class_cpu_callback(struct notifier_block *nfb,
return notifier_from_errno(err);
}
-static struct notifier_block __refdata cpuid_class_cpu_notifier =
+static struct notifier_block cpuid_class_cpu_notifier =
{
.notifier_call = cpuid_class_cpu_callback,
};
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/5] x86, smpboot: Drop bogus __ref annotation from remove_cpu_from_maps()
2015-07-19 16:22 [PATCH 0/5] x86: __ref / __refdata cleanup Mathias Krause
` (2 preceding siblings ...)
2015-07-19 16:22 ` [PATCH 3/5] x86, cpuid: " Mathias Krause
@ 2015-07-19 16:22 ` Mathias Krause
2015-07-19 16:22 ` [PATCH 5/5] x86, topology: Drop bogus __ref annotations Mathias Krause
2015-07-20 7:39 ` [PATCH 0/5] x86: __ref / __refdata cleanup Ingo Molnar
5 siblings, 0 replies; 7+ messages in thread
From: Mathias Krause @ 2015-07-19 16:22 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: linux-kernel, x86, Mathias Krause, Paul Gortmaker
The __cpuinit annotation of numa_remove_cpu() was dropped in commit
148f9bb87745 ("x86: delete __cpuinit usage from all x86 files"),
vanishing the need for the __ref annotation of remove_cpu_from_maps().
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/x86/kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index b1f3ed9c7a9e..1d06cf8c0093 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1358,7 +1358,7 @@ static void remove_siblinginfo(int cpu)
cpumask_clear_cpu(cpu, cpu_sibling_setup_mask);
}
-static void __ref remove_cpu_from_maps(int cpu)
+static void remove_cpu_from_maps(int cpu)
{
set_cpu_online(cpu, false);
cpumask_clear_cpu(cpu, cpu_callout_mask);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] x86, topology: Drop bogus __ref annotations
2015-07-19 16:22 [PATCH 0/5] x86: __ref / __refdata cleanup Mathias Krause
` (3 preceding siblings ...)
2015-07-19 16:22 ` [PATCH 4/5] x86, smpboot: Drop bogus __ref annotation from remove_cpu_from_maps() Mathias Krause
@ 2015-07-19 16:22 ` Mathias Krause
2015-07-20 7:39 ` [PATCH 0/5] x86: __ref / __refdata cleanup Ingo Molnar
5 siblings, 0 replies; 7+ messages in thread
From: Mathias Krause @ 2015-07-19 16:22 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
Cc: linux-kernel, x86, Mathias Krause, Paul Gortmaker
In commit 5c113fbeed7a ("fix cpu_chain section mismatch...") cpu_chain
lost its __cpuinitdata annotation. This and the global __cpuinit
annotation drop in v3.11 vanished the need to mark all users, including
transitive ones like cpu_up(), with the __ref annotation. register_cpu()
lost its __cpuinit annotation in commit ia83048ebd449 ("drivers: delete
__cpuinit usage from all remaining drivers files"), allowing us to drop
the __ref annotation of _debug_hotplug_cpu() and arch_register_cpu().
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
---
arch/x86/kernel/topology.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
index 649b010da00b..12cbe2b88c0f 100644
--- a/arch/x86/kernel/topology.c
+++ b/arch/x86/kernel/topology.c
@@ -57,7 +57,7 @@ __setup("cpu0_hotplug", enable_cpu0_hotplug);
*
* This is only called for debugging CPU offline/online feature.
*/
-int __ref _debug_hotplug_cpu(int cpu, int action)
+int _debug_hotplug_cpu(int cpu, int action)
{
struct device *dev = get_cpu_device(cpu);
int ret;
@@ -104,7 +104,7 @@ static int __init debug_hotplug_cpu(void)
late_initcall_sync(debug_hotplug_cpu);
#endif /* CONFIG_DEBUG_HOTPLUG_CPU0 */
-int __ref arch_register_cpu(int num)
+int arch_register_cpu(int num)
{
struct cpuinfo_x86 *c = &cpu_data(num);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/5] x86: __ref / __refdata cleanup
2015-07-19 16:22 [PATCH 0/5] x86: __ref / __refdata cleanup Mathias Krause
` (4 preceding siblings ...)
2015-07-19 16:22 ` [PATCH 5/5] x86, topology: Drop bogus __ref annotations Mathias Krause
@ 2015-07-20 7:39 ` Ingo Molnar
5 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2015-07-20 7:39 UTC (permalink / raw)
To: Mathias Krause
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, linux-kernel, x86
* Mathias Krause <minipli@googlemail.com> wrote:
> This series drops quite a few -- relatively speaking -- __ref /
> __refdata annotations in the x86 code. They used to be needed in
> __cpuinit times but those are long gone. Now those annotations may
> only serve as an additional error source, hiding legitimate section
> mismatches. So we better get rid of them.
>
> Please apply.
>
>
> Mathias Krause (5):
> x86, ACPI: Get rid of the acpi_map_cpu() wrapper
> x86, apic: Drop bogus __refdata annotation of cpu notifier
> x86, cpuid: Drop bogus __refdata annotation of cpu notifier
> x86, smpboot: Drop bogus __ref annotation from remove_cpu_from_maps()
> x86, topology: Drop bogus __ref annotations
>
> arch/x86/kernel/acpi/boot.c | 8 +-------
> arch/x86/kernel/apic/x2apic_cluster.c | 2 +-
> arch/x86/kernel/cpuid.c | 2 +-
> arch/x86/kernel/smpboot.c | 2 +-
> arch/x86/kernel/topology.c | 4 ++--
> 5 files changed, 6 insertions(+), 12 deletions(-)
Please send a single patch - there's absolutely zero reason to use 5 patches.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-20 7:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-19 16:22 [PATCH 0/5] x86: __ref / __refdata cleanup Mathias Krause
2015-07-19 16:22 ` [PATCH 1/5] x86, ACPI: Get rid of the acpi_map_cpu() wrapper Mathias Krause
2015-07-19 16:22 ` [PATCH 2/5] x86, apic: Drop bogus __refdata annotation of cpu notifier Mathias Krause
2015-07-19 16:22 ` [PATCH 3/5] x86, cpuid: " Mathias Krause
2015-07-19 16:22 ` [PATCH 4/5] x86, smpboot: Drop bogus __ref annotation from remove_cpu_from_maps() Mathias Krause
2015-07-19 16:22 ` [PATCH 5/5] x86, topology: Drop bogus __ref annotations Mathias Krause
2015-07-20 7:39 ` [PATCH 0/5] x86: __ref / __refdata cleanup Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).