From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@c-s.fr>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] powerpc/32: Add missing context synchronisation with CONFIG_VMAP_STACK
Date: Sat, 25 Jan 2020 23:15:13 +1100 [thread overview]
Message-ID: <87r1znhgvi.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <872477f7c7552d3bb7baf0b302398fcd42c5fcfd.1579885334.git.christophe.leroy@c-s.fr>
Christophe Leroy <christophe.leroy@c-s.fr> writes:
> After reactivation of data translation by modifying MSR[DR], a isync
> is required to ensure the translation is effective.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> Rebased on powerpc/merge-test
>
> @mpe: If not too late:
> - change to head_32.h should be squashed into "powerpc/32: prepare for CONFIG_VMAP_STACK"
> - change to head_32.S should be squashed into "powerpc/32s: Enable CONFIG_VMAP_STACK"
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/kernel/head_32.S | 1 +
> arch/powerpc/kernel/head_32.h | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h
> index 73a035b40dbf..a6a5fbbf8504 100644
> --- a/arch/powerpc/kernel/head_32.h
> +++ b/arch/powerpc/kernel/head_32.h
> @@ -43,6 +43,7 @@
> .ifeq \for_rtas
> li r11, MSR_KERNEL & ~(MSR_IR | MSR_RI) /* can take DTLB miss */
> mtmsr r11
> + isync
Actually this one leads to:
/home/michael/linux/arch/powerpc/kernel/head_8xx.S: Assembler messages:
/home/michael/linux/arch/powerpc/kernel/head_8xx.S:151: Error: attempt to move .org backwards
make[3]: *** [/home/michael/linux/scripts/Makefile.build:348: arch/powerpc/kernel/head_8xx.o] Error 1
For mpc885_ads_defconfig.
That's the alignment exception overflowing into the program check
handler:
/* Alignment exception */
. = 0x600
Alignment:
EXCEPTION_PROLOG handle_dar_dsisr=1
save_dar_dsisr_on_stack r4, r5, r11
li r6, RPN_PATTERN
mtspr SPRN_DAR, r6 /* Tag DAR, to be used in DTLB Error */
addi r3,r1,STACK_FRAME_OVERHEAD
EXC_XFER_STD(0x600, alignment_exception)
/* Program check exception */
EXCEPTION(0x700, ProgramCheck, program_check_exception, EXC_XFER_STD)
Can't see an obvious/easy way to fix it.
cheers
> .endif
> subi r11, r1, INT_FRAME_SIZE /* use r1 if kernel */
> #else
WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@c-s.fr>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/32: Add missing context synchronisation with CONFIG_VMAP_STACK
Date: Sat, 25 Jan 2020 23:15:13 +1100 [thread overview]
Message-ID: <87r1znhgvi.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <872477f7c7552d3bb7baf0b302398fcd42c5fcfd.1579885334.git.christophe.leroy@c-s.fr>
Christophe Leroy <christophe.leroy@c-s.fr> writes:
> After reactivation of data translation by modifying MSR[DR], a isync
> is required to ensure the translation is effective.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> Rebased on powerpc/merge-test
>
> @mpe: If not too late:
> - change to head_32.h should be squashed into "powerpc/32: prepare for CONFIG_VMAP_STACK"
> - change to head_32.S should be squashed into "powerpc/32s: Enable CONFIG_VMAP_STACK"
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
> ---
> arch/powerpc/kernel/head_32.S | 1 +
> arch/powerpc/kernel/head_32.h | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/arch/powerpc/kernel/head_32.h b/arch/powerpc/kernel/head_32.h
> index 73a035b40dbf..a6a5fbbf8504 100644
> --- a/arch/powerpc/kernel/head_32.h
> +++ b/arch/powerpc/kernel/head_32.h
> @@ -43,6 +43,7 @@
> .ifeq \for_rtas
> li r11, MSR_KERNEL & ~(MSR_IR | MSR_RI) /* can take DTLB miss */
> mtmsr r11
> + isync
Actually this one leads to:
/home/michael/linux/arch/powerpc/kernel/head_8xx.S: Assembler messages:
/home/michael/linux/arch/powerpc/kernel/head_8xx.S:151: Error: attempt to move .org backwards
make[3]: *** [/home/michael/linux/scripts/Makefile.build:348: arch/powerpc/kernel/head_8xx.o] Error 1
For mpc885_ads_defconfig.
That's the alignment exception overflowing into the program check
handler:
/* Alignment exception */
. = 0x600
Alignment:
EXCEPTION_PROLOG handle_dar_dsisr=1
save_dar_dsisr_on_stack r4, r5, r11
li r6, RPN_PATTERN
mtspr SPRN_DAR, r6 /* Tag DAR, to be used in DTLB Error */
addi r3,r1,STACK_FRAME_OVERHEAD
EXC_XFER_STD(0x600, alignment_exception)
/* Program check exception */
EXCEPTION(0x700, ProgramCheck, program_check_exception, EXC_XFER_STD)
Can't see an obvious/easy way to fix it.
cheers
> .endif
> subi r11, r1, INT_FRAME_SIZE /* use r1 if kernel */
> #else
next prev parent reply other threads:[~2020-01-25 12:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 17:03 [PATCH] powerpc/32: Add missing context synchronisation with CONFIG_VMAP_STACK Christophe Leroy
2020-01-24 17:03 ` Christophe Leroy
2020-01-25 10:30 ` Michael Ellerman
2020-01-25 10:30 ` Michael Ellerman
2020-01-25 12:15 ` Michael Ellerman [this message]
2020-01-25 12:15 ` Michael Ellerman
2020-01-25 13:00 ` Christophe Leroy
2020-01-25 13:00 ` Christophe Leroy
2020-01-25 13:28 ` Michael Ellerman
2020-01-25 13:28 ` Michael Ellerman
2020-01-25 14:35 ` Christophe Leroy
2020-01-25 14:35 ` Christophe Leroy
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=87r1znhgvi.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=benh@kernel.crashing.org \
--cc=christophe.leroy@c-s.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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.