Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12bb657e authored by Kaushal Kumar's avatar Kaushal Kumar
Browse files

arm/arm64: mm: add option to configure TLMM page attrs for 8953



Add and enable option to configure the TLMM register
region page attributes as strongly ordered for 8953
as needed for some of CPUSS sub-system functionality.

Change-Id: Id600fb5e853ca85e2d3949d0c168247c21d2d64f
Signed-off-by: default avatarKaushal Kumar <kaushalk@codeaurora.org>
parent e4aa3259
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -1442,6 +1442,15 @@ config HAVE_ARM_TWD
	help
	help
	  This options enables support for the ARM timer and watchdog unit
	  This options enables support for the ARM timer and watchdog unit


config ARCH_MSM8953_SOC_SETTINGS
	bool "Enable MSM8953 SOC settings"
	depends on ARCH_MSM8953
	help
	  Enable generic MSM8953 related settings which are required for
	  some of CPUSS sub-system functionality.

	  If you are not sure what to do, select 'N' here.

config MCPM
config MCPM
	bool "Multi-Cluster Power Management"
	bool "Multi-Cluster Power Management"
	depends on CPU_V7 && SMP
	depends on CPU_V7 && SMP
+1 −0
Original line number Original line Diff line number Diff line
@@ -220,6 +220,7 @@ config ARCH_MSM8953
	select MSM_RPM_SMD
	select MSM_RPM_SMD
	select MSM_JTAGV8 if CORESIGHT_ETMV4
	select MSM_JTAGV8 if CORESIGHT_ETMV4
	select ARCH_WANT_KMAP_ATOMIC_FLUSH
	select ARCH_WANT_KMAP_ATOMIC_FLUSH
	select ARCH_MSM8953_SOC_SETTINGS


config ARCH_MSM8909
config ARCH_MSM8909
	bool "MSM8909"
	bool "MSM8909"
+8 −2
Original line number Original line Diff line number Diff line
@@ -264,6 +264,7 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
	unsigned long addr;
	unsigned long addr;
	struct vm_struct *area;
	struct vm_struct *area;
	phys_addr_t paddr = __pfn_to_phys(pfn);
	phys_addr_t paddr = __pfn_to_phys(pfn);
	pgprot_t prot;


#ifndef CONFIG_ARM_LPAE
#ifndef CONFIG_ARM_LPAE
	/*
	/*
@@ -308,6 +309,12 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
 	addr = (unsigned long)area->addr;
 	addr = (unsigned long)area->addr;
	area->phys_addr = paddr;
	area->phys_addr = paddr;


	prot = __pgprot(type->prot_pte);
#ifdef CONFIG_ARCH_MSM8953_SOC_SETTINGS
	if (paddr >= MSM8953_TLMM_START_ADDR &&
	    paddr <= MSM8953_TLMM_END_ADDR)
		prot = pgprot_stronglyordered(type->prot_pte);
#endif
#if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE)
#if !defined(CONFIG_SMP) && !defined(CONFIG_ARM_LPAE)
	if (DOMAIN_IO == 0 &&
	if (DOMAIN_IO == 0 &&
	    (((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) ||
	    (((cpu_architecture() >= CPU_ARCH_ARMv6) && (get_cr() & CR_XP)) ||
@@ -320,8 +327,7 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
		err = remap_area_sections(addr, pfn, size, type);
		err = remap_area_sections(addr, pfn, size, type);
	} else
	} else
#endif
#endif
		err = ioremap_page_range(addr, addr + size, paddr,
		err = ioremap_page_range(addr, addr + size, paddr, prot);
					 __pgprot(type->prot_pte));


	if (err) {
	if (err) {
 		vunmap((void *)addr);
 		vunmap((void *)addr);
+10 −0
Original line number Original line Diff line number Diff line
@@ -297,6 +297,7 @@ config ARCH_MSM8940
config ARCH_MSM8953
config ARCH_MSM8953
	bool "Enable Support for Qualcomm Technologies Inc MSM8953"
	bool "Enable Support for Qualcomm Technologies Inc MSM8953"
	depends on ARCH_MSM
	depends on ARCH_MSM
	select ARCH_MSM8953_SOC_SETTINGS
	help
	help
	  This enables support for the MSM8953 chipset. If you don't
	  This enables support for the MSM8953 chipset. If you don't
	  know what to do here, say N
	  know what to do here, say N
@@ -552,6 +553,15 @@ config ENABLE_FP_SIMD_SETTINGS


	  If you are not sure what to do, select 'N' here.
	  If you are not sure what to do, select 'N' here.


config ARCH_MSM8953_SOC_SETTINGS
	bool "Enable MSM8953 SOC settings"
	depends on ARCH_MSM8953
	help
	  Enable generic MSM8953 related settings which are required for
	  some of CPUSS sub-system functionality.

	  If you are not sure what to do, select 'N' here.

config MSM_APP_SETTINGS
config MSM_APP_SETTINGS
	bool "Support to enable / disable app settings for MSM8996"
	bool "Support to enable / disable app settings for MSM8996"
	depends on ARCH_MSM8996
	depends on ARCH_MSM8996
+1 −0
Original line number Original line Diff line number Diff line
@@ -71,6 +71,7 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
#define PROT_SECT_DEFAULT	(PMD_TYPE_SECT | PMD_SECT_AF)
#define PROT_SECT_DEFAULT	(PMD_TYPE_SECT | PMD_SECT_AF)
#endif
#endif


#define PROT_DEVICE_nGnRnE	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRnE))
#define PROT_DEVICE_nGnRE	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE))
#define PROT_DEVICE_nGnRE	(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_DEVICE_nGnRE))
#define PROT_NORMAL_NC		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_NORMAL_NC))
#define PROT_NORMAL_NC		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_NORMAL_NC))
#define PROT_NORMAL		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_NORMAL))
#define PROT_NORMAL		(PROT_DEFAULT | PTE_PXN | PTE_UXN | PTE_ATTRINDX(MT_NORMAL))
Loading