From patchwork Sat Oct 1 10:05:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9359163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ECFA9600C8 for ; Sat, 1 Oct 2016 10:29:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C916F29942 for ; Sat, 1 Oct 2016 10:29:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB92529948; Sat, 1 Oct 2016 10:29:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7126E29942 for ; Sat, 1 Oct 2016 10:29:50 +0000 (UTC) Received: from localhost ([::1]:55035 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHYD-00085o-Jj for patchwork-qemu-devel@patchwork.kernel.org; Sat, 01 Oct 2016 06:29:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCn-0006Tk-7B for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqHCk-0007px-Bd for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:40 -0400 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]:32856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqHCk-0007pg-5N for qemu-devel@nongnu.org; Sat, 01 Oct 2016 06:07:38 -0400 Received: by mail-wm0-x241.google.com with SMTP id p138so6759090wmb.0 for ; Sat, 01 Oct 2016 03:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Si3TDO/JxxKD8LJdoT3xzdD5nSX+TEqVqyPh/HbsVS0=; b=Uhzy0d2bGceAK1yng8JD+SwmpeeJvRbNXJKoyXyEaiXT18OgFlHDhNXFcd64R7AUrh K5zUf/VRWnr3BG6PxIo7GHI/mSS3KfWPJ4rlm4xIMT22j8A1m3GvxcqW1ReWwQUwiTyr 5x09Pa3T8jF2eGRmB0S/OLJQR26/mD4ZBeMzs+SC2+SkPW1WsadigcXwhQQMcRGGghoS oTnuOJwOI1Mo/qq7supDsI+0YQALoDSMhE3xKrno9CVt2MriAxuvYATZPGIlSd3nS2+o ZgYbVC3R0wIqRphQCWXyoBkD2iNzWPbweREoqRoPrwvPkJE46VtLz+GOM1Y06BdRZejy fZww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Si3TDO/JxxKD8LJdoT3xzdD5nSX+TEqVqyPh/HbsVS0=; b=d4llvGPtfRuWCivbTkxTGyOJJeGaYCCEe48pfbc3Caa277bclJ9Q/04/aOWNPq4oD9 bnyalKzz/69nLX8a3bS5oi7E2DCk+tzzgHlCUBoacvqJ6BSNeJYDAkfsr75rV2wS42cr hCgsW9JtJVFiTMJXPmutV/z71OB5txwDtkIpg9cHJppgNSV8jjnQyrMtdBwqdxv1Mm6U KhwDukNGMoFiEDEC51SfuEBQg4b/Nc3CwnuYPMWFKFcVJVuVDdD4jJoG9At/Zl/7rSjM LBm86rDTbrCIA5W563gDQb+seoUat96xFCEyD3/zXnGKOKUy9TlbPN6azfsDF5rXHO9w KPZQ== X-Gm-Message-State: AA6/9RlcwhQjUgyBT6jItt6xoQcZM5pgjbF9LlJ1keGTvw8J5bzVspVYW94GJkYPvdHc3g== X-Received: by 10.28.109.207 with SMTP id b76mr1564745wmi.66.1475316457596; Sat, 01 Oct 2016 03:07:37 -0700 (PDT) Received: from localhost (x55b4da19.dyn.telefonica.de. [85.180.218.25]) by smtp.gmail.com with ESMTPSA id l6sm8455338wmg.11.2016.10.01.03.07.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Oct 2016 03:07:36 -0700 (PDT) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Sat, 1 Oct 2016 12:05:25 +0200 Message-Id: <1475316333-9776-22-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> References: <1475316333-9776-1-git-send-email-atar4qemu@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::241 Subject: [Qemu-devel] [PATCH 21/29] target-sparc: allow 256M sized pages X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Cave-Ayland , Artyom Tarasenko , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Artyom Tarasenko --- target-sparc/mmu_helper.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/target-sparc/mmu_helper.c b/target-sparc/mmu_helper.c index bef63f8..33b48eb 100644 --- a/target-sparc/mmu_helper.c +++ b/target-sparc/mmu_helper.c @@ -456,23 +456,7 @@ static inline int ultrasparc_tag_match(SparcTLBEntry *tlb, uint64_t address, uint64_t context, hwaddr *physical) { - uint64_t mask; - - switch (TTE_PGSIZE(tlb->tte)) { - default: - case 0x0: /* 8k */ - mask = 0xffffffffffffe000ULL; - break; - case 0x1: /* 64k */ - mask = 0xffffffffffff0000ULL; - break; - case 0x2: /* 512k */ - mask = 0xfffffffffff80000ULL; - break; - case 0x3: /* 4M */ - mask = 0xffffffffffc00000ULL; - break; - } + uint64_t mask = 1ULL + ~(8192ULL << 3 * TTE_PGSIZE(tlb->tte)); /* valid, context match, virtual address match? */ if (TTE_IS_VALID(tlb->tte) &&