From: Elias Oltmanns <eo@nebensachen.de>
To: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
"Vaibhav V. Nivargi" <vaibhav.nivargi@gmail.com>,
"Alok N. Kataria" <alokk@calsoftinc.com>,
Ravikiran Thirumalai <kiran@scalex86.org>,
Shai Fultheim <shai@scalex86.org>
Subject: Re: [PATCH] ide: replace the global ide_lock spinlock by per-hwgroup spinlocks
Date: Sun, 12 Oct 2008 20:01:26 +0200 [thread overview]
Message-ID: <87ej2ld761.fsf@denkblock.local> (raw)
In-Reply-To: 200810102126.14475.bzolnier@gmail.com
Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> wrote:
> From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Subject: [PATCH] ide: replace the global ide_lock spinlock by per-hwgroup spinlocks
>
> Now that (almost) all host drivers have been fixed not to abuse ide_lock
> and core code usage of ide_lock has been sanitized we may safely replace
> ide_lock by per-hwgroup locks.
>
> This patch is partially based on earlier patch from Ravikiran G Thirumalai.
>
> While at it:
> - don't use deprecated HWIF() and HWGROUP() macros
> - update locking documentation in ide.h
>
> Cc: Vaibhav V. Nivargi <vaibhav.nivargi@gmail.com>
> Cc: Alok N. Kataria <alokk@calsoftinc.com>
> Cc: Ravikiran Thirumalai <kiran@scalex86.org>
> Cc: Shai Fultheim <shai@scalex86.org>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> ---
> this is against 2.6.27 + pata tree + pre-patchset posted on Wednesday
> (http://lkml.org/lkml/2008/10/8/221)
I've only had a casual look at this patch, but there is one thing:
[...]
> Index: b/drivers/ide/ide-probe.c
> ===================================================================
> --- a/drivers/ide/ide-probe.c
> +++ b/drivers/ide/ide-probe.c
[...]
> @@ -1091,11 +1092,11 @@ static int init_irq (ide_hwif_t *hwif)
> * linked list, the first entry is the hwif that owns
> * hwgroup->handler - do not change that.
> */
> - spin_lock_irq(&ide_lock);
> + spin_lock_irq(&hwgroup->lock);
> hwif->next = hwgroup->hwif->next;
> hwgroup->hwif->next = hwif;
> BUG_ON(hwif->next == hwif);
> - spin_unlock_irq(&ide_lock);
> + spin_unlock_irq(&hwgroup->lock);
> } else {
> hwgroup = kmalloc_node(sizeof(*hwgroup), GFP_KERNEL|__GFP_ZERO,
> hwif_to_node(hwif));
Something like
spin_lock_init(&hwgroup->lock);
should go into this else clause too.
Regards,
Elias
next prev parent reply other threads:[~2008-10-12 18:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-10 19:26 [PATCH] ide: replace the global ide_lock spinlock by per-hwgroup spinlocks Bartlomiej Zolnierkiewicz
2008-10-12 18:01 ` Elias Oltmanns [this message]
2008-10-15 18:27 ` Bartlomiej Zolnierkiewicz
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=87ej2ld761.fsf@denkblock.local \
--to=eo@nebensachen.de \
--cc=alokk@calsoftinc.com \
--cc=bzolnier@gmail.com \
--cc=kiran@scalex86.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shai@scalex86.org \
--cc=vaibhav.nivargi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.