Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) // Copyright (C) 2012 ARM Limited
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) // Copyright (C) 2005-2017 Andes Technology Corporation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) #include <linux/cache.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) #include <linux/clocksource.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #include <linux/elf.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #include <linux/err.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) #include <linux/errno.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #include <linux/gfp.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #include <linux/mm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #include <linux/sched.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #include <linux/signal.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #include <linux/slab.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #include <linux/timekeeper_internal.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #include <linux/vmalloc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #include <linux/random.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #include <asm/cacheflush.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #include <asm/vdso.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) #include <asm/vdso_datapage.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #include <asm/vdso_timer_info.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #include <asm/cache_info.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) extern struct cache_info L1_cache_info[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) extern char vdso_start[], vdso_end[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) static unsigned long vdso_pages __ro_after_init;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) static unsigned long timer_mapping_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) struct timer_info_t timer_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) 	.cycle_count_down = true,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 	.mapping_base = EMPTY_TIMER_MAPPING,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 	.cycle_count_reg_offset = EMPTY_REG_OFFSET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36)  * The vDSO data page.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) static struct page *no_pages[] = { NULL };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) static union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 	struct vdso_data data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 	u8 page[PAGE_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) } vdso_data_store __page_aligned_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) struct vdso_data *vdso_data = &vdso_data_store.data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) static struct vm_special_mapping vdso_spec[2] __ro_after_init = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 	 .name = "[vvar]",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 	 .pages = no_pages,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 	 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 	 .name = "[vdso]",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 	 },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) static void get_timer_node_info(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	timer_mapping_base = timer_info.mapping_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	vdso_data->cycle_count_offset =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 		timer_info.cycle_count_reg_offset;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 	vdso_data->cycle_count_down =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) 		timer_info.cycle_count_down;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) static int __init vdso_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	int i;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 	struct page **vdso_pagelist;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 	if (memcmp(vdso_start, "\177ELF", 4)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 		pr_err("vDSO is not a valid ELF object!\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 		return -EINVAL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) 	/* Creat a timer io mapping to get clock cycles counter */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 	get_timer_node_info();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	vdso_pages = (vdso_end - vdso_start) >> PAGE_SHIFT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	pr_info("vdso: %ld pages (%ld code @ %p, %ld data @ %p)\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 		vdso_pages + 1, vdso_pages, vdso_start, 1L, vdso_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	/* Allocate the vDSO pagelist */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 	vdso_pagelist = kcalloc(vdso_pages, sizeof(struct page *), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	if (vdso_pagelist == NULL)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	for (i = 0; i < vdso_pages; i++)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 		vdso_pagelist[i] = virt_to_page(vdso_start + i * PAGE_SIZE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	vdso_spec[1].pages = &vdso_pagelist[0];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) arch_initcall(vdso_init);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) unsigned long inline vdso_random_addr(unsigned long vdso_mapping_len)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 	unsigned long start = current->mm->mmap_base, end, offset, addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	start = PAGE_ALIGN(start);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	/* Round the lowest possible end address up to a PMD boundary. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	end = (start + vdso_mapping_len + PMD_SIZE - 1) & PMD_MASK;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	if (end >= TASK_SIZE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 		end = TASK_SIZE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 	end -= vdso_mapping_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	if (end > start) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 		offset = get_random_int() % (((end - start) >> PAGE_SHIFT) + 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 		addr = start + (offset << PAGE_SHIFT);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 		addr = start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) 	return addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) 	struct mm_struct *mm = current->mm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 	unsigned long vdso_base, vdso_text_len, vdso_mapping_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) 	struct vm_area_struct *vma;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 	unsigned long addr = 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) 	pgprot_t prot;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	int ret, vvar_page_num = 2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	vdso_text_len = vdso_pages << PAGE_SHIFT;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 	if(timer_mapping_base == EMPTY_VALUE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 		vvar_page_num = 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 	/* Be sure to map the data page */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	vdso_mapping_len = vdso_text_len + vvar_page_num * PAGE_SIZE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) #ifdef CONFIG_CPU_CACHE_ALIASING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 	vdso_mapping_len += L1_cache_info[DCACHE].aliasing_num - 1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	if (mmap_write_lock_killable(mm))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		return -EINTR;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	addr = vdso_random_addr(vdso_mapping_len);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	vdso_base = get_unmapped_area(NULL, addr, vdso_mapping_len, 0, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	if (IS_ERR_VALUE(vdso_base)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 		ret = vdso_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 		goto up_fail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) #ifdef CONFIG_CPU_CACHE_ALIASING
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	{
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 		unsigned int aliasing_mask =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 		    L1_cache_info[DCACHE].aliasing_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 		unsigned int page_colour_ofs;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 		page_colour_ofs = ((unsigned int)vdso_data & aliasing_mask) -
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 		    (vdso_base & aliasing_mask);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 		vdso_base += page_colour_ofs & aliasing_mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	vma = _install_special_mapping(mm, vdso_base, vvar_page_num * PAGE_SIZE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 				       VM_READ | VM_MAYREAD, &vdso_spec[0]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	if (IS_ERR(vma)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 		ret = PTR_ERR(vma);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 		goto up_fail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 	/*Map vdata to user space */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	ret = io_remap_pfn_range(vma, vdso_base,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 				 virt_to_phys(vdso_data) >> PAGE_SHIFT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 				 PAGE_SIZE, vma->vm_page_prot);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		goto up_fail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	/*Map timer to user space */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	vdso_base += PAGE_SIZE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	prot = __pgprot(_PAGE_V | _PAGE_M_UR_KR | _PAGE_D |  _PAGE_C_DEV);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	ret = io_remap_pfn_range(vma, vdso_base, timer_mapping_base >> PAGE_SHIFT,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 				 PAGE_SIZE, prot);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	if (ret)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 		goto up_fail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	/*Map vdso to user space */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	vdso_base += PAGE_SIZE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	mm->context.vdso = (void *)vdso_base;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 	vma = _install_special_mapping(mm, vdso_base, vdso_text_len,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 				       VM_READ | VM_EXEC |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 				       VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 				       &vdso_spec[1]);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 	if (IS_ERR(vma)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		ret = PTR_ERR(vma);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		goto up_fail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 	mmap_write_unlock(mm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) up_fail:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 	mm->context.vdso = NULL;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 	mmap_write_unlock(mm);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 	return ret;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) static void vdso_write_begin(struct vdso_data *vdata)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 	++vdso_data->seq_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) 	smp_wmb();		/* Pairs with smp_rmb in vdso_read_retry */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) static void vdso_write_end(struct vdso_data *vdata)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	smp_wmb();		/* Pairs with smp_rmb in vdso_read_begin */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 	++vdso_data->seq_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) void update_vsyscall(struct timekeeper *tk)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	vdso_write_begin(vdso_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	vdso_data->cs_mask = tk->tkr_mono.mask;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 	vdso_data->cs_mult = tk->tkr_mono.mult;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 	vdso_data->cs_shift = tk->tkr_mono.shift;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) 	vdso_data->cs_cycle_last = tk->tkr_mono.cycle_last;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 	vdso_data->wtm_clock_sec = tk->wall_to_monotonic.tv_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 	vdso_data->wtm_clock_nsec = tk->wall_to_monotonic.tv_nsec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	vdso_data->xtime_clock_sec = tk->xtime_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	vdso_data->xtime_clock_nsec = tk->tkr_mono.xtime_nsec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	vdso_data->xtime_coarse_sec = tk->xtime_sec;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	vdso_data->xtime_coarse_nsec = tk->tkr_mono.xtime_nsec >>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) 	    tk->tkr_mono.shift;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 	vdso_data->hrtimer_res = hrtimer_resolution;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) 	vdso_write_end(vdso_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) void update_vsyscall_tz(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 	vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) 	vdso_data->tz_dsttime = sys_tz.tz_dsttime;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) }