Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp797434lql; Mon, 11 Mar 2024 19:24:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWvvwAM0nxLzWe7+F/RIbG5E/z5Q0Jn3EydSSz6j6bDwFSOUwR6Tdm8XDYrDqzGxql4/Rh9WfpfdUJXv2QKi0fy092ljtI+f3N/6j/iKw== X-Google-Smtp-Source: AGHT+IGbWzZjlgDX2VbC9kVToBCSsWVTVx7juhpm9SWt9rdRJIa75iUjD2HSpG1nsqXWXWpOivyV X-Received: by 2002:a0c:fac1:0:b0:690:964e:9d6e with SMTP id p1-20020a0cfac1000000b00690964e9d6emr8785161qvo.25.1710210267926; Mon, 11 Mar 2024 19:24:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710210267; cv=pass; d=google.com; s=arc-20160816; b=sUAyyeQyjWeStf2cK8VoWn/C0KJpkJdDO1lU7/F0pTUNepUexbU8OJDlPIiQZP2ooT 2am/WPpMX6bkFhBn3CzHXslTCsv91l53+fsWh1UGKHL4F44UXhTZjSlsThDxJRb8+VGE 4vXUNKXPl0fxeoxusKhlntItWBtxBp2IbNv2Vzw8XXLxs2QkK+OFL4wUeskxB7LHYYfk 8XSaCMYelU+AWVqr+S/u7LsjXgtKA9q7UGc2wJMF4A3Ha2I1xVNOUpmfbZ6ex6ecy9uf KYoqXWwLccEb0mSSmM8aegSjoPhtryy9m/B4LJ44P1dgdHL5FYVLa4TZHH2x8yGwwv33 HTzw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=9SbrPiGCdQrCt1N5ALQH0ssl1pc2Fp8ln+P1Az4BYwg=; fh=TTcpltHUibcVIi6wD3z8FrsgqS5cHxsWDFcWTU2Cg5M=; b=nlYycYhF9qg4FmLNeDT1nqXAhCi7mbMuCYkmLygwpblaclnd7E2coDHyKwuXGMQn8H WS0GgzT6Qx58Gf+ed9jnt9EUeD3elVj2XFCcwaurQ8lt0FfMF/PhfNjPTnkQZfkIw2zy CFExWhCR9Tv8gWC2R7SUqHgNKgNfMB0Cr2pLBO/sUWOMVthzLECHMb1LD4bRvB7vXVp/ EeS94eMSijZTg0hpsCZa7GazS4bOl+EMxiKawiWS0TD58aTBp/jCbBLOU76S8umpEYBv 5QmnSuQj080PgUNjD4UA/m820oVRk1vv2xYVztUytDJCVL+1y9+jwFDodklGcc9orHe9 HPvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=nRB0eJ3X; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-99766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99766-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id fo15-20020ad45f0f000000b0068f3624fa5fsi6739029qvb.302.2024.03.11.19.24.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 19:24:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=nRB0eJ3X; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-99766-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99766-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 841EF1C20F2A for ; Tue, 12 Mar 2024 02:24:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D43C6FBF; Tue, 12 Mar 2024 02:24:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="nRB0eJ3X" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C1278811; Tue, 12 Mar 2024 02:24:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710210261; cv=none; b=GJJt1RXGbv6SNXBNlb5/6HIpib2y9Q6dxvuOEzLESD/9f1y9YvsBwFcAMjrQVAjlkVoXeGB7DHMMhT+AKBvekBA3KAPx0/zleOLC+PGIJW1A7/LXfaoktuHZUMJnF+JIwxAm3eJm5CMGoLgktXd10aVtM5qWHc85IuQjcD6mkFs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710210261; c=relaxed/simple; bh=fG56aufdfltkZYeNBOEgH9TwSlq3RcV6Utjd56I7WFU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=PTEmiBcd+Q/grsh4iZv9SfJP2TRLUZMzoID3M4oYLXQ4CavNjm9vXwbH5t6lzCiGwCse5tUGlxKJgQG8Dh0X7zrRqJNYjPIvNkCmXhvO3pDTLZcodFVuX5LPxf5Wq5ZTUbnCR5Hsb7H7K2cOkX+uhoH9RGDtcde5HiCugMRNajw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=nRB0eJ3X; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=9SbrPiGCdQrCt1N5ALQH0ssl1pc2Fp8ln+P1Az4BYwg=; b=nRB0eJ3XHAXgng9YKgOiAiJOkM rS9b+rDCpbQRp67REvX239+NvvQEykGjZeuFuYRSRmq2j6ancaHvad0xHtbI64xxWQ3uS+pk/9lIe vr7Z2RY8bXHkTbJFTz5NBzUO+t3a32gJW6o7+1RwR+qhh5RzS5Ed8UZ4SMo9AoMEOKRLb3e6iiGQ/ NAvC+u6liyvX+KpK0ELcSuqjN1lYrpzIwMlpNJyQUaL4+hASVeeBBTlKfX/s0ZeOTBVRrtmJg5ZCn phzrMhLW4kjtGyVyoOzWckH6oxSuJDfvUvIZmVyPwrmXOtWYVfPs4PqyVXLQ/p/sbnX/XCXH3z2+m rDGf8VQQ==; Received: from [50.53.50.0] (helo=[192.168.254.15]) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rjroP-00000003zcl-2wJh; Tue, 12 Mar 2024 02:24:17 +0000 Message-ID: Date: Mon, 11 Mar 2024 19:24:16 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [GIT PULL] EDAC updates for v6.9 Content-Language: en-US To: Linus Torvalds , Borislav Petkov Cc: x86-ml , lkml , linux-edac References: <20240311155651.GAZe8pw0urOnUZj1y_@fat_crate.local> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 3/11/24 18:12, Linus Torvalds wrote: > On Mon, 11 Mar 2024 at 08:57, Borislav Petkov wrote: >> >> - return topology_die_id(err->cpu) % amd_get_nodes_per_socket(); >> + return topology_amd_node_id(err->cpu) % topology_amd_nodes_per_pkg(); > > Ho humm. Lookie here: > > static inline unsigned int topology_amd_nodes_per_pkg(void) > { return 0; }; > and there's an extra/trailing ';'. > that's the UP case. > > Yeah, I'm assuming nobody tests this for UP, but it's clearly wrong to > potentially do that modulus by zero. > > So I made the merge also change that UP case of > topology_amd_nodes_per_pkg() to return 1. > > Because dammit, not only is a mod-by-zero wrong, a UP system most > definitely has one node per package, not zero. > > Linus > -- #Randy