Commit 3ec8a773 authored by Tony Luck's avatar Tony Luck

Pull swiotlb-size into release branch

parents 95ecc5e5 e8579e72
...@@ -93,8 +93,7 @@ static int __init ...@@ -93,8 +93,7 @@ static int __init
setup_io_tlb_npages(char *str) setup_io_tlb_npages(char *str)
{ {
if (isdigit(*str)) { if (isdigit(*str)) {
io_tlb_nslabs = simple_strtoul(str, &str, 0) << io_tlb_nslabs = simple_strtoul(str, &str, 0);
(PAGE_SHIFT - IO_TLB_SHIFT);
/* avoid tail segment of size < IO_TLB_SEGSIZE */ /* avoid tail segment of size < IO_TLB_SEGSIZE */
io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
} }
...@@ -117,7 +116,7 @@ swiotlb_init_with_default_size (size_t default_size) ...@@ -117,7 +116,7 @@ swiotlb_init_with_default_size (size_t default_size)
unsigned long i; unsigned long i;
if (!io_tlb_nslabs) { if (!io_tlb_nslabs) {
io_tlb_nslabs = (default_size >> PAGE_SHIFT); io_tlb_nslabs = (default_size >> IO_TLB_SHIFT);
io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE); io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment