Re: [Bugme-new] [Bug 8232] New: Creator3D Framebuffer (sparc64) on Sbus/UPA workstation

2007-03-26 Thread BERTRAND Joël

David Miller a écrit :

From: Andrew Morton <[EMAIL PROTECTED]>
Date: Mon, 19 Mar 2007 03:34:25 -0800


On Mon, 19 Mar 2007 03:19:31 -0700 [EMAIL PROTECTED] wrote:


http://bugzilla.kernel.org/show_bug.cgi?id=8232

   Summary: Creator3D Framebuffer (sparc64) on Sbus/UPA workstation
Kernel Version: ALL 2.6
Status: NEW
  Severity: normal
 Owner: [EMAIL PROTECTED]
 Submitter: [EMAIL PROTECTED]


Most recent kernel where this bug did *NOT* occur: 2.4.34.1
Distribution: Debian/testing
Hardware Environment: U1E/170 with Creator3D (UPA), U2 with creator3D
Software Environment: debian without X on U1E, debian with Xorg on U2
Problem Description: Console is white foreground and blanck background by
default. Sometimes, the screen is cut like this :

N | N | N | N
--+---+---+---
N | G | G | G
--+---+---+---
N | W | W | W
--+---+---+---
N | G | G | G


where N is a 'normal' console, 'G' a 'like grey' console (black and white pixels
like snow), and 'W' a white console (many white pixels). I have tested some
differents Creator3D fb and this trouble only occurs on Sbus/UPA workstation. On
a U60 (PCI/UPA), I never see it.

When I launch Xorg, problem goes away.


A quick audit found that we're using the ->dac_rev value before
setting it properly.  One difference between the older creator
cards and the newer ones is the DAC, so perhaps this was the
bug.

Can you test the following patch?  Thanks.  I'll fire up some of
my older systems to see if I can reproduce this one.

commit 2c4f1add7dd2747cd79c220c24e1dbc3dc4a315f
Author: David S. Miller <[EMAIL PROTECTED]>
Date:   Mon Mar 26 16:10:52 2007 -0700

[FFB]: Initialize dac_rev before using it.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>


diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index 15854ae..3c01f45 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -948,8 +948,9 @@ static int ffb_init_one(struct of_device *op)
if ((upa_readl(&fbc->ucsr) & FFB_UCSR_ALL_ERRORS) != 0)
upa_writel(FFB_UCSR_ALL_ERRORS, &fbc->ucsr);
 
-	ffb_switch_from_graph(&all->par);

-
+   /* Determine the DAC revision, we must do this before calling
+* ffb_switch_from_graph().
+*/
dac = all->par.dac;
upa_writel(0x8000, &dac->type);
all->par.dac_rev = upa_readl(&dac->value) >> 0x1c;
@@ -960,6 +961,8 @@ static int ffb_init_one(struct of_device *op)
if (all->par.flags & FFB_FLAG_AFB)
all->par.dac_rev = 10;
 
+	ffb_switch_from_graph(&all->par);

+
/* Unblank it just to be sure.  When there are multiple
 * FFB/AFB cards in the system, or it is not the OBP
 * chosen console, it will have video outputs off in


	Thanks for your work, David. Unfortunately, I cannot test this patch 
because my U2 randomly freeze... Any news about this bug ?


Regards,

JKB
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2.6.21-rc5] sparc64: gcc-4.2.0 20070317 -Werror failure

2007-03-26 Thread Mikael Pettersson
Compiling 2.6.21-rc5 with gcc-4.2.0 20070317 (prerelease)
for sparc64 fails as follows:

  gcc -Wp,-MD,arch/sparc64/kernel/.time.o.d  -nostdinc -isystem 
/home/mikpe/pkgs/linux-sparc64/gcc-4.2.0/lib/gcc/sparc64-unknown-linux-gnu/4.2.0/include
 -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Wall -Wundef 
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Os -m64 
-pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -ffixed-g5 
-fcall-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -fomit-frame-pointer  
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -Werror   
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(time)"  
-D"KBUILD_MODNAME=KBUILD_STR(time)" -c -o arch/sparc64/kernel/time.o 
arch/sparc64/kernel/time.c
cc1: warnings being treated as errors
arch/sparc64/kernel/time.c: In function 'kick_start_clock':
arch/sparc64/kernel/time.c:559: warning: overflow in implicit constant 
conversion
make[1]: *** [arch/sparc64/kernel/time.o] Error 1
make: *** [arch/sparc64/kernel] Error 2

gcc gets unhappy when the MSTK_SET macro's u8 __val variable
is updated with &= ~0xff (MSTK_YEAR_MASK). Making the constant
unsigned fixes the problem.

Signed-off-by: Mikael Pettersson <[EMAIL PROTECTED]>

--- linux-2.6.21-rc5/include/asm-sparc64/mostek.h.~1~   2007-02-04 
19:44:54.0 +0100
+++ linux-2.6.21-rc5/include/asm-sparc64/mostek.h   2007-03-26 
20:43:21.0 +0200
@@ -89,7 +89,7 @@ extern void __iomem *mstk48t02_regs;
 #defineMSTK_DOW_MASK   0x07
 #defineMSTK_DOM_MASK   0x3f
 #defineMSTK_MONTH_MASK 0x1f
-#defineMSTK_YEAR_MASK  0xff
+#defineMSTK_YEAR_MASK  0xffU
 
 /* Binary coded decimal conversion macros. */
 #define MSTK_REGVAL_TO_DECIMAL(x)  (((x) & 0x0F) + 0x0A * ((x) >> 0x04))
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] fix sparc32 SMP build regression

