[PATCH V4 23/31] powerpc/mm: Increase the width of #define

2015-10-17 Thread Aneesh Kumar K.V
No real change, only style changes Acked-by: Scott Wood <scottw...@freescale.com> Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff

[PATCH V4 22/31] powerpc/mm: Don't track subpage valid bit in pte_t

2015-10-17 Thread Aneesh Kumar K.V
This free up 11 bits in pte_t. In the later patch we also change the pte_t format so that we can start supporting migration pte at pmd level. Acked-by: Scott Wood <scottw...@freescale.com> Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/a

[PATCH V4 31/31] powerpc/mm: Add a _PAGE_PTE bit

2015-10-17 Thread Aneesh Kumar K.V
hugepd. They also encode the size. We skip bit 1 (_PAGE_PRESENT). 3) othewise pointer to next table. Acked-by: Scott Wood <scottw...@freescale.com> Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 9 ++--- arch/powerpc/inc

Re: [PATCH 0/3] mm/powerpc: enabling memory soft dirty tracking

2015-10-17 Thread Aneesh Kumar K.V
Andrew Morton writes: > On Fri, 16 Oct 2015 14:07:05 +0200 Laurent Dufour > wrote: > >> This series is enabling the software memory dirty tracking in the >> kernel for powerpc. This is the follow up of the commit 0f8975ec4db2 >> ("mm:

Re: [PATCH 1/3] mm: clearing pte in clear_soft_dirty()

2015-10-17 Thread Aneesh Kumar K.V
te in clear_soft_dirty, the pte must > be cleared before being modified. > > Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> > CC: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> Reviewed-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> > --- &

Re: [PATCH 3/3] powerpc/mm: Add page soft dirty tracking

2015-10-17 Thread Aneesh Kumar K.V
LAGS. > > Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> > CC: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> > --- > arch/powerpc/Kconfig | 2 ++ > arch/powerpc/include/asm/pgtable-ppc64.h | 13 +-- > arch/powerpc/incl

Re: [PATCH 2/3] mm: clear_soft_dirty_pmd requires THP

2015-10-17 Thread Aneesh Kumar K.V
Laurent Dufour <lduf...@linux.vnet.ibm.com> writes: > Don't build clear_soft_dirty_pmd() if the transparent huge pages are > not enabled. > > Signed-off-by: Laurent Dufour <lduf...@linux.vnet.ibm.com> > CC: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com>

[PATCH v3 01/31] powerpc/mm: move pte headers to book3s directory

2015-10-12 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/{pte-hash32.h => book3s/32/hash.h} | 0 arch/powerpc/include/asm/{pte-hash64.h => book3s/64/hash.h} | 0 arch/powerpc/include/asm/pgtable-ppc32.h| 2 +- arch/powerpc

[PATCH v3 00/31] powerpc/mm: Update page table format for book3s 64

2015-10-12 Thread Aneesh Kumar K.V
58m46.944s sys 7m49.714s real1m42.585s user59m14.019s sys 7m52.714s Changes from V2: * rebase to -next for powerpc tree Changes from V1: 1) Build fix with STRICT_MM_TYPES enabled 2) pte_mkwrite fix for nohash 3) rebase to latest linus tree. Aneesh Kumar K.V (31): powerpc/mm

[PATCH v3 16/31] powerpc/booke: Move nohash headers (part 4)

2015-10-12 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/nohash/32/pgtable.h | 16 arch/powerpc/include/asm/{ => nohash/32}/pte-40x.h | 0 arch/powerpc/include/asm/{ => nohash/32}/pte-44x.h | 0 arch/pow

[PATCH v3 28/31] powerpc/mm: Move WIMG update to helper.

2015-10-12 Thread Aneesh Kumar K.V
Only difference here is, we apply the WIMG mapping early, so rflags passed to updatepp will also be changed. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/mm/hash64_4k.c | 5 - arch/powerpc/mm/hash64_64k.c | 10 -- arch/p

[PATCH v3 04/31] powerpc/mm: make a separate copy for book3s (part 2)

2015-10-12 Thread Aneesh Kumar K.V
Keep it separate to make rebasing easier Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 4 ++-- arch/powerpc/include/asm/book3s/64/pgtable.h | 6 +++--- arch/powerpc/include/asm/pgtable-ppc32.h | 2 -- arch/powerpc/i

