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-21 Thread Ingo Molnar

* 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 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 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


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 
> > AuthorDate: Mon Jun 15 10:28:16 2015 +0200
> > Commit: Ingo Molnar 
> > 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-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 
> AuthorDate: Mon Jun 15 10:28:16 2015 +0200
> Commit: Ingo Molnar 
> 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


[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 
AuthorDate: Mon Jun 15 10:28:16 2015 +0200
Commit: Ingo Molnar 
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 
Signed-off-by: Borislav Petkov 
Acked-by: Andy Walls 
Acked-by: Mauro Carvalho Chehab 
Cc: Andrew Morton 
Cc: Andy Lutomirski 
Cc: Antonino Daplas 
Cc: Arnd Bergmann 
Cc: Borislav Petkov 
Cc: Brian Gerst 
Cc: Daniel Vetter 
Cc: Dave Airlie 
Cc: Dave Hansen 
Cc: Denys Vlasenko 
Cc: Doug Ledford 
Cc: H. Peter Anvin 
Cc: Jean-Christophe Plagniol-Villard 
Cc: Juergen Gross 
Cc: Linus Torvalds 
Cc: Michael S. Tsirkin 
Cc: Oleg Nesterov 
Cc: Peter Zijlstra 
Cc: Roger Pau Monné 
Cc: Stefan Bader 
Cc: Suresh Siddha 
Cc: Thomas Gleixner 
Cc: Ville Syrjälä 
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 

+---+++-+
|   | 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]  [] dump_stack+0x19/0x1b
[   13.010185]  [] warn_slowpath_common+0x75/0xb0
[   13.024843]  [] ? module_start+0xa4/0xa4
[   13.026876]  [] ? module_start+0xa4/0xa4
[   13.029041]  [] warn_slowpath_fmt+0x41/0x50
[   13.031312]  [] ivtvfb_init+0x32/0xa3
[   13.033362]  [] do_one_initcall+0x19a/0x1ae
[   13.035444]  [] kernel_init_freeable+0x11a/0x1a2
[   13.037434]  [] ? rest_init+0xc0/0xc0
[   13.051468]  [] kernel_init+0x9/0xf0
[   13.053252]  [] ret_from_fork+0x42/0x70
[   13.055149]  [] ? rest_init+0xc0/0xc0
[   13.057090] ---[ end trace 4c8a37b47d22b2c8 ]---
[   13.058748] Zoran MJPEG board driver version 0.10.1

git bisect start 1e5a271153487afd411894cfcbebed348c56e251 
0f57d86787d8b1076ea8f9cba2a46d534a27 --
git bisect good cfe18bb129d434b5229366eef876f076e9143bf4  # 16:20 22+  
0  Merge 'pm/bleeding-edge' into devel-hourly-20150619