All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support
@ 2017-03-31  4:53 Lv Zheng
  2017-03-31  4:53 ` [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile Lv Zheng
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Lv Zheng @ 2017-03-31  4:53 UTC (permalink / raw)
  To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi, Al Stone

_LINUX: used to detect a target build is a linux kernel/application.
__linux__: used to detect a build is on a linux hosts.

Thus we can see: if a linux kernel build is performed on environments other
than linux hosts, __linux__ may not be defined by the compiler and _LINUX
cannot cover linux kernel resident ACPICA files, as it's only defined in
<linux/acpi.h> and hence only allows non ACPICA kernel files to correctly
include aclinux.h.
As a conclusion, we don't actually support such build.

This patch adds -D_LINUX for ACPICA files so that kernel builds on any
hosts can use unified _LINUX as a linux kernel target indication to
correctly include aclinux.h.

Cc: Al Stone <ah3@redhat.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index 32d93ed..dea6530 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -2,7 +2,7 @@
 # Makefile for ACPICA Core interpreter
 #
 
-ccflags-y			:= -Os -DBUILDING_ACPICA
+ccflags-y			:= -Os -D_LINUX -DBUILDING_ACPICA
 ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
 
 # use acpi.o to put all files here into acpi.o modparam namespace
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile
  2017-03-31  4:53 [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support Lv Zheng
@ 2017-03-31  4:53 ` Lv Zheng
  2017-04-02  6:29   ` kbuild test robot
  2017-04-02  8:16   ` kbuild test robot
  2017-04-03 21:47 ` [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support Al Stone
  2017-04-11  7:48 ` [PATCH v2] " Lv Zheng
  2 siblings, 2 replies; 10+ messages in thread
From: Lv Zheng @ 2017-03-31  4:53 UTC (permalink / raw)
  To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi

ACPI_DEBUG_OUTPUT isn't necessarily a Makefile -D option defined
environment macro. This patch cleans up ACPICA Makefile by moving it to
aclinux.h, leaving only -D options for macros that must be defined in the
Makefile.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/Makefile    | 1 -
 include/acpi/platform/aclinux.h | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index dea6530..762f2261 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -3,7 +3,6 @@
 #
 
 ccflags-y			:= -Os -D_LINUX -DBUILDING_ACPICA
-ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
 
 # use acpi.o to put all files here into acpi.o modparam namespace
 obj-y	+= acpi.o
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index a39e3f6..1ec8fb7 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -74,6 +74,7 @@
 #endif
 
 #ifdef CONFIG_ACPI_DEBUG
