]> git.baikalelectronics.ru Git - kernel.git/commit
ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions
authorMark Langsdorf <mlangsdo@redhat.com>
Wed, 22 Dec 2021 15:57:34 +0000 (16:57 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Dec 2021 16:01:27 +0000 (17:01 +0100)
commit40e1b3282dcab075eb952473813aca58d1338548
tree07a2593de23f0e05863831aac564c8dec03de676
parentfa6a89fde43e063fdeeeb11ba3c19fd7722e0105
ACPICA: actypes.h: Expand the ACPI_ACCESS_ definitions

ACPICA commit bc02c76d518135531483dfc276ed28b7ee632ce1

The current ACPI_ACCESS_*_WIDTH defines do not provide a way to
test that size is small enough to not cause an overflow when
applied to a 32-bit integer.

Rather than adding more magic numbers, add ACPI_ACCESS_*_SHIFT,
ACPI_ACCESS_*_MAX, and ACPI_ACCESS_*_DEFAULT #defines and
redefine ACPI_ACCESS_*_WIDTH in terms of the new #defines.

This was inititally reported on Linux where a size of 102 in
ACPI_ACCESS_BIT_WIDTH caused an overflow error in the SPCR
initialization code.

Link: https://github.com/acpica/acpica/commit/bc02c76d
Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/acpi/actypes.h