Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2023 04:40:49 GMT
From:      Zhenlei Huang <zlei@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 6cd7e3d118f2 - stable/14 - x86: Prefer consistent naming for loader tunables
Message-ID:  <202310240440.39O4ensG099497@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=6cd7e3d118f247a8f6bc0f8162a9cb67155b7c76

commit 6cd7e3d118f247a8f6bc0f8162a9cb67155b7c76
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2023-10-17 07:05:25 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2023-10-24 04:39:32 +0000

    x86: Prefer consistent naming for loader tunables
    
    The following loader tunables do have corresponding sysctl MIBs but
    with inconsistent naming. That may be historical reason. Let's prefer
    consistent naming for them so that it will be easier to maintain.
    
     1. hw.dmar.timeout -> hw.iommu.dmar.timeout
     2. hw.lapic_eoi_suppression -> hw.apic.eoi_suppression
     3. hw.lapic_tsc_deadline -> hw.apic.timer_tsc_deadline
     4. hw.x2apic_enable -> hw.apic.x2apic_mode
    
    Those tunables are for field debugging, no need to keep old names for
    compatibility.
    
    Reviewed by:    kib
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D42248
    
    (cherry picked from commit 12cce5994b92f8235f379d660ccb28da8e69f55b)
---
 sys/x86/acpica/madt.c     | 2 +-
 sys/x86/iommu/intel_drv.c | 2 +-
 sys/x86/x86/local_apic.c  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c
index 3d7c5a67375b..200eec1fbb28 100644
--- a/sys/x86/acpica/madt.c
+++ b/sys/x86/acpica/madt.c
@@ -221,7 +221,7 @@ madt_setup_local(void)
 		else if (bootverbose)
 			printf("x2APIC available but disabled %s\n", reason);
 		user_x2apic = x2apic_mode;
-		TUNABLE_INT_FETCH("hw.x2apic_enable", &user_x2apic);
+		TUNABLE_INT_FETCH("hw.apic.x2apic_mode", &user_x2apic);
 		if (user_x2apic != x2apic_mode) {
 			if (bios_x2apic && !user_x2apic)
 				printf("x2APIC disabled by tunable and "
diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c
index a5821df6b835..ebdf24976504 100644
--- a/sys/x86/iommu/intel_drv.c
+++ b/sys/x86/iommu/intel_drv.c
@@ -429,7 +429,7 @@ dmar_attach(device_t dev)
 	dmar_quirks_post_ident(unit);
 
 	timeout = dmar_get_timeout();
-	TUNABLE_UINT64_FETCH("hw.dmar.timeout", &timeout);
+	TUNABLE_UINT64_FETCH("hw.iommu.dmar.timeout", &timeout);
 	dmar_update_timeout(timeout);
 
 	for (i = 0; i < DMAR_INTR_TOTAL; i++)
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
index 43fe4625cd08..6a913883cc5c 100644
--- a/sys/x86/x86/local_apic.c
+++ b/sys/x86/x86/local_apic.c
@@ -493,7 +493,7 @@ lapic_init(vm_paddr_t addr)
 		    (cpu_feature2 & CPUID2_TSCDLT) != 0 &&
 		    tsc_is_invariant && tsc_freq != 0) {
 			lapic_timer_tsc_deadline = 1;
-			TUNABLE_INT_FETCH("hw.lapic_tsc_deadline",
+			TUNABLE_INT_FETCH("hw.apic.timer_tsc_deadline",
 			    &lapic_timer_tsc_deadline);
 		}
 
@@ -526,7 +526,7 @@ lapic_init(vm_paddr_t addr)
 		       "KVM -- disabling lapic eoi suppression\n");
 			lapic_eoi_suppression = 0;
 		}
-		TUNABLE_INT_FETCH("hw.lapic_eoi_suppression",
+		TUNABLE_INT_FETCH("hw.apic.eoi_suppression",
 		    &lapic_eoi_suppression);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310240440.39O4ensG099497>