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

Re: [PATCH v3 1/1] libacpi/Makefile: clear ASL warning about PCI0


  • To: Ariel Otilibili <Ariel.Otilibili-Anieli@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 27 Dec 2024 15:27:10 +0100
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 27 Dec 2024 14:27:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.12.2024 17:10, Ariel Otilibili wrote:
> iasl has one ID per warning [6]; subsequent commits will address other ASL 
> warnings.
> 
> ```
> $ awk 'NR>533 && NR<556 {print NR ":" $0}' source/compiler/aslmethod.c
> 534:    case PARSEOP_DEVICE:
> 535:
> 536:        /* Check usage of _HID and _ADR objects */
> 537:
> 538:        HidExists = ApFindNameInDeviceTree (METHOD_NAME__HID, Op);
> 539:        AdrExists = ApFindNameInDeviceTree (METHOD_NAME__ADR, Op);
> 540:
> 541:        if (!HidExists && !AdrExists)
> 542:        {
> 543:            AslError (ASL_ERROR, ASL_MSG_MISSING_DEPENDENCY, Op,
> 544:                "Device object requires a _HID or _ADR");
> 545:        }
> 546:        else if (HidExists && AdrExists)
> 547:        {
> 548:            /*
> 549:             * According to the ACPI spec, "A device object must contain
> 550:             * either an _HID object or an _ADR object, but should not 
> contain
> 551:             * both".
> 552:             */
> 553:            AslError (ASL_WARNING, ASL_MSG_MULTIPLE_TYPES, Op,
> 554:                "Device object requires either a _HID or _ADR, but not 
> both");
> 555:        }
> 
> $ awk 'NR>188 && NR<206 || NR==432 || /ASL_MSG_MULTIPLE_TYPES/ {print NR ":" 
> $0}' source/compiler/aslmessages.h
> 189:/*
> 190: * Values (message IDs) for all compiler messages. There are currently
> 191: * three distinct blocks of error messages (so that they can be expanded
> 192: * individually):
> 193: *      Main ASL compiler
> 194: *      Data Table compiler
> 195: *      Preprocessor
> 196: *
> 197: * NOTE1: This list must match the tables of message strings in the file
> 198: * aslmessages.c exactly.
> 199: *
> 200: * NOTE2: With the introduction of the -vw option to disable specific
> 201: * messages, new messages should only be added to the end of these
> 202: * lists, so that values for existing messages are not disturbed.
> 203: */
> 204:typedef enum
> 205:{
> 280:    ASL_MSG_MULTIPLE_TYPES,
> 432:} ASL_MESSAGE_IDS;

>From this I can't conclude that the same message ID (ASL_MSG_MULTIPLE_TYPES
here) can't (in principle) be used in multiple places, for similar purposes.
Pretty certainly we want to avoid disabling unrelated warnings elsewhere
(including ones only to be surfaced by future versions of iasl).

> --- a/tools/libacpi/Makefile
> +++ b/tools/libacpi/Makefile
> @@ -21,6 +21,8 @@ H_SRC += $(addprefix $(ACPI_BUILD_DIR)/, ssdt_tpm.h 
> ssdt_tpm2.h ssdt_laptop_slat
>  MKDSDT_CFLAGS-$(CONFIG_ARM_64) = -DCONFIG_ARM_64
>  MKDSDT_CFLAGS-$(CONFIG_X86) = -DCONFIG_X86
>  
> +IASL_WARNS=3073

If we were to go this route, the variable name better would make clear that
this is a list of warnings to be disabled.

And then instead of ...

> @@ -32,7 +34,7 @@ TMP_SUFFIX  = tmp
>  all: $(C_SRC) $(H_SRC)
>  
>  $(H_SRC): $(ACPI_BUILD_DIR)/%.h: %.asl
> -     $(IASL) -vs -p $(ACPI_BUILD_DIR)/$*.$(TMP_SUFFIX) -tc $<
> +     $(IASL) $(IASL_WARNS:%=-vw%) -vs -p $(ACPI_BUILD_DIR)/$*.$(TMP_SUFFIX) 
> -tc $<
>       sed -e 's/AmlCode/$*/g' -e 's/_aml_code//g' $(ACPI_BUILD_DIR)/$*.hex >$@
>       rm -f $(addprefix $(ACPI_BUILD_DIR)/, $*.aml $*.hex)
>   
> @@ -65,7 +67,7 @@ $(ACPI_BUILD_DIR)/dsdt_anycpu_arm.asl: $(MK_DSDT)
>       mv -f $@.$(TMP_SUFFIX) $@
>  
>  $(C_SRC): $(ACPI_BUILD_DIR)/%.c: $(ACPI_BUILD_DIR)/%.asl
> -     $(IASL) -vs -p $(ACPI_BUILD_DIR)/$*.$(TMP_SUFFIX) -tc $<
> +     $(IASL) $(IASL_WARNS:%=-vw%) -vs -p $(ACPI_BUILD_DIR)/$*.$(TMP_SUFFIX) 
> -tc $<
>       sed -e 's/AmlCode/$*/g' -e 's/_aml_code//g' $(ACPI_BUILD_DIR)/$*.hex > 
> $@.$(TMP_SUFFIX)
>       echo "int $*_len=sizeof($*);" >> $@.$(TMP_SUFFIX)
>       mv -f $@.$(TMP_SUFFIX) $@

... continuing to need to alter two places, I guess we'd be better off
introducing IASL_FLAGS or some such, where the -vs then could also go.

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.