From patchwork Wed Mar 8 13:07:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoquan He X-Patchwork-Id: 13165699 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7D2EC678D5 for ; Wed, 8 Mar 2023 13:07:32 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 31B326B0074; Wed, 8 Mar 2023 08:07:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2CAB46B0075; Wed, 8 Mar 2023 08:07:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 16B4A280001; Wed, 8 Mar 2023 08:07:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id F12296B0074 for ; Wed, 8 Mar 2023 08:07:31 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id CEADC40F2C for ; Wed, 8 Mar 2023 13:07:31 +0000 (UTC) X-FDA: 80545757502.12.4C387B6 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf10.hostedemail.com (Postfix) with ESMTP id 0C048C0025 for ; Wed, 8 Mar 2023 13:07:29 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NAw80EVS; spf=pass (imf10.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678280850; h=from:from:sender: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:dkim-signature; bh=uwBTGd8vP947AeUSF0iMuOil3XwvoXMLAawY3OLENFQ=; b=KiSVyPFFaWSusUVAGCYGzMUlUip48WVhnFY102Dao/IwmldElOD6MWX0seYyCpJEa+a/HR wwcETKm8k0DpvdhhVJ8x+0AEeLGD7B7POdF0tLR5XN25gV/e44qM+C5DG3XAc89mlJdlfb IPudlS4vbFEmGpp1tUxcoH5VAy1Q1S0= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=NAw80EVS; spf=pass (imf10.hostedemail.com: domain of bhe@redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=bhe@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678280850; a=rsa-sha256; cv=none; b=HM0E+f6ZZHFx7uxIX6iI5hRs32U/5gPHKBlVor0xTexrX5GvFB7YmOcMuNBxWa91eh/cOl mSmFA8D10HuprPn5MrkGMHY2ZNM7zuA/46nEo0mHhJL0YK6jn6+vcMQmEmgI71jmjq4U9c 4xcJTxKahxJRTmS/9uupdyN6VMkf6mc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678280849; 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=uwBTGd8vP947AeUSF0iMuOil3XwvoXMLAawY3OLENFQ=; b=NAw80EVSC7712NdXBtXng7FWL1il8fegbFjHgoUsYwgoLDJoisd4T28cbGMrDHAUu5iIP1 EWrf0Zbl8bhyAkXxmUzv+501gC6DF6Q3D+Og2N6vcul/C/pnFZuWrUYdVOO0dNbAJsPI8b wnnDaIA/mk7lS6cBNPDKhDfe/Q2khHQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-595-QZ6zXcGKMfiG3-HnaItivQ-1; Wed, 08 Mar 2023 08:07:26 -0500 X-MC-Unique: QZ6zXcGKMfiG3-HnaItivQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4AEFF858F09; Wed, 8 Mar 2023 13:07:25 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (ovpn-12-137.pek2.redhat.com [10.72.12.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id 914522166B26; Wed, 8 Mar 2023 13:07:18 +0000 (UTC) From: Baoquan He To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, arnd@arndb.de, mpe@ellerman.id.au, geert@linux-m68k.org, mcgrof@kernel.org, hch@infradead.org, Baoquan He , Helge Deller , Thomas Zimmermann , Christophe Leroy , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 1/4] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Date: Wed, 8 Mar 2023 21:07:07 +0800 Message-Id: <20230308130710.368085-2-bhe@redhat.com> In-Reply-To: <20230308130710.368085-1-bhe@redhat.com> References: <20230308130710.368085-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 0C048C0025 X-Stat-Signature: hxgsat5um6tw4dw6zwu4zcgcb91f77ja X-Rspam-User: X-HE-T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ormhF8HDXaQKKzCCFmfL5dMNTYSMUclrBCvJmEkENdOTyeIS3o/97xnPLIPwcqhFdE/1Zilua7LOelgK6ay+12fScFT8axrGP/V6Y8C3463Bp0zW2Nwrgz+e3r6FqHXKdUmlaShzyYcLpOdYBIOzdGaHjRY15VKnjPWB/Q31IMTj0muv3kndNx1FoWGU2swkGWDi/JmVlNA077x0cuorb0faXjXfSff8sHBCqzz96k0kyIlLnro1YjJh1Ge53r7u1C2aXfm0JJYwt4N6u6TLEHUAcFtNSmWiSAlHUk9cJzKoyw7IciUx8xPYyDUn67BfBQKsr52tu0JhuP5TS4nF/pNFaa5P X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Arnd Bergmann ioremap_uc() is only meaningful on old x86-32 systems with the PAT extension, and on ia64 with its slightly unconventional ioremap() behavior, everywhere else this is the same as ioremap() anyway. Change the only driver that still references ioremap_uc() to only do so on x86-32/ia64 in order to allow removing that interface at some point in the future for the other architectures. On some architectures, ioremap_uc() just returns NULL, changing the driver to call ioremap() means that they now have a chance of working correctly. Signed-off-by: Arnd Bergmann Signed-off-by: Baoquan He Cc: Helge Deller Cc: Thomas Zimmermann Cc: Christophe Leroy Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Luis Chamberlain --- drivers/video/fbdev/aty/atyfb_base.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index b02e4e645035..6553c71b113f 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -3440,11 +3440,15 @@ static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info, } info->fix.mmio_start = raddr; +#if defined(__i386__) || defined(__ia64__) /* * By using strong UC we force the MTRR to never have an * effect on the MMIO region on both non-PAT and PAT systems. */ par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000); +#else + par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000); +#endif if (par->ati_regbase == NULL) return -ENOMEM;