All of lore.kernel.org
 help / color / mirror / Atom feed
* Xorg does not work on sparc32 in 2.6 (except on cg14)
@ 2005-02-04 21:49 Tom 'spot' Callaway
  2005-02-04 22:40 ` Tom 'spot' Callaway
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Tom 'spot' Callaway @ 2005-02-04 21:49 UTC (permalink / raw)
  To: sparclinux

With a working pte_read, and VMALLOC_START set sanely, the next major
bug that Aurora users have noticed is that Xorg does not work on sparc32
hardware running 2.6, with one exception: Bob Breuer has been able to
get the cg14 to work.

My SS20 with a CG6 (TGX+) works fine in 2.4. When I attempt to run Xorg
in 2.6 (specifically, 2.6.11-rc2-bk3), the Xorg.0.log claims that it is
running, but the kernel has actually oopsed:

kernel BUG at arch/sparc/mm/srmmu.c:140!
              \|/ ____ \|/
              "@'/ ,. \`@"
              /_| \__/ |_\
                 \__U_/
Xorg(2681): Kernel bad trap [#1]
PSR: 404010c2 PC: f001d8c4 NPC: f001d8c8 Y: 00000000    Not tainted
PC: <srmmu_pte_pfn+0x24/0x30>
%G: 0000008c 404010e1  f01fd40c f0ab1e5c  f002be4c 00000008  f215e000
00000000
%O: 00000029 f01d43e8  0000008c 00000020  00000060 f00f33a0  f215fd18
f001d8bc
RPC: <srmmu_pte_pfn+0x1c/0x30>
%L: f215fd38 f3ea0d4c  f0288c00 00000000  f30fea2c f30f9b9c  00100100
00200200
%I: e2070026 00000ec0  503b0000 f002e938  00000060 f00f33a0  f215fd80
f0061974
Caller[f0061974]: copy_page_range+0x2fc/0x47c
Caller[f002e9f4]: copy_process+0x5b4/0xdd0
Caller[f002f2cc]: do_fork+0x4c/0x1d0
Caller[f0011120]: syscall_is_too_hard+0x34/0x40
Caller[501c835c]: 0x501c835c
Instruction DUMP: 901223e8  7fffd23c  9210208c <91d02005> 81c7e008
81e80000  9de3bf98  c4060000  033c0000

This is being triggered with the BUG() in this function in
arch/sparc/mm/srmmu.c:

static unsigned long srmmu_pte_pfn(pte_t pte)
{
        if (srmmu_device_memory(pte_val(pte))) {
                /* XXX Anton obviously had something in mind when he did
this.
                 * But what?
                 */
                /* return (struct page *)~0; */
                BUG();
        }
        return (pte_val(pte) & SRMMU_PTE_PMASK) >> (PAGE_SHIFT-4);
}

This is being BTFIXEDUP to pte_pfn. 

Removing the if (srmmu_device_memory(pte_val(pte))) check stops the
oops, but it doesn't make X work. The screen goes blank, but the X
session never appears.

I've got a couple of other framebuffer SBUS cards that I plan on
testing, but the only success report I have is from Bob's cg14. 

So, does anyone know whats happening here? Why would the cg14 work when
a cg6 does not? This isn't an Xorg config file error, as far as Xorg is
concerned, the X session is running, twm is in the ps tree, and an xterm
is open. The monitor is a stock Sun 15 inch, no special cabling.

Any and all help is appreciated.

~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE 
Red Hat Sales Engineer || Aurora Linux Project Leader

"If you are going through hell, keep going."
-- Sir Winston Churchill


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Xorg does not work on sparc32 in 2.6 (except on cg14)
  2005-02-04 21:49 Xorg does not work on sparc32 in 2.6 (except on cg14) Tom 'spot' Callaway
@ 2005-02-04 22:40 ` Tom 'spot' Callaway
  2005-02-05  1:15 ` William Lee Irwin III
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tom 'spot' Callaway @ 2005-02-04 22:40 UTC (permalink / raw)
  To: sparclinux

Resending, since I think Evolution ate it. Apologies if this shows up twice.

With a working pte_read, and VMALLOC_START set sanely, the next major
bug that Aurora users have noticed is that Xorg does not work on sparc32
hardware running 2.6, with one exception: Bob Breuer has been able to
get the cg14 to work.

My SS20 with a CG6 (TGX+) works fine in 2.4. When I attempt to run Xorg
in 2.6 (specifically, 2.6.11-rc2-bk3), the Xorg.0.log claims that it is
running, but the kernel has actually oopsed:

kernel BUG at arch/sparc/mm/srmmu.c:140!
              \|/ ____ \|/
              "@'/ ,. \`@"
              /_| \__/ |_\
                 \__U_/
Xorg(2681): Kernel bad trap [#1]
PSR: 404010c2 PC: f001d8c4 NPC: f001d8c8 Y: 00000000    Not tainted
PC: <srmmu_pte_pfn+0x24/0x30>
%G: 0000008c 404010e1  f01fd40c f0ab1e5c  f002be4c 00000008  f215e000
00000000
%O: 00000029 f01d43e8  0000008c 00000020  00000060 f00f33a0  f215fd18
f001d8bc
RPC: <srmmu_pte_pfn+0x1c/0x30>
%L: f215fd38 f3ea0d4c  f0288c00 00000000  f30fea2c f30f9b9c  00100100
00200200
%I: e2070026 00000ec0  503b0000 f002e938  00000060 f00f33a0  f215fd80
f0061974
Caller[f0061974]: copy_page_range+0x2fc/0x47c
Caller[f002e9f4]: copy_process+0x5b4/0xdd0
Caller[f002f2cc]: do_fork+0x4c/0x1d0
Caller[f0011120]: syscall_is_too_hard+0x34/0x40
Caller[501c835c]: 0x501c835c
Instruction DUMP: 901223e8  7fffd23c  9210208c <91d02005> 81c7e008
81e80000  9de3bf98  c4060000  033c0000

This is being triggered with the BUG() in this function in
arch/sparc/mm/srmmu.c:

static unsigned long srmmu_pte_pfn(pte_t pte)
{
        if (srmmu_device_memory(pte_val(pte))) {
                /* XXX Anton obviously had something in mind when he did
this.
                 * But what?
                 */
                /* return (struct page *)~0; */
                BUG();
        }
        return (pte_val(pte) & SRMMU_PTE_PMASK) >> (PAGE_SHIFT-4);
}

This is being BTFIXEDUP to pte_pfn. 

Removing the if (srmmu_device_memory(pte_val(pte))) check stops the
oops, but it doesn't make X work. The screen goes blank, but the X
session never appears.

I've got a couple of other framebuffer SBUS cards that I plan on
testing, but the only success report I have is from Bob's cg14. 

So, does anyone know whats happening here? Why would the cg14 work when
a cg6 does not? This isn't an Xorg config file error, as far as Xorg is
concerned, the X session is running, twm is in the ps tree, and an xterm
is open. The monitor is a stock Sun 15 inch, no special cabling.

Any and all help is appreciated.

~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE 
Red Hat Sales Engineer || Aurora Linux Project Leader

"If you are going through hell, keep going."
-- Sir Winston Churchill


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Xorg does not work on sparc32 in 2.6 (except on cg14)
  2005-02-04 21:49 Xorg does not work on sparc32 in 2.6 (except on cg14) Tom 'spot' Callaway
  2005-02-04 22:40 ` Tom 'spot' Callaway