2007-03-26 Thread David Miller
From: Robert Reif <[EMAIL PROTECTED]>
Date: 26 Mar 2007 22:03:10 -0400

> commit b19cbe2a1695c09c74f83646c4b82b51123b3690 [BRIDGE]: Fix fdb RCU
> race
> 
> breaks sparc SMP build because atomic_add_unless is not exported.
> 
> This patch exports atomic_add_unless and atomic_cmpxchg.
> 
> Compile tested only.
> 
> Signed-off-by: Robert Reif <[EMAIL PROTECTED]>

Applied, thanks Robert.
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] fix sparc32 SMP build regression

2007-03-26 Thread Robert Reif
commit b19cbe2a1695c09c74f83646c4b82b51123b3690 [BRIDGE]: Fix fdb RCU
race

breaks sparc SMP build because atomic_add_unless is not exported.

This patch exports atomic_add_unless and atomic_cmpxchg.

Compile tested only.

Signed-off-by: Robert Reif <[EMAIL PROTECTED]>

diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c
index 53ddcd9..559335f 100644
--- a/arch/sparc/lib/atomic32.c
+++ b/arch/sparc/lib/atomic32.c
@@ -52,6 +52,7 @@ int atomic_cmpxchg(atomic_t *v, int old,
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
return ret;
 }
+EXPORT_SYMBOL(atomic_cmpxchg);
 
 int atomic_add_unless(atomic_t *v, int a, int u)
 {
@@ -65,6 +66,7 @@ int atomic_add_unless(atomic_t *v, int a
spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
return ret != u;
 }
+EXPORT_SYMBOL(atomic_add_unless);
 
 /* Atomic operations are already serializing */
 void atomic_set(atomic_t *v, int i)



-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Bugme-new] [Bug 8232] New: Creator3D Framebuffer (sparc64) on Sbus/UPA workstation

2007-03-26 Thread David Miller
From: Andrew Morton <[EMAIL PROTECTED]>
Date: Mon, 19 Mar 2007 03:34:25 -0800

> On Mon, 19 Mar 2007 03:19:31 -0700 [EMAIL PROTECTED] wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=8232
> > 
> >Summary: Creator3D Framebuffer (sparc64) on Sbus/UPA workstation
> > Kernel Version: ALL 2.6
> > Status: NEW
> >   Severity: normal
> >  Owner: [EMAIL PROTECTED]
> >  Submitter: [EMAIL PROTECTED]
> > 
> > 
> > Most recent kernel where this bug did *NOT* occur: 2.4.34.1
> > Distribution: Debian/testing
> > Hardware Environment: U1E/170 with Creator3D (UPA), U2 with creator3D
> > Software Environment: debian without X on U1E, debian with Xorg on U2
> > Problem Description: Console is white foreground and blanck background by
> > default. Sometimes, the screen is cut like this :
> > 
> > N | N | N | N
> > --+---+---+---
> > N | G | G | G
> > --+---+---+---
> > N | W | W | W
> > --+---+---+---
> > N | G | G | G
> > 
> > 
> > where N is a 'normal' console, 'G' a 'like grey' console (black and white 
> > pixels
> > like snow), and 'W' a white console (many white pixels). I have tested some
> > differents Creator3D fb and this trouble only occurs on Sbus/UPA 
> > workstation. On
> > a U60 (PCI/UPA), I never see it.
> > 
> > When I launch Xorg, problem goes away.

A quick audit found that we're using the ->dac_rev value before
setting it properly.  One difference between the older creator
cards and the newer ones is the DAC, so perhaps this was the
bug.

Can you test the following patch?  Thanks.  I'll fire up some of
my older systems to see if I can reproduce this one.

commit 2c4f1add7dd2747cd79c220c24e1dbc3dc4a315f
Author: David S. Miller <[EMAIL PROTECTED]>
Date:   Mon Mar 26 16:10:52 2007 -0700

[FFB]: Initialize dac_rev before using it.

Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index 15854ae..3c01f45 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -948,8 +948,9 @@ static int ffb_init_one(struct of_device *op)
if ((upa_readl(&fbc->ucsr) & FFB_UCSR_ALL_ERRORS) != 0)
upa_writel(FFB_UCSR_ALL_ERRORS, &fbc->ucsr);
 
