From 91fec0f562bd3f8b6b6bdc8fc03fe0d3f320c161 Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Wed, 27 Nov 2013 13:48:09 +0100 Subject: swiotlb: update format Documentation/kernel-parameters.txt doesn't contain up-to-date documentation regarding swiotlb= parameter. Update it. Signed-off-by: Jiri Kosina Signed-off-by: Konrad Rzeszutek Wilk diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 50680a5..5577634 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -3061,7 +3061,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. controller if no parameter or 1 is given or disable it if 0 is given (See Documentation/cgroups/memory.txt) - swiotlb= [IA-64] Number of I/O TLB slabs + swiotlb= [ARM,IA-64,PPC,MIPS,X86] + Format: { | force } + -- Number of I/O TLB slabs + force -- force using of bounce buffers even if they + wouldn't be automatically used by the kernel switches= [HW,M68k] -- cgit v0.10.2 From 0cb637bff80d5ba2b916bb19f19ffd59cd4079fd Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Mon, 16 Dec 2013 14:05:01 -0500 Subject: swiotlb: Don't DoS us with 'swiotlb buffer is full' (v2) There is no need for that so lets use ratelimiting. Also add some extra information to be helpful. Acked-by: Stefano Stabellini [v2: s/ld/zs on the printk] Signed-off-by: Konrad Rzeszutek Wilk diff --git a/lib/swiotlb.c b/lib/swiotlb.c index e4399fa..4634ac9 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -505,7 +505,8 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev, not_found: spin_unlock_irqrestore(&io_tlb_lock, flags); - dev_warn(hwdev, "swiotlb buffer is full\n"); + if (printk_ratelimit()) + dev_warn(hwdev, "swiotlb buffer is full (sz: %zd bytes)\n", size); return SWIOTLB_MAP_ERROR; found: spin_unlock_irqrestore(&io_tlb_lock, flags); -- cgit v0.10.2