Re: [x86/mm/pat, drivers/media/ivtv] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init()

2015-06-22 Thread Luis R. Rodriguez
On Mon, Jun 22, 2015 at 09:06:41AM +0200, Borislav Petkov wrote:
 On Mon, Jun 22, 2015 at 03:01:38AM +0200, Luis R. Rodriguez wrote:
  We can certainly replace the WARN() with pr_warn(), I don't see
  how its confusing though as its a run time real issue. Either
  way whatever you recommend is fine by me.
 
 Yeah, it confused the 0day robot at least. :-)
 
 But maybe because it cannot really read. But I've experienced cases
 where people don't read too, see *a* splat and raise the alarm. So yeah,
 I think a simple pr_warn would be much better.

OK I'll submit a follow up fix and say the robot reported it :)

 Luis
--
To unsubscribe from this list: send the line unsubscribe linux-media in


Re: [x86/mm/pat, drivers/media/ivtv] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init()

2015-06-22 Thread Borislav Petkov
On Mon, Jun 22, 2015 at 03:01:38AM +0200, Luis R. Rodriguez wrote:
 We can certainly replace the WARN() with pr_warn(), I don't see
 how its confusing though as its a run time real issue. Either
 way whatever you recommend is fine by me.

Yeah, it confused the 0day robot at least. :-)

But maybe because it cannot really read. But I've experienced cases
where people don't read too, see *a* splat and raise the alarm. So yeah,
I think a simple pr_warn would be much better.

Thanks.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line unsubscribe linux-media in


Re: [x86/mm/pat, drivers/media/ivtv] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init()

2015-06-22 Thread Ingo Molnar

* Borislav Petkov b...@suse.de wrote:

 On Sun, Jun 21, 2015 at 10:23:48PM +0200, Luis R. Rodriguez wrote:

  Nope, well the driver requires huge amounts of work to work with PAT, that 
  work will likely never be done, so hence the warning. Its our compromise as 
  only 2 drivers will live on Linux like this and they are both old and rare.
 
 Hmm, so wasn't the possibility discussed to fail loading instead and issue a 
 single-line pr_warn() when PAT is enabled? Those big WARN() splats will only 
 confuse people...

Absolutely - they are a regression.

Thanks,

Ingo
--
To unsubscribe from this list: send the line unsubscribe linux-media in


Re: [x86/mm/pat, drivers/media/ivtv] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init()

2015-06-21 Thread Luis R. Rodriguez
On Sun, Jun 21, 2015 at 10:41:20PM +0200, Borislav Petkov wrote:
 On Sun, Jun 21, 2015 at 10:23:48PM +0200, Luis R. Rodriguez wrote:
  Nope, well the driver requires huge amounts of work to work with PAT,
  that work will likely never be done, so hence the warning. Its our
  compromise as only 2 drivers will live on Linux like this and they are
  both old and rare.
 
 Hmm, so wasn't the possibility discussed to fail loading 

It will fail load.

 instead and
 issue a single-line pr_warn() when PAT is enabled? 

During review no one opposed the idea of having the warn
as its a load thing, not a compile thing, and a user
that does not get their driver loaded should know why,
otherwise its not clear.

 Those big WARN() splats will only confuse people...

We can certainly replace the WARN() with pr_warn(), I don't see
how its confusing though as its a run time real issue. Either
way whatever you recommend is fine by me.

 Luis
--
To unsubscribe from this list: send the line unsubscribe linux-media in


Re: [x86/mm/pat, drivers/media/ivtv] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init()

