FreeBSD/src 3f52142sys/x86/cpufreq hwpstate_intel.c

hwpstate_intel(4): use CPU_FOREACH instead of an IPI

Reviewed by:    aokblast, kib, olce
Differential Revision:  https://reviews.freebsd.org/D58336
DeltaFile
+7-17sys/x86/cpufreq/hwpstate_intel.c
+7-171 files

FreeBSD/src fa2ad70sys/netinet tcp_input.c

tcp: make ghost ACK handling more conformant

The latest version of draft-ietf-tcpm-tcp-ghost-acks changed
a condition. This should make no substantial difference, but makei
it compliant to the latest version of the specification.

Reviewed by:            rscheff, Peter Lei
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D58411
DeltaFile
+1-1sys/netinet/tcp_input.c
+1-11 files

FreeBSD/doc d61f131website/content/en/news/2026-ports-freeze _index.adoc, website/data/en/news news.toml

News: Announce 2026 ports freeze

Reviewed by:            adrian, jrm, kevans
Differential Revision:  https://reviews.freebsd.org/D58414
DeltaFile
+22-0website/content/en/news/2026-ports-freeze/_index.adoc
+5-0website/data/en/news/news.toml
+27-02 files

FreeBSD/doc bd5cfe1documentation/static/pgpkeys kevans.key

pgpkeys: include second key for kevans

This is cross-signed by my original key, and I accidentally used it to
sign an announcement.
DeltaFile
+22-3documentation/static/pgpkeys/kevans.key
+22-31 files

FreeBSD/src 145541dsys/netpfil/pf pf.c, tests/sys/netpfil/pf limiters.sh

pf(4) fix NULL pointer dereference in outbound packet path.

Outbound packet which matches rule with source limiter attached,
for example:

    source limiter "crash" id 1 entries 10000 limit 1000
    pass out from any to any source limiter "crash" keep state

triggers a NULL pointer dereference.

The issue was kindly reported and initial version of fix
submitted by SecBuddyF, Tencent KeenLab.

The submitted diff fixed the issue for failing look up by destination
address in outbound packet. dlg@ also pointed out the change should
be further improved so NULL pointer dereference is avoided when rule
uses nat-to/rdr-to option.

OK dlg@

    [3 lines not shown]
DeltaFile
+46-0tests/sys/netpfil/pf/limiters.sh
+11-2sys/netpfil/pf/pf.c
+57-22 files

FreeBSD/src 850041bsys/netpfil/pf pf_norm.c

pf: include direction in fragment key

pf(4) currently ignores fragment direction (in vs. out)
in pf_frnode_compare() function.

Issue noticed and reported by Frank Denis

OK @bluhm

Obtained from:  OpenBSD, sashan <sashan at openbsd.org>, eaa2c80721
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+14-8sys/netpfil/pf/pf_norm.c
+14-81 files

FreeBSD/src fc759ccsys/dev/acpica acpi_cpu.c

acpi_cpu(4): Call ACPI_GET_FEATURES() on a reset 'features' variable

This is to prevent child drivers from using the features returned by
previous drivers (in an arbitrary order).  None of the existing ones do
that, so this is purely defensive.

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 664ad9ac4c9047d29d5f37d43174e1b469e2ec80)
DeltaFile
+2-1sys/dev/acpica/acpi_cpu.c
+2-11 files

FreeBSD/src 2a3374dsys/x86/include apicvar.h, sys/x86/x86 local_apic.c

x86/local_apic.c: Fiddle with thermal LVT slot only if supported

The thermal LVT slot does not necessarily exist.

According to Intel's Software Developers Manual, for Intel processors
supporting 64-bit operation (amd64), probably even the earliest ones
should have a local APIC with such a slot (the slot was introduced with
Pentium 4 and Xeon processors according to the manual, and the 64-bit
implementation in some later versions of them).  AMD's Architecture
Programmer's Manual also seems to imply that all AMD processors
supporting amd64 should have the slot too.  So this change may not be
needed when i386's code is dropped, but it does not hurt to have it, and
it might ease possible MFCs.

Change the signature of lapic_enable_thermal() so that it can report
failure (if there is no local APIC or if there is no thermal LVT slot).

