From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 195A1C61DA4 for ; Wed, 15 Mar 2023 10:20:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 817A510E99A; Wed, 15 Mar 2023 10:20:26 +0000 (UTC) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id E165E10E99A for ; Wed, 15 Mar 2023 10:20:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678875624; x=1710411624; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=AZu0G5MJgXhilc9n2aaLZyeOdNLiwJBTw+hEvyBlZ5c=; b=MSy3i8X0DV4HmnuZZcXL/yPyNk7J9LandFkQXdl/+dbNiNx6qiUSI/2o t962slGhe+HfyjF+a+te2UUN/1MJM+WVt2MIUhZAsQo73xWvm/K5fnZa2 uIcD5PfYDBR/36idZ1lna83yatn5ZVrJ1e+kual1IgttaYDZ9cuWL9ujx f54fYj53hqvWmsS7QOyGPNoDwKD4r0DE0Bxxh9br/OOaweprcbAsH4IMa S7bgo2tSJALhmIj+NSr1OZx6DdJqBQpXwSu89I1mpX6GNWMAsFu4Su5Au UhgGKKnMBVQxx5Xa7/GCsWettaA21W2mTgsfGsasUGcbmc5X8P9Ez54nS g==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="400246115" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="400246115" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2023 03:19:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="672684150" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="672684150" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.70]) by orsmga007.jf.intel.com with SMTP; 15 Mar 2023 03:19:49 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 15 Mar 2023 12:19:48 +0200 Date: Wed, 15 Mar 2023 12:19:48 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Geert Uytterhoeven Subject: Re: [PATCH v3 35/38] video: handle HAS_IOPORT dependencies Message-ID: References: <20230314121216.413434-1-schnelle@linux.ibm.com> <20230314121216.413434-36-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch@vger.kernel.org, Arnd Bergmann , linux-fbdev@vger.kernel.org, Albert Ou , Arnd Bergmann , Niklas Schnelle , Greg Kroah-Hartman , Helge Deller , "Rafael J. Wysocki" , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Alan Stern , Paul Walmsley , Bjorn Helgaas , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Mauro Carvalho Chehab , Palmer Dabbelt Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Mar 15, 2023 at 09:16:50AM +0100, Geert Uytterhoeven wrote: > Hi Niklas, > > On Tue, Mar 14, 2023 at 1:13 PM Niklas Schnelle wrote: > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > > not being declared. We thus need to add HAS_IOPORT as dependency for > > those drivers using them and guard inline code in headers. > > > > Co-developed-by: Arnd Bergmann > > Signed-off-by: Niklas Schnelle > > Thanks for your patch! > > > --- a/drivers/video/fbdev/Kconfig > > +++ b/drivers/video/fbdev/Kconfig > > > @@ -1284,7 +1285,7 @@ config FB_ATY128_BACKLIGHT > > > > config FB_ATY > > tristate "ATI Mach64 display support" if PCI || ATARI > > - depends on FB && !SPARC32 > > + depends on FB && HAS_IOPORT && !SPARC32 > > On Atari, this works without ATARI_ROM_ISA, hence it must not depend > on HAS_IOPORT. > The only call to inb() is inside a section protected by #ifdef > CONFIG_PCI. So: That piece of code is a nop anyway. We immediately overwrite clk_wr_offset with a hardcoded selection after the register reads. So if you nuke that nop code then no IOPORT dependency required at all. > > depends on FB && !SPARC32 > depends on ATARI || HAS_IOPORT > > > select FB_CFB_FILLRECT > > select FB_CFB_COPYAREA > > select FB_CFB_IMAGEBLIT > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds -- Ville Syrjälä Intel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63747C6FD1D for ; Wed, 15 Mar 2023 10:21:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232466AbjCOKVa (ORCPT ); Wed, 15 Mar 2023 06:21:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232464AbjCOKVE (ORCPT ); Wed, 15 Mar 2023 06:21:04 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F062385B1D; Wed, 15 Mar 2023 03:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678875630; x=1710411630; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=AZu0G5MJgXhilc9n2aaLZyeOdNLiwJBTw+hEvyBlZ5c=; b=T8kZEwVhIINEHEl+0mRmwwPrRzsXLF7FUm3SCX3oSTSTp5JL/gHm1uAs 8vpPE8rHK9FSRmlEo3AGDxskwrjRN3EHThEvUJBoij9xWOEXXKmFJkPN5 wzMN/QYlDYeeP1//cEiWaMeyBXJ6vqxjl9UtY5u1Q3LWNigiUps+LujNT AnTBHR9PewSj+N57HdftyM5XJMDJOTP3bJ8G9NKjV/B9hLB8FwUb0Zf3k PRAAfrAPOmnYFYRois5zQ/oBnBITYKpQuaIvbvlYNNEACgsGCWYPCJ3R0 LLVn36dm1ezKX9cHq2wI9j9Bz7UgHU5L5v9c/duuRLyZVQicp7Naa0mdI g==; X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="400246109" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="400246109" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2023 03:19:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10649"; a="672684150" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="672684150" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.70]) by orsmga007.jf.intel.com with SMTP; 15 Mar 2023 03:19:49 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 15 Mar 2023 12:19:48 +0200 Date: Wed, 15 Mar 2023 12:19:48 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Geert Uytterhoeven Cc: Niklas Schnelle , linux-arch@vger.kernel.org, Arnd Bergmann , linux-fbdev@vger.kernel.org, Albert Ou , Arnd Bergmann , "Rafael J. Wysocki" , Greg Kroah-Hartman , Helge Deller , Paul Walmsley , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Alan Stern , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Bjorn Helgaas , Palmer Dabbelt , Mauro Carvalho Chehab Subject: Re: [PATCH v3 35/38] video: handle HAS_IOPORT dependencies Message-ID: References: <20230314121216.413434-1-schnelle@linux.ibm.com> <20230314121216.413434-36-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 15, 2023 at 09:16:50AM +0100, Geert Uytterhoeven wrote: > Hi Niklas, > > On Tue, Mar 14, 2023 at 1:13 PM Niklas Schnelle wrote: > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > > not being declared. We thus need to add HAS_IOPORT as dependency for > > those drivers using them and guard inline code in headers. > > > > Co-developed-by: Arnd Bergmann > > Signed-off-by: Niklas Schnelle > > Thanks for your patch! > > > --- a/drivers/video/fbdev/Kconfig > > +++ b/drivers/video/fbdev/Kconfig > > > @@ -1284,7 +1285,7 @@ config FB_ATY128_BACKLIGHT > > > > config FB_ATY > > tristate "ATI Mach64 display support" if PCI || ATARI > > - depends on FB && !SPARC32 > > + depends on FB && HAS_IOPORT && !SPARC32 > > On Atari, this works without ATARI_ROM_ISA, hence it must not depend > on HAS_IOPORT. > The only call to inb() is inside a section protected by #ifdef > CONFIG_PCI. So: That piece of code is a nop anyway. We immediately overwrite clk_wr_offset with a hardcoded selection after the register reads. So if you nuke that nop code then no IOPORT dependency required at all. > > depends on FB && !SPARC32 > depends on ATARI || HAS_IOPORT > > > select FB_CFB_FILLRECT > > select FB_CFB_COPYAREA > > select FB_CFB_IMAGEBLIT > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds -- Ville Syrjälä Intel