Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\apic\x2apic_uv_x.c Create Date:2022-07-28 08:33:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Build GAM range lookup table:

Proto:static __init void build_uv_gr_table(void)

Type:void

Parameter:Nothing

474  gre = uv_gre_table
476  last_limit = 0 , ram_limit = 0
477  lsid = -1 , indx = 0 , lindx = -1
479  If Not gre Then Return
482  bytes = _gr_table_len * sizeof(structuv_gam_range_s)
483  grt = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
484  BUG_ON(!grt)
485  _gr_table = grt
487  When Entry type: GAM_RANGE_TYPE_UNUSED, etc. != End of table cycle
489  If Not ram_limit Then
497  pr_info("UV: extra hole in GAM RE table @%d\n", (int)(gre - uv_gre_table))
498  Continue
501  pr_err("UV: GAM table sockid(%d) too large(>%d) @%d\n", Socket ID, high bits of APIC ID , _max_socket, (int)(gre - uv_gre_table))
502  Continue
504  sid = Socket ID, high bits of APIC ID - _min_socket
505  If lsid < sid Then
507  grt = _gr_table[indx]
511  lsid = sid
512  lindx = indx++
513  Continue
516  If lsid == sid && Not ram_limit Then
524  If Not ram_limit Then
525  grt++
529  Continue
532  grt++
534  ry index of node's base addr = grt - _gr_table
535  de's global physical address = HNasid
536  PA bits 56:26 (GAM_RANGE_SHFT) = last_limit = PA bits 56:26 (UV_GAM_RANGE_SHFT)
537  lsid++
541  grt++
542  i = grt - _gr_table
543  If i < _gr_table_len Then
546  bytes = i * sizeof(structuv_gam_range_s)
547  ret = krealloc(_gr_table, bytes, GFP_KERNEL)
548  If ret Then
549  _gr_table = ret
550  _gr_table_len = i
555  When i < _gr_table_len cycle
557  gb = ry index of node's base addr
559  start = If gb < 0 Then 0 Else PA bits 56:26 (GAM_RANGE_SHFT) << 64MB
560  end = PA bits 56:26 (GAM_RANGE_SHFT) << 64MB
562  pr_info("UV: GAM Range %2d %04x 0x%013lx-0x%013lx (%d)\n", i, de's global physical address , start, end, gb)
Caller
NameDescribe
uv_system_init_hub