1. 04 May, 2018 1 commit
    • Jiri Slaby's avatar
      tools: power/acpi, revert to LD = gcc · 75539616
      Jiri Slaby authored
      Commit 7ed1c190 (tools: fix cross-compile var clobbering) removed
      setting of LD to $(CROSS_COMPILE)gcc. This broke build of acpica
      (acpidump) in power/acpi:
       ld: unrecognized option '-D_LINUX'
      The tools pass CFLAGS to the linker (incl. -D_LINUX), so revert this
      particular change and let LD be $(CC) again. Note that the old behaviour
      was a bit different, it used $(CROSS_COMPILE)gcc which was eliminated by
      the commit 7ed1c190. We use $(CC) for that reason.
      Fixes: 7ed1c190 (tools: fix cross-compile var clobbering)
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: 4.16+ <stable@vger.kernel.org> # 4.16+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  2. 18 Mar, 2018 1 commit
  3. 21 Feb, 2018 1 commit
    • Martin Kelly's avatar
      tools: fix cross-compile var clobbering · 7ed1c190
      Martin Kelly authored
      Currently a number of Makefiles break when used with toolchains that
      pass extra flags in CC and other cross-compile related variables (such
      as --sysroot).
      Thus we get this error when we use a toolchain that puts --sysroot in
      the CC var:
        ~/src/linux/tools$ make iio
        iio_event_monitor.c:18:10: fatal error: unistd.h: No such file or directory
          #include <unistd.h>
      This occurs because we clobber several env vars related to
      cross-compiling with lines like this:
        CC = $(CROSS_COMPILE)gcc
      Although this will point to a valid cross-compiler, we lose any extra
      flags that might exist in the CC variable, which can break toolchains
      that rely on them (for example, those that use --sysroot).
      This easily shows up using a Yocto SDK:
        $ . [snip]/sdk/environment-setup-cortexa8hf-neon-poky-linux-gnueabi
        $ echo $CC
        arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard
        $ echo $CROSS_COMPILE
        $ echo ${CROSS_COMPILE}gcc
      Although arm-poky-linux-gnueabi-gcc is a cross-compiler, we've lost the
      --sysroot and other flags that enable us to find the right libraries to
      link against, so we can't find unistd.h and other libraries and headers.
      Normally with the --sysroot flag we would find unistd.h in the sdk
      directory in the sysroot:
        $ find [snip]/sdk/sysroots -path '*/usr/include/unistd.h'
      The perf Makefile adds CC = $(CROSS_COMPILE)gcc if and only if CC is not
      already set, and it compiles correctly with the above toolchain.
      So, generalize the logic that perf uses in the common Makefile and
      remove the manual CC = $(CROSS_COMPILE)gcc lines from each Makefile.
      Note that this patch does not fix cross-compile for all the tools (some
      have other bugs), but it does fix it for all except usb and acpi, which
      still have other unrelated issues.
      I tested both with and without the patch on native and cross-build and
      there appear to be no regressions.
      Link: http://lkml.kernel.org/r/20180107214028.23771-1-martin@martingkelly.comSigned-off-by: default avatarMartin Kelly <martin@martingkelly.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Li Zefan <lizefan@huawei.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: "K. Y. Srinivasan" <kys@microsoft.com>
      Cc: Haiyang Zhang <haiyangz@microsoft.com>
      Cc: Stephen Hemminger <sthemmin@microsoft.com>
      Cc: Jonathan Cameron <jic23@kernel.org>
      Cc: Pali Rohar <pali.rohar@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Robert Moore <robert.moore@intel.com>
      Cc: Lv Zheng <lv.zheng@intel.com>
      Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Valentina Manea <valentina.manea.m@gmail.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Mario Limonciello <mario.limonciello@dell.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  4. 06 Feb, 2018 1 commit
  5. 27 Nov, 2017 1 commit
  6. 03 Oct, 2017 1 commit
  7. 03 Aug, 2017 2 commits
  8. 27 Jun, 2017 1 commit
  9. 12 May, 2017 1 commit
  10. 09 Feb, 2017 1 commit
  11. 02 Jan, 2017 1 commit
  12. 14 Dec, 2016 1 commit
  13. 16 Nov, 2016 1 commit
  14. 20 Oct, 2016 2 commits
  15. 10 Sep, 2016 1 commit
  16. 13 Aug, 2016 8 commits
  17. 23 Jun, 2016 1 commit
  18. 05 May, 2016 2 commits
  19. 09 Apr, 2016 1 commit
  20. 05 Apr, 2016 2 commits
  21. 15 Jan, 2016 1 commit
  22. 01 Jan, 2016 2 commits
  23. 14 Dec, 2015 1 commit
    • Lv Zheng's avatar
      tools/power/acpi: Add userspace AML interface support · 37645d65
      Lv Zheng authored
      This patch adds a userspace tool to access Linux kernel AML debugger
      Tow modes are supported by this tool:
      1. Interactive: Users are able to launch a debugging shell to talk with
         in-kernel AML debugger.
         Note that it's user duty to ensure kernel runtime integrity by using
         this debugging tool:
         A. Some control methods evaluated by the users may result in kernel
            panics if those control methods shouldn't be evaluated by the OSPMs
            according to the current BIOS/OS configurations.
         B. Currently if a single stepping evaluation couldn't run to an end,
            then the synchronization primitives acquired by the evaluation may
            block normal OSPM control method evaluations.
      2. Batch: Users are able to execute debugger commands in a script.
         Note that in addition to the above duties, it's user duty to ensure
         script runtime integrity by using this debugging tool in this mode:
         C. Currently only those commands that are not used for single stepping
            are suitable to be used in this mode.
         D. If the execution of the command may cause a failure that could result
            in an endless kernel execution, the execution of the script may also
            get blocked.
      To exit the utility, currently "exit/quit" commands are recommended, but
      ctrl-C" can also be used.
      Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
  24. 22 Oct, 2015 1 commit
  25. 31 Jul, 2015 2 commits
  26. 01 Jul, 2015 2 commits