Skip to content

Commit 5b84529

Browse files
author
Pengfei Li
committed
ANDROID: mm: Export several symbols
Exports several symbols which are used in the vendor ko. mte_sync_tags - It is used by the macro set_pte_at. mthp_stats - It is used by mod_mthp_stat(). swapper_spaces - It is used by macro swap_address_space. swap_migration_ad_supported - It is used by make_migration_entry_young(). __mmu_notifier_invalidate_range_start __mmu_notifier_arch_invalidate_secondary_tlbs __mmu_notifier_invalidate_range_end - These three functions are used in vendors ko to invalidate and refresh the tlb. Bug: 431672372 Bug: 435545311 Change-Id: I5f61af22ed9c11cd5c5a79eaa49a62c5153693b9 Signed-off-by: Pengfei Li <pengfei.kernel@vivo.corp-partner.google.com> (cherry picked from commit 8a9183c5070d253367df1933eb6e6b30da7d91ba)
1 parent 92fd103 commit 5b84529

File tree

5 files changed

+7
-0
lines changed

5 files changed

+7
-0
lines changed

arch/arm64/kernel/mte.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ void mte_sync_tags(pte_t pte, unsigned int nr_pages)
5151
/* ensure the tags are visible before the PTE is set */
5252
smp_wmb();
5353
}
54+
EXPORT_SYMBOL_GPL(mte_sync_tags);
5455

5556
int memcmp_pages(struct page *page1, struct page *page2)
5657
{

mm/huge_memory.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,7 @@ static const struct kobj_type thpsize_ktype = {
576576
};
577577

578578
DEFINE_PER_CPU(struct mthp_stat, mthp_stats) = {{{0}}};
579+
EXPORT_SYMBOL_GPL(mthp_stats);
579580

580581
static unsigned long sum_mthp_stat(int order, enum mthp_stat_item item)
581582
{

mm/mmu_notifier.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ int __mmu_notifier_invalidate_range_start(struct mmu_notifier_range *range)
533533
return mn_hlist_invalidate_range_start(subscriptions, range);
534534
return 0;
535535
}
536+
EXPORT_SYMBOL_GPL(__mmu_notifier_invalidate_range_start);
536537

537538
static void
538539
mn_hlist_invalidate_end(struct mmu_notifier_subscriptions *subscriptions,
@@ -569,6 +570,7 @@ void __mmu_notifier_invalidate_range_end(struct mmu_notifier_range *range)
569570
mn_hlist_invalidate_end(subscriptions, range);
570571
lock_map_release(&__mmu_notifier_invalidate_range_start_map);
571572
}
573+
EXPORT_SYMBOL_GPL(__mmu_notifier_invalidate_range_end);
572574

573575
void __mmu_notifier_arch_invalidate_secondary_tlbs(struct mm_struct *mm,
574576
unsigned long start, unsigned long end)
@@ -587,6 +589,7 @@ void __mmu_notifier_arch_invalidate_secondary_tlbs(struct mm_struct *mm,
587589
}
588590
srcu_read_unlock(&srcu, id);
589591
}
592+
EXPORT_SYMBOL_GPL(__mmu_notifier_arch_invalidate_secondary_tlbs);
590593

591594
/*
592595
* Same as mmu_notifier_register but here the caller must hold the mmap_lock in

mm/swap_state.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static const struct address_space_operations swap_aops = {
3939
};
4040

4141
struct address_space *swapper_spaces[MAX_SWAPFILES] __read_mostly;
42+
EXPORT_SYMBOL_GPL(swapper_spaces);
4243
static unsigned int nr_swapper_spaces[MAX_SWAPFILES] __read_mostly;
4344
static bool enable_vma_readahead __read_mostly = true;
4445

mm/swapfile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ static int least_priority = -1;
8181
unsigned long swapfile_maximum_size;
8282
#ifdef CONFIG_MIGRATION
8383
bool swap_migration_ad_supported;
84+
EXPORT_SYMBOL_GPL(swap_migration_ad_supported);
8485
#endif /* CONFIG_MIGRATION */
8586

8687
static const char Bad_file[] = "Bad swap file entry ";

0 commit comments

Comments
 (0)