Message ID | 20230921110424.215592-2-bhe@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5187648vqi; Thu, 21 Sep 2023 15:49:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGC2Dn1HXCLZH5Twbj4pqG2O5JhGRWrdocZRQqrF874JoqHeBpqwPJ+VJXg1dPLsjIdZPny X-Received: by 2002:a17:903:1c5:b0:1c5:6f4d:d6dd with SMTP id e5-20020a17090301c500b001c56f4dd6ddmr1365910plh.24.1695336551944; Thu, 21 Sep 2023 15:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695336551; cv=none; d=google.com; s=arc-20160816; b=1GU+JoPhHixz1wqLGHII4t5EsV+uvSHORFeOoyNpwEtzsedEcG07Co5wxm8mxWFxpb 8PKT4vCFiRNNH8jJmi082OHETiD9bXESwlPBde1/W5z+oDinuRXPoGpo+SIjk9Z1Hz2w u3/vXRJyz6FR5avrRmBRvfhUg7w7l+UV8V8kOu53k3sez1PCGYoZ9i5zIbJG408A8EQF ONQKJPgTf2pdcrPGTemkM+y5H+pJpK/SU75da0ci+/sfrEVJCRztvmgFpDSSXFhZoRGQ yKd4HrK7PXrqimdw+sF8SFn3l0khb93lDyN6yRjy2iXa6EpJnU+s7006E0f/pOuzmlsu RSWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8AP4WAkfm0g8fnMPEPLH78szMDWqxElEcpAiYehWd/g=; fh=p4/acJBrxbGU4029GKULRQafmb6hSNE2t85gDPs7Ll4=; b=fdrjosMtP2ufzsQQRiD+E9f1LtRdZNioNxSHG9XwmwnhP16BsIC07wLCKg0ijRAf7R 845ypVUho3jOGa13q1tq8BD97U2Ft8Nii4QPqJzxd7N1gVuYvn9jxTpMcNl9TTLR2Vw9 p390l+cP52QezyC3VPTIGyDluOJ5YxCPxiCGGY8T99h1Cv1HUN9eJFRSOAxGeE/LyGm9 lmxF2FRHcJ+PLtNP3052A62xKHPpRNxHHbKPofqfrk2+QOa7xoVIwnAkBPMoHAy6BSm0 PFWtaYUxj+G1STLSTUBLEDTJZUNd2R0+5eJBN6l98w1ZvSr/PqZulEmuaJX3WFc3llap 9+TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Folh+jQJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id n2-20020a632702000000b00563d3ecfb13si2466704pgn.117.2023.09.21.15.49.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 15:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Folh+jQJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 368908086913; Thu, 21 Sep 2023 13:20:21 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230366AbjIUUTT (ORCPT <rfc822;pwkd43@gmail.com> + 29 others); Thu, 21 Sep 2023 16:19:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231366AbjIUUSt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 21 Sep 2023 16:18:49 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D32F56D16 for <linux-kernel@vger.kernel.org>; Thu, 21 Sep 2023 10:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695317218; 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=8AP4WAkfm0g8fnMPEPLH78szMDWqxElEcpAiYehWd/g=; b=Folh+jQJL/OPeBidcyITKXn5+93z3abMwWsAZPaYio+MDo3UHBrZKqDdVNgHHx5/zw4XFe 3WMUpfTNcfMCCZx7ChpDd+HmEr6p1ibwYwaPxRgaoDb0dtL0irXRF3it3xDXLUCxPEXxrX VDaNTolBD+nRIPGeO1IqbFRoxKy/kt4= 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-584-Ku-6zn3_OjOqTQ_ymnSqzQ-1; Thu, 21 Sep 2023 07:04:42 -0400 X-MC-Unique: Ku-6zn3_OjOqTQ_ymnSqzQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6C410185A79B; Thu, 21 Sep 2023 11:04:41 +0000 (UTC) Received: from MiWiFi-R3L-srv.redhat.com (unknown [10.72.112.40]) by smtp.corp.redhat.com (Postfix) with ESMTP id C03FF2156711; Thu, 21 Sep 2023 11:04:34 +0000 (UTC) From: Baoquan He <bhe@redhat.com> To: linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, arnd@arndb.de, jiaxun.yang@flygoat.com, mpe@ellerman.id.au, geert@linux-m68k.org, mcgrof@kernel.org, hch@infradead.org, tsbogend@alpha.franken.de, f.fainelli@gmail.com, deller@gmx.de, Baoquan He <bhe@redhat.com>, Thomas Zimmermann <tzimmermann@suse.de>, Christophe Leroy <christophe.leroy@csgroup.eu>, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH v5 1/4] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Date: Thu, 21 Sep 2023 19:04:21 +0800 Message-ID: <20230921110424.215592-2-bhe@redhat.com> In-Reply-To: <20230921110424.215592-1-bhe@redhat.com> References: <20230921110424.215592-1-bhe@redhat.com> MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 21 Sep 2023 13:20:21 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777689220144738204 X-GMAIL-MSGID: 1777689220144738204 |
Series |
arch/*/io.h: remove ioremap_uc in some architectures
|
|
Commit Message
Baoquan He
Sept. 21, 2023, 11:04 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> 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 <arnd@arndb.de> Signed-off-by: Baoquan He <bhe@redhat.com> Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Cc: Helge Deller <deller@gmx.de> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Christophe Leroy <christophe.leroy@csgroup.eu> Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org --- drivers/video/fbdev/aty/atyfb_base.c | 4 ++++ 1 file changed, 4 insertions(+)
Comments
On 9/21/23 13:04, Baoquan He wrote: > From: Arnd Bergmann <arnd@arndb.de> > > 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 <arnd@arndb.de> > Signed-off-by: Baoquan He <bhe@redhat.com> > Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> > Cc: Helge Deller <deller@gmx.de> > Cc: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Christophe Leroy <christophe.leroy@csgroup.eu> > Cc: linux-fbdev@vger.kernel.org > Cc: dri-devel@lists.freedesktop.org applied to fbdev git tree. Thanks! Helge > --- > 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 5c87817a4f4c..3dcf83f5e7b4 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; >
diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index 5c87817a4f4c..3dcf83f5e7b4 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;