Date: Mon, 27 Sep 2010 13:08:19 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= <phcoder@gmail.com> To: freebsd-mips@freebsd.org Subject: Re: [RFC] [yeeloong] cache algorithms Message-ID: <4CA07B23.3060003@gmail.com> In-Reply-To: <4CA045DF.2060803@gmail.com> References: <4CA045DF.2060803@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------040300030108000809070504 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 09/27/2010 09:21 AM, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On Loongson the cache maintenance routines are subtly different (took me > a very long time to figure out). Here I attach the patch which would > adapt the algorithms for Loongson but it would also break other CPUs so > I would like your comment on how to best incorporate it into current > tree? The problems are: > 1) Other bits are used to specify the way > 2) i-cache has only index_invalidate and no hit_invalidate > 3) secondary cache flush is a must on dma operations > Is it better to copy-paste mipsNN_* to something like mipsNN_loongson_* > or is it better to use #ifdef's ? > Should I define mips_sdcache_* to a nop on non-Loongson? > > > -- Regards Vladimir 'φ-coder/phcoder' Serbinenko --------------040300030108000809070504 Content-Type: text/plain; name="cache.diff.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="cache.diff.txt" PT09IG1vZGlmaWVkIGZpbGUgJ21pcHMvbWlwcy9idXNfc3BhY2VfZ2VuZXJpYy5jJwotLS0g bWlwcy9taXBzL2J1c19zcGFjZV9nZW5lcmljLmMJMjAxMC0wOC0xMyAyMjoxNjo0OSArMDAw MAorKysgbWlwcy9taXBzL2J1c19zcGFjZV9nZW5lcmljLmMJMjAxMC0wOC0xNSAwNDoxODoy MSArMDAwMApAQCAtNTkzLDYgKzU5Myw5IEBACiB7CiAjaWYgMAogCWlmIChmbGFncyAmIEJV U19TUEFDRV9CQVJSSUVSX1dSSVRFKQorCXsKIAkJbWlwc19kY2FjaGVfd2JpbnZfYWxsKCk7 CisJCW1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zoyNiArMDAwMApAQCAtMTAwLDYgKzEwMCw3IEBACiAJCQkgKiBpbiBvcmRlciB0byBnZXQg aXQgb3ZlcndyaXR0ZW4gYnkgY29ycmVjdCBkYXRhCiAJCQkgKi8KIAkJCW1pcHNfZGNhY2hl X3diaW52X3JhbmdlKCh2bV9vZmZzZXRfdCljcCwgY250KTsKKwkJCW1pcHNfc2RjYWNoZV93 Ymludl9yYW5nZSgodm1fb2Zmc2V0X3QpY3AsIGNudCk7CiAJCQlwbWFwX2ZsdXNoX3B2Y2Fj aGUobSk7CiAJCX0gZWxzZSB7CiAJCQlzZiA9IHNmX2J1Zl9hbGxvYyhtLCAwKTsKQEAgLTEz MSw3ICsxMzIsMTAgQEAKIAkJaWYgKHNmICE9IE5VTEwpCiAJCQlzZl9idWZfZnJlZShzZik7 CiAJCWVsc2UKKwkJewogCQkJbWlwc19kY2FjaGVfd2JpbnZfcmFuZ2UoKHZtX29mZnNldF90 KWNwLCBjbnQpOworCQkJbWlwc19zZGNhY2hlX3diaW52X3JhbmdlKCh2bV9vZmZzZXRfdClj cCwgY250KTsKKwkJfQogCQlpb3YtPmlvdl9iYXNlID0gKGNoYXIgKilpb3YtPmlvdl9iYXNl ICsgY250OwogCQlpb3YtPmlvdl9sZW4gLT0gY250OwogCQl1aW8tPnVpb19yZXNpZCAtPSBj bnQ7Cgo= --------------040300030108000809070504--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CA07B23.3060003>