-   ffb_switch_from_graph(&all->par);
-
+   /* Determine the DAC revision, we must do this before calling
+* ffb_switch_from_graph().
+*/
dac = all->par.dac;
upa_writel(0x8000, &dac->type);
all->par.dac_rev = upa_readl(&dac->value) >> 0x1c;
@@ -960,6 +961,8 @@ static int ffb_init_one(struct of_device *op)
if (all->par.flags & FFB_FLAG_AFB)
all->par.dac_rev = 10;
 
+   ffb_switch_from_graph(&all->par);
+
/* Unblank it just to be sure.  When there are multiple
 * FFB/AFB cards in the system, or it is not the OBP
 * chosen console, it will have video outputs off in
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


More sparc32 esp failures

2007-03-26 Thread Tom \"spot\" Callaway
This one doesn't even have a CDROM.
SPARCstation 4, No Keyboard
ROM Rev. 2.24, 160 MB memory installed

sd 0:0:3:0: Attached scsi disk sda
esp0: Aborting command
esp0: dumping state
esp0: dma -- cond_reg addr
esp0: SW [sreg<11> sstep<04> ireg<18>]
esp0: HW reread [sreg<01> sstep ireg<00>]
esp0: current command [tgt<03> lun<01> pphase cphase]
esp0: disconnected
esp0: Aborting command
esp0: dumping state
esp0: dma -- cond_reg addr
esp0: SW [sreg<11> sstep<04> ireg<18>]
esp0: HW reread [sreg<01> sstep ireg<00>]
esp0: current command [tgt<03> lun<01> pphase
cphase]
esp0: disconnected
esp0: Resetting scsi bus
esp0: Gross error sreg=40
esp0: SCSI bus reset interrupt
esp0: DMA error a440030e
esp0: Resetting scsi bus
esp0: SCSI bus reset interrupt
kernel BUG at arch/sparc/mm/iommu.c:298!
  \|/  \|/
  "@'/ ,. \`@"
  /_| \__/ |_\
 \__U_/
swapper(0): Kernel bad trap [#1]
PSR: 04401fc3 PC: f001f2d0 NPC: f001f2d4 Y: Not tainted
PC: 
%G: f00dbf5c 044010e2  0001 04401fe1  f002fe54 f0239948  f000e000

%O: 002c f01d1b00  012a f000fbac  f00dbf5c   f000fa28
f001f2c8
RPC: 
%L: 04401fc4 f00307b0  f00307dc 0040  0080   f000e000
f00110ec
%I: 21212000 0001  0001 f023d800  f0239800 f0239800  f000fa90
f001f340
Caller[f001f340]: iommu_release_scsi_sgl+0x2c/0x54
Caller[fe683388]: esp_finish_reset+0x20/0xb4 [esp]
Caller[fe68588c]: esp_intr+0x2dc/0x328 [esp]
Caller[f0012d54]: handler_irq+0x90/0xdc
Caller[f0010830]: patch_handler_irq+0x8/0x24
Caller[f0035038]: __do_softirq+0x28/0xc0
Caller[f0035110]: do_softirq+0x40/0x50
Caller[f0012d90]: handler_irq+0xcc/0xdc
Caller[f0010830]: patch_handler_irq+0x8/0x24
Caller[f00146f8]: cpu_idle+0xc0/0xfc
Caller[f02101e4]: _etext+0x6cda4/0x6dbb8
Caller[f020f790]: _etext+0x6c350/0x6dbb8
Caller[]: 0x8
Instruction DUMP: 9210212a  7fffcc20  90122300 <91d02005> 82260001
8a102000  b330600c  1089  872e6002
Kernel panic - not syncing: Aiee, killing interrupt handler!
Press Stop-A (L1-A) to return to the boot prom
BUG: warning at kernel/panic.c:137/panic() (Not tainted)
[f001250c : die_if_kernel+0x118/0x11c ] [f0012610 : do_hw_interrupt
+0x50/0x8c ] [f00107ec : bad_trap_handler+0x28/0x30 ] [f001f2c8 :
iommu_release_one+0x28/0x74 ] [f001f340 : iommu_release_scsi_sgl
+0x2c/0x54 ] [fe683388 : esp_finish_reset+0x20/0xb4 [esp] ] [fe68588c :
esp_intr+0x2dc/0x328 [esp] ] [f0012d54 : handler_irq+0x90/0xdc ]
[f0010830 : patch_handler_irq+0x8/0x24 ] [f0035038 : __do_softirq
+0x28/0xc0 ] [f0035110 : do_softirq+0x40/0x50 ] [f0012d90 : handler_irq
+0xcc/0xdc ] [f0010830 : patch_handler_irq+0x8/0x24 ] [f00146f8 :
cpu_idle+0xc0/0xfc ] [f02101e4 : _etext+0x6cda4/0x6dbb8 ] [f020f790 :
_etext+0x6c350/0x6dbb8 ]

This is only triggered when CONFIG_SCSI_MULTI_LUN=y.


-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html