@ 2005-02-05  1:15 ` William Lee Irwin III
  2005-02-05  3:19 ` Tom 'spot' Callaway
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: William Lee Irwin III @ 2005-02-05  1:15 UTC (permalink / raw)
  To: sparclinux

On Fri, Feb 04, 2005 at 04:40:27PM -0600, Tom 'spot' Callaway wrote:
> Resending, since I think Evolution ate it. Apologies if this shows up twice.
> With a working pte_read, and VMALLOC_START set sanely, the next major
> bug that Aurora users have noticed is that Xorg does not work on sparc32
> hardware running 2.6, with one exception: Bob Breuer has been able to
> get the cg14 to work.
> My SS20 with a CG6 (TGX+) works fine in 2.4. When I attempt to run Xorg
> in 2.6 (specifically, 2.6.11-rc2-bk3), the Xorg.0.log claims that it is
> running, but the kernel has actually oopsed:
> kernel BUG at arch/sparc/mm/srmmu.c:140!

How much do the vmalloc_start patches fix here?


-- wli

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Xorg does not work on sparc32 in 2.6 (except on cg14)
  2005-02-04 21:49 Xorg does not work on sparc32 in 2.6 (except on cg14) Tom 'spot' Callaway
  2005-02-04 22:40 ` Tom 'spot' Callaway
  2005-02-05  1:15 ` William Lee Irwin III
