mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Andreas Mohr <andi@rhlx01.fht-esslingen.de>
Cc: Juergen Beisert <juergen127@kreuzholzen.de>,
	linux-kernel@vger.kernel.org
Subject: Re: Geode-GX1 processor in 2.6.21
Date: Mon, 30 Apr 2007 16:02:41 +0100	[thread overview]
Message-ID: <20070430160241.79efca76@the-village.bc.nu> (raw)
In-Reply-To: <20070430122022.GA9896@rhlx01.hs-esslingen.de>

> > In arch/i386/kernel/cpu/cyrix.c function geode_configure() tries to enable 
> > the "suspend on halt power saving feature". This is the line:
> > 
> > 	setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x88);

That will go wrong

> > #define setCx86(reg, data) do { \
> >          outb((reg), 0x22); \
> >          outb((data), 0x23); \
> > } while (0)
> > 
> > Maybe the compiler does the wrong thing if someone uses these macros in the 
> > same instruction?
> 
> Sounds quite likely.

The problem is the macro evaluates to

	outb(reg, 0x22);
	[Then the getCx86]
	outb(data, 0x23);

which isn't valid for 6x86 control. Looks like someone overoptimised it.

Either make it "inline" or split it up and it'll work

> Also, it would probably be good to convert these macros into inline functions
> in this header.

Agreed - they must be issued in order in the right way as they are CPU
level magic.

  parent reply	other threads:[~2007-04-30 14:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-30 10:51 Juergen Beisert
2007-04-30 12:20 ` Andreas Mohr
2007-04-30 13:16   ` Juergen Beisert
2007-04-30 15:02   ` Alan Cox [this message]
2007-04-30 12:13 Mikael Pettersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070430160241.79efca76@the-village.bc.nu \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=andi@rhlx01.fht-esslingen.de \
    --cc=juergen127@kreuzholzen.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®