From patchwork Tue Jun 15 18:23:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zack Rusin X-Patchwork-Id: 12322623 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFF0DC48BDF for ; Tue, 15 Jun 2021 18:23:46 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A56E1610CD for ; Tue, 15 Jun 2021 18:23:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A56E1610CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=vmware.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01E4D6E438; Tue, 15 Jun 2021 18:23:43 +0000 (UTC) Received: from EX13-EDG-OU-002.vmware.com (ex13-edg-ou-002.vmware.com [208.91.0.190]) by gabe.freedesktop.org (Postfix) with ESMTPS id A99056E3D0 for ; Tue, 15 Jun 2021 18:23:41 +0000 (UTC) Received: from sc9-mailhost1.vmware.com (10.113.161.71) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Tue, 15 Jun 2021 11:23:39 -0700 Received: from vertex.localdomain (unknown [10.21.244.102]) by sc9-mailhost1.vmware.com (Postfix) with ESMTP id BA3D1202A6; Tue, 15 Jun 2021 11:23:40 -0700 (PDT) From: Zack Rusin To: Subject: [PATCH 5/5] drm/vmwgfx: Fix build issues in mksGuestStats discovered by the kernel test robot Date: Tue, 15 Jun 2021 14:23:36 -0400 Message-ID: <20210615182336.995192-5-zackr@vmware.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210615182336.995192-1-zackr@vmware.com> References: <20210615182336.995192-1-zackr@vmware.com> MIME-Version: 1.0 Received-SPF: None (EX13-EDG-OU-002.vmware.com: zackr@vmware.com does not designate permitted sender hosts) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: krastevm@vmware.com, sroland@vmware.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Martin Krastev Fixes for ARCH i386 * printk format specifier warnings * inconsistent operand constraints in an ‘asm’ errors arm64 * not targeted by the commit being fixed Reviewed-by: Zack Rusin Fixes: 7a7a933edd6c ("drm/vmwgfx: Introduce VMware mks-guest-stats") Reported-by: kernel test robot Signed-off-by: Martin Krastev --- drivers/gpu/drm/vmwgfx/Kconfig | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/Kconfig b/drivers/gpu/drm/vmwgfx/Kconfig index a9052fae0bbc..c9ce47c448e0 100644 --- a/drivers/gpu/drm/vmwgfx/Kconfig +++ b/drivers/gpu/drm/vmwgfx/Kconfig @@ -25,6 +25,7 @@ config DRM_VMWGFX_FBCON config DRM_VMWGFX_MKSSTATS bool "Enable mksGuestStats instrumentation of vmwgfx by default" depends on DRM_VMWGFX + depends on X86 default n help Choose this option to instrument the kernel driver for mksGuestStats. diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c index 74a3f09ad664..ed9c7b3a1e08 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_msg.c @@ -665,7 +665,7 @@ static inline void hypervisor_ppn_add(PPN64 pfn) unsigned long eax, ebx, ecx, edx, si = 0, di = 0; VMW_PORT(VMW_PORT_CMD_MKSGS_ADD_PPN, - pfn, si, di, + (unsigned long)pfn, si, di, 0, VMW_HYPERVISOR_MAGIC, eax, ebx, ecx, edx, si, di); @@ -682,7 +682,7 @@ static inline void hypervisor_ppn_remove(PPN64 pfn) unsigned long eax, ebx, ecx, edx, si = 0, di = 0; VMW_PORT(VMW_PORT_CMD_MKSGS_REMOVE_PPN, - pfn, si, di, + (unsigned long)pfn, si, di, 0, VMW_HYPERVISOR_MAGIC, eax, ebx, ecx, edx, si, di); @@ -1115,7 +1115,7 @@ int vmw_mksstat_add_ioctl(struct drm_device *dev, void *data, arg->id = slot; - DRM_DEV_INFO(dev->dev, "pid=%d arg.description='%.*s' id=%lu\n", current->pid, (int)desc_len, pdesc->description, slot); + DRM_DEV_INFO(dev->dev, "pid=%d arg.description='%.*s' id=%zu\n", current->pid, (int)desc_len, pdesc->description, slot); return 0; @@ -1163,7 +1163,7 @@ int vmw_mksstat_remove_ioctl(struct drm_device *dev, void *data, if (slot >= ARRAY_SIZE(dev_priv->mksstat_user_pids)) return -EINVAL; - DRM_DEV_INFO(dev->dev, "pid=%d arg.id=%lu\n", current->pid, slot); + DRM_DEV_INFO(dev->dev, "pid=%d arg.id=%zu\n", current->pid, slot); pgid = task_pgrp_vnr(current); pid = atomic_cmpxchg(&dev_priv->mksstat_user_pids[slot], pgid, MKSSTAT_PID_RESERVED);