Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1544258

Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1

From Mike Kravetz <mike.kravetz@oracle.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1
Date 2016-12-19 01:30 +0100
Message-ID <sPU01-wA-9@gated-at.bofh.it> (permalink)
References <sP5Ad-7fU-9@gated-at.bofh.it> <sP5Ad-7fU-23@gated-at.bofh.it> <sPhUJ-6Ke-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 12/16/2016 11:45 PM, Sam Ravnborg wrote:
> Hi Mike
> 
>> diff --git a/arch/sparc/kernel/fpu_traps.S b/arch/sparc/kernel/fpu_traps.S
>> index 336d275..f85a034 100644
>> --- a/arch/sparc/kernel/fpu_traps.S
>> +++ b/arch/sparc/kernel/fpu_traps.S
>> @@ -73,6 +73,16 @@ do_fpdis:
>>  	ldxa		[%g3] ASI_MMU, %g5
>>  	.previous
>>  
>> +661:	nop
>> +	nop
>> +	.section	.sun4v_2insn_patch, "ax"
>> +	.word		661b
>> +	mov		SECONDARY_CONTEXT_R1, %g3
>> +	ldxa		[%g3] ASI_MMU, %g4
>> +	.previous
>> +	/* Unnecessary on sun4u and pre-Niagara 2 sun4v */
>> +	mov		SECONDARY_CONTEXT, %g3
>> +
>>  	sethi		%hi(sparc64_kern_sec_context), %g2
> 
> You missed the second instruction to patch with here.
> This bug repeats itself further down.
> 
> Just noted while briefly reading the code - did not really follow the code.

Hi Sam,

This is my first sparc assembly code, so I could certainly have this
wrong.  The code I was trying to write has the two nop instructions,
that get patched with the mov and ldxa on sun4v.  Certainly, this is
not elegant.  And, the formatting may lead to some confusion.

Did you perhaps think the mov instruction after the comment was for
patching?  I am just trying to understand your comment.

-- 
Mike Kravetz

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC PATCH 04/14] sparc64: load shared id into context register 1 Mike Kravetz <mike.kravetz@oracle.com> - 2016-12-16 19:40 +0100
  Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1 Sam Ravnborg <sam@ravnborg.org> - 2016-12-17 08:50 +0100
    Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1 Mike Kravetz <mike.kravetz@oracle.com> - 2016-12-19 01:30 +0100
      Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1 Sam Ravnborg <sam@ravnborg.org> - 2016-12-21 19:20 +0100
  Re: [RFC PATCH 04/14] sparc64: load shared id into context  register 1 David Miller <davem@davemloft.net> - 2016-12-18 04:20 +0100
    Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1 Mike Kravetz <mike.kravetz@oracle.com> - 2016-12-19 01:10 +0100
      Re: [RFC PATCH 04/14] sparc64: load shared id into context  register 1 David Miller <davem@davemloft.net> - 2016-12-20 19:40 +0100
        Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1 Mike Kravetz <mike.kravetz@oracle.com> - 2016-12-20 21:30 +0100
      Re: [RFC PATCH 04/14] sparc64: load shared id into context register 1 Sam Ravnborg <sam@ravnborg.org> - 2016-12-21 19:20 +0100

csiph-web