From: Sam Ravnborg <sam@ravnborg.org>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH 09/11] sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.
Date: Tue, 25 Oct 2016 18:39:40 +0000 [thread overview]
Message-ID: <20161025183940.GA14043@ravnborg.org> (raw)
In-Reply-To: <20161025.110228.1744774836277392991.davem@davemloft.net>
Hi Dave.
One small comment below.
I did not try to build with these patches, but stumbled over this detail.
On Tue, Oct 25, 2016 at 11:02:28AM -0400, David Miller wrote:
>
> Report the exact number of bytes which have not been successfully
> copied when an exception occurs, using the running remaining length.
>
> Signed-off-by: David S. Miller <davem@davemloft.net>
> ---
> arch/sparc/lib/U3copy_from_user.S | 8 +-
> arch/sparc/lib/U3copy_to_user.S | 8 +-
> arch/sparc/lib/U3memcpy.S | 227 ++++++++++++++++++++++++++------------
> 3 files changed, 162 insertions(+), 81 deletions(-)
>
> diff --git a/arch/sparc/lib/U3copy_from_user.S b/arch/sparc/lib/U3copy_from_user.S
> index 1046e2b..db73010 100644
> --- a/arch/sparc/lib/U3copy_from_user.S
> +++ b/arch/sparc/lib/U3copy_from_user.S
> @@ -3,19 +3,19 @@
> * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
> */
>
> -#define EX_LD(x) \
> +#define EX_LD(x,y) \
> 98: x; \
> .section __ex_table,"a";\
> .align 4; \
> - .word 98b, __retl_mone; \
> + .word 98b, y; \
> .text; \
> .align 4;
>
> -#define EX_LD_FP(x) \
> +#define EX_LD_FP(x,y) \
> 98: x; \
> .section __ex_table,"a";\
> .align 4; \
> - .word 98b, __retl_mone_fp;\
> + .word 98b, y##_fp; \
> .text; \
> .align 4;
>
> diff --git a/arch/sparc/lib/U3copy_to_user.S b/arch/sparc/lib/U3copy_to_user.S
> index 032b0c5..c4ee858 100644
> --- a/arch/sparc/lib/U3copy_to_user.S
> +++ b/arch/sparc/lib/U3copy_to_user.S
> @@ -3,19 +3,19 @@
> * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com)
> */
>
> -#define EX_ST(x) \
> +#define EX_ST(x,y) \
> 98: x; \
> .section __ex_table,"a";\
> .align 4; \
> - .word 98b, __retl_mone; \
> + .word 98b, y; \
> .text; \
> .align 4;
>
> -#define EX_ST_FP(x) \
> +#define EX_ST_FP(x,y) \
> 98: x; \
> .section __ex_table,"a";\
> .align 4; \
> - .word 98b, __retl_mone_fp;\
> + .word 98b, y##_fp; \
> .text; \
> .align 4;
>
> diff --git a/arch/sparc/lib/U3memcpy.S b/arch/sparc/lib/U3memcpy.S
> index 491ee69..54f9870 100644
> --- a/arch/sparc/lib/U3memcpy.S
> +++ b/arch/sparc/lib/U3memcpy.S
> @@ -4,6 +4,7 @@
> */
>
> #ifdef __KERNEL__
> +#include <linux/linkage.h>
> #include <asm/visasm.h>
> #include <asm/asi.h>
> #define GLOBAL_SPARE %g7
> @@ -22,21 +23,17 @@
> #endif
>
> #ifndef EX_LD
> -#define EX_LD(x) x
> +#define EX_LD(x,y) x
The above line will result in following assembelr code fragment:
.word 98b, ; \
^
empty
Maybe this is just fine - but it looks wrong.
Same goes for other uses of related macros.
Sam
next prev parent reply other threads:[~2016-10-25 18:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-25 15:02 [PATCH 09/11] sparc64: Convert U3copy_{from,to}_user to accurate exception reporting David Miller
2016-10-25 18:39 ` Sam Ravnborg [this message]
2016-10-25 19:07 ` David Miller
2016-10-25 19:16 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161025183940.GA14043@ravnborg.org \
--to=sam@ravnborg.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.