mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 04:46:51 +07:00
bec04432cb
Pull thermal management updates from Zhang Rui: - introduce brcmstb AVS TMON thermal driver (Brian Norris) - add Rockchip RV1108 support in rockchip thermal driver (Rocky Hao) - major rework on HISI driver plus additional support of hisi3660 (Daniel Lezcano) - add nvmem-cells binding on imx6sx (Leonard Crestez) - fix a NULL pointer dereference on ti thermal driver unloading (Tony Lindgren) - improve tmon tool to make it easier to cross-compile tmon (Markus Mayer) - add Coffee Lake and Cannon Lake support for intel processor and pch thermal drivers (Srinivas Pandruvada) - other small fixes and cleanups (Arvind Yadav, Colin Ian King, Allen Wild, Nicolin Chen, Baruch SiachNiklas Söderlund, Arnd Bergmann) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (44 commits) thermal: pch: Add Cannon Lake support thermal: int340x: processor_thermal: Add Coffee Lake support thermal: int340x: processor_thermal: Add Cannon Lake support thermal: bxt: remove redundant variable trip thermal: cpu_cooling: pr_err() strings should end with newlines thermal: add brcmstb AVS TMON driver Documentation: devicetree: add binding for Broadcom STB AVS TMON thermal/drivers/hisi: Add support for hi3660 SoC thermal/drivers/hisi: Prepare to add support for other hisi platforms thermal/drivers/hisi: Add platform prefix to function name thermal/drivers/hisi: Put platform code together thermal/drivers/qcom-spmi: Use devm_iio_channel_get thermal/drivers/generic-iio-adc: Switch tz request to devm version thermal/drivers/step_wise: Fix temperature regulation misbehavior thermal/drivers/hisi: Use round up step value thermal/drivers/hisi: Move the clk setup in the corresponding functions thermal/drivers/hisi: Remove mutex_lock in the code thermal/drivers/hisi: Remove thermal data back pointer thermal/drivers/hisi: Convert long to int thermal/drivers/hisi: Rename and remove unused field ...
59 lines
1.7 KiB
Makefile
59 lines
1.7 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# We need this for the "cc-option" macro.
|
|
include ../../../scripts/Kbuild.include
|
|
|
|
VERSION = 1.0
|
|
|
|
BINDIR=usr/bin
|
|
WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int
|
|
CFLAGS+= -O1 ${WARNFLAGS}
|
|
# Add "-fstack-protector" only if toolchain supports it.
|
|
CFLAGS+= $(call cc-option,-fstack-protector)
|
|
CC?= $(CROSS_COMPILE)gcc
|
|
PKG_CONFIG?= pkg-config
|
|
|
|
CFLAGS+=-D VERSION=\"$(VERSION)\"
|
|
LDFLAGS+=
|
|
TARGET=tmon
|
|
|
|
INSTALL_PROGRAM=install -m 755 -p
|
|
DEL_FILE=rm -f
|
|
|
|
# Static builds might require -ltinfo, for instance
|
|
ifneq ($(findstring -static, $(LDFLAGS)),)
|
|
STATIC := --static
|
|
endif
|
|
|
|
TMON_LIBS=-lm -lpthread
|
|
TMON_LIBS += $(shell $(PKG_CONFIG) --libs $(STATIC) panelw ncursesw 2> /dev/null || \
|
|
$(PKG_CONFIG) --libs $(STATIC) panel ncurses 2> /dev/null || \
|
|
echo -lpanel -lncurses)
|
|
|
|
CFLAGS += $(shell $(PKG_CONFIG) --cflags $(STATIC) panelw ncursesw 2> /dev/null || \
|
|
$(PKG_CONFIG) --cflags $(STATIC) panel ncurses 2> /dev/null)
|
|
|
|
OBJS = tmon.o tui.o sysfs.o pid.o
|
|
OBJS +=
|
|
|
|
tmon: $(OBJS) Makefile tmon.h
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(TARGET) $(TMON_LIBS)
|
|
|
|
valgrind: tmon
|
|
sudo valgrind -v --track-origins=yes --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./$(TARGET) 1> /dev/null
|
|
|
|
install:
|
|
- mkdir -p $(INSTALL_ROOT)/$(BINDIR)
|
|
- $(INSTALL_PROGRAM) "$(TARGET)" "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
|
|
|
|
uninstall:
|
|
$(DEL_FILE) "$(INSTALL_ROOT)/$(BINDIR)/$(TARGET)"
|
|
|
|
clean:
|
|
find . -name "*.o" | xargs $(DEL_FILE)
|
|
rm -f $(TARGET)
|
|
|
|
dist:
|
|
git tag v$(VERSION)
|
|
git archive --format=tar --prefix="$(TARGET)-$(VERSION)/" v$(VERSION) | \
|
|
gzip > $(TARGET)-$(VERSION).tar.gz
|