Latest ACPI update removed some essential configuration
* The global lock, needed for hw <-> os to sync, was a no op. This means that OS and HW could read and write to same value at the same time, causing garbled data and crashes. This is easiest to see in battery status, where battery values and OEM name would become garbage. It also causes instability and failure to shutdown * ACPI used 64 bit addressing (which it normally should) on 32 bit. This would cause page faults as it would jump to incorrect addresses
This commit is contained in:
parent
699b4bbab9
commit
7d93e79a04
@ -181,6 +181,11 @@ struct mutex;
|
|||||||
#define ACPI_MACHINE_WIDTH 64
|
#define ACPI_MACHINE_WIDTH 64
|
||||||
#else
|
#else
|
||||||
#define ACPI_MACHINE_WIDTH 32
|
#define ACPI_MACHINE_WIDTH 32
|
||||||
|
/* TODO: Temporary fix for #12377
|
||||||
|
DO NOT REMOVE as otherwise we get address overflows
|
||||||
|
Use 32 bit addresses to match addr_t for now.
|
||||||
|
*/
|
||||||
|
#define ACPI_32BIT_PHYSICAL_ADDRESS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -192,6 +197,21 @@ struct mutex;
|
|||||||
|
|
||||||
#define ACPI_FLUSH_CPU_CACHE() __asm __volatile("wbinvd");
|
#define ACPI_FLUSH_CPU_CACHE() __asm __volatile("wbinvd");
|
||||||
|
|
||||||
|
/* Based on FreeBSD's due to lack of documentation
|
||||||
|
DO NOT REMOVE, the fallback is no ops, which means
|
||||||
|
HW <-> OS sync is not done => garbled data..
|
||||||
|
*/
|
||||||
|
extern int AcpiOsAcquireGlobalLock(uint32 *lock);
|
||||||
|
extern int AcpiOsReleaseGlobalLock(uint32 *lock);
|
||||||
|
|
||||||
|
#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) do { \
|
||||||
|
(Acq) = AcpiOsAcquireGlobalLock((uint32 *)&((GLptr)->GlobalLock)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) do { \
|
||||||
|
(Acq) = AcpiOsReleaseGlobalLock((uint32 *)&((GLptr)->GlobalLock)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
#else /* _KERNEL_MODE */
|
#else /* _KERNEL_MODE */
|
||||||
/* Host-dependent types and defines for user-space ACPICA */
|
/* Host-dependent types and defines for user-space ACPICA */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user