Bug 12372

Summary: kernel-2.6.28 prevents X.org from starting on SiS 651 (REGRESSION)
Product: Platform Specific/Hardware Reporter: Thierry Vignaud (thierry.vignaud)
Component: i386Assignee: platform_i386
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: diegocg, suresh.b.siddha, venki
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.28 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: xorg's log with 2.6.27.7 kernel (working)
xorg's log with 2.6.28-rc8 kernel (not working)
xorg's log with 2.6.28 kernel (xserver-1.5.99.3)
kernel-2.6.27.7's dmesg
kernel-2.6.28's dmesg
kernel-2.6.28's dmesg with debugpat option
kernel-2.6.28's dmesg with text console instead of vesafb console
/sys/kernel/debug/x86/pat_memtype_list with kernel-2.6.27
/sys/kernel/debug/x86/pat_memtype_list with kernel-2.6.28
/proc/ioports
/proc/iomem
Proposed patch
xorg's log with patched 2.6.28 kernel on the second machine.

Description Thierry Vignaud 2009-01-06 06:58:52 UTC
Latest working kernel version: 2.6.27
Earliest failing kernel version: 2.6.28-rc8
          (I did not tested earlier RCs)
Distribution: Mandriva Linux
Hardware Environment: P4 with an SiS motherboard (video card is a SiS 651)
Software Environment: X11
Problem Description:
kernel-2.6.28 prevents X.org from starting on SiS 651 with sis driver (REGRESSION). X11 failed to load with:

Fatal server error:
xf86MapVidMem: Could not mmap framebuffer (0x00000000,0x2000) (Invalid
argument)

Tested with both:
- xorg-7.3 / xserver-1.5
- xorg-7.4 / xserver-1.6 (really 1.5.99.3)

All X11 variants work smoothly with 2.6.27 and all failed with 2.6.28.


Steps to reproduce:
- boot with 2.6.27: X loads smoothly
- boot with 2.6.28: X failed to load


Looks similar to bug #10828
Comment 1 Thierry Vignaud 2009-01-06 07:06:35 UTC
After reading bug ♯11958 as well as bug #10828, I'm wondering if the fix for some other machinse hasn't broken my machine...
Comment 2 Thierry Vignaud 2009-01-06 08:19:38 UTC
Oops, I fscked up the assignee.
Comment 3 Diego Calleja 2009-01-06 11:22:09 UTC
Could you add your dmesg and Xorg.0.log (found in /var/log/ - beware that if you boot into a sane environment the log of the failed X is moved to Xorg.0.log.old) for both your working and non-working cases?
Comment 4 Thierry Vignaud 2009-01-06 13:18:35 UTC
Created attachment 19680 [details]
xorg's log with 2.6.27.7 kernel (working)
Comment 5 Thierry Vignaud 2009-01-06 13:19:18 UTC
Created attachment 19681 [details]
xorg's log with 2.6.28-rc8 kernel (not working)

(same result with rc9 and final)
Comment 6 Thierry Vignaud 2009-01-06 13:19:47 UTC
Created attachment 19682 [details]
xorg's log with 2.6.28 kernel (xserver-1.5.99.3)
Comment 7 Thierry Vignaud 2009-01-06 13:21:28 UTC
I'll attach dmesg output tomorrow since this is a machine I have at home, not at work.
Comment 8 Thierry Vignaud 2009-01-06 13:32:10 UTC
Machine is an Asus p4_533 with a P4@1.8Ghz CPU, 1Go of RAM and an SiS 651 Motherboard.
It does support PAT (from what I remember from dmesg) which I suspect is the culprit.
See http://dlsvr02.asus.com/pub/ASUS/Barebone/Terminator-P4-533/Manual/e1125_terminator_p4_533.pdf
I'll post the full dmesg tomorrow once I've been back at home.
Comment 9 Thierry Vignaud 2009-01-07 05:26:48 UTC
Created attachment 19695 [details]
kernel-2.6.27.7's dmesg
Comment 10 Thierry Vignaud 2009-01-07 05:30:30 UTC
Created attachment 19696 [details]
kernel-2.6.28's dmesg

