lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080201164422.GA14633@uranus.ravnborg.org>
Date:	Fri, 1 Feb 2008 17:44:22 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	Alexander van Heukelum <heukelum@...lshack.com>
Cc:	linux-kernel@...r.kernel.org,
	Alexander van Heukelum <heukelum@...tmail.fm>,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: Avoid section mismatch involving arch_register_cpu

On Fri, Feb 01, 2008 at 03:56:50PM +0100, Alexander van Heukelum wrote:
> Avoid section mismatch involving arch_register_cpu.
> 
> Marking arch_register_cpu as __init and removing the export
> for non-hotplug-cpu configurations makes the following warning
> go away:
> 
> Section mismatch in reference from the function 
> arch_register_cpu() to the function .devinit.text:register_cpu()
> The function  arch_register_cpu() references
> the function __devinit register_cpu().
> This is often because arch_register_cpu lacks a __devinit 
> annotation or the annotation of register_cpu is wrong.
> 
> The only external user of arch_register_cpu in the tree is
> in drivers/acpi/processor_core.c where it is guarded by
> ACPI_HOTPLUG_CPU (which depends on HOTPLUG_CPU).
> 
> Signed-off-by: Alexander van Heukelum <heukelum@...tmail.fm>
> CC: Sam Ravnborg <sam@...nborg.org>
Acked-by: Sam Ravnborg <sam@...nborg.org>

Added Ingo so he can pick it up.

	Sam

> 
> 
> diff --git a/arch/x86/kernel/topology.c b/arch/x86/kernel/topology.c
> index 78cbb65..e6757aa 100644
> --- a/arch/x86/kernel/topology.c
> +++ b/arch/x86/kernel/topology.c
> @@ -57,11 +57,10 @@ void arch_unregister_cpu(int num)
>  }
>  EXPORT_SYMBOL(arch_unregister_cpu);
>  #else
> -int arch_register_cpu(int num)
> +static int __init arch_register_cpu(int num)
>  {
>  	return register_cpu(&per_cpu(cpu_devices, num).cpu, num);
>  }
> -EXPORT_SYMBOL(arch_register_cpu);
>  #endif /*CONFIG_HOTPLUG_CPU*/
>  
>  static int __init topology_init(void)
> diff --git a/include/asm-x86/cpu.h b/include/asm-x86/cpu.h
> index 85ece5f..73f2ea8 100644
> --- a/include/asm-x86/cpu.h
> +++ b/include/asm-x86/cpu.h
> @@ -10,8 +10,9 @@
>  struct x86_cpu {
>  	struct cpu cpu;
>  };
> -extern int arch_register_cpu(int num);
> +
>  #ifdef CONFIG_HOTPLUG_CPU
> +extern int arch_register_cpu(int num);
>  extern void arch_unregister_cpu(int);
>  #endif
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