All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christoph Hellwig <hch@lst.de>, Arnd Bergmann <arnd@arndb.de>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	X86 ML <x86@kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-ia64@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Souptick Joarder <jrdr.linux@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Tuowen Zhao <ztuowen@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andr>
Subject: Re: [PATCH] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64
Date: Tue, 12 Nov 2019 14:06:31 +0000	[thread overview]
Message-ID: <20191112140631.GA10922@lst.de> (raw)
In-Reply-To: <CAKMK7uEEz1n+zuTs29rbPHU74Dspaib=prpMge63L_-rUk_o4A@mail.gmail.com>

On Tue, Nov 12, 2019 at 02:04:16PM +0100, Daniel Vetter wrote:
> Wut ... Maybe I'm missing something, but from how we use mtrr in other
> gpu drivers it's a) either you use MTRR because that's all you got or
> b) you use pat. Mixing both sounds like a pretty bad idea, since if
> you need MTRR for performance (because you dont have PAT) then you
> can't fix the wc with the PAT-based ioremap_uc. And if you have PAT,
> then you don't really need an MTRR to get wc.
> 
> So I'd revert this patch from Luis and ...

Sounds great to me..

> ... apply this one. Since the same reasoning should apply to anything
> that's running on any cpu with PAT.

Can you take a look at "mfd: intel-lpss: Use devm_ioremap_uc for MMIO"
in linux-next, which also looks rather fishy to me?  Can't we use
the MTRR APIs to override the broken BIOS MTRR setup there as well?

With that we could kill ioremap_uc entirely.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christoph Hellwig <hch@lst.de>, Arnd Bergmann <arnd@arndb.de>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	X86 ML <x86@kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-ia64@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Souptick Joarder <jrdr.linux@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Tuowen Zhao <ztuowen@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64
Date: Tue, 12 Nov 2019 14:06:31 +0000	[thread overview]
Message-ID: <20191112140631.GA10922@lst.de> (raw)
In-Reply-To: <CAKMK7uEEz1n+zuTs29rbPHU74Dspaib=prpMge63L_-rUk_o4A@mail.gmail.com>

On Tue, Nov 12, 2019 at 02:04:16PM +0100, Daniel Vetter wrote:
> Wut ... Maybe I'm missing something, but from how we use mtrr in other
> gpu drivers it's a) either you use MTRR because that's all you got or
> b) you use pat. Mixing both sounds like a pretty bad idea, since if
> you need MTRR for performance (because you dont have PAT) then you
> can't fix the wc with the PAT-based ioremap_uc. And if you have PAT,
> then you don't really need an MTRR to get wc.
> 
> So I'd revert this patch from Luis and ...

Sounds great to me..

> ... apply this one. Since the same reasoning should apply to anything
> that's running on any cpu with PAT.

Can you take a look at "mfd: intel-lpss: Use devm_ioremap_uc for MMIO"
in linux-next, which also looks rather fishy to me?  Can't we use
the MTRR APIs to override the broken BIOS MTRR setup there as well?

With that we could kill ioremap_uc entirely.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christoph Hellwig <hch@lst.de>, Arnd Bergmann <arnd@arndb.de>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	X86 ML <x86@kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-ia64@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Souptick Joarder <jrdr.linux@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Tuowen Zhao <ztuowen@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andr>
Subject: Re: [PATCH] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64
Date: Tue, 12 Nov 2019 15:06:31 +0100	[thread overview]
Message-ID: <20191112140631.GA10922@lst.de> (raw)
In-Reply-To: <CAKMK7uEEz1n+zuTs29rbPHU74Dspaib=prpMge63L_-rUk_o4A@mail.gmail.com>

On Tue, Nov 12, 2019 at 02:04:16PM +0100, Daniel Vetter wrote:
> Wut ... Maybe I'm missing something, but from how we use mtrr in other
> gpu drivers it's a) either you use MTRR because that's all you got or
> b) you use pat. Mixing both sounds like a pretty bad idea, since if
> you need MTRR for performance (because you dont have PAT) then you
> can't fix the wc with the PAT-based ioremap_uc. And if you have PAT,
> then you don't really need an MTRR to get wc.
> 
> So I'd revert this patch from Luis and ...

Sounds great to me..

> ... apply this one. Since the same reasoning should apply to anything
> that's running on any cpu with PAT.

Can you take a look at "mfd: intel-lpss: Use devm_ioremap_uc for MMIO"
in linux-next, which also looks rather fishy to me?  Can't we use
the MTRR APIs to override the broken BIOS MTRR setup there as well?

