-
Notifications
You must be signed in to change notification settings - Fork 116
[6.6] Add support for Hygon family 18h model 18h #1629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d63e3e1
a5c7833
0069ab2
d1b21e6
6ac8660
2249df6
adae0b3
f20332b
4f1852d
c8241cf
111396b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -107,6 +107,29 @@ static u32 get_umc_base_f18h_m4h(u16 node, u8 channel) | |||||||||||||||||||||||||||||||||||||||||||||||||||
| return get_umc_base(channel) + (0x80000000 + (0x10000000 * df_id)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| static u32 get_umc_base_f18h_m18h(u8 channel) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| return 0x70000000 + (channel << 20); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| static u32 hygon_get_umc_base(struct amd64_pvt *pvt, u8 channel) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| u32 umc_base; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| if (hygon_f18h_m4h()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| umc_base = get_umc_base_f18h_m4h(pvt->mc_node_id, channel); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| * For Hygon family 18h model 0x18h-0x1fh processors, the UMC base | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| * are identical. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| else if (hygon_f18h_m10h() && boot_cpu_data.x86_model >= 0x18) | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| umc_base = get_umc_base_f18h_m18h(channel); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| umc_base = get_umc_base(channel); | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| return umc_base; | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+117
to
+130
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| u32 umc_base; | |
| if (hygon_f18h_m4h()) | |
| umc_base = get_umc_base_f18h_m4h(pvt->mc_node_id, channel); | |
| /* | |
| * For Hygon family 18h model 0x18h-0x1fh processors, the UMC base | |
| * are identical. | |
| */ | |
| else if (hygon_f18h_m10h() && boot_cpu_data.x86_model >= 0x18) | |
| umc_base = get_umc_base_f18h_m18h(channel); | |
| else | |
| umc_base = get_umc_base(channel); | |
| return umc_base; | |
| if (hygon_f18h_m4h()) | |
| return get_umc_base_f18h_m4h(pvt->mc_node_id, channel); | |
| /* | |
| * For Hygon family 18h model 0x18-0x1f processors, the UMC base | |
| * addresses are identical. | |
| */ | |
| if (hygon_f18h_m10h() && boot_cpu_data.x86_model >= 0x18) | |
| return get_umc_base_f18h_m18h(channel); | |
| return get_umc_base(channel); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3054,7 +3054,7 @@ static bool __init check_ioapic_information(void) | |
| (boot_cpu_data.x86_vendor == X86_VENDOR_HYGON && | ||
| boot_cpu_data.x86 == 0x18 && | ||
| boot_cpu_data.x86_model >= 0x4 && | ||
| boot_cpu_data.x86_model <= 0x10 && | ||
| boot_cpu_data.x86_model <= 0x18 && | ||
| devid == IOAPIC_SB_DEVID_FAM18H_M4H)) { | ||
|
Comment on lines
3054
to
3058
|
||
| has_sb_ioapic = true; | ||
| ret = true; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These new #define lines introduce stray whitespace before the tab/value alignment (visible trailing spaces). Please align with surrounding defines using a single tab after the macro name and avoid trailing spaces so checkpatch/style tools don't flag it.