Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "Bryan Althouse" <bryan.althouse@3phoenix.com>
To: <unlisted-recipients:>, <no To-header on input>,
	"IMB Recipient 1" <mspop3connector.david.sanchez@lexbox.fr>
Cc: <linux-mips@linux-mips.org>
Subject: RE: custom ide driver causes "Badness in smp_call_function"
Date: Fri, 26 Aug 2005 20:16:09 +0200	[thread overview]
Message-ID: <000501c5aa6a$3beadc30$0300a8c0@intra.lexbox.org> (raw)
In-Reply-To: <1125071244.7298.2.camel@localhost.localdomain>

Alan,

Thanks for your suggestion.
I'm not sure how to write a .fixup handler.  I did some Googling, but got
nowhere.  I looked through drivers/ide to see what drive->unmask was doing.
I found this in ide-io.c:
     if (drive->unmask)
          local_irq_enable();
And this in ide-taskfile.c:
     if (!drive->unmask)
          local_irq_disable();
I modified both of these files so that execution would be as if unmask = 1.
This resulted in no change of behavior.

Bryan  

-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk] 
Sent: Friday, August 26, 2005 11:47 AM
To: Bryan Althouse
Cc: linux-mips@linux-mips.org; 'Ralf Baechle'
Subject: RE: custom ide driver causes "Badness in smp_call_function"

On Gwe, 2005-08-26 at 10:58 -0400, Bryan Althouse wrote: 
> Ralf,
> 
> The patch doesn't seem to make any difference. :(

Assuming your hardware is sane another approach might be to force
drive->unmask = 1. That will mean that PIO mode is running with
interrupts enabled which should avoid the problem.

Add a .fixup handler to your driver (assuming you are using a recent
2.6.x) and in the handler do something like this:

+void ide_unmask_interrupts(ide_hwif_t *hwif)
+{
+       int i;
+       for (i = 0; i < 2; i++) {
+               ide_drive_t *drive = &hwif->drives[i];
+               if(drive->present)
+                       drive->unmask = 1;
+       }
+}

hopefully that will be early enough.

WARNING: multiple messages have this Message-ID (diff)
From: "Bryan Althouse" <bryan.althouse@3phoenix.com>
To: unlisted-recipients, no To-header on input,
	IMB Recipient 1 <mspop3connector.david.sanchez@lexbox.fr>
Cc: linux-mips@linux-mips.org
Subject: RE: custom ide driver causes "Badness in smp_call_function"
Date: Fri, 26 Aug 2005 20:16:09 +0200	[thread overview]
Message-ID: <000501c5aa6a$3beadc30$0300a8c0@intra.lexbox.org> (raw)
Message-ID: <20050826181609.s_qYSUcpjLYxLzLgDBdszlVwPjUZBItgGo4ogThUwtk@z> (raw)
In-Reply-To: <1125071244.7298.2.camel@localhost.localdomain>

Alan,

Thanks for your suggestion.
I'm not sure how to write a .fixup handler.  I did some Googling, but got
nowhere.  I looked through drivers/ide to see what drive->unmask was doing.
I found this in ide-io.c:
     if (drive->unmask)
          local_irq_enable();
And this in ide-taskfile.c:
     if (!drive->unmask)
          local_irq_disable();
I modified both of these files so that execution would be as if unmask = 1.
This resulted in no change of behavior.

Bryan  

-----Original Message-----
From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk] 
Sent: Friday, August 26, 2005 11:47 AM
To: Bryan Althouse
Cc: linux-mips@linux-mips.org; 'Ralf Baechle'
Subject: RE: custom ide driver causes "Badness in smp_call_function"

On Gwe, 2005-08-26 at 10:58 -0400, Bryan Althouse wrote: 
> Ralf,
> 
> The patch doesn't seem to make any difference. :(

Assuming your hardware is sane another approach might be to force
drive->unmask = 1. That will mean that PIO mode is running with
interrupts enabled which should avoid the problem.

Add a .fixup handler to your driver (assuming you are using a recent
2.6.x) and in the handler do something like this:

+void ide_unmask_interrupts(ide_hwif_t *hwif)
+{
+       int i;
+       for (i = 0; i < 2; i++) {
+               ide_drive_t *drive = &hwif->drives[i];
+               if(drive->present)
+                       drive->unmask = 1;
+       }
+}

hopefully that will be early enough.

  parent reply	other threads:[~2005-08-26 18:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-23 14:07 custom ide driver causes "Badness in smp_call_function" Bryan Althouse
2005-08-23 14:07 ` Bryan Althouse
2005-08-24 15:24 ` Ralf Baechle
2005-08-25 15:26   ` Bryan Althouse
2005-08-25 15:26     ` Bryan Althouse
2005-08-25 15:42     ` Ralf Baechle
2005-08-25 21:17       ` Bryan Althouse
2005-08-25 21:17         ` Bryan Althouse
2005-08-26 14:10         ` Ralf Baechle
2005-08-26 14:58           ` Bryan Althouse
2005-08-26 14:58             ` Bryan Althouse
2005-08-26 15:47             ` Alan Cox
2005-08-26 18:05               ` Bryan Althouse
2005-08-26 18:05                 ` Bryan Althouse
2005-08-26 18:16               ` Bryan Althouse [this message]
2005-08-26 18:16                 ` Bryan Althouse
2005-08-26 16:28             ` Ralf Baechle
2005-08-26 16:36               ` Bryan Althouse
2005-08-26 16:36                 ` Bryan Althouse
2005-08-26 16:41                 ` Ralf Baechle
2005-09-01 16:15           ` Bryan Althouse
2005-09-01 16:15             ` Bryan Althouse
2005-09-01 16:52             ` Ralf Baechle DL5RB
2005-09-02 12:48           ` Atsushi Nemoto

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='000501c5aa6a$3beadc30$0300a8c0@intra.lexbox.org' \
    --to=bryan.althouse@3phoenix.com \
    --cc=linux-mips@linux-mips.org \
    /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