Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3545326rdh; Mon, 27 Nov 2023 17:57:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IELzmzxg8X8Wh1CxJJFFu0uPFyzFQaMj6l/MIounoZ19oUPgZ9rgoMy16G5H3FLrcA+XCD6 X-Received: by 2002:a05:6830:270f:b0:6d8:13cd:5dc2 with SMTP id j15-20020a056830270f00b006d813cd5dc2mr16185270otu.23.1701136648972; Mon, 27 Nov 2023 17:57:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701136648; cv=none; d=google.com; s=arc-20160816; b=Fvx/5z2vdWw2AX9JEkjWdh40yyWnNFZ4eRkhlQjjBBbTBYksoG6vrba4flbbyaXbZ0 Kn+ekRr9Sy79wZlqw7xDDC1VCxphlDpuIXjyvrt+eCM8KQjLTfUVc2Heb2LGD2nM2JMj YiSLr1UP3qxr5bAoHOYy8mZJfA9bqezt/3LOX7Gylhqh2/LLUBY/FUror4LhQKaAZBR5 Arc43BwFf94K3XzOy9lERwje0dqdgEXqy3Q59T2HZJIzyb/PpWBY3qbFVxiUvK8JGsaq PEUTkbR3e5s5X3+nN91BsOqoez0ZSDmMLi7Vh0y9z2A67+TMjXnd7VKQ6Hq2ipdBDMRA rtDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:organization:references:in-reply-to:date :cc:to:reply-to:from:subject:message-id:dkim-signature; bh=+snk+mM+TxyaWw6DJecEKyanpjoN0GjRNcW3jAnYR9g=; fh=YNGdZUk/NXzk8c/4koBO6tX1EfNcUq/l4Z+LhlmyRZ4=; b=XMD5NkaGe+7qwMsC9bDjPZrPDtOjiWyCYI3pKk/sqFf2to6zVKMgVRiR3g9MSK1cyF hwHV6isK31TVplJl3RVSijXF83Ag92Xr0ZotNR7r83vKiE8d6JCwOaupbvBRDF/lObge d1yT2DpSEsqm4SpJFF7PD0F5MVVLSRHom+Fzfh9w0wOZnNGu1oKfu6pyOJVLqnKgAkr9 Aee/AdRn9LDfh9XdvDD+J/RogakSSTkmnLaxuwj9lMHWKRcJhE6Yjmmp32vqLwVYIp6q PMpULWMyC2r/xeAkWgZOAE2E5Tf4uS7GDn6xoq1CfAZ4FPr0d7Hnqv02pUCoh3xTS2Sc 4rGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KoUCajl6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id p8-20020a63fe08000000b005be00212aa7si10840941pgh.663.2023.11.27.17.57.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 17:57:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=KoUCajl6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E2C4A8069923; Mon, 27 Nov 2023 17:57:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232324AbjK1B5M (ORCPT + 99 others); Mon, 27 Nov 2023 20:57:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbjK1B5L (ORCPT ); Mon, 27 Nov 2023 20:57:11 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35B181A2; Mon, 27 Nov 2023 17:57:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701136637; x=1732672637; h=message-id:subject:from:reply-to:to:cc:date:in-reply-to: references:content-transfer-encoding:mime-version; bh=+snk+mM+TxyaWw6DJecEKyanpjoN0GjRNcW3jAnYR9g=; b=KoUCajl6yxLLbaZntjFSGFenq9pp6/IkLWKjHRpIF891ENp1ft2EHliP M6U+Hd+40TJIwdOKTtGZiSiWf2EcR66+lrabukzMxP2KZE4GrbgNKvD4C 2yo3EFBJmVKIHz+YrnEwKdC1cDTksQl9F3OE+3T39uX+i5bJwJfwJu/ti HvzUDS7VavryWtxIP2KnsvMPU/mW7ejG0CBSxnBvFgp5qrjWml3DEUYT5 b8wRYMi91WCGQcgtSQu2GFpyG+FOhvQPZzhMeFXq24al7bod5xlRnbkaC r319SHDm3rQzlVs3/SZOqZM/lEaiwC/KwLdgJJnRNgoFXu6rUQZZU4Qzc A==; X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="395647075" X-IronPort-AV: E=Sophos;i="6.04,232,1695711600"; d="scan'208";a="395647075" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 17:55:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="1015754868" X-IronPort-AV: E=Sophos;i="6.04,232,1695711600"; d="scan'208";a="1015754868" Received: from linux.intel.com ([10.54.29.200]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 17:55:58 -0800 Received: from luisdsan-mobl28.amr.corp.intel.com (unknown [10.209.42.149]) by linux.intel.com (Postfix) with ESMTP id 440C2580AA7; Mon, 27 Nov 2023 17:55:58 -0800 (PST) Message-ID: Subject: Re: [PATCH V5 12/20] asm-generic/io.h: iounmap/ioport_unmap cleanup.h support From: "David E. Box" Reply-To: david.e.box@linux.intel.com To: Ilpo =?ISO-8859-1?Q?J=E4rvinen?= , bhe@redhat.com, schnelle@linux.ibm.com Cc: LKML , platform-driver-x86@vger.kernel.org, rajvi.jingar@linux.intel.com, dave.hansen@linux.intel.com, peterz@infradead.org Date: Mon, 27 Nov 2023 17:55:58 -0800 In-Reply-To: References: <20231123040355.82139-1-david.e.box@linux.intel.com> <20231123040355.82139-13-david.e.box@linux.intel.com> Organization: David E. Box Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4-0ubuntu2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 27 Nov 2023 17:57:26 -0800 (PST) +Baoquan for ioremap question. On Thu, 2023-11-23 at 16:30 +0200, Ilpo J=C3=A4rvinen wrote: > On Wed, 22 Nov 2023, David E. Box wrote: >=20 > > Add auto-release cleanups for iounmap() and ioport_unmap(). > >=20 > > Signed-off-by: David E. Box > > Suggested-by: Ilpo J=C3=A4rvinen > > --- > > V2 - Move from linux/io.h to asm-generic/io.h. Adds iounmap cleanup if > > =C2=A0=C2=A0=C2=A0=C2=A0 iounmap() is defined. Adds ioport_unmap cleanu= p if CONFIG_IOPORT_MAP > > =C2=A0=C2=A0=C2=A0=C2=A0 is defined. > >=20 > > =C2=A0include/asm-generic/io.h | 6 ++++++ > > =C2=A01 file changed, 6 insertions(+) > >=20 > > diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h > > index bac63e874c7b..9ef0332490b1 100644 > > --- a/include/asm-generic/io.h > > +++ b/include/asm-generic/io.h > > @@ -8,6 +8,7 @@ > > =C2=A0#define __ASM_GENERIC_IO_H > > =C2=A0 > > =C2=A0#include /* I/O is all done through memory accesses = */ > > +#include > > =C2=A0#include /* for memset() and memcpy() */ > > =C2=A0#include > > =C2=A0#include > > @@ -1065,6 +1066,10 @@ static inline void __iomem *ioremap(phys_addr_t = addr, > > size_t size) > > =C2=A0#endif > > =C2=A0#endif /* !CONFIG_MMU || CONFIG_GENERIC_IOREMAP */ > > =C2=A0 > > +#ifdef iounmap > > +DEFINE_FREE(iounmap, void __iomem *, iounmap(_T)); > > +#endif Baoquan, LKP is reporting an undeclared function 'iounmap' error with the a= bove change from this patch when building for s390 with PCI disabled. The iorema= p defines in arch/s390/include/asm/io.h are not wrapped under the #ifdef CONFIG_PCI block. Shouldn't they be since the s390 Kconfig only adds GENERIC_IOREMAP if PCI? https://lore.kernel.org/oe-kbuild-all/202311241214.jcL84du7-lkp@intel.com Note that the report includes pointer arithmetic warnings that are not rela= ted to this patch. Those warnings occur in mainline as well. David > > + > > =C2=A0#ifndef ioremap_wc > > =C2=A0#define ioremap_wc ioremap > > =C2=A0#endif > > @@ -1127,6 +1132,7 @@ static inline void ioport_unmap(void __iomem *p) > > =C2=A0extern void __iomem *ioport_map(unsigned long port, unsigned int = nr); > > =C2=A0extern void ioport_unmap(void __iomem *p); > > =C2=A0#endif /* CONFIG_GENERIC_IOMAP */ > > +DEFINE_FREE(ioport_unmap, void __iomem *, ioport_unmap(_T)); > > =C2=A0#endif /* CONFIG_HAS_IOPORT_MAP */ > > =C2=A0 > > =C2=A0#ifndef CONFIG_GENERIC_IOMAP >=20 > Has this now built successfully with LKP? (I don't think we get success= =20 > notifications from LKP for patch submissions, only failures). >=20 > There were some odd errors last time but I think all they were unrelated= =20 > to this change (besides the checkpatch false positive, I mean). >=20