From: Adrian McMenamin <adrian@newgolddream.dyndns.info>
To: Paul Mundt <lethal@linux-sh.org>
Cc: Adrian McMenamin <lkmladrian@gmail.com>,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
linux-sh@vger.kernel.org, axboe@kernel.dk
Subject: Re: [PATCH 2/3] Add GD-Rom support to the SEGA Dreamcast
Date: Sun, 16 Dec 2007 18:05:13 +0000 [thread overview]
Message-ID: <1197828313.6254.21.camel@localhost.localdomain> (raw)
In-Reply-To: <20071216095019.GA12184@linux-sh.org>
On Sun, 2007-12-16 at 18:50 +0900, Paul Mundt wrote:
> > +static int gdrom_readdisk_dma(int block, int block_cnt, char *buffer)
> > +{
> > + int err;
> > + struct packet_command *read_command;
> > + /* release the spin lock but check later
> > + * we're not in the middle of some dma */
> > + spin_unlock(&gdrom_lock);
>
> The locking strategy here is a bit interesting, has spinlock debugging
> tossed any profanities to your console?
>
No, no errors reported.
I think I've been careful - I release the lock because we're doing
things like allocating memory and then sleeping on the queue.
But I also need to check various registers so that (a) we don't try to
do a second DMA until the hardware is ready and (b) we properly
serialize access to the device by two different threads of execution.
Seems to work.
Though I have an issue with the AICA driver: as it just locks out all
other DMA when doing its own DMA, it is causing the GD Rom driver to
miss some reads (as the interrupts are locked between the DMA being
requested and the interrupt returning afaics). It's not terminal by any
means, but it can be annoying!
/ # /mpg123 -g 25 /mnt/01-Come\ together.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r-gpl (2005/04/08). Copyright 1995-2005 by The Mpg123
Project.
Uses code from various people, see 'AUTHORS' for full list.
This software comes with ABSOLUTELY NO WARRANTY. For details, see
the enclosed file COPYING for license information (GPL).
Directory: /mnt/
Playing MPEG stream from 01-Come together.mp3 ...
Junk at the beginning 49443303
MPEG 1.0 layer III, 192 kbit/s, 44100 Hz joint-stereo
[ 168.794478] irq 11, desc: 8c2723dc, depth: 1, count: 0, unhandled: 0
[ 168.800318] ->handle_irq(): 8c048580, handle_bad_irq+0x0/0x2c0
[ 168.806404] ->chip(): 8c2768c4, no_irq_chip+0x0/0x40
[ 168.811522] ->action(): 00000000
[ 168.814846] IRQ_DISABLED set
[ 168.817992] unexpected IRQ trap at vector 0b
[ 173.548850] irq 11, desc: 8c2723dc, depth: 1, count: 0, unhandled: 0
[ 173.554691] ->handle_irq(): 8c048580, handle_bad_irq+0x0/0x2c0
[ 173.560777] ->chip(): 8c2768c4, no_irq_chip+0x0/0x40
[ 173.565895] ->action(): 00000000
[ 173.569219] IRQ_DISABLED set
next prev parent reply other threads:[~2007-12-16 18:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-16 0:21 [PATCH 2/3] Add GD-Rom support to the SEGA Dreamcast Adrian McMenamin
2007-12-16 9:50 ` Paul Mundt
2007-12-16 10:09 ` Christoph Hellwig
2007-12-16 17:32 ` Adrian McMenamin
2007-12-16 21:59 ` Paul Mundt
2007-12-17 0:06 ` Adrian McMenamin
2007-12-16 18:05 ` Adrian McMenamin [this message]
2007-12-17 23:20 ` Jan Engelhardt
2007-12-20 21:53 ` Adrian McMenamin
2007-12-21 5:24 ` Paul Mundt
2007-12-16 21:01 ` Mike Frysinger
2007-12-17 14:06 ` Jens Axboe
2007-12-17 14:36 ` Adrian McMenamin
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=1197828313.6254.21.camel@localhost.localdomain \
--to=adrian@newgolddream.dyndns.info \
--cc=axboe@kernel.dk \
--cc=lethal@linux-sh.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=lkmladrian@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).