[PATCH v3 03/31] powerpc/mm: make a separate copy for book3s

2015-10-12 Thread Aneesh Kumar K.V
In this patch we do: cp pgtable-ppc32.h book3s/32/pgtable.h cp pgtable-ppc64.h book3s/64/pgtable.h This enable us to do further changes to hash specific config. We will change the page table format for 64bit hash in later patches. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.

[PATCH v3 09/31] powerpc/mm: Don't use pte_val as lvalue

2015-10-12 Thread Aneesh Kumar K.V
We also convert few #define to static inline in this patch for better type checking Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/pgtable.h | 112 -- arch/powerpc/include/asm/page.h | 10 ++-

[PATCH v3 14/31] powerpc/booke: Move nohash headers (part 2)

2015-10-12 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/{pgtable-ppc32.h => nohash/32/pgtable.h} | 0 arch/powerpc/include/asm/{pgtable-ppc64.h => nohash/64/pgtable.h} | 2 +- arch/powerpc/include/asm/nohash/pgtable.h | 8

[PATCH v3 05/31] powerpc/mm: Move hash specific pte width and other defines to book3s

2015-10-12 Thread Aneesh Kumar K.V
This further make a copy of pte defines to book3s/64/hash*.h. This remove the dependency on ppc64-4k.h and ppc64-64k.h Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 87 ++- arch/powerpc/inclu

[PATCH v3 11/31] powerpc/mm: Move hash64 PTE bits from book3s/64/pgtable.h to hash.h

2015-10-12 Thread Aneesh Kumar K.V
This enables us to keep hash64 related bits together, and makes it easy to follow. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash.h| 452 ++- arch/powerpc/include/asm/book3s/64/pgtable.h

[PATCH v3 07/31] powerpc/mm: Don't have generic headers introduce functions touching pte bits

2015-10-12 Thread Aneesh Kumar K.V
We are going to drop pte_common.h in the later patch. The idea is to enable hash code not require to define all PTE bits. Having PTE bits defined in pte_common.h made the code unnecessarily complex. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/inclu

[PATCH v3 15/31] powerpc/booke: Move nohash headers (part 3)

2015-10-12 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- .../include/asm/{pgtable-ppc64-4k.h => nohash/64/pgtable-4k.h} | 0 .../asm/{pgtable-ppc64-64k.h => nohash/64/pgtable-64k.h} | 0 arch/powerpc/include/asm/nohash/64/pgtable.h | 10 +--

[PATCH v3 19/31] powerpc/mm: Convert 4k hash insert to C

2015-10-12 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/mm/Makefile| 3 + arch/powerpc/mm/hash64_64k.c| 202 + arch/powerpc/mm/hash_low_64.S | 380 arch/powerpc/mm/hash_utils_64.c | 4

[PATCH v3 20/31] powerpc/mm: update __real_pte to take address as argument

2015-10-12 Thread Aneesh Kumar K.V
We will use this in the later patch to compute the right hash index Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ++-- arch/powerpc/include/asm/nohash/64/pgt

[PATCH v3 29/31] powerpc/mm: Move hugetlb related headers

2015-10-12 Thread Aneesh Kumar K.V
W.r.t hugetlb, we support two format for pmd. With book3s_64 and 64K linux page size, we can have pte at the pmd level. Hence we don't need to support hugepd there. For everything else hugepd is supported and pmd_huge is (0). Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.

[PATCH v3 23/31] powerpc/mm: Increase the width of #define

2015-10-12 Thread Aneesh Kumar K.V
No real change, only style changes Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/hash.h

[PATCH v3 24/31] powerpc/mm: Convert __hash_page_64K to C

2015-10-12 Thread Aneesh Kumar K.V
Convert from asm to C Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 3 +- arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/powerpc/mm/hash64_64k.c | 134 +++- arch/powerpc/mm/hash_

[PATCH v3 22/31] powerpc/mm: Don't track subpage valid bit in pte_t

2015-10-12 Thread Aneesh Kumar K.V
This free up 11 bits in pte_t. In the later patch we also change the pte_t format so that we can start supporting migration pte at pmd level. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 10 + arch/powerpc/i

[PATCH v3 31/31] powerpc/mm: Add a _PAGE_PTE bit

