Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3481140rdb; Sun, 10 Dec 2023 07:25:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNRV7Q/V1b0KYast0rabeqT15v11vEht8Dl1C/Ze373nlHvry3Xdv4JVONtf7IhOqe8gcs X-Received: by 2002:a17:903:1207:b0:1d0:b790:2fc0 with SMTP id l7-20020a170903120700b001d0b7902fc0mr2924693plh.67.1702221920424; Sun, 10 Dec 2023 07:25:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702221920; cv=none; d=google.com; s=arc-20160816; b=sSd9wjmj9FBmSnMkK25KXrr+doMIppFfCLZd/cANGSbe1sCHdTglrCWdaIfPZjQwsZ Zmep9YgGG/5kDGCeVh8aV7B7XcVfb9WNCvhG+k7T+KIIfWBvn0E2eFw9pnJJEFHZrjtv qe6Chd71psdL7ypZuvO3A4BNA9CHJha7M6SSmbkADUT1nbNpKUukGtCPdJYfu6iT2HTl oYR17B5OX0sYqNHcSX9vZrBa7sxAdUQ2WWiCs15zbL8NbnBCrAw0zNx6IJ2Tlpd06nQH +wuDDspEFmxXlcgbWfBrH5r0tJFeDLNw35GOsFRlYq/xnHQm5wyYPerzxc5o+WCqKAow j88g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=g3KL7UhBIXaTA/icsLmumqXQXBryDvbpvjDvF0vr8/M=; fh=CYic77X569M8zgWUG7tZmcA6iPg1XBMuBCYXha1bOv0=; b=ufjY6ZT9K+HOmdOWoEETr5vOSAjztGlx0cQZNn3Bthq4uyoSKZCt5H0rzafbl/+TGr /OmWWKqSgs0Yr9s2HGhoopipcpcFAP330DHyqKiEGKq/4F2i/8p4hB7PgpmBD1GmPZpc yRU77AjfTrm+7YCBtPRCzG5Ql38KlIXmO5DCPukIcSZDL8jf1Ps9f0l03Y9glUwfjah8 TG/LejITXTCrKu7TvoIejSyBkxPSDRWCaMmsh1fNB+3iQCJQFKPYBBqu+JmupvBV2SpS Oj7T20BQk15wAI9MhwAZ33OkqyrezJcRgfQKsn1XKr1IH11eEQKMllc2PWJoEi0TwcNK Q1MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JLi80k4L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id e8-20020a170902744800b001d09b2d565dsi4666705plt.433.2023.12.10.07.25.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 07:25:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=JLi80k4L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 96D228054B0C; Sun, 10 Dec 2023 07:25:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232587AbjLJPYl (ORCPT + 99 others); Sun, 10 Dec 2023 10:24:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229584AbjLJPYk (ORCPT ); Sun, 10 Dec 2023 10:24:40 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A494F9D for ; Sun, 10 Dec 2023 07:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702221884; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g3KL7UhBIXaTA/icsLmumqXQXBryDvbpvjDvF0vr8/M=; b=JLi80k4LnhqWN9W8c9cnxD2wXPTQS8CMG+HDQO1LZ5a2hxgPAy2wDzblntstEw6v/Pzkv5 EAz/qYcNGrdAHS50oAo3+6VZIxaUSD9PVNAIBD2rLgJOr6k8c6ZfL9iA7EbzdGQp287rX6 ENmY7Ny/Udwl4A5NAqzlp8dsoVsFEjQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-240-rRNGTIKxNeSGnmN1mzSqXQ-1; Sun, 10 Dec 2023 10:24:36 -0500 X-MC-Unique: rRNGTIKxNeSGnmN1mzSqXQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 022AF185A780; Sun, 10 Dec 2023 15:24:35 +0000 (UTC) Received: from localhost (unknown [10.72.112.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 022C1112131D; Sun, 10 Dec 2023 15:24:33 +0000 (UTC) Date: Sun, 10 Dec 2023 23:24:30 +0800 From: Baoquan He To: "David E. Box" Cc: Ilpo =?iso-8859-1?Q?J=E4rvinen?= , schnelle@linux.ibm.com, LKML , platform-driver-x86@vger.kernel.org, rajvi.jingar@linux.intel.com, dave.hansen@linux.intel.com, peterz@infradead.org Subject: Re: [PATCH V5 12/20] asm-generic/io.h: iounmap/ioport_unmap cleanup.h support Message-ID: References: <20231123040355.82139-1-david.e.box@linux.intel.com> <20231123040355.82139-13-david.e.box@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 pete.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 (pete.vger.email [0.0.0.0]); Sun, 10 Dec 2023 07:25:17 -0800 (PST) On 11/27/23 at 05:55pm, David E. Box wrote: > +Baoquan for ioremap question. > > On Thu, 2023-11-23 at 16:30 +0200, Ilpo Järvinen wrote: > > On Wed, 22 Nov 2023, David E. Box wrote: > > > > > Add auto-release cleanups for iounmap() and ioport_unmap(). > > > > > > Signed-off-by: David E. Box > > > Suggested-by: Ilpo Järvinen > > > --- > > > V2 - Move from linux/io.h to asm-generic/io.h. Adds iounmap cleanup if > > >      iounmap() is defined. Adds ioport_unmap cleanup if CONFIG_IOPORT_MAP > > >      is defined. > > > > > >  include/asm-generic/io.h | 6 ++++++ > > >  1 file changed, 6 insertions(+) > > > > > > 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 @@ > > >  #define __ASM_GENERIC_IO_H > > >   > > >  #include /* I/O is all done through memory accesses */ > > > +#include > > >  #include /* for memset() and memcpy() */ > > >  #include > > >  #include > > > @@ -1065,6 +1066,10 @@ static inline void __iomem *ioremap(phys_addr_t addr, > > > size_t size) > > >  #endif > > >  #endif /* !CONFIG_MMU || CONFIG_GENERIC_IOREMAP */ > > >   > > > +#ifdef iounmap > > > +DEFINE_FREE(iounmap, void __iomem *, iounmap(_T)); > > > +#endif > > Baoquan, LKP is reporting an undeclared function 'iounmap' error with the above > change from this patch when building for s390 with PCI disabled. The ioremap > 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 I tried to reproduce the error, while I got failure as below. I will find a s390x machine to try again. --------------------------------------------------------- [root@ linux]# COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang-16 ~/lkp-tests/kbuild/make.cross W=1 O=build_dir ARCH=s390 olddefconfig Compiler will be installed in /root/0day PATH=/root/0day/llvm-16.0.6-x86_64/bin:/root/.local/bin:/root/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin make --keep-going HOSTCC=/root/0day/llvm-16.0.6-x86_64/bin/clang CC=/root/0day/llvm-16.0.6-x86_64/bin/clang OBJCOPY=/usr/s390x-linux-gnu/bin/objcopy AR=llvm-ar NM=llvm-nm STRIP=llvm-strip OBJDUMP=llvm-objdump OBJSIZE=llvm-size READELF=llvm-readelf HOSTCXX=clang++ HOSTAR=llvm-ar CROSS_COMPILE=s390x-linux-gnu- --jobs=128 KCFLAGS= -Wtautological-compare -Wno-error=return-type -Wreturn-type -Wcast-function-type -funsigned-char -Wundef -fstrict-flex-arrays=3 -Wenum-conversion W=1 O=build_dir ARCH=s390 olddefconfig make[1]: Entering directory '/root/linux/build_dir' GEN Makefile scripts/Kconfig.include:40: linker 's390x-linux-gnu-ld' not found make[3]: *** [../scripts/kconfig/Makefile:77: olddefconfig] Error 1 make[2]: *** [/root/linux/Makefile:685: olddefconfig] Error 2 make[1]: *** [/root/linux/Makefile:234: __sub-make] Error 2 make[1]: Target 'olddefconfig' not remade because of errors. make[1]: Leaving directory '/root/linux/build_dir' make: *** [Makefile:234: __sub-make] Error 2 make: Target 'olddefconfig' not remade because of errors. ------------------------------------------------------------------ And when I execute the 3rd step of reproducer to apply the required patch series, I never succeed. Don't know why. ---------------------------------------------------------------- [root@intel-knightslanding-lb-02 linux]# b4 shazam https://lore.kernel.org/r/20231123040355.82139-13-david.e.box@linux.intel.com Grabbing thread from lore.kernel.org/all/20231123040355.82139-13-david.e.box@linux.intel.com/t.mbox.gz Checking for newer revisions Grabbing search results from lore.kernel.org Added from v6: 21 patches Analyzing 63 messages in the thread Will use the latest revision: v6 You can pick other revisions using the -vN flag Checking attestation on all messages, may take a moment... --- ✓ [PATCH v6 1/20] platform/x86/intel/vsec: Fix xa_alloc memory leak ---------------------------------------------------------------- > > > Note that the report includes pointer arithmetic warnings that are not related > to this patch. Those warnings occur in mainline as well. > > David > > > > + > > >  #ifndef ioremap_wc > > >  #define ioremap_wc ioremap > > >  #endif > > > @@ -1127,6 +1132,7 @@ static inline void ioport_unmap(void __iomem *p) > > >  extern void __iomem *ioport_map(unsigned long port, unsigned int nr); > > >  extern void ioport_unmap(void __iomem *p); > > >  #endif /* CONFIG_GENERIC_IOMAP */ > > > +DEFINE_FREE(ioport_unmap, void __iomem *, ioport_unmap(_T)); > > >  #endif /* CONFIG_HAS_IOPORT_MAP */ > > >   > > >  #ifndef CONFIG_GENERIC_IOMAP > > > > Has this now built successfully with LKP? (I don't think we get success > > notifications from LKP for patch submissions, only failures). > > > > There were some odd errors last time but I think all they were unrelated > > to this change (besides the checkpatch false positive, I mean). > > >