@ 2005-02-05  3:19 ` Tom 'spot' Callaway
  2005-02-05  6:06 ` David S. Miller
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tom 'spot' Callaway @ 2005-02-05  3:19 UTC (permalink / raw)
  To: sparclinux

On Fri, 2005-02-04 at 17:15 -0800, William Lee Irwin III wrote:
> On Fri, Feb 04, 2005 at 04:40:27PM -0600, Tom 'spot' Callaway wrote:
> > Resending, since I think Evolution ate it. Apologies if this shows up twice.
> > With a working pte_read, and VMALLOC_START set sanely, the next major
> > bug that Aurora users have noticed is that Xorg does not work on sparc32
> > hardware running 2.6, with one exception: Bob Breuer has been able to
> > get the cg14 to work.
> > My SS20 with a CG6 (TGX+) works fine in 2.4. When I attempt to run Xorg
> > in 2.6 (specifically, 2.6.11-rc2-bk3), the Xorg.0.log claims that it is
> > running, but the kernel has actually oopsed:
> > kernel BUG at arch/sparc/mm/srmmu.c:140!
> 
> How much do the vmalloc_start patches fix here?

The vmalloc_start patches don't affect this problem at all. The results
are identical in all of the cases:

- VMALLOC_START at 0xfe600000
- VMALLOC_START reset to 0xfe300000
- VMALLOC_START set to vmalloc_start_addr (which gets set to 0xfe300000
on sun4m, and 0xfe600000 on sun4/sun4c) as in the patch I sent to the
list today.

~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE 
Red Hat Sales Engineer || Aurora Linux Project Leader

"If you are going through hell, keep going."
-- Sir Winston Churchill


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Xorg does not work on sparc32 in 2.6 (except on cg14)
  2005-02-04 21:49 Xorg does not work on sparc32 in 2.6 (except on cg14) Tom 'spot' Callaway
                   ` (2 preceding siblings ...)
  2005-02-05  3:19 ` Tom 'spot' Callaway
@ 2005-02-05  6:06 ` David S. Miller
  2005-02-05 16:25 ` Tom 'spot' Callaway
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2005-02-05  6:06 UTC (permalink / raw)
  To: sparclinux

On Fri, 04 Feb 2005 16:40:27 -0600
"Tom 'spot' Callaway" <tcallawa@redhat.com> wrote:

> My SS20 with a CG6 (TGX+) works fine in 2.4. When I attempt to run Xorg
> in 2.6 (specifically, 2.6.11-rc2-bk3), the Xorg.0.log claims that it is
> running, but the kernel has actually oopsed:

> Removing the if (srmmu_device_memory(pte_val(pte))) check stops the
> oops, but it doesn't make X work. The screen goes blank, but the X
> session never appears.

Remove the BUG() instead, and let it return ~0.  That makes it
so that copy_page_range() just copies device ptes over instead
of trying to lookup pages and stuff using the pfn.  The idea is
to return a bogus pfn so that pfn_valid() on it fails.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Xorg does not work on sparc32 in 2.6 (except on cg14)
  2005-02-04 21:49 Xorg does not work on sparc32 in 2.6 (except on cg14) Tom 'spot' Callaway
                   ` (3 preceding siblings ...)
  2005-02-05  6:06 ` David S. Miller
