linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: CS5536 Spurious Interrupt Problem on Loongson2
@ 2019-02-22 20:22 Alexandre Oliva
  2019-02-23  1:56 ` Tom Li
  0 siblings, 1 reply; 7+ messages in thread
From: Alexandre Oliva @ 2019-02-22 20:22 UTC (permalink / raw)
  To: Tom Li
  Cc: Aaro Koskinen, James Hogan, Jiaxun Yang, Huacai Chen,
	Ralf Baechle, linux-mips

On Feb 22, 2019, Tom Li <tomli@tomli.me> wrote:

> I meant the already-identified and fixed reboot/shutdown problem, not the
> CS3356 spurious interrupt problem.

Aha.

> To be honest, I don't understand why the libata driver can even be a problem
> at all. To add some background information,  I started using the libata driver
> since 2014, and to this day, I NEVER encountered any problem with it.

I have had occasional IRQ 14 issues over the years, but they were not
common, and they'd hit while using the system.  After 4.20, they seem to
deterministically hit very early during boot-up.

> Therefore, I'm suspicious that this problem is related to a specific firmware/
> hardware revision

That's possible.  Another possibility is that it is related with the
hard drive models connected to the controller.  What suggested this to
me was the quirks code in the old, non-libata driver, that recognized
specific hard drive models, one of which matches the drive I have on my
yeeloong.

$ hdparm -i /dev/sda
[...]
 Model=FUJITSU MHZ2160BH G2, FwRev=00000009, SerialNo=[...]


> $ cat /proc/cmdline

I don't have the PMON or EC versions in /proc/cmdline.  machtype is the same.

'vers' in the pmon text prompt responds: PMON2000 2.1 (Bonito) #291

> $ cat /proc/interrupts 

Differences (running 4.19) are IRQ 5, and USBs on 11 (XT) and 39 (bonito).

> (P.S: Interrupt 10, sci, is the platform driver I'm developing, just ignore it)

Err, should I be worried that I have that too?

-- 
Alexandre Oliva, freedom fighter   https://FSFLA.org/blogs/lxo
Be the change, be Free!         FSF Latin America board member
GNU Toolchain Engineer                Free Software Evangelist
Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

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

* Re: CS5536 Spurious Interrupt Problem on Loongson2
  2019-02-22 20:22 CS5536 Spurious Interrupt Problem on Loongson2 Alexandre Oliva
@ 2019-02-23  1:56 ` Tom Li
  2019-02-23  6:08   ` Jiaxun Yang
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Li @ 2019-02-23  1:56 UTC (permalink / raw)
  To: Alexandre Oliva, Aaro Koskinen
  Cc: James Hogan, Jiaxun Yang, Huacai Chen, Ralf Baechle, linux-mips, Tom Li

On Fri, Feb 22, 2019 at 09:43:43PM +0200, Aaro Koskinen wrote:
> Mini-PC does not have any EC. PMON is:
> Version: PMON2000 2.1 (Bonito) #121: Mon Jan  5 14:19:11 CST 2009.

On Fri, Feb 22, 2019 at 05:22:15PM -0300, Alexandre Oliva wrote:
> I don't have the PMON or EC versions in /proc/cmdline.  machtype is the same.
> 'vers' in the pmon text prompt responds: PMON2000 2.1 (Bonito) #291

Okay, so the problem is presented on both Yeeloong laptops and MiniPCs, and
it seems both you are running some old PMON versions. The new PMON should
report the PMON and/or EC versions versions in /proc/cmdline. 

The version I'm using is
> PMON: PMON2000 2.1 (Bonito) #7: 2010-08-31 01:26:26 (LM8089-1.4.9a)

I'll attempt to reproduce and investigate the problem after finishing the
initial pushes of Yeeloong platform drivers.

However, there are some difficulties.

* I don't have the MiniPC. Loongson 2F hardware is now completely unsupported,
and almost impossible to purchase one.

* Early PMON source was not released under a version-control system, and now it's
difficult to find both the source code and the binary for those earlier versions.

* PMON upgrading is notoriously unreliable, unless the binary image is completely
tested by someone with the identical setup, the result is likely a bricked machine.
I don't recommend you to upgrade the firmware, unless you've got the on-field support
of hardware hackers with soldering equipment and a EEPROM programmer.

I'll try asking online if anyone still has the old hardware lying around, and
check the corpse of those dead and buried threads posted on the Chinese fourm
ten years ago, to see if there's still some binary images.

Thanks,
Tom Li

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

* Re: CS5536 Spurious Interrupt Problem on Loongson2
  2019-02-23  1:56 ` Tom Li
