public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] x86: turn off cache: set control register properly
@ 2011-09-30 18:27 Ondrej Kupka
  2011-09-30 20:24 ` Marek Vasut
  2011-10-16  3:21 ` Graeme Russ
  0 siblings, 2 replies; 5+ messages in thread
From: Ondrej Kupka @ 2011-09-30 18:27 UTC (permalink / raw)
  To: u-boot

Bits should be ORed when they are supposed to be added together

Cc: Graeme Russ <graeme.russ@gmail.com>
Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>
---
 arch/x86/cpu/start16.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
index 3d3017a..9dabff2 100644
--- a/arch/x86/cpu/start16.S
+++ b/arch/x86/cpu/start16.S
@@ -50,7 +50,7 @@ board_init16_ret:
 
 	/* Turn of cache (this might require a 486-class CPU) */
 	movl	%cr0, %eax
-	orl	$(X86_CR0_NW & X86_CR0_CD), %eax
+	orl	$(X86_CR0_NW | X86_CR0_CD), %eax
 	movl	%eax, %cr0
 	wbinvd
 
-- 
1.7.4.1

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

* [U-Boot] [PATCH] x86: turn off cache: set control register properly
  2011-09-30 18:27 [U-Boot] [PATCH] x86: turn off cache: set control register properly Ondrej Kupka
@ 2011-09-30 20:24 ` Marek Vasut
  2011-09-30 20:56   ` Ondra Kupka
  2011-10-16  3:21 ` Graeme Russ
  1 sibling, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2011-09-30 20:24 UTC (permalink / raw)
  To: u-boot

On Friday, September 30, 2011 08:27:07 PM Ondrej Kupka wrote:
> Bits should be ORed when they are supposed to be added together
> 
> Cc: Graeme Russ <graeme.russ@gmail.com>
> Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>
> ---
>  arch/x86/cpu/start16.S |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
> index 3d3017a..9dabff2 100644
> --- a/arch/x86/cpu/start16.S
> +++ b/arch/x86/cpu/start16.S
> @@ -50,7 +50,7 @@ board_init16_ret:
> 
>  	/* Turn of cache (this might require a 486-class CPU) */
>  	movl	%cr0, %eax
> -	orl	$(X86_CR0_NW & X86_CR0_CD), %eax
> +	orl	$(X86_CR0_NW | X86_CR0_CD), %eax
>  	movl	%eax, %cr0
>  	wbinvd

Dear Ondrej Kupka,

Can we make this into some macro so we'd avoid such errors in the future ?

Cheers

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

* [U-Boot] [PATCH] x86: turn off cache: set control register properly
  2011-09-30 20:24 ` Marek Vasut
@ 2011-09-30 20:56   ` Ondra Kupka
  2011-09-30 21:01     ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Ondra Kupka @ 2011-09-30 20:56 UTC (permalink / raw)
  To: u-boot

Dear Marek,

I am not really sure it would bring any advantage since it is used only on 2
places as far as I know and the meaning of those few lines of code is very
clear and commented...

Regards,
Ondra K.

On Fri, Sep 30, 2011 at 10:24 PM, Marek Vasut <marek.vasut@gmail.com> wrote:

> On Friday, September 30, 2011 08:27:07 PM Ondrej Kupka wrote:
> > Bits should be ORed when they are supposed to be added together
> >
> > Cc: Graeme Russ <graeme.russ@gmail.com>
> > Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>
> > ---
> >  arch/x86/cpu/start16.S |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/x86/cpu/start16.S b/arch/x86/cpu/start16.S
> > index 3d3017a..9dabff2 100644
> > --- a/arch/x86/cpu/start16.S
> > +++ b/arch/x86/cpu/start16.S
> > @@ -50,7 +50,7 @@ board_init16_ret:
> >
> >       /* Turn of cache (this might require a 486-class CPU) */
> >       movl    %cr0, %eax
> > -     orl     $(X86_CR0_NW & X86_CR0_CD), %eax
> > +     orl     $(X86_CR0_NW | X86_CR0_CD), %eax
> >       movl    %eax, %cr0
> >       wbinvd
>
> Dear Ondrej Kupka,
>
> Can we make this into some macro so we'd avoid such errors in the future ?
>
> Cheers
>

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

* [U-Boot] [PATCH] x86: turn off cache: set control register properly
  2011-09-30 20:56   ` Ondra Kupka
@ 2011-09-30 21:01     ` Marek Vasut
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2011-09-30 21:01 UTC (permalink / raw)
  To: u-boot

On Friday, September 30, 2011 10:56:03 PM Ondra Kupka wrote:
> Dear Marek,
> 
> I am not really sure it would bring any advantage since it is used only on
> 2 places as far as I know and the meaning of those few lines of code is
> very clear and commented...
> 
> Regards,
> Ondra K.

Dear Ondrej Kupka,

Please STOP TOP-POSTING !!

Otherwise ok.

Cheers

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

* [U-Boot] [PATCH] x86: turn off cache: set control register properly
  2011-09-30 18:27 [U-Boot] [PATCH] x86: turn off cache: set control register properly Ondrej Kupka
  2011-09-30 20:24 ` Marek Vasut
@ 2011-10-16  3:21 ` Graeme Russ
  1 sibling, 0 replies; 5+ messages in thread
From: Graeme Russ @ 2011-10-16  3:21 UTC (permalink / raw)
  To: u-boot

On 01/10/11 04:27, Ondrej Kupka wrote:
> Bits should be ORed when they are supposed to be added together
> 
> Cc: Graeme Russ <graeme.russ@gmail.com>
> Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>
> ---
>  arch/x86/cpu/start16.S |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 

Applied to u-boot-x86

Thanks,

Graeme

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

end of thread, other threads:[~2011-10-16  3:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-30 18:27 [U-Boot] [PATCH] x86: turn off cache: set control register properly Ondrej Kupka
2011-09-30 20:24 ` Marek Vasut
2011-09-30 20:56   ` Ondra Kupka
2011-09-30 21:01     ` Marek Vasut
2011-10-16  3:21 ` Graeme Russ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox