From patchwork Sun Sep 22 03:54:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 174201 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1309574ill; Sat, 21 Sep 2019 21:03:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGkWjwR3bEJmarsqXHqFz8VN7eucugTEqbczZeEn1tFkvJs/FUHuQA+UjNDov/LFqwtNxB X-Received: by 2002:a17:906:c4b:: with SMTP id t11mr18477101ejf.131.1569125038333; Sat, 21 Sep 2019 21:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569125038; cv=none; d=google.com; s=arc-20160816; b=lN1VGXMrhjkfpRrK9T7qm/AOHMEhOvyfKh29fSWUWD5GD0IczB7rQS4xtStwWWv4w6 lXZMRsjsDKI+lXKkDWgnqRDUidz/Byb8QZ4pENiM90MelpDe/Ek66AHPf8D7NLUjADTW KZj2+La2eVdp/TNYQf+dQibBtGhl322xl1TJs1B5XctZJdPsPcWINie9rUNSWgAWQ/gt hI5Hwq6Hy8A2WUnRygm8fWzvCMqGAIGq1ovOU1xGTnTB8oWJtB4vNQiDsEJiIQQNT2Fo plu52tx6bJLWjToWRgmx1J2wkJ1a4s4rAo2CnIVQd6uFVv00eRO/1L8c3vAzA+MAAOd3 Ebpg== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=pCxJTsjXZq8g03qIiRt5SN5kChF38n16rM3czFVAxy4=; b=labE868qIz21d+sBEWbvvFCIjz1kOk04Qm6swFIgP3iNulM1m1Vp8putiCbrEGV2h1 JxEDHncAf5+A8nyJpNJ+Y74Z8ZSqTzvqwvvPeQzmrCRzvnocUo859e+8EFYpxgmMGYLD TTH7KrNSTQL2JF1RuL1F8QZ+keA9jWPUdPxLxNl1Qds9icvpOXiz325m4txcHRIcW3pY PBj6GTlmVk/M8TIrNd5Wyk9Oh2JQKQDAvmFfZTjXexM3SQYkq6FSrpICoqEog946W8yF UaRp5lX2VXtMkmSPmIlqfhgUUT6LArQcwy+dIY+jKRt2Jj0traRucumiRmWnPcorLMo6 V8nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="UZyXN/4H"; 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 me9si3171007ejb.280.2019.09.21.21.03.58 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 21 Sep 2019 21:03:58 -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="UZyXN/4H"; 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]:44978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBt6K-0000I8-SC for patch@linaro.org; Sun, 22 Sep 2019 00:03:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40820) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iBsxp-0001Og-Kj for qemu-devel@nongnu.org; Sat, 21 Sep 2019 23:55:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iBsxo-00087I-Fp for qemu-devel@nongnu.org; Sat, 21 Sep 2019 23:55:09 -0400 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:35789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iBsxo-00086q-9m for qemu-devel@nongnu.org; Sat, 21 Sep 2019 23:55:08 -0400 Received: by mail-pf1-x42d.google.com with SMTP id 205so7000264pfw.2 for ; Sat, 21 Sep 2019 20:55:08 -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=pCxJTsjXZq8g03qIiRt5SN5kChF38n16rM3czFVAxy4=; b=UZyXN/4HM02XXBXKBdYfIR30vcM4GkupWbmcY2LlkMUAHmmmBeT8959/HXQIQqRLvn RQSfrDkOSL0aoYG+0buntlYfATFUw43tiMPD0V6m1hN92R7L4oZelz00YLumXVqbJAPg Jjl++xhOtwhfGXX+c6KqoXfQt9lBbZNOTfQ8XYel3g5vgWopoZiudK2DvhInJUVh8w9t r2VUEct8B0QqNJBoGkvlqFs17Q+34I9M98VXvNmPkPPxCRzVyw0ELR77hhHePmDV+7kH 4OSy1xPXGl1/JmerbOv71yLbHgOQZ6cBNwSts9CGDTgnBA1PxErO5RXMs9HEDV3QjKgu Xyeg== 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=pCxJTsjXZq8g03qIiRt5SN5kChF38n16rM3czFVAxy4=; b=j1SPapy3Sfci+AbATlZZtXEG7EQkQNlHGunUQcGh/GhLB3Q6yoETTfPCEwkpqhOuKM sC37yRDxpZJ+djaT7ogyOGRQxbkG9xgjeMqzH8O0gZFJgM8ah8JWTZ2/lhui9hwc50Zd jWC6lmgl/4RRZt5D51nubqxb9/gvidvLh32FXF8ENfthmj0SRMdg1nYnI0SmF08v+QkY sXB+pjvOVDhN0d1lOtf4YTC/DqO/tIrEz4RfCXFTziTCHlzZcIAe+c6lT/cciO9fwv0q /89Odx6XDOwftX+6nv1g7W6PvB00qSWRwAAjr+d+wt4R3idplIzFZM8kA2wbjCu6F051 Yiag== X-Gm-Message-State: APjAAAXBGHrkFh37xYwzuesLFnAD0+Wsw4AJULpjVIy8OuEVHCXQ0Goi 9/5BAMUz/FuL0HEoJixrA3n2a/l7i4s= X-Received: by 2002:a17:90a:3b01:: with SMTP id d1mr13351237pjc.81.1569124506950; Sat, 21 Sep 2019 20:55:06 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id z4sm6452921pjt.17.2019.09.21.20.55.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Sep 2019 20:55:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 05/20] exec: Promote TARGET_PAGE_MASK to target_long Date: Sat, 21 Sep 2019 20:54:43 -0700 Message-Id: <20190922035458.14879-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190922035458.14879-1-richard.henderson@linaro.org> References: <20190922035458.14879-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::42d 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: pbonzini@redhat.com, alex.bennee@linaro.org, stefanha@redhat.com, david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" There are some uint64_t uses that expect TARGET_PAGE_MASK to extend for a 32-bit, so this must continue to be a signed type. Define based on TARGET_PAGE_BITS not TARGET_PAGE_SIZE; this will make a following patch more clear. This should not have a functional effect so far. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 Reviewed-by: David Hildenbrand diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index b11ee1f711..34d36cebca 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -225,7 +225,7 @@ extern const TargetPageBits target_page; #endif #define TARGET_PAGE_SIZE (1 << TARGET_PAGE_BITS) -#define TARGET_PAGE_MASK ~(TARGET_PAGE_SIZE - 1) +#define TARGET_PAGE_MASK ((target_long)-1 << TARGET_PAGE_BITS) #define TARGET_PAGE_ALIGN(addr) (((addr) + TARGET_PAGE_SIZE - 1) & TARGET_PAGE_MASK) /* Using intptr_t ensures that qemu_*_page_mask is sign-extended even