2010-11-21 23:46:49

by Sven Schnelle

[permalink] [raw]
Subject: AVR32 build fixes

This fixes two small bugs in the current git tree.


2010-11-21 23:46:46

by Sven Schnelle

[permalink] [raw]
Subject: [PATCH 2/2] [AVR32] Fix typo in atmel_usba_udc.c

It should be 'udc' not 'ubc' in usba_udc_probe()

Signed-off-by: Sven Schnelle <[email protected]>
---
drivers/usb/gadget/atmel_usba_udc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index b5e20e8..717ff65 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -2017,7 +2017,7 @@ static int __init usba_udc_probe(struct platform_device *pdev)
}
} else {
/* gpio_request fail so use -EINVAL for gpio_is_valid */
- ubc->vbus_pin = -EINVAL;
+ udc->vbus_pin = -EINVAL;
}
}

--
1.7.2.3

2010-11-21 23:46:58

by Sven Schnelle

[permalink] [raw]
Subject: [PATCH 1/2] AVR32: Fix sys_execve breakage

commit d7627467b7a8dd6944885290a03a07ceb28c10eb change sys_execve()
arch/avr32, but the version in syscalls.h is still the old one.

Signed-off-by: Sven Schnelle <[email protected]>
---
arch/avr32/include/asm/syscalls.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
index ab608b7..dd69aa0 100644
--- a/arch/avr32/include/asm/syscalls.h
+++ b/arch/avr32/include/asm/syscalls.h
@@ -24,6 +24,11 @@ asmlinkage int sys_vfork(struct pt_regs *);
asmlinkage int sys_execve(const char __user *, char __user *__user *,
char __user *__user *, struct pt_regs *);

+asmlinkage int sys_execve(const char __user *ufilename,
+ const char __user *const __user *uargv,
+ const char __user *const __user *uenvp,
+ struct pt_regs *regs);
+
/* kernel/signal.c */
asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *,
struct pt_regs *);
--
1.7.2.3

2010-11-22 07:19:53

by Hans-Christian Egtvedt

[permalink] [raw]
Subject: Re: [PATCH 2/2] [AVR32] Fix typo in atmel_usba_udc.c