2015-10-12 Thread Aneesh Kumar K.V
hugepd. They also encode the size. We skip bit 1 (_PAGE_PRESENT). 3) othewise pointer to next table. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 9 ++--- arch/powerpc/include/asm/book3s/64/hash-64k.h | 23 +

[PATCH v3 18/31] powerpc/mm: Increase the pte frag size.

2015-10-12 Thread Aneesh Kumar K.V
We will use the increased size to store more information of 4K pte when using 64K page size. The idea is to free up bits in pte_t. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/pgalloc-64.h | 12 ++-- 1 file changed, 6 insertions

[PATCH v3 25/31] powerpc/mm: Convert 4k insert from asm to C

2015-10-12 Thread Aneesh Kumar K.V
This is similar to 64K insert. May be we want to consolidate Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/mm/Makefile| 6 +- arch/powerpc/mm/hash64_4k.c | 139 + arch/powerpc/mm/hash_low_64.S

[PATCH v3 26/31] powerpc/mm: Remove the dependency on pte bit position in asm code

2015-10-12 Thread Aneesh Kumar K.V
We should not expect pte bit position in asm code. Simply by moving part of that to C Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/kernel/exceptions-64s.S | 16 +++- arch/powerpc/mm/hash_utils_64.c | 29 + 2

[PATCH v3 02/31] powerpc/mm: move pte headers to book3s directory (part 2)

