public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hiroshi Miura <miura@da-cha.org>
To: alan@lxorguk.ukuu.org.uk
Cc: miura@da-cha.org, davej@suse.de, hpa@zytor.com,
	linux-kernel@vger.kernel.org
Subject: Re: NatSemi Geode improvement
Date: Tue, 22 Oct 2002 09:12:48 +0900 (JST)	[thread overview]
Message-ID: <20021022001248.3F70A117B00@triton2> (raw)
In-Reply-To: Alan Cox's message of "21 Oct 2002 15:06:18 +0100"	<1035209178.27318.118.camel@irongate.swansea.linux.org.uk>

In message "Re: NatSemi Geode improvement"
    on 02/10/21, Alan Cox <alan@lxorguk.ukuu.org.uk> writes:
> > +     printk(KERN_INFO "Enable Memory access reorder on Cyrix/NSC processor.\n");
> > +     local_irq_save(flags);
> > +     ccr3 = getCx86(CX86_CCR3);
> > +     setCx86(CX86_CCR3, (ccr3 & 0x0f) | 0x10); /* enable MAPEN  */
> > +     /* Load/Store Serialize to mem access disable (=reorder it)  */
> > +     setCx86(CX86_PCR0, getCx86(CX86_PCR0) & ~0x80);
> > +#ifdef CONFIG_NOHIGHMEM
> > +     /* set load/store serialize from 1GB to 4GB */
> > +     ccr3 |= 0xe0;
> > +#endif
> > +     setCx86(CX86_CCR3, ccr3);
> 
> I dont think this is safe. You now need store fences on bus mastering
> DMA. You should be able to reuse the IDT winchip code for that - I set
> the winchip up for weak store ordering too, and its a big win (I also
> saw about 30% on block copies)

Winchip C6 MCR is like to intel MTRR and Cyrix 6x86MX ARR.
Geode has NO similar registers and only has serialize flags to 1-2GB,2-3GB,3-4GB
which are the CCR3's MSB bits. Geode is always serialize the 640KB-1MB area.
The read/write reordering and the read bypassing are handled  by geode MMU.

It means that mmio must map to over 1GB area or disable this feature.

for example, on my geode machine,

$ cat /proc/iomem 
00000000-0009fbff : System RAM
0009fc00-0009ffff : reserved
000a0000-000bffff : Video RAM area
000c0000-000c7fff : Video ROM
000f0000-000fffff : System ROM
00100000-09d7ffff : System RAM
  00100000-001e7ce2 : Kernel code
  001e7ce3-0022a857 : Kernel data
10000000-10000fff : Ricoh Co Ltd RL5c475
  10000000-10000fff : i82365
40010000-40010fff : Cyrix Corporation 5520 [Cognac]
60000000-60000fff : card services
e0000000-e0000fff : Compaq Computer Corporation ZFMicro Chipset USB
  e0000000-e0000fff : usb-ohci
ffff0000-ffffffff : reserved
(this sample is on linux-2.4.19-pre10-ac2)

with this, this patch may safe in this condition.

anyway, this reorder setting can be done by 'set6x86' tool, 
so user can decide in user space whether use the mem re-ordering or not.


Hiroshi Miura  --- http://www.da-cha.org/ 
NTTDATA Corp. Marketing & Business Strategy Planning Dept. --- miurahr@nttdata.co.jp 
Key fingerprint = 9117 9407 5684 FBF1 4063  15B4 401D D077 04AB 8617
-- My hacking life is happy as the day is long




  reply	other threads:[~2002-10-22  0:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-17 17:12 NatSemi Geode improvement Hiroshi Miura
2002-10-17 17:20 ` Dave Jones
2002-10-18  2:29   ` Hiroshi Miura
2002-10-18 12:10     ` Dave Jones
2002-10-18 17:32       ` H. Peter Anvin
2002-10-22 21:14     ` Alan Cox
2002-10-19 16:24   ` Bernhard Wesely
2002-10-21 14:06 ` Alan Cox
2002-10-22  0:12   ` Hiroshi Miura [this message]
2002-10-22 10:00     ` Alan Cox
     [not found] <C0D45ABB3F45D5118BBC00508BC292DB9D427A@imgserv04>
2002-10-26  7:43 ` Hiroshi Miura

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=20021022001248.3F70A117B00@triton2 \
    --to=miura@da-cha.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davej@suse.de \
    --cc=hpa@zytor.com \
    --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