Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 233231 - Add R10K cache barrier support to gcc for IP28/IP32
Summary: Add R10K cache barrier support to gcc for IP28/IP32
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: MIPS Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-29 06:46 UTC by Joshua Kinard
Modified: 2008-10-25 20:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add cache barrier support to gcc for mips R10K (91_all_mips-r10k_cache_barriers-v5.patch,37.00 KB, patch)
2008-07-29 06:47 UTC, Joshua Kinard
Details | Diff
R10K Cache Barriers patch from gcc-4.4 (75_all_mips-r10k-cache-barriers.patch,72.91 KB, patch)
2008-10-23 06:25 UTC, Joshua Kinard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2008-07-29 06:46:28 UTC
Adds back support for generating cache barriers on systems that cannot properly handle the R10K's speculative execution capability.  This is required for building kernels to run the IP28 Indigo2 Impact R10000 system and for development tests of an equivalent kernel for R10000 IP32 O2 systems.
Comment 1 Joshua Kinard gentoo-dev 2008-07-29 06:47:08 UTC
Created attachment 161604 [details, diff]
Add cache barrier support to gcc for mips R10K
Comment 2 Joshua Kinard gentoo-dev 2008-07-29 14:30:39 UTC
FYI, this is for gcc-4.3.1 ebuild.
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2008-07-31 00:52:52 UTC
Has this been submitted upstream?
Comment 4 Joshua Kinard gentoo-dev 2008-07-31 01:11:57 UTC
I believe this is scheduled to appear in gcc-4.4.  I'll have to check with the original patch's author, but the last e-mails I got him from pointed at this.
Comment 5 Mark Loeser (RETIRED) gentoo-dev 2008-07-31 14:50:14 UTC
When this has been accepted by upstream please let me know.  Thanks
Comment 6 Joshua Kinard gentoo-dev 2008-07-31 15:05:38 UTC
We actually had this in gcc before, currently in 4.1.2.  This is just an update patch to put it into 4.3, since we skipped 4.2 entirely.  Or are the rules different, and all patches now have to be in upstream?  Waiting till 4.4, possibly even 4.5 will take far too long.
Comment 7 Mark Loeser (RETIRED) gentoo-dev 2008-07-31 16:35:50 UTC
I'll just respond to this one instead of to both.  We are trying to keep GCC as close to what upstream provides as possible.  Maintaining our own patches that they won't be accepting makes it more difficult to get upstream support. So we really like upstream to have accepted the patches before applying them ourselves.
Comment 8 Ryan Hill (RETIRED) gentoo-dev 2008-07-31 21:41:17 UTC
These patches do not touch anything outside of gcc/config/mips and are required for IP28 and IP32 R10K support in Gentoo, which is experimental but still supported.  We could really use 4.3 because frankly 4.1 is brutal on mips.
Comment 9 Joshua Kinard gentoo-dev 2008-08-01 04:30:02 UTC
TBH, I thought about just adding them and uploading a newer gcc for mips only, but I felt that'd cause too much confusion, and seeing as we completely skipped an entire gcc major revision, felt it's be better to file a bug and work through the processes (I am on toolchain, btw).

For Bug #233230, I sent the patch upstream, but there's no telling when it'll get queued for inclusion.  It's definitely impossible for it to ever make it into 4.3, and I don't know if the new features window for 4.4 has closed yet.  It may be another two years before this sees upstream light-of-day.

For this bug, I sent a query to get confirmwation on whether the cache barriers patch is queued for 4.4.  It too, is too invasive for 4.3, but if it's in the queue for 4.4, then that will solve one problem.

Preferably, this patch can wait a little bit, though.  While the conversion to 4.3 wasn't too difficult, I haven't had a chance to actually build a kernel for it yet, so I don't know if this patch will work 100%.

But the R10K scheduling patch has been pretty static since I converted it to the DFA architecture in the early gcc-4.0.x days.  We previously had it in all the gcc-3.x ebuilds from 3.2 on upwards.  It's pretty stable.
Comment 10 Ryan Hill (RETIRED) gentoo-dev 2008-08-01 06:04:26 UTC
4.4 is still in stage one but i get the impression that it was only so because some major branches like the tuples and stack branches were not ready.  they were merged this week so i'm guessing stage two is imminent.  but there has been a lot of mips related work going into 4.4 and also into binutils lately so it might be a good time for getting this in.  Richard Sandiford and Daniel Jacobowitz appear to be driving most of it so it may be worth it to contact them and see if they can help.
Comment 11 SpanKY gentoo-dev 2008-08-20 13:53:51 UTC
we've been including this patch forever when Joshua gets happy with it.  if he's happy with this version, we can toss it in as 90_all_mips-add-march-r10k.patch again.
Comment 12 Joshua Kinard gentoo-dev 2008-10-23 06:25:35 UTC
Created attachment 169534 [details, diff]
R10K Cache Barriers patch from gcc-4.4

The attached patch is a backport from GCC SVN.  Rewritten by Richard Sandiford, it'll be in the upcoming gcc-4.4 release.

SVN Revision is here:
http://gcc.gnu.org/viewcvs?view=rev&revision=140055
Comment 13 Joshua Kinard gentoo-dev 2008-10-23 06:29:07 UTC
FYI, tested against gcc-4.3.2, so I think it's best that this patch gets added to that version and that version only.  I don't trust 4.3.1 right now until I pin down the cause of my glibc woes.
Comment 14 Joshua Kinard gentoo-dev 2008-10-23 06:58:42 UTC
Forgot to note, the attached patch is actually a combination of GCC SVN Revision 136738 and 140055 (the cache barriers patch).  136738 is a dependency for 140055, but to save, I combined both into a single patch.

http://gcc.gnu.org/viewcvs?view=rev&revision=136738
Comment 15 Mark Loeser (RETIRED) gentoo-dev 2008-10-25 20:50:21 UTC
In the newest patch tarball, thanks for getting these pushed upstream.