Revert "CHROMIUM: mm: multigenerational lru: add arch_has_hw_pte_young()"
This reverts commit 668ac626337d1056bde5848b9b181f1b72fc3946.
This commit is contained in:
parent
be120f07b1
commit
d002c7ca3c
@ -58,10 +58,8 @@
|
|||||||
#define ARM64_WORKAROUND_1542419 37
|
#define ARM64_WORKAROUND_1542419 37
|
||||||
#define ARM64_SPECTRE_BHB 38
|
#define ARM64_SPECTRE_BHB 38
|
||||||
#define ARM64_WORKAROUND_1742098 39
|
#define ARM64_WORKAROUND_1742098 39
|
||||||
#define ARM64_HW_AF 40
|
|
||||||
|
|
||||||
/* kabi: reserve 40 - 62 for future cpu capabilities */
|
/* kabi: reserve 38 - 62 for future cpu capabilities */
|
||||||
#define ARM64_NCAPS 62
|
#define ARM64_NCAPS 62
|
||||||
|
|
||||||
|
|
||||||
#endif /* __ASM_CPUCAPS_H */
|
#endif /* __ASM_CPUCAPS_H */
|
||||||
|
@ -537,12 +537,6 @@ static inline bool system_supports_sve(void)
|
|||||||
cpus_have_const_cap(ARM64_SVE);
|
cpus_have_const_cap(ARM64_SVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool system_has_hw_af(void)
|
|
||||||
{
|
|
||||||
return IS_ENABLED(CONFIG_ARM64_HW_AFDBM) &&
|
|
||||||
cpus_have_const_cap(ARM64_HW_AF);
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool system_supports_cnp(void)
|
static inline bool system_supports_cnp(void)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
#include <asm/cmpxchg.h>
|
#include <asm/cmpxchg.h>
|
||||||
#include <asm/fixmap.h>
|
#include <asm/fixmap.h>
|
||||||
#include <asm/cpufeature.h>
|
|
||||||
#include <linux/mmdebug.h>
|
#include <linux/mmdebug.h>
|
||||||
#include <linux/mm_types.h>
|
#include <linux/mm_types.h>
|
||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
@ -783,12 +782,6 @@ extern pgd_t tramp_pg_dir[PTRS_PER_PGD];
|
|||||||
|
|
||||||
extern int kern_addr_valid(unsigned long addr);
|
extern int kern_addr_valid(unsigned long addr);
|
||||||
|
|
||||||
static inline bool arch_has_hw_pte_young(void)
|
|
||||||
{
|
|
||||||
return system_has_hw_af();
|
|
||||||
}
|
|
||||||
#define arch_has_hw_pte_young arch_has_hw_pte_young
|
|
||||||
|
|
||||||
#include <asm-generic/pgtable.h>
|
#include <asm-generic/pgtable.h>
|
||||||
|
|
||||||
void pgd_cache_init(void);
|
void pgd_cache_init(void);
|
||||||
|
@ -1347,16 +1347,6 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
|||||||
.matches = has_hw_dbm,
|
.matches = has_hw_dbm,
|
||||||
.cpu_enable = cpu_enable_hw_dbm,
|
.cpu_enable = cpu_enable_hw_dbm,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
.desc = "Hardware update of the Access flag",
|
|
||||||
.type = ARM64_CPUCAP_SYSTEM_FEATURE,
|
|
||||||
.capability = ARM64_HW_AF,
|
|
||||||
.sys_reg = SYS_ID_AA64MMFR1_EL1,
|
|
||||||
.sign = FTR_UNSIGNED,
|
|
||||||
.field_pos = ID_AA64MMFR1_HADBS_SHIFT,
|
|
||||||
.min_field_value = 1,
|
|
||||||
.matches = has_cpuid_feature,
|
|
||||||
},
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_ARM64_SSBD
|
#ifdef CONFIG_ARM64_SSBD
|
||||||
{
|
{
|
||||||
|
@ -1442,12 +1442,6 @@ static inline bool arch_has_pfn_modify_check(void)
|
|||||||
return boot_cpu_has_bug(X86_BUG_L1TF);
|
return boot_cpu_has_bug(X86_BUG_L1TF);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool arch_has_hw_pte_young(void)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
#define arch_has_hw_pte_young arch_has_hw_pte_young
|
|
||||||
|
|
||||||
#include <asm-generic/pgtable.h>
|
#include <asm-generic/pgtable.h>
|
||||||
#endif /* __ASSEMBLY__ */
|
#endif /* __ASSEMBLY__ */
|
||||||
|
|
||||||
|
@ -121,13 +121,6 @@ static inline int pmdp_clear_flush_young(struct vm_area_struct *vma,
|
|||||||
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef arch_has_hw_pte_young
|
|
||||||
static inline bool arch_has_hw_pte_young(void)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
|
#ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR
|
||||||
static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
|
static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
|
||||||
unsigned long address,
|
unsigned long address,
|
||||||
|
@ -4291,11 +4291,6 @@ static long get_nr_to_scan(struct lruvec *lruvec, struct scan_control *sc, int s
|
|||||||
if (get_hi_wmark(max_seq, min_seq, swappiness) > MIN_NR_GENS)
|
if (get_hi_wmark(max_seq, min_seq, swappiness) > MIN_NR_GENS)
|
||||||
return nr_to_scan;
|
return nr_to_scan;
|
||||||
|
|
||||||
if (!arch_has_hw_pte_young()) {
|
|
||||||
inc_max_seq(lruvec, max_seq);
|
|
||||||
return nr_to_scan;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* kswapd uses lru_gen_age_node() */
|
/* kswapd uses lru_gen_age_node() */
|
||||||
if (current_is_kswapd())
|
if (current_is_kswapd())
|
||||||
return 0;
|
return 0;
|
||||||
@ -4387,9 +4382,6 @@ static void lru_gen_age_node(struct pglist_data *pgdat, struct scan_control *sc)
|
|||||||
|
|
||||||
VM_BUG_ON(!current_is_kswapd());
|
VM_BUG_ON(!current_is_kswapd());
|
||||||
|
|
||||||
if (!arch_has_hw_pte_young())
|
|
||||||
return;
|
|
||||||
|
|
||||||
memcg = mem_cgroup_iter(NULL, NULL, NULL);
|
memcg = mem_cgroup_iter(NULL, NULL, NULL);
|
||||||
do {
|
do {
|
||||||
struct lruvec *lruvec = mem_cgroup_lruvec(pgdat, memcg);
|
struct lruvec *lruvec = mem_cgroup_lruvec(pgdat, memcg);
|
||||||
|
Loading…
Reference in New Issue
Block a user