Reviewed by:    bnovkov, kib
MFC after:      2 weeks

    [4 lines not shown]
DeltaFile
+16-6sys/x86/x86/local_apic.c
+1-1sys/x86/include/apicvar.h
+17-72 files

FreeBSD/src de606fesys/x86/x86 local_apic.c

x86/local_apic.c: Factor out version read and max LVT slot computation

This makes the code slightly more compact and easier to read.

No functional change intended.

Reviewed by:    bnovkov
MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D58110

(cherry picked from commit 060ecf296664fd150328ac6dcdc24764a427bc3a)
DeltaFile
+36-36sys/x86/x86/local_apic.c
+36-361 files

FreeBSD/src 185d7d4sys/x86/include apicreg.h, sys/x86/x86 local_apic.c

x86/local_apic.c: Properly calculate the number of LVT entries

First, the CMCI entry index is APIC_LVT_MAX, so it was excluded
unconditionall [1].

Second, the number of entries is reported by the version register, and
we must not access past the last reported entry.

Reported by:    olivier [1]
Fixes:  11f954b021a1aadde1d03d40ed5d6b529e14da98
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54773

(cherry picked from commit 709a53c8b20b5770f7e2f117d4799b5617479976)
DeltaFile
+5-2sys/x86/x86/local_apic.c
+6-1sys/x86/include/apicreg.h
+11-32 files

FreeBSD/src 60d7891sys/x86/x86 local_apic.c

x86 lapic: Dump LVTs from the ddb show lapic command

(cherry picked from commit dfc4186c6dcf2986b510fac108784011a236554d)
(cherry picked from commit 854e0e4803789c669edeff7c31e1ed4fd66e64b7)
DeltaFile
+34-6sys/x86/x86/local_apic.c
+34-61 files

FreeBSD/src b26cf7bsys/x86/x86 local_apic.c

x88/local_apic.c: for each lvt element, add LVT register index

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54543

(cherry picked from commit 87ed56a5c43521d97975d936df4fc36184f1b685)
DeltaFile
+12-0sys/x86/x86/local_apic.c
+12-01 files

FreeBSD/src a9e4131sys/x86/x86 local_apic.c

x86/local_apic.c: add lapic_maxlvt() helper

that calculates the max index of the present LVT entry from the value of
the LAPIC version register.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54773

(cherry picked from commit ad5e3cb950344f9822dbbd90f5ac7c256f97fa4c)
DeltaFile
+15-5sys/x86/x86/local_apic.c
+15-51 files

FreeBSD/src 73e58edsys/x86/x86 local_apic.c

x86: mask all LAPIC vectors early, before BSP interrupts are enabled

(cherry picked from commit 11f954b021a1aadde1d03d40ed5d6b529e14da98)
(cherry picked from commit 2079e5864f204c552b82b63809e1b39b13ccfd3c)
DeltaFile
+28-0sys/x86/x86/local_apic.c
+28-01 files

FreeBSD/src 847c604sys/x86/x86 local_apic.c

x86/local_apic.c: convert lvts[] and elvts[] arrays to designated initializers

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54543

(cherry picked from commit 4938ee8064868f120413405f1b3aa40344a6fabd)
DeltaFile
+92-13sys/x86/x86/local_apic.c
+92-131 files

FreeBSD/src 019f643sys/x86/include apicvar.h, sys/x86/x86 local_apic.c

x86/local_apic.c: Thermal interrupt support: Additional style fixes

Rename handler function type 'lapic_thermal_handle_function' to the
shorter 'lapic_thermal_handler_t'.  Move it closer to the function
declaration block where it is used.  Make it a true function type (no
pointer) and add explicit pointer marks on usage.

Rename 'lapic_thermal_function_value' to the more immediately clear
'lapic_thermal_function_arg'.  In lapic_thermal_enable(), use 'func_arg'
as the argument name for the handler argument, which at least refers to
function 'func', rather than the generic 'value'.

Finally, rename the global handler variable from
'lapic_thermal_function_ptr' to the shorter 'lapic_thermal_function'
(dynamic functions can be referenced only through a pointer).

MFC with:       87ba088fa310 ("x86/local_apic.c: Add support for installing a thermal interrupt handler")
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit e1f4a8cb8656e64a1fe2b1ab519821b14c4985a0)
DeltaFile
+11-11sys/x86/x86/local_apic.c
+4-2sys/x86/include/apicvar.h
+15-132 files

