From patchwork Wed Jan 18 22:38:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Artyom Tarasenko X-Patchwork-Id: 9524903 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 26816601B7 for ; Wed, 18 Jan 2017 22:54:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 195CE2863D for ; Wed, 18 Jan 2017 22:54:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D5092863F; Wed, 18 Jan 2017 22:54:53 +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 AC2372863D for ; Wed, 18 Jan 2017 22:54:52 +0000 (UTC) Received: from localhost ([::1]:44850 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTz7z-00029C-K3 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 18 Jan 2017 17:54:51 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTytQ-0006on-Ef for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTytP-0002x4-PW for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:48 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:36263) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cTytP-0002wJ-JL for qemu-devel@nongnu.org; Wed, 18 Jan 2017 17:39:47 -0500 Received: by mail-wm0-x243.google.com with SMTP id r126so7540774wmr.3 for ; Wed, 18 Jan 2017 14:39:47 -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; bh=wbjc53UwEUWR/xsBwLHvVkSi6kyumxVwxFfCR5r3yyI=; b=j+yZJIqM64VPM7kL+nhuc/QuwTW+AjdOZ9mQlq5hWJXQgd1XAW1aUCOGnpdZ+87a74 zFbmm1ZWWg6/ZOB24vJ4Qa8osVaYFUjCXPyK/fk7r6rqpfdFYFepKUOcFKasrGSvXYRM NIBwpfV7gYNjJ17wW357rkKHa2Oy7pFPgXUx3DSCP64JfNWf2TcP95H21uGHya1sBKdz wFbsWoYr6gYdjMPq4VAanrMoDeJ0STcsoeuvPdkrT+i0xOQ8TVZ8yo4RcEkckxCHbrKc pijqAGyRVCMIwpsHHxMkDpzOCPTLEuN9bag6i/Ltrs7CjFoY8QwJZBO9HnMgHRFsjHc/ W14w== 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=wbjc53UwEUWR/xsBwLHvVkSi6kyumxVwxFfCR5r3yyI=; b=B/B5Zyk5CiZ3r+3bdVDCckhQDAd8e2jTtHjkcCLieBc04KGFxr9hrwDyKjqamvPAnR OlQE1u9YrWxi9CmxVWQzQHC0XiRbNvGRlA/++5Ko0b9BMQNxL61eydp3W5WV70bqk9Ik MAptFhcw6aAkEXAqopXOZzN+ZguRphcTWiYuWpZm1QcPG9JSbJAU+jPIaK6oT9Hbz2Vs +XFgKEDGpTQUabZ3KXBlzfkBF3AEUkdxeD1AcUNAoicD6V4tBGrl44tM5Syh1o5vAsfa DTQu0gm5u1DG75BLyytSF5yVBFGK9FDT7e4yEeVdPEWxonmb5h0oI6AocX7X908vBtE9 3NUw== X-Gm-Message-State: AIkVDXJDQP3mS5D+gJrsz1kMiTI4/nQMxT891ZUgIsgtRbUv3iPADJRxVkXTF/hkvNleJQ== X-Received: by 10.223.133.98 with SMTP id 89mr4661076wrh.200.1484779186540; Wed, 18 Jan 2017 14:39:46 -0800 (PST) Received: from localhost (x4e33e2b8.dyn.telefonica.de. [78.51.226.184]) by smtp.gmail.com with ESMTPSA id r5sm48442815wme.23.2017.01.18.14.39.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jan 2017 14:39:45 -0800 (PST) From: Artyom Tarasenko To: peter.maydell@linaro.org Date: Wed, 18 Jan 2017 23:38:35 +0100 Message-Id: <1484779123-18968-23-git-send-email-atar4qemu@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1484779123-18968-1-git-send-email-atar4qemu@gmail.com> References: <1484779123-18968-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::243 Subject: [Qemu-devel] [PULL 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@ilande.co.uk, qemu-devel@nongnu.org, Artyom Tarasenko , rth@twiddle.net 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) &&