mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: mingo@elte.hu, torvalds@linux-foundation.org
Subject: Looks broken to me: x86, cyrix: debug
Date: Sat, 11 Oct 2008 21:40:43 +0100	[thread overview]
Message-ID: <20081011214043.283a3330@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <200810112003.m9BK3Wwu025556@hera.kernel.org>

On Sat, 11 Oct 2008 20:03:32 GMT
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:

> Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=026e2c05ef58ef413e2d52696f125d5ea1aa8bce
> Commit:     026e2c05ef58ef413e2d52696f125d5ea1aa8bce
> Parent:     93ded9b8fd42abe2c3607097963d8de6ad9117eb
> Author:     Ingo Molnar <mingo@elte.hu>
> AuthorDate: Tue Jul 22 11:58:14 2008 +0200
> Committer:  Ingo Molnar <mingo@elte.hu>
> CommitDate: Tue Jul 22 12:24:00 2008 +0200
> 
>     x86, cyrix: debug

Looks broken to me:

>  	/* Load/Store Serialize to mem access disable (=reorder it) */
> -	setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80);
> +	setCx86_old(CX86_PCR0, getCx86_old(CX86_PCR0) & ~0x80);

Three problems:

1.

> +#define getCx86_old(reg) ({ outb((reg), 0x22); inb(0x23); })

Doesn't expand to any kind of returned value.

 +#define setCx86_old(reg, data) do { \
> +	outb((reg), 0x22); \
> +	outb((data), 0x23); \
> +} while (0)

2. 
And even if it did it would seem to expand to

	outb reg, 0x22
	outb reg, 0x22
	inb 0x23
	outb something, 0x23

which doesn't in fact work as the outb/inb or outb/outb to 0x22/0x23 must
be paired.

3.

What exactly does fiddling with stuff like the memory access ordering
(which is rather important!) have to do with a single oneliner "cyrix:
debug" title and no changelog.


Alan



       reply	other threads:[~2008-10-11 20:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200810112003.m9BK3Wwu025556@hera.kernel.org>
2008-10-11 20:40 ` Alan Cox [this message]
2008-10-11 20:52   ` Maciej W. Rozycki
2008-10-11 20:58     ` Ingo Molnar
2008-10-11 22:48       ` Willy Tarreau
2008-10-11 22:55         ` Maciej W. Rozycki

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=20081011214043.283a3330@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.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®