FreeBSD/src 6ea0ce1sys/i386/i386 apic_vector.S

i386: supply thermal interrupt handler

This fixes a build break for i386.

Reviewed by:    kib, olce, Koine Yuusuke <koinec at yahoo.co.jp>
Fixes:  87ba088fa310 ("x86/local_apic.c: Add support for installing a thermal interrupt handler")
Differential Revision:  https://reviews.freebsd.org/D58332

(cherry picked from commit cb325dcedfa291c9bfe350a513694df3776a17a4)
DeltaFile
+15-0sys/i386/i386/apic_vector.S
+15-01 files

FreeBSD/src 7b675fesys/amd64/amd64 apic_vector.S, sys/x86/include apicvar.h

x86/local_apic.c: Add support for installing a thermal interrupt handler

The thermal interrupt is initially masked.

Thermal interrupt handling is enabled by calling lapic_enable_thermal(),
which installs a (single) handler.

[olce: Wrote the commit message.]

Reviewed by:    kib, olce
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D44454

(cherry picked from commit 87ba088fa3108dd180008a04f25760ec71476c87)
DeltaFile
+72-2sys/x86/x86/local_apic.c
+8-4sys/x86/include/apicvar.h
+9-0sys/amd64/amd64/apic_vector.S
+89-63 files

FreeBSD/src 94ec0a9sys/x86/include apicvar.h, sys/x86/x86 io_apic.c mptable.c

intr/x86: add ioapic_drv_t to reduce number of casts in IO-APIC implementation

void * is handy when you truly do not care about the type.  Yet there is
so much casting back and forth in the IO-APIC code as to be hazardous.
Achieve better static checking by the compiler using a typedef.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1457

(cherry picked from commit 90fb07edbd7adb653bd8dc1aac09a63b7ff76f89)
DeltaFile
+11-31sys/x86/x86/io_apic.c
+13-11sys/x86/include/apicvar.h
+2-2sys/x86/x86/mptable.c
+26-443 files

FreeBSD/src afd5796bin/ps ps.1

ps.1: Fix broken comment line

While here, remove the long-unused dash in the first line.

Reviewed by:    ziaee, olce
Fixes:          ddf144a04b53 ("ps.1: Revamp: Explain general principles, update to match reality")
MFC after:      1 day
Differential Revision:  https://reviews.freebsd.org/D58038

(cherry picked from commit 759ce9a2b38e1de70c14c81dee7e245bf0bc6b94)
DeltaFile
+2-2bin/ps/ps.1
+2-21 files

FreeBSD/src cd28957sys/dev/acpica acpi_timer.c, sys/x86/include init.h

acpi_timer(4): Remove unused 'acpi_timer_disabled' boolean

Same reason as for the previous commit to acpi_cpu(4).  This boolean is
not used anywhere.  Disabling acpi_timer(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste (implicit)
Fixes:          ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit ad26a56cf2f55967cc73d04a6ea17c27892d3141)
DeltaFile
+1-5sys/dev/acpica/acpi_timer.c
+0-3sys/x86/include/init.h
+1-82 files

FreeBSD/src 0e40089sys/conf files.arm64 files.riscv

files: riscv, arm64: Remove redundant 'ofw_cpu.c'

Should have been removed when that line was moved from 'files.arm' to
'files'.

Fixes:          14e1a2cd295d ("Move ofw_cpu file to the main files conf file.")
MFC after:      2 weeks
Event:          Halifax Hackathon 202606
Location:       Seat 36K in AC667, over Maine near Canadian border
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 10213f01773f22ab948ec1e87c880b1d19a1fc45)
DeltaFile
+0-1sys/conf/files.arm64
+0-1sys/conf/files.riscv
+0-22 files

FreeBSD/src 34c289esys/dev/acpica acpi_hpet.c, sys/x86/include init.h

acpi_hpet(4): Remove unused 'acpi_hpet_disabled' boolean

Same reason as for the previous commit to acpi_cpu(4).  This boolean is
not used anywhere.  Disabling acpi_hpet(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste (implicit)
Fixes:          ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 25df388574ac1d295f4014825de0df1d65cbdc53)
DeltaFile
+1-4sys/dev/acpica/acpi_hpet.c
+0-3sys/x86/include/init.h
+1-72 files

