WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH 01/15] [swiotlb] fix: Update 'setup_io_tlb_npages' to

To: fujita.tomonori@xxxxxxxxxxxxx, alex.williamson@xxxxxx, joerg.roedel@xxxxxxx, dwmw2@xxxxxxxxxxxxx, chrisw@xxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 01/15] [swiotlb] fix: Update 'setup_io_tlb_npages' to accept both arguments in either order.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: 2010年1月14日 18:00:50 -0500
Cc: Ian.Campbell@xxxxxxxxxxxxx, jeremy@xxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: 2010年1月14日 15:07:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1263510064-16788-1-git-send-email-konrad.wilk@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1263510064-16788-1-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Before this patch, if you specified 'swiotlb=force,1024' it would
ignore both arguments. This fixes it and allows the user specify it
in any order (or none at all).
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 lib/swiotlb.c | 20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 437eedb..e6d9e32 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -102,16 +102,18 @@ static int late_alloc;
 static int __init
 setup_io_tlb_npages(char *str)
 {
- if (isdigit(*str)) {
- io_tlb_nslabs = simple_strtoul(str, &str, 0);
- /* avoid tail segment of size < IO_TLB_SEGSIZE */
- io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
+ while (*str) {
+ if (isdigit(*str)) {
+ io_tlb_nslabs = simple_strtoul(str, &str, 0);
+ /* avoid tail segment of size < IO_TLB_SEGSIZE */
+ io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
+ }
+ if (!strncmp(str, "force", 5))
+ swiotlb_force = 1;
+ str += strcspn(str, ",");
+ if (*str == ',')
+ ++str;
 }
- if (*str == ',')
- ++str;
- if (!strcmp(str, "force"))
- swiotlb_force = 1;
-
 return 1;
 }
 __setup("swiotlb=", setup_io_tlb_npages);
-- 
1.6.2.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] [PATCH 05/15] [swiotlb] Respect the io_tlb_nslabs argument value. , Konrad Rzeszutek Wilk
Next by Date: [Xen-devel] [PATCH 03/15] [swiotlb] Add swiotlb_register_engine function. , Konrad Rzeszutek Wilk
Previous by Thread: [Xen-devel] [RFC SWIOTLB-0.2] , Konrad Rzeszutek Wilk
Next by Thread: [Xen-devel] [PATCH 02/15] [swiotlb] Add swiotlb_engine structure for tracking multiple software IO TLBs. , Konrad Rzeszutek Wilk
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /