From patchwork Wed Sep 4 20:44:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 173060 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp446397ilq; Wed, 4 Sep 2019 14:14:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzY6Zu6oTstFDPkCEITGgpPNerru7pJ+Xv8rmdaT2ZROoveP+PBYSXVDvdemWlEgzwN1sDs X-Received: by 2002:ad4:4c08:: with SMTP id bz8mr2921qvb.81.1567631647612; Wed, 04 Sep 2019 14:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567631647; cv=none; d=google.com; s=arc-20160816; b=aduQ92+nU1FSd5uqr1rKWkn4yHQHcGUWPlGKx3G4Ti/q8o021meQIw40qmdAT6rJbN UN2GQmYgdQcMsMNTc0N6s5hl4bALfsaa2O09xPqKSSOMoNiXDfZ1vqoMLp7vdc/dy8ek 6tc0jSj74mnBFWSYrYKA3Un4+k7Xv7cADJXXBUk0EMZOkGNEVwKTkNEuu2hgrBpBzXuD EIM3KeLQ3VIdEYvYzjrjuND0z7XP6b45BOGVSANTT4bc68tTXWvzdt0dDyKWj9jXHPzr 8Pq1Eq+GASIIg57Sk/h4U0lynuwPx8dd51KFB2CNo+Cr52HzcOa0LBf/u31Whfh7tft5 UgXw== 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; bh=NUB/rqkFfUKu2v7QerAjMtUtZI3FXJ/o9W4GMo7Gy60=; b=pH7DIpkC7Eik62fs5HPl8g4tbvcLxp9cXueD3wWj6bCb1bhE92yNRvQ5KGjw/tkdjm OFzdXY6YHndW6ziQJzC15HycR6qD0/R75D+doiied7K5u1KOsnpF3I42NXxt9PnyAuUG 4UIGm+L+O8fFaITbSm6NtjlNB8Yl+LUHN13Io85lLB2WHFPdpEAPrbjAGjdpboH9EXaT 7uUD2cHsNC5eOnVRdZmNwXYEuLJSKN28upGEnxh5V+IYKEIhb9jp52hk7q1n2nf5Uj6M 7ywlWMYvN3zjFyaSomMumaSGvkiIwUVsnel4AY7s6+D1afvulWu4s8z7SlajxwT8THZt MsjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rJ71HQIa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c8si7749540qtg.231.2019.09.04.14.14.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Sep 2019 14:14:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=rJ71HQIa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:39954 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5cbO-0002T8-Gd for patch@linaro.org; Wed, 04 Sep 2019 17:14:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52808) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i5c9V-00065W-Ov for qemu-devel@nongnu.org; Wed, 04 Sep 2019 16:45:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i5c9U-0006ix-6T for qemu-devel@nongnu.org; Wed, 04 Sep 2019 16:45:17 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:41274) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i5c9T-0006i9-Si for qemu-devel@nongnu.org; Wed, 04 Sep 2019 16:45:16 -0400 Received: by mail-pl1-x633.google.com with SMTP id m9so89326pls.8 for ; Wed, 04 Sep 2019 13:45:15 -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=NUB/rqkFfUKu2v7QerAjMtUtZI3FXJ/o9W4GMo7Gy60=; b=rJ71HQIaqEkUSz+KMQTIDAlS5TDNBjaTyZSB+VAlpy6Zv5f4wCKn4afr6ClPGN/X98 W/vLXrqavlnupmZaz6G7zNdCUx1ts/J54iqRSBbRSqqqeLnbYgFVSrmrrfQ/nLBbXsPf vgAOo/L6FB/7QcQEaNGWssDg67zAfSKvXnL0FIXLu2WcpkDWFWzIAeuLVGNaQM8RZu/R K7hye+ej+wRFHkZpAWEh2Vd/VhyO1vqmCRcQNcAllLzkgN8GUp8ryCM8TmS565F6V47I UsOUVlVQnUmV4pEc4zC/vJC3rN/LUvVEJg8cg9ygGw+VV2Jt2kS+VT8p7OHlPRUY1otK hNSw== 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=NUB/rqkFfUKu2v7QerAjMtUtZI3FXJ/o9W4GMo7Gy60=; b=uoDkX4Of/MVKvbqNCFbNV1cFvLH5ykQ3p34LLcg4TlQji+zvKiBFDju0tB4XYkIbdH +kh9Bu1ZUW4db/k9eIgPhKHfyEiMBD4Vbvg9bX3EbusqWjhDTw764+B6vKM/0v6fuzui ASGxFXslQ/nKQJY4GLuELNfMf8K1+g5vzNK+9CChTaPSDrP1jT3Z4QyD1kf0KAUAUSqn 5UrgSwBurGkCk2x6bXcRQkV7y4BWPndYttsb9hlHNz1OhcrkRaNjwJ5PabBNqw7Klz5n TnEpcLHwy2PiRSQ1ZeyMDtq02nCzUr4g0m0vW84ikbe1KQiuqENN0iGfUCjeAp2xxNRS fTZA== X-Gm-Message-State: APjAAAX6oDTC2+fdg2PIxNLq4Zb2Bm8AlJW7/2pLuYAGDbypICXFK5Kv xbrVUxXdfDbM+Qy4MdqeT11t4NXQUu4= X-Received: by 2002:a17:902:a415:: with SMTP id p21mr18702282plq.319.1567629914328; Wed, 04 Sep 2019 13:45:14 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id n66sm8104610pfn.90.2019.09.04.13.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2019 13:45:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 4 Sep 2019 13:44:58 -0700 Message-Id: <20190904204507.32457-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190904204507.32457-1-richard.henderson@linaro.org> References: <20190904204507.32457-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::633 Subject: [Qemu-devel] [PULL 04/13] target/openrisc: Make VR and PPC read-only X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" These SPRs are read-only. The writes can simply be ignored, as we already do for other read-only (or missing) registers. There is no reason to mask the value in env->vr. Reviewed-by: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/cpu.h | 3 --- target/openrisc/sys_helper.c | 10 +--------- 2 files changed, 1 insertion(+), 12 deletions(-) -- 2.17.1 diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h index 561f0f7fad..755282f95d 100644 --- a/target/openrisc/cpu.h +++ b/target/openrisc/cpu.h @@ -68,9 +68,6 @@ enum { (reg) |= ((v & 0x1f) << 2);\ } while (0) -/* Version Register */ -#define SPR_VR 0xFFFF003F - /* Interrupt */ #define NR_IRQS 32 diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index 1053409a04..d20f48b659 100644 --- a/target/openrisc/sys_helper.c +++ b/target/openrisc/sys_helper.c @@ -39,10 +39,6 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb) int idx; switch (spr) { - case TO_SPR(0, 0): /* VR */ - env->vr = rb; - break; - case TO_SPR(0, 11): /* EVBAR */ env->evbar = rb; break; @@ -62,10 +58,6 @@ void HELPER(mtspr)(CPUOpenRISCState *env, target_ulong spr, target_ulong rb) cpu_set_sr(env, rb); break; - case TO_SPR(0, 18): /* PPC */ - env->ppc = rb; - break; - case TO_SPR(0, 32): /* EPCR */ env->epcr = rb; break; @@ -204,7 +196,7 @@ target_ulong HELPER(mfspr)(CPUOpenRISCState *env, target_ulong rd, switch (spr) { case TO_SPR(0, 0): /* VR */ - return env->vr & SPR_VR; + return env->vr; case TO_SPR(0, 1): /* UPR */ return env->upr; /* TT, DM, IM, UP present */