@ 2005-02-05 16:25 ` Tom 'spot' Callaway
  2005-02-08 16:42 ` Georg Chini
  2005-02-08 16:58 ` Tom 'spot' Callaway
  6 siblings, 0 replies; 8+ messages in thread
From: Tom 'spot' Callaway @ 2005-02-05 16:25 UTC (permalink / raw)
  To: sparclinux

[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]

On Fri, 2005-02-04 at 22:06 -0800, David S. Miller wrote:
> On Fri, 04 Feb 2005 16:40:27 -0600
> "Tom 'spot' Callaway" <tcallawa@redhat.com> wrote:
> 
> > My SS20 with a CG6 (TGX+) works fine in 2.4. When I attempt to run Xorg
> > in 2.6 (specifically, 2.6.11-rc2-bk3), the Xorg.0.log claims that it is
> > running, but the kernel has actually oopsed:
> 
> > Removing the if (srmmu_device_memory(pte_val(pte))) check stops the
> > oops, but it doesn't make X work. The screen goes blank, but the X
> > session never appears.
> 
> Remove the BUG() instead, and let it return ~0.  That makes it
> so that copy_page_range() just copies device ptes over instead
> of trying to lookup pages and stuff using the pfn.  The idea is
> to return a bogus pfn so that pfn_valid() on it fails.

Patch attached which does this... however, it does not fix Xorg, it
simply stops the oops. Also confirmed that a cg3 doesn't work any better
than a cg6. Any other ideas?

Signed-off-by: Tom 'spot' Callaway <tcallawa@redhat.com>

~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE 
Red Hat Sales Engineer || Aurora Linux Project Leader

"If you are going through hell, keep going."
-- Sir Winston Churchill

[-- Attachment #2: linux-2.6.10-sparc-pte_pfnfix.patch --]
[-- Type: text/x-patch, Size: 484 bytes --]

--- linux-2.6.10/arch/sparc/mm/srmmu.c.BAD	2005-02-05 09:30:14.238512182 -0500
+++ linux-2.6.10/arch/sparc/mm/srmmu.c	2005-02-05 09:30:50.177048694 -0500
@@ -133,11 +133,7 @@
 static unsigned long srmmu_pte_pfn(pte_t pte)
 {
 	if (srmmu_device_memory(pte_val(pte))) {
-		/* XXX Anton obviously had something in mind when he did this.
-		 * But what?
-		 */
-		/* return (struct page *)~0; */
-		BUG();
+		return ~0;
 	}
 	return (pte_val(pte) & SRMMU_PTE_PMASK) >> (PAGE_SHIFT-4);
 }

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Xorg does not work on sparc32 in 2.6 (except on cg14)
  2005-02-04 21:49 Xorg does not work on sparc32 in 2.6 (except on cg14) Tom 'spot' Callaway
                   ` (4 preceding siblings ...)
  2005-02-05 16:25 ` Tom 'spot' Callaway
@ 2005-02-08 16:42 ` Georg Chini
  2005-02-08 16:58 ` Tom 'spot' Callaway
  6 siblings, 0 replies; 8+ messages in thread
From: Georg Chini @ 2005-02-08 16:42 UTC (permalink / raw)
  To: sparclinux

Tom 'spot' Callaway wrote:

> This is being BTFIXEDUP to pte_pfn. 
> 
> Removing the if (srmmu_device_memory(pte_val(pte))) check stops the
> oops, but it doesn't make X work. The screen goes blank, but the X
> session never appears.
> 

Hi,

maybe this is an error in the driver for TGX. My SS5 has a TCX card and
I had the same problem (screen blank but no X visible). Some other drivers
showed the problem too. As I am no kernel programmer, I sent something that
makes it work for me (but no real patch) in December. I think it didn't
make it into the kernel yet. Perhaps your problem is similar.
Have a look at the archive, just search for TCX. Hope this helps.

Regards
        Georg


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Xorg does not work on sparc32 in 2.6 (except on cg14)
  2005-02-04 21:49 Xorg does not work on sparc32 in 2.6 (except on cg14) Tom 'spot' Callaway
                   ` (5 preceding siblings ...)
  2005-02-08 16:42 ` Georg Chini
@ 2005-02-08 16:58 ` Tom 'spot' Callaway
  6 siblings, 0 replies; 8+ messages in thread
From: Tom 'spot' Callaway @ 2005-02-08 16:58 UTC (permalink / raw)
  To: sparclinux

On Tue, 2005-02-08 at 17:42 +0100, Georg Chini wrote:

> maybe this is an error in the driver for TGX. My SS5 has a TCX card and
> I had the same problem (screen blank but no X visible).

I've already got your fix applied, it doesn't look to be related. With a
similar patch, I can make the cg3 output the framebuffer fine, but not
X.

~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE 
Red Hat Sales Engineer || Aurora Linux Project Leader

"If you are going through hell, keep going."
-- Sir Winston Churchill


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-02-08 16:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-04 21:49 Xorg does not work on sparc32 in 2.6 (except on cg14) Tom 'spot' Callaway
2005-02-04 22:40 ` Tom 'spot' Callaway
2005-02-05  1:15 ` William Lee Irwin III
2005-02-05  3:19 ` Tom 'spot' Callaway
2005-02-05  6:06 ` David S. Miller
2005-02-05 16:25 ` Tom 'spot' Callaway
2005-02-08 16:42 ` Georg Chini
2005-02-08 16:58 ` Tom 'spot' Callaway

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.