2015-10-12 Thread Aneesh Kumar K.V
Splitting this so that rename can track changes to file. Before merging we will fold this Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/hash.h | 6 +++--- .../include/asm/{pte-hash64-4k.h => book3s/64/

[PATCH v3 06/31] powerpc/mm: Delete booke bits from book3s

2015-10-12 Thread Aneesh Kumar K.V
We also move __ASSEMBLY__ towards the end of header. This avoid having #ifndef __ASSEMBLY___ all over the header Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 93 +++- arch/powerpc/include/asm/

[PATCH v3 08/31] powerpc/mm: Drop pte-common.h from BOOK3S 64

2015-10-12 Thread Aneesh Kumar K.V
We copy only needed PTE bits define from pte-common.h to respective hash related header. This should greatly simply later patches in which we are going to change the pte format for hash config Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/

[PATCH v3 30/31] powerpc/mm: Move THP headers around

2015-10-12 Thread Aneesh Kumar K.V
We support THP only with book3s_64 and 64K page size. Move THP details to hash64-64k.h to clarify the same. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 126 + arch/powerpc/include/asm/book3s/64/hash.h

[PATCH v3 27/31] powerpc/mm: Add helper for converting pte bit to hpte bits

2015-10-12 Thread Aneesh Kumar K.V
Instead of open coding it in multiple code paths, export the helper and add more documentation. Also make sure we don't make assumption regarding pte bit position Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/p

[PATCH v3 12/31] powerpc/mm: Move PTE bits from generic functions to hash64 functions.

2015-10-12 Thread Aneesh Kumar K.V
functions which operate on pte bits are moved to hash*.h and other generic functions are moved to pgtable.h Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 177 arch/powerpc/include/asm/book3s/64/

[PATCH v3 10/31] powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue

2015-10-12 Thread Aneesh Kumar K.V
We convert them static inline function here as we did with pte_val in the previous patch Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 6 - arch/powerpc/include/asm/book3s/64/hash-4k.h | 6 - arch/powerpc/i

[PATCH v3 13/31] powerpc/booke: Move nohash headers (part 1)

2015-10-12 Thread Aneesh Kumar K.V
Move the booke related headers below booke/32 or booke/64 We are splitting this change into multiple patch to make the rebasing easier. The following patches can be folded into this if needed. They are kept separate for easier review. Signed-off-by: Aneesh Kumar K.V <aneesh

[PATCH v3 17/31] powerpc/booke: Move nohash headers (part 5)

2015-10-12 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/nohash/32/pte-40x.h | 6 +++--- arch/powerpc/include/asm/nohash/32/pte-44x.h | 6 +++--- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 6 +++--- arch/powerpc/include/asm/nohash/

[PATCH v3 21/31] powerpc/mm: make pte page hash index slot 8 bits

2015-10-12 Thread Aneesh Kumar K.V
-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 48 +++ arch/powerpc/include/asm/book3s/64/hash.h | 5 --- arch/powerpc/include/asm/page.h | 4 +-- arch/powerpc/mm/hash64_64k.c

[PATCH] powerpc/mm: Differentiate between hugetlb and THP during page walk

2015-10-08 Thread Aneesh Kumar K.V
the long term, we may want to switch ppc64 64k page size config to enable CONFIG_ARCH_WANT_GENERAL_HUGETLB Reported-by: David Gibson <da...@gibson.dropbear.id.au> Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/mmu-hash64.h| 1 + arch/p

Re: [PATCH] powerpc: Quick fix upstream main line build error on PowerPC

2015-10-10 Thread Aneesh Kumar K.V
Dongsheng Wang writes: > From: Wang Dongsheng > > This issue caused on 'commit 990486c8af04 ("strscpy: zero any trailing > garbage bytes in the destination")'. > > zero_bytemask is not implemented on PowerPC. So copy the zero_bytemask

Re: [PATCH v3 10/31] powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue

2015-10-12 Thread Aneesh Kumar K.V
Michael Ellerman <m...@ellerman.id.au> writes: > On Tue, 2015-10-13 at 00:09 +0530, Aneesh Kumar K.V wrote: >> We convert them static inline function here as we did with pte_val in >> the previous patch > > This breaks ppc40x_defconfig & 40x/ep405_defconfig with:

Re: [PATCH v3 10/31] powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue

2015-10-12 Thread Aneesh Kumar K.V
Michael Ellerman <m...@ellerman.id.au> writes: > On Tue, 2015-10-13 at 00:09 +0530, Aneesh Kumar K.V wrote: >> We convert them static inline function here as we did with pte_val in >> the previous patch > > This breaks ppc40x_defconfig & 40x/ep405_defconfig with:

Re: [PATCH V2 00/10] KASan ppc64 support

2015-08-26 Thread Aneesh Kumar K.V
Andrey Ryabinin ryabinin@gmail.com writes: 2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com: Hi, This patchset implements kernel address sanitizer for ppc64. Since ppc64 virtual address range is divided into different regions, we can't have one contigous area

Re: [PATCH V2 09/10] kasan: Prevent deadlock in kasan reporting

2015-08-30 Thread Aneesh Kumar K.V
Andrey Ryabinin ryabinin@gmail.com writes: 2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com: We we end up calling kasan_report in real mode, our shadow mapping for even spinlock variable will show poisoned. Generally I agree with this patch. We should disable

Re: [PATCH V2 07/10] kasan: Make INLINE KASan support arch selectable

2015-08-30 Thread Aneesh Kumar K.V
Andrey Ryabinin ryabinin@gmail.com writes: 2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com: Some of the archs, may find it difficult to support inline KASan mode. Add HAVE_ARCH_KASAN_INLINE so that we can disable inline support at config time. Signed-off

Re: [PATCH V2 05/10] kasan: Enable arch to hook into kasan callbacks.

2015-08-30 Thread Aneesh Kumar K.V
Andrey Ryabinin ryabinin@gmail.com writes: 2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com: We add enable/disable callbacks in this patch which architecture can implemement. We will use this in the later patches for architecture like ppc64, that cannot have

Re: [PATCH V2 02/10] kasan: MODULE_VADDR is not available on all archs

2015-08-30 Thread Aneesh Kumar K.V
Andrey Ryabinin ryabinin@gmail.com writes: 2015-08-26 11:26 GMT+03:00 Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com: Conditionalize the check using #ifdef Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- mm/kasan/report.c | 11 --- 1 file changed, 8

[PATCH V2 08/10] kasan: Update feature support file

2015-08-26 Thread Aneesh Kumar K.V
Now that we have two features KASAN and KASAN_INLINE, add new feature support file for the same. Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- .../debug/KASAN/KASAN_INLINE/arch-support.txt | 40 ++ .../KASAN/{ = KASAN_OUTLINE}/arch-support.txt

[PATCH V2 06/10] kasan: Allow arch to overrride kasan shadow offsets

2015-08-26 Thread Aneesh Kumar K.V
Some archs may want to provide kasan shadow memory as a constant offset from the address. Such arch even though cannot use inline kasan support, they can work with outofline kasan support. Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- include/linux/kasan.h | 3 +++ mm/kasan

[PATCH V2 01/10] powerpc/mm: Add virt_to_pfn and use this instead of opencoding

2015-08-26 Thread Aneesh Kumar K.V
This add helper virt_to_pfn and remove the opencoded usage of the same. Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- arch/powerpc/include/asm/page.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc

[PATCH V2 10/10] powerpc/mm: kasan: Add kasan support for ppc64

2015-08-26 Thread Aneesh Kumar K.V
and VMEMAP area. Kasan is not tracking both the region as of now Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- arch/powerpc/include/asm/kasan.h | 74 arch/powerpc/include/asm/pgtable-ppc64.h | 1 + arch/powerpc/include/asm/ppc_asm.h

[PATCH V2 09/10] kasan: Prevent deadlock in kasan reporting

2015-08-26 Thread Aneesh Kumar K.V
Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- mm/kasan/report.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index 79fbc5d14bd2..82b41eb83e43 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -185,6 +185,10 @@ void kasan_report_error

[PATCH V2 05/10] kasan: Enable arch to hook into kasan callbacks.

2015-08-26 Thread Aneesh Kumar K.V
. Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- mm/kasan/kasan.c | 9 + mm/kasan/kasan.h | 15 +++ 2 files changed, 24 insertions(+) diff --git a/mm/kasan/kasan.c b/mm/kasan/kasan.c index 7b28e9cdf1c7..e4d33afd0eaf 100644 --- a/mm/kasan/kasan.c +++ b/mm

[PATCH V2 07/10] kasan: Make INLINE KASan support arch selectable

2015-08-26 Thread Aneesh Kumar K.V
Some of the archs, may find it difficult to support inline KASan mode. Add HAVE_ARCH_KASAN_INLINE so that we can disable inline support at config time. Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- arch/x86/Kconfig | 1 + lib/Kconfig.kasan | 2 ++ scripts

[PATCH V2 03/10] kasan: Rename kasan_enabled to kasan_report_enabled

2015-08-26 Thread Aneesh Kumar K.V
The function only disable/enable reporting. In the later patch we will be adding a kasan early enable/disable. Rename kasan_enabled to properly reflect its function. Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- mm/kasan/kasan.h | 2 +- mm/kasan/report.c | 2 +- 2 files

Re: [PATCH V2 04/10] kasan: Don't use kasan shadow pointer in generic functions

2015-08-26 Thread Aneesh Kumar K.V
Missed to cherry-pick the updated version of this patch, before sending the series out. commit aeb324e09d95c189eda4ce03790da94b535d1dfc Author: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com Date: Fri Aug 14 12:28:58 2015 +0530 kasan: Don't use kasan shadow pointer in generic functions

[PATCH V2 02/10] kasan: MODULE_VADDR is not available on all archs

2015-08-26 Thread Aneesh Kumar K.V
Conditionalize the check using #ifdef Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- mm/kasan/report.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/mm/kasan/report.c b/mm/kasan/report.c index e07c94fbd0ac..71ce7548d914 100644 --- a/mm/kasan

[PATCH V2 00/10] KASan ppc64 support

2015-08-26 Thread Aneesh Kumar K.V
: * Kasan is not yet enabled for arch/powerpc/kvm * kexec hang * outline stack and global support Once we fix the kexec hang, we can look at merging ppc64 patch. IMHO kasan changes can be reviewed/merged earlier Aneesh Kumar K.V (10): powerpc/mm: Add virt_to_pfn and use this instead of opencoding

[PATCH V2 04/10] kasan: Don't use kasan shadow pointer in generic functions

2015-08-26 Thread Aneesh Kumar K.V
this we will have to have a kasan internal implemen tation of print_hex_dump for which we will disable address sanitizer operation. Signed-off-by: Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com --- mm/kasan/report.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/mm/kasan/report.c b/mm

[PATCH] powerpc/mm: Disable hugepd for 64K page size.

2015-09-07 Thread Aneesh Kumar K.V
After commit e2b3d202d1dba8f3546ed28224ce485bc50010be ("powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format"), we don't need to support is_hugepd() for 64K page size. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/pow

[PATCH] powerpc/mm: Add virt_to_pfn and use this instead of opencoding

2015-09-03 Thread Aneesh Kumar K.V
This add helper virt_to_pfn and remove the opencoded usage of the same. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/page.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/page.h b/arch/p

Re: [RFC] powerpc/hugetlb: Add warning message when gpage allocation request fails

2015-09-14 Thread Aneesh Kumar K.V
Anshuman Khandual writes: > When a 16GB huge page is requested on POWER platform through kernel command > line interface, it silently fails because of the lack of any gigantic pages > on the system which the platform should have communicated through 16GB memory >

Re: [PATCH] powerpc/mm: Recompute hash value after a failed update

2015-09-15 Thread Aneesh Kumar K.V
Michael Ellerman <m...@ellerman.id.au> writes: > On Wed, 2015-09-16 at 08:53 +0530, Aneesh Kumar K.V wrote: >> "Aneesh Kumar K.V" <aneesh.ku...@linux.vnet.ibm.com> writes: >> >> > If we had secondary hash flag set, we ended up modifying ha

Re: [PATCH] powerpc/mm: Recompute hash value after a failed update

2015-09-15 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" <aneesh.ku...@linux.vnet.ibm.com> writes: > If we had secondary hash flag set, we ended up modifying hash value in > the updatepp code path. Hence with a failed updatepp we will be using > a wrong hash value for the following hash insert. Fix this by

[PATCH] powerpc/mm: Recompute hash value after a failed update

2015-09-15 Thread Aneesh Kumar K.V
If we had secondary hash flag set, we ended up modifying hash value in the updatepp code path. Hence with a failed updatepp we will be using a wrong hash value for the following hash insert. Fix this by recomputing hash before insert. Signed-off-by: Aneesh Kumar K.V <aneesh

Re: [PATCH] powerpc/mm: Recompute hash value after a failed update

2015-09-16 Thread Aneesh Kumar K.V
Michael Ellerman <m...@ellerman.id.au> writes: > On Wed, 2015-09-16 at 11:27 +0530, Aneesh Kumar K.V wrote: >> Michael Ellerman <m...@ellerman.id.au> writes: >> >> > On Wed, 2015-09-16 at 08:53 +0530, Aneesh Kumar K.V wrote: >> >> "Anees

Re: [PATCH 19/31] powerpc/mm: Convert 4k hash insert to C

2015-09-29 Thread Aneesh Kumar K.V
Benjamin Herrenschmidt <b...@kernel.crashing.org> writes: > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: >> Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> >> --- >> arch/powerpc/mm/Makefile| 3 + >>

[PATCH V2 01/31] powerpc/mm: move pte headers to book3s directory

2015-09-29 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/{pte-hash32.h => book3s/32/hash.h} | 0 arch/powerpc/include/asm/{pte-hash64.h => book3s/64/hash.h} | 0 arch/powerpc/include/asm/pgtable-ppc32.h| 2 +- arch/powerpc

[PATCH V2 06/31] powerpc/mm: Delete booke bits from book3s

2015-09-29 Thread Aneesh Kumar K.V
We also move __ASSEMBLY__ towards the end of header. This avoid having #ifndef __ASSEMBLY___ all over the header Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 93 +++- arch/powerpc/include/asm/

[PATCH V2 07/31] powerpc/mm: Don't have generic headers introduce functions touching pte bits

2015-09-29 Thread Aneesh Kumar K.V
We are going to drop pte_common.h in the later patch. The idea is to enable hash code not require to define all PTE bits. Having PTE bits defined in pte_common.h made the code unnecessarily complex. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/inclu

[PATCH V2 05/31] powerpc/mm: Move hash specific pte width and other defines to book3s

2015-09-29 Thread Aneesh Kumar K.V
This further make a copy of pte defines to book3s/64/hash*.h. This remove the dependency on ppc64-4k.h and ppc64-64k.h Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 87 ++- arch/powerpc/inclu

[PATCH V2 24/31] powerpc/mm: Convert __hash_page_64K to C

2015-09-29 Thread Aneesh Kumar K.V
Convert from asm to C Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 3 +- arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/powerpc/mm/hash64_64k.c | 134 +++- arch/powerpc/mm/hash_

[PATCH V2 10/31] powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue

2015-09-29 Thread Aneesh Kumar K.V
We convert them static inline function here as we did with pte_val in the previous patch Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 6 - arch/powerpc/include/asm/book3s/64/hash-4k.h | 6 - arch/powerpc/i

[PATCH V2 09/31] powerpc/mm: Don't use pte_val as lvalue

2015-09-29 Thread Aneesh Kumar K.V
We also convert few #define to static inline in this patch for better type checking Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/pgtable.h | 112 -- arch/powerpc/include/asm/page.h | 10 ++-

[PATCH V2 25/31] powerpc/mm: Convert 4k insert from asm to C

2015-09-29 Thread Aneesh Kumar K.V
This is similar to 64K insert. May be we want to consolidate Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/mm/Makefile| 6 +- arch/powerpc/mm/hash64_4k.c | 139 + arch/powerpc/mm/hash_low_64.S

[PATCH V2 11/31] powerpc/mm: Move hash64 PTE bits from book3s/64/pgtable.h to hash.h

2015-09-29 Thread Aneesh Kumar K.V
This enables us to keep hash64 related bits together, and makes it easy to follow. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash.h| 442 ++- arch/powerpc/include/asm/book3s/64/pgtable.h

[PATCH V2 12/31] powerpc/mm: Move PTE bits from generic functions to hash64 functions.

2015-09-29 Thread Aneesh Kumar K.V
functions which operate on pte bits are moved to hash*.h and other generic functions are moved to pgtable.h Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 177 arch/powerpc/include/asm/book3s/64/

[PATCH V2 04/31] powerpc/mm: make a separate copy for book3s (part 2)

2015-09-29 Thread Aneesh Kumar K.V
Keep it seperate to make rebasing easier Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/pgtable.h | 4 ++-- arch/powerpc/include/asm/book3s/64/pgtable.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH V2 14/31] powerpc/booke: Move booke headers (part 2)

