[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <527E87FD.1040800@ti.com>
Date: Sat, 9 Nov 2013 14:07:41 -0500
From: Santosh Shilimkar <santosh.shilimkar@...com>
To: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
CC: <tj@...nel.org>, <linux-kernel@...r.kernel.org>,
<linux-mm@...ck.org>, <linux-arm-kernel@...ts.infradead.org>,
Yinghai Lu <yinghai@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 14/24] mm/lib/swiotlb: Use memblock apis for early memory
allocations
On Saturday 09 November 2013 11:55 AM, Konrad Rzeszutek Wilk wrote:
> Santosh Shilimkar <santosh.shilimkar@...com> wrote:
>> Switch to memblock interfaces for early memory allocator instead of
>> bootmem allocator. No functional change in beahvior than what it is
>> in current code from bootmem users points of view.
>>
>> Archs already converted to NO_BOOTMEM now directly use memblock
>> interfaces instead of bootmem wrappers build on top of memblock. And
>> the
>> archs which still uses bootmem, these new apis just fallback to exiting
>> bootmem APIs.
>>
>> Cc: Yinghai Lu <yinghai@...nel.org>
>> Cc: Tejun Heo <tj@...nel.org>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
>>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@...com>
>> ---
>> lib/swiotlb.c | 36 +++++++++++++++++++++---------------
>> 1 file changed, 21 insertions(+), 15 deletions(-)
>>
>> diff --git a/lib/swiotlb.c b/lib/swiotlb.c
>> index 4e8686c..78ac01a 100644
>> --- a/lib/swiotlb.c
>> +++ b/lib/swiotlb.c
>> @@ -169,8 +169,9 @@ int __init swiotlb_init_with_tbl(char *tlb,
>> unsigned long nslabs, int verbose)
>> /*
>> * Get the overflow emergency buffer
>> */
>> - v_overflow_buffer = alloc_bootmem_low_pages_nopanic(
>> - PAGE_ALIGN(io_tlb_overflow));
>> + v_overflow_buffer = memblock_virt_alloc_align_nopanic(
>> + PAGE_ALIGN(io_tlb_overflow),
>> + PAGE_SIZE);
>
> Does this guarantee that the pages will be allocated below 4GB?
>
Yes. The memblock layer still allocates memory from lowmem. As I
mentioned, there is no change in the behavior than what is today
apart from just the interface change.
Regards,
Santosh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists