mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
To: Greg KH <greg@kroah.com>, marcel cotta <mc123@mail.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.6.3 - Badness in pci_find_subsys at drivers/pci/search.c:167
Date: Wed, 25 Feb 2004 00:55:10 +0100	[thread overview]
Message-ID: <200402250055.10084.bzolnier@elka.pw.edu.pl> (raw)
In-Reply-To: <20040224223043.GA2455@kroah.com>

On Tuesday 24 of February 2004 23:30, Greg KH wrote:
> On Tue, Feb 24, 2004 at 05:04:55PM +0100, marcel cotta wrote:
> > i came across this while playing with hdparm
> >
> > Call Trace:
> >  [<c0264128>] pci_find_subsys+0xe8/0xf0
> >  [<c026415f>] pci_find_device+0x2f/0x40
> >  [<c02e5d89>] ide_system_bus_speed+0x69/0x90
> >  [<c02e528e>] ali15x3_tune_drive+0x1e/0x250
>
> Ugh, this is due to calling system_bus_clock() from within an interrupt.
> Is there any good reason to do this?  Can't we just cache the bus speed
> in the local device structure if we really have to do this from within
> an interrupt?

ide_init() always initializes system_bus_speed variable
so system_bus_clock() should never call ide_system_bus_speed()
and no driver is calling ide_system_bus_speed() directly.

Bug was that if no IDE kernel parameter was given during boot
system_bus_speed will be zeroed in init_ide_data().

This patch should fix the problem
(as a bonus -> no need to zero these variables they are static).

 linux-2.6.3-bk6-root/drivers/ide/ide.c |    3 ---
 1 files changed, 3 deletions(-)

diff -puN drivers/ide/ide.c~ide_bus_speed drivers/ide/ide.c
--- linux-2.6.3-bk6/drivers/ide/ide.c~ide_bus_speed	2004-02-25 00:47:39.467793088 +0100
+++ linux-2.6.3-bk6-root/drivers/ide/ide.c	2004-02-25 00:48:44.319934064 +0100
@@ -302,9 +302,6 @@ static void __init init_ide_data (void)
 	initializing = 1;
 	ide_init_default_hwifs();
 	initializing = 0;
-
-	idebus_parameter = 0;
-	system_bus_speed = 0;
 }
 
 /*

_


      reply	other threads:[~2004-02-24 23:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-24 16:04 marcel cotta
2004-02-24 22:30 ` Greg KH
2004-02-24 23:55   ` Bartlomiej Zolnierkiewicz [this message]

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=200402250055.10084.bzolnier@elka.pw.edu.pl \
    --to=b.zolnierkiewicz@elka.pw.edu.pl \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mc123@mail.ru \
    /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

all inboxes | Powered by JetHome®