2015-09-29 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/{pgtable-ppc32.h => nohash/32/pgtable.h} | 0 arch/powerpc/include/asm/{pgtable-ppc64.h => nohash/64/pgtable.h} | 2 +- arch/powerpc/include/asm/nohash/pgtable.h | 8

[PATCH V2 13/31] powerpc/booke: Move booke headers (part 1)

2015-09-29 Thread Aneesh Kumar K.V
Move the booke related headers below booke/32 or booke/64 We are splitting this change into multiple patch to make the rebasing easier. The following patches can be folded into this if needed. They are kept separate for easier review. Signed-off-by: Aneesh Kumar K.V <aneesh

[PATCH V2 28/31] powerpc/mm: Move WIMG update to helper.

2015-09-29 Thread Aneesh Kumar K.V
Only difference here is, we apply the WIMG mapping early, so rflags passed to updatepp will also be changed. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/mm/hash64_4k.c | 5 - arch/powerpc/mm/hash64_64k.c | 10 -- arch/p

[PATCH V2 29/31] powerpc/mm: Move hugetlb related headers

2015-09-29 Thread Aneesh Kumar K.V
W.r.t hugetlb, we support two format for pmd. With book3s_64 and 64K linux page size, we can have pte at the pmd level. Hence we don't need to support hugepd there. For everything else hugepd is supported and pmd_huge is (0). Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.