On Mon, 2010-11-22 at 00:28 +0100, Sven Schnelle wrote:
> It should be 'udc' not 'ubc' in usba_udc_probe()
>
> Signed-off-by: Sven Schnelle <[email protected]>
> ---
> drivers/usb/gadget/atmel_usba_udc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
> index b5e20e8..717ff65 100644
> --- a/drivers/usb/gadget/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/atmel_usba_udc.c
> @@ -2017,7 +2017,7 @@ static int __init usba_udc_probe(struct platform_device *pdev)
> }
> } else {
> /* gpio_request fail so use -EINVAL for gpio_is_valid */
> - ubc->vbus_pin = -EINVAL;
> + udc->vbus_pin = -EINVAL;

Nice catch, please send this through the USB mailing list, it is not
specific to AVR32.

--
Hans-Christian Egtvedt

2010-12-09 06:03:29

by Hans-Christian Egtvedt

[permalink] [raw]
Subject: Re: [PATCH 1/2] AVR32: Fix sys_execve breakage

On Mon, 2010-11-22 at 00:28 +0100, Sven Schnelle wrote:
> commit d7627467b7a8dd6944885290a03a07ceb28c10eb change sys_execve()
> arch/avr32, but the version in syscalls.h is still the old one.
>
> Signed-off-by: Sven Schnelle <[email protected]>
> ---
> arch/avr32/include/asm/syscalls.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
> index ab608b7..dd69aa0 100644
> --- a/arch/avr32/include/asm/syscalls.h
> +++ b/arch/avr32/include/asm/syscalls.h
> @@ -24,6 +24,11 @@ asmlinkage int sys_vfork(struct pt_regs *);
> asmlinkage int sys_execve(const char __user *, char __user *__user *,
> char __user *__user *, struct pt_regs *);
>
> +asmlinkage int sys_execve(const char __user *ufilename,

Invalid patch, double definition of sys_execve.

<snipp>

--
Hans-Christian Egtvedt

2010-12-09 08:26:58

by Sven Schnelle

[permalink] [raw]
Subject: [PATCH] AVR32: Fix sys_execve breakage

From: Sven Schnelle <[email protected]>

Signed-off-by: Sven Schnelle <[email protected]>
---
arch/avr32/include/asm/syscalls.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
index ab608b7..1440368 100644
--- a/arch/avr32/include/asm/syscalls.h
+++ b/arch/avr32/include/asm/syscalls.h
@@ -21,8 +21,10 @@ asmlinkage int sys_clone(unsigned long, unsigned long,
unsigned long, unsigned long,
struct pt_regs *);
asmlinkage int sys_vfork(struct pt_regs *);
-asmlinkage int sys_execve(const char __user *, char __user *__user *,
- char __user *__user *, struct pt_regs *);
+asmlinkage int sys_execve(const char __user *ufilename,
+ const char __user *const __user *uargv,
+ const char __user *const __user *uenvp,
+ struct pt_regs *regs);

/* kernel/signal.c */
asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *,
--
1.7.2.3

2010-12-09 08:26:57

by Sven Schnelle

[permalink] [raw]
Subject: [Patch v2] AVR32: fix sys_execve build breakage

> > commit d7627467b7a8dd6944885290a03a07ceb28c10eb change sys_execve()
> > arch/avr32, but the version in syscalls.h is still the old one.
> >
> > Signed-off-by: Sven Schnelle <[email protected]>
> > ---
> > arch/avr32/include/asm/syscalls.h | 5 +++++
> > 1 files changed, 5 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
> > index ab608b7..dd69aa0 100644
> > --- a/arch/avr32/include/asm/syscalls.h
> > +++ b/arch/avr32/include/asm/syscalls.h
> > @@ -24,6 +24,11 @@ asmlinkage int sys_vfork(struct pt_regs *);
> > asmlinkage int sys_execve(const char __user *, char __user *__user *,
> > char __user *__user *, struct pt_regs *);
> >
> > +asmlinkage int sys_execve(const char __user *ufilename,
>
> Invalid patch, double definition of sys_execve.

This should be the right one. Stupid me.

2010-12-09 08:28:15

by Sven Schnelle

[permalink] [raw]
Subject: [PATCH] AVR32: Fix sys_execve breakage

From: Sven Schnelle <[email protected]>

Signed-off-by: Sven Schnelle <[email protected]>
---
arch/avr32/include/asm/syscalls.h | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
index ab608b7..1440368 100644
--- a/arch/avr32/include/asm/syscalls.h
+++ b/arch/avr32/include/asm/syscalls.h
@@ -21,8 +21,10 @@ asmlinkage int sys_clone(unsigned long, unsigned long,
unsigned long, unsigned long,
struct pt_regs *);
asmlinkage int sys_vfork(struct pt_regs *);
-asmlinkage int sys_execve(const char __user *, char __user *__user *,
- char __user *__user *, struct pt_regs *);
+asmlinkage int sys_execve(const char __user *ufilename,
+ const char __user *const __user *uargv,
+ const char __user *const __user *uenvp,
+ struct pt_regs *regs);

/* kernel/signal.c */
asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *,
--
1.7.2.3

2010-12-09 08:42:55

by Hans-Christian Egtvedt

[permalink] [raw]
Subject: Re: [PATCH] AVR32: Fix sys_execve breakage

On Thu, 2010-12-09 at 09:26 +0100, [email protected] wrote:
> From: Sven Schnelle <[email protected]>
>
> Signed-off-by: Sven Schnelle <[email protected]>
> ---
> arch/avr32/include/asm/syscalls.h | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
> index ab608b7..1440368 100644
> --- a/arch/avr32/include/asm/syscalls.h
> +++ b/arch/avr32/include/asm/syscalls.h
> @@ -21,8 +21,10 @@ asmlinkage int sys_clone(unsigned long, unsigned long,
> unsigned long, unsigned long,
> struct pt_regs *);
> asmlinkage int sys_vfork(struct pt_regs *);
> -asmlinkage int sys_execve(const char __user *, char __user *__user *,
> - char __user *__user *, struct pt_regs *);
> +asmlinkage int sys_execve(const char __user *ufilename,
> + const char __user *const __user *uargv,
> + const char __user *const __user *uenvp,
> + struct pt_regs *regs);
>
> /* kernel/signal.c */
> asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *,

Also discussed at https://lkml.org/lkml/2010/12/8/401 Sorry for not
letting you know in my first reply.

I am thinking something in the order of

>From 8e2bf82870c3324d7151493d5557244fb178dbce Mon Sep 17 00:00:00 2001
From: Hans-Christian Egtvedt <[email protected]>
Date: Thu, 9 Dec 2010 09:00:01 +0100
Subject: [PATCH] avr32: use syscall prototypes from asm-generic instead of arch

This patch removes the redundant syscalls prototypes in the architecture
specific syscalls.h header file. These were identical with the ones in
asm-generic/syscalls.h.

Signed-off-by: Hans-Christian Egtvedt <[email protected]>
---
arch/avr32/include/asm/syscalls.h | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/arch/avr32/include/asm/syscalls.h b/arch/avr32/include/asm/syscalls.h
index 1440368..730a461 100644
--- a/arch/avr32/include/asm/syscalls.h
+++ b/arch/avr32/include/asm/syscalls.h
@@ -16,20 +16,9 @@
#include <linux/signal.h>

/* kernel/process.c */
-asmlinkage int sys_fork(struct pt_regs *);
asmlinkage int sys_clone(unsigned long, unsigned long,
unsigned long, unsigned long,
struct pt_regs *);
-asmlinkage int sys_vfork(struct pt_regs *);
-asmlinkage int sys_execve(const char __user *ufilename,
- const char __user *const __user *uargv,
- const char __user *const __user *uenvp,
- struct pt_regs *regs);
-
-/* kernel/signal.c */
-asmlinkage int sys_sigaltstack(const stack_t __user *, stack_t __user *,
- struct pt_regs *);
-asmlinkage int sys_rt_sigreturn(struct pt_regs *);

/* mm/cache.c */
asmlinkage int sys_cacheflush(int, void __user *, size_t);
--
1.7.1

--
Hans-Christian Egtvedt