FreeBSD/src 22b6533sys/kern sched_ule.c

sched_ule: Fix off by one in preempt_thresh definition

Since 'preempt_thresh' is set to PRI_MIN_KERN by default, and comparison
of the considered thread's priority with that threshold is done with
'<=', PRI_MIN_KERN threads actually can preempt other threads, contrary
to other non-interrupt kernel ones (between PRI_MIN_KERN + 1 and
PRI_MAX_KERN).

So, replace the comparison operator '<=' by '<'.  The alternative would
be to change the default value, but changing the comparison instead has
the benefit to be consistent with the 0 setting (which forbids
preemption entirely), since allowing only threads with priority 0 to
preempt becomes possible.

Consequently, we also change the default value for the FULL_PREEMPTION
option by adding 1 to PRI_MAX_IDLE (in practice, that does not make any
difference in the current setting, since no preemption will happen if
the new priority value is not strictly lower than the current one, and
PRI_MAX_IDLE is PRI_MAX, the highest possible priority).

    [10 lines not shown]
DeltaFile
+2-2sys/kern/sched_ule.c
+2-21 files

FreeBSD/src 0841ba9sys/dev/acpica acpi_cpu.c, sys/x86/include init.h

acpi_cpu(4): Remove unused 'acpi_cpu_disabled' boolean

It is not used anywhere.  Disabling acpi_cpu(4) can be done through the
regular ACPI disable mechanism (using the 'debug.acpi.disabled' tunable,
see acpi_disabled()).

Reviewed by:    emaste, obiwac
Fixes:          ac3ede5371af ("x86/xen: remove PVHv1 code")
MFC after:      3 days
Event:          Halifax Hackathon 202606
Location:       Dalhousie CS Faculty building
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57888

(cherry picked from commit 98a77972381c6bb5ceda375fd1db7dccb3a1c89e)
DeltaFile
+1-4sys/dev/acpica/acpi_cpu.c
+0-3sys/x86/include/init.h
+1-72 files

FreeBSD/src 905b639sys/kern sched_ule.c

sched_ule: sched_clock(): Remove a superfluous space

MFC after:      1 week
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 5f376d52f2c86fd19e3f774a02c4b0debeb3f2cf)
DeltaFile
+1-1sys/kern/sched_ule.c
+1-11 files

FreeBSD/src 83e087e. .git-blame-ignore-revs

.git-blame-ignore-revs: sys/kern/kern_cpu.c whitespace changes

Event:          Halifax Hackathon 202606
Location:       jrm@'s kitchen
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 5f43a84d049ec3451c7c5fa5b4f00a299d5f4c34)
DeltaFile
+2-0.git-blame-ignore-revs
+2-01 files

FreeBSD/src 55e2f70sys/kern kern_cpu.c

cpufreq: Fix the incorrect format

Event:          Halifax Hackathon 202606
Location:       jrm@'s dining room
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D57275

(cherry picked from commit 35255280e51ca8f7a8f350b944aa6ffe42a7e5b5)
DeltaFile
+3-3sys/kern/kern_cpu.c
+3-31 files

FreeBSD/src 16bab34sys/dev/acpica acpi.c

acpi: Suffix acpi_sleep_enable() with '_locked'

For clarification.  This function assumes that the acpi mutex is held,
contrary to acpi_sleep_disable().

No functional change (intended).

Reviewed by:    obiwac
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation
Pull Request:   https://github.com/OlCe2/freebsd-src/pull/8

(cherry picked from commit 3b3911aaf834824f2de0db9fc7d0b9e2b3c089b4)
DeltaFile
+3-3sys/dev/acpica/acpi.c
+3-31 files

FreeBSD/src ef7f806sys/kern sched_ule.c

sched_ule: sched_priority(): More accurate __unused annotation

Change a '__unused' to '__diagused', which is more precise for that use.

No functional change.

MFC after:      1 week
Event:          Halifax Hackathon 202606
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 83a6946595829407c80075f33e49329d1b621522)
DeltaFile
+1-1sys/kern/sched_ule.c
+1-11 files