[PATCH V2 00/31] powerpc/mm: Update page table format for book3s 64

2015-09-29 Thread Aneesh Kumar K.V
enabled 2) pte_mkwrite fix for nohash 3) rebase to latest linus tree. Aneesh Kumar K.V (31): powerpc/mm: move pte headers to book3s directory powerpc/mm: move pte headers to book3s directory (part 2) powerpc/mm: make a separate copy for book3s powerpc/mm: make a separate copy for book3s (part 2

[PATCH V2 16/31] powerpc/booke: Move booke headers (part 4)

2015-09-29 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/nohash/32/pgtable.h | 16 arch/powerpc/include/asm/{ => nohash/32}/pte-40x.h | 0 arch/powerpc/include/asm/{ => nohash/32}/pte-44x.h | 0 arch/pow

[PATCH V2 15/31] powerpc/booke: Move booke headers (part 3)

2015-09-29 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- .../include/asm/{pgtable-ppc64-4k.h => nohash/64/pgtable-4k.h} | 0 .../asm/{pgtable-ppc64-64k.h => nohash/64/pgtable-64k.h} | 0 arch/powerpc/include/asm/nohash/64/pgtable.h | 10 +--

[PATCH V2 22/31] powerpc/mm: Don't track subpage valid bit in pte_t

2015-09-29 Thread Aneesh Kumar K.V
This free up 11 bits in pte_t. In the later patch we also change the pte_t format so that we can start supporting migration pte at pmd level. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 10 + arch/powerpc/i

[PATCH V2 23/31] powerpc/mm: Increase the width of #define

2015-09-29 Thread Aneesh Kumar K.V
No real change, only style changes Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash.h | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/include/asm/book3s/64/hash.h

[PATCH V2 30/31] powerpc/mm: Move THP headers around

2015-09-29 Thread Aneesh Kumar K.V
We support THP only with book3s_64 and 64K page size. Move THP details to hash64-64k.h to clarify the same. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 126 + arch/powerpc/include/asm/book3s/64/hash.h

[PATCH V2 31/31] powerpc/mm: Add a _PAGE_PTE bit

2015-09-29 Thread Aneesh Kumar K.V
hugepd. They also encode the size. We skip bit 1 (_PAGE_PRESENT). 3) othewise pointer to next table. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-4k.h | 9 ++--- arch/powerpc/include/asm/book3s/64/hash-64k.h | 23 +

