LKML Archive on lore.kernel.org
 help / Atom feed
* [PATCH v2] RISC-V: Add the directive for alignment of stvec's value
@ 2018-08-02 15:21 Zong Li
       [not found] ` <3AB16BFE6992A349B44EA6D8F29BFB476B1EA2CC@ATCPCS16.andestech.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Zong Li @ 2018-08-02 15:21 UTC (permalink / raw)
  To: palmer, aou, hch, linux-riscv, linux-kernel, greentime; +Cc: Zong Li

The stvec's value must be 4 byte alignment by specification definition.
These directives avoid to stvec be set the non-alignment value.

Signed-off-by: Zong Li <zong@andestech.com>
---
 arch/riscv/kernel/head.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
index 3b6293f..11066d5 100644
--- a/arch/riscv/kernel/head.S
+++ b/arch/riscv/kernel/head.S
@@ -94,6 +94,7 @@ relocate:
 	or a0, a0, a1
 	sfence.vma
 	csrw sptbr, a0
+.align 2
 1:
 	/* Set trap vector to spin forever to help debug */
 	la a0, .Lsecondary_park
@@ -143,6 +144,7 @@ relocate:
 	tail smp_callin
 #endif
 
+.align 2
 .Lsecondary_park:
 	/* We lack SMP support or have too many harts, so park this hart */
 	wfi
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: FW: [PATCH v2] RISC-V: Add the directive for alignment of stvec's value
       [not found] ` <3AB16BFE6992A349B44EA6D8F29BFB476B1EA2CC@ATCPCS16.andestech.com>
@ 2018-08-10  0:37   ` " Zong Li
  2018-08-10  1:50     ` Palmer Dabbelt
  0 siblings, 1 reply; 3+ messages in thread
From: Zong Li @ 2018-08-10  0:37 UTC (permalink / raw)
  To: Palmer Dabbelt, aou, hch, linux-riscv, Linux Kernel Mailing List,
	Zong Li, greentime

> Subject: [PATCH v2] RISC-V: Add the directive for alignment of stvec's value
>
> The stvec's value must be 4 byte alignment by specification definition.
> These directives avoid to stvec be set the non-alignment value.
>
> Signed-off-by: Zong Li <zong@andestech.com>
> ---
>  arch/riscv/kernel/head.S | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index 3b6293f..11066d5 100644
> --- a/arch/riscv/kernel/head.S
> +++ b/arch/riscv/kernel/head.S
> @@ -94,6 +94,7 @@ relocate:
>         or a0, a0, a1
>         sfence.vma
>         csrw sptbr, a0
> +.align 2
>  1:
>         /* Set trap vector to spin forever to help debug */
>         la a0, .Lsecondary_park
> @@ -143,6 +144,7 @@ relocate:
>         tail smp_callin
>  #endif
>
> +.align 2
>  .Lsecondary_park:
>         /* We lack SMP support or have too many harts, so park this hart */
>         wfi


ping

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: FW: [PATCH v2] RISC-V: Add the directive for alignment of stvec's value
  2018-08-10  0:37   ` FW: " Zong Li
@ 2018-08-10  1:50     ` Palmer Dabbelt
  0 siblings, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2018-08-10  1:50 UTC (permalink / raw)
  To: zongbox
  Cc: aou, Christoph Hellwig, linux-riscv, linux-kernel, zong, greentime

On Thu, 09 Aug 2018 17:37:39 PDT (-0700), zongbox@gmail.com wrote:
>> Subject: [PATCH v2] RISC-V: Add the directive for alignment of stvec's value
>>
>> The stvec's value must be 4 byte alignment by specification definition.
>> These directives avoid to stvec be set the non-alignment value.
>>
>> Signed-off-by: Zong Li <zong@andestech.com>
>> ---
>>  arch/riscv/kernel/head.S | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S index 3b6293f..11066d5 100644
>> --- a/arch/riscv/kernel/head.S
>> +++ b/arch/riscv/kernel/head.S
>> @@ -94,6 +94,7 @@ relocate:
>>         or a0, a0, a1
>>         sfence.vma
>>         csrw sptbr, a0
>> +.align 2
>>  1:
>>         /* Set trap vector to spin forever to help debug */
>>         la a0, .Lsecondary_park
>> @@ -143,6 +144,7 @@ relocate:
>>         tail smp_callin
>>  #endif
>>
>> +.align 2
>>  .Lsecondary_park:
>>         /* We lack SMP support or have too many harts, so park this hart */
>>         wfi

Thanks, this got lost in the shuffle somewhere.  It's in for-next now.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-02 15:21 [PATCH v2] RISC-V: Add the directive for alignment of stvec's value Zong Li
     [not found] ` <3AB16BFE6992A349B44EA6D8F29BFB476B1EA2CC@ATCPCS16.andestech.com>
2018-08-10  0:37   ` FW: " Zong Li
2018-08-10  1:50     ` Palmer Dabbelt

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox