Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp448529pxb; Fri, 3 Sep 2021 05:58:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUeVA/eNbDhgrOBEp6wzO/N0hxa9S3wQPiKNNKV/ZgmPmCFsM/1mfiBeIViB+8FywmkkBZ X-Received: by 2002:a5d:935a:: with SMTP id i26mr2983009ioo.79.1630673894872; Fri, 03 Sep 2021 05:58:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630673894; cv=none; d=google.com; s=arc-20160816; b=qeTWfSlgrGXLQ6H8HMFmFR4aWwO/YjW+XUPOSntH45pep+VSm+YU4x86yA3/XJSIVm mp5+C7Ma6GEJ5P8Pv1/hsHo1MhgtSDS6PNjAIHYWKVSh6q2+rzDsDRUJKB4huNI+W3pt GaO3oLHAO0AfCVK+sbJiXVGEMtyZiLqJnV1KiEcIa2ywpauw6Zl8NLoA+VlVniViLXmP i/1ie/QNU/EO4EEsTYARysCh/pm7OX+QfveZOrow/VAh08MV/wLYacvNFzHworVTY3+v jC85XL5lyp4XAPU+iSlkz3VM4Htd45XwXnYAYzcMYD9A+ifABtIqG498IJIqskvZTvSy 9Mww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2wI7/uC69HAKY2YS1ZHhwaV74lLPkFZeBaJdvdBPJGE=; b=TJM6wH2QQbOmUH+3ekQehAcTVKhZw8FpDtf1Uc/xFcscRONAgIHrcVdeh/UtLsLENf beQJS1nYrMKwDzgCZCJSR4jM+Q1/Gi1skY3vzdF2e6+1B/bUFcc1x9GEDaDNFHFCBS37 Iiw8jxD7W+6fTD87rK97SWfD0n+uL2qQ+MBFKr+Mpr4fFmlaWz0zD8T2PYHRCsCNbDO3 Wci+fIS7bJ+/7QmudyYZIyJYznb/5rSfasyoublZOVOq3UG+hyfXKxI/6XUo18qUBU5e oUYAH9smlS4ljjQ7w4oFLYlFru1PcZEebNOYo7rCcSj+7jdzA4QBxf+IsjW/dSv4jCJ1 QZbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=sM8vjxws; 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=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si5809244ilo.64.2021.09.03.05.58.03; Fri, 03 Sep 2021 05:58:14 -0700 (PDT) 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=@ibm.com header.s=pp1 header.b=sM8vjxws; 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=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348164AbhICKw4 (ORCPT + 99 others); Fri, 3 Sep 2021 06:52:56 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47208 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235081AbhICKwz (ORCPT ); Fri, 3 Sep 2021 06:52:55 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 183AYlgt065503; Fri, 3 Sep 2021 06:51:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : content-type : in-reply-to : mime-version; s=pp1; bh=2wI7/uC69HAKY2YS1ZHhwaV74lLPkFZeBaJdvdBPJGE=; b=sM8vjxwsXve4uBde7CuBR9f/cv7F6bcDD2dVHiyCf/vW2x/M+M4Dv1FB/ztQi+UAv2zC AGtUjzmRA4VSxFDVzmUHQp9urETmNyIlZH+uFx+3wHgDmS/sIdbUP9rPJ86Ju9LofdXl bNi/vh+AG47AM/vEwvMLOetQN9AUnwQQKYNoGjZbRlMYRsIPWMz7DkgCaFnjlub+9IZc fKINsPRGvuKsk8+RV58VcDW+CtAK4Ml5pIV3X4s79rF0iQYlr5eMyG1kiNpWZ9wY0HdK H6TYGuvfpVuHoRg/MGi6EW04utCCqsRPdHSYefgP7H8tktdzRO5HXsVCjejruQ7odDpe FQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3auj318a10-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Sep 2021 06:51:44 -0400 Received: from m0098416.ppops.net (m0098416.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 183AcGkX088394; Fri, 3 Sep 2021 06:51:44 -0400 Received: from ppma06fra.de.ibm.com (48.49.7a9f.ip4.static.sl-reverse.com [159.122.73.72]) by mx0b-001b2d01.pphosted.com with ESMTP id 3auj318a05-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Sep 2021 06:51:44 -0400 Received: from pps.filterd (ppma06fra.de.ibm.com [127.0.0.1]) by ppma06fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 183AliJt028023; Fri, 3 Sep 2021 10:51:42 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma06fra.de.ibm.com with ESMTP id 3au6q06ts5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Sep 2021 10:51:42 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 183ApdgS54657362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Sep 2021 10:51:39 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 031AB4C044; Fri, 3 Sep 2021 10:51:39 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 92F594C088; Fri, 3 Sep 2021 10:51:38 +0000 (GMT) Received: from osiris (unknown [9.145.159.114]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Fri, 3 Sep 2021 10:51:38 +0000 (GMT) Date: Fri, 3 Sep 2021 12:51:37 +0200 From: Heiko Carstens To: Niklas Schnelle , Arnd Bergmann Cc: Chunyan Zhang , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org, kernel test robot , Thomas Gleixner , Chunyan Zhang , LKML Subject: Re: [PATCH] s390/io: Fix ioremap and iounmap undefinded issue for s390 Message-ID: References: <20210903075641.2807623-1-zhang.lyra@gmail.com> <20210903080316.2808017-1-zhang.lyra@gmail.com> <9e4780da8c899f2272923cc4fe72814891845226.camel@linux.ibm.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9e4780da8c899f2272923cc4fe72814891845226.camel@linux.ibm.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: F4wZ4QMsQy6LAM7hJXEAEWFik1uASHKC X-Proofpoint-ORIG-GUID: 8dTVrKUX_J0MphIu3gMEMdRb7yUJS3OM X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.790 definitions=2021-09-03_02:2021-09-03,2021-09-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 phishscore=0 priorityscore=1501 clxscore=1011 mlxlogscore=779 suspectscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2108310000 definitions=main-2109030064 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 03, 2021 at 12:28:41PM +0200, Niklas Schnelle wrote: > On Fri, 2021-09-03 at 17:40 +0800, Chunyan Zhang wrote: > > On Fri, 3 Sept 2021 at 16:24, Niklas Schnelle wrote: > > > On Fri, 2021-09-03 at 16:03 +0800, Chunyan Zhang wrote: > > > > From: Chunyan Zhang > > > > > > > > There would not be ioremap and iounmap implementations if CONFIG_PCI is > > > > not set for s390, so add default declarations of these two functions > > > > for the case to avoid 'undefined reference' issue. > > > > > > > > Fixes: 71ba41c9b1d9 ("s390/pci: provide support for MIO instructions") > > > > Reported-by: kernel test robot > > > > Signed-off-by: Chunyan Zhang > > > > --- > > > > The issue was reported from https://lkml.org/lkml/2021/8/1/18 ... > > Actually HAS_IOMEM is set as default on other architectures, but not > > for s390 which redefined it. > > Yes because most architectures always have IOMEM and io*map() functions > I believe. s390 is an exception here as the mainframe native > functionality all works without MMIO and you can run a fully functional > system including networking and block devices without any MMIO, PCI and > without ioremap()/iounmap(). > > > > > > At the very least I think the functions should do a WARN_ONCE() but > > > then we have the same situation as discussed below with Linus making it > > > pretty clear that he prefers these cases to be compile time checked: > > > > Ok, if I understand correctly, if io*map is not implemented for some > > case, there should be a *compile-time* error rather than adding a stub > > function to make this kind of errors disappeared. > > > > Please correct me if I missed something. > > Ideally not a compile time error but a compile time flag such as a > Kconfig option that would make sure that if HAS_IOMEM isn't set we > don't get drivers compiled which depend on working io*map(). After all > these drivers will surely not be functional. Please note that Arnd Bergmann started to work on that: https://lkml.org/lkml/2021/7/5/286 However, as far as I can tell, there is nothing like that in linux-next currently. Arnd, are you still working on this?