Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1125488pxu; Wed, 6 Jan 2021 13:03:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJz07aw5o56QaNkAcHIbLslu+rSG6Yp0edznxMlgVpEtVvGODDZ38yIqEYEK0e0OfeFldLUz X-Received: by 2002:a17:907:2061:: with SMTP id qp1mr3957964ejb.222.1609966985280; Wed, 06 Jan 2021 13:03:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609966985; cv=none; d=google.com; s=arc-20160816; b=ezcgGmkvrHeLpVFQJtNSNItB6j5IiZVTA6kGAd6QiJjj0IKx2e/R5TaT2d2F0qhGoS 2TqqeLucdUw3ty/nx3+gdM8vsQPND7zhHhMREFgW7P7J2SSGT1eZXMYW2qHJzq2KRHGx rinHtUFTyKe2fzsJQ3RU0FBzG6+3gwjPDl9keRGqw6sH88WbpR/G+pijjNf8KyinHKO4 Bfd2pYj6NTBpVAMFen8eLNQ7w5jiIyK4HSne/8yKrEhy/PxPdNdrpTKVfzA+s3ZRtR3Z U5A85ZPWt1TQveYFz3An4ci1cDo2z1P6vdiQXRm1zcHVT+yyAvT+Vz7AXsOgjCZN4DGV DYZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FJUh0NIV6tLtFMoflZQxLvFWSm2r6hdgzOOra0YNnlc=; b=L9EfMkUaVJ7D6f7Z8Jq0ylxQZetLEPyxH8nFNLYxRc2HKdqL6+uMPqXbsYLcIAz+y2 Hxblz3KFGbgBhOgw/zypkdMFSrUxxFvl/ONwD19/SUbcISW+ghCVFaoWNor5nUN+tTG8 vso5F57Jg0p6VPKDlCzUWj8sbZR5qjYFphiaApsXJ0DVbVmLzYlH9Plerj9VJHCiJTCM ebvq8WuKT32dNHsHFjGFlzxD6fg2cV6eibpCuDvRP2DqJHaF+48/atoLFVyo294+NKdR rcLsD8Yd76B4x1pbdMZfHxSe75V6g1p2FPaCQD91Ol9GOGR00tD6PPnIXaRLMurlArnF wxzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NfKFkHTE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e6si1385238edv.445.2021.01.06.13.02.42; Wed, 06 Jan 2021 13:03:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=NfKFkHTE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726829AbhAFVA3 (ORCPT + 99 others); Wed, 6 Jan 2021 16:00:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726509AbhAFVA2 (ORCPT ); Wed, 6 Jan 2021 16:00:28 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C5FDC061575 for ; Wed, 6 Jan 2021 12:59:48 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id lt17so6951404ejb.3 for ; Wed, 06 Jan 2021 12:59:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FJUh0NIV6tLtFMoflZQxLvFWSm2r6hdgzOOra0YNnlc=; b=NfKFkHTEG0mg96jqLjPkdGOVVTVbu8hsSa43MU9A9FkmVjq/xrzNr15XfUCEVSHbmk 5g0tiXWk38FKphoO8oDjPW9hPCaTO4s4QVrd6T3pnNtBWbc0tyCzW0MUb/iPq1gYrGi+ ryVDSHq71A1l1gzgJ3ud3iR07I4P5mpqYpoFjX/S7r7+kSUrmAjGzRgwSuXdkrSdFFhC wlBvDtlRcPznuenaqm19dCQW80XMMy2pAkVmUAJA1ID2L3z/lmeH/Xzu9c01vK0WhETm fqdRzM5bm5jPyHhVicuNwPy2qAfFLWI6qNWbeUq3/j8a+SUisNryPOjqhoDljk5oru5T jRGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FJUh0NIV6tLtFMoflZQxLvFWSm2r6hdgzOOra0YNnlc=; b=k9M4uJY4wGRA5Izx+itH2sguPMXzP1hG1uIYXdb8W9Qnl0G3GGoldBuN1iryAMO2aY j84WM+KLR4BGkZgHOUYWPo8o1oreU/WLRA2gQBrfmlDQHJQWh/yXAiPNdbCtaq+cawAH fpQLQaXBirmwrePzz95IBWXqWfwttz97cVcX2FvpIcgM7ZTEqr5C9rz+OFKzugogkE23 ltyiN7jfzSG5uT0pi3MA6AYOH/HtnyjVIHq6wSW4rM/mF6n02iHuWb9NHrlQYkZkGhKL Py212FMCM9xYtB6cSxKgh7dbzm2OF2PdERyBLddK2ZVc8qV1E39MUmQ5eK7lGzqZC9z7 NPnQ== X-Gm-Message-State: AOAM530knDgv826NaOq+a4gDf18Sg+Bk5VRupGRJ79sHHXTbrKGx9IgG JaxWaVTyHpUValftkaeWse+JHQi0Bj7tu4LqMIPyvA== X-Received: by 2002:a17:906:2707:: with SMTP id z7mr4166564ejc.418.1609966787093; Wed, 06 Jan 2021 12:59:47 -0800 (PST) MIME-Version: 1.0 References: <160996560236.3973505.14624475570488164641.stgit@djiang5-desk3.ch.intel.com> In-Reply-To: <160996560236.3973505.14624475570488164641.stgit@djiang5-desk3.ch.intel.com> From: Dan Williams Date: Wed, 6 Jan 2021 12:59:35 -0800 Message-ID: Subject: Re: [PATCH] x86: fix movdir64b() sparse warning To: Dave Jiang Cc: Borislav Petkov , X86 ML , kernel test robot , Ben Widawsky , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 6, 2021 at 12:40 PM Dave Jiang wrote: > > Add missing __iomem anotation to address sparse warning. s/anotation/annotation/ > > "sparse warnings: (new ones prefixed by >>)" > drivers/dma/idxd/submit.c: note: in included file (through include/linux/io.h, include/linux/pci.h): > >> arch/x86/include/asm/io.h:422:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void *dst @@ got void [noderef] __iomem *dst @@ > arch/x86/include/asm/io.h:422:27: sparse: expected void *dst > arch/x86/include/asm/io.h:422:27: sparse: got void [noderef] __iomem *dst The sparse spew is somewhat interesting, but what would be more helpful is explain the why. I.e. that existing and future users expect to be passing an __iomem annotated pointer to this routine because... . Otherwise someone (reviewer / future git blame user) might reasonably ask, "well, why is the driver passing an __iomem annotated pointer in the first instance?". To Ben's point you might also duplicate part of the comment from movdir64b and say: "Recall, from the comment in movdir64b @__dst must be supplied as an lvalue because this tells the compiler what the object is (its size) the instruction accesses. I.e., not the pointers but what they point to, thus the deref'ing '*'." With clarified changelog for both you can add: Reviewed-by: Dan Williams