linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michel Lanners <mlan@cpu.lu>
To: paulus@linuxcare.com.au
Cc: linuxppc-dev@lists.linuxppc.org
Subject: PATCH: improved processor config for G3s
Date: Sun, 3 Sep 2000 15:03:40 +0200 (CEST)	[thread overview]
Message-ID: <200009031303.PAA00901@piglet.grunz.lu> (raw)

[-- Attachment #1: Type: TEXT/plain, Size: 1566 bytes --]

Hi Paul,

It's patch day today ;-)

Attached is my try at improving the processor configuration for G3/G4
processors in head.S. Instead of leaving some config bits at what they
were set by the formware, I've tried to set all availbale faetures to
their 'optimum' value. Patch is against your 2.4 rsync tree as of today.
This patch, as well as the same thing against a 2.2 source, are also
posted on sourceforge.

Those where I see no problem are:

 * Branch History Table (BHTE), Branch Target ICache (BTIC), Dynamic
   Power Management (DPM) and Store Gathering (SGE) all on,
 * Instruction Cache Throttling Control (ICTC) off.

These were not touched before, but might be worth a discussion:

 * Speculative Cache Access Disable (SPD) cleared, Address Brodcast
   (ABE) enabled

Clearing SPD makes sense since some processor upgrade cards come with an
OF patch that sets this bit (due to ROM problems... we don't care once
Linux is up).

I'm running these processor settings without a problem for some time
now. If all the processor config in head.S doesn't look clean to some, I
agree, and I propose we change that setup a bit for 2.5, separating the
cache enable stuff from the processor configuration.

Cheers

Michel

-------------------------------------------------------------------------
Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   mlan@cpu.lu            |
http://www.cpu.lu/~mlan        |                     Learn Always. "


[-- Attachment #2: processor.diff --]
[-- Type: TEXT/plain, Size: 934 bytes --]

diff -uNr linux-2.4.paul/arch/ppc/kernel/head.S linux/arch/ppc/kernel/head.S
--- linux-2.4.paul/arch/ppc/kernel/head.S	Sun Aug 27 12:33:12 2000
+++ linux/arch/ppc/kernel/head.S	Sat Sep  2 11:26:12 2000
@@ -1347,13 +1347,17 @@
 4:
 	cror	14,14,18
 	bne	3,6f
-	/* We should add ABE here if we want to use Store Gathering
-	 * and other nifty bridge features
+	/* for G3/G4:
+	 * enable Store Gathering (SGE), Address Brodcast (ABE),
+	 * Branch History Table (BHTE), Branch Target ICache (BTIC)
 	 */
-	ori	r11,r11,HID0_SGE|HID0_BHTE|HID0_BTIC /* for g3/g4, enable */
+	ori	r11,r11,HID0_SGE | HID0_ABE | HID0_BHTE | HID0_BTIC
+	oris	r11,r11,HID0_DPM>>16	/* enable dynamic power mgmt */
+	li	r3,HID0_SPD
+	andc	r11,r11,r3		/* clear SPD: enable speculative */
  	li	r3,0
- 	mtspr	ICTC,r3
-5:	mtspr	HID0,r11		/* superscalar exec & br history tbl */
+ 	mtspr	ICTC,r3			/* Instruction Cache Throttling off */
+5:	mtspr	HID0,r11
 6:	blr

 /*

             reply	other threads:[~2000-09-03 13:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-03 13:03 Michel Lanners [this message]
2000-09-03 13:43 ` PATCH: improved processor config for G3s Benjamin Herrenschmidt
2000-09-04  9:48   ` Gabriel Paubert
2000-09-04 10:34     ` Adrian Cox
2000-09-04 10:54       ` Benjamin Herrenschmidt
2000-09-05  9:49         ` Gabriel Paubert
2000-09-05 10:50           ` Benjamin Herrenschmidt
2000-09-05 11:06             ` Gabriel Paubert
2000-09-05 11:32           ` Adrian Cox
2000-09-04 17:51     ` Michel Lanners

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=200009031303.PAA00901@piglet.grunz.lu \
    --to=mlan@cpu.lu \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=paulus@linuxcare.com.au \
    /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;
as well as URLs for NNTP newsgroup(s).