Message ID | 20180527141324.11937-18-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp1793062lji; Sun, 27 May 2018 07:26:16 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKQNr8sMSJzir2rezpwhBtcv99ECss4L7Wi6H7GmhLaOW/JJxyQl5J5HPTTpvceJE38KS+a X-Received: by 2002:a0c:96cf:: with SMTP id b15-v6mr9132819qvd.124.1527431176161; Sun, 27 May 2018 07:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527431176; cv=none; d=google.com; s=arc-20160816; b=Y1sAUo5CjYv3z/856RGVXlt69IKnW9P9/kjo8sw1Ov+kkP44/cNiTWytirw4PlGKnR JqJzdlNkwo2HzSD27IdC/cOAMaiGmJLT+fqVH0hUF2dw+jhRYZxnGSlIONodGD9BQ+6n OV618YyOevQ/yb9PC6v7dqFlgH2xG4SA0EmK4wsqLUNkFMP1DcBzeSBbQs0U6N4r9Jzk GLH3XOP5jQKscJ/9yu5DJNQ9P4MKqLC9NhKlzS71bjr376AbZcaq0pZ9sHdAI3hQfJZ0 8NkJzCJRK1TKd/Doejnv9B/qKOoQm2kfwfIzoSPMmtYf4uSre9+vUiyLJWQhnIFfUbAq LCsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature:arc-authentication-results; bh=tvjSvxGn+nz0RcAR2Ze2jt1il5v9vY+Bsm/f1+/7924=; b=YyEf43m1Ie1xSiTZz62lVTjSsCPPbrJH2BVq3AocMHPthUVaYKWCn/rGrxiqFDYmJn EPs9jYm1EiLPBymZIUlw9POvVF0DHgsWRPGMKaFM3wKnVH2woa5O33Ht4JVb25vVJ3RG l7BpXFAX7c8wxaMWXxuNrSv6f+ufa+1WrpLtapeqXTOs1xvgZTR0LrXrRtAOXMY75HBq i9axwnK8oNDD/yKTt15KekQ9BcvR8OrieHnXD0jU2i4DZxoeXtkHv2ee1r7WPL1E08Hz /FRkXD4+KOSv2yjSSU2bHUAC9aaX1VxKLlz1ZNDHPIXwlAr0fPUt0bbt/+8jJk9mg8CR fAig== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GrT73jl7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t60-v6si3335103qtd.179.2018.05.27.07.26.15 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 27 May 2018 07:26:16 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GrT73jl7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1fMwch-0001S7-Hf for patch@linaro.org; Sun, 27 May 2018 10:26:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fMwQn-0000FV-6e for qemu-devel@nongnu.org; Sun, 27 May 2018 10:14:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fMwQm-0004TQ-84 for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:57 -0400 Received: from mail-pl0-x229.google.com ([2607:f8b0:400e:c01::229]:35998) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1fMwQm-0004T7-1N for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:56 -0400 Received: by mail-pl0-x229.google.com with SMTP id v24-v6so5735030plo.3 for <qemu-devel@nongnu.org>; Sun, 27 May 2018 07:13:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tvjSvxGn+nz0RcAR2Ze2jt1il5v9vY+Bsm/f1+/7924=; b=GrT73jl72AWEhsHCWrneOMDbAlDID+NiBDTh4hv+uo1N+y5Fo564KPvwB/EHzXUUDh g8pjJCiriMyxjR++ea424oqQRbpILSXwmGscu7nP9YJdCCFleVUsBOthhHs+9/fTrALU ePl8Bu7o9hUIJRcf2BadHe6UuObvvAXfhms3o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tvjSvxGn+nz0RcAR2Ze2jt1il5v9vY+Bsm/f1+/7924=; b=GNRpvh8SD8SietjgsMYtJn3XTQF2EF8H52OeZnnYT2WZXY6HRUjF9DkNX028zzNpG4 aZUDVqBFVoffrKrHtklhzf6AqbklVRgRv8APIZpw2ck5Mf5pRqSah5g35saPsx/4KxJ6 PPWImmV1iihfGsRUgcrIvH5dXhz7D3/0L870znKi0kR+W8rZeclLzGtLDcTcS14jpx6b MUv6wrZtTCdsJg15Jm+jMbtVVE+/gsIsjm5unWT8zvHkILEfQWI3AYDEJI0OqKM3aZkq KzWfnr3sxl47KMgyYlWDsCdjHOM3ttNe5E4mToSYq3Ov2XZBdN1XHy60BuiVjPuJZrj/ cKGQ== X-Gm-Message-State: ALKqPwdrD6ICZ4uBw44WuhzxI/A2rjDnREXmRHYbbtlNMf8756jOXMdl Akc6Tc03w5BxcqVEQOxwkCSQQ8TfIyj/4Q== X-Received: by 2002:a17:902:6b8b:: with SMTP id p11-v6mr9881496plk.212.1527430434782; Sun, 27 May 2018 07:13:54 -0700 (PDT) Received: from cloudburst.twiddle.net (50-233-235-3-static.hfc.comcastbusiness.net. [50.233.235.3]) by smtp.gmail.com with ESMTPSA id b89-v6sm66680075pfd.85.2018.05.27.07.13.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 May 2018 07:13:53 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Sun, 27 May 2018 09:13:21 -0500 Message-Id: <20180527141324.11937-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180527141324.11937-1-richard.henderson@linaro.org> References: <20180527141324.11937-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::229 Subject: [Qemu-devel] [PATCH 17/20] target/openrisc: Increase the TLB size X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Stafford Horne <shorne@gmail.com> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
target/openrisc improvements
|
expand
|
diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index 53abe965e8..8035654087 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -222,7 +222,7 @@ enum { /* TLB size */ enum { - TLB_SIZE = 64, + TLB_SIZE = 128, TLB_MASK = TLB_SIZE - 1, }; diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c index b2711a961e..75c83d15d1 100644 --- a/target/openrisc/cpu.c +++ b/target/openrisc/cpu.c @@ -53,8 +53,10 @@ static void openrisc_cpu_reset(CPUState *s) cpu->env.upr = UPR_UP | UPR_DMP | UPR_IMP | UPR_PICP | UPR_TTP | UPR_PMP; - cpu->env.dmmucfgr = (DMMUCFGR_NTW & (0 << 2)) | (DMMUCFGR_NTS & (6 << 2)); - cpu->env.immucfgr = (IMMUCFGR_NTW & (0 << 2)) | (IMMUCFGR_NTS & (6 << 2)); + cpu->env.dmmucfgr = (DMMUCFGR_NTW & (0 << 2)) + | (DMMUCFGR_NTS & (ctz32(TLB_SIZE) << 2)); + cpu->env.immucfgr = (IMMUCFGR_NTW & (0 << 2)) + | (IMMUCFGR_NTS & (ctz32(TLB_SIZE) << 2)); #ifndef CONFIG_USER_ONLY cpu->env.picmr = 0x00000000;
The architecture supports 128 TLB entries. There is no reason not to provide all of them. In the process we need to fix a bug that failed to parameterize the configuration register that tells the operating system the number of entries. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- target/openrisc/cpu.h | 2 +- target/openrisc/cpu.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) -- 2.17.0