freebsd-dev/sys/dev/acpica
Stefan Eßer e2650af157 Make CPU_SET macros compliant with other implementations
The introduction of <sched.h> improved compatibility with some 3rd
party software, but caused the configure scripts of some ports to
assume that they were run in a GLIBC compatible environment.

Parts of sched.h were made conditional on -D_WITH_CPU_SET_T being
added to ports, but there still were compatibility issues due to
invalid assumptions made in autoconfigure scripts.

The differences between the FreeBSD version of macros like CPU_AND,
CPU_OR, etc. and the GLIBC versions was in the number of arguments:
FreeBSD used a 2-address scheme (one source argument is also used as
the destination of the operation), while GLIBC uses a 3-adderess
scheme (2 source operands and a separately passed destination).

The GLIBC scheme provides a super-set of the functionality of the
FreeBSD macros, since it does not prevent passing the same variable
as source and destination arguments. In code that wanted to preserve
both source arguments, the FreeBSD macros required a temporary copy of
one of the source arguments.

This patch set allows to unconditionally provide functions and macros
expected by 3rd party software written for GLIBC based systems, but
breaks builds of externally maintained sources that use any of the
following macros: CPU_AND, CPU_ANDNOT, CPU_OR, CPU_XOR.

One contributed driver (contrib/ofed/libmlx5) has been patched to
support both the old and the new CPU_OR signatures. If this commit
is merged to -STABLE, the version test will have to be extended to
cover more ranges.

Ports that have added -D_WITH_CPU_SET_T to build on -CURRENT do
no longer require that option.

The FreeBSD version has been bumped to 1400046 to reflect this
incompatible change.

Reviewed by:	kib
MFC after:	2 weeks
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D33451
2021-12-30 12:20:32 +01:00
..
Osd acpica: clean up empty lines in .c and .h files 2020-09-01 21:32:41 +00:00
acpi_acad.c acpica: Remove CTLFLAG_NEEDGIANT from most sysctls. 2021-12-26 19:18:55 -05:00
acpi_apei.c APEI: Improve multiple error sources handling. 2021-12-02 18:06:12 -05:00
acpi_battery.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
acpi_bus_if.m Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
acpi_button.c Expose the ACPI power button, sleep button and LID state as evdev's. 2020-03-02 09:45:06 +00:00
acpi_cmbat.c Add workaround for models which do not follow the ACPI specification strictly. 2020-02-27 17:13:57 +00:00
acpi_container.c
acpi_cpu.c acpica: Remove CTLFLAG_NEEDGIANT from most sysctls. 2021-12-26 19:18:55 -05:00
acpi_dock.c acpica: Remove CTLFLAG_NEEDGIANT from most sysctls. 2021-12-26 19:18:55 -05:00
acpi_ec.c acpi_ec(4): Don't probe erroneously if success occurred 2020-04-23 17:30:03 +00:00
acpi_hpet.c pvclock: Add vDSO support 2021-08-14 15:57:54 +03:00
acpi_hpet.h
acpi_if.m acpica: add ACPI_GET_PROPERTY to access Device Specific Data (DSD) 2021-09-20 16:31:08 +02:00
acpi_isab.c acpica: clean up empty lines in .c and .h files 2020-09-01 21:32:41 +00:00
acpi_lid.c Send Lid status notification via devd from acpi_lid_status_update. 2020-05-16 01:50:28 +00:00
acpi_package.c Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
acpi_pci_link.c acpi: Add missing error handling to acpi_pci_link_route_irqs() 2021-05-26 10:49:30 -04:00
acpi_pci.c Create wrapper for Giant taken for newbus 2021-12-09 17:04:45 -07:00
acpi_pcib_acpi.c Add mostly dummy hw.pci.enable_aspm tunable. 2020-06-26 19:55:11 +00:00
acpi_pcib_pci.c
acpi_pcib.c
acpi_pcibvar.h
acpi_pcivar.h
acpi_perf.c Make CPU children explicitly share parent unit numbers. 2021-09-24 23:31:51 -04:00
acpi_powerres.c acpica: clean up empty lines in .c and .h files 2020-09-01 21:32:41 +00:00
acpi_pxm.c acpi: Ensure that adjacent memory affinity table entries are coalesced 2020-12-18 16:04:48 +00:00
acpi_quirk.c
acpi_quirks
acpi_resource.c Ignore ResourceProducer flag for: 2021-08-02 14:11:20 +03:00
acpi_smbat.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
acpi_smbus.h acpica: clean up empty lines in .c and .h files 2020-09-01 21:32:41 +00:00
acpi_thermal.c acpica: Remove CTLFLAG_NEEDGIANT from most sysctls. 2021-12-26 19:18:55 -05:00
acpi_throttle.c Make CPU children explicitly share parent unit numbers. 2021-09-24 23:31:51 -04:00
acpi_timer.c acpica: Remove CTLFLAG_NEEDGIANT from most sysctls. 2021-12-26 19:18:55 -05:00
acpi_video.c acpica: Remove CTLFLAG_NEEDGIANT from most sysctls. 2021-12-26 19:18:55 -05:00
acpi.c Make CPU_SET macros compliant with other implementations 2021-12-30 12:20:32 +01:00
acpiio.h Add _BIX (Battery Information Extended) object support. 2020-02-19 06:28:55 +00:00
acpivar.h acpica: add ACPI_GET_PROPERTY to access Device Specific Data (DSD) 2021-09-20 16:31:08 +02:00