aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-11-18 20:21:58 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2016-11-18 20:21:58 -0500
commit20afa6e2f9c129e13031cc4a21834a03641cb8a4 (patch)
treee139f30f3ea3b61d91871a91bc7f4f2be8cec31e /tools
parent04e36857d6747e4525e68c4292c081b795b48366 (diff)
parentaab0b243b9a2fab7dcee0ce6e13789d3ab0394bf (diff)
Merge tag 'acpi-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki: "They fix an ACPI thermal management regression introduced by a recent FADT handling cleanup, an ACPI tools build issue introduced by a recent ACPICA commit and a PCC mailbox initialization bug causing lockdep to complain loudly. Specifics: - Revert a recent ACPICA cleanup that attempted to get rid of all FADT version 2 legacy, but broke ACPI thermal management on at least one system (Rafael Wysocki). - Fix cross-compiled builds of ACPI tools that stopped working after a recent cleanup related to the handling of header files in ACPICA (Lv Zheng). - Fix a locking issue in the PCC channel initialization code that invokes devm_request_irq() under a spinlock (among other things) and causes lockdep to complain (Hoan Tran)" * tag 'acpi-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: tools/power/acpi: Remove direct kernel source include reference mailbox: PCC: Fix lockdep warning when request PCC channel Revert "ACPICA: FADT support cleanup"
Diffstat (limited to 'tools')
-rw-r--r--tools/power/acpi/Makefile.config23
-rw-r--r--tools/power/acpi/Makefile.rules40
-rw-r--r--tools/power/acpi/tools/acpidbg/Makefile4
-rw-r--r--tools/power/acpi/tools/acpidbg/acpidbg.c8
-rw-r--r--tools/power/acpi/tools/acpidump/Makefile12
5 files changed, 53 insertions, 34 deletions
diff --git a/tools/power/acpi/Makefile.config b/tools/power/acpi/Makefile.config
index a538ff44b108..a1883bbb0144 100644
--- a/tools/power/acpi/Makefile.config
+++ b/tools/power/acpi/Makefile.config
@@ -8,18 +8,19 @@
8# as published by the Free Software Foundation; version 2 8# as published by the Free Software Foundation; version 2
9# of the License. 9# of the License.
10 10
11include ../../../../scripts/Makefile.include 11ifeq ($(srctree),)
12 12srctree := $(patsubst %/,%,$(dir $(shell pwd)))
13OUTPUT=./ 13srctree := $(patsubst %/,%,$(dir $(srctree)))
14ifeq ("$(origin O)", "command line") 14#$(info Determined 'srctree' to be $(srctree))
15 OUTPUT := $(O)/
16endif 15endif
17 16
18ifneq ($(OUTPUT),) 17include $(srctree)/../../scripts/Makefile.include
19# check that the output directory actually exists 18
20OUTDIR := $(shell cd $(OUTPUT) && /bin/pwd) 19OUTPUT=$(srctree)/
21$(if $(OUTDIR),, $(error output directory "$(OUTPUT)" does not exist)) 20ifeq ("$(origin O)", "command line")
21 OUTPUT := $(O)/power/acpi/
22endif 22endif
23#$(info Determined 'OUTPUT' to be $(OUTPUT))
23 24
24# --- CONFIGURATION BEGIN --- 25# --- CONFIGURATION BEGIN ---
25 26
@@ -70,8 +71,8 @@ WARNINGS := -Wall
70WARNINGS += $(call cc-supports,-Wstrict-prototypes) 71WARNINGS += $(call cc-supports,-Wstrict-prototypes)
71WARNINGS += $(call cc-supports,-Wdeclaration-after-statement) 72WARNINGS += $(call cc-supports,-Wdeclaration-after-statement)
72 73
73KERNEL_INCLUDE := ../../../include 74KERNEL_INCLUDE := $(OUTPUT)include
74ACPICA_INCLUDE := ../../../drivers/acpi/acpica 75ACPICA_INCLUDE := $(srctree)/../../../drivers/acpi/acpica
75CFLAGS += -D_LINUX -I$(KERNEL_INCLUDE) -I$(ACPICA_INCLUDE) 76CFLAGS += -D_LINUX -I$(KERNEL_INCLUDE) -I$(ACPICA_INCLUDE)
76CFLAGS += $(WARNINGS) 77CFLAGS += $(WARNINGS)
77 78
diff --git a/tools/power/acpi/Makefile.rules b/tools/power/acpi/Makefile.rules
index ec87a9e562c0..373738338f51 100644
--- a/tools/power/acpi/Makefile.rules
+++ b/tools/power/acpi/Makefile.rules
@@ -8,28 +8,42 @@
8# as published by the Free Software Foundation; version 2 8# as published by the Free Software Foundation; version 2
9# of the License. 9# of the License.
10 10
11$(OUTPUT)$(TOOL): $(TOOL_OBJS) FORCE 11objdir := $(OUTPUT)tools/$(TOOL)/
12 $(ECHO) " LD " $@ 12toolobjs := $(addprefix $(objdir),$(TOOL_OBJS))
13 $(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(TOOL_OBJS) -L$(OUTPUT) -o $@ 13$(OUTPUT)$(TOOL): $(toolobjs) FORCE
14 $(ECHO) " LD " $(subst $(OUTPUT),,$@)
15 $(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(toolobjs) -L$(OUTPUT) -o $@
16 $(ECHO) " STRIP " $(subst $(OUTPUT),,$@)
14 $(QUIET) $(STRIPCMD) $@ 17 $(QUIET) $(STRIPCMD) $@
15 18
16$(OUTPUT)%.o: %.c 19$(KERNEL_INCLUDE):
17 $(ECHO) " CC " $@ 20 $(ECHO) " MKDIR " $(subst $(OUTPUT),,$@)
21 $(QUIET) mkdir -p $(KERNEL_INCLUDE)
22 $(ECHO) " CP " $(subst $(OUTPUT),,$@)
23 $(QUIET) cp -rf $(srctree)/../../../include/acpi $(KERNEL_INCLUDE)/
24
25$(objdir)%.o: %.c $(KERNEL_INCLUDE)
26 $(ECHO) " CC " $(subst $(OUTPUT),,$@)
18 $(QUIET) $(CC) -c $(CFLAGS) -o $@ $< 27 $(QUIET) $(CC) -c $(CFLAGS) -o $@ $<
19 28
20all: $(OUTPUT)$(TOOL) 29all: $(OUTPUT)$(TOOL)
21clean: 30clean:
22 -find $(OUTPUT) \( -not -type d \) \ 31 $(ECHO) " RMOBJ " $(subst $(OUTPUT),,$(objdir))
23 -and \( -name '*~' -o -name '*.[oas]' \) \ 32 $(QUIET) find $(objdir) \( -not -type d \)\
24 -type f -print \ 33 -and \( -name '*~' -o -name '*.[oas]' \)\
25 | xargs rm -f 34 -type f -print | xargs rm -f
26 -rm -f $(OUTPUT)$(TOOL) 35 $(ECHO) " RM " $(TOOL)
36 $(QUIET) rm -f $(OUTPUT)$(TOOL)
37 $(ECHO) " RMINC " $(subst $(OUTPUT),,$(KERNEL_INCLUDE))
38 $(QUIET) rm -rf $(KERNEL_INCLUDE)
27 39
28install-tools: 40install-tools:
29 $(INSTALL) -d $(DESTDIR)${sbindir} 41 $(ECHO) " INST " $(TOOL)
30 $(INSTALL_PROGRAM) $(OUTPUT)$(TOOL) $(DESTDIR)${sbindir} 42 $(QUIET) $(INSTALL) -d $(DESTDIR)$(sbindir)
43 $(QUIET) $(INSTALL_PROGRAM) $(OUTPUT)$(TOOL) $(DESTDIR)$(sbindir)
31uninstall-tools: 44uninstall-tools:
32 - rm -f $(DESTDIR)${sbindir}/$(TOOL) 45 $(ECHO) " UNINST " $(TOOL)
46 $(QUIET) rm -f $(DESTDIR)$(sbindir)/$(TOOL)
33 47
34install: all install-tools $(EXTRA_INSTALL) 48install: all install-tools $(EXTRA_INSTALL)
35uninstall: uninstall-tools $(EXTRA_UNINSTALL) 49uninstall: uninstall-tools $(EXTRA_UNINSTALL)
diff --git a/tools/power/acpi/tools/acpidbg/Makefile b/tools/power/acpi/tools/acpidbg/Makefile
index 352df4b41ae9..f2d06e773eb4 100644
--- a/tools/power/acpi/tools/acpidbg/Makefile
+++ b/tools/power/acpi/tools/acpidbg/Makefile
@@ -17,9 +17,7 @@ vpath %.c \
17 ../../os_specific/service_layers\ 17 ../../os_specific/service_layers\
18 . 18 .
19CFLAGS += -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGGER\ 19CFLAGS += -DACPI_APPLICATION -DACPI_SINGLE_THREAD -DACPI_DEBUGGER\
20 -I.\ 20 -I.
21 -I../../../../../drivers/acpi/acpica\
22 -I../../../../../include
23LDFLAGS += -lpthread 21LDFLAGS += -lpthread
24TOOL_OBJS = \ 22TOOL_OBJS = \
25 acpidbg.o 23 acpidbg.o
diff --git a/tools/power/acpi/tools/acpidbg/acpidbg.c b/tools/power/acpi/tools/acpidbg/acpidbg.c
index a88ac45b7756..4308362d7068 100644
--- a/tools/power/acpi/tools/acpidbg/acpidbg.c
+++ b/tools/power/acpi/tools/acpidbg/acpidbg.c
@@ -12,10 +12,16 @@
12#include <acpi/acpi.h> 12#include <acpi/acpi.h>
13 13
14/* Headers not included by include/acpi/platform/aclinux.h */ 14/* Headers not included by include/acpi/platform/aclinux.h */
15#include <unistd.h>
16#include <stdio.h>
17#include <stdlib.h>
18#include <string.h>
19#include <error.h>
15#include <stdbool.h> 20#include <stdbool.h>
16#include <fcntl.h> 21#include <fcntl.h>
17#include <assert.h> 22#include <assert.h>
18#include <linux/circ_buf.h> 23#include <sys/select.h>
24#include "../../../../../include/linux/circ_buf.h"
19 25
20#define ACPI_AML_FILE "/sys/kernel/debug/acpi/acpidbg" 26#define ACPI_AML_FILE "/sys/kernel/debug/acpi/acpidbg"
21#define ACPI_AML_SEC_TICK 1 27#define ACPI_AML_SEC_TICK 1
diff --git a/tools/power/acpi/tools/acpidump/Makefile b/tools/power/acpi/tools/acpidump/Makefile
index 04b5db7c7c0b..f7c7af1f9258 100644
--- a/tools/power/acpi/tools/acpidump/Makefile
+++ b/tools/power/acpi/tools/acpidump/Makefile
@@ -19,9 +19,7 @@ vpath %.c \
19 ./\ 19 ./\
20 ../../common\ 20 ../../common\
21 ../../os_specific/service_layers 21 ../../os_specific/service_layers
22CFLAGS += -DACPI_DUMP_APP -I.\ 22CFLAGS += -DACPI_DUMP_APP -I.
23 -I../../../../../drivers/acpi/acpica\
24 -I../../../../../include
25TOOL_OBJS = \ 23TOOL_OBJS = \
26 apdump.o\ 24 apdump.o\
27 apfiles.o\ 25 apfiles.o\
@@ -49,7 +47,9 @@ TOOL_OBJS = \
49 47
50include ../../Makefile.rules 48include ../../Makefile.rules
51 49
52install-man: ../../man/acpidump.8 50install-man: $(srctree)/man/acpidump.8
53 $(INSTALL_DATA) -D $< $(DESTDIR)${mandir}/man8/acpidump.8 51 $(ECHO) " INST " acpidump.8
52 $(QUIET) $(INSTALL_DATA) -D $< $(DESTDIR)$(mandir)/man8/acpidump.8
54uninstall-man: 53uninstall-man:
55 - rm -f $(DESTDIR)${mandir}/man8/acpidump.8 54 $(ECHO) " UNINST " acpidump.8
55 $(QUIET) rm -f $(DESTDIR)$(mandir)/man8/acpidump.8