From patchwork Wed Jan 11 20:19:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9511361 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 1266D6075C for ; Wed, 11 Jan 2017 20:56:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04AC22868C for ; Wed, 11 Jan 2017 20:56:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED7DC28694; Wed, 11 Jan 2017 20:56:08 +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 AA7222868C for ; Wed, 11 Jan 2017 20:56:08 +0000 (UTC) Received: from localhost ([::1]:57039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRPwF-0000me-MV for patchwork-qemu-devel@patchwork.kernel.org; Wed, 11 Jan 2017 15:56:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55180) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRPOX-0006vA-7A for qemu-devel@nongnu.org; Wed, 11 Jan 2017 15:21:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRPOW-0001KT-FX for qemu-devel@nongnu.org; Wed, 11 Jan 2017 15:21:17 -0500 Received: from mail-wj0-x244.google.com ([2a00:1450:400c:c01::244]:35708) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRPOW-0001Je-A5 for qemu-devel@nongnu.org; Wed, 11 Jan 2017 15:21:16 -0500 Received: by mail-wj0-x244.google.com with SMTP id ey1so13027078wjd.2 for ; Wed, 11 Jan 2017 12:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=mHBQHgjzxk1gD4AUNfT6YwCg1hDenTTQhTtQl0a9A9s=; b=cxnVtkWxxXbbed0cRSMq7/ruve6+DW8sT2He6GOZhk73ydQSiQzPXUcg+tezQbqlXU oGfuteumh3ZjN4r5hwOmTd08s5Q28E/5FE495lScdk5y3cSZwmYn7bG+JLYBxSl2+O0i aoCI6oWjw4DGHyzt7l0EduCmiMzyRpAsd516jiV1mdtu5kDVJIQmKWjGf8EPvAmQAUEb 6jdkcCWOAECDId6cvtcRBebLeEidI33vf5i/1dczElrgv7zGCfubhZNIyByfrD/h3cfY BRSg3SQMIIfeFjeqGpNgNeArrkPXj/8N5ttoX7yU1zHWTXBsEA8t0ddLC8YI5W8uTq7v MMrA== 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:in-reply-to:references; bh=mHBQHgjzxk1gD4AUNfT6YwCg1hDenTTQhTtQl0a9A9s=; b=TZ87hT42GYUFCmIDJ2S9Gg6oeV6a4/GdNVLC/3uBhAuVxew6dfms9zZubg7QC1oHrR wer7UGs9fnc1WxuT2goJIZJBxBFonL7kf2vB6zQ1dEida8W7fLfe/xi7ocp5aopPtiKI ka+D/sIBxiXhwyZ1UwOQSA62vS4U0CIJACvnxBLzOxvqaPZTEjfG91O0RUP3E5FK2i6r /8nbjP5vGVTq8+RykJHlMtzpaoB9cngXQpd58Y0AcPys3WGWE+rk8BPmWlzf0rXA859n rx8tRYHraWA2utbp4NXa4o4bAQMGKqdeMoAvOFw22Bzj6h1qxGKP7kYqWrA/eo2eh7eR e2sQ== X-Gm-Message-State: AIkVDXLIAngNkQhaGpmxxgcHhsCalgfms4J9jyJ9U8v80FdEbFteCSpexsgHk3dJvNuDRQ== X-Received: by 10.194.36.68 with SMTP id o4mr6278859wjj.193.1484166075320; Wed, 11 Jan 2017 12:21:15 -0800 (PST) Received: from localhost (x55b4b54a.dyn.telefonica.de. [85.180.181.74]) by smtp.gmail.com with ESMTPSA id cj1sm10076105wjd.46.2017.01.11.12.21.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 12:21:14 -0800 (PST) From: Artyom Tarasenko To: qemu-devel@nongnu.org Date: Wed, 11 Jan 2017 21:19:53 +0100 Message-Id: <18b3a791b00745313e47347b5221ae7d534a7d36.1484165352.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:c01::244 Subject: [Qemu-devel] [PATCH v2 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) &&