diff mbox

[v2] arch: arm64: kernel: add '#ifdef CONFIG_COMPAT' for aarch32_break_handler()

Message ID 51C81115.4070803@asianux.com (mailing list archive)
State New, archived
Headers show

Commit Message

Chen Gang June 24, 2013, 9:27 a.m. UTC
If 'COMPAT' not defined, aarch32_break_handler() cannot pass compiling,
and it can work independent with 'COMPAT', so remove dummy definition.

The related make:

  make ARCH=arm64 randconfig
  make ARCH=arm64 menuconfig
  make ARCH=arm64 V=1 EXTRA_CFLAGS=-W

The related error:

  arch/arm64/kernel/debug-monitors.c:249:5: error: redefinition of ‘aarch32_break_handler’
  In file included from arch/arm64/kernel/debug-monitors.c:29:0:
  /root/linux-next/arch/arm64/include/asm/debug-monitors.h:89:12: note: previous definition of ‘aarch32_break_handler’ was here



Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 arch/arm64/include/asm/debug-monitors.h |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)

Comments

Will Deacon June 24, 2013, 10:14 a.m. UTC | #1
On Mon, Jun 24, 2013 at 10:27:49AM +0100, Chen Gang wrote:
> 
> If 'COMPAT' not defined, aarch32_break_handler() cannot pass compiling,
> and it can work independent with 'COMPAT', so remove dummy definition.
> 
> The related make:
> 
>   make ARCH=arm64 randconfig
>   make ARCH=arm64 menuconfig
>   make ARCH=arm64 V=1 EXTRA_CFLAGS=-W

This sequence isn't really very useful, so I wouldn't bother including it in
the commit message. You can trigger this issue just by disabling
CONFIG_COMPAT.

> The related error:
> 
>   arch/arm64/kernel/debug-monitors.c:249:5: error: redefinition of ‘aarch32_break_handler’
>   In file included from arch/arm64/kernel/debug-monitors.c:29:0:
>   /root/linux-next/arch/arm64/include/asm/debug-monitors.h:89:12: note: previous definition of ‘aarch32_break_handler’ was here
> 
> 
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>  arch/arm64/include/asm/debug-monitors.h |    7 -------
>  1 files changed, 0 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
> index ef8235c..a2232d0 100644
> --- a/arch/arm64/include/asm/debug-monitors.h
> +++ b/arch/arm64/include/asm/debug-monitors.h
> @@ -83,14 +83,7 @@ static inline int reinstall_suspended_bps(struct pt_regs *regs)
>  }
>  #endif
>  
> -#ifdef CONFIG_COMPAT
>  int aarch32_break_handler(struct pt_regs *regs);
> -#else
> -static int aarch32_break_handler(struct pt_regs *regs)
> -{
> -	return -EFAULT;
> -}
> -#endif

Code looks fine to me:

  Acked-by: Will Deacon <will.deacon@arm.com>

Will
Chen Gang June 24, 2013, 10:16 a.m. UTC | #2
On 06/24/2013 06:14 PM, Will Deacon wrote:
> On Mon, Jun 24, 2013 at 10:27:49AM +0100, Chen Gang wrote:
>> > 
>> > If 'COMPAT' not defined, aarch32_break_handler() cannot pass compiling,
>> > and it can work independent with 'COMPAT', so remove dummy definition.
>> > 
>> > The related make:
>> > 
>> >   make ARCH=arm64 randconfig
>> >   make ARCH=arm64 menuconfig
>> >   make ARCH=arm64 V=1 EXTRA_CFLAGS=-W
> This sequence isn't really very useful, so I wouldn't bother including it in
> the commit message. You can trigger this issue just by disabling
> CONFIG_COMPAT.
> 

OK, thanks. Next time, I need notice about it.

>> > The related error:
>> > 
>> >   arch/arm64/kernel/debug-monitors.c:249:5: error: redefinition of ‘aarch32_break_handler’
>> >   In file included from arch/arm64/kernel/debug-monitors.c:29:0:
>> >   /root/linux-next/arch/arm64/include/asm/debug-monitors.h:89:12: note: previous definition of ‘aarch32_break_handler’ was here
>> > 
>> > 
>> > 
>> > Signed-off-by: Chen Gang <gang.chen@asianux.com>
>> > ---
>> >  arch/arm64/include/asm/debug-monitors.h |    7 -------
>> >  1 files changed, 0 insertions(+), 7 deletions(-)
>> > 
>> > diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
>> > index ef8235c..a2232d0 100644
>> > --- a/arch/arm64/include/asm/debug-monitors.h
>> > +++ b/arch/arm64/include/asm/debug-monitors.h
>> > @@ -83,14 +83,7 @@ static inline int reinstall_suspended_bps(struct pt_regs *regs)
>> >  }
>> >  #endif
>> >  
>> > -#ifdef CONFIG_COMPAT
>> >  int aarch32_break_handler(struct pt_regs *regs);
>> > -#else
>> > -static int aarch32_break_handler(struct pt_regs *regs)
>> > -{
>> > -	return -EFAULT;
>> > -}
>> > -#endif
> Code looks fine to me:
> 
>   Acked-by: Will Deacon <will.deacon@arm.com>

Thanks.
Stefano Stabellini June 24, 2013, 3:43 p.m. UTC | #3
On Mon, 24 Jun 2013, Chen Gang wrote:
> Hello Maintainers:
> 
> if 'CONFIG_XEN'
> 
>   CC      arch/arm64/xen/../../arm/xen/enlighten.o
> arch/arm64/xen/../../arm/xen/enlighten.c:19:26: fatal error: asm/paravirt.h: No such file or directory
> 
> The related .config file for next-20130624 is in attachment.
> 
> 
> If "ln -s ../../../arm/include/asm/paravirt.h paravirt.h", it can pass
> compiling, but I do not know how to make a patch for it ("ln -s ..."),
> Do we have another more suitable ways for it (or another fixing ways) ?
> 
> Welcome any suggestions or completions.

The problem is caused by:

commit 3a885582a366caf868b0782041c44854ff4c3568
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Wed May 29 10:56:34 2013 +0000

    xen/arm: account for stolen ticks

that is in my tree for linux-next (even though I have not received any
replies from the ARM maintainers so I don't know when and if it is going
to go upstream).

I think that the best thing to do would be to add a couple of ifdef
CONFIG_PARAVIRT in arch/arm/xen/enlighten.c. I'll add them to my tree.
diff mbox

Patch

diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
index ef8235c..a2232d0 100644
--- a/arch/arm64/include/asm/debug-monitors.h
+++ b/arch/arm64/include/asm/debug-monitors.h
@@ -83,14 +83,7 @@  static inline int reinstall_suspended_bps(struct pt_regs *regs)
 }
 #endif
 
-#ifdef CONFIG_COMPAT
 int aarch32_break_handler(struct pt_regs *regs);
-#else
-static int aarch32_break_handler(struct pt_regs *regs)
-{
-	return -EFAULT;
-}
-#endif
 
 #endif	/* __ASSEMBLY */
 #endif	/* __KERNEL__ */