From: "Adrian McMenamin" <lkmladrian@gmail.com>
To: "Arjan van de Ven" <arjan@infradead.org>
Cc: "Paul Mundt" <lethal@linux-sh.org>,
linuxsh-dev@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] Maple bus support for the Sega Dreamcast
Date: Sun, 9 Sep 2007 19:36:52 +0100 [thread overview]
Message-ID: <8b67d60709091136s4629d8e7tb1ec0e583a2ac52f@mail.gmail.com> (raw)
In-Reply-To: <20070909192807.3bc2410d@laptopd505.fenrus.org>
On 09/09/07, Arjan van de Ven <arjan@infradead.org> wrote:
> On Sun, 9 Sep 2007 17:46:54 +0100
> "Adrian McMenamin" <lkmladrian@gmail.com> wrote:
>
> > This patch adds support for Sega's proprietary Maple bus - which is
> > required to support the Dreamcast's peripherals.
>
>
> First of all, I'm a little concerned about the lack of locking that
> this driver seems to have; what guarantees the integrity of the lists
> used in the driver?
>
Could you explain what you think the issue is? The lists are only
handled by this driver and not anything else.
> Second, you have a lot of use of likely() and unlikely(); so much that I think it's waaaay overkill. The code it's in generally isn't hotpath, and gcc also does a pretty decent job without giving these hints in general.
>
>
>
Fair enough.
> > +
> > +void maple_add_packet(struct mapleq *mq)
> > +{
> > + list_add((struct list_head *) mq, &maple_waitq);
> > +}
>
> for example this list.. what makes sure that no 2 pieces of code muck with it at the same time?
>
>
Because everything is handled by one kernel thread on a uniprocessor machine.
> > +static irqreturn_t maplebus_dma_interrupt(int irq, void *dev_id)
> > +{
> > + /* Load everything into the bottom half */
> > + schedule_work(&maple_dma_process);
> > + return IRQ_HANDLED;
> > +}
>
> I wonder if you want to at least check if the work was really for you before returning IRQ_HANDLED....
>
It's *always* for me - this is an end of DMA interrupt for the bus.
next prev parent reply other threads:[~2007-09-09 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-09 16:46 Adrian McMenamin
2007-09-09 18:28 ` Arjan van de Ven
2007-09-09 18:36 ` Adrian McMenamin [this message]
2007-09-09 18:44 ` Arjan van de Ven
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=8b67d60709091136s4629d8e7tb1ec0e583a2ac52f@mail.gmail.com \
--to=lkmladrian@gmail.com \
--cc=arjan@infradead.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxsh-dev@lists.sourceforge.net \
/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®