From patchwork Fri Feb 12 18:48:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 381856 Delivered-To: patch@linaro.org Received: by 2002:a02:b18a:0:0:0:0:0 with SMTP id t10csp3180907jah; Fri, 12 Feb 2021 10:58:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJx0zfEZav0Yoxt64SB6lCxRn6zlQ4rFGm/jU1GKNuozJPS0pTlE7rVYNiMrn0XtvFPS6LTL X-Received: by 2002:a25:ac52:: with SMTP id r18mr2944176ybd.303.1613156322898; Fri, 12 Feb 2021 10:58:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613156322; cv=none; d=google.com; s=arc-20160816; b=vMGarSAPtF42QwEwHw7Wg331mie6+OtPfNM5/PGaaD+ocJfh9HkFgQcvUp3Fce1+1P e9q+XYl7UFVW7vDo4cug0/9L+KA3ROUJTHMlacMEvwX2bPd/ydyruj+G6XycDLrZMkIR dLqaPvXNH7KWPvy/D0Nkjcq0rxBPZ01zTo3g3Xs5aygb350bFwoPTszMaX/tbuzBkhOu JukUTF4F0/sFuQcn01qmAwoshlmp76szVlJ2WxPeEZx3XXkDQtAWaLlbklvi3+EzaG8V BvnocdiH30gE7+4SLqkR0nMPtPmGkMYdBPahNfxNjmsnuScN181KH7+gIZ96cy8v0ob1 MmbA== 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=rTJCLYbpyElUYj7N6H7CWtvtauF0jl3ZjvvIOqLSVtE=; b=qATXoASqGud+WGgWVDyQnNwEdgzxbg6RyhoWOQr5Mm2PEa/HD8ilq0kHmEX+xCH1+E xEXOq/G4aod28zz2uw8Kxt3HQFVMQyqYhglNvg335XS5v6Qnh5y4jGVEQyD4/iDDtdoE hrvyKIEwPqFlbyOD+SvytQmBY2GSwNRXi4yp6VPgho7D93yjSNBPGNxmmx5d/0dIcSoh ylnNmelD2ZPVKiISXBRNh7hyDENmQnJfq81sG5Wt5f8rGw/QQ3sufedDyqekdO89+acP 2mi+kkzTbnROVepor7i6chIjxNfbtqXviCyiTcAhOxRjONxjkTWg196bkBh1p6IzpO3E qXLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NAqieh+q; 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 h6si7750658ybc.407.2021.02.12.10.58.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Feb 2021 10:58:42 -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=pass header.i=@linaro.org header.s=google header.b=NAqieh+q; 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]:59982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAdeM-0000st-Ar for patch@linaro.org; Fri, 12 Feb 2021 13:58:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAdVI-0001WU-33 for qemu-devel@nongnu.org; Fri, 12 Feb 2021 13:49:20 -0500 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:39644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAdV9-0007l8-OC for qemu-devel@nongnu.org; Fri, 12 Feb 2021 13:49:18 -0500 Received: by mail-pl1-x62c.google.com with SMTP id k22so319916pll.6 for ; Fri, 12 Feb 2021 10:49:11 -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=rTJCLYbpyElUYj7N6H7CWtvtauF0jl3ZjvvIOqLSVtE=; b=NAqieh+qsBpnwEhi/h4XWL8vUtjWq4PqQ3pKIc3+Rqcga8mAT2jDzr1xFlT+8hQuJj eySF3lNA6j/B81rTqCYp5DgH4pQFHxmJ4NOw3u0pCECpzrASWOruuP8oLycDK4ItSLVn 76ZI9g7KkWCCLYf3s5EtzlyGlnSZ6l228GpQ46Gwo1QtWheZasgs5i38yCMXpMHTGn9u R+CGZdCT4KIBVSx8NIPsUlQr/ARQLY1uicSjJlh46TD4z8Lm0fMDZlKIPi4SPz6UQqva 3iYsVeiowBfGxnYkfJGgfeCFO4DAZH1lpHcB0HGYrpwbDDf31c+QAC5r1DyjVH+lvZz9 I+jA== 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=rTJCLYbpyElUYj7N6H7CWtvtauF0jl3ZjvvIOqLSVtE=; b=DH/4Ri7iFjJMuq9BjFrqmCUp+Ol2PJXFM3g2GDDgxRI5LtvQsGvPHJGZ5+mhf2Yfc9 7SIihQRxXlZTj8Pj2udmpdXyxfrkVIR31/B0A6X6M7kbTWcINAoktFqLXpeRXe0ZWZG7 n6GvkKpPG6ktZZsMfq2gwulS8Tlz+3souDxjHJ+cZUW8WloPoRgb7qDCtyoYpXbuPbp2 jZUNKFHRLhw5zKpsx6GBFDYSsqmsN1/8x/XMp9LBUm/prce5SVrjJoMdb03auHcw6jew z4zv+A4RYYMK4qy6vd2m5YN7D/46Nk/axvxFnIqA1tRpEmj2zsW/HgciUvgplqcIHq2S tPdA== X-Gm-Message-State: AOAM533l8Z0dMmo+dy+BcnIJXW09+7Fda2c+IAzmAH0YQYVTmCDGM6yj gvHzVzXVhP3p2fEO8J1oJ4lxh/OwL+lNog== X-Received: by 2002:a17:90a:480e:: with SMTP id a14mr3793170pjh.167.1613155748613; Fri, 12 Feb 2021 10:49:08 -0800 (PST) Received: from localhost.localdomain (174-21-150-71.tukw.qwest.net. [174.21.150.71]) by smtp.gmail.com with ESMTPSA id k5sm9427618pfi.31.2021.02.12.10.49.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 10:49:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v7 04/31] exec: Use uintptr_t in cpu_ldst.h Date: Fri, 12 Feb 2021 10:48:35 -0800 Message-Id: <20210212184902.1251044-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210212184902.1251044-1-richard.henderson@linaro.org> References: <20210212184902.1251044-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62c.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=ham 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 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé 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; \ })