remarkable-linux/arch/powerpc/mm
Bharata B Rao 2f7d03e051 powerpc/mm/drmem: Fix unexpected flag value in ibm,dynamic-memory-v2
Memory addtion and removal by count and indexed-count methods
temporarily mark the LMBs that are being added/removed by a special
flag value DRMEM_LMB_RESERVED. Accessing flags value directly at a few
places without proper accessor method is causing two unexpected
side-effects:

- DRMEM_LMB_RESERVED bit is becoming part of the flags word of
  drconf_cell_v2 entries in ibm,dynamic-memory-v2 DT property.
- This results in extra drconf_cell entries in ibm,dynamic-memory-v2.
  For example if 1G memory is added, it leads to one entry for 3 LMBs
  and 1 separate entry for the last LMB. All the 4 LMBs should be
  defined by one entry here.

Fix this by always accessing the flags by its accessor method
drmem_lmb_flags().

Fixes: 2b31e3aec1 ("powerpc/drmem: Add support for ibm, dynamic-memory-v2 property")
Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-02-23 16:45:51 +11:00
..
8xx_mmu.c powerpc/8xx: Use L1 entry APG to handle _PAGE_ACCESSED for CONFIG_SWAP 2018-01-16 23:47:15 +11:00
40x_mmu.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
44x_mmu.c powerpc: Delete __cpuinit usage from all users 2013-07-01 11:10:36 +10:00
copro_fault.c powerpc/mm: Update PROTFAULT handling in the page fault path 2017-02-15 20:02:39 +11:00
dma-noncoherent.c powerpc/mm: Rename map_page() to map_kernel_page() on 32-bit 2017-06-05 19:59:03 +10:00
drmem.c powerpc/mm/drmem: Fix unexpected flag value in ibm,dynamic-memory-v2 2018-02-23 16:45:51 +11:00
dump_hashpagetable.c powerpc/64s: Replace CONFIG_PPC_STD_MMU_64 with CONFIG_PPC_BOOK3S_64 2017-11-06 16:48:14 +11:00
dump_linuxpagetables.c powerpc/mm: Introduce _PAGE_NA 2018-01-16 23:47:14 +11:00
fault.c Merge branch 'fixes' into next 2018-01-21 23:21:14 +11:00
fsl_booke_mmu.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
hash64_4k.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
hash64_64k.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
hash_low_32.S powerpc: fix location of two EXPORT_SYMBOL 2017-09-01 16:42:45 +10:00
hash_native_64.c powerpc/64s: Improve local TLB flush for boot and MCE on POWER9 2018-01-18 00:40:31 +11:00
hash_utils_64.c powerpc/mm: Fix crashes with 16G huge pages 2018-02-13 22:37:47 +11:00
highmem.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hugepage-hash64.c powerpc/mm: Move hash table ops to a separate structure 2016-07-21 18:59:09 +10:00
hugetlbpage-book3e.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hugetlbpage-hash64.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
hugetlbpage-radix.c powerpc updates for 4.15 2017-11-16 12:47:46 -08:00
hugetlbpage.c powerpc/64: Rename soft_enabled to irq_soft_mask 2018-01-19 22:37:01 +11:00
init-common.c powerpc/mm: Fix crashes with 16G huge pages 2018-02-13 22:37:47 +11:00
init_32.c powerpc/mm/hugetlb: Add support for reserving gigantic huge pages via kernel command line 2017-08-16 14:56:12 +10:00
init_64.c libnvdimm for 4.16 2018-02-06 10:41:33 -08:00
Makefile powerpc: initial pkey plumbing 2018-01-20 21:45:03 +11:00
mem.c libnvdimm for 4.16 2018-02-06 10:41:33 -08:00
mmap.c powerpc/64s: mm_context.addr_limit is only used on hash 2017-11-13 23:35:43 +11:00
mmu_context.c powerpc, membarrier: Skip memory barrier in switch_mm() 2018-02-05 21:34:02 +01:00
mmu_context_book3s64.c powerpc: track allocation status of all pkeys 2018-01-20 22:58:35 +11:00
mmu_context_hash32.c powerpc: Remove power3 from comments 2014-07-28 14:10:26 +10:00
mmu_context_iommu.c Merge branch 'topic/ppc-kvm' into next 2017-04-28 20:19:37 +10:00
mmu_context_nohash.c powerpc/mm/nohash: MM_SLICE is only used by book3s 64 2017-03-31 23:09:47 +11:00
mmu_decl.h powerpc/8xx: Getting rid of remaining use of CONFIG_8xx 2017-08-10 23:32:12 +10:00
numa.c powerpc/numa: Invalidate numa_cpu_lookup_table on cpu remove 2018-02-08 23:56:10 +11:00
pgtable-book3e.c powerpc/mm: Make page table size a variable 2016-05-01 18:32:48 +10:00
pgtable-book3s64.c powerpc/mm: update pmdp_invalidate to return old pmd value 2018-01-31 17:18:37 -08:00
pgtable-hash64.c mm/thp: remove pmd_huge_split_prepare() 2018-01-31 17:18:38 -08:00
pgtable-radix.c powerpc/mm: Fix crashes with 16G huge pages 2018-02-13 22:37:47 +11:00
pgtable.c powerpc/mm: extend _PAGE_PRIVILEGED to all CPUs 2018-01-16 23:47:13 +11:00
pgtable_32.c powerpc/mm: extend _PAGE_PRIVILEGED to all CPUs 2018-01-16 23:47:13 +11:00
pgtable_64.c powerpc/mm: Fix crashes with 16G huge pages 2018-02-13 22:37:47 +11:00
pkeys.c powerpc: Enable pkey subsystem 2018-01-21 01:06:10 +11:00
ppc_mmu_32.c powerpc32: refactor x_mapped_by_bats() and x_mapped_by_tlbcam() together 2016-03-11 17:18:02 -06:00
slb.c powerpc/64s: Rename slb_allocate_realmode() to slb_allocate() 2017-06-21 16:18:33 +10:00
slb_low.S powerpc/64s: mm_context.addr_limit is only used on hash 2017-11-13 23:35:43 +11:00
slice.c powerpc/64s/slice: Use addr limit when computing slice mask 2017-11-20 19:28:25 +11:00
subpage-prot.c powerpc/mm: Invalidate subpage_prot() system call on radix platforms 2018-01-21 01:12:21 +11:00
tlb-radix.c powerpc/radix: Remove trace_tlbie call from radix__flush_tlb_all 2018-01-22 05:48:35 +11:00
tlb_hash32.c powerpc/mm: remove flush_tlb_page_nohash 2016-08-01 11:15:13 +10:00
tlb_hash64.c powerpc/mm/hash64: Store the slot information at the right offset for hugetlb 2018-02-13 22:37:48 +11:00
tlb_low_64e.S powerpc: Fix misspellings in comments. 2016-03-01 19:27:20 +11:00
tlb_nohash.c powerpc/mm/nohash: do not flush the entire mm when range is a single page 2018-01-27 20:24:44 +11:00
tlb_nohash_low.S powerpc/8xx: Getting rid of remaining use of CONFIG_8xx 2017-08-10 23:32:12 +10:00
vphn.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vphn.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00