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:34:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:UV3/4 have identical MMIOH overlay configs, UV4A is slightly different

Proto:static __init void map_mmioh_high_uv34(int index, int min_pnode, int max_pnode)

Type:void

Parameter:

TypeParameterName
intindex
intmin_pnode
intmax_pnode
885  If index == 0 Then
886  id = "MMIOH0"
887  m_overlay = s_uv4_hub
888  overlay = uv_read_local_mmr(m_overlay)
889  base = overlay & s_uv4_hub
890  mmr = s_uv4_hub
891  m_io = (overlay & s_uv4_hub) >> s_uv4_hub
893  shift = s_uv4_hub
894  n = s_uv4_hub
895  nasid_mask = s_uv4_hub
896  Else
897  id = "MMIOH1"
898  m_overlay = s_uv4_hub
899  overlay = uv_read_local_mmr(m_overlay)
900  base = overlay & s_uv4_hub
901  mmr = s_uv4_hub
902  m_io = (overlay & s_uv4_hub) >> s_uv4_hub
904  shift = s_uv4_hub
905  n = s_uv4_hub
906  nasid_mask = s_uv4_hub
908  pr_info("UV: %s overlay 0x%lx base:0x%lx m_io:%d\n", id, overlay, base, m_io)
909  If Not (overlay & s_uv4_hub) Then
910  pr_info("UV: %s disabled\n", id)
911  Return
915  min_pnode *= 2
916  max_pnode *= 2
917  max_io = lnasid = fi = li = -1
919  When i < n cycle
920  m_redirect = mmr + i * 8
921  redirect = uv_read_local_mmr(m_redirect)
923  nasid = redirect & nasid_mask
924  If i == 0 Then pr_info("UV: %s redirect base 0x%lx(@0x%lx) 0x%04x\n", id, redirect, m_redirect, nasid)
929  If nasid < min_pnode || max_pnode < nasid Then nasid = -1
932  If nasid == lnasid Then
933  li = i
935  If i != n - 1 Then Continue
940  If lnasid != -1 || i == n - 1 && nasid != -1 Then
944  If lnasid == -1 Then
945  f = l = i
946  lnasid = nasid
947  Else
948  f = fi
949  l = li
951  addr1 = (base << shift) + f * (1ULL << m_io)
952  addr2 = (base << shift) + (l + 1) * (1ULL << m_io)
953  pr_info("UV: %s[%03d..%03d] NASID 0x%04x ADDR 0x%016lx - 0x%016lx\n", id, fi, li, lnasid, addr1, addr2)
954  If max_io < l Then max_io = l
957  fi = li = i
958  lnasid = nasid
961  pr_info("UV: %s base:0x%lx shift:%d M_IO:%d MAX_IO:%d\n", id, base, shift, m_io, max_io)
963  If max_io >= 0 Then map_high(id, base, shift, m_io, max_io, map_uc)
Caller
NameDescribe
map_mmioh_high