I've tried disable_mtrr_cleanup option but output is identical (modulo CPU frequency & module load by udev order)
Comment 11 Thierry Vignaud 2009-01-07 05:30:59 UTC
Created attachment 19697 [details]
kernel-2.6.28's dmesg with debugpat option
Comment 12 Thierry Vignaud 2009-01-07 05:32:22 UTC
Created attachment 19698 [details]
kernel-2.6.28's dmesg with text console instead of vesafb console

(both are working with 2.6.27.x)
(no change on X faillure)
Comment 13 Thierry Vignaud 2009-01-07 05:33:30 UTC
Comment on attachment 19696 [details]
kernel-2.6.28's dmesg

Note the "WARNING: at arch/x86/mm/ioremap" that doesn't appear with 2.6.27.x
Comment 14 Thierry Vignaud 2009-01-07 05:34:27 UTC
Created attachment 19699 [details]
/sys/kernel/debug/x86/pat_memtype_list with kernel-2.6.27
Comment 15 Thierry Vignaud 2009-01-07 05:35:28 UTC
Created attachment 19700 [details]
/sys/kernel/debug/x86/pat_memtype_list with kernel-2.6.28

2 entries lost, else it's identatical to 2.6.27's
Comment 16 Thierry Vignaud 2009-01-07 05:37:58 UTC
Created attachment 19701 [details]
/proc/ioports
Comment 17 Thierry Vignaud 2009-01-07 05:38:22 UTC
Created attachment 19702 [details]
/proc/iomem
Comment 18 Thierry Vignaud 2009-01-07 05:52:27 UTC
Note that the BIOS has two settings for the shared video RAM  (UC & UWSC).
Both settings work smoothly with 2.6.27.x and both failed with 2.6.28
Comment 19 Suresh B Siddha 2009-01-08 11:03:07 UTC
Created attachment 19720 [details]
Proposed patch

Thierry, Can you please check if the attached patch fixes the issue you encountered? Please ignore the patch I sent out last night. While the resolution is same, patch attached fixes the issue more cleanly.
Comment 20 Thierry Vignaud 2009-01-08 11:46:16 UTC
I'll test the new patch.
I just finished compile/test a kernel with your first patch.
It does fix this issue.
I'll try the new patch too.
Comment 21 Thierry Vignaud 2009-01-08 13:03:02 UTC
Your second patch works too[1].
I tested both on another machine at work that exhibited the very same error.
This machine is a Celeron@2.8Ghz with an SiS motherboard.

[1] though X11 complains about the following:
(WW) SIS(0): xf86UnMapVidMem: cannot find region for [0xb78c5000,0x10000]
(WW) SIS(0): xf86UnMapVidMem: cannot find region for [0xb58c5000,0x2000000]
Comment 22 Thierry Vignaud 2009-01-08 13:06:09 UTC
Created attachment 19723 [details]
xorg's log with patched 2.6.28 kernel on the second machine.

I'll check at home that the first machine (whose logs are attached to this bug report) is fixed too but I'm pretty sure that it'll work smoothly too.
Comment 23 Thierry Vignaud 2009-01-08 13:54:27 UTC
You can add "Tested-By: Thierry Vignaud <tvignaud@mandriva.com>" to this patch
Comment 24 Thierry Vignaud 2009-01-09 03:30:24 UTC
I confirm it fixed my own machine at home too.
Tested on both "SIS660/[M]661[F|M]X/[M]670/[M]741[GX]/[M]760[GX]/[M]761[GX]/[M]770[GX]" & "SIS650/M650/651/740"
Comment 25 Thierry Vignaud 2009-01-19 06:18:24 UTC
Well maybe a fix is availlable but it was released before 2.6.29-rc1 got released. However it wasn't included neither in rc1 nor in rc2.
Will it get included?

This is a serious regression...