2015-06-21 Thread Luis R. Rodriguez
On Sat, Jun 20, 2015 at 01:08:44PM +0200, Borislav Petkov wrote:
 On Sat, Jun 20, 2015 at 03:17:56PM +0800, Fengguang Wu wrote:
  Greetings,
  
  0day kernel testing robot got the below dmesg and the first bad commit is
  
  git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
  
  commit 1bf1735b478008c30acaff18ec6f4a3ff211c28a
  Author: Luis R. Rodriguez mcg...@suse.com
  AuthorDate: Mon Jun 15 10:28:16 2015 +0200
  Commit: Ingo Molnar mi...@kernel.org
  CommitDate: Thu Jun 18 11:23:41 2015 +0200
  
  x86/mm/pat, drivers/media/ivtv: Use arch_phys_wc_add() and require PAT 
  disabled
 
 ...
 
  [   12.956506] ivtv: Start initialization, version 1.4.3
  [   12.958238] ivtv: End initialization
  [   12.959438] [ cut here ]
  [   12.974076] WARNING: CPU: 0 PID: 1 at 
  drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init+0x32/0xa3()
  [   12.978017] ivtvfb needs PAT disabled, boot with nopat kernel parameter
 
 Warning says it all. You need to boot with nopat. Apparently, those
 devices are very seldom now and users should boot with nopat.

Indeed.

 Luis, what is the plan, is this driver supposed to be converted to
 reserve_memtype(..., _PAGE_CACHE_MODE_WC, ...) at some point?

Nope, well the driver requires huge amounts of work to work with PAT,
that work will likely never be done, so hence the warning. Its our
compromise as only 2 drivers will live on Linux like this and they are
both old and rare.

  Luis
--
To unsubscribe from this list: send the line unsubscribe linux-media in


Re: [x86/mm/pat, drivers/media/ivtv] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init()

2015-06-21 Thread Borislav Petkov
On Sun, Jun 21, 2015 at 10:23:48PM +0200, Luis R. Rodriguez wrote:
 Nope, well the driver requires huge amounts of work to work with PAT,
 that work will likely never be done, so hence the warning. Its our
 compromise as only 2 drivers will live on Linux like this and they are
 both old and rare.

Hmm, so wasn't the possibility discussed to fail loading instead and
issue a single-line pr_warn() when PAT is enabled? Those big WARN()
splats will only confuse people...

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line unsubscribe linux-media in


[x86/mm/pat, drivers/media/ivtv] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init()

2015-06-20 Thread Fengguang Wu
Greetings,

0day kernel testing robot got the below dmesg and the first bad commit is

git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master

commit 1bf1735b478008c30acaff18ec6f4a3ff211c28a
Author: Luis R. Rodriguez mcg...@suse.com
AuthorDate: Mon Jun 15 10:28:16 2015 +0200
Commit: Ingo Molnar mi...@kernel.org
CommitDate: Thu Jun 18 11:23:41 2015 +0200

x86/mm/pat, drivers/media/ivtv: Use arch_phys_wc_add() and require PAT 
disabled

We are burrying direct access to MTRR code support on
x86 in order to take advantage of PAT. In the future, we
also want to make the default behavior of ioremap_nocache()
to use strong UC, at which point the use of mtrr_add() on
those systems would make write-combining void.

In order to help both enable us to later make strong
UC default and in order to phase out direct MTRR access
code, port the driver over to the arch_phys_wc_add() API
and annotate that the device driver requires systems to
boot with PAT disabled, with the 'nopat' kernel parameter.

This is a workable compromise given that the hardware is
really rare these days, and perhaps only some lost souls
stuck with obsolete hardware are expected to be using this
feature of the device driver.

Signed-off-by: Luis R. Rodriguez mcg...@suse.com
Signed-off-by: Borislav Petkov b...@suse.de
Acked-by: Andy Walls awa...@md.metrocast.net
Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com
Cc: Andrew Morton a...@linux-foundation.org
Cc: Andy Lutomirski l...@amacapital.net
Cc: Antonino Daplas adap...@gmail.com
Cc: Arnd Bergmann a...@arndb.de
Cc: Borislav Petkov b...@alien8.de
Cc: Brian Gerst brge...@gmail.com
Cc: Daniel Vetter daniel.vet...@ffwll.ch
Cc: Dave Airlie airl...@redhat.com
Cc: Dave Hansen dave.han...@linux.intel.com
Cc: Denys Vlasenko dvlas...@redhat.com
Cc: Doug Ledford dledf...@redhat.com
Cc: H. Peter Anvin h...@zytor.com
Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com
Cc: Juergen Gross jgr...@suse.com
Cc: Linus Torvalds torva...@linux-foundation.org
Cc: Michael S. Tsirkin m...@redhat.com
Cc: Oleg Nesterov o...@redhat.com
Cc: Peter Zijlstra pet...@infradead.org
Cc: Roger Pau Monné roger@citrix.com
Cc: Stefan Bader stefan.ba...@canonical.com
Cc: Suresh Siddha sbsid...@gmail.com
Cc: Thomas Gleixner t...@linutronix.de
Cc: Ville Syrjälä syrj...@sci.fi
Cc: bhelg...@google.com
Cc: konrad.w...@oracle.com
Cc: linux-media@vger.kernel.org
Cc: tomi.valkei...@ti.com
Cc: toshi.k...@hp.com
Link: 
http://lkml.kernel.org/r/1434053994-2196-2-git-send-email-mcg...@do-not-panic.com
Signed-off-by: Ingo Molnar mi...@kernel.org

