mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org,
	bzolnier@gmail.com, linux-ide@vger.kernel.org,
	alan@lxorguk.ukuu.org.uk
Subject: Re: [PATCH] ide-scsi highmem cleanup
Date: Sun, 30 Oct 2005 20:00:33 -0800	[thread overview]
Message-ID: <20051030200033.31a34b5c.akpm@osdl.org> (raw)
In-Reply-To: <43659404.6050605@pobox.com>

Jeff Garzik <jgarzik@pobox.com> wrote:
>
> > @@ -212,19 +205,12 @@ static void idescsi_output_buffers (ide_
>  >  			return;
>  >  		}
>  >  		count = min(pc->sg->length - pc->b_count, bcount);
>  > -		if (PageHighMem(pc->sg->page)) {
>  > -			unsigned long flags;
>  > -
>  > -			local_irq_save(flags);
>  > -			buf = kmap_atomic(pc->sg->page, KM_IRQ0) + pc->sg->offset;
>  > -			drive->hwif->atapi_output_bytes(drive, buf + pc->b_count, count);
>  > -			kunmap_atomic(buf - pc->sg->offset, KM_IRQ0);
>  > -			local_irq_restore(flags);
>  > -		} else {
>  > -			buf = page_address(pc->sg->page) + pc->sg->offset;
>  > -			drive->hwif->atapi_output_bytes(drive, buf + pc->b_count, count);
>  > -		}
>  > -		bcount -= count; pc->b_count += count;
>  > +		buf = kmap_atomic(pc->sg->page, KM_IRQ0);
>  > +		drive->hwif->atapi_output_bytes(drive,
>  > +				buf + pc->b_count + pc->sg->offset, count);
>  > +		kunmap_atomic(buf, KM_IRQ0);
>  > +		bcount -= count;
>  > +		pc->b_count += count;
> 
>  Unless I'm missing something, this patch looks very wrong.
> 
>  kmap_atomic(..., KM_IRQx) needs to be inside local_irq_save().

Yeah, shared interrupts.

>  As such, the PageHighMem() does have clear benefits.

Yep, thanks.  I'll fix that up.

      reply	other threads:[~2005-10-31  4:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200510310302.j9V32hO4009277@hera.kernel.org>
2005-10-31  3:48 ` Jeff Garzik
2005-10-31  4:00   ` Andrew Morton [this message]

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=20051030200033.31a34b5c.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bzolnier@gmail.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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®