@ 2019-02-23  6:08   ` Jiaxun Yang
  2019-02-23 15:30     ` Aaro Koskinen
  2019-02-24  4:55     ` Alexandre Oliva
  0 siblings, 2 replies; 7+ messages in thread
From: Jiaxun Yang @ 2019-02-23  6:08 UTC (permalink / raw)
  To: Tom Li, Alexandre Oliva, Aaro Koskinen
  Cc: James Hogan, Huacai Chen, Ralf Baechle, linux-mips


在 2019/2/23 9:56, Tom Li 写道:
> On Fri, Feb 22, 2019 at 09:43:43PM +0200, Aaro Koskinen wrote:
>> Mini-PC does not have any EC. PMON is:
>> Version: PMON2000 2.1 (Bonito) #121: Mon Jan  5 14:19:11 CST 2009.

Check "env" variables in PMON shell. There night be some information 
such as version or build date.

> On Fri, Feb 22, 2019 at 05:22:15PM -0300, Alexandre Oliva wrote:
>> I don't have the PMON or EC versions in /proc/cmdline.  machtype is the same.
>> 'vers' in the pmon text prompt responds: PMON2000 2.1 (Bonito) #291
> Okay, so the problem is presented on both Yeeloong laptops and MiniPCs, and
> it seems both you are running some old PMON versions. The new PMON should
> report the PMON and/or EC versions versions in /proc/cmdline.
>
> The version I'm using is
>> PMON: PMON2000 2.1 (Bonito) #7: 2010-08-31 01:26:26 (LM8089-1.4.9a)
> I'll attempt to reproduce and investigate the problem after finishing the
> initial pushes of Yeeloong platform drivers.
>
> However, there are some difficulties.
>
> * I don't have the MiniPC. Loongson 2F hardware is now completely unsupported,
> and almost impossible to purchase one.

I have a Lemote Fuloong mini-pc, I can help with testing if you need.

The latest PMON of MiniPC is 
https://mirrors.ustc.edu.cn/loongson/install/pmon-LM60xx-1.3.6a.bin

Tested on my Fuloong 6003.

>
> * Early PMON source was not released under a version-control system, and now it's
> difficult to find both the source code and the binary for those earlier versions.

https://github.com/kisom/pmon

That's the earliest PMON source I can find.

>
> * PMON upgrading is notoriously unreliable, unless the binary image is completely
> tested by someone with the identical setup, the result is likely a bricked machine.
> I don't recommend you to upgrade the firmware, unless you've got the on-field support
> of hardware hackers with soldering equipment and a EEPROM programmer.
PMON is stored on a LPC Bus flash, for most models, the chip is placed 
on a solt so we can replace it easily. Purchase some extra chip should 
be enough.
>
> I'll try asking online if anyone still has the old hardware lying around, and
> check the corpse of those dead and buried threads posted on the Chinese fourm
> ten years ago, to see if there's still some binary images.

You can call Liu Shiwei <liushiwei@gmail.com> for help, he is familiar 
with these old Loongson-2F hardware.

>
> Thanks,
> Tom Li

-- 
--
Jiaxun Yang


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

* Re: CS5536 Spurious Interrupt Problem on Loongson2
  2019-02-23  6:08   ` Jiaxun Yang
@ 2019-02-23 15:30     ` Aaro Koskinen
  2019-02-24  4:55     ` Alexandre Oliva
  1 sibling, 0 replies; 7+ messages in thread
From: Aaro Koskinen @ 2019-02-23 15:30 UTC (permalink / raw)
  To: Jiaxun Yang
  Cc: Tom Li, Alexandre Oliva, James Hogan, Huacai Chen, Ralf Baechle,
	linux-mips

Hi,

On Sat, Feb 23, 2019 at 02:08:38PM +0800, Jiaxun Yang wrote:
> 在 2019/2/23 9:56, Tom Li 写道:
> >On Fri, Feb 22, 2019 at 09:43:43PM +0200, Aaro Koskinen wrote:
> >>Mini-PC does not have any EC. PMON is:
> >>Version: PMON2000 2.1 (Bonito) #121: Mon Jan  5 14:19:11 CST 2009.
> 
> Check "env" variables in PMON shell. There night be some information such as
> version or build date.

It has:

   Version = LM6004-1.3.2
 BuildTime = "Jan  5 2009 14:18:56"

A.

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

* Re: CS5536 Spurious Interrupt Problem on Loongson2
  2019-02-23  6:08   ` Jiaxun Yang
  2019-02-23 15:30     ` Aaro Koskinen
@ 2019-02-24  4:55     ` Alexandre Oliva
  1 sibling, 0 replies; 7+ messages in thread
From: Alexandre Oliva @ 2019-02-24  4:55 UTC (permalink / raw)
  To: Jiaxun Yang
  Cc: Tom Li, Aaro Koskinen, James Hogan, Huacai Chen, Ralf Baechle,
	linux-mips

On Feb 23, 2019, Jiaxun Yang <jiaxun.yang@flygoat.com> wrote:

> Check "env" variables in PMON shell. There night be some information
> such as version or build date.

Ah, yes, thanks.

EC PQ1D28, PMON LM8089-1.4.5 built on Aug 10, 2009.

-- 
Alexandre Oliva, freedom fighter   https://FSFLA.org/blogs/lxo
Be the change, be Free!         FSF Latin America board member
GNU Toolchain Engineer                Free Software Evangelist
Hay que enGNUrecerse, pero sin perder la terGNUra jamás-GNUChe

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

* Re: CS5536 Spurious Interrupt Problem on Loongson2
  2019-02-22 14:37 Tom Li
@ 2019-02-22 19:43 ` Aaro Koskinen
  0 siblings, 0 replies; 7+ messages in thread
