From patchwork Wed Oct 23 15:45:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 177333 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp997443ill; Wed, 23 Oct 2019 09:59:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLPsePpEjvdc96bJ0dtgPFEGZs+pH11Qcn090Zxmqw1Pi7Zi1SqZiyMgFbVRnF5WtNxSBW X-Received: by 2002:a50:9eac:: with SMTP id a41mr38646371edf.237.1571849955929; Wed, 23 Oct 2019 09:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571849955; cv=none; d=google.com; s=arc-20160816; b=EXev5EKao8Nrq4GUQLdHiKSdZ0WM2qZxDt1WRUlTRGpj+8F9OTFMnTLPDzU36dymz7 9WUWy4Pc8sNHM0LSLThVK90LMzZQ7PYkhgJEf4ilflj6WmootnG29XXw6jEt7ffg70Us 6SL8QZFz90baGhfjzoGoUXJRxxVYwJEgAH2FF4Vd3jst2SzEsY40+ch5IuTc0xrmfKwD +K6I4/jHOAu5vKc2/T51DHKgZgvIr9yvu1mXIQy9tLR4/fdnD2xrbeWUOED47jrVNj1n 0Kt6M/vj5DHug2AZHJMzie2RLo+JjPbEguW+LUto7C+m4anywsjvqEOPSqnEEoSSN8YE WB0A== 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=c7P4icDHFNd0mEdVm74bSlE92DJndGlIMYmWQpTcLCI=; b=xcnX07uRV9eoFcCOHOwpor6wRHuaJGf1h4XSfJYSQzE5JE/yxRCzDqmph1GkSfradG ++cwP7cmdOWISoDjm5x0/QBWF/EjlYM7o9in8vvRA0NDFvB+Ou6uxV6eznU0iHE8E94F p5PZlMR+k6eTg2VRRIuZ/gAS3RiloR4Y2q74AwIrbCNgyCcK/Ax8cYmMEglCyKJVenzR AxVP9OjnOFgRI6s8IyViYs3L95xYeUArQGeE0iA+zvcmGvG0/O6wxChi7CXCLRV0YcAy wK8SUpHOqCGDeffo6A0BtihI4ak86wzXQZBd1nHgWxcMFoCC1WxHpJZbmix5AgaZL9Ph O4fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=spWfgZhK; 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=pass (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 y38si9568162edb.87.2019.10.23.09.59.15 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Oct 2019 09:59:15 -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=pass header.i=@linaro.org header.s=google header.b=spWfgZhK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41860 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNJyc-0005k4-5Z for patch@linaro.org; Wed, 23 Oct 2019 12:59:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42562) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNIp4-0004lR-5S for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:45:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNIp3-0005Zj-31 for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:45:18 -0400 Received: from mail-qk1-x730.google.com ([2607:f8b0:4864:20::730]:41354) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNIp2-0005Wg-Uy for qemu-devel@nongnu.org; Wed, 23 Oct 2019 11:45:17 -0400 Received: by mail-qk1-x730.google.com with SMTP id p10so20175533qkg.8 for ; Wed, 23 Oct 2019 08:45:15 -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=c7P4icDHFNd0mEdVm74bSlE92DJndGlIMYmWQpTcLCI=; b=spWfgZhKpuPn2IsUtYCPi7864OHr4cq5CqGow2D5RkOD7mZHHJQ7K+SGj9an4k9GSu mrUIOnZOw/HHyXmTaEmPpWuqr12wWdjQd9qrFyOic85uFl52oJzAFbXViVRAP/e4sLW2 TSDvGQmnCl/NVCDzSGpXm04rVN2IYgS+HVfLMWxJrVGfLgTRIR/YoG3omnP+K80pCPx8 3Z7e3K9TJoepvdSz2PbnGy2HmPBvub/tCOz10vYKwc2Oa1hbjyH9/BuTU4lwI8U14rvZ NElFgUXr9m7L5segePxBAhlbvuC4IoyvF2Nv3itMjjuL0LK45ZMq4apnKVYPz3h5fCky ME8w== 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=c7P4icDHFNd0mEdVm74bSlE92DJndGlIMYmWQpTcLCI=; b=e+Gfm8iMxQ4rMcBf65E3VD/tFbDExds/Cd2eiYxAMb+5e45IO7yC4oEz8DSTjikyTa I86MblWtX1nkpNeoWvDvYX+FaG9/vj84em0wu2UfwZS7udUGKdKisg+I0ay2Wg5dF7Zo FmY63h4pMmp2Mzojm/hz047TMzbp3r6kX+vAwFdkqc3mNRKBz5qUSZM+9Kswa/wpGx35 iEEfu6bliGjsOlS6fL2aPgx3ZccmZDax/5w0RcHaOwIS60eRnJyBHWxOsY6iUboo0KC7 doBTlpBfAzj4EeiafD6Jw+D97AA1wq3cjDT026OXQ+YFf3DhAfaFkEmFBy8QTXnOuO5M 94Rg== X-Gm-Message-State: APjAAAUMLDR73zAxLv+wGnOdYX2zBnYYATummb0Pz0YhaXcnTroGw0yg 3lLs/9sJz+qDBXp8Z/RyjQF1L7ZxFfU= X-Received: by 2002:a37:85c1:: with SMTP id h184mr8893826qkd.195.1571845515036; Wed, 23 Oct 2019 08:45:15 -0700 (PDT) Received: from localhost.localdomain (rrcs-172-254-253-50.nyc.biz.rr.com. [172.254.253.50]) by smtp.gmail.com with ESMTPSA id o1sm2456272qtb.82.2019.10.23.08.45.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2019 08:45:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 6/7] exec: Promote TARGET_PAGE_MASK to target_long Date: Wed, 23 Oct 2019 11:45:04 -0400 Message-Id: <20191023154505.30521-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191023154505.30521-1-richard.henderson@linaro.org> References: <20191023154505.30521-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::730 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 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 diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index d3e4660d50..ba6d3306bf 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -229,7 +229,7 @@ extern 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) ROUND_UP((addr), TARGET_PAGE_SIZE) /* Using intptr_t ensures that qemu_*_page_mask is sign-extended even