From: Jeremy Fitzhardinge <jeremy@goop.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, jens.axboe@oracle.com
Subject: [PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOVEC_PHYS_MERGEABLE
Date: Fri, 24 Oct 2008 13:59:06 -0700 [thread overview]
Message-ID: <4902371A.5050303@goop.org> (raw)
In-Reply-To: <20081024143836K.fujita.tomonori@lab.ntt.co.jp>
The bio common code no longer uses BIO_VMERGE_BOUNDARY, so replace it
with BIOVEC_PHYS_MERGEABLE. Also make iommu_bio_merge a boolean
rather than a size, as befits its use.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
---
arch/x86/include/asm/io.h | 8 +++++++-
arch/x86/include/asm/io_64.h | 2 --
arch/x86/kernel/pci-dma.c | 4 ++--
3 files changed, 9 insertions(+), 5 deletions(-)
===================================================================
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -33,7 +33,7 @@
/* This tells the BIO block layer to assume merging. Default to off
because we cannot guarantee merging later. */
-int iommu_bio_merge __read_mostly = 0;
+bool iommu_bio_merge __read_mostly = false;
EXPORT_SYMBOL(iommu_bio_merge);
dma_addr_t bad_dma_address __read_mostly = 0;
@@ -189,7 +189,7 @@
}
if (!strncmp(p, "biomerge", 8)) {
- iommu_bio_merge = 4096;
+ iommu_bio_merge = true;
iommu_merge = 1;
force_iommu = 1;
}
===================================================================
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -4,6 +4,7 @@
#define ARCH_HAS_IOREMAP_WC
#include <linux/compiler.h>
+#include <linux/types.h>
#define build_mmio_read(name, size, type, reg, barrier) \
static inline type name(const volatile void __iomem *addr) \
@@ -59,12 +60,17 @@
#define writeq writeq
#endif
-extern int iommu_bio_merge;
+extern bool iommu_bio_merge;
#ifdef CONFIG_X86_32
# include "io_32.h"
#else
# include "io_64.h"
+#endif
+
+#ifdef CONFIG_X86_64
+#define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \
+ (iommu_bio_merge && __BIOVEC_PHYS_MERGEABLE(vec1, vec2))
#endif
extern void *xlate_dev_mem_ptr(unsigned long phys);
===================================================================
--- a/arch/x86/include/asm/io_64.h
+++ b/arch/x86/include/asm/io_64.h
@@ -232,8 +232,6 @@
#define flush_write_buffers()
-#define BIO_VMERGE_BOUNDARY iommu_bio_merge
-
/*
* Convert a virtual cached pointer to an uncached pointer
*/
next prev parent reply other threads:[~2008-10-24 20:59 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 5:41 [PATCH] x86: remove dead BIO_VMERGE_BOUNDARY definition FUJITA Tomonori
2008-10-24 20:58 ` Jeremy Fitzhardinge
2008-10-27 4:42 ` FUJITA Tomonori
2008-10-24 20:59 ` [PATCH 1/2] bio: define __BIOVEC_PHYS_MERGEABLE Jeremy Fitzhardinge
2008-10-24 20:59 ` Jeremy Fitzhardinge [this message]
2008-10-27 3:52 ` [PATCH 2/2] x86: replace BIO_VMERGE_BOUNDARY with BIOVEC_PHYS_MERGEABLE FUJITA Tomonori
2008-10-27 8:21 ` Jeremy Fitzhardinge
2008-10-27 8:37 ` FUJITA Tomonori
2008-10-27 9:18 ` Jeremy Fitzhardinge
2008-10-27 9:36 ` FUJITA Tomonori
2008-10-27 9:41 ` Jens Axboe
2008-10-27 11:43 ` Jeremy Fitzhardinge
2008-10-27 11:57 ` Jens Axboe
2008-10-28 23:06 ` FUJITA Tomonori
2008-10-29 8:37 ` Ingo Molnar
2008-10-29 9:24 ` Jeremy Fitzhardinge
2008-10-29 10:51 ` Ingo Molnar
2008-10-29 11:25 ` Ingo Molnar
2008-10-29 11:27 ` Jens Axboe
2008-10-29 11:30 ` Ingo Molnar
2008-10-29 11:34 ` Jens Axboe
2008-10-29 11:55 ` FUJITA Tomonori
2008-10-29 12:12 ` Jeremy Fitzhardinge
2008-10-29 13:03 ` Ingo Molnar
2008-10-29 13:06 ` Jeremy Fitzhardinge
2008-10-29 13:06 ` Jens Axboe
2008-10-29 9:27 ` Jens Axboe
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=4902371A.5050303@goop.org \
--to=jeremy@goop.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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.