Message ID | 20200829173153.v2.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=2a01:238:438b:c500:173d:9f52:ddab:ee01; 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=CUUodpan; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 4BfCfC6sRfz9sSJ for <incoming@patchwork.ozlabs.org>; Sun, 30 Aug 2020 09:41:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7919B823BB; Sun, 30 Aug 2020 01:34:06 +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="CUUodpan"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 22D9F8233B; Sun, 30 Aug 2020 01:33:09 +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=-3.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-il1-x143.google.com (mail-il1-x143.google.com [IPv6:2607:f8b0:4864:20::143]) (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 2C8C682327 for <u-boot@lists.denx.de>; Sun, 30 Aug 2020 01:33:06 +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-il1-x143.google.com with SMTP id q14so3688088ilj.8 for <u-boot@lists.denx.de>; Sat, 29 Aug 2020 16:33:06 -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=mTAuEFfaidN8gaYUSeNdciJNScgngHYxRmRH2klpqOw=; b=CUUodpan0OPJ3Xu1Gp0q2l5+SpLH1l3ykmejRDNkdw8luHjE7tv+tj3pLZou7/UStz u5aQkPzdIt6K+z4HA1zz5qJGVIQdrvf5RTqkT3k9uwmLUZockSUorSsdB3OOI8UKsUQn 1v6s5i9mDk/j93ChcMZYw8BmXFzghVQUxIEVo= 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=mTAuEFfaidN8gaYUSeNdciJNScgngHYxRmRH2klpqOw=; b=ZOO++h0QYpkqnTBQx7sUOIJ9jo8fIqXD2G1yEpAX3EMc5jwFkTcisqVyobr2Ge1GoY MMnMjQYiK2Km0wciDFM2mD4dXxVQN5Z+VqJk49mM1pYkI9sKLeNOtWd7ybI6h06qlZPO oEGe7RkQVtx76q57z89n5fhrfkFdP/ga2mzPtftcScZPDvLyzu7b6cgz1N9+ddMUikha Bw0hXfpYtZWJonPyPJgCIjAtIceH6CffAwHYn72D/tL2UQSJXN71b9KgWgH+b0fcuMy8 FS7UEIFSkCRt8WWrISmGljrydHAdnqR6eZ9MTwEZWwtXUHecpKfUNzzBu5Tp+tn/FsUg qyWQ== X-Gm-Message-State: AOAM531nNa7cKt8oYcp+kdyA6MFpiGdAmF8nCZb2pbS7YEQbLfbCPGGe dgx/dJjMlUf0upMkyZjDHGLpAsgWQsA2xUYd X-Google-Smtp-Source: ABdhPJweevlX/qORiKOk5ZuTIlpjLb+QHicgMHnmMsSrhgfDgb2mUG06HNCk7E2g5ULVs/CqQns/ug== X-Received: by 2002:a92:c904:: with SMTP id t4mr4071922ilp.257.1598743985058; Sat, 29 Aug 2020 16:33:05 -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 i85sm2121831ile.27.2020.08.29.16.33.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2020 16:33:04 -0700 (PDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Cc: Bin Meng <bmeng.cn@gmail.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Wolfgang Wallner <wolfgang.wallner@br-automation.com>, Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>, Simon Glass <sjg@chromium.org> Subject: [PATCH v2 46/57] x86: Correct handling of MADT table CPUs Date: Sat, 29 Aug 2020 17:32:05 -0600 Message-Id: <20200829173153.v2.46.I8e0b81d8cce09072a295de1c034a2d84757a26af@changeid> X-Mailer: git-send-email 2.28.0.402.g5ffc5be6b7-goog In-Reply-To: <20200829233217.3821412-1-sjg@chromium.org> References: <20200829233217.3821412-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(-)