From nobody Sat Apr 27 08:27:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1667834965; cv=none; d=zohomail.com; s=zohoarc; b=haevktgMCrnF6VGn8/+ZOzwBtHiz84ZNXTTol3qS/WT5Byv9Ojfcog47C+W+rL4PXfJ861LZhgmrs/Of9n9cz1CeQ3Kt4HI5ZROGjgrmuj+9GGzNEkvF+ldBuF73dlpS+xjZoI5jaznkjIAC8x/IdQVj46OZADP3zo1cx7n4QEI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667834965; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=EcVD+xMv4x0qVIyd5cI1F1HrEG/FmKUnXsdIZE5hFnw=; b=G/NproZenBfFc/fT5YNf+dCl9hsuQeF23xygv4KdpBSsJInnFD4JY0b0uRYQ+XWLhCxRiiP3rZeqbqUpgs7fxD0/mvMjDDKF9ZdRLIMx4IF70asiICv2DcViX1PnOMrMcdtCdLIGOJG6kkZsEiP5b3jMH0jahx+FZTheuqiC9W4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1667834965867906.7385851693637; Mon, 7 Nov 2022 07:29:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1os42l-0008S5-LT; Mon, 07 Nov 2022 10:28:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1os42k-0008Rx-Lp for qemu-devel@nongnu.org; Mon, 07 Nov 2022 10:28:10 -0500 Received: from mail-pf1-x42e.google.com ([2607:f8b0:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1os42i-00015T-Og for qemu-devel@nongnu.org; Mon, 07 Nov 2022 10:28:10 -0500 Received: by mail-pf1-x42e.google.com with SMTP id b29so10915680pfp.13 for ; Mon, 07 Nov 2022 07:28:08 -0800 (PST) Received: from anisinha-lenovo.ba.nuagenetworks.net ([116.73.133.26]) by smtp.googlemail.com with ESMTPSA id m2-20020a170902768200b0017f72a430adsm5107472pll.71.2022.11.07.07.28.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 07:28:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anisinha-ca.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=EcVD+xMv4x0qVIyd5cI1F1HrEG/FmKUnXsdIZE5hFnw=; b=4vlSR/jFB153toSIidR7hax986EuwP7brdHjq/fnrS9LVojXUg9ndZi5qusBgW/8DL WsDD4w38G2G+wh5CDOuWXpA/CsMLv8JZK9l/IUNeNzkPVOe/JZBT57gaYmPbVgLxrqk5 oz+i6sLsqIr286PazlgNNRuvFu8K4hKDGVxVQD+gvupDqfbDUq/fNU8NjVWf4LB8Nsfg vd23fuvcVIypolglRBx+8StKTeezpzEwAc4IaiUeUx9Qp07SC75nqLzasBUqOA2nt6vq LUlyhAR/3K5KP6sN8ORSPFI1/cduon+RDQy1Bu6sfssRmhIec8DzUb9PWEobBxTa/3PJ fBwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EcVD+xMv4x0qVIyd5cI1F1HrEG/FmKUnXsdIZE5hFnw=; b=4AeGep5+YcctraYau0Y5OqUcDr8YSG1XwoBwy3biGwqUb0kZto2PKoC2/XGLm7INRI I6tZTrlGRQug/5lMPwSpuPC3HcSCY2t8zlT37Hv9FvLAwrzzr2Dvxrajri9nx3WbqpOv uW9qolyjvugz67dwdUd0wIY7tECQJRqJcQtrjVVYKnxGlot+8CY+sUro441GE0fP3HXO /ri4YvF3ZvyQ08i2e3jaPajxIZNobrcivKW2I1BgxxFrEwJJNp9Xbk6Alf3BDTEIOXKK 6vojfie0Io3kwIPTuCGB7NbatDG57bhrAAxUDrFacfqqAxBeFRig+mnMThosW5O4TViT FnEw== X-Gm-Message-State: ACrzQf3d1LpCREn+v144CeZJ03UAjC3hvJdD3KNveF2DokHjNXcMycuZ jUiph5gMn0q8bzNQSuymn2mydQ== X-Google-Smtp-Source: AMsMyM4NRXHgaLmX2C9aFovCjWG8KrX0tzs6RFQEJaxlU+JEcWoZxxQguMf9X9CHbl1Uo+utnHkRZQ== X-Received: by 2002:a63:1508:0:b0:438:eb90:52d1 with SMTP id v8-20020a631508000000b00438eb9052d1mr44196679pgl.252.1667834887010; Mon, 07 Nov 2022 07:28:07 -0800 (PST) From: Ani Sinha To: "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha Cc: Bernhard Beschow , qemu-devel@nongnu.org Subject: [PATCH v2] hw/acpi: fix breakage due to missing aml stub definitions when acpi is off Date: Mon, 7 Nov 2022 20:57:44 +0530 Message-Id: <20221107152744.868434-1-ani@anisinha.ca> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::42e; envelope-from=ani@anisinha.ca; helo=mail-pf1-x42e.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @anisinha-ca.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1667834967752100003 Content-Type: text/plain; charset="utf-8" Some HW architectures do not support acpi and CONFIG_ACPI is off for them. = For those architectures, dummy stub function definitions help to resolve symbol= s. This change adds couple of dummy stub definitions so that symbols for those= can be resolved and failures such as the following can be fixed for or1k target= s. Configuration: qemu/build $ ../configure --enable-werror --disable-docs --disable-nettle \ --enable-gcrypt --enable-fdt=3Dsystem --enable-modules \ --enable-trace-backends=3Ddtrace --enable-docs \ --enable-vfio-user-server \ --target-list=3D"ppc64-softmmu or1k-softmmu s390x-softmmu x86_= 64-softmmu rx-softmmu sh4-softmmu nios2-softmmu" actual failure: qemu/build $ QTEST_QEMU_BINARY=3D./qemu-system-or1k ./tests/qtest/qos-test failed to open module: /build/qemu/qemu/build/qemu-bundle/usr/local/lib64/qemu/hw-display-virtio-v= ga.so: undefined symbol: aml_return qemu-system-or1k: ../util/error.c:59: error_setv: Assertion `*errp =3D=3D NULL' failed. Broken pipe ../tests/qtest/libqtest.c:188: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped) Aborted (core dumped) CC: Bernhard Beschow Signed-off-by: Ani Sinha --- hw/acpi/aml-build-stub.c | 10 ++++++++++ 1 file changed, 10 insertions(+) changelog: v2: cosmetic commit description format update. diff --git a/hw/acpi/aml-build-stub.c b/hw/acpi/aml-build-stub.c index 8d8ad1a314..89a8fec4af 100644 --- a/hw/acpi/aml-build-stub.c +++ b/hw/acpi/aml-build-stub.c @@ -26,6 +26,16 @@ void aml_append(Aml *parent_ctx, Aml *child) { } =20 +Aml *aml_return(Aml *val) +{ + return NULL; +} + +Aml *aml_method(const char *name, int arg_count, AmlSerializeFlag sflag) +{ + return NULL; +} + Aml *aml_resource_template(void) { return NULL; --=20 2.34.1