Message ID | 20200906154340.v3.46.I8e0b81d8cce09072a295de1c034a2d84757a26af@changeid |
---|---|
State | Superseded |
Delegated to: | Bin Meng |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Ro1QP/dL; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bl4t316zgz9sSn for <incoming@patchwork.ozlabs.org>; Mon, 7 Sep 2020 07:53:31 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 752CB824DD; Sun, 6 Sep 2020 23:45:36 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Ro1QP/dL"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AE4D48245D; Sun, 6 Sep 2020 23:45:02 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 532A782451 for <u-boot@lists.denx.de>; Sun, 6 Sep 2020 23:44:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id d190so12228911iof.3 for <u-boot@lists.denx.de>; Sun, 06 Sep 2020 14:44:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hgfF6ThH2uoOSUP20BCFaA1T+PV9OsZKhCQK22frWEE=; b=Ro1QP/dLMbBf1juAIt9ZBmM70FjHS+8uuaNNetExwBYtRU5q5he+TF6R/YUTOFhFS+ IgQnSelf7Bh3pwvakkvuL5gPc4zyd/UttFAZeuXXIlrYGlTWJO16jffZkrtLd3Wqt6il ZluUGCKxr0DPVONoUQII4CeiQ70T+cKu4g+1o= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=hgfF6ThH2uoOSUP20BCFaA1T+PV9OsZKhCQK22frWEE=; b=kq+i9gOeSZqJLu1WEsO+Qlajjtky398YVA7rLurJAmVcVfK9ZDiicBvmGt+ft18kns Q0uQm2ATmHxL0VK+rpTEttaQps37azPkRjlzQ5s58GRNKjlDvQBr85lCGbZMjiGtcvhb p7ehrTke3GjD4xEqDOnHYh2y0eWLpEZvh7fTQhNEEp/fJhIHljsRECXtj2YYnSnmqItT eMUOe1T6IyYyxWT0zmTAgJm7y8rBBIgCrLsU+qezFjrDLSlmd0pqoCheQgiHTMbJzMuL UcWbKA/wgmn0HVSlf9KmrXgDiBI+yK47vNgm13YJy/nO6UT+OxoA16vN0TRxxN76GlbB SeNA== X-Gm-Message-State: AOAM531T+ZR7q9kPWL6SFcMYHpLQx25HY/OgX3FBMX4wwbvdQPv9yaJx n8AKEjzDDkos5J99qvTTrtdQJ10oBTJZI4nv X-Google-Smtp-Source: ABdhPJxMHGiDLq7B/KOeolQ8orPmlTSE3Vb8W0lrxyFwDLlVrOplT6VQJDERw7sgOspDIusZBtgmsg== X-Received: by 2002:a02:7055:: with SMTP id f82mr17376673jac.54.1599428697009; Sun, 06 Sep 2020 14:44:57 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id w13sm6232663iox.10.2020.09.06.14.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 14:44:56 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Wolfgang Wallner <wolfgang.wallner@br-automation.com>, Bin Meng <bmeng.cn@gmail.com>, Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Simon Glass <sjg@chromium.org> Subject: [PATCH v3 46/57] x86: Correct handling of MADT table CPUs Date: Sun, 6 Sep 2020 15:43:54 -0600 Message-Id: <20200906154340.v3.46.I8e0b81d8cce09072a295de1c034a2d84757a26af@changeid> X-Mailer: git-send-email 2.28.0.526.ge36021eeef-goog In-Reply-To: <20200906214405.71632-1-sjg@chromium.org> References: <20200906214405.71632-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
dm: Add programatic generation of ACPI tables (part D)
|
expand
|
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index b0cc1f123e2..667059b5ace 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -66,14 +66,17 @@ int acpi_create_madt_lapics(u32 current) { struct udevice *dev; int total_length = 0; + int cpu_num = 0; for (uclass_find_first_device(UCLASS_CPU, &dev); dev; uclass_find_next_device(&dev)) { struct cpu_platdata *plat = dev_get_parent_platdata(dev); - int length = acpi_create_madt_lapic( - (struct acpi_madt_lapic *)current, - plat->cpu_id, plat->cpu_id); + int length; + + length = acpi_create_madt_lapic( + (struct acpi_madt_lapic *)current, cpu_num++, + plat->cpu_id); current += length; total_length += length; }
At present if hyperthreading is disabled the CPU numbering is not sequential. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org> --- (no changes since v1) arch/x86/lib/acpi_table.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)