Received: from milmhbs1.lsil.com (147.145.21.209) by coscas01.lsi.com
 (172.21.36.60) with Microsoft SMTP Server id 8.1.393.1; Fri, 22 Jan 2010
 15:42:10 -0700
Received: from mail2.lsil.com (mail2.lsil.com [147.145.40.22])	by
 milmhbs1.lsil.com (8.12.11/8.12.11) with ESMTP id o0MMg88e026155	for
 <andy.sharp@lsi.com>; Fri, 22 Jan 2010 14:42:09 -0800
Received: from psmtp.com (na3sys009amx189.postini.com [74.125.149.170])	by
 mail2.lsil.com (8.12.11/8.12.11) with SMTP id o0MMbSve019350	for
 <andy.sharp@lsi.com>; Fri, 22 Jan 2010 14:37:29 -0800 (PST)
Received: from source ([78.24.191.182]) by na3sys009amx189.postini.com
 ([74.125.148.14]) with SMTP;	Fri, 22 Jan 2010 14:42:07 PST
Received: from localhost.localdomain ([127.0.0.1]:57347 "EHLO
        eddie.linux-mips.org" rhost-flags-OK-OK-OK-FAIL)        by
 eddie.linux-mips.org with ESMTP id S1492053Ab0AVWl6 (ORCPT
        <rfc822;andy.sharp@lsi.com>); Fri, 22 Jan 2010 23:41:58 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Fri, 22 Jan 2010 23:41:40
 +0100 (CET)
Received: from mail3.caviumnetworks.com ([12.108.191.235]:16836 "EHLO
        mail3.caviumnetworks.com" rhost-flags-OK-OK-OK-OK)        by
 eddie.linux-mips.org with ESMTP id S1492018Ab0AVWle (ORCPT
        <rfc822;linux-mips@linux-mips.org>); Fri, 22 Jan 2010 23:41:34 +0100
Received: from caexch01.caveonetworks.com (Not Verified[192.168.16.9]) by
 mail3.caviumnetworks.com with MailMarshal (v6,7,2,8378)        id
 <B4b5a29a20004>; Fri, 22 Jan 2010 14:41:38 -0800
Received: from caexch01.caveonetworks.com ([192.168.16.9]) by
 caexch01.caveonetworks.com with Microsoft SMTPSVC(6.0.3790.3959);
         Fri, 22 Jan 2010 14:41:22 -0800
Received: from dd1.caveonetworks.com ([12.108.191.236]) by
 caexch01.caveonetworks.com over TLS secured channel with Microsoft
 SMTPSVC(6.0.3790.3959);         Fri, 22 Jan 2010 14:41:22 -0800
Received: from dd1.caveonetworks.com (localhost.localdomain [127.0.0.1])
        by dd1.caveonetworks.com (8.14.2/8.14.2) with ESMTP id o0MMfHDQ005019;
        Fri, 22 Jan 2010 14:41:18 -0800
Received: (from ddaney@localhost)        by dd1.caveonetworks.com
 (8.14.2/8.14.2/Submit) id o0MMfF8x005016;        Fri, 22 Jan 2010 14:41:15
 -0800
From: David Daney <ddaney@caviumnetworks.com>
To: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	"ralf@linux-mips.org" <ralf@linux-mips.org>
CC: David Daney <ddaney@caviumnetworks.com>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Fri, 22 Jan 2010 15:41:14 -0700
Subject: [PATCH 1/2] MIPS: Remove probe_tlb().
Thread-Topic: [PATCH 1/2] MIPS: Remove probe_tlb().
Thread-Index: AcqbtCIxdSiJWsS2S/eOtLrkyJV9oA==
Message-ID: <1264200075-4992-1-git-send-email-ddaney@caviumnetworks.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: coscas01.lsi.com
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-scanned-by: MIMEDefang 2.39
errors-to: linux-mips-bounce@linux-mips.org
x-originalarrivaltime: 22 Jan 2010 22:41:22.0518 (UTC)
 FILETIME=[05ADDF60:01CA9BB4]
x-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-settings: 3 (1.0000:1.0000) s cv gt3 gt2 gt1 r p m c 
x-pstn-addresses: from <ddaney@caviumnetworks.com> [22/1] 
x-pstn-neptune: 2/1/0.50/83
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

The function probe_tlb() only does anything for processors that are
not PRID_COMP_LEGACY.  This is precisely the set of processors for
which decode_configs() is called to do identical tlbsize probing
calculations.  Therefore probe_tlb() is completely redundant and may
be removed.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/mm/tlb-r4k.c |   31 -------------------------------
 1 files changed, 0 insertions(+), 31 deletions(-)

diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index b61ad60..7de128a 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -447,34 +447,6 @@ out:
 	return ret;
 }
=20
-static void __cpuinit probe_tlb(unsigned long config)
-{
-	struct cpuinfo_mips *c =3D &current_cpu_data;
-	unsigned int reg;
-
-	/*
-	 * If this isn't a MIPS32 / MIPS64 compliant CPU.  Config 1 register
-	 * is not supported, we assume R4k style.  Cpu probing already figured
-	 * out the number of tlb entries.
-	 */
-	if ((c->processor_id & 0xff0000) =3D=3D PRID_COMP_LEGACY)
-		return;
-#ifdef CONFIG_MIPS_MT_SMTC
-	/*
-	 * If TLB is shared in SMTC system, total size already
-	 * has been calculated and written into cpu_data tlbsize
-	 */
-	if((smtc_status & SMTC_TLB_SHARED) =3D=3D SMTC_TLB_SHARED)
-		return;
-#endif /* CONFIG_MIPS_MT_SMTC */
-
-	reg =3D read_c0_config1();
-	if (!((config >> 7) & 3))
-		panic("No TLB present");
-
-	c->tlbsize =3D ((reg >> 25) & 0x3f) + 1;
-}
-
 static int __cpuinitdata ntlb;
 static int __init set_ntlb(char *str)
 {
@@ -486,8 +458,6 @@ __setup("ntlb=3D", set_ntlb);
=20
 void __cpuinit tlb_init(void)
 {
-	unsigned int config =3D read_c0_config();
-
 	/*
 	 * You should never change this register:
 	 *   - On R4600 1.7 the tlbp never hits for pages smaller than
@@ -495,7 +465,6 @@ void __cpuinit tlb_init(void)
 	 *   - The entire mm handling assumes the c0_pagemask register to
 	 *     be set to fixed-size pages.
 	 */
-	probe_tlb(config);
 	write_c0_pagemask(PM_DEFAULT_MASK);
 #ifndef CONFIG_MAPPED_KERNEL
 	write_c0_wired(0);
--=20
1.6.0.6