With that we could kill ioremap_uc entirely.

WARNING: multiple messages have this Message-ID (diff)
From: Christoph Hellwig <hch@lst.de>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Christoph Hellwig <hch@lst.de>, Arnd Bergmann <arnd@arndb.de>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	X86 ML <x86@kernel.org>, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-ia64@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
	Fenghua Yu <fenghua.yu@intel.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Souptick Joarder <jrdr.linux@gmail.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Tuowen Zhao <ztuowen@gmail.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64
Date: Tue, 12 Nov 2019 15:06:31 +0100	[thread overview]
Message-ID: <20191112140631.GA10922@lst.de> (raw)
In-Reply-To: <CAKMK7uEEz1n+zuTs29rbPHU74Dspaib=prpMge63L_-rUk_o4A@mail.gmail.com>

On Tue, Nov 12, 2019 at 02:04:16PM +0100, Daniel Vetter wrote:
> Wut ... Maybe I'm missing something, but from how we use mtrr in other
> gpu drivers it's a) either you use MTRR because that's all you got or
> b) you use pat. Mixing both sounds like a pretty bad idea, since if
> you need MTRR for performance (because you dont have PAT) then you
> can't fix the wc with the PAT-based ioremap_uc. And if you have PAT,
> then you don't really need an MTRR to get wc.
> 
> So I'd revert this patch from Luis and ...

Sounds great to me..

> ... apply this one. Since the same reasoning should apply to anything
> that's running on any cpu with PAT.

Can you take a look at "mfd: intel-lpss: Use devm_ioremap_uc for MMIO"
in linux-next, which also looks rather fishy to me?  Can't we use
the MTRR APIs to override the broken BIOS MTRR setup there as well?

With that we could kill ioremap_uc entirely.

  reply	other threads:[~2019-11-12 14:06 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 19:22 [PATCH] video: fbdev: atyfb: only use ioremap_uc() on i386 and ia64 Arnd Bergmann
2019-11-11 19:22 ` Arnd Bergmann
2019-11-11 19:22 ` Arnd Bergmann
2019-11-11 19:22 ` Arnd Bergmann
2019-11-12 10:55 ` Christoph Hellwig
2019-11-12 10:55   ` Christoph Hellwig
2019-11-12 10:55   ` Christoph Hellwig
2019-11-12 13:04   ` Daniel Vetter
2019-11-12 13:04     ` Daniel Vetter
2019-11-12 13:04     ` Daniel Vetter
2019-11-12 14:06     ` Christoph Hellwig [this message]
2019-11-12 14:06       ` Christoph Hellwig
2019-11-12 14:06       ` Christoph Hellwig
2019-11-12 14:06       ` Christoph Hellwig
2019-11-12 14:26       ` Daniel Vetter
2019-11-12 14:26         ` Daniel Vetter
2019-11-12 14:26         ` Daniel Vetter
2019-11-12 22:24         ` Luis Chamberlain
2019-11-12 22:24           ` Luis Chamberlain
2019-11-12 22:24           ` Luis Chamberlain
2019-11-13  7:27           ` Christoph Hellwig
2019-11-13  7:27             ` Christoph Hellwig
2019-11-13  7:27             ` Christoph Hellwig
2019-11-13  7:27             ` Christoph Hellwig
2019-11-13  7:38             ` Arnd Bergmann
2019-11-13  7:38               ` Arnd Bergmann
2019-11-13  7:38               ` Arnd Bergmann
2019-11-13  7:38               ` Arnd Bergmann
2019-11-13  7:38               ` Arnd Bergmann
2019-11-13  9:31               ` Andy Shevchenko
2019-11-13  9:31                 ` Andy Shevchenko
2019-11-13  9:31                 ` Andy Shevchenko
2019-11-13  9:31                 ` Andy Shevchenko
2019-11-13  9:31                 ` Andy Shevchenko
2019-11-13 18:45                 ` Luis Chamberlain
2019-11-13 18:45                   ` Luis Chamberlain
2019-11-13 18:45                   ` Luis Chamberlain
2019-11-12 22:17       ` Luis Chamberlain
2019-11-12 22:17         ` Luis Chamberlain
2019-11-12 22:17         ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191112140631.GA10922@lst.de \
    --to=hch@lst.de \
    --cc=arnd@arndb.de \
    --cc=b.zolnierkie@samsung.com \
    --cc=bp@alien8.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mcgrof@kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    --cc=ztuowen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.