From: Aaro Koskinen @ 2019-02-22 19:43 UTC (permalink / raw)
  To: Tom Li; +Cc: James Hogan, Jiaxun Yang, Huacai Chen, Ralf Baechle, linux-mips

Hi,

On Fri, Feb 22, 2019 at 10:37:11PM +0800, Tom Li wrote:
> Continue replying the original thread is off-topic and
> difficult to follow, so here I start a new thread for this problem.

The proper thread is here:
https://lore.kernel.org/linux-mips/20190106124607.GK27785@darkstar.musicnaut.iki.fi/#r

> Therefore, I'm suspicious that this problem is related to a specific firmware/
> hardware revision, or a probabilistic issue. PMON/EC version may be the first
> thing we need to confirm.
> 
> My system is,
> 
> $ cat /proc/cmdline
> PMON_VER=LM8089-1.4.9a EC_VER=PQ1D28 machtype=lemote-yeeloong-2f-8.9inches

Mini-PC does not have any EC. PMON is:
Version: PMON2000 2.1 (Bonito) #121: Mon Jan  5 14:19:11 CST 2009.

But firmware upgrade is not an option for me.

> Interrupts have no problem at all.

You should check "/proc/irq/14/spurious". Anyway, it well may be that some
machines work fine.

A.

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

* CS5536 Spurious Interrupt Problem on Loongson2
@ 2019-02-22 14:37 Tom Li
  2019-02-22 19:43 ` Aaro Koskinen
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Li @ 2019-02-22 14:37 UTC (permalink / raw)
  To: Aaro Koskinen, Tom Li
  Cc: James Hogan, Jiaxun Yang, Huacai Chen, Ralf Baechle, linux-mips

Hi all,

During the discussion of Loongson/Yeeloong driver mainlining, both
Alexandre Oliva and Aaro Koskinen reported the their Loongson machine
is being bombarded by spurious interrupt from CS5536 when using the
libata driver. Continue replying the original thread is off-topic and
difficult to follow, so here I start a new thread for this problem.

On Sun, Feb 17, 2019 at 01:59:26AM -0300, Alexandre Oliva wrote:
> Tom, why do you say bisecting this is impossible?  I realize you wrote
> you did so for 24 hours non-stop, but...  I'm curious as to what
> obstacles you ran into.  It's such a reproducible problem for me that I
> can't see how bisecting it might be difficult.
> 
> Or were by any chance you talking about the reboot/shutdown problem
> then?

I meant the already-identified and fixed reboot/shutdown problem, not the
CS3356 spurious interrupt problem.

To be honest, I don't understand why the libata driver can even be a problem
at all. To add some background information,  I started using the libata driver
since 2014, and to this day, I NEVER encountered any problem with it. And not
only me, I had a personal project - a prebuilt kernel for Yeeloong laptops,
and at least three different users had tried it. In addition, Jiaxun Yang also
who did some independent work - none of these people have reported any problem
similar to this one.

Therefore, I'm suspicious that this problem is related to a specific firmware/
hardware revision, or a probabilistic issue. PMON/EC version may be the first
thing we need to confirm.

My system is,

$ cat /proc/cmdline
PMON_VER=LM8089-1.4.9a EC_VER=PQ1D28 machtype=lemote-yeeloong-2f-8.9inches

$ cat /proc/interrupts 
           CPU0       
  1:         11    XT-PIC   1  i8042
  2:          0    XT-PIC   2  cascade
  8:          0    XT-PIC   8  rtc0
  9:          0    XT-PIC   9  snd_cs5535audio
 10:          0    XT-PIC  10  sci
 12:         87    XT-PIC  12  i8042
 14:       6418    XT-PIC  14  pata_cs5536
 18:          0      MIPS   2  cascade
 22:          0      MIPS   6  cascade
 23:     148498      MIPS   7  timer
 37:        296  bonito_irq      eth0
ERR:          0

Interrupts have no problem at all.

(P.S: Interrupt 10, sci, is the platform driver I'm developing, just ignore it)

Thus, I don't see any CS5536 interrupt problem when using the libata driver.
My first question is, what are your EC/PMON versions? can you report back?

Thanks,
Tom Li

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

end of thread, other threads:[~2019-02-24  4:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-22 20:22 CS5536 Spurious Interrupt Problem on Loongson2 Alexandre Oliva
2019-02-23  1:56 ` Tom Li
2019-02-23  6:08   ` Jiaxun Yang
2019-02-23 15:30     ` Aaro Koskinen
2019-02-24  4:55     ` Alexandre Oliva
  -- strict thread matches above, loose matches on Subject: below --
2019-02-22 14:37 Tom Li
2019-02-22 19:43 ` Aaro Koskinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).