From patchwork Fri Nov 4 20:50:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9413233 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 C133C60573 for ; Fri, 4 Nov 2016 21:09:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B273D2AF51 for ; Fri, 4 Nov 2016 21:09:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A694A2AF79; Fri, 4 Nov 2016 21:09:40 +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 60C642AF51 for ; Fri, 4 Nov 2016 21:09:40 +0000 (UTC) Received: from localhost ([::1]:40793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2lk3-0007fW-HR for patchwork-qemu-devel@patchwork.kernel.org; Fri, 04 Nov 2016 17:09:39 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2lSn-0001B1-Qx for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2lSn-0004P3-50 for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:49 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:34151) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c2lSm-0004Ny-UU for qemu-devel@nongnu.org; Fri, 04 Nov 2016 16:51:49 -0400 Received: by mail-wm0-x244.google.com with SMTP id p190so5636195wmp.1 for ; Fri, 04 Nov 2016 13:51:48 -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 :in-reply-to:references; bh=Sc9H35lEWpisgpNoSkrfh9TSeFuBnA0DJ+0TaNTLOXU=; b=A0roWWHX6cYsXXTLYM8Hfld5GBT180EmzQbAAastPHUWzNxz2i4NsaRIKu6KnN4u12 MmdswpaaxAVIav2kRMSd/22/n26FJFgz+PbGjCEzVPgkVQKaTl9aqVkArvdHxDocs/Ut zS/MRSO8XaLQENnVjordMRa2dw9x3G2MZkzNMmHg4V51zCDfahi7KeutVeWSKPeV38HB pBFS6FqVm3/njn8gDDu2CK+xwc4fYdOxWvlNIJeM5o2uazqgjDVCe9OmmOo05ZWY/Ahi bgGT3cx7BtOcl5ofQA7KbADDa4CkjVnw0azAJufVeWGZvALl88bT6pPYnk8DbcrueqOw eM5g== 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:in-reply-to:references; bh=Sc9H35lEWpisgpNoSkrfh9TSeFuBnA0DJ+0TaNTLOXU=; b=hIVz+EQsAwYKz2P5Duo54gUJ7Zvdb8E0hBMgfYgd8vuBjF5uwQZMunXeWRBkK12pZW qX+SxDdNk/6RtDxbAknvTSKibJ4s/gxBRAKQ3sLuXUxtP9y+WbrhBjB9naZPJYBtI+hu bqWIRd2YFoKfWKbrEgaeF7rkoO/l6ACfANbqPJqFONdl4bnsVfHlwfpcYUacs8BxRZfo JL8nwpAKDWmxaeRkH1Y0Mzg7FgQpPrmms3EyL5d65RIUL12EjsPN9xT1VmPb4DfJB31C kKhQEjpWQY9+dRPEzeKL9yOjEFUBGX+SetjLr1ksSVa5PX2wFalLtHRo+Yurm29DROvA p8oQ== X-Gm-Message-State: ABUngvf/H/Yvce2xaxrMGDhgS4r6CQhsivOGOWQo76uf3EO2v2BAwBnk/9ul51utitUkSg== X-Received: by 10.194.229.7 with SMTP id sm7mr16596143wjc.150.1478292707880; Fri, 04 Nov 2016 13:51:47 -0700 (PDT) Received: from localhost (x55b4b5cf.dyn.telefonica.de. [85.180.181.207]) by smtp.gmail.com with ESMTPSA id w203sm6421314wmw.16.2016.11.04.13.51.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Nov 2016 13:51:47 -0700 (PDT) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Fri, 4 Nov 2016 21:50:23 +0100 Message-Id: <6e998689016241e74767ce694be056d4db5b22cf.1478291230.git.atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PATCH v1 22/30] 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 044e88c..fa70dc0 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 = -(8192ULL << 3 * TTE_PGSIZE(tlb->tte)); /* valid, context match, virtual address match? */ if (TTE_IS_VALID(tlb->tte) &&