Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp15056406ybl; Tue, 31 Dec 2019 00:08:28 -0800 (PST) X-Google-Smtp-Source: APXvYqygTL5Doneg10i2VbjjId2hPVZMfKJXH4HL28gHQ101J0HpFhBNChdqXxvzXfdMrQHylraI X-Received: by 2002:a05:6830:155a:: with SMTP id l26mr81051673otp.339.1577779708855; Tue, 31 Dec 2019 00:08:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577779708; cv=none; d=google.com; s=arc-20160816; b=g3BSMRoZ3ThHVOLCsLaQwa4J8hrxPavxS/gAGCAV9J6KtsKVaqXuLS8G0CqBwNvoJW ew1bUuIGKJl/F0IhtAXQIVi2gcCSF3MeU/NmOUQm/3TWBxpxw8N0W7p0DXTEedaDfCkv SPXOykeqovmY+caJQksqyn2kRW7N+Ez7C8VexfU5VqGT3RFiai2ebl5wukd6pv69RPQZ hy2AeKTapNSgOoMwylCb6yLd93vSsfjY+ARB96ETOkBoylrApMLrxYmpw3KiI+/g2oRb 4f9eMDC0ATAGm2eNLaPCH3W3iEFjdyP29JurTOpYYiEqMvPAGr3ZHEZaJJJJURucoJck agKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=bGuUl/aBL2OgivOMmQPi9elv22h6HOh655j0TjOw9KI=; b=MGRTjlV+JQ2+2UtggrpoEOzeCHNLkgba3k3MMRk5+3lb6UZ1Vh6z0BNZ/oCIKdLWN1 G2a5H5tCdl41n/RAgWQ6BDugr1uvaWORugKEZR7yAEKebhXI3FSrqvBIb7nwrOoXeeel qggCETW44Z6Y3oWU/3D0nCRaxIGFbgHTRGosgIJ+wOQCyuGSLSi8x7UbtaY3pas2fyqG 9DdyXGicRuFF9cjzWHVnyRmbcs4VerzguuyepQdUAqih88+Y1DQ6zUq+rP1rFfO2/TOv SJWxHbgaJZPjP0l3MaFkx97cXlTIan1UXt6inUxecRnvsz/NpB6E4uMd0zP30jvk3Y5E 7sXA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si20395555oig.75.2019.12.31.00.08.16; Tue, 31 Dec 2019 00:08:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726208AbfLaIH2 (ORCPT + 99 others); Tue, 31 Dec 2019 03:07:28 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:37202 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbfLaIH1 (ORCPT ); Tue, 31 Dec 2019 03:07:27 -0500 Received: by mail-ed1-f66.google.com with SMTP id cy15so34720049edb.4 for ; Tue, 31 Dec 2019 00:07:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bGuUl/aBL2OgivOMmQPi9elv22h6HOh655j0TjOw9KI=; b=RMnfp3dB1Kup4J3kOKHF+QeukevxkucgDYpbFzzw6h/xTpd0/spkMTo+aC1h1KgcF0 kQ4bxxvSVa9go73vm20lLpj9V3PFn5b6h1MdDUkOFAMdx+Ni/aO1bGOqWzLdaoKK5wWs FOOH9DCY7NyXg3C4zU/Pd5cuC1uKID6b2Pno9ySK53FTg2ze+UnUMTpTDwjZ8tI81kuW KSUHKOiPmqviR1ushDQkfJjqybGkt6ivOWLZuOw+v/Q43hgmuyYvnFkqdXiUmUBeAbQN ACr87gPbBWIuH1qBLDSda1eEqJnZHCIA1JIHqVNmz+Kw1DUiaCLdaKkbYM89CzW3YLMM C3yw== X-Gm-Message-State: APjAAAXuVBqp+/9Szm3nXobOXcNJ7fKAetJg9OtG2twU9ubjZffmstKx LMvef619aleEX1iRew/y72g= X-Received: by 2002:a17:906:ed1:: with SMTP id u17mr74859457eji.286.1577779645556; Tue, 31 Dec 2019 00:07:25 -0800 (PST) Received: from pi3 ([194.230.155.138]) by smtp.googlemail.com with ESMTPSA id dh4sm5818294edb.77.2019.12.31.00.07.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Dec 2019 00:07:24 -0800 (PST) Date: Tue, 31 Dec 2019 09:07:22 +0100 From: Krzysztof Kozlowski To: kbuild test robot Cc: kbuild-all@lists.01.org, Joerg Roedel , Robin Murphy , Jean-Philippe Brucker , Eric Auger , Douglas Anderson , Suman Anna , Tero Kristo , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] iommu: Enable compile testing for some of drivers Message-ID: <20191231080722.GA6804@pi3> References: <20191230172619.17814-3-krzk@kernel.org> <201912311551.tBrb3BhH%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201912311551.tBrb3BhH%lkp@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 31, 2019 at 03:43:39PM +0800, kbuild test robot wrote: > Hi Krzysztof, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on iommu/next] > [also build test WARNING on v5.5-rc4] > [if your patch is applied to the wrong git tree, please drop us a note to help > improve the system. BTW, we also suggest to use '--base' option to specify the > base tree in git format-patch, please see https://stackoverflow.com/a/37406982] > > url: https://github.com/0day-ci/linux/commits/Krzysztof-Kozlowski/iommu-omap-Fix-pointer-cast-Wpointer-to-int-cast-warnings-on-64-bit/20191231-022212 > base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next > config: ia64-allmodconfig (attached as .config) > compiler: ia64-linux-gcc (GCC) 7.5.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > GCC_VERSION=7.5.0 make.cross ARCH=ia64 > > If you fix the issue, kindly add following tag > Reported-by: kbuild test robot I saw it already while compile testing my patch. I must admit that I could not find easy/fast fix for it. Probably the omap_iommu_translate() helper should be made 64-bit friendly but this obfuscates the code. The driver and hardware supports only 32-bit addresses. Best regards, Krzysztof > > All warnings (new ones prefixed by >>): > > In file included from drivers/iommu/omap-iommu.c:33:0: > drivers/iommu/omap-iommu.c: In function 'omap_iommu_iova_to_phys': > >> drivers/iommu/omap-iopgtable.h:44:21: warning: large integer implicitly truncated to unsigned type [-Woverflow] > #define IOPTE_MASK (~(IOPTE_SIZE - 1)) > ^ > >> drivers/iommu/omap-iommu.c:1641:41: note: in expansion of macro 'IOPTE_MASK' > ret = omap_iommu_translate(*pte, da, IOPTE_MASK); > ^~~~~~~~~~ > drivers/iommu/omap-iopgtable.h:51:23: warning: large integer implicitly truncated to unsigned type [-Woverflow] > #define IOLARGE_MASK (~(IOLARGE_SIZE - 1)) > ^ > >> drivers/iommu/omap-iommu.c:1643:41: note: in expansion of macro 'IOLARGE_MASK' > ret = omap_iommu_translate(*pte, da, IOLARGE_MASK); > ^~~~~~~~~~~~ > drivers/iommu/omap-iopgtable.h:27:25: warning: large integer implicitly truncated to unsigned type [-Woverflow] > #define IOSECTION_MASK (~(IOSECTION_SIZE - 1)) > ^ > >> drivers/iommu/omap-iommu.c:1649:41: note: in expansion of macro 'IOSECTION_MASK' > ret = omap_iommu_translate(*pgd, da, IOSECTION_MASK); > ^~~~~~~~~~~~~~ > drivers/iommu/omap-iopgtable.h:34:23: warning: large integer implicitly truncated to unsigned type [-Woverflow] > #define IOSUPER_MASK (~(IOSUPER_SIZE - 1)) > ^ > >> drivers/iommu/omap-iommu.c:1651:41: note: in expansion of macro 'IOSUPER_MASK' > ret = omap_iommu_translate(*pgd, da, IOSUPER_MASK); > ^~~~~~~~~~~~ > > vim +44 drivers/iommu/omap-iopgtable.h > > 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15 38 > 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15 39 /* > 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15 40 * "small page" address mask and size definitions. > 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15 41 */ > a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26 42 #define IOPTE_SHIFT 12 > 5ff98fa68c88d7 drivers/iommu/omap-iopgtable.h Suman Anna 2015-07-20 43 #define IOPTE_SIZE BIT(IOPTE_SHIFT) > a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26 @44 #define IOPTE_MASK (~(IOPTE_SIZE - 1)) > a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26 45 > > :::::: The code at line 44 was first introduced by commit > :::::: a9dcad5e375800fcb07f7617dba23b3aade8f09d omap iommu: tlb and pagetable primitives > > :::::: TO: Hiroshi DOYU > :::::: CC: Hiroshi DOYU > > --- > 0-DAY kernel test infrastructure Open Source Technology Center > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation