From patchwork Tue Aug 27 08:17:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 1153633 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="V8CaGoWw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 46HhWQ20P3z9sRJ for ; Tue, 27 Aug 2019 18:15:13 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id EA600C21F8A; Tue, 27 Aug 2019 08:15:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 63478C21E9F; Tue, 27 Aug 2019 08:15:02 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6EA04C21E9F; Tue, 27 Aug 2019 08:15:00 +0000 (UTC) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by lists.denx.de (Postfix) with ESMTPS id C15E8C21E39 for ; Tue, 27 Aug 2019 08:14:59 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id p3so12222074pgb.9 for ; Tue, 27 Aug 2019 01:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RNsujRVtho42PedRlcgKxHiTNBnT25v3hUpkWsoXqKk=; b=V8CaGoWwOATmXh7/UbBHWN3+7nlCmMhUz9NoDf68gDLbtz/c+iugPfbvodId79Gsm1 r6+ONISpdLI3eLfZ/Dy5iA15X8ZQNKwIwsjrO9xLiCDfzaK0mPX+Abqtc82DV0FJDW8Q QlAh4t6QemlHl4cs09wBm7J7xufOGmpvXLugq8Y4tjDKGm7TPBeOE2Gfuar8W0xaHx9J sn1RvLBjXQAoUHit0HmpqnNtZgQGS/RUcEP2unL52XZ8wZM3SCrHcWkanOZqVteReri+ uMrtSVolaFnse0gecZC1RRQAmYpNsncKvnEFA2uiGQetKnjJl/Mq3lbGVg/13ROWH29/ u+9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RNsujRVtho42PedRlcgKxHiTNBnT25v3hUpkWsoXqKk=; b=Ik1tXAw7zGWRxjW8dbJm9uD6wNQXF/BwOevQAJnHGFxkwWli/i1kCHp6pZpi34TfR4 AVqjJM1/Xyav60SbH0P/M81AL/4UhWJs3FDa+B7m8hTHxc+TuglRIcjEhJ1Y4R1hLyLd SKxaT+399O81t/bQNETCG5hgbZLL7fyiJD6ZvxzzdakoTYTD8ckafCP/zmVOFGuBCniD 8HLDaT7ezwGSkPQFMpDwHGYMF79d8fQ5vw3SD/SLhCdCXhMXbUAQkGNPKkduHogD9OzX eDDzLWE46SAT8TY8AkGliT+TgZ7COEW7z4O2B1zLQmgXk+KvkgKETtnSstZyl3pomPHX bQbA== X-Gm-Message-State: APjAAAUxHjhK5NCZz/KpqbrzOLT7pVcONUpbdO1LTYNMr1tE6kv48zHu xxx3m5zXrakbvrhJ/EsDkugVMf5d0fE= X-Google-Smtp-Source: APXvYqz7Y0AP6QldqesMcKuiDM0qkCVTmpMhKkVQoBaVhkhLJS1gP+nrn0V/X9JNvhii6Aw4mYlnTA== X-Received: by 2002:aa7:9293:: with SMTP id j19mr25607359pfa.90.1566893698096; Tue, 27 Aug 2019 01:14:58 -0700 (PDT) Received: from linaro.org ([121.95.100.191]) by smtp.googlemail.com with ESMTPSA id s5sm15237544pfm.97.2019.08.27.01.14.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Aug 2019 01:14:57 -0700 (PDT) From: AKASHI Takahiro To: sjg@chromium.org Date: Tue, 27 Aug 2019 17:17:03 +0900 Message-Id: <20190827081703.8082-1-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Cc: xypron.glpk@gmx.de, u-boot@lists.denx.de Subject: [U-Boot] [PATCH] sandbox: fix cpu property in test.dts for pytest X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When I tried to run some new efi tests with pytest, efi_smbios_register() triggered a segmentation fault. Here is the location where it happened: efi_init_obj_list() efi_smbios_register() write_smbios_table() smbios_write_type4() smbios_write_type4_dm() where dev_get_parent_platdata() should return a pointer to struct cpu_platdata, but it is actually NULL because any cpu device on sandbox is attached to "root_driver." With this patch, this issue will be fixed by moving all the definitions of cpus under "cpus" node so that they have a "cpu_bus" parent. Signed-off-by: AKASHI Takahiro Reviewed-by: Bin Meng Reviewed-by: Simon Glass Reviewed-by: Simon Glass --- arch/sandbox/dts/test.dts | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts index 27b0baab2781..c549d9e50fb8 100644 --- a/arch/sandbox/dts/test.dts +++ b/arch/sandbox/dts/test.dts @@ -389,19 +389,21 @@ mbox-names = "other", "test"; }; - cpu-test1 { - compatible = "sandbox,cpu_sandbox"; - u-boot,dm-pre-reloc; - }; + cpus { + cpu-test1 { + compatible = "sandbox,cpu_sandbox"; + u-boot,dm-pre-reloc; + }; - cpu-test2 { - compatible = "sandbox,cpu_sandbox"; - u-boot,dm-pre-reloc; - }; + cpu-test2 { + compatible = "sandbox,cpu_sandbox"; + u-boot,dm-pre-reloc; + }; - cpu-test3 { - compatible = "sandbox,cpu_sandbox"; - u-boot,dm-pre-reloc; + cpu-test3 { + compatible = "sandbox,cpu_sandbox"; + u-boot,dm-pre-reloc; + }; }; i2s: i2s {