[PATCH V2 03/31] powerpc/mm: make a separate copy for book3s

2015-09-29 Thread Aneesh Kumar K.V
In this patch we do: cp pgtable-ppc32.h book3s/32/pgtable.h cp pgtable-ppc64.h book3s/64/pgtable.h This enable us to do further changes to hash specific config. We will change the page table format for 64bit hash in later patches. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.

[PATCH V2 02/31] powerpc/mm: move pte headers to book3s directory (part 2)

2015-09-29 Thread Aneesh Kumar K.V
Splitting this so that rename can track changes to file. Before merging we will fold this Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/32/hash.h | 6 +++--- .../include/asm/{pte-hash64-4k.h => book3s/64/

[PATCH V2 18/31] powerpc/mm: Increase the pte frag size.

2015-09-29 Thread Aneesh Kumar K.V
We will use the increased size to store more information of 4K pte when using 64K page size. The idea is to free up bits in pte_t. Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/pgalloc-64.h | 12 ++-- 1 file changed, 6 insertions

[PATCH V2 17/31] powerpc/booke: Move booke headers (part 5)

2015-09-29 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/nohash/32/pte-40x.h | 6 +++--- arch/powerpc/include/asm/nohash/32/pte-44x.h | 6 +++--- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 6 +++--- arch/powerpc/include/asm/nohash/

[PATCH V2 27/31] powerpc/mm: Add helper for converting pte bit to hpte bits

2015-09-29 Thread Aneesh Kumar K.V
Instead of open coding it in multiple code paths, export the helper and add more documentation. Also make sure we don't make assumption regarding pte bit position Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash.h | 1 + arch/p

[PATCH V2 08/31] powerpc/mm: Drop pte-common.h from BOOK3S 64

2015-09-29 Thread Aneesh Kumar K.V
We copy only needed PTE bits define from pte-common.h to respective hash related header. This should greatly simply later patches in which we are going to change the pte format for hash config Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/

[PATCH V2 19/31] powerpc/mm: Convert 4k hash insert to C

2015-09-29 Thread Aneesh Kumar K.V
Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/mm/Makefile| 3 + arch/powerpc/mm/hash64_64k.c| 202 + arch/powerpc/mm/hash_low_64.S | 380 arch/powerpc/mm/hash_utils_64.c | 4

[PATCH V2 21/31] powerpc/mm: make pte page hash index slot 8 bits

2015-09-29 Thread Aneesh Kumar K.V
-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 48 +++ arch/powerpc/include/asm/book3s/64/hash.h | 5 --- arch/powerpc/include/asm/page.h | 4 +-- arch/powerpc/mm/hash64_64k.c

[PATCH V2 20/31] powerpc/mm: update __real_pte to take address as argument

2015-09-29 Thread Aneesh Kumar K.V
We will use this in the later patch to compute the right hash index Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/include/asm/book3s/64/hash-64k.h | 2 +- arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ++-- arch/powerpc/include/asm/nohash/64/pgt

[PATCH V2 26/31] powerpc/mm: Remove the dependency on pte bit position in asm code

2015-09-29 Thread Aneesh Kumar K.V
We should not expect pte bit position in asm code. Simply by moving part of that to C Signed-off-by: Aneesh Kumar K.V <aneesh.ku...@linux.vnet.ibm.com> --- arch/powerpc/kernel/exceptions-64s.S | 16 +++- arch/powerpc/mm/hash_utils_64.c | 29 + 2

<    7   8   9   10   11   12   13   14   15   16   >