From owner-freebsd-mips@FreeBSD.ORG Mon Sep 27 08:12:06 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A4D3106566B for ; Mon, 27 Sep 2010 08:12:06 +0000 (UTC) (envelope-from phcoder@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id C39108FC08 for ; Mon, 27 Sep 2010 08:12:05 +0000 (UTC) Received: by fxm9 with SMTP id 9so3370619fxm.13 for ; Mon, 27 Sep 2010 01:12:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type; bh=pWubiiB4KCQqT44An6WdTBqsZvjYgrZG6UXbJ/jM+b0=; b=qmyijeBF6ai2FXm5Zl9KOsxeXZ4h/bWnqNlE8lCHAmsFY7xrwpImtrKpgDa5W3JDb4 77L4dbXAkqP1ydwMVypCMnqVnRaMiY9GI8Rsx2DWjVPZWooHKk2zBcwiD3OYtrd9PHdV X5CBIdfdYwPo/tNnCypd7gEsospV5B+UUu7aA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type; b=qAnbVjPn0MB0q/EMwIVbMoYm0xXIBlDCHEAmz3nSf+emwCbbdgrTZfmXM5N5CKpw2F sPCCucQejskzXkrwUhrwM4hkOY8OoKocGwd6N1+I5Eac6KF0NqrXPcSbHZ1D5vi8TYI8 TSlyvnWhjjjKT5850jkzhJMZC8FNBR3WHFEEA= Received: by 10.223.112.199 with SMTP id x7mr6961231fap.101.1285573752345; Mon, 27 Sep 2010 00:49:12 -0700 (PDT) Received: from debian.yeeloong.phnet (hg-public-dock-207-dhcp.ethz.ch [82.130.80.207]) by mx.google.com with ESMTPS id b9sm2239498faq.31.2010.09.27.00.49.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 27 Sep 2010 00:49:10 -0700 (PDT) Message-ID: <4CA045DF.2060803@gmail.com> Date: Mon, 27 Sep 2010 09:21:03 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux mips64; en-US; rv:1.9.1.12) Gecko/20100913 Icedove/3.0.7 MIME-Version: 1.0 To: freebsd-mips@freebsd.org X-Enigmail-Version: 1.0.1 Content-Type: multipart/mixed; boundary="------------080909020701060704070106" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: [RFC] [yeeloong] cache algorithms X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2010 08:12:06 -0000 This is a multi-part message in MIME format. --------------080909020701060704070106 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --------------080909020701060704070106--