+#define ACPI_DEBUG_OUTPUT
 #define ACPI_MUTEX_DEBUG
 #endif
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile
  2017-03-31  4:53 ` [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile Lv Zheng
@ 2017-04-02  6:29   ` kbuild test robot
  2017-04-02  8:16   ` kbuild test robot
  1 sibling, 0 replies; 10+ messages in thread
From: kbuild test robot @ 2017-04-02  6:29 UTC (permalink / raw)
  Cc: kbuild-all, Rafael J . Wysocki, Rafael J . Wysocki, Len Brown,
	Lv Zheng, Lv Zheng, linux-acpi

[-- Attachment #1: Type: text/plain, Size: 6399 bytes --]

Hi Lv,

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v4.11-rc4 next-20170331]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lv-Zheng/ACPI-ACPICA-Add-non-linux-host-build-support/20170402-125838
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/acpi/acpi.h:61:0,
                    from include/linux/acpi.h:33,
                    from drivers/platform/x86/xo15-ebook.c:21:
   drivers/platform/x86/xo15-ebook.c: In function 'ebook_switch_notify':
   include/acpi/acoutput.h:283:55: error: '_COMPONENT' undeclared (first use in this function)
     __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
                                                          ^
   include/acpi/acoutput.h:306:44: note: in definition of macro 'ACPI_DO_WHILE0'
    #define ACPI_DO_WHILE0(a)               do a while(0)
                                               ^
   include/acpi/acoutput.h:324:7: note: in expansion of macro 'ACPI_IS_DEBUG_ENABLED'
      if (ACPI_IS_DEBUG_ENABLED (level, component)) \
          ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:331:2: note: in expansion of macro 'ACPI_DO_DEBUG_PRINT'
     ACPI_DO_DEBUG_PRINT (acpi_debug_print, level, line, \
     ^~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:338:41: note: in expansion of macro 'ACPI_ACTUAL_DEBUG'
    #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
                                            ^~~~~~~~~~~~~~~~~
>> drivers/platform/x86/xo15-ebook.c:73:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
      ACPI_DEBUG_PRINT((ACPI_DB_INFO,
      ^~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:139:46: note: in expansion of macro 'ACPI_DEBUG_PARAMETERS'
    #define ACPI_DEBUG_LEVEL(dl)        (u32) dl,ACPI_DEBUG_PARAMETERS
                                                 ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:149:37: note: in expansion of macro 'ACPI_DEBUG_LEVEL'
    #define ACPI_DB_INFO                ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
                                        ^~~~~~~~~~~~~~~~
>> drivers/platform/x86/xo15-ebook.c:73:21: note: in expansion of macro 'ACPI_DB_INFO'
      ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                        ^~~~~~~~~~~~
   include/acpi/acoutput.h:283:55: note: each undeclared identifier is reported only once for each function it appears in
     __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT
                                                          ^
   include/acpi/acoutput.h:306:44: note: in definition of macro 'ACPI_DO_WHILE0'
    #define ACPI_DO_WHILE0(a)               do a while(0)
                                               ^
   include/acpi/acoutput.h:324:7: note: in expansion of macro 'ACPI_IS_DEBUG_ENABLED'
      if (ACPI_IS_DEBUG_ENABLED (level, component)) \
          ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:331:2: note: in expansion of macro 'ACPI_DO_DEBUG_PRINT'
     ACPI_DO_DEBUG_PRINT (acpi_debug_print, level, line, \
     ^~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:338:41: note: in expansion of macro 'ACPI_ACTUAL_DEBUG'
    #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
                                            ^~~~~~~~~~~~~~~~~
>> drivers/platform/x86/xo15-ebook.c:73:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
      ACPI_DEBUG_PRINT((ACPI_DB_INFO,
      ^~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:139:46: note: in expansion of macro 'ACPI_DEBUG_PARAMETERS'
    #define ACPI_DEBUG_LEVEL(dl)        (u32) dl,ACPI_DEBUG_PARAMETERS
                                                 ^~~~~~~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:149:37: note: in expansion of macro 'ACPI_DEBUG_LEVEL'
    #define ACPI_DB_INFO                ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
                                        ^~~~~~~~~~~~~~~~
>> drivers/platform/x86/xo15-ebook.c:73:21: note: in expansion of macro 'ACPI_DB_INFO'
      ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                        ^~~~~~~~~~~~

vim +/ACPI_DEBUG_PRINT +73 drivers/platform/x86/xo15-ebook.c

89ca1177 Paul Fox          2011-02-03  57  		return -EIO;
89ca1177 Paul Fox          2011-02-03  58  
89ca1177 Paul Fox          2011-02-03  59  	/* input layer checks if event is redundant */
89ca1177 Paul Fox          2011-02-03  60  	input_report_switch(button->input, SW_TABLET_MODE, !state);
89ca1177 Paul Fox          2011-02-03  61  	input_sync(button->input);
89ca1177 Paul Fox          2011-02-03  62  	return 0;
89ca1177 Paul Fox          2011-02-03  63  }
89ca1177 Paul Fox          2011-02-03  64  
89ca1177 Paul Fox          2011-02-03  65  static void ebook_switch_notify(struct acpi_device *device, u32 event)
89ca1177 Paul Fox          2011-02-03  66  {
89ca1177 Paul Fox          2011-02-03  67  	switch (event) {
89ca1177 Paul Fox          2011-02-03  68  	case ACPI_FIXED_HARDWARE_EVENT:
89ca1177 Paul Fox          2011-02-03  69  	case XO15_EBOOK_NOTIFY_STATUS:
89ca1177 Paul Fox          2011-02-03  70  		ebook_send_state(device);
89ca1177 Paul Fox          2011-02-03  71  		break;
89ca1177 Paul Fox          2011-02-03  72  	default:
89ca1177 Paul Fox          2011-02-03 @73  		ACPI_DEBUG_PRINT((ACPI_DB_INFO,
89ca1177 Paul Fox          2011-02-03  74  				  "Unsupported event [0x%x]\n", event));
89ca1177 Paul Fox          2011-02-03  75  		break;
89ca1177 Paul Fox          2011-02-03  76  	}
89ca1177 Paul Fox          2011-02-03  77  }
89ca1177 Paul Fox          2011-02-03  78  
3567a4e2 Rafael J. Wysocki 2012-08-09  79  #ifdef CONFIG_PM_SLEEP
44cb98c4 Rafael J. Wysocki 2012-06-27  80  static int ebook_switch_resume(struct device *dev)
89ca1177 Paul Fox          2011-02-03  81  {

:::::: The code at line 73 was first introduced by commit
:::::: 89ca11771a4b50ed616ab6c37e0ef333d02f1d47 OLPC XO-1.5 ebook switch driver

:::::: TO: Paul Fox <pgf@laptop.org>
:::::: CC: Matthew Garrett <mjg@redhat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58972 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile
  2017-03-31  4:53 ` [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile Lv Zheng
  2017-04-02  6:29   ` kbuild test robot
@ 2017-04-02  8:16   ` kbuild test robot
  2017-04-11  7:19     ` Zheng, Lv
  1 sibling, 1 reply; 10+ messages in thread
From: kbuild test robot @ 2017-04-02  8:16 UTC (permalink / raw)
  Cc: kbuild-all, Rafael J . Wysocki, Rafael J . Wysocki, Len Brown,
	Lv Zheng, Lv Zheng, linux-acpi

Hi Lv,

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v4.11-rc4 next-20170331]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Lv-Zheng/ACPI-ACPICA-Add-non-linux-host-build-support/20170402-125838
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/platform/x86/panasonic-laptop.c:266:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:282:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:289:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:295:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:306:25: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:462:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:478:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 3 given
   drivers/platform/x86/panasonic-laptop.c:514:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:521:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:560:9: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 3 given
   drivers/platform/x86/panasonic-laptop.c:579:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:585:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:605:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   drivers/platform/x86/panasonic-laptop.c:611:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
   include/linux/compiler.h:264:8: sparse: attribute 'no_sanitize_address': unknown attribute
   drivers/platform/x86/panasonic-laptop.c:266:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:579:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:585:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:605:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:611:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:560:9: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:282:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:289:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:295:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:306:25: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:462:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:478:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:514:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c:521:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
   drivers/platform/x86/panasonic-laptop.c: In function 'acpi_pcc_get_sqty':
   drivers/platform/x86/panasonic-laptop.c:267:38: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
          "evaluation error HKEY.SQTY\n"));
                                         ^
   In file included from include/acpi/acpi.h:61:0,
                    from include/linux/acpi.h:33,
                    from drivers/platform/x86/panasonic-laptop.c:128:
   include/acpi/acoutput.h:338:41: error: 'ACPI_ACTUAL_DEBUG' undeclared (first use in this function)
    #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
                                            ^
   drivers/platform/x86/panasonic-laptop.c:266:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
      ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
      ^~~~~~~~~~~~~~~~
   include/acpi/acoutput.h:338:41: note: each undeclared identifier is reported only once for each function it appears in
    #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
                                            ^
   drivers/platform/x86/panasonic-laptop.c:266:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
      ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
      ^~~~~~~~~~~~~~~~
   drivers/platform/x86/panasonic-laptop.c: In function 'acpi_pcc_retrieve_biosdata':
   drivers/platform/x86/panasonic-laptop.c:283:38: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
          "evaluation error HKEY.SINF\n"));
                                         ^
   In file included from include/acpi/acpi.h:61:0,
                    from include/linux/acpi.h:33,
                    from drivers/platform/x86/panasonic-laptop.c:128:
   include/acpi/acoutput.h:338:41: error: 'ACPI_ACTUAL_DEBUG' undeclared (first use in this function)
    #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
                                            ^
   drivers/platform/x86/panasonic-laptop.c:282:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
      ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
      ^~~~~~~~~~~~~~~~
   drivers/platform/x86/panasonic-laptop.c:289:58: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
      ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid HKEY.SINF\n"));
                                                             ^
   drivers/platform/x86/panasonic-laptop.c:296:39: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
         "SQTY reports bad SINF length\n"));
                                          ^
   drivers/platform/x86/panasonic-laptop.c:307:34: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
          "Invalid HKEY.SINF data\n"));
                                     ^
   drivers/platform/x86/panasonic-laptop.c: In function 'acpi_pcc_generate_keyinput':
   drivers/platform/x86/panasonic-laptop.c:463:38: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
         "error getting hotkey status\n"));
                                         ^
   In file included from include/acpi/acpi.h:61:0,
                    from include/linux/acpi.h:33,
                    from drivers/platform/x86/panasonic-laptop.c:128:
   include/acpi/acoutput.h:338:41: error: 'ACPI_ACTUAL_DEBUG' undeclared (first use in this function)
    #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
                                            ^
   drivers/platform/x86/panasonic-laptop.c:462:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
      ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
      ^~~~~~~~~~~~~~~~
   drivers/platform/x86/panasonic-laptop.c:479:44: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 3 given
          "Unknown hotkey event: %d\n", result));
                                               ^
   drivers/platform/x86/panasonic-laptop.c: In function 'acpi_pcc_init_input':
   drivers/platform/x86/panasonic-laptop.c:515:47: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
          "Unable to setup input device keymap\n"));
                                                  ^
   In file included from include/acpi/acpi.h:61:0,
                    from include/linux/acpi.h:33,
                    from drivers/platform/x86/panasonic-laptop.c:128:
   include/acpi/acoutput.h:338:41: error: 'ACPI_ACTUAL_DEBUG' undeclared (first use in this function)
    #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
                                            ^
   drivers/platform/x86/panasonic-laptop.c:514:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
      ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
      ^~~~~~~~~~~~~~~~
   drivers/platform/x86/panasonic-laptop.c:522:43: error: macro "ACPI_ACTUAL_DEBUG" requires 6 arguments, but only 2 given
          "Unable to register input device\n"));

vim +/ACPI_ACTUAL_DEBUG +266 drivers/platform/x86/panasonic-laptop.c

709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  250  	status = acpi_evaluate_object(pcc->handle, METHOD_HKEY_SSET,
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  251  				      &params, NULL);
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  252  
9fab10cd drivers/platform/x86/panasonic-laptop.c Axel Lin     2010-07-07  253  	return (status == AE_OK) ? 0 : -EIO;
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  254  }
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  255  
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  256  static inline int acpi_pcc_get_sqty(struct acpi_device *device)
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  257  {
3e2dab9a drivers/misc/panasonic-laptop.c         Len Brown    2008-10-11  258  	unsigned long long s;
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  259  	acpi_status status;
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  260  
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  261  	status = acpi_evaluate_integer(device->handle, METHOD_HKEY_SQTY,
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  262  				       NULL, &s);
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  263  	if (ACPI_SUCCESS(status))
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  264  		return s;
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  265  	else {
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23 @266  		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  267  				  "evaluation error HKEY.SQTY\n"));
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  268  		return -EINVAL;
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  269  	}
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  270  }
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  271  
e253fb94 drivers/platform/x86/panasonic-laptop.c Jean Delvare 2010-10-21  272  static int acpi_pcc_retrieve_biosdata(struct pcc_acpi *pcc)
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  273  {
709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  274  	acpi_status status;

:::::: The code at line 266 was first introduced by commit
:::::: 709ee531c153038d81b30649b9eeed3c44a4d5cc panasonic-laptop: add Panasonic Let's Note laptop extras driver v0.94

:::::: TO: Harald Welte <laforge@gnumonks.org>
:::::: CC: Len Brown <len.brown@intel.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support
  2017-03-31  4:53 [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support Lv Zheng
  2017-03-31  4:53 ` [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile Lv Zheng
@ 2017-04-03 21:47 ` Al Stone
  2017-04-11  7:22   ` Zheng, Lv
  2017-04-11  7:48 ` [PATCH v2] " Lv Zheng
  2 siblings, 1 reply; 10+ messages in thread
From: Al Stone @ 2017-04-03 21:47 UTC (permalink / raw)
  To: Lv Zheng, Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
  Cc: Lv Zheng, linux-acpi, Al Stone

On 03/30/2017 10:53 PM, Lv Zheng wrote:
> _LINUX: used to detect a target build is a linux kernel/application.
> __linux__: used to detect a build is on a linux hosts.
> 
> Thus we can see: if a linux kernel build is performed on environments other
> than linux hosts, __linux__ may not be defined by the compiler and _LINUX
> cannot cover linux kernel resident ACPICA files, as it's only defined in
> <linux/acpi.h> and hence only allows non ACPICA kernel files to correctly
> include aclinux.h.
> As a conclusion, we don't actually support such build.
> 
> This patch adds -D_LINUX for ACPICA files so that kernel builds on any
> hosts can use unified _LINUX as a linux kernel target indication to
> correctly include aclinux.h.
> 
> Cc: Al Stone <ah3@redhat.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
>  drivers/acpi/acpica/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
> index 32d93ed..dea6530 100644
> --- a/drivers/acpi/acpica/Makefile
> +++ b/drivers/acpi/acpica/Makefile
> @@ -2,7 +2,7 @@
>  # Makefile for ACPICA Core interpreter
>  #
>  
> -ccflags-y			:= -Os -DBUILDING_ACPICA
> +ccflags-y			:= -Os -D_LINUX -DBUILDING_ACPICA
>  ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
>  
>  # use acpi.o to put all files here into acpi.o modparam namespace
> 

These patches do solve the particular compilation problem I was having
(targeting an embedded arm64 system), so thank you for that.  The build
test obviously needs fixing, but with the Linaro aarch64-elf compilers,
and the defconfig,

Tested-by: Al Stone <ahs3@redhat.com>

-- 
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Red Hat, Inc.
ahs3@redhat.com
-----------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile
  2017-04-02  8:16   ` kbuild test robot
@ 2017-04-11  7:19     ` Zheng, Lv
  2017-04-11 13:53       ` Rafael J. Wysocki
  0 siblings, 1 reply; 10+ messages in thread
From: Zheng, Lv @ 2017-04-11  7:19 UTC (permalink / raw)
  To: Rafael J . Wysocki
  Cc: kbuild-all, Wysocki, Rafael J, Brown, Len, Lv Zheng, linux-acpi, lkp

Hi, Rafael

According to the test, PATCH 02 is not possible unless ACPICA debugging function stubs are correctly prepared for ACPI_DEBUG_OUTPUT=n.
So please help to drop PATCH 02 and only PATCH 01 is useful for now.

Thanks and best regards
Lv


> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of kbuild
> test robot
> Subject: Re: [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile
> 
> Hi Lv,
> 
> [auto build test WARNING on pm/linux-next]
> [also build test WARNING on v4.11-rc4 next-20170331]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Lv-Zheng/ACPI-ACPICA-Add-non-linux-host-build-
> support/20170402-125838
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
> reproduce:
>         # apt-get install sparse
>         make ARCH=x86_64 allmodconfig
>         make C=1 CF=-D__CHECK_ENDIAN__
> 
> 
> sparse warnings: (new ones prefixed by >>)
> 
> >> drivers/platform/x86/panasonic-laptop.c:266:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:282:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:289:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:295:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:306:25: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:462:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:478:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 3 given
>    drivers/platform/x86/panasonic-laptop.c:514:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:521:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:560:9: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 3 given
>    drivers/platform/x86/panasonic-laptop.c:579:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:585:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:605:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    drivers/platform/x86/panasonic-laptop.c:611:17: sparse: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>    include/linux/compiler.h:264:8: sparse: attribute 'no_sanitize_address': unknown attribute
>    drivers/platform/x86/panasonic-laptop.c:266:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:579:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:585:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:605:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:611:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:560:9: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:282:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:289:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:295:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:306:25: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:462:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:478:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:514:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c:521:17: sparse: undefined identifier 'ACPI_ACTUAL_DEBUG'
>    drivers/platform/x86/panasonic-laptop.c: In function 'acpi_pcc_get_sqty':
>    drivers/platform/x86/panasonic-laptop.c:267:38: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>           "evaluation error HKEY.SQTY\n"));
>                                          ^
>    In file included from include/acpi/acpi.h:61:0,
>                     from include/linux/acpi.h:33,
>                     from drivers/platform/x86/panasonic-laptop.c:128:
>    include/acpi/acoutput.h:338:41: error: 'ACPI_ACTUAL_DEBUG' undeclared (first use in this function)
>     #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
>                                             ^
>    drivers/platform/x86/panasonic-laptop.c:266:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
>       ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
>       ^~~~~~~~~~~~~~~~
>    include/acpi/acoutput.h:338:41: note: each undeclared identifier is reported only once for each
> function it appears in
>     #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
>                                             ^
>    drivers/platform/x86/panasonic-laptop.c:266:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
>       ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
>       ^~~~~~~~~~~~~~~~
>    drivers/platform/x86/panasonic-laptop.c: In function 'acpi_pcc_retrieve_biosdata':
>    drivers/platform/x86/panasonic-laptop.c:283:38: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>           "evaluation error HKEY.SINF\n"));
>                                          ^
>    In file included from include/acpi/acpi.h:61:0,
>                     from include/linux/acpi.h:33,
>                     from drivers/platform/x86/panasonic-laptop.c:128:
>    include/acpi/acoutput.h:338:41: error: 'ACPI_ACTUAL_DEBUG' undeclared (first use in this function)
>     #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
>                                             ^
>    drivers/platform/x86/panasonic-laptop.c:282:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
>       ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
>       ^~~~~~~~~~~~~~~~
>    drivers/platform/x86/panasonic-laptop.c:289:58: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>       ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid HKEY.SINF\n"));
>                                                              ^
>    drivers/platform/x86/panasonic-laptop.c:296:39: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>          "SQTY reports bad SINF length\n"));
>                                           ^
>    drivers/platform/x86/panasonic-laptop.c:307:34: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>           "Invalid HKEY.SINF data\n"));
>                                      ^
>    drivers/platform/x86/panasonic-laptop.c: In function 'acpi_pcc_generate_keyinput':
>    drivers/platform/x86/panasonic-laptop.c:463:38: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>          "error getting hotkey status\n"));
>                                          ^
>    In file included from include/acpi/acpi.h:61:0,
>                     from include/linux/acpi.h:33,
>                     from drivers/platform/x86/panasonic-laptop.c:128:
>    include/acpi/acoutput.h:338:41: error: 'ACPI_ACTUAL_DEBUG' undeclared (first use in this function)
>     #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
>                                             ^
>    drivers/platform/x86/panasonic-laptop.c:462:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
>       ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
>       ^~~~~~~~~~~~~~~~
>    drivers/platform/x86/panasonic-laptop.c:479:44: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 3 given
>           "Unknown hotkey event: %d\n", result));
>                                                ^
>    drivers/platform/x86/panasonic-laptop.c: In function 'acpi_pcc_init_input':
>    drivers/platform/x86/panasonic-laptop.c:515:47: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>           "Unable to setup input device keymap\n"));
>                                                   ^
>    In file included from include/acpi/acpi.h:61:0,
>                     from include/linux/acpi.h:33,
>                     from drivers/platform/x86/panasonic-laptop.c:128:
>    include/acpi/acoutput.h:338:41: error: 'ACPI_ACTUAL_DEBUG' undeclared (first use in this function)
>     #define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
>                                             ^
>    drivers/platform/x86/panasonic-laptop.c:514:3: note: in expansion of macro 'ACPI_DEBUG_PRINT'
>       ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
>       ^~~~~~~~~~~~~~~~
>    drivers/platform/x86/panasonic-laptop.c:522:43: error: macro "ACPI_ACTUAL_DEBUG" requires 6
> arguments, but only 2 given
>           "Unable to register input device\n"));
> 
> vim +/ACPI_ACTUAL_DEBUG +266 drivers/platform/x86/panasonic-laptop.c
> 
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  250  	status =
> acpi_evaluate_object(pcc->handle, METHOD_HKEY_SSET,
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  251
> &params, NULL);
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  252
> 9fab10cd drivers/platform/x86/panasonic-laptop.c Axel Lin     2010-07-07  253  	return (status ==
> AE_OK) ? 0 : -EIO;
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  254  }
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  255
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  256  static inline int
> acpi_pcc_get_sqty(struct acpi_device *device)
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  257  {
> 3e2dab9a drivers/misc/panasonic-laptop.c         Len Brown    2008-10-11  258  	unsigned long long
> s;
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  259  	acpi_status status;
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  260
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  261  	status =
> acpi_evaluate_integer(device->handle, METHOD_HKEY_SQTY,
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  262
> NULL, &s);
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  263  	if
> (ACPI_SUCCESS(status))
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  264  		return s;
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  265  	else {
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23 @266
> 	ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  267
> "evaluation error HKEY.SQTY\n"));
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  268  		return -
> EINVAL;
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  269  	}
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  270  }
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  271
> e253fb94 drivers/platform/x86/panasonic-laptop.c Jean Delvare 2010-10-21  272  static int
> acpi_pcc_retrieve_biosdata(struct pcc_acpi *pcc)
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  273  {
> 709ee531 drivers/misc/panasonic-laptop.c         Harald Welte 2008-09-23  274  	acpi_status status;
> 
> :::::: The code at line 266 was first introduced by commit
> :::::: 709ee531c153038d81b30649b9eeed3c44a4d5cc panasonic-laptop: add Panasonic Let's Note laptop
> extras driver v0.94
> 
> :::::: TO: Harald Welte <laforge@gnumonks.org>
> :::::: CC: Len Brown <len.brown@intel.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support
  2017-04-03 21:47 ` [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support Al Stone
@ 2017-04-11  7:22   ` Zheng, Lv
  0 siblings, 0 replies; 10+ messages in thread
From: Zheng, Lv @ 2017-04-11  7:22 UTC (permalink / raw)
  To: ahs3, Wysocki, Rafael J, Rafael J . Wysocki, Brown, Len
  Cc: Lv Zheng, linux-acpi, Al Stone

Hi,

> From: Al Stone [mailto:ahs3@redhat.com]
> Subject: Re: [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support
> 
> On 03/30/2017 10:53 PM, Lv Zheng wrote:
> > _LINUX: used to detect a target build is a linux kernel/application.
> > __linux__: used to detect a build is on a linux hosts.
> >
> > Thus we can see: if a linux kernel build is performed on environments other
> > than linux hosts, __linux__ may not be defined by the compiler and _LINUX
> > cannot cover linux kernel resident ACPICA files, as it's only defined in
> > <linux/acpi.h> and hence only allows non ACPICA kernel files to correctly
> > include aclinux.h.
> > As a conclusion, we don't actually support such build.
> >
> > This patch adds -D_LINUX for ACPICA files so that kernel builds on any
> > hosts can use unified _LINUX as a linux kernel target indication to
> > correctly include aclinux.h.
> >
> > Cc: Al Stone <ah3@redhat.com>
> > Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> > ---
> >  drivers/acpi/acpica/Makefile | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
> > index 32d93ed..dea6530 100644
> > --- a/drivers/acpi/acpica/Makefile
> > +++ b/drivers/acpi/acpica/Makefile
> > @@ -2,7 +2,7 @@
> >  # Makefile for ACPICA Core interpreter
> >  #
> >
> > -ccflags-y			:= -Os -DBUILDING_ACPICA
> > +ccflags-y			:= -Os -D_LINUX -DBUILDING_ACPICA
> >  ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
> >
> >  # use acpi.o to put all files here into acpi.o modparam namespace
> >
> 
> These patches do solve the particular compilation problem I was having
> (targeting an embedded arm64 system), so thank you for that.  The build
> test obviously needs fixing, but with the Linaro aarch64-elf compilers,
> and the defconfig,

Thanks for the confirmation.
PATCH 02 cannot be upstreamed due to the kbuild test report.
It can only go into Linux after fixing ACPICA's stub problems.
However PATCH 01 should be sufficient for fixing your problem.
I'll ask Rafael to drop PATCH 02 and take PATCH 01 as a build fix.

Thanks and best regards
Lv

> 
> Tested-by: Al Stone <ahs3@redhat.com>
> 
> --
> ciao,
> al
> -----------------------------------
> Al Stone
> Software Engineer
> Red Hat, Inc.
> ahs3@redhat.com
> -----------------------------------

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v2] ACPI: ACPICA: Add non-linux host build support
  2017-03-31  4:53 [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support Lv Zheng
  2017-03-31  4:53 ` [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile Lv Zheng
  2017-04-03 21:47 ` [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support Al Stone
@ 2017-04-11  7:48 ` Lv Zheng
  2 siblings, 0 replies; 10+ messages in thread
From: Lv Zheng @ 2017-04-11  7:48 UTC (permalink / raw)
  To: Rafael J . Wysocki, Rafael J . Wysocki, Len Brown
  Cc: Lv Zheng, Lv Zheng, linux-acpi

_LINUX: used to detect a target build is a linux kernel/application.
__linux__: used to detect a build is on a linux hosts.

Thus we can see: if a linux kernel build is performed on environments other
than linux hosts, __linux__ may not be defined by the compiler and _LINUX
cannot cover linux kernel resident ACPICA files, as it's only defined in
<linux/acpi.h> and hence only allows non ACPICA kernel files to correctly
include aclinux.h.
As a conclusion, we don't actually support such build.

This patch adds -D_LINUX for ACPICA files so that kernel builds on any
hosts can use unified _LINUX as a linux kernel target indication to
correctly include aclinux.h.

Tested-by: Al Stone <ahs3@redhat.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 drivers/acpi/acpica/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index 32d93ed..dea6530 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -2,7 +2,7 @@
 # Makefile for ACPICA Core interpreter
 #
 
-ccflags-y			:= -Os -DBUILDING_ACPICA
+ccflags-y			:= -Os -D_LINUX -DBUILDING_ACPICA
 ccflags-$(CONFIG_ACPI_DEBUG)	+= -DACPI_DEBUG_OUTPUT
 
 # use acpi.o to put all files here into acpi.o modparam namespace
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile
  2017-04-11  7:19     ` Zheng, Lv
@ 2017-04-11 13:53       ` Rafael J. Wysocki
  2017-04-12  2:11         ` Zheng, Lv
  0 siblings, 1 reply; 10+ messages in thread
From: Rafael J. Wysocki @ 2017-04-11 13:53 UTC (permalink / raw)
  To: Zheng, Lv
  Cc: Rafael J . Wysocki, kbuild-all, Wysocki, Rafael J, Brown, Len,
	Lv Zheng, linux-acpi, lkp

On Tue, Apr 11, 2017 at 9:19 AM, Zheng, Lv <lv.zheng@intel.com> wrote:
> Hi, Rafael
>
> According to the test, PATCH 02 is not possible unless ACPICA debugging function stubs are correctly prepared for ACPI_DEBUG_OUTPUT=n.
> So please help to drop PATCH 02 and only PATCH 01 is useful for now.

OK

Can you please resend patch [1/2] separately, then, and let me know
what is superseded by it?

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile
  2017-04-11 13:53       ` Rafael J. Wysocki
@ 2017-04-12  2:11         ` Zheng, Lv
  0 siblings, 0 replies; 10+ messages in thread
From: Zheng, Lv @ 2017-04-12  2:11 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael J . Wysocki, kbuild-all, Wysocki, Rafael J, Brown, Len,
	Lv Zheng, linux-acpi, lkp

Hi,

> From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi-owner@vger.kernel.org] On Behalf Of Rafael J.
> Wysocki
> Subject: Re: [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile
> 
> On Tue, Apr 11, 2017 at 9:19 AM, Zheng, Lv <lv.zheng@intel.com> wrote:
> > Hi, Rafael
> >
> > According to the test, PATCH 02 is not possible unless ACPICA debugging function stubs are correctly
> prepared for ACPI_DEBUG_OUTPUT=n.
> > So please help to drop PATCH 02 and only PATCH 01 is useful for now.
> 
> OK
> 
> Can you please resend patch [1/2] separately, then, and let me know
> what is superseded by it?

Yes, it is re-sent and you can find it here:
https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/?id=ffab9188e44
The only change is to add Tested-by tag from Al Stone along with corrected email address.

Thanks,
Lv

> 
> Thanks,
> Rafael
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-04-12  2:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31  4:53 [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support Lv Zheng
2017-03-31  4:53 ` [PATCH 2/2] ACPI: ACPICA: Cleanup drivers/acpi/acpica Makefile Lv Zheng
2017-04-02  6:29   ` kbuild test robot
2017-04-02  8:16   ` kbuild test robot
2017-04-11  7:19     ` Zheng, Lv
2017-04-11 13:53       ` Rafael J. Wysocki
2017-04-12  2:11         ` Zheng, Lv
2017-04-03 21:47 ` [PATCH 1/2] ACPI: ACPICA: Add non-linux host build support Al Stone
2017-04-11  7:22   ` Zheng, Lv
2017-04-11  7:48 ` [PATCH v2] " Lv Zheng

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.