From: Willy Tarreau <willy@w.ods.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: andersen@codepoet.org, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org,
Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Subject: [PATCH] 2.4.x SATA with highmem
Date: Sun, 4 Dec 2005 18:42:40 +0100 [thread overview]
Message-ID: <20051204174240.GA6191@alpha.home.local> (raw)
In-Reply-To: <20051204155911.GA5924@alpha.home.local>
Hi Jeff,
On Sun, Dec 04, 2005 at 04:59:11PM +0100, Willy Tarreau wrote:
> > >libata-core.c:2427: error: for each function it appears in.)
> > >libata-core.c: In function `ata_sg_setup':
> > >libata-core.c:2701: error: `KM_IRQ0' undeclared (first use in this
> > >function)
> > >make[2]: *** [libata-core.o] Error 1
> >
> > hmmm, interesting. Easy enough to fix. I guess I didn't build on a
> > highmem box.
>
> Same problem for me, but unfortunately, I don't know how to fix this. I've
> seen that KM_IRQ* are not defined on x86. I don't know if I can use other
> ones, not what would be the consequences. Would you please enlighten me a
> bit on this, I'm willing to test it but don't know how to build it first.
Well, after finding a good doc on kmap_atomic on lwn.net, I think I
understood how to fix this. I grepped the whole kernel for kmap_atomic()
and found that KM_BIO_IRQ was only used by ntfs, which had a comment
stating that it was used to support highmem. So I thought we could share
the same type and rediffed the patch, and now the kernel builds.
Here is my proposal, I hope it's correct.
Cheers,
Willy
diff -urN linux-2.4.32-libata1/drivers/scsi/libata-core.c linux-2.4.32-libata1-highmem/drivers/scsi/libata-core.c
--- linux-2.4.32-libata1/drivers/scsi/libata-core.c 2005-12-04 16:32:33.000000000 +0100
+++ linux-2.4.32-libata1-highmem/drivers/scsi/libata-core.c 2005-12-04 18:37:28.000000000 +0100
@@ -2424,9 +2424,9 @@
sg[qc->orig_n_elem - 1].length += qc->pad_len;
if (pad_buf) {
struct scatterlist *psg = &qc->pad_sgent;
- void *addr = kmap_atomic(psg->page, KM_IRQ0);
+ void *addr = kmap_atomic(psg->page, KM_BIO_IRQ);
memcpy(addr + psg->offset, pad_buf, qc->pad_len);
- kunmap_atomic(psg->page, KM_IRQ0);
+ kunmap_atomic(psg->page, KM_BIO_IRQ);
}
} else {
if (sg_dma_len(&sg[0]) > 0)
@@ -2698,9 +2698,9 @@
psg->offset = offset_in_page(offset);
if (qc->tf.flags & ATA_TFLAG_WRITE) {
- void *addr = kmap_atomic(psg->page, KM_IRQ0);
+ void *addr = kmap_atomic(psg->page, KM_BIO_IRQ);
memcpy(pad_buf, addr + psg->offset, qc->pad_len);
- kunmap_atomic(psg->page, KM_IRQ0);
+ kunmap_atomic(psg->page, KM_BIO_IRQ);
}
sg_dma_address(psg) = ap->pad_dma + (qc->tag * ATA_DMA_PAD_SZ);
next prev parent reply other threads:[~2005-12-04 17:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-01 21:48 Final 2.4.x SATA updates Jeff Garzik
2005-12-01 23:10 ` Erik Andersen
2005-12-02 1:41 ` Jeff Garzik
[not found] ` <20051202022309.GA10639@codepoet.org>
[not found] ` <438FB468.6090504@pobox.com>
2005-12-02 12:35 ` Draft libata GET_IDENTITY and DRIVE_TASKFILE Erik Andersen
2005-12-04 15:59 ` Final 2.4.x SATA updates Willy Tarreau
2005-12-04 17:42 ` Willy Tarreau [this message]
2005-12-04 18:09 ` [PATCH] 2.4.x SATA with highmem Willy Tarreau
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=20051204174240.GA6191@alpha.home.local \
--to=willy@w.ods.org \
--cc=andersen@codepoet.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.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.