mm/highmem.c
void __init page_address_init(void)
{
int i;
for (i = 0; i < ARRAY_SIZE(page_address_htable); i++) {
INIT_LIST_HEAD(&page_address_htable[i].lh);
spin_lock_init(&page_address_htable[i].lock);
}
}
/*
* Hash table bucket
*/
static struct page_address_slot {
struct list_head lh; /* List of page_address_maps */
spinlock_t lock; /* Protect this bucket‘s list */
} ____cacheline_aligned_in_smp page_address_htable[1<<PA_HASH_ORDER];
#define PA_HASH_ORDER 7
对page_address_htable中的128个元素进行初始化。
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-10-11 21:11:53