diff mbox

[U-Boot,7/9] x86: ivybridge: Fix car_uninit() to correctly set run state

Message ID 1445205337-32504-8-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass Oct. 18, 2015, 9:55 p.m. UTC
At present a missing $ causes this code to hang when using the MRC cache/
Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/x86/cpu/ivybridge/car.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bin Meng Oct. 19, 2015, 2:23 a.m. UTC | #1
Hi Simon,

On Mon, Oct 19, 2015 at 5:55 AM, Simon Glass <sjg@chromium.org> wrote:
> At present a missing $ causes this code to hang when using the MRC cache/
> Fix it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>

> ---
>
>  arch/x86/cpu/ivybridge/car.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/cpu/ivybridge/car.S b/arch/x86/cpu/ivybridge/car.S
> index 770ef17..b75c2a5 100644
> --- a/arch/x86/cpu/ivybridge/car.S
> +++ b/arch/x86/cpu/ivybridge/car.S
> @@ -188,7 +188,7 @@ car_uninit:
>         wrmsr
>
>         /* Disable the no-eviction run state */
> -       movl    NOEVICTMOD_MSR, %ecx
> +       movl    $NOEVICTMOD_MSR, %ecx

I am wondering why compiler does not complain this.

>         rdmsr
>         andl    $~2, %eax
>         wrmsr
> --

Regards,
Bin
Simon Glass Oct. 19, 2015, 2:27 a.m. UTC | #2
Hi Bin,

On 18 October 2015 at 20:23, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Simon,
>
> On Mon, Oct 19, 2015 at 5:55 AM, Simon Glass <sjg@chromium.org> wrote:
>> At present a missing $ causes this code to hang when using the MRC cache/
>> Fix it.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
>
>> ---
>>
>>  arch/x86/cpu/ivybridge/car.S | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/cpu/ivybridge/car.S b/arch/x86/cpu/ivybridge/car.S
>> index 770ef17..b75c2a5 100644
>> --- a/arch/x86/cpu/ivybridge/car.S
>> +++ b/arch/x86/cpu/ivybridge/car.S
>> @@ -188,7 +188,7 @@ car_uninit:
>>         wrmsr
>>
>>         /* Disable the no-eviction run state */
>> -       movl    NOEVICTMOD_MSR, %ecx
>> +       movl    $NOEVICTMOD_MSR, %ecx
>
> I am wondering why compiler does not complain this.
>

I suppose it just uses the value at that address.

>>         rdmsr
>>         andl    $~2, %eax
>>         wrmsr
>> --

Regards,
Simon
Simon Glass Oct. 21, 2015, 11:24 p.m. UTC | #3
On 18 October 2015 at 20:27, Simon Glass <sjg@chromium.org> wrote:
> Hi Bin,
>
> On 18 October 2015 at 20:23, Bin Meng <bmeng.cn@gmail.com> wrote:
>> Hi Simon,
>>
>> On Mon, Oct 19, 2015 at 5:55 AM, Simon Glass <sjg@chromium.org> wrote:
>>> At present a missing $ causes this code to hang when using the MRC cache/
>>> Fix it.
>>>
>>> Signed-off-by: Simon Glass <sjg@chromium.org>
>>
>> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
>>
>>> ---
>>>
>>>  arch/x86/cpu/ivybridge/car.S | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/x86/cpu/ivybridge/car.S b/arch/x86/cpu/ivybridge/car.S
>>> index 770ef17..b75c2a5 100644
>>> --- a/arch/x86/cpu/ivybridge/car.S
>>> +++ b/arch/x86/cpu/ivybridge/car.S
>>> @@ -188,7 +188,7 @@ car_uninit:
>>>         wrmsr
>>>
>>>         /* Disable the no-eviction run state */
>>> -       movl    NOEVICTMOD_MSR, %ecx
>>> +       movl    $NOEVICTMOD_MSR, %ecx
>>
>> I am wondering why compiler does not complain this.
>>
>
> I suppose it just uses the value at that address.
>
>>>         rdmsr
>>>         andl    $~2, %eax
>>>         wrmsr
>>> --
>
> Regards,
> Simon

Applied to u-boot-x86.
diff mbox

Patch

diff --git a/arch/x86/cpu/ivybridge/car.S b/arch/x86/cpu/ivybridge/car.S
index 770ef17..b75c2a5 100644
--- a/arch/x86/cpu/ivybridge/car.S
+++ b/arch/x86/cpu/ivybridge/car.S
@@ -188,7 +188,7 @@  car_uninit:
 	wrmsr
 
 	/* Disable the no-eviction run state */
-	movl    NOEVICTMOD_MSR, %ecx
+	movl    $NOEVICTMOD_MSR, %ecx
 	rdmsr
 	andl    $~2, %eax
 	wrmsr