Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3151450lqo; Wed, 15 May 2024 00:48:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAF15x+qQEA1+hU/pD7WNW7Yns2QTuYupPG836+mZ5BTtovXJu7AsRcnXRMh5vQhPRn8uhpB1+TgP/CmWi6/yic7FQzkW7uXL25Ey2Ag== X-Google-Smtp-Source: AGHT+IE+ldce+kHWt8ebBujTEMk4Ae7CfvZfKuADCB1uuquq+6sgRtYj4Ub25iJaEAriY1pKHX3k X-Received: by 2002:a05:6512:3095:b0:522:8352:ff29 with SMTP id 2adb3069b0e04-52283530024mr10640260e87.42.1715759289872; Wed, 15 May 2024 00:48:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715759289; cv=pass; d=google.com; s=arc-20160816; b=xnweAN7zLDLICPqhnOmJ+wJ7KcXCikHHP/GiK/NS++Kh8ogpUonsfb7KnVi+L386YW SKsG3c/md8leblT7N47N8xqQG83Sb/823mOWDj/Um932UKE5rPfRMjxbnknQChyrzneS UVKxsydry+3/Cz1jM3qMHNpES7shUibEEYldLDucM2rtuFWz1fSB+lunVc1sA6m/IiCp SMYHAIGMqkJDV5IvwHPImh8cd2cuR9sY4CB3yMzXaFIt4fG37H2LyJ+V4sGy/vqBGQrY Fz1DgrdLpY9nUJe4dcx+mnK1EvtHP69neiNJtQXnWTkt0JSAWu4TzD2W+SPZsUl+RUE5 IGpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=subject:cc:to:from:date:references:in-reply-to:message-id :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:feedback-id:dkim-signature; bh=mNowlN60JUSdjs5ckVYALPzS8PLCyiu+QV0+NvBRFq0=; fh=fNnJVX/LGrJ9Ok7uhZqa7j7ozsiZBQFhZOwbZwY0c48=; b=UY+tQ4Dfx8EbRpE13ZDONkWgrg2nEKJYafEKIMQda44s4eOLZ2E0UJrPN2lwE6MXcP yQLjYUa8gZ5JvYMetAXiiKjHIci6qLDqAAgjLAORmmcHIR4YwQBJYeBzaj4Smfy3JWCa HxO/ebFzNjmPKYWxEjx70g0atewlEv55n9eLZ4hrP0kS4ysHVmzJ+tla+GtXNyxAnMMa OYunOIXjsIsOPmLxtUbE+z3fljewryBNgBQ3jUBbzBa9pnRZBZKCXF4qU2F8lLAXmtOE ILSKFO5DVRqoXpiFhQCenV5pYTWT28nRsrUGptHSFwyMweAcOsZ/aYdlVgmdCXydiNe3 4B6w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=asAaV+Xi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-179604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba3c27si756691366b.565.2024.05.15.00.48.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 00:48:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=asAaV+Xi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-179604-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179604-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 986BC1F21C17 for ; Wed, 15 May 2024 07:48:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4DE77481DF; Wed, 15 May 2024 07:48:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="asAaV+Xi" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 715044654B; Wed, 15 May 2024 07:48:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715759282; cv=none; b=gVIPPqg1CfCdnvQbmgIwy85FbP8O+/L+ZW0e96din9C8voCTdxDtNU+oHiH4Vmvp7ENSI61LRxbojPmxIkZVrrRHryxc/rcrEzgA59m+fiCtGk2XkoyN6T5Qk6e1/yPKdFKITbCBeXND3KQwyqo+dv8U5IU9dZjSmdpUw59eFXE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715759282; c=relaxed/simple; bh=7+Rm9slZp7s5VN1EMhP2yf5x2G6kbVKBXKCd/UkqlM4=; h=MIME-Version:Message-Id:In-Reply-To:References:Date:From:To:Cc: Subject:Content-Type; b=drn95A386rNqn5z8PtizDwd4podQXwJu+jTjnuzFm4JUAXSSsisSMMLdPivhPPNIuLzpPId4A1eEt1LFeGaDRIURpkPhPMYoSknyUNk1PsLDfFuf/6qr6nkZ9eiCesOwn/P+K3dl8UVYS7eReYTwn1dNubnCTEhrfwW8XXN5Ma0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=asAaV+Xi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4AC8C116B1; Wed, 15 May 2024 07:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715759282; bh=7+Rm9slZp7s5VN1EMhP2yf5x2G6kbVKBXKCd/UkqlM4=; h=In-Reply-To:References:Date:From:To:Cc:Subject:From; b=asAaV+XiTWpRtr/53VyBjtRKjT70kq+L57IcLebru/ozd3/6tDpF6QLNbFPW7K3gM DLpKBBqKI0O+sufJdOtbAsJ79wlfNcv+Uc85KJshD2+qlnc5P9nbF0fgvSryWNg0Xi btBfa70afOK1PwrvyQI7UFTJ17CDJVORqPorkDJjvUePg1GJd5CmRSjoInpidgUC7G ZLoc/RftJhQIem0HTsVoudNijaBN9b1YbeOi04GNbz+j6cjnXxShprq8PMFYgTC6MF iHXBAGkT3ttK1Lndkeyh/TBn6r+SFVTNmfuzAVvKa3DkeIxKv+pfXn348yo/PRO+vf ZjHsWCB6Fjf3Q== Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfauth.nyi.internal (Postfix) with ESMTP id C57E31200032; Wed, 15 May 2024 03:48:00 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute5.internal (MEProxy); Wed, 15 May 2024 03:48:00 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdegjedguddulecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugeskhgvrhhnvghlrdhorhhgqeenucggtf frrghtthgvrhhnpedvveeigfetudegveeiledvgfevuedvgfetgeefieeijeejffeggeeh udegtdevheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpegrrhhnugdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidquddvkeehudej tddvgedqvdekjedttddvieegqdgrrhhnugeppehkvghrnhgvlhdrohhrghesrghrnhgusg druggv X-ME-Proxy: Feedback-ID: i36794607:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 89646B6008F; Wed, 15 May 2024 03:48:00 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-455-g0aad06e44-fm-20240509.001-g0aad06e4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <5c992610-0716-47d1-97f6-65901797aa8c@app.fastmail.com> In-Reply-To: <20240514130858.3048650-2-schnelle@linux.ibm.com> References: <20240514130858.3048650-1-schnelle@linux.ibm.com> <20240514130858.3048650-2-schnelle@linux.ibm.com> Date: Wed, 15 May 2024 07:47:29 +0000 From: "Arnd Bergmann" To: "Niklas Schnelle" , "Helge Deller" Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, "Heiko Carstens" , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/1] video: Handle HAS_IOPORT dependencies Content-Type: text/plain On Tue, May 14, 2024, at 13:08, Niklas Schnelle wrote: > In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at > compile time. We thus need to #ifdef functions and their callsites which > unconditionally use these I/O accessors. In the include/video/vga.h > these are conveniently all those functions with the vga_io_* prefix. > > Co-developed-by: Arnd Bergmann > Signed-off-by: Arnd Bergmann > Signed-off-by: Niklas Schnelle > --- > Note: This patch does not depend any not-yet-mainline HAS_IOPORT changes > and may be merged via subsystem specific trees at your earliest > convenience. > > v1 -> v2: > - Moved vga_mm_r(), vga_mm_w(), vga_mm_w_fast() above #ifdef CONFIG_HAS_IOPORT > to use them in with or without I/O port variants. > - Duplicated vga_r(), vga_w(), vga_w_fast() functions as non-I/O port variants > to get rid of in-code #ifdef (Arnd) > - Got rid of if (regbase) logic inversion needed for in-code #ifdef Thanks for preparing the new version! > diff --git a/include/video/vga.h b/include/video/vga.h > index 947c0abd04ef..468764d6727a 100644 > --- a/include/video/vga.h > +++ b/include/video/vga.h > @@ -197,9 +197,26 @@ struct vgastate { > extern int save_vga(struct vgastate *state); > extern int restore_vga(struct vgastate *state); > > +static inline unsigned char vga_mm_r (void __iomem *regbase, unsigned > short port) > +{ > + return readb (regbase + port); > +} My first thought was that this should use the normal whitespace, but I guess the file is pretty consistent about the style here, so I agree with your choice here. Arnd