Function report |
Source Code:arch\x86\kernel\espfix_64.c |
Create Date:2022-07-28 07:42:27 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:init_espfix_ap
Proto:void init_espfix_ap(int cpu)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
int | cpu |
143 | If Value is more likely to compile time(per_cpu(This contains the *bottom* address of the espfix stack , cpu)) Then Return |
147 | page = cpu / ESPFIX_STACKS_PER_PAGE |
150 | stack_page = READ_ONCE(espfix_pages[page]) |
151 | If Value is more likely to compile time(stack_page) Then Go to done |
157 | stack_page = READ_ONCE(espfix_pages[page]) |
158 | If stack_page Then Go to unlock_done |
161 | node = cpu_to_node(cpu) |
162 | ptemask = __supported_pte_mask |
164 | pud_p = espfix_pud_page[pud_index(addr)] |
166 | If Not pud_present(pud) Then |
167 | page = Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,* prefer the current CPU's closest node. Otherwise node must be valid and* online. |
169 | pmd_p = page_address(page) |
171 | paravirt_alloc_pmd( & init_mm, __pa(pmd_p) >> PAGE_SHIFT determines the page size ) |
176 | pmd_p = pmd_offset( & pud, addr) |
178 | If Not pmd_present(pmd) Then |
179 | page = Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,* prefer the current CPU's closest node. Otherwise node must be valid and* online. |
181 | pte_p = page_address(page) |
183 | paravirt_alloc_pte( & init_mm, __pa(pte_p) >> PAGE_SHIFT determines the page size ) |
188 | pte_p = pte_offset_kernel( & pmd, addr) |
189 | stack_page = page_address(Allocate pages, preferring the node given as nid. When nid == NUMA_NO_NODE,* prefer the current CPU's closest node. Otherwise node must be valid and* online.) |
194 | pte = __pte(__pa(stack_page) | ((__PAGE_KERNEL_RO | _PAGE_ENC) & ptemask)) |
195 | When n < ESPFIX_PTE_CLONES cycle set_pte( & pte_p[n * PTE_STRIDE], pte) |
199 | WRITE_ONCE(espfix_pages[page], stack_page) |
201 | unlock_done : |
203 | done : |
205 | per_cpu(espfix_waddr, cpu) = stack_page + (addr & ~PAGE_MASK) |
Name | Describe |
---|---|
init_espfix_bsp | |
do_boot_cpu | NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad* (ie clustered apic addressing mode), this is a LOGICAL apic ID.* Returns zero if CPU booted OK, else error code from* ->wakeup_secondary_cpu. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |