From: David Daney <ddaney.cavm@gmail.com>
To: chenj <chenj@lemote.com>, linux-mips@linux-mips.org, ralf@linux-mips.org
Cc: chenhc@lemote.com
Subject: Re: [v2] mips: use wsbh/dsbh/dshd on Loongson 3A
Date: Tue, 19 Aug 2014 16:21:53 -0700 [thread overview]
Message-ID: <53F3DC11.1080208@gmail.com> (raw)
In-Reply-To: <1408093018-25436-1-git-send-email-chenj@lemote.com>
On 08/15/2014 01:56 AM, chenj wrote:
> Signed-off-by: chenj <chenj@lemote.com>
> ---
> This patch is modified from http://patchwork.linux-mips.org/patch/7054/
> The original author is ralf.
>
> v2: using "#if defined(CONFIG_CPU_MIPSR2) || defined(CONFIG_CPU_LOONGSON3)"
> instead of "#if cpu_has_wsbh" in csum_partial.S
>
> arch/mips/include/asm/cpu-features.h | 10 ++++++++++
> .../include/asm/mach-cavium-octeon/cpu-feature-overrides.h | 1 +
> .../mips/include/asm/mach-loongson/cpu-feature-overrides.h | 2 ++
> arch/mips/include/uapi/asm/swab.h | 14 ++++++++++++--
> arch/mips/lib/csum_partial.S | 10 ++++++++--
> arch/mips/net/bpf_jit.c | 2 +-
> 6 files changed, 34 insertions(+), 5 deletions(-)
>
[...]
> diff --git a/arch/mips/include/uapi/asm/swab.h b/arch/mips/include/uapi/asm/swab.h
> index ac9a8f9..20b884a 100644
> --- a/arch/mips/include/uapi/asm/swab.h
> +++ b/arch/mips/include/uapi/asm/swab.h
[...]
> @@ -46,8 +53,11 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
> static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
> {
> __asm__(
> + " .set push \n"
> + " .set arch=mips64r2 \n"
> " dsbh %0, %1\n"
> " dshd %0, %0"
> + " .set pop \n"
> : "=r" (x)
> : "r" (x));
>
This section of the patch is defective. It appears to have not been
compile tested.
On mips-for-linux-next commit d4c5edf76f14720a32805202129dfa8206560035
produces:
.
.
.
mips64-octeon-linux-gnu-gcc -Wp,-MD,kernel/bpf/.core.o.d -nostdinc
-isystem
/nfs/sdk/daily/tools-140726/bin/../lib/gcc/mips64-octeon-linux-gnu/4.7.0/include
-I./arch/mips/include -Iarch/mips/include/generated -Iinclude
-I./arch/mips/include/uapi -Iarch/mips/include/generated/uapi
-I./include/uapi -Iinclude/generated/uapi -include
./include/linux/kconfig.h -D__KERNEL__
-DVMLINUX_LOAD_ADDRESS=0xffffffff81100000 -DDATAOFFSET=0 -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security
-mno-check-zero-division -mabi=64 -G 0 -mno-abicalls -fno-pic -pipe
-msoft-float -ffreestanding -march=octeon -Wa,--trap -Wa,-mfix-cn63xxp1
-I./arch/mips/include/asm/mach-cavium-octeon
-I./arch/mips/include/asm/mach-generic -msym32 -DKBUILD_64BIT_SYM32
-fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0
-Wframe-larger-than=2048 -fno-stack-protector
-Wno-unused-but-set-variable -fomit-frame-pointer
-fno-var-tracking-assignments -g -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack
-Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(core)"
-D"KBUILD_MODNAME=KBUILD_STR(core)" -c -o kernel/bpf/core.o
kernel/bpf/core.c
{standard input}: Assembler messages:
{standard input}:3016: Error: Illegal operands `dshd $3,$3 .set pop'
.
.
.
Each line except the final line needs to be terminated with a '\n', but
you did not do this following the "dshd" line.
David Daney
next prev parent reply other threads:[~2014-08-19 23:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 2:55 Status about csum_partial optimization patches cee1
2014-08-15 8:56 ` [v2] mips: use wsbh/dsbh/dshd on Loongson 3A chenj
2014-08-19 23:21 ` David Daney [this message]
2014-08-20 3:11 ` Chen Jie
2014-08-26 1:41 ` Status about csum_partial optimization patches cee1
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=53F3DC11.1080208@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=chenhc@lemote.com \
--cc=chenj@lemote.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox