mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Finn Thain <fthain@telegraphics.com.au>
To: Brad Boyer <flar@allandria.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-m68k@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m68k/mac: Allocate IOP message pool and queues dynamically
Date: Mon, 1 Jul 2013 17:48:22 +1000 (EST)	[thread overview]
Message-ID: <alpine.LNX.2.00.1307011741500.9202@nippy.intranet> (raw)
In-Reply-To: <20130701065258.GA8425@cynthia.pants.nu>


On Sun, 30 Jun 2013, Brad Boyer wrote:

> On Sun, Jun 30, 2013 at 12:02:22PM +0200, Geert Uytterhoeven wrote:
> >  
> >  	if (iop_scc_present) {
> >  		printk("IOP: detected SCC IOP at %p\n", iop_base[IOP_NUM_SCC]);
> > +		alloc_msg_queue(IOP_NUM_SCC);
> 
> Technically, this isn't actually useful. As long as we never start this
> IOP, it can't ever send or be sent any messages.

That assumes that the SCC IOP is in a stopped state after iop_preinit(). 
But I don't think that's the case. If it is technically possible to 
exchange messages with a device in bypass mode (?) then I think the code 
above is correct.

> > @@ -315,6 +307,9 @@ void __init iop_register_interrupts(void)
> >  		} else {
> >  			printk("IOP: the ISM IOP seems to be alive.\n");
> >  		}
> 
> The if/else above isn't useful if it is run before the call to 
> iop_start. However, it's also useless if it is called immediately after 
> the call to iop_alive which is now below. It was supposed to eventually 
> be called in the background on a regular schedule, but that never 
> happened.
> 

I agree. That if/else statement and the conditional printk's should be 
omitted.

I had thought that in the existing code the interrupt service routine was 
registered before the call to iop_start() but in fact iop_start() happens 
first. Looks like a bug to me. The interrupt handler needs to be able to 
acknowledge unsolicited messages...

Finn

  reply	other threads:[~2013-07-01  7:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-30 10:02 Geert Uytterhoeven
2013-07-01  6:52 ` Brad Boyer
2013-07-01  7:48   ` Finn Thain [this message]
2013-07-01 22:48     ` Brad Boyer
2013-07-01  7:46 ` Finn Thain
2013-07-01 21:59   ` Brad Boyer

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=alpine.LNX.2.00.1307011741500.9202@nippy.intranet \
    --to=fthain@telegraphics.com.au \
    --cc=flar@allandria.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@vger.kernel.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

all inboxes | Powered by JetHome®