From patchwork Fri Jan 15 22:46:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 363800 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp275516jap; Fri, 15 Jan 2021 14:59:25 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKFGIiFswqoy+sAXs33iV71LOsYvboB4RDXe6OQbNLLYGKN1rg4nDCFeZx+K1rfwsbnXqK X-Received: by 2002:a25:af0d:: with SMTP id a13mr22470724ybh.453.1610751565419; Fri, 15 Jan 2021 14:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610751565; cv=none; d=google.com; s=arc-20160816; b=LDycb/r90IIhEgfHAIjSiI/4V0fbTUp2wWKRW6amB2+NhBxkNMeMH6Od5DsAGwmJRr 6ZcSIPy2awjK5hk4KW4MtWcoSQZoMEsOR2xw4kuEE1DqT5cFjRKl3rlMzzXjaz7YP31e G80dfiQ/nvPDyq64tmI4JVBqSK2b8YeAMxqMQyREjcJIR7SNDMDKb1G62nJPQj3r8YL3 1f/gPoluMVb01gym80wSeeAtGIDrgH2zOFDfE15XGDQsRJNc4odCL/wvROVvkzXpYS+b 3DZ1X6UyJYOvREOE4Jru3rEI44lWRnbmWIzNadESQ8uy6A7DEkp0qDC3PWSbhN5wBkfZ sz4w== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=uDiO56BD9yBVu0nwAI/hhOcXCMAfaRu426dsljY4dMQ=; b=z14Ai3zu7GBHO4XNcJNGobgn6YJ4g8x+363MZ8smZFT0L9WFxuJBmpcu0aoHGbcM1W 2jSJWoUJiDt0dzM3XQhVkfBaikpkMBw2k28mcEwCWq5B8xGazJjdIo9SthFPyPhuKh6p Zfw3Lkol2UpZ3Qr0BICoXv0kuKtH/d6NwRed+vO0DBU3kiH65HiMqykWUoQsn0B/mgIW o/Cuqy1mA7i66Qwi2QTUamP49SElvDUkuuqtlNvAPwR248O4OmHa+LK6cJnUgx8r2UUK hFD2zO2+cVY8VHoRfr7U3bLIR0JlAjtpolIEzGKYcXbBUWje5QIowvXJ7JOTD1CHDOyQ Rh/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ii11emU2; 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 b10si10404725ybg.497.2021.01.15.14.59.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 14:59:25 -0800 (PST) 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=Ii11emU2; 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]:50612 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Y3w-0007GA-UA for patch@linaro.org; Fri, 15 Jan 2021 17:59:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0Xs3-0003Xd-QB for qemu-devel@nongnu.org; Fri, 15 Jan 2021 17:47:13 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:44028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0Xrt-0005D0-U0 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 17:47:04 -0500 Received: by mail-pl1-x62a.google.com with SMTP id x12so5437788plr.10 for ; Fri, 15 Jan 2021 14:46:56 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=uDiO56BD9yBVu0nwAI/hhOcXCMAfaRu426dsljY4dMQ=; b=Ii11emU21XXA52/szniJPxFW7eatwD+xZDT7o7o6j3R9fHAsGDCsRXujER8F9l0bV9 qSFsWQUaSvCuosTkzdQHBEYqgy5E3uO+y66zlvQH6bmaVbyhmNMi4HMgmSERSNCNFF0a qr90BL4XHqOmZHQg9TGVCWCWX1r35lnVAxKZvyvb8z7PQ9oMAyss/4ZJ8IaWQ/9FqEgI WAI2nGwYzR+b6d7HYudUVrgXaHzrN2+OBADyBuqKXO8KBKOIgtyg6jYyDjZVtWZ7lqoq GEbdMwzoNSWo8WWZRHAiUmTNb6f9OmXGL162uoeHdIXzB8rWLeyxj6FBArY1DKBRWNMq Hmlg== 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:mime-version:content-transfer-encoding; bh=uDiO56BD9yBVu0nwAI/hhOcXCMAfaRu426dsljY4dMQ=; b=FPL4Hz4D02VtKypIq+bFXguNKYAeusPxJhGtzJE55fTXqilB8f2vzrimQujosrOmyw vHiyS8LaYKOwfKkBxNq7kygPHOJLmuZgr50MLkcZk4jdVXV65Kl/cbQ11r1uXBEw78Pq iRkt94NophRajbuslcVnHacLZiCXat+ZnIzw5GZbROdgjRWI1zGpeUTK7E6Gq2H6YcP0 wVYIW3u2LkBG3C08Z6lsfHEImSMnlAVbsuZ1HNoAdv+mtZpe0J/kUGPRD+cJVitqTust w4ORj2Qoc71jioW4fd0HCEZySQVT9JLO6NYhPjTh7+5lGAsbOBbHBH49kKYZnGBZ+xyq VbYw== X-Gm-Message-State: AOAM53279/xDD9XeraP5eY9EzmR5oo4cmFwEnWO1RL/r5ig6UY0iAY4s 2qMVf4SxJ1S22JvcKRRUy81JGbLgdg4QNBhW X-Received: by 2002:a17:90a:5991:: with SMTP id l17mr1845333pji.187.1610750815323; Fri, 15 Jan 2021 14:46:55 -0800 (PST) Received: from localhost.localdomain (rrcs-173-197-107-21.west.biz.rr.com. [173.197.107.21]) by smtp.gmail.com with ESMTPSA id s13sm9521700pfd.99.2021.01.15.14.46.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 14:46:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 04/21] exec: Use uintptr_t in cpu_ldst.h Date: Fri, 15 Jan 2021 12:46:28 -1000 Message-Id: <20210115224645.1196742-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210115224645.1196742-1-richard.henderson@linaro.org> References: <20210115224645.1196742-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action 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: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is more descriptive than 'unsigned long'. No functional change, since these match on all linux+bsd hosts. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index ef54cb7e1f..3f9063aade 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -70,14 +70,14 @@ typedef uint64_t abi_ptr; #endif /* All direct uses of g2h and h2g need to go away for usermode softmmu. */ -#define g2h(x) ((void *)((unsigned long)(abi_ptr)(x) + guest_base)) +#define g2h(x) ((void *)((uintptr_t)(abi_ptr)(x) + guest_base)) #if HOST_LONG_BITS <= TARGET_VIRT_ADDR_SPACE_BITS #define guest_addr_valid(x) (1) #else #define guest_addr_valid(x) ((x) <= GUEST_ADDR_MAX) #endif -#define h2g_valid(x) guest_addr_valid((unsigned long)(x) - guest_base) +#define h2g_valid(x) guest_addr_valid((uintptr_t)(x) - guest_base) static inline int guest_range_valid(unsigned long start, unsigned long len) { @@ -85,7 +85,7 @@ static inline int guest_range_valid(unsigned long start, unsigned long len) } #define h2g_nocheck(x) ({ \ - unsigned long __ret = (unsigned long)(x) - guest_base; \ + uintptr_t __ret = (uintptr_t)(x) - guest_base; \ (abi_ptr)__ret; \ })