mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 02:54:10 +07:00
a940cb34fe
The size of unsigned long varies between 32 and 64 bit systems while the size of phandle arguments is always 32 bits per parameter. On 64-bit systems, cooling devices registered via of-thermal apis fail to bind when the min/max cooling state is specified as THERMAL_NO_LIMIT (-1UL) as there is a mis-match between the value read from the device tree (32bit) and the pre-processor define (64bit). As we're unlikely to need cooling states larger than 32 bits, and for consistency with the size of phandle arguments, explicitly limit THERMAL_NO_LIMIT to 32 bits. Reported-by: Hyungwoo Yang <hwoo.yang@gmail.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
18 lines
342 B
C
18 lines
342 B
C
/*
|
|
* This header provides constants for most thermal bindings.
|
|
*
|
|
* Copyright (C) 2013 Texas Instruments
|
|
* Eduardo Valentin <eduardo.valentin@ti.com>
|
|
*
|
|
* GPLv2 only
|
|
*/
|
|
|
|
#ifndef _DT_BINDINGS_THERMAL_THERMAL_H
|
|
#define _DT_BINDINGS_THERMAL_THERMAL_H
|
|
|
|
/* On cooling devices upper and lower limits */
|
|
#define THERMAL_NO_LIMIT (~0)
|
|
|
|
#endif
|
|
|