Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2807176rwd; Mon, 22 May 2023 04:49:07 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6BM8wF/PZnqWv2QN4f6JNk6A9GRzW1Hby55kaL6/cowMtDGTkf33jOnMjZyw8DMtq0rQ3H X-Received: by 2002:a05:6a00:15c7:b0:626:2ce1:263c with SMTP id o7-20020a056a0015c700b006262ce1263cmr13522826pfu.5.1684756146671; Mon, 22 May 2023 04:49:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684756146; cv=none; d=google.com; s=arc-20160816; b=PTH4ZYtv/3aM+uIN+RL8ntrRQYudlhduevJTljjRG3fIbJM3PhuNfO+9pBSaM5Sh/C /ahLaxBCq69u7ohypaJO1mNwSevRFYCxaqJS3V0nIa4zuR6l1gX3j15M5moTIncBET5Y I6K76z97T9I4CaCuBHRFk2NfXQQE2bHhbVZLgFi5l0olnYzXRuZP8p8O3WVRBR8lO34o KzFtAQq0hhKD5K6k8PqhoGfZ6R4wmFyQ+/32nUIQPndRkcq1va9F7bs4mfzhUiDqB418 ozu4OnjqUBdtVm1FkTlk38FIPeZxHYslCy2duXRdmRkHHGJb9cvR7uQCTJQrjJjVBOwy xYPw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Xe0uEO9ZtluN485cWnZvS1/i70J+fGRHfkqfDe56RAs=; b=eL3h5D6oA4Vra4JedMgg8jetkKDaRotVUpWsncvC36DyG+tlY5m4zTT3Ck4ZPry8eq ySPccFWHWBlXMupHLz+6VQXCm1iLg6lsXe32z1q93uLR5a46vizk8yd8KAu2YLB72Owa oXpI1nIypwy6ciNy7E/mW9sC6bVr3VNtCEnfrprlSKtcWQwVM/uoBk4KAWWhAJzcOvKU 130G74VhvC4Bh9WXpJsBoUEaaOuMyiaLG5onnOdFTpi/08vrpcSgERyTeCQTqRBNHCne Kndq8XxpG7Ghfa7ss3pKq4EI0bL/gxWfcy944tHQIYQOY4Qlv9kVevbKs8dr/3919dLh pqCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VAN8pSDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p189-20020a625bc6000000b006432e1ea8e4si4630164pfb.14.2023.05.22.04.48.50; Mon, 22 May 2023 04:49:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VAN8pSDc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233366AbjEVLVL (ORCPT + 99 others); Mon, 22 May 2023 07:21:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233148AbjEVLU6 (ORCPT ); Mon, 22 May 2023 07:20:58 -0400 Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B3CA1FDF for ; Mon, 22 May 2023 04:15:42 -0700 (PDT) Received: by mail-vs1-xe31.google.com with SMTP id ada2fe7eead31-43943447fb9so313075137.2 for ; Mon, 22 May 2023 04:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684754137; x=1687346137; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=Xe0uEO9ZtluN485cWnZvS1/i70J+fGRHfkqfDe56RAs=; b=VAN8pSDcruxO3TxbsEjJxCCU9DaxhV1ODx1tbBvoCR8pWaxFjwrap1aoWS8Bb1oSng yAxK/nO3U73XAY8u03fb83C6e/y2+Ada5RLoaHNfj1977odITVBTAxmMkaDxMjNtz5Vj 7g0jJ7iDUv1adCciCx8bUlEHfEKmbl4IT2nyeSavn8dasN6wUxWTC1ohrMkfIlWsbAfv 7Gj9ods0vS0F4qD3TqVwqc79gUKrCi/Aiano9NPGqkfu1RROxmoEmuutn3PsO5RCQb5q +cRRSbSTHoJurdPyjk7SzDiiskfOE4GH4/9bg/f58aW1ZvMUAzGao0SaQCOepauc7ryU AguA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684754137; x=1687346137; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Xe0uEO9ZtluN485cWnZvS1/i70J+fGRHfkqfDe56RAs=; b=Zw0NcI+I6cxZENGun7XBNZbnyEMxRSYlDdjGgl2/nRi8O4wrOwbrRMsmryshApywJK z4n1nfU6akQs313r6DfS5U7FmYj6Bf3XPzHVjjhL7OpxLXMSW0slECAF9D/ik8PVDyM9 KaH2Jxho8IhvRYKHackKBa6bWO95YGcmv3zv4Hwl+Njf0QEBg8T/QiqQzvzdXaKohied cUWdxu/p1zIQ1ZnOeSkWDND5fLGcKiQLFulldKdQw9PV91VSzU2p5fHkIb+Jomn7tW3Z UjUgS+GvLgka9wMB4H2fvdITlz3Fp6g3S0J9PxJ1hFlKHGoH4tF+RcpWq2JytWrxFfk3 w8zg== X-Gm-Message-State: AC+VfDxFaqQJ23mgHiQFStmuSxBPpoQVLemxTTZq25CXXG8X5ZHGmdy8 lCr80+mDcINf8WUlDdCP/4PoFg== X-Received: by 2002:a67:fbda:0:b0:436:158:cf6c with SMTP id o26-20020a67fbda000000b004360158cf6cmr2473206vsr.6.1684754136793; Mon, 22 May 2023 04:15:36 -0700 (PDT) Received: from fedora (072-189-067-006.res.spectrum.com. [72.189.67.6]) by smtp.gmail.com with ESMTPSA id v24-20020ab05598000000b006904fa86e7csm1178322uaa.2.2023.05.22.04.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 May 2023 04:15:36 -0700 (PDT) Date: Mon, 22 May 2023 07:15:33 -0400 From: William Breathitt Gray To: Niklas Schnelle Cc: Arnd Bergmann , Greg Kroah-Hartman , Bjorn Helgaas , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Mauro Carvalho Chehab , Alan Stern , "Rafael J. Wysocki" , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Arnd Bergmann , linux-iio@vger.kernel.org, Jonathan Cameron Subject: Re: [PATCH v4 05/41] counter: add HAS_IOPORT dependencies Message-ID: References: <20230516110038.2413224-1-schnelle@linux.ibm.com> <20230516110038.2413224-6-schnelle@linux.ibm.com> <6f4d672ba7136f2b01ea9ee69687b16168eddb8d.camel@linux.ibm.com> <231dcebc57c2e43ba65d007b60d3d446d9ed71c8.camel@linux.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="lvesmdynfJhc3cAo" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --lvesmdynfJhc3cAo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 22, 2023 at 12:42:15PM +0200, Niklas Schnelle wrote: > On Fri, 2023-05-19 at 10:21 -0400, William Breathitt Gray wrote: > > On Fri, May 19, 2023 at 03:39:57PM +0200, Niklas Schnelle wrote: > > > On Fri, 2023-05-19 at 15:38 +0200, Niklas Schnelle wrote: > > > > On Fri, 2023-05-19 at 15:17 +0200, Niklas Schnelle wrote: > > > > > On Thu, 2023-05-18 at 21:26 -0400, William Breathitt Gray wrote: > > > > > > On Tue, May 16, 2023 at 01:00:01PM +0200, Niklas Schnelle wrote: > > > > > > > In a future patch HAS_IOPORT=3Dn will result in inb()/outb() = and friends > > > > > > > not being declared. We thus need to add HAS_IOPORT as depende= ncy for > > > > > > > those drivers using them. > > > > > > >=20 > > > > > > > Co-developed-by: Arnd Bergmann > > > > > > > Signed-off-by: Arnd Bergmann > > > > > > > Signed-off-by: Niklas Schnelle > > > > > >=20 > > > > > > Hi Niklas, > > > > > >=20 > > > > > > The change itself is fine, but please update the description to= reflect > > > > > > that this is adding a depends on HAS_IOPORT_MAP rather than HAS= _IOPORT, > > > > > > along with the reason why it's needed (i.e. devm_ioport_map() i= s used). > > > > > >=20 > > > > > > Thanks, > > > > > >=20 > > > > > > William Breathitt Gray > > > > > >=20 > > > > > >=20 > > > > >=20 > > > > > Right, this clearly needs adjustment. I went with the following c= ommit > > > > > message for v5: > > > > >=20 > > > > > "counter: add HAS_IOPORT_MAP dependency > > > > >=20 > > > > > The 104_QUAD_8 counter driver uses devm_ioport_map() without depe= nding > > > > > on HAS_IOPORT_MAP. This causes compilation to fail on platforms s= uch as > > > > > s390 which do not support I/O port mapping. Add the missing > > > > > HAS_IOPORT_MAP dependency to fix this." > > > > >=20 > > > >=20 > > > > Just noticed this isn't entirely correct. As devm_ioport_map() has = an > > > > empty stub for HAS_IOPORT_MAP=3Dn this doesn't lead to a compile er= ror it > > > > just doesn't work. Will reword to "This causes the driver to not be > > > > useable on platforms ..." > > >=20 > > > s/useable/usable/ > >=20 > > 104_QUAD_8 has an explicit dependency on PC104 and X86, so I don't think > > it would ever be used outside of x86 platforms. Does it still make sense > > to have the HAS_IOPORT_MAP dependency in this case? > >=20 > > William Breathitt Gray >=20 > Well, yes and no, you're right that it doesn't really cause compile > issues despite the "|| COMPILE_TEST" albeit the code could never work. > Still, I'd add the dependency. At the very least it serves as > documentation and maybe in the future someone will want to remove those > empty stubs for HAS_IOPORT_MAP=3Dn. >=20 > Thanks > Niklas Sure, that reasoning makes sense to me too, so let's go with the explicit depends afterall. By the way, I noticed two other modules that call devm_ioport_map() but seem to be missing the HAS_IOPORT_MAP depends lines: the drivers/iio/addac/stx104.c and drivers/iio/dac/cio-dac.c drivers. Do these need respective patches as well? As an aside, I haven't been following the previous patchsets closely so forgive me if this has already been discussed in another thread: why doesn't X86 automatically select HAS_IOPORT? Are there x86 platforms that do not support ioport? William Breathitt Gray --lvesmdynfJhc3cAo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQSNN83d4NIlKPjon7a1SFbKvhIjKwUCZGtO1QAKCRC1SFbKvhIj K51mAPwIdOqB4viwJHoa872UFoQps4r86WdliN/6XVH9/iKGMQD+K/cgzOH47iLy u51o+Y6RoIoavHfWY39mUSbtEm9KngQ= =L71k -----END PGP SIGNATURE----- --lvesmdynfJhc3cAo--