+---+++-+
|   | 957561ec0f | 
1bf1735b47 | v4.1-rc8_061911 |
+---+++-+
| boot_successes| 63 | 0
  | 0   |
| boot_failures | 0  | 22   
  | 13  |
| WARNING:at_drivers/media/pci/ivtv/ivtvfb.c:#ivtvfb_init() | 0  | 22   
  | 13  |
| backtrace:ivtvfb_init | 0  | 22   
  | 13  |
| backtrace:warn_slowpath_fmt   | 0  | 22   
  | 13  |
| backtrace:kernel_init_freeable| 0  | 22   
  | 13  |
+---+++-+

[   12.956506] ivtv: Start initialization, version 1.4.3
[   12.958238] ivtv: End initialization
[   12.959438] [ cut here ]
[   12.974076] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 
ivtvfb_init+0x32/0xa3()
[   12.978017] ivtvfb needs PAT disabled, boot with nopat kernel parameter
[   12.980628] CPU: 0 PID: 1 Comm: swapper Not tainted 4.1.0-rc5-00034-g1bf1735 
#2
[   12.995566] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.7.5-20140531_083030-gandalf 04/01/2014
[   12.999061]  8d429cc8 880010c5bdc8 8cf47a88 
880010c5be08
[   13.001954]  8c68e6d5 8d977327 8d9c6910 
88139ef8
[   13.004862]   8d977327  
880010c5be68
[   13.007636] Call Trace:
[   13.008469]  [8cf47a88] dump_stack+0x19/0x1b
[   13.010185]  [8c68e6d5] warn_slowpath_common+0x75/0xb0
[   13.024843]  [8d977327] ? module_start+0xa4/0xa4
[   13.026876]  [8d977327] ? module_start+0xa4/0xa4
[   13.029041]  [8c68e781] warn_slowpath_fmt+0x41/0x50
[   13.031312] 

Re: [x86/mm/pat, drivers/media/ivtv] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 ivtvfb_init()

2015-06-20 Thread Borislav Petkov
On Sat, Jun 20, 2015 at 03:17:56PM +0800, Fengguang Wu wrote:
 Greetings,
 
 0day kernel testing robot got the below dmesg and the first bad commit is
 
 git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
 
 commit 1bf1735b478008c30acaff18ec6f4a3ff211c28a
 Author: Luis R. Rodriguez mcg...@suse.com
 AuthorDate: Mon Jun 15 10:28:16 2015 +0200
 Commit: Ingo Molnar mi...@kernel.org
 CommitDate: Thu Jun 18 11:23:41 2015 +0200
 
 x86/mm/pat, drivers/media/ivtv: Use arch_phys_wc_add() and require PAT 
 disabled

...

 [   12.956506] ivtv: Start initialization, version 1.4.3
 [   12.958238] ivtv: End initialization
 [   12.959438] [ cut here ]
 [   12.974076] WARNING: CPU: 0 PID: 1 at drivers/media/pci/ivtv/ivtvfb.c:1270 
 ivtvfb_init+0x32/0xa3()
 [   12.978017] ivtvfb needs PAT disabled, boot with nopat kernel parameter

Warning says it all. You need to boot with nopat. Apparently, those
devices are very seldom now and users should boot with nopat.

Luis, what is the plan, is this driver supposed to be converted to
reserve_memtype(..., _PAGE_CACHE_MODE_WC, ...) at some point?

Thanks.

-- 
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line unsubscribe linux-media in