* [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table [not found] <20230116140520.116257-1-sashal@kernel.org> @ 2023-01-16 14:05 ` Sasha Levin 2023-01-16 18:30 ` Catalin Marinas 2023-01-16 14:05 ` [PATCH AUTOSEL 5.4 06/16] cpufreq: armada-37xx: stop using 0 as NULL pointer Sasha Levin 1 sibling, 1 reply; 4+ messages in thread From: Sasha Levin @ 2023-01-16 14:05 UTC (permalink / raw) To: linux-kernel, stable Cc: Will Deacon, kernel test robot, Sasha Levin, catalin.marinas, akpm, anshuman.khandual, wangkefeng.wang, liushixin2, david, tongtiangen, yuzhao, linux-arm-kernel From: Will Deacon <will@kernel.org> [ Upstream commit 4e4ff23a35ee3a145fbc8378ecfeaab2d235cddd ] With only two levels of page-table, the generic 'pud_*' macros are implemented using dummy operations in pgtable-nopmd.h. Since commit 730a11f982e6 ("arm64/mm: add pud_user_exec() check in pud_user_accessible_page()"), pud_user_accessible_page() unconditionally calls pud_user_exec(), which is an arm64-specific helper and therefore isn't defined by pgtable-nopmd.h. This results in a build failure for configurations with only two levels of page table: arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page': >> arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration] 870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud)); | ^~~~~~~~~~~~~ | pmd_user_exec Fix the problem by defining pud_user_exec() as pud_user() in this case. Link: https://lore.kernel.org/r/202301080515.z6zEksU4-lkp@intel.com Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Will Deacon <will@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> --- arch/arm64/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h index 3a057d427900..68d5fbbd0f8a 100644 --- a/arch/arm64/include/asm/pgtable.h +++ b/arch/arm64/include/asm/pgtable.h @@ -588,6 +588,7 @@ static inline phys_addr_t pud_page_paddr(pud_t pud) #else #define pud_page_paddr(pud) ({ BUILD_BUG(); 0; }) +#define pud_user_exec(pud) pud_user(pud) /* Always 0 with folding */ /* Match pmd_offset folding in <asm/generic/pgtable-nopmd.h> */ #define pmd_set_fixmap(addr) NULL -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table 2023-01-16 14:05 ` [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Sasha Levin @ 2023-01-16 18:30 ` Catalin Marinas 2023-01-23 0:59 ` Sasha Levin 0 siblings, 1 reply; 4+ messages in thread From: Catalin Marinas @ 2023-01-16 18:30 UTC (permalink / raw) To: Sasha Levin Cc: linux-kernel, stable, Will Deacon, kernel test robot, akpm, anshuman.khandual, wangkefeng.wang, liushixin2, david, tongtiangen, yuzhao, linux-arm-kernel On Mon, Jan 16, 2023 at 09:05:08AM -0500, Sasha Levin wrote: > From: Will Deacon <will@kernel.org> > > [ Upstream commit 4e4ff23a35ee3a145fbc8378ecfeaab2d235cddd ] > > With only two levels of page-table, the generic 'pud_*' macros are > implemented using dummy operations in pgtable-nopmd.h. Since commit > 730a11f982e6 ("arm64/mm: add pud_user_exec() check in > pud_user_accessible_page()"), pud_user_accessible_page() unconditionally > calls pud_user_exec(), which is an arm64-specific helper and therefore > isn't defined by pgtable-nopmd.h. This results in a build failure for > configurations with only two levels of page table: > > arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page': > >> arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration] > 870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud)); > | ^~~~~~~~~~~~~ > | pmd_user_exec > > Fix the problem by defining pud_user_exec() as pud_user() in this case. > > Link: https://lore.kernel.org/r/202301080515.z6zEksU4-lkp@intel.com > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Will Deacon <will@kernel.org> > Signed-off-by: Sasha Levin <sashal@kernel.org> I don't think this patch should be backported to 5.4. It is a fix for a commit that went in shortly before this one (730a11f982e6). The latter commit does have a Fixes tag but I guess Will thought it's not worth a cc stable (and it's up to 5.19 anyway). -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table 2023-01-16 18:30 ` Catalin Marinas @ 2023-01-23 0:59 ` Sasha Levin 0 siblings, 0 replies; 4+ messages in thread From: Sasha Levin @ 2023-01-23 0:59 UTC (permalink / raw) To: Catalin Marinas Cc: linux-kernel, stable, Will Deacon, kernel test robot, akpm, anshuman.khandual, wangkefeng.wang, liushixin2, david, tongtiangen, yuzhao, linux-arm-kernel On Mon, Jan 16, 2023 at 06:30:47PM +0000, Catalin Marinas wrote: >On Mon, Jan 16, 2023 at 09:05:08AM -0500, Sasha Levin wrote: >> From: Will Deacon <will@kernel.org> >> >> [ Upstream commit 4e4ff23a35ee3a145fbc8378ecfeaab2d235cddd ] >> >> With only two levels of page-table, the generic 'pud_*' macros are >> implemented using dummy operations in pgtable-nopmd.h. Since commit >> 730a11f982e6 ("arm64/mm: add pud_user_exec() check in >> pud_user_accessible_page()"), pud_user_accessible_page() unconditionally >> calls pud_user_exec(), which is an arm64-specific helper and therefore >> isn't defined by pgtable-nopmd.h. This results in a build failure for >> configurations with only two levels of page table: >> >> arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page': >> >> arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration] >> 870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud)); >> | ^~~~~~~~~~~~~ >> | pmd_user_exec >> >> Fix the problem by defining pud_user_exec() as pud_user() in this case. >> >> Link: https://lore.kernel.org/r/202301080515.z6zEksU4-lkp@intel.com >> Reported-by: kernel test robot <lkp@intel.com> >> Signed-off-by: Will Deacon <will@kernel.org> >> Signed-off-by: Sasha Levin <sashal@kernel.org> > >I don't think this patch should be backported to 5.4. It is a fix for a >commit that went in shortly before this one (730a11f982e6). The latter >commit does have a Fixes tag but I guess Will thought it's not worth a >cc stable (and it's up to 5.19 anyway). Ack, I'll drop it. -- Thanks, Sasha _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH AUTOSEL 5.4 06/16] cpufreq: armada-37xx: stop using 0 as NULL pointer [not found] <20230116140520.116257-1-sashal@kernel.org> 2023-01-16 14:05 ` [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Sasha Levin @ 2023-01-16 14:05 ` Sasha Levin 1 sibling, 0 replies; 4+ messages in thread From: Sasha Levin @ 2023-01-16 14:05 UTC (permalink / raw) To: linux-kernel, stable Cc: Miles Chen, Viresh Kumar, Sasha Levin, andrew, gregory.clement, sebastian.hesselbarth, rafael, matthias.bgg, linux-arm-kernel, linux-pm, linux-mediatek From: Miles Chen <miles.chen@mediatek.com> [ Upstream commit 08f0adb193c008de640fde34a2e00a666c01d77c ] Use NULL for NULL pointer to fix the following sparse warning: drivers/cpufreq/armada-37xx-cpufreq.c:448:32: sparse: warning: Using plain integer as NULL pointer Signed-off-by: Miles Chen <miles.chen@mediatek.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/cpufreq/armada-37xx-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cpufreq/armada-37xx-cpufreq.c b/drivers/cpufreq/armada-37xx-cpufreq.c index 2de7fd18f66a..f0be8a43ec49 100644 --- a/drivers/cpufreq/armada-37xx-cpufreq.c +++ b/drivers/cpufreq/armada-37xx-cpufreq.c @@ -443,7 +443,7 @@ static int __init armada37xx_cpufreq_driver_init(void) return -ENODEV; } - clk = clk_get(cpu_dev, 0); + clk = clk_get(cpu_dev, NULL); if (IS_ERR(clk)) { dev_err(cpu_dev, "Cannot get clock for CPU0\n"); return PTR_ERR(clk); -- 2.35.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-23 1:00 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20230116140520.116257-1-sashal@kernel.org> 2023-01-16 14:05 ` [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table Sasha Levin 2023-01-16 18:30 ` Catalin Marinas 2023-01-23 0:59 ` Sasha Levin 2023-01-16 14:05 ` [PATCH AUTOSEL 5.4 06/16] cpufreq: armada-37xx: stop using 0 as NULL pointer Sasha Levin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).