Re: [PATCH] ACPICA: Log successfully loaded DSDT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Paul,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v5.6-rc3 next-20200226]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Paul-Menzel/ACPICA-Log-successfully-loaded-DSDT/20200227-020811
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   In file included from include/acpi/acpi.h:29:0,
                    from drivers/acpi/acpica/tbxfload.c:12:
   drivers/acpi/acpica/tbxfload.c: In function 'acpi_tb_load_namespace':
>> drivers/acpi/acpica/tbxfload.c:165:14: warning: too many arguments for format [-Wformat-extra-args]
      ACPI_INFO(("DSDT successfully acquired and loaded\n", tables_loaded));
                 ^
   include/acpi/acoutput.h:202:51: note: in definition of macro 'ACPI_INFO'
    #define ACPI_INFO(plist)                acpi_info plist
                                                      ^~~~~

vim +165 drivers/acpi/acpica/tbxfload.c

    11	
  > 12	#include <acpi/acpi.h>
    13	#include "accommon.h"
    14	#include "acnamesp.h"
    15	#include "actables.h"
    16	#include "acevents.h"
    17	
    18	#define _COMPONENT          ACPI_TABLES
    19	ACPI_MODULE_NAME("tbxfload")
    20	
    21	/*******************************************************************************
    22	 *
    23	 * FUNCTION:    acpi_load_tables
    24	 *
    25	 * PARAMETERS:  None
    26	 *
    27	 * RETURN:      Status
    28	 *
    29	 * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT
    30	 *
    31	 ******************************************************************************/
    32	acpi_status ACPI_INIT_FUNCTION acpi_load_tables(void)
    33	{
    34		acpi_status status;
    35	
    36		ACPI_FUNCTION_TRACE(acpi_load_tables);
    37	
    38		/*
    39		 * Install the default operation region handlers. These are the
    40		 * handlers that are defined by the ACPI specification to be
    41		 * "always accessible" -- namely, system_memory, system_IO, and
    42		 * PCI_Config. This also means that no _REG methods need to be
    43		 * run for these address spaces. We need to have these handlers
    44		 * installed before any AML code can be executed, especially any
    45		 * module-level code (11/2015).
    46		 * Note that we allow OSPMs to install their own region handlers
    47		 * between acpi_initialize_subsystem() and acpi_load_tables() to use
    48		 * their customized default region handlers.
    49		 */
    50		status = acpi_ev_install_region_handlers();
    51		if (ACPI_FAILURE(status)) {
    52			ACPI_EXCEPTION((AE_INFO, status,
    53					"During Region initialization"));
    54			return_ACPI_STATUS(status);
    55		}
    56	
    57		/* Load the namespace from the tables */
    58	
    59		status = acpi_tb_load_namespace();
    60	
    61		/* Don't let single failures abort the load */
    62	
    63		if (status == AE_CTRL_TERMINATE) {
    64			status = AE_OK;
    65		}
    66	
    67		if (ACPI_FAILURE(status)) {
    68			ACPI_EXCEPTION((AE_INFO, status,
    69					"While loading namespace from ACPI tables"));
    70		}
    71	
    72		/*
    73		 * Initialize the objects in the namespace that remain uninitialized.
    74		 * This runs the executable AML that may be part of the declaration of
    75		 * these name objects:
    76		 *     operation_regions, buffer_fields, Buffers, and Packages.
    77		 *
    78		 */
    79		status = acpi_ns_initialize_objects();
    80		if (ACPI_SUCCESS(status)) {
    81			acpi_gbl_namespace_initialized = TRUE;
    82		}
    83	
    84		return_ACPI_STATUS(status);
    85	}
    86	
    87	ACPI_EXPORT_SYMBOL_INIT(acpi_load_tables)
    88	
    89	/*******************************************************************************
    90	 *
    91	 * FUNCTION:    acpi_tb_load_namespace
    92	 *
    93	 * PARAMETERS:  None
    94	 *
    95	 * RETURN:      Status
    96	 *
    97	 * DESCRIPTION: Load the namespace from the DSDT and all SSDTs/PSDTs found in
    98	 *              the RSDT/XSDT.
    99	 *
   100	 ******************************************************************************/
   101	acpi_status acpi_tb_load_namespace(void)
   102	{
   103		acpi_status status;
   104		u32 i;
   105		struct acpi_table_header *new_dsdt;
   106		struct acpi_table_desc *table;
   107		u32 tables_loaded = 0;
   108		u32 tables_failed = 0;
   109	
   110		ACPI_FUNCTION_TRACE(tb_load_namespace);
   111	
   112		(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
   113	
   114		/*
   115		 * Load the namespace. The DSDT is required, but any SSDT and
   116		 * PSDT tables are optional. Verify the DSDT.
   117		 */
   118		table = &acpi_gbl_root_table_list.tables[acpi_gbl_dsdt_index];
   119	
   120		if (!acpi_gbl_root_table_list.current_table_count ||
   121		    !ACPI_COMPARE_NAMESEG(table->signature.ascii, ACPI_SIG_DSDT) ||
   122		    ACPI_FAILURE(acpi_tb_validate_table(table))) {
   123			status = AE_NO_ACPI_TABLES;
   124			goto unlock_and_exit;
   125		}
   126	
   127		/*
   128		 * Save the DSDT pointer for simple access. This is the mapped memory
   129		 * address. We must take care here because the address of the .Tables
   130		 * array can change dynamically as tables are loaded at run-time. Note:
   131		 * .Pointer field is not validated until after call to acpi_tb_validate_table.
   132		 */
   133		acpi_gbl_DSDT = table->pointer;
   134	
   135		/*
   136		 * Optionally copy the entire DSDT to local memory (instead of simply
   137		 * mapping it.) There are some BIOSs that corrupt or replace the original
   138		 * DSDT, creating the need for this option. Default is FALSE, do not copy
   139		 * the DSDT.
   140		 */
   141		if (acpi_gbl_copy_dsdt_locally) {
   142			new_dsdt = acpi_tb_copy_dsdt(acpi_gbl_dsdt_index);
   143			if (new_dsdt) {
   144				acpi_gbl_DSDT = new_dsdt;
   145			}
   146		}
   147	
   148		/*
   149		 * Save the original DSDT header for detection of table corruption
   150		 * and/or replacement of the DSDT from outside the OS.
   151		 */
   152		memcpy(&acpi_gbl_original_dsdt_header, acpi_gbl_DSDT,
   153		       sizeof(struct acpi_table_header));
   154	
   155		/* Load and parse tables */
   156	
   157		(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
   158		status = acpi_ns_load_table(acpi_gbl_dsdt_index, acpi_gbl_root_node);
   159		(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
   160		if (ACPI_FAILURE(status)) {
   161			ACPI_EXCEPTION((AE_INFO, status, "[DSDT] table load failed"));
   162			tables_failed++;
   163		} else {
   164			tables_loaded++;
 > 165			ACPI_INFO(("DSDT successfully acquired and loaded\n", tables_loaded));
   166		}
   167	
   168		/* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */
   169	
   170		for (i = 0; i < acpi_gbl_root_table_list.current_table_count; ++i) {
   171			table = &acpi_gbl_root_table_list.tables[i];
   172	
   173			if (!table->address ||
   174			    (!ACPI_COMPARE_NAMESEG
   175			     (table->signature.ascii, ACPI_SIG_SSDT)
   176			     && !ACPI_COMPARE_NAMESEG(table->signature.ascii,
   177						      ACPI_SIG_PSDT)
   178			     && !ACPI_COMPARE_NAMESEG(table->signature.ascii,
   179						      ACPI_SIG_OSDT))
   180			    || ACPI_FAILURE(acpi_tb_validate_table(table))) {
   181				continue;
   182			}
   183	
   184			/* Ignore errors while loading tables, get as many as possible */
   185	
   186			(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
   187			status = acpi_ns_load_table(i, acpi_gbl_root_node);
   188			(void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES);
   189			if (ACPI_FAILURE(status)) {
   190				ACPI_EXCEPTION((AE_INFO, status,
   191						"(%4.4s:%8.8s) while loading table",
   192						table->signature.ascii,
   193						table->pointer->oem_table_id));
   194	
   195				tables_failed++;
   196	
   197				ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
   198						      "Table [%4.4s:%8.8s] (id FF) - Table namespace load failed\n\n",
   199						      table->signature.ascii,
   200						      table->pointer->oem_table_id));
   201			} else {
   202				tables_loaded++;
   203			}
   204		}
   205	
   206		if (!tables_failed) {
   207			ACPI_INFO(("%u ACPI AML tables successfully acquired and loaded", tables_loaded));
   208		} else {
   209			ACPI_ERROR((AE_INFO,
   210				    "%u table load failures, %u successful",
   211				    tables_failed, tables_loaded));
   212	
   213			/* Indicate at least one failure */
   214	
   215			status = AE_CTRL_TERMINATE;
   216		}
   217	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux