gen_pool_add broken with LPAE based systems

2013-03-14 Thread Laura Abbott
Hi, We use genalloc for managing certain pools of physical memory. genalloc currently uses unsigned long for virtual addresses and phys_addr_t for physical addresses. Our ARM LPAE systems have 64-bit physical addresses but unsigned long is still 32 bits. Using gen_pool_add breaks with

Re: gen_pool_add broken with LPAE based systems

2013-03-19 Thread Laura Abbott
On 3/19/2013 2:54 PM, Andrew Morton wrote: On Thu, 14 Mar 2013 16:05:27 -0700 Laura Abbott lau...@codeaurora.org wrote: Hi, We use genalloc for managing certain pools of physical memory. genalloc currently uses unsigned long for virtual addresses and phys_addr_t for physical addresses. Our

[PATCH] mm: Use aligned zone start for pfn_to_bitidx calculation

2012-12-04 Thread Laura Abbott
the actual start_pfn to be used elsewhere. Change-Id: I13e2f53f50db294f38ec86138c17c6fe29f0ee82 Signed-off-by: Laura Abbott lau...@codeaurora.org --- include/linux/mmzone.h |6 ++ mm/page_alloc.c|4 +++- 2 files changed, 9 insertions(+), 1 deletions(-) diff --git a/include/linux

Re: [-rc7 regression] Buggy commit: mm: use aligned zone start for pfn_to_bitidx calculation

2013-02-18 Thread Laura Abbott
On 2/18/2013 6:46 AM, Mel Gorman wrote: On Sat, Feb 16, 2013 at 10:26:30AM -0800, Linus Torvalds wrote: On Fri, Feb 15, 2013 at 3:44 AM, Ingo Molnar mi...@kernel.org wrote: c060f943d092 may be related as you config does not have CONFIG_SPARSEMEM defined. Right, that's the commit causing the

Re: [RFC][PATCH] fs/buffer.c: Revoke LRU when trying to drop buffers

2012-09-17 Thread Laura Abbott
Hi, On 9/14/2012 6:41 PM, Hugh Dickins wrote: On Tue, 11 Sep 2012, Laura Abbott wrote: When a buffer is added to the LRU list, a reference is taken which is not dropped until the buffer is evicted from the LRU list. This is the correct behavior, however this LRU reference will prevent

[RFC][PATCH] fs/buffer.c: Revoke LRU when trying to drop buffers

2012-09-11 Thread Laura Abbott
it. There is still the possibility that the buffer could be added back on the list, but that indicates the buffer is still in use and would probably have other 'in use' indicates to prevent dropping. Signed-off-by: Laura Abbott lau...@codeaurora.org --- fs/buffer.c | 38

CMA page migration failure due to buffers on bh_lru

