diff options
author | gjb <gjb@FreeBSD.org> | 2014-06-27 22:05:21 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2014-06-27 22:05:21 +0000 |
commit | fc21f40567ac7485e9e987cf5a539bd0d11c7155 (patch) | |
tree | fce5301b062a855bc68b9cb76c6b5966c5a2acbe /sys/i386 | |
parent | 2f456747e010bfa5a9dd3498aa5650e0ade39f22 (diff) | |
download | FreeBSD-src-fc21f40567ac7485e9e987cf5a539bd0d11c7155.zip FreeBSD-src-fc21f40567ac7485e9e987cf5a539bd0d11c7155.tar.gz |
Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output,
such as:
1) no output from sysctl(8)
2) erroneously returning ENOMEM with tools like truss(1)
or uname(1)
truss: can not get etype: Cannot allocate memory
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/acpica/acpi_machdep.c | 3 | ||||
-rw-r--r-- | sys/i386/bios/apm.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/i686_mem.c | 1 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/mp_watchdog.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/pmap.c | 4 | ||||
-rw-r--r-- | sys/i386/i386/trap.c | 6 | ||||
-rw-r--r-- | sys/i386/pci/pci_cfgreg.c | 1 | ||||
-rw-r--r-- | sys/i386/pci/pci_pir.c | 1 |
9 files changed, 17 insertions, 8 deletions
diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c index 049354b..a244e73 100644 --- a/sys/i386/acpica/acpi_machdep.c +++ b/sys/i386/acpica/acpi_machdep.c @@ -45,7 +45,8 @@ __FBSDID("$FreeBSD$"); #include <machine/nexusvar.h> uint32_t acpi_resume_beep; -SYSCTL_UINT(_debug_acpi, OID_AUTO, resume_beep, CTLFLAG_RWTUN, &acpi_resume_beep, +TUNABLE_INT("debug.acpi.resume_beep", &acpi_resume_beep); +SYSCTL_UINT(_debug_acpi, OID_AUTO, resume_beep, CTLFLAG_RW, &acpi_resume_beep, 0, "Beep the PC speaker when resuming"); uint32_t acpi_reset_video; diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index a4d3bd7..bf5071f 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -134,7 +134,8 @@ SYSCTL_INT(_machdep, OID_AUTO, apm_suspend_delay, CTLFLAG_RW, &apm_suspend_delay SYSCTL_INT(_machdep, OID_AUTO, apm_standby_delay, CTLFLAG_RW, &apm_standby_delay, 1, ""); SYSCTL_INT(_debug, OID_AUTO, apm_debug, CTLFLAG_RW, &apm_debug, 0, ""); -SYSCTL_INT(_machdep, OID_AUTO, apm_swab_batt_minutes, CTLFLAG_RWTUN, +TUNABLE_INT("machdep.apm_swab_batt_minutes", &apm_swab_batt_minutes); +SYSCTL_INT(_machdep, OID_AUTO, apm_swab_batt_minutes, CTLFLAG_RW, &apm_swab_batt_minutes, 0, "Byte swap battery time value."); #ifdef PC98 diff --git a/sys/i386/i386/i686_mem.c b/sys/i386/i386/i686_mem.c index 2721cfb..84db1ec 100644 --- a/sys/i386/i386/i686_mem.c +++ b/sys/i386/i386/i686_mem.c @@ -65,6 +65,7 @@ static char *mem_owner_bios = "BIOS"; (((curr) & ~MDF_ATTRMASK) | ((new) & MDF_ATTRMASK)) static int mtrrs_disabled; +TUNABLE_INT("machdep.disable_mtrrs", &mtrrs_disabled); SYSCTL_INT(_machdep, OID_AUTO, disable_mtrrs, CTLFLAG_RDTUN, &mtrrs_disabled, 0, "Disable i686 MTRRs."); diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index ac41c27..3d92e6e 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1231,7 +1231,8 @@ cpu_halt(void) void (*cpu_idle_hook)(sbintime_t) = NULL; /* ACPI idle hook. */ static int cpu_ident_amdc1e = 0; /* AMD C1E supported. */ static int idle_mwait = 1; /* Use MONITOR/MWAIT for short idle. */ -SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RWTUN, &idle_mwait, +TUNABLE_INT("machdep.idle_mwait", &idle_mwait); +SYSCTL_INT(_machdep, OID_AUTO, idle_mwait, CTLFLAG_RW, &idle_mwait, 0, "Use MONITOR/MWAIT for short idle"); #define STATE_RUNNING 0x0 diff --git a/sys/i386/i386/mp_watchdog.c b/sys/i386/i386/mp_watchdog.c index b03d261..b1799a2 100644 --- a/sys/i386/i386/mp_watchdog.c +++ b/sys/i386/i386/mp_watchdog.c @@ -68,7 +68,8 @@ static int watchdog_dontfire = 1; static int watchdog_timer = -1; static int watchdog_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, watchdog_nmi, CTLFLAG_RWTUN, &watchdog_nmi, 0, +TUNABLE_INT("debug.watchdog", &watchdog_cpu); +SYSCTL_INT(_debug, OID_AUTO, watchdog_nmi, CTLFLAG_RW, &watchdog_nmi, 0, "IPI the boot processor with an NMI to enter the debugger"); static struct callout watchdog_callout; diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 3085157..af8c9ff 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -225,8 +225,8 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pat_works, CTLFLAG_RD, &pat_works, 1, "Is page attribute table fully functional?"); static int pg_ps_enabled = 1; -SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, - &pg_ps_enabled, 0, "Are large page mappings enabled?"); +SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN, &pg_ps_enabled, 0, + "Are large page mappings enabled?"); #define PAT_INDEX_SIZE 8 static int pat_index[PAT_INDEX_SIZE]; /* cache mode to PAT index conversion */ diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 6e4aba2..97254f2 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -158,12 +158,14 @@ extern int has_f00f_bug; #ifdef KDB static int kdb_on_nmi = 1; -SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RWTUN, +SYSCTL_INT(_machdep, OID_AUTO, kdb_on_nmi, CTLFLAG_RW, &kdb_on_nmi, 0, "Go to KDB on NMI"); +TUNABLE_INT("machdep.kdb_on_nmi", &kdb_on_nmi); #endif static int panic_on_nmi = 1; -SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RWTUN, +SYSCTL_INT(_machdep, OID_AUTO, panic_on_nmi, CTLFLAG_RW, &panic_on_nmi, 0, "Panic on NMI"); +TUNABLE_INT("machdep.panic_on_nmi", &panic_on_nmi); static int prot_fault_translation = 0; SYSCTL_INT(_machdep, OID_AUTO, prot_fault_translation, CTLFLAG_RW, &prot_fault_translation, 0, "Select signal to deliver on protection fault"); diff --git a/sys/i386/pci/pci_cfgreg.c b/sys/i386/pci/pci_cfgreg.c index 5d57e89..cce4981 100644 --- a/sys/i386/pci/pci_cfgreg.c +++ b/sys/i386/pci/pci_cfgreg.c @@ -86,6 +86,7 @@ static int cfgmech; static int devmax; static struct mtx pcicfg_mtx; static int mcfg_enable = 1; +TUNABLE_INT("hw.pci.mcfg", &mcfg_enable); SYSCTL_INT(_hw_pci, OID_AUTO, mcfg, CTLFLAG_RDTUN, &mcfg_enable, 0, "Enable support for PCI-e memory mapped config access"); diff --git a/sys/i386/pci/pci_pir.c b/sys/i386/pci/pci_pir.c index 0d64cab..c275de0 100644 --- a/sys/i386/pci/pci_pir.c +++ b/sys/i386/pci/pci_pir.c @@ -117,6 +117,7 @@ SYSCTL_DECL(_hw_pci); #endif static uint32_t pci_irq_override_mask = PCI_IRQ_OVERRIDE_MASK; +TUNABLE_INT("hw.pci.irq_override_mask", &pci_irq_override_mask); SYSCTL_INT(_hw_pci, OID_AUTO, irq_override_mask, CTLFLAG_RDTUN, &pci_irq_override_mask, PCI_IRQ_OVERRIDE_MASK, "Mask of allowed irqs to try to route when it has no good clue about\n" |