mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "S.Çağlar Onur" <caglar@pardus.org.tr>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Thomas Mingarelli <Thomas.Mingarelli@hp.com>
Subject: Re: [WATCHDOG] v2.6.26 hpwdt.c fixes
Date: Thu, 19 Jun 2008 00:58:28 +0300	[thread overview]
Message-ID: <200806190058.29330.caglar@pardus.org.tr> (raw)
In-Reply-To: <alpine.LFD.1.10.0806181256010.2907@woody.linux-foundation.org>

Hi Linus;

18 Haz 2008 Çar tarihinde, Linus Torvalds şunları yazmıştı: 
> 
> On Wed, 18 Jun 2008, Wim Van Sebroeck wrote:
> > 
> >     Revert "[WATCHDOG] hpwdt: Fix NMI handling."
> >     
> >     To get this driver working we need the CFLAGS_hpwdt.o += -O in the Makefile.
> >
> >     The driver needs the asmlinkage tag and the CFLAGS line in the Makefile.
> >     Without it the driver doesn't work.
> 
> The driver is unbelievable shit, and should just be removed, I think.
> 
> The reason for all the games with CFLAGS and asmlinkage and utter crud 
> seems to be that the driver is just BROKEN. It will work purely by luck, 
> and depend entirely on the compiler not doing anything else AT ALL in that 
> asm function.
> 
> Could somebody please just fix the piece-of-sh*t thing?
> 
> Here's a totally untested patch that may or may not work. At least it 
> removes the assembler code that assumes that it controls the whole 
> function from anything that gcc will then create a function prologue and 
> epilogue for. Quite frankly, this is *not* the right thing to do either: 
> the proper thing to do is to just move the low-level call into the "asm" 
> statement, and leave all the function prologue/epilogue entirely to the 
> compiler.
> 
> But this way it isn't actively _broken_ by design, at least.
> 
> No promises. I don't have the hardware. But somebody should *really* do 
> this correctly.


I have both the hardware and the compiler related (gcc-4.3.1) bug :) (see [1])

Your modifications works like a charm with 32bit 2.6.25.7, kernel no longer opps and watchdog lives happily with hardware.

[...]
hpwdt: New timer passed in is 30 seconds.
hpwdt: CRU Base Address:   0xfff6b800
hpwdt: CRU Offset Address: 0x0
hpwdt: CRU Length:         0x8000
hpwdt: CRU Mapped Address: 0xf885bfa8
hp Watchdog Timer Driver: 1.00, timer margin: 30 seconds( nowayout=0).
[...]
 
> 		Linus
> 
> ---
>  drivers/watchdog/hpwdt.c |  155 ++++++++++++++++++++++++----------------------
>  1 files changed, 80 insertions(+), 75 deletions(-)

If needed 

Tested-by: S.Çağlar Onur <caglar@pardus.org.tr>

Thanks!

[1] http://marc.info/?l=linux-kernel&m=121266952602497&w=2
-- 
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

  parent reply	other threads:[~2008-06-18 21:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-18 19:49 Wim Van Sebroeck
2008-06-18 20:09 ` Linus Torvalds
2008-06-18 20:30   ` Linus Torvalds
2008-06-19 14:58     ` Mingarelli, Thomas
2008-06-19 19:38     ` Mingarelli, Thomas
2008-06-18 21:58   ` S.Çağlar Onur [this message]
2008-06-18 22:03     ` Mingarelli, Thomas
2008-06-18 22:08       ` S.Çağlar Onur
2008-06-20 19:05   ` Dave Jones
2008-06-20 19:30     ` Linus Torvalds
2008-06-20 20:40       ` Mingarelli, Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200806190058.29330.caglar@pardus.org.tr \
    --to=caglar@pardus.org.tr \
    --cc=Thomas.Mingarelli@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome