lkml.org 
[lkml]   [2013]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 21/31] mips/kvm: Allow set_except_vector() to be used from MIPSVZ code.
On Fri, Jun 07, 2013 at 04:03:25PM -0700, David Daney wrote:

> From: David Daney <david.daney@cavium.com>
>
> We need to move it out of __init so we don't have section mismatch problems.
>
> Signed-off-by: David Daney <david.daney@cavium.com>
> ---
> arch/mips/include/asm/uasm.h | 2 +-
> arch/mips/kernel/traps.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/include/asm/uasm.h b/arch/mips/include/asm/uasm.h
> index 370d967..90b4f5e 100644
> --- a/arch/mips/include/asm/uasm.h
> +++ b/arch/mips/include/asm/uasm.h
> @@ -11,7 +11,7 @@
>
> #include <linux/types.h>
>
> -#ifdef CONFIG_EXPORT_UASM
> +#if defined(CONFIG_EXPORT_UASM) || IS_ENABLED(CONFIG_KVM_MIPSVZ)
> #include <linux/export.h>
> #define __uasminit
> #define __uasminitdata

I'd rather keep KVM bits out of uasm.h. A select EXPORT_UASM in Kconfig
would have been cleaner - but read below.

> diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
> index f008795..fca0a2f 100644
> --- a/arch/mips/kernel/traps.c
> +++ b/arch/mips/kernel/traps.c
> @@ -1457,7 +1457,7 @@ unsigned long ebase;
> unsigned long exception_handlers[32];
> unsigned long vi_handlers[64];
>
> -void __init *set_except_vector(int n, void *addr)
> +void __uasminit *set_except_vector(int n, void *addr)

A __uasminit tag is a bit unobvious because set_except_vector is not part of
uasm. I could understand __cpuinit - but of course that doesn't sort your
problem. Maybe we should just drop the __init tag alltogether? Or if we
really want set_except_vector to become part of the uasm subsystem, then
probably it's declaration should move from setup.h to uasm.h.

Ralf


\
 
 \ /
  Last update: 2013-06-16 13:41    [W:0.370 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site