Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp233472lqp; Thu, 4 Apr 2024 11:29:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW0FEd0f0PSJx8U5FLSolPq10TyM/uXOOIrsQ9Twroi6/4IrhA3dDpjVeQVzcFpBokMNJ9Op4vkiQe9CZ4Mr5/hZH1iJbAk6XROj+SHWQ== X-Google-Smtp-Source: AGHT+IEvmPS7/k9Nn+qr8B3apBUX5eNftZQjXrBHQInrQG16U2FykzpNjpmnbrWdsXp1b8DgslSD X-Received: by 2002:a17:902:ca8d:b0:1e2:9d65:253f with SMTP id v13-20020a170902ca8d00b001e29d65253fmr2835799pld.29.1712255390113; Thu, 04 Apr 2024 11:29:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712255390; cv=pass; d=google.com; s=arc-20160816; b=pwrDcCdqMR+fc8xa9xPNe6nuzhkmANZaojL21VhVd1feRSGRXkm90RCb7yZHBuj3RR LrPbx+gkNmWrxqS+C1FR2iMC0M0xkH7JmfR43fxh5lNgXSTISn1Y5Qv70DjeC5VIU2Mc ZIgCvFWPpuaE3nrh7ZwFH7Y+Ht5FnOEPxPA7pMRgaS1ZtcgpvW8d24FKCG5BcgLvm06x o+ygg7NuBHuAsoiuWRdbI5sUFd1DshTVDeKGzAL7KYzw8GwVK6TWLx4ro/fA287pRB8z bLjTbYPo6gQZpKvqy7LZ6Zuq8oN/9cPZ2uugcFA38bfFaAoZoRPK6HOMnVgE3IdM48hq 0h+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=1/fgkUAxp94u/u/q7gTRy7tKml6S4rbKnwyliwWGMB4=; fh=hc8rvoe5UiFOKa+LYT2wUs05NUxUgazbejL+AEmUlxU=; b=H8TWhEn4PYcTR4gYHvmykOO0n2IKkSmYvlgEZIgb1j3fDVqre0UjNOi5f3jwgXrilz 7fBhxLEsDLSKCovx+2trSYCztf/dgRS14Ol3hgmVQ59OC5QEw8A4N9Bqodd3KMoIVtZ8 BdgMWHV7pxrZuOn5zYeCCZV5ZCwPh32J/qRFAlL7rj8NM0Y6beuZLaFAH7DWulq4LJNA lR+oAj+pZbjbuYurPg06mKxOR9xbkmGADI65L4/qkuMw9Dx97bGfQKjHvXRhYP/YgeQw ng950jkTbNezx9NtakJLx7ObPqsf7p0Ugpa30Hm7QbNHFw6kIyiEHS9/kSO3ixsvwvxg ZVqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=4apwjV3X; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-131933-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id b13-20020a170902650d00b001e2a5ce8dc4si2271289plk.273.2024.04.04.11.29.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 11:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131933-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=4apwjV3X; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-131933-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C123BB22A26 for ; Thu, 4 Apr 2024 18:07:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F25E12F5BC; Thu, 4 Apr 2024 18:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="4apwjV3X"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mizQNvXw" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C0771C6A7 for ; Thu, 4 Apr 2024 18:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712254013; cv=none; b=XOmLD69i5rv/VDoeziVuPIyBl7qq5MGsYpNH4lUNScGqwdr/zx3x84vaakjFTGiyupJeGWaHEnU04huVfxGavcvhTc1JhQxUoy5bmoEl7pWqUu7mE/j+CzssYtvwbb1jImnjgIGTCPU6xqzGuKbBtbzm9jhTD6t68iUkjixQkHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712254013; c=relaxed/simple; bh=QoLMfyS7OryKky/C77CP/bov/U+XO9FMaNdn4XGGGYM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=QNfEQ3lCE2fcYr5TNa2vs+1W4Ew++RPlbHG6Ll2q20MP9tXZZJtQhdxjBlx49QRU6w74I3GvD26lDsmHoZFoENdLza7kuZgYKuN3IL/u9csUmLNXTDi/NknWSaO2lzvQVbnfVUEA9mRZohotYQET8JWvhZcj6MZsYRW9WvTsXAc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=4apwjV3X; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mizQNvXw; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1712254010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1/fgkUAxp94u/u/q7gTRy7tKml6S4rbKnwyliwWGMB4=; b=4apwjV3XPHGQRUeLTzwPznNMY6Ont3HZQyDZIPVYpuLkiMuf+X41zF8RzSwoewrdc4EzRw +KCd0AhAPAdvNNND0ZgPweiGYQ0pKvD8XG7wuZTtS1KBJlK1A8ie37KQKANDUj0ikcQ6L8 Vuyjfdi9clhFDvWXNYXrlDfyoYT3vjvLgQ1+8MGdCrZsUVPpTstU53+75V++oDs6ZM6u/F FaH3zcmtIbJULJ4zZGgOeetuIQiiMtdWfWgeibxuV1yNl1ftK7IbBMazh2z/fd10it0DpA DfMbsNF17MqA2xXlRDpc/fWdU4kaezLY/LTK+nAUiynUwJ2I2OEBXEgNLxYGfQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1712254010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=1/fgkUAxp94u/u/q7gTRy7tKml6S4rbKnwyliwWGMB4=; b=mizQNvXwSzQgHXCZVcA/Nbu0EoYCP4w9sgXZiAuEwvk131QhDzHa9WLrnFOnX+ZbIdjcCT /UhQ+kBCNCjg9wDg== To: Laura Nao Cc: kernel@collabora.com, laura.nao@collabora.com, linux-kernel@vger.kernel.org, regressions@leemhuis.info, regressions@lists.linux.dev, x86@kernel.org Subject: Re: [REGRESSION] mainline boot regression on AMD Stoney Ridge Chromebooks In-Reply-To: <87sf019kbd.ffs@tglx> References: <874jchb7na.ffs@tglx> <20240404152317.464796-1-laura.nao@collabora.com> <87sf019kbd.ffs@tglx> Date: Thu, 04 Apr 2024 20:06:50 +0200 Message-ID: <87plv59f45.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Laura! On Thu, Apr 04 2024 at 18:14, Thomas Gleixner wrote: > Can you please provide 'cpuid -r' output too as 'cpuid' does a few > tweaks to the raw data and it's hard to match it back to the code. Don't bother. I think I figured it out. Can you please test the patch below? Thanks, tglx --- diff --git a/arch/x86/kernel/cpu/topology_amd.c b/arch/x86/kernel/cpu/topology_amd.c index 1a8b3ad493af..0d91a04b1741 100644 --- a/arch/x86/kernel/cpu/topology_amd.c +++ b/arch/x86/kernel/cpu/topology_amd.c @@ -29,7 +29,17 @@ static bool parse_8000_0008(struct topo_scan *tscan) if (!sft) sft = get_count_order(ecx.cpu_nthreads + 1); - topology_set_dom(tscan, TOPO_SMT_DOMAIN, sft, ecx.cpu_nthreads + 1); + /* + * cpu_nthreads describes the number of threads in the package + * sft is the number of APIC ID bits per package + * + * As the number of actual threads per core is not described in + * this leaf, just set the CORE domain shift and let the later + * parsers set SMT shift. Assume one thread per core by default + * which is correct if there are no other CPUID leafs to parse. + */ + topology_update_dom(tscan, TOPO_SMT_DOMAIN, 0, 1); + topology_set_dom(tscan, TOPO_CORE_DOMAIN, sft, ecx.cpu_nthreads + 1); return true; } @@ -73,12 +83,14 @@ static bool parse_8000_001e(struct topo_scan *tscan, bool has_0xb) tscan->c->topo.initial_apicid = leaf.ext_apic_id; /* - * If leaf 0xb is available, then SMT shift is set already. If not - * take it from ecx.threads_per_core and use topo_update_dom() - - * topology_set_dom() would propagate and overwrite the already - * propagated CORE level. + * If leaf 0xb is available, then the domain shifts are set + * already and nothing to do here. */ if (!has_0xb) { + /* + * Leaf 0x80000008 set the CORE domain shift already. + * Update the SMT domain, but do not propagate it. + */ unsigned int nthreads = leaf.core_nthreads + 1; topology_update_dom(tscan, TOPO_SMT_DOMAIN, get_count_order(nthreads), nthreads);