2012-08-29 Thread Laura Abbott
Hi, I've been observing a high rate of failures with CMA allocations on my ARM system. I've set up a test case set up with a 56MB CMA region that essentially does the following: total_failures = 0; loop forever: loop_failure = 0; for (i = 0; i

Re: CMA page migration failure due to buffers on bh_lru

2012-08-31 Thread Laura Abbott
On 8/29/2012 6:03 PM, Laura Abbott wrote: My quick and dirty workaround for testing is to remove the GFP_MOVABLE flag from find_or_create_page but this seems significantly less than optimal. Ideally, it seems like the buffers should be evicted from the LRU when trying to drop (expand

Re: [PATCH] mm: Use aligned zone start for pfn_to_bitidx calculation

2012-12-06 Thread Laura Abbott
On 12/6/2012 2:12 AM, Mel Gorman wrote: On Tue, Dec 04, 2012 at 02:10:01PM -0800, Laura Abbott wrote: The current calculation in pfn_to_bitidx assumes that (pfn - zone-zone_start_pfn) pageblock_order will return the same bit for all pfn in a pageblock. If zone_start_pfn is not aligned

[PATCH v2] mm: Use aligned zone start for pfn_to_bitidx calculation

2012-12-06 Thread Laura Abbott
that calling {get,set}_pageblock_migratetype on a single page will not set the migratetype for the full block. Fix this by rounding down zone_start_pfn when doing the bitidx calculation. Signed-off-by: Laura Abbott lau...@codeaurora.org --- mm/page_alloc.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [PATCH v2] mm: Use aligned zone start for pfn_to_bitidx calculation

2012-12-06 Thread Laura Abbott
On 12/6/2012 12:05 PM, Laura Abbott wrote: The current calculation in pfn_to_bitidx assumes that (pfn - zone-zone_start_pfn) pageblock_order will return the same bit for all pfn in a pageblock. If zone_start_pfn is not aligned to pageblock_nr_pages, this may not always be correct. Consider

[PATCH v3] mm: Use aligned zone start for pfn_to_bitidx calculation

2012-12-06 Thread Laura Abbott
that calling {get,set}_pageblock_migratetype on a single page will not set the migratetype for the full block. Fix this by rounding down zone_start_pfn when doing the bitidx calculation. Signed-off-by: Laura Abbott lau...@codeaurora.org --- mm/page_alloc.c |2 +- 1 files changed, 1 insertions(+), 1

[RESEND][PATCH v3] mm: Use aligned zone start for pfn_to_bitidx calculation

2013-01-05 Thread Laura Abbott
that calling {get,set}_pageblock_migratetype on a single page will not set the migratetype for the full block. Fix this by rounding down zone_start_pfn when doing the bitidx calculation. Signed-off-by: Laura Abbott lau...@codeaurora.org Acked-by: Mel Gorman mgor...@suse.de --- mm/page_alloc.c |2

Re: [RESEND][PATCH v3] mm: Use aligned zone start for pfn_to_bitidx calculation

2013-01-09 Thread Laura Abbott
On 1/7/2013 2:31 PM, Andrew Morton wrote: On Sat, 5 Jan 2013 11:28:31 -0800 Laura Abbott lau...@codeaurora.org wrote: The current calculation in pfn_to_bitidx assumes that (pfn - zone-zone_start_pfn) pageblock_order will return the same bit for all pfn in a pageblock. If zone_start_pfn

Re: [ARM ATTEND] catching up on exploit mitigations

2013-08-26 Thread Laura Abbott
On 8/26/2013 12:56 PM, Mark Brown wrote: On Mon, Aug 12, 2013 at 09:51:59PM -0700, Laura Abbott wrote: On 7/30/2013 12:05 PM, Kees Cook wrote: - RO and W^X kernel page table protections (similar to x86's DEBUG_RODATA and DEBUG_SET_MODULE_RONX; it's not clear to me how much LPAE and PXN

[PATCH] mm: Check for NULL return values from allocating functions

2013-10-17 Thread Laura Abbott
appropriately. Signed-off-by: Laura Abbott lau...@codeaurora.org --- fs/buffer.c | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 4d74335..b53f863 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1561,6 +1561,9 @@ void

[PATCH 2/2] Cleanup useless architecture versions of scatterlist.h

2014-03-14 Thread Laura Abbott
Cc: Hirokazu Takata tak...@linux-m32r.org, Cc: Michal Simek mon...@monstr.eu Cc: David Howells dhowe...@redhat.com Cc: Koichi Yasutake yasutake.koi...@jp.panasonic.com Cc: Chen Liqin liqin.li...@gmail.com, Cc: Lennox Wu lennox...@gmail.com Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch

[PATCH 1/2] lib/scatterlist: Make ARCH_HAS_SG_CHAIN an actual Kconfig

2014-03-14 Thread Laura Abbott
...@arm.linux.org.uk Cc: Tony Luck tony.l...@intel.com Cc: Fenghua Yu fenghua...@intel.com Benjamin Herrenschmidt b...@kernel.crashing.org Paul Mackerras pau...@samba.org Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/Kconfig | 1 + arch/arm/include/asm/Kbuild

Re: [gbefb] WARNING: CPU: 1 PID: 1 at lib/dma-debug.c:1041 check_unmap()

2014-03-05 Thread Laura Abbott
On 3/5/2014 5:38 AM, Fengguang Wu wrote: Greetings, I got the below dmesg and the first bad commit is commit c060f943d0929f3e429c5d9522290584f6281d6e Author: Laura Abbott lau...@codeaurora.org AuthorDate: Fri Jan 11 14:31:51 2013 -0800 Commit: Linus Torvalds torva...@linux

[PATCH] mm/compaction: Break out of loop on !PageBuddy in isolate_freepages_block

2014-03-05 Thread Laura Abbott
(e.g. last since page needed is a higher order page), it is not possible to detect that the page was skipped. The fix is to bail out if the loop immediately if we are in strict mode. There's no benfit to continuing anyway since we need all pages to be isolated. Signed-off-by: Laura Abbott lau

Re: [PATCH] mm/compaction: Break out of loop on !PageBuddy in isolate_freepages_block

2014-03-06 Thread Laura Abbott
On 3/6/2014 2:22 AM, Vlastimil Babka wrote: On 03/06/2014 03:26 AM, Laura Abbott wrote: We received several reports of bad page state when freeing CMA pages previously allocated with alloc_contig_range: 1[ 1258.084111] BUG: Bad page state in process Binder_A pfn:63202 1[ 1258.089763

[PATCHv2] mm/compaction: Break out of loop on !PageBuddy in isolate_freepages_block

2014-03-06 Thread Laura Abbott
. Additionally, drop the error checking based on nr_strict_required and just check the pfn ranges. This matches with what isolate_freepages_range does. Signed-off-by: Laura Abbott lau...@codeaurora.org --- v2: Addressed several comments by Vlastimil mm/compaction.c | 20 +--- 1

[PATCHv4 2/2] arm: Get rid of meminfo

2014-02-18 Thread Laura Abbott
catalin.mari...@arm.com Acked-by: Santosh Shilimkar santosh.shilim...@ti.com Acked-by: Kukjin Kim kgene@samsung.com Tested-by: Marek Szyprowski m.szyprow...@samsung.com Tested-by: Leif Lindholm leif.lindh...@linaro.org Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/include/asm/mach/arch.h

[PATCHv4 1/2] mm/memblock: add memblock_get_current_limit

2014-02-18 Thread Laura Abbott
-foundation.org Signed-off-by: Laura Abbott lau...@codeaurora.org --- include/linux/memblock.h |2 ++ mm/memblock.c|5 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 1ef6636..8a20a51 100644 --- a/include

[PATCHv4 0/2] Remove ARM meminfo

2014-02-18 Thread Laura Abbott
per Grant's suggestion. v2: Implemented full commandline support for mem@addr Laura Abbott (2): mm/memblock: add memblock_get_current_limit arm: Get rid of meminfo arch/arm/include/asm/mach/arch.h |4 +- arch/arm/include/asm/memblock.h |3 +- arch/arm/include/asm

Re: [PATCHv2 2/2] arm: Get rid of meminfo

2014-02-10 Thread Laura Abbott
On 2/10/2014 9:28 AM, Courtney Cavin wrote: On Mon, Feb 10, 2014 at 04:25:34AM +0100, Laura Abbott wrote: On 2/6/2014 6:09 PM, Courtney Cavin wrote: On Wed, Feb 05, 2014 at 01:02:31AM +0100, Laura Abbott wrote: memblock is now fully integrated into the kernel and is the prefered method

[PATCHv3 2/2] arm: Get rid of meminfo

2014-02-11 Thread Laura Abbott
catalin.mari...@arm.com Acked-by: Santosh Shilimkar santosh.shilim...@ti.com Tested-by: Leif Lindholm leif.lindh...@linaro.org Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/include/asm/mach/arch.h |4 +- arch/arm/include/asm/memblock.h |3 +- arch/arm/include/asm

[PATCHv3 1/2] mm/memblock: add memblock_get_current_limit

2014-02-11 Thread Laura Abbott
Appart from setting the limit of memblock, it's also useful to be able to get the limit to avoid recalculating it every time. Add the function to do so. Acked-by: Catalin Marinas catalin.mari...@arm.com Acked-by: Santosh Shilimkar santosh.shilim...@ti.com Signed-off-by: Laura Abbott lau

[PATCHv3 0/2] Remove ARM meminfo

2014-02-11 Thread Laura Abbott
for mem@addr Laura Abbott (2): mm/memblock: add memblock_get_current_limit arm: Get rid of meminfo arch/arm/include/asm/mach/arch.h |4 +- arch/arm/include/asm/memblock.h |3 +- arch/arm/include/asm/setup.h | 23 -- arch/arm/kernel/atags_parse.c

[RFC/PATCH 2/3] arm: Add ARCH_WANT_OF_RANDOMNESS

2014-02-11 Thread Laura Abbott
The stack canary for ARM is currently the same across reboots due to lack of randomness early enough. Add ARCH_WANT_OF_RANDOMNESS to allow devices to add whatever randomness they need. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/Kconfig |3 +++ arch/arm/kernel

[RFC/PATCH 1/3] of: Add early randomness hooks

2014-02-11 Thread Laura Abbott
is present the function is called. Note that this must happen on the flattened devicetree to ensure the randomness gets added to the pool early enough to make a difference. Signed-off-by: Laura Abbott lau...@codeaurora.org --- drivers/of/Kconfig|7 ++ drivers/of/Makefile

[RFC/PATCH 3/3] init: Move stack canary initialization after setup_arch

2014-02-11 Thread Laura Abbott
-by: Laura Abbott lau...@codeaurora.org --- init/main.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/init/main.c b/init/main.c index eb03090..63d0596 100644 --- a/init/main.c +++ b/init/main.c @@ -489,11 +489,6 @@ asmlinkage void __init start_kernel(void

[RFC/PATCH 0/3] Add devicetree scanning for randomness

2014-02-11 Thread Laura Abbott
have would be reasonable if only seeded earlier. Thanks, Laura Laura Abbott (3): of: Add early randomness hooks arm: Add ARCH_WANT_OF_RANDOMNESS init: Move stack canary initialization after setup_arch arch/arm/Kconfig |3 ++ arch/arm/kernel/vmlinux.lds.S |1

Re: [RFC/PATCH 0/3] Add devicetree scanning for randomness

2014-02-12 Thread Laura Abbott
On 2/12/2014 3:51 AM, Arnd Bergmann wrote: On Wednesday 12 February 2014, Laura Abbott wrote: This is an RFC to seed the random number pool earlier when using devicetree. The big issue this is trying to solve is the fact that the stack canary for ARM tends to be the same across bootups

Re: [RFC/PATCH 2/3] arm: Add ARCH_WANT_OF_RANDOMNESS

2014-02-12 Thread Laura Abbott
On 2/12/2014 8:49 AM, Grant Likely wrote: On Tue, 11 Feb 2014 17:33:24 -0800, Laura Abbott lau...@codeaurora.org wrote: The stack canary for ARM is currently the same across reboots due to lack of randomness early enough. Add ARCH_WANT_OF_RANDOMNESS to allow devices to add whatever randomness

Re: [PATCHv3 2/2] arm: Get rid of meminfo

2014-02-12 Thread Laura Abbott
On 2/12/2014 7:09 AM, Grygorii Strashko wrote: Hi Laura, On 02/11/2014 11:14 PM, Laura Abbott wrote: memblock is now fully integrated into the kernel and is the prefered method for tracking memory. Rather than reinvent the wheel with meminfo, migrate to using memblock directly instead

Re: [PATCHv4 2/2] arm: Get rid of meminfo

2014-03-19 Thread Laura Abbott
On 3/12/2014 9:08 AM, Grygorii Strashko wrote: On 03/12/2014 03:38 PM, Russell King - ARM Linux wrote: On Wed, Mar 12, 2014 at 03:09:53PM +0200, Grygorii Strashko wrote: Hi Russell, On 03/12/2014 10:54 AM, Russell King - ARM Linux wrote: On Tue, Feb 18, 2014 at 02:15:33PM -0800, Laura Abbott

Re: [BUG] Circular locking dependency - DRM/CMA/MM/hotplug/...

2014-03-21 Thread Laura Abbott
that had a similar root cause. I also managed to independently come up with a similar solution. This has been tested somewhat but not in wide distribution. Thanks, Laura - 8 -- From 2aa000fbd4189d967c45c4f1ac5aee812ed83082 Mon Sep 17 00:00:00 2001 From: Laura Abbott lau...@codeaurora.org Date

[RESEND][PATCH 2/2] Cleanup useless architecture versions of scatterlist.h

2014-03-22 Thread Laura Abbott
: David Howells dhowe...@redhat.com Cc: Koichi Yasutake yasutake.koi...@jp.panasonic.com Cc: Chen Liqin liqin.li...@gmail.com, Cc: Lennox Wu lennox...@gmail.com Acked-by: Jesper Nilsson jesper.nils...@axis.com Acked-by: David Howells dhowe...@redhat.com Signed-off-by: Laura Abbott lau

[RESEND][PATCH 0/2] Cleanup asm/scatterlist.h

2014-03-22 Thread Laura Abbott
we take this through your tree as suggested by Will? Thanks, Laura [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-March/240435.html Laura Abbott (2): lib/scatterlist: Make ARCH_HAS_SG_CHAIN an actual Kconfig Cleanup useless architecture versions of scatterlist.h arch/alpha

[RESEND][PATCH 1/2] lib/scatterlist: Make ARCH_HAS_SG_CHAIN an actual Kconfig

2014-03-22 Thread Laura Abbott
fenghua...@intel.com Cc: Tony Luck tony.l...@intel.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: Martin Schwidefsky schwidef...@de.ibm.com Cc: Heiko Carstens heiko.carst...@de.ibm.com Cc: Andrew Morton a...@linux-foundation.org Signed-off-by: Laura

Re: [PATCH] mm: cma: free cma page to buddy instead of being cpu hot page

2013-10-29 Thread Laura Abbott
On 10/29/2013 8:02 AM, Zhang Mingjun wrote: It would move the cost to the CMA paths so I would complain less. Bear in mind as well that forcing everything to go through free_one_page() means that every free goes through the zone lock. I doubt you have any machine large enough

Re: [PATCH] mm: cma: free cma page to buddy instead of being cpu hot page

2013-10-30 Thread Laura Abbott
On 10/29/2013 10:40 PM, Minchan Kim wrote: We've had a similar patch in our tree for a year and a half because of CMA migration failures, not just for a speedup in allocation time. I understand that CMA is not the fast case or the general use case but the problem is that the cost of CMA failure

Re: [PATCH] mm: cma: free cma page to buddy instead of being cpu hot page

2013-10-28 Thread Laura Abbott
On 10/28/2013 4:42 AM, zhang.ming...@linaro.org wrote: From: Mingjun Zhang troy.zhangming...@linaro.org free_contig_range frees cma pages one by one and MIGRATE_CMA pages will be used as MIGRATE_MOVEABLE pages in the pcp list, it causes unnecessary migration action when these pages reused by

Re: [patch] Documentation/email-clients.txt: add a section about git

2014-05-07 Thread Laura Abbott
On 5/7/2014 4:17 AM, Dan Carpenter wrote: These days most people don't use git to send patches so I have added a section about that. Do you mean most people *do* use git to send patches? Or most people don't use e-mail clients? Laura -- Qualcomm Innovation Center, Inc. is a member of Code

Re: BUG: Bad page state in process swapper pfn:00000

2014-06-11 Thread Laura Abbott
1c2f87c22566cd057bc8cde10c37ae9da1a1bb76 Author: Laura Abbott lau...@codeaurora.org Date: Sun Apr 13 22:54:58 2014 +0100 ARM: 8025/1: Get rid of meminfo memblock is now fully integrated into the kernel and is the prefered method for tracking memory. Rather than reinvent the wheel with meminfo

Re: BUG: Bad page state in process swapper pfn:00000

2014-06-11 Thread Laura Abbott
On 6/11/2014 12:19 PM, Geert Uytterhoeven wrote: Hi Laura, On Wed, Jun 11, 2014 at 7:32 PM, Laura Abbott lau...@codeaurora.org wrote: On 6/11/2014 4:40 AM, Geert Uytterhoeven wrote: With current mainline, I get an early crash on r8a7791/koelsch: BUG: Bad page state in process swapper pfn

Re: [PATCH] CMA: correct unlock target

2014-05-29 Thread Laura Abbott
); if (pageno = cma-count) { -mutex_unlock(cma_mutex); +mutex_unlock(cma-lock); break; } bitmap_set(cma-bitmap, pageno, count); Best regards Acked-by: Laura Abbott lau...@codeaurora.org Who actually ended up picking up that patch? I sent it out

Re: [RFC PATCH 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-23 Thread Laura Abbott
On 5/12/2014 10:04 AM, Laura Abbott wrote: I'm going to see about running this through tests internally for comparison. Hopefully I'll get useful results in a day or so. Thanks, Laura We ran some tests internally and found that for our purposes these patches made the benchmarks worse vs

Re: Questions regarding DMA buffer sharing using IOMMU

2014-05-12 Thread Laura Abbott
On 5/12/2014 7:37 AM, Pintu Kumar wrote: Hi, Thanks for the reply. From: a...@arndb.de To: linux-arm-ker...@lists.infradead.org CC: pint...@outlook.com; linux...@kvack.org; linux-kernel@vger.kernel.org; linaro-mm-...@lists.linaro.org Subject: Re:

Re: [RFC PATCH 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used

2014-05-12 Thread Laura Abbott
Hi, On 5/7/2014 5:32 PM, Joonsoo Kim wrote: CMA is introduced to provide physically contiguous pages at runtime. For this purpose, it reserves memory at boot time. Although it reserve memory, this reserved memory can be used for movable memory allocation request. This usecase is beneficial to

[PATCHv3 0/5] Atomic pool for arm64

2014-06-16 Thread Laura Abbott
the devicetree mailing list this time around to get more input on this. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/249180.html [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-April/249528.html Laura Abbott (5): lib/genalloc.c: Add power aligned algorithm lib

[PATCHv3 2/5] lib/genalloc.c: Add genpool range check function

2014-06-16 Thread Laura Abbott
After allocating an address from a particular genpool, there is no good way to verify if that address actually belongs to a genpool. Introduce addr_in_gen_pool which will return if an address plus size falls completely within the genpool range. Signed-off-by: Laura Abbott lau...@codeaurora.org

[PATCHv3 5/5] arm64: Add atomic pool for non-coherent and CMA allocations.

2014-06-16 Thread Laura Abbott
Neither CMA nor noncoherent allocations support atomic allocations. Add a dedicated atomic pool to support this. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm64/Kconfig | 1 + arch/arm64/mm/dma-mapping.c | 155 +++- 2 files

[PATCHv3 1/5] lib/genalloc.c: Add power aligned algorithm

2014-06-16 Thread Laura Abbott
One of the more common algorithms used for allocation is to align the start address of the allocation to the order of size requested. Add this as an algorithm option for genalloc. Signed-off-by: Laura Abbott lau...@codeaurora.org --- include/linux/genalloc.h | 4 lib/genalloc.c

[PATCHv3 4/5] arm: use genalloc for the atomic pool

2014-06-16 Thread Laura Abbott
ARM currently uses a bitmap for tracking atomic allocations. genalloc already handles this type of memory pool allocation so switch to using that instead. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/Kconfig | 1 + arch/arm/mm/dma-mapping.c | 144

[PATCHv3 3/5] common: dma-mapping: Introduce common remapping functions

2014-06-16 Thread Laura Abbott
For architectures without coherent DMA, memory for DMA may need to be remapped with coherent attributes. Factor out the the remapping code from arm and put it in a common location to reduced code duplication. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/mm/dma-mapping.c

[PATCHv2 1/2] mm/memblock: add memblock_get_current_limit

2014-02-04 Thread Laura Abbott
Appart from setting the limit of memblock, it's also useful to be able to get the limit to avoid recalculating it every time. Add the function to do so. Signed-off-by: Laura Abbott lau...@codeaurora.org --- include/linux/memblock.h |2 ++ mm/memblock.c|5 + 2 files

[PATCHv2 2/2] arm: Get rid of meminfo

2014-02-04 Thread Laura Abbott
memblock is now fully integrated into the kernel and is the prefered method for tracking memory. Rather than reinvent the wheel with meminfo, migrate to using memblock directly instead of meminfo as an intermediate. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/include/asm/mach

[PATCHv2 0/2] Remove ARM meminfo

2014-02-04 Thread Laura Abbott
Hi, This is v2 of the patch to get rid of meminfo. This should cover all the bases. Testing would be appreciated. Thanks, Laura Laura Abbott (2): mm/memblock: add memblock_get_current_limit arm: Get rid of meminfo arch/arm/include/asm/mach/arch.h |4 +- arch/arm/include/asm

Re: [PATCH] arm64: fix build error if DMA_CMA is enabled

2014-01-24 Thread Laura Abbott
Thanks for this. Laura, did you have additional patches adding asm-generic/dma-contiguous.h? no, asm-generic/dma-contiguous.h was an old file which was later removed. I missed this when rebasing from my older branch to mainline. You can have Acked-by: Laura Abbott lau...@codeaurora.org Thanks

Re: [RFC PATCHv3 00/11] Intermix Lowmem and vmalloc

2014-01-06 Thread Laura Abbott
On 1/3/2014 11:31 PM, Minchan Kim wrote: Hello, On Fri, Jan 03, 2014 at 02:08:52PM -0800, Laura Abbott wrote: On 1/3/2014 10:23 AM, Dave Hansen wrote: On 01/02/2014 01:53 PM, Laura Abbott wrote: The goal here is to allow as much lowmem to be mapped as if the block of memory was not reserved

Re: [PATCH 2/7] mm/cma: fix cma free page accounting

2014-01-09 Thread Laura Abbott
On 1/8/2014 11:04 PM, Joonsoo Kim wrote: Cma pages can be allocated by not only order 0 request but also high order request. So, we should consider to account free cma page in the both places. Signed-off-by: Joonsoo Kim iamjoonsoo@lge.com diff --git a/mm/page_alloc.c b/mm/page_alloc.c

Re: [PATCH v3 4/6] arm: add early_ioremap support

2014-01-15 Thread Laura Abbott
On 1/9/2014 7:50 PM, Mark Salter wrote: diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 987a7f5..038fb75 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -36,6 +36,7 @@ #include asm/cpu.h #include asm/cputype.h #include asm/elf.h +#include

Re: [PATCH] mm: Improve documentation of page_order

2014-01-17 Thread Laura Abbott
On 1/17/2014 6:32 AM, Mel Gorman wrote: Developers occasionally try and optimise PFN scanners by using page_order but miss that in general it requires zone-lock. This has happened twice for compaction.c and rejected both times. This patch clarifies the documentation of page_order and adds a

[RFC PATCHv3 06/11] arm: use is_vmalloc_addr

2014-01-02 Thread Laura Abbott
is_vmalloc_addr already does the range checking against VMALLOC_START and VMALLOC_END. Use it. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/mm/iomap.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/iomap.c b/arch/arm/mm/iomap.c index

[RFC PATCHv3 01/11] mce: acpi/apei: Use get_vm_area directly

2014-01-02 Thread Laura Abbott
There's no need to use VMALLOC_START and VMALLOC_END with __get_vm_area when get_vm_area does the exact same thing. Convert over. Signed-off-by: Laura Abbott lau...@codeaurora.org --- drivers/acpi/apei/ghes.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[RFC PATCHv3 00/11] Intermix Lowmem and vmalloc

2014-01-02 Thread Laura Abbott
. We were debating if this is just part of finding the correct size for vmalloc or if there is a need for vmalloc_upper= - People who like bike shedding more than I do can suggest better config names if there is sufficient interest in the series. Laura Abbott (11): mce

[RFC PATCHv3 04/11] dm: Use VMALLOC_TOTAL instead of VMALLCO_END - VMALLOC_START

2014-01-02 Thread Laura Abbott
vmalloc already provides a macro to calculat the total vmalloc size, VMALLOC_TOTAL. Use it. Signed-off-by: Laura Abbott lau...@codeaurora.org --- drivers/md/dm-bufio.c |4 ++-- drivers/md/dm-stats.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm

[RFC PATCHv3 03/11] percpu: use VMALLOC_TOTAL instead of VMALLOC_END - VMALLOC_START

2014-01-02 Thread Laura Abbott
vmalloc already gives a useful macro to calculate the total vmalloc size. Use it. Signed-off-by: Laura Abbott lau...@codeaurora.org --- mm/percpu.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index 0d10def..afbf352 100644 --- a/mm

[RFC PATCHv3 02/11] iommu/omap: Use get_vm_area directly

2014-01-02 Thread Laura Abbott
There is no need to call __get_vm_area with VMALLOC_START and VMALLOC_END when get_vm_area already does that. Call get_vm_area directly. Signed-off-by: Laura Abbott lau...@codeaurora.org --- drivers/iommu/omap-iovmm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[RFC PATCHv3 05/11] staging: lustre: Use is_vmalloc_addr

2014-01-02 Thread Laura Abbott
Instead of manually checking the bounds of VMALLOC_START and VMALLOC_END, just use is_vmalloc_addr. That's what the function was designed for. Signed-off-by: Laura Abbott lau...@codeaurora.org --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c |3 +-- 1 files changed, 1 insertions(+), 2

[RFC PATCHv3 11/11] fs/proc/kcore.c: Use for_each_potential_vmalloc_area

2014-01-02 Thread Laura Abbott
With CONFIG_INTERMIX_VMALLOC, we can no longer assume all vmalloc is contained between VMALLOC_START and VMALLOC_END. For code that relies on operating on the vmalloc space, use for_each_potential_vmalloc_area to track each area separately. Signed-off-by: Laura Abbott lau...@codeaurora.org

[RFC PATCHv3 10/11] arm: Use for_each_potential_vmalloc_area

2014-01-02 Thread Laura Abbott
. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/kvm/mmu.c| 12 arch/arm/mm/ioremap.c | 12 arch/arm/mm/mmu.c |9 +++-- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c index

[RFC PATCHv3 09/11] arm: mm: Track lowmem in vmalloc

2014-01-02 Thread Laura Abbott
consisting of vmalloc. Signed-off-by: Laura Abbott lau...@codeaurora.org Signed-off-by: Neeti Desai nee...@codeaurora.org --- arch/arm/Kconfig |3 + arch/arm/mm/init.c | 104 arch/arm/mm/mm.h |1 + arch/arm/mm/mmu.c | 29

[RFC PATCHv3 08/11] mm/vmalloc.c: Allow lowmem to be tracked in vmalloc

2014-01-02 Thread Laura Abbott
-by: Laura Abbott lau...@codeaurora.org Signed-off-by: Neeti Desai nee...@codeaurora.org --- include/linux/mm.h |6 ++ include/linux/vmalloc.h | 31 mm/Kconfig |6 ++ mm/vmalloc.c| 119 -- 4 files changed

[RFC PATCHv3 07/11] arm: mm: Add iotable_init_novmreserve

2014-01-02 Thread Laura Abbott
dma_contiguous_remap is only really concerned with the remapping, introduce iotable_init_novmreserve to allow remapping of pages without reserving the virtual address in vmalloc space. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/include/asm/mach/map.h |2 ++ arch/arm/mm/dma

Re: [RFC PATCHv3 00/11] Intermix Lowmem and vmalloc

2014-01-03 Thread Laura Abbott
On 1/3/2014 10:23 AM, Dave Hansen wrote: On 01/02/2014 01:53 PM, Laura Abbott wrote: The goal here is to allow as much lowmem to be mapped as if the block of memory was not reserved from the physical lowmem region. Previously, we had been hacking up the direct virt - phys translation to ignore

Re: [ARM ATTEND] catching up on exploit mitigations

2013-08-12 Thread Laura Abbott
On 7/30/2013 12:05 PM, Kees Cook wrote: I'd like to propose the topic of catching up to x86 exploit mitigations and security features, and potentially identifying ARM-unique mitigations/features that could be implemented. Several years ago, with Nicolas Pitre doing all the real work, I

Re: [PATCH 2/2] ARM: mm: keep rodata non-executable

2014-03-23 Thread Laura Abbott
On 3/13/2014 12:07 PM, Kees Cook wrote: On Fri, Feb 21, 2014 at 2:09 PM, Kees Cook keesc...@chromium.org wrote: On Fri, Feb 21, 2014 at 5:20 AM, Russell King - ARM Linux li...@arm.linux.org.uk wrote: On Fri, Feb 21, 2014 at 12:37:04PM +, Dave Martin wrote: It would be good if someone

Re: [PATCH 2/2] ARM: mm: keep rodata non-executable

2014-03-23 Thread Laura Abbott
On 2/17/2014 4:34 AM, Dave Martin wrote: On Fri, Feb 14, 2014 at 11:11:07AM -0800, Kees Cook wrote: On Fri, Feb 14, 2014 at 8:22 AM, Dave Martin dave.mar...@arm.com wrote: On Thu, Feb 13, 2014 at 05:04:10PM -0800, Kees Cook wrote: Introduce CONFIG_DEBUG_RODATA to mostly match the x86 config,

Re: [PATCHv5 2/2] arm: Get rid of meminfo

2014-05-06 Thread Laura Abbott
On 5/1/2014 6:08 AM, Grant Likely wrote: On Thu, 3 Apr 2014 10:04:58 -0700, Laura Abbott lau...@codeaurora.org wrote: memblock is now fully integrated into the kernel and is the prefered method for tracking memory. Rather than reinvent the wheel with meminfo, migrate to using memblock

[PATCHv5 1/2] mm/memblock: add memblock_get_current_limit

2014-04-03 Thread Laura Abbott
...@ti.com Acked-by: Andrew Morton a...@linux-foundation.org Signed-off-by: Laura Abbott lau...@codeaurora.org --- include/linux/memblock.h | 2 ++ mm/memblock.c| 5 + 2 files changed, 7 insertions(+) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 1ef6636

[PATCHv5 0/2] Remove ARM meminfo

2014-04-03 Thread Laura Abbott
for mem@addr Laura Abbott (2): mm/memblock: add memblock_get_current_limit arm: Get rid of meminfo arch/arm/Kconfig | 5 -- arch/arm/boot/compressed/atags_to_fdt.c | 2 + arch/arm/include/asm/mach/arch.h | 4 +- arch/arm/include/asm/memblock.h

[PATCHv5 2/2] arm: Get rid of meminfo

2014-04-03 Thread Laura Abbott
...@lakedaemon.net Acked-by: Catalin Marinas catalin.mari...@arm.com Acked-by: Santosh Shilimkar santosh.shilim...@ti.com Tested-by: Leif Lindholm leif.lindh...@linaro.org Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm/Kconfig | 5 -- arch/arm/boot/compressed

[PATCH] arm64: Add missing Kconfig for CONFIG_STRICT_DEVMEM

2014-04-04 Thread Laura Abbott
The Kconfig for CONFIG_STRICT_DEVMEM is missing despite being used in mmap.c. Add it. Signed-off-by: Laura Abbott lau...@codeaurora.org --- arch/arm64/Kconfig.debug | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug index

Re: [PATCH v2 2/2] ARM: mm: allow text and rodata sections to be read-only

2014-04-09 Thread Laura Abbott
On 4/9/2014 9:12 AM, Kees Cook wrote: On Wed, Apr 9, 2014 at 2:02 AM, Steve Capper steve.cap...@linaro.org wrote: Hi Kees, On Mon, Apr 07, 2014 at 08:15:10PM -0700, Kees Cook wrote: This introduces CONFIG_DEBUG_RODATA, making kernel text and rodata read-only. Additionally, this splits rodata

Re: [PATCH v4] ARM: mm: fix reporting of read-only PMD bits

2014-03-31 Thread Laura Abbott
and LPAE. Thanks! -Kees You are welcome to add Tested-by: Laura Abbott lau...@codeaurora.org Laura -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body

Re: [PATCH] arm: don't allow CONFIG_DEBUG_SET_MODULE_RONX if CONFIG_JUMP_LABEL is enabled

2014-04-01 Thread Laura Abbott
On 4/1/2014 3:04 AM, Alexander Holler wrote: CONFIG_DEBUG_SET_MODULE_RONX sounds like a nice security feature, but things might fail late (and unexpected) if module code is set to read-only while CONFIG_JUMP_LABEL is enabled (e.g. modprobe bridge). Avoid this. Signed-off-by: Alexander

Re: [PATCH 2/2] ARM: mm: keep rodata non-executable

2014-04-01 Thread Laura Abbott
On 4/1/2014 3:34 PM, Kees Cook wrote: On Mon, Mar 24, 2014 at 3:47 AM, Jon Medhurst (Tixy) t...@linaro.org wrote: On Sun, 2014-03-23 at 16:21 -0600, Kees Cook wrote: For this stage, how about I make this depends on KEXEC=n KPROBES=n? There's also ftrace (CONFIG_DYNAMIC_FTRACE I believe)

Re: [PATCH] arm: ftrace: work with CONFIG_DEBUG_SET_MODULE_RONX

2014-04-02 Thread Laura Abbott
On 4/2/2014 3:10 PM, Rabin Vincent wrote: Make ftrace work with CONFIG_DEBUG_SET_MODULE_RONX by making module text writable around the place where ftrace does its work, like it is done on x86 in the patch which introduced CONFIG_DEBUG_SET_MODULE_RONX, 84e1c6bb38eb (x86: Add RO/NX protection

[PATCH] of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

2014-06-18 Thread Laura Abbott
outside the range of phys_addr_t. Add range checks for the base and size if phys_addr_t is smaller than u64. Reported-by: Geert Uytterhoeven ge...@linux-m68k.org Signed-off-by: Laura Abbott lau...@codeaurora.org --- Geert, can you drop my other patch and give this a test to see if it fixes your

[PATCHv2] of: Check for phys_addr_t overflows in early_init_dt_add_memory_arch

2014-06-19 Thread Laura Abbott
outside the range of phys_addr_t. Add range checks for the base and size if phys_addr_t is smaller than u64. Reported-by: Geert Uytterhoeven ge...@linux-m68k.org Tested-by: Geert Uytterhoeven ge...@linux-m68k.org Signed-off-by: Laura Abbott lau...@codeaurora.org --- v2: Switched to sizeof

Re: [PATCH] CMA/HOTPLUG: clear buffer-head lru before page migration

2014-07-18 Thread Laura Abbott
it is installed into lru so that the bh of lru must be freed before migrating the page. This frees every bh of lru. We could free only bh of migrating page. But searching lru costs more than invalidating entire lru. Signed-off-by: Gioh Kim gioh@lge.com Acked-by: Laura Abbott lau

Re: [PATCHv4 3/5] common: dma-mapping: Introduce common remapping functions

2014-07-21 Thread Laura Abbott
On 7/18/2014 6:53 AM, Catalin Marinas wrote: On Wed, Jul 02, 2014 at 07:03:36PM +0100, Laura Abbott wrote: +void *dma_common_pages_remap(struct page **pages, size_t size, +unsigned long vm_flags, pgprot_t prot, +const void *caller) +{ +struct

Re: [PATCHv4 2/5] lib/genalloc.c: Add genpool range check function

2014-07-21 Thread Laura Abbott
On 7/9/2014 3:33 PM, Olof Johansson wrote: On Wed, Jul 2, 2014 at 11:03 AM, Laura Abbott lau...@codeaurora.org wrote: After allocating an address from a particular genpool, there is no good way to verify if that address actually belongs to a genpool. Introduce addr_in_gen_pool which

Re: [PATCHv4 4/5] arm: use genalloc for the atomic pool

2014-07-21 Thread Laura Abbott
On 7/4/2014 6:42 AM, Thierry Reding wrote: On Wed, Jul 02, 2014 at 11:03:37AM -0700, Laura Abbott wrote: [...] diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c [...] index f5190ac..02a1939 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -26,6

Re: [PATCHv4 5/5] arm64: Add atomic pool for non-coherent and CMA allocations.

2014-07-21 Thread Laura Abbott
On 7/4/2014 6:35 AM, Thierry Reding wrote: On Wed, Jul 02, 2014 at 11:03:38AM -0700, Laura Abbott wrote: [...] diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c [...] +static struct gen_pool *atomic_pool; + +#define DEFAULT_DMA_COHERENT_POOL_SIZE SZ_256K +static

Re: [PATCHv4 5/5] arm64: Add atomic pool for non-coherent and CMA allocations.

2014-07-21 Thread Laura Abbott
On 7/18/2014 6:43 AM, Catalin Marinas wrote: On Wed, Jul 02, 2014 at 07:03:38PM +0100, Laura Abbott wrote: diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 4164c5a..a2487f1 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c [...] static

Re: [PATCHv4 5/5] arm64: Add atomic pool for non-coherent and CMA allocations.

2014-07-22 Thread Laura Abbott
On 7/22/2014 2:03 PM, Catalin Marinas wrote: On Tue, Jul 22, 2014 at 07:06:44PM +0100, Arnd Bergmann wrote: [...] + if (!addr) + goto destroy_genpool; + + memset(addr, 0, atomic_pool_size); + __dma_flush_range(addr, addr +

  1   2   3   4   5   6   7   8   9   10   >