mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mm: convert totalram_pages and totalhigh_pages variables to atomic
totalram_pages and totalhigh_pages are made static inline function. Main motivation was that managed_page_count_lock handling was complicating things. It was discussed in length here, https://lore.kernel.org/patchwork/patch/995739/#1181785 So it seemes better to remove the lock and convert variables to atomic, with preventing poteintial store-to-read tearing as a bonus. [[email protected]: coding style fixes] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arun KS <[email protected]> Suggested-by: Michal Hocko <[email protected]> Suggested-by: Vlastimil Babka <[email protected]> Reviewed-by: Konstantin Khlebnikov <[email protected]> Reviewed-by: Pavel Tatashin <[email protected]> Acked-by: Michal Hocko <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: David Hildenbrand <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9705bea5f8
commit
ca79b0c211
53 changed files with 131 additions and 81 deletions
|
|
@ -855,7 +855,7 @@ static int mtk_vpu_probe(struct platform_device *pdev)
|
|||
/* Set PTCM to 96K and DTCM to 32K */
|
||||
vpu_cfg_writel(vpu, 0x2, VPU_TCM_CFG);
|
||||
|
||||
vpu->enable_4GB = !!(totalram_pages > (SZ_2G >> PAGE_SHIFT));
|
||||
vpu->enable_4GB = !!(totalram_pages() > (SZ_2G >> PAGE_SHIFT));
|
||||
dev_info(dev, "4GB mode %u\n", vpu->enable_4GB);
|
||||
|
||||
if (vpu->enable_4GB) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue