From: David Daney <ddaney.cavm@gmail.com>
To: Markos Chandras <markos.chandras@imgtec.com>,
Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH RFC 12/67] MIPS: asm: asmmacro: Replace add instructions with "addui"
Date: Thu, 18 Dec 2014 10:56:48 -0800 [thread overview]
Message-ID: <54932370.605@gmail.com> (raw)
In-Reply-To: <1418915416-3196-13-git-send-email-markos.chandras@imgtec.com>
On 12/18/2014 07:09 AM, Markos Chandras wrote:
> The use of "add" instruction for immediate operations is wrong and
> relies to gas being smart enough to notice that and replace it with
> either addi or addui. However, MIPS R6 removed the addi instruction
> so, fix this problem properly by using the correct instruction
> directly.
>
This is another case of the use of "add" being a real bug. We should
never have faulting instructions like this in the kernel.
Can you send all patches in this set that fix this bug as a separate
patch? Since they are obviously correct, and really should be used by
all non-R6 processors, we can get them in sooner that the entire R6 thing.
Thanks,
David Daney
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---
> arch/mips/include/asm/asmmacro.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/mips/include/asm/asmmacro.h b/arch/mips/include/asm/asmmacro.h
> index fe08084f5adb..55c07c40c199 100644
> --- a/arch/mips/include/asm/asmmacro.h
> +++ b/arch/mips/include/asm/asmmacro.h
> @@ -304,7 +304,7 @@
> .set push
> .set noat
> SET_HARDFLOAT
> - add $1, \base, \off
> + addiu $1, \base, \off
> .word LDD_MSA_INSN | (\wd << 6)
> .set pop
> .endm
> @@ -313,7 +313,7 @@
> .set push
> .set noat
> SET_HARDFLOAT
> - add $1, \base, \off
> + addiu $1, \base, \off
> .word STD_MSA_INSN | (\wd << 6)
> .set pop
> .endm
>
next prev parent reply other threads:[~2014-12-18 18:56 UTC|newest]
Thread overview: 187+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-18 15:09 [PATCH RFC 00/67] Add MIPS R6 support Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 01/67] MIPS: Add generic QEMU R6 PRid and cpu type identifiers Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 19:10 ` David Daney
2014-12-19 8:49 ` Markos Chandras
2014-12-19 8:49 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 02/67] MIPS: Add cases for CPU_QEMUR6 Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 03/67] MIPS: Add MIPS QEMUR6 probe support Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 04/67] MIPS: Add build support for the MIPS R6 ISA Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 05/67] MIPS: mm: uasm: Add signed 9-bit immediate related macros Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 06/67] MIPS: mm: Add MIPS R6 instruction encodings Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 07/67] MIPS: asm: asm: Add new macros to set ISA and arch asm annotations Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 08/67] MIPS: asm: module: define MODULE_PROC_FAMILY for MIPS R6 Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 09/67] MIPS: asm: stackframe: Do not preserve the HI/LO registers on " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 10/67] MIPS: asm: asmmacro: Drop unused 'reg' argument on MIPSR2 Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 11/67] MIPS: asm: asmmacro: Add MIPS R6 support to the simple EI/DI variants Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 12/67] MIPS: asm: asmmacro: Replace add instructions with "addui" Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 18:56 ` David Daney [this message]
2014-12-19 9:01 ` Markos Chandras
2014-12-19 9:01 ` Markos Chandras
2015-01-11 23:34 ` Maciej W. Rozycki
2015-01-13 13:13 ` Markos Chandras
2015-01-13 13:13 ` Markos Chandras
2015-01-13 14:58 ` Maciej W. Rozycki
2015-01-13 15:04 ` Markos Chandras
2015-01-13 15:04 ` Markos Chandras
2015-01-13 15:24 ` Maciej W. Rozycki
2014-12-18 15:09 ` [PATCH RFC 13/67] MIPS: Use generic checksum functions for MIPS R6 Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 14/67] MIPS: asm: cpu: Add MIPSR6 ISA definitions Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 15/67] MIPS: asm: hazards: Add MIPSR6 definitions Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 16/67] MIPS: asm: irqflags: Add MIPS R6 related definitions Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 17/67] MIPS: asm: r4kcache: Add MIPS R6 cache unroll functions Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 18/67] MIPS: asm: spram: Add MIPS R6 related definitions Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 19/67] MIPS: asm: atomic: Update asm and ISA constrains for MIPS R6 support Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 18:50 ` David Daney
2014-12-18 18:59 ` Måns Rullgård
2014-12-18 19:01 ` Ralf Baechle
2014-12-18 21:04 ` Matthew Fortune
2014-12-18 21:04 ` Matthew Fortune
2014-12-18 22:18 ` Måns Rullgård
2014-12-18 22:18 ` Måns Rullgård
2014-12-18 22:19 ` David Daney
2014-12-18 22:58 ` Matthew Fortune
2014-12-18 23:43 ` Måns Rullgård
2014-12-18 23:43 ` Måns Rullgård
2014-12-19 10:20 ` Markos Chandras
2014-12-19 12:39 ` Markos Chandras
2014-12-19 13:53 ` Matthew Fortune
2014-12-19 13:55 ` Markos Chandras
2015-01-11 23:51 ` Maciej W. Rozycki
2014-12-19 12:29 ` Ralf Baechle
2014-12-19 10:01 ` Markos Chandras
2014-12-19 10:01 ` Markos Chandras
2014-12-19 16:38 ` David Daney
2014-12-18 15:09 ` [PATCH RFC 20/67] MIPS: asm: cmpxchg: " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 21/67] MIPS: asm: bitops: " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 22/67] MIPS: asm: futex: " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 23/67] MIPS: asm: spinlock: Update asm " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 24/67] MIPS: asm: spinlock: Replace sub instruction with addiu Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 18:53 ` David Daney
2014-12-18 19:06 ` Ralf Baechle
2014-12-19 8:51 ` Markos Chandras
2014-12-19 8:51 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 25/67] MIPS: kernel: cpu-bugs64: Do not check R6 cores for existing 64-bit bugs Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 26/67] MIPS: kernel: cevt-r4k: Add MIPS R6 to the c0_compare_interrupt handler Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 27/67] MIPS: kernel: cpu-probe.c: Add support for MIPS R6 Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 28/67] MIPS: kernel: entry.S: Add MIPS R6 related definitions Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 29/67] MIPS: kernel: proc: Add MIPS R6 support to /proc/cpuinfo Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-19 11:32 ` Sergei Shtylyov
2014-12-18 15:09 ` [PATCH RFC 30/67] MIPS: kernel: traps: Add MIPS R6 related definitions Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 31/67] MIPS: kernel: r4k_switch: Add support for MIPS R6 Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 32/67] MIPS: kernel: r4k_fpu: " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 33/67] MIPS: kernel: genex: Set correct ISA level Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 34/67] MIPS: kernel: cps-vec: Replace addi with addiu Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 35/67] MIPS: uapi: inst: Add new opcodes for COP2 instructions Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 36/67] MIPS: kernel: unaligned: Add support for the MIPS R6 Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 37/67] MIPS: lib: memcpy: Add MIPS R6 support Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 38/67] MIPS: lib: memset: " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 39/67] MIPS: mm: page: " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 40/67] MIPS: mm: tlbex: Add MIPS R6 case for the EHB instruction Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 19:05 ` David Daney
2014-12-18 15:09 ` [PATCH RFC 41/67] MIPS: mm: c-r4k: Set the correct ISA level Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 42/67] MIPS: kernel: branch: Prepare the JR instruction for emulation on MIPS R6 Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 43/67] MIPS: kernel: branch: Prevent BLTZL emulation for " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 44/67] MIPS: kernel: branch: Prevent BGEZL " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 45/67] MIPS: kernel: branch: Prevent BLTZAL " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 46/67] MIPS: kernel: branch: Prevent BGEZAL " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 47/67] MIPS: kernel: branch: Prevent BEQL " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 23:56 ` Joshua Kinard
2014-12-19 8:54 ` Markos Chandras
2014-12-19 8:54 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 48/67] MIPS: kernel: branch: Prevent BNEL " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 49/67] MIPS: kernel: branch: Prevent BLEZL " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:09 ` [PATCH RFC 50/67] MIPS: kernel: branch: Prevent BGTZL " Markos Chandras
2014-12-18 15:09 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 51/67] MIPS: uapi: inst: Add new BC1EQZ and BC1NEZ MIPS R6 opcodes Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 52/67] MIPS: kernel: branch: Add support for the BC1{EQ,NE}Z FPU branches Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 53/67] MIPS: kernel: branch: Add new MIPS R6 B{L,G}ΕZ{AL,}C emulation Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-19 11:59 ` Sergei Shtylyov
2014-12-18 15:10 ` [PATCH RFC 54/67] MIPS: kernel: branch: Add new MIPS R6 B{L,G}TZ{AL,}C emulation Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-19 12:02 ` Sergei Shtylyov
2014-12-18 15:10 ` [PATCH RFC 55/67] MIPS: kernel: branch: Emulate the branch compact (BC) on MIPS R6 Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 56/67] MIPS: kernel: branch: Emulate the BOVC, BEQC and BEQZALC R6 instructions Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 19:07 ` David Daney
2014-12-19 8:52 ` Markos Chandras
2014-12-19 8:52 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 57/67] MIPS: kernel: branch: Emulate the BNVC, BNEC and BNEZLAC " Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 19:08 ` David Daney
2014-12-18 15:10 ` [PATCH RFC 58/67] MIPS: kernel: branch: Emulate the BALC R6 instruction Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-19 12:06 ` Sergei Shtylyov
2014-12-18 15:10 ` [PATCH RFC 59/67] MIPS: kernel: branch: Emulate the BEQZC and JIC instructions Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-19 12:08 ` Sergei Shtylyov
2014-12-18 15:10 ` [PATCH RFC 60/67] MIPS: math-emu: cp1emu: Move the fpucondbit struct to a header Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-19 12:10 ` Sergei Shtylyov
2014-12-18 15:10 ` [PATCH RFC 61/67] MIPS: Add LLB bit and related feature for the Config 5 CP0 register Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 62/67] MIPS: asm: mipsregs: Add support for the LLADDR register Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 63/67] MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6 Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 64/67] MIPS: Make use of the ERETNC instruction on " Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 65/67] MIPS: Malta: malta-int: Set correct asm ISA level Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 66/67] MIPS: Malta: Add support for building MIPS R6 kernel Markos Chandras
2014-12-18 15:10 ` Markos Chandras
2014-12-18 15:10 ` [PATCH RFC 67/67] MIPS: Add Malta QEMU 32R6 defconfig Markos Chandras
2014-12-18 15:10 ` Markos Chandras
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=54932370.605@gmail.com \
--to=ddaney.cavm@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=markos.chandras@imgtec.com \
--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