[kvm-unit-tests,4/4] s390x: smp: Dirty fpc before initial reset test
diff mbox series

Message ID 20200114153054.77082-5-frankja@linux.ibm.com
State New
Headers show
Series
  • s390x: smp: Improve smp code and reset checks
Related show

Commit Message

Janosch Frank Jan. 14, 2020, 3:30 p.m. UTC
Let's dirty the fpc, before we test if the initial reset sets it to 0.

Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 s390x/smp.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Thomas Huth Jan. 14, 2020, 5:22 p.m. UTC | #1
On 14/01/2020 16.30, Janosch Frank wrote:
> Let's dirty the fpc, before we test if the initial reset sets it to 0.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>  s390x/smp.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/s390x/smp.c b/s390x/smp.c
> index 11ab425..cd32342 100644
> --- a/s390x/smp.c
> +++ b/s390x/smp.c
> @@ -177,6 +177,9 @@ static void test_emcall(void)
>  
>  static void test_func_initial(void)
>  {
> +	asm volatile(
> +		"	sfpc	%0\n"
> +		: : "d" (0x11) : );
>  	lctlg(1, 0x42000UL);
>  	lctlg(7, 0x43000UL);
>  	lctlg(13, 0x44000UL);
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>
Cornelia Huck Jan. 14, 2020, 5:53 p.m. UTC | #2
On Tue, 14 Jan 2020 10:30:53 -0500
Janosch Frank <frankja@linux.ibm.com> wrote:

> Let's dirty the fpc, before we test if the initial reset sets it to 0.
> 
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>  s390x/smp.c | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

Patch
diff mbox series

diff --git a/s390x/smp.c b/s390x/smp.c
index 11ab425..cd32342 100644
--- a/s390x/smp.c
+++ b/s390x/smp.c
@@ -177,6 +177,9 @@  static void test_emcall(void)
 
 static void test_func_initial(void)
 {
+	asm volatile(
+		"	sfpc	%0\n"
+		: : "d" (0x11) : );
 	lctlg(1, 0x42000UL);
 	lctlg(7, 0x43000UL);
 	lctlg(13, 0x44000UL);