Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp56572pxb; Tue, 12 Apr 2022 16:41:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmPdaw4gGER2RVks9XvE+hZP8Fzuya2YpxgMRSEB9Qb0UAd6q5C46dJJBhWJtZfhjYW5qv X-Received: by 2002:a17:903:11d0:b0:155:c240:a2c0 with SMTP id q16-20020a17090311d000b00155c240a2c0mr39793899plh.143.1649806899611; Tue, 12 Apr 2022 16:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649806899; cv=none; d=google.com; s=arc-20160816; b=G9T5ix9umQAKdZJxlW33Jhn/dq/UdEFe4bu6c/QDsb7HH8XJEWDIp8O+uqfXhM9NWx TwL+o7aG490B21EupP/0ZxTY6Mzi8HR9QgRAAvagboQ7MQrvCY6hqVLErgX02QMr93w+ WuG0Li31yIEigfhZI96/mPcoc5Lwd9geZ/lLo7aVUv0T+2eLIilDVRodmRXKjdsRlIcE f35uzJgXviRHk1iQHCMBQFo9TkRi7+eYOUa0HPMrT4bJZ5xQdyPO3u36swutThEe5wzT lC1Y2x2z5hi74yFoclmdAijuRJlX5lcOJu5lEJK+zlhwkDfaAT62coSdIYB/6JC502aR 0ddQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=w3qO0b98B6aae3zjIvsIIDBv+sAwQNljamHHXkkiayc=; b=yqt+cP8IOS0bJIA9uMndpk+XXr/8sQi2HyWPT5iOBSKimK6xKzGXy3eHXa9P+SPLEQ VmaUji31NTBSFFjLT2+5dx10A/4qDGK6CdgOPbVMe1H1pI3/Du5Plqh6QVe+W4d1YrCZ ++rQQYxeEIU+bT4IO/eHqUbWxae2bqsX5wB9sbbSitXfz67vKoV+y39wR6nrMPN02ZdR tXtr0BGltpvMz9GjxRvRUDZvJvYRQYt7XrT2nr5mpzNii0KHR9PQFbcE0kRTXOeVfO8J 9rKaNc2A2sLS+ZedsLaFWm++mxIeKdsQNS3RKpt4Lef0q9O8pXfDsUfQQlEIzg63DMIA MeTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GiVRkpGc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s37-20020a634525000000b003816043efa1si3718926pga.406.2022.04.12.16.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 16:41:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=GiVRkpGc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A68A4B53EB; Tue, 12 Apr 2022 14:33:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347673AbiDKPOP (ORCPT + 99 others); Mon, 11 Apr 2022 11:14:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243642AbiDKPON (ORCPT ); Mon, 11 Apr 2022 11:14:13 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6657031530 for ; Mon, 11 Apr 2022 08:11:59 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id b24so18809042edu.10 for ; Mon, 11 Apr 2022 08:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=w3qO0b98B6aae3zjIvsIIDBv+sAwQNljamHHXkkiayc=; b=GiVRkpGcMnz/Wpt9j7pz4rjKJzD+F3eNm0D9KAacAo+BNW5yoDAqRTmacoMbduS5a1 8QyZXp+wpWUcVw698Kp5UH+oACjSANO15i605qH3npEhmAAT+2fbZUxCE4ZdtOfMpKb4 dc6hwc9Migb5VS/6TGHpchu+F32laNYHApklj4Rc1Fg2+wKjNj8pNFl+5NyA9Vw6mNhM NkFPYUxgAlTwbdiP9n/NUYMRs/12ZCu1PWASLqa/995sqMldPnUrIGg6JWZA4lB0Dj6s kiPu2fXSfJ1EDQ/6qzQd5HDRkc3v7uUWSd4qUT1/MKwAaoRA+2DORUXqG/FWchDQknwu snnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=w3qO0b98B6aae3zjIvsIIDBv+sAwQNljamHHXkkiayc=; b=JKeexLjN3c/Cf2tPfaCAGofGeBMaI5w1HHos3EpCVdRBFnukf31tGhSx9sU2bxiZ1h dgoBkkJms/rV5/9uHGatl6rOBmWQDSQIh8KB2W75OHVL42eQvK+4Fhz6i0xGeEzcbSAF WryuCjexpGJIVXUzKqe4JjPpO+HsTb3mLRFGefiTjkcIxHT6OUYEWklDXmRI8zgXutjR SNn4/3CxgM5E5nXnk5x7E56/hW6+cn1tFXg0FKQVhLkVj5A+/ChEYeEPJ/riy9/hiVil +jdp1SXiCEfEK+sBvxpv9PVj4XiGXcU/edOiSq7bv1qwgtE7F1uBaz2gltihnuonoTSQ hWQQ== X-Gm-Message-State: AOAM532ByQHWDhd205ENOImYtIor4RD4Dyxmt3z36vModPPMyK53HzIv nUDpFERpFL8UmURO98nEqU4gK320tQFFzQhhdoA= X-Received: by 2002:a05:6402:d7:b0:413:673:ba2f with SMTP id i23-20020a05640200d700b004130673ba2fmr34135941edu.29.1649689917967; Mon, 11 Apr 2022 08:11:57 -0700 (PDT) MIME-Version: 1.0 References: <1649644580-54626-1-git-send-email-wangqing@vivo.com> In-Reply-To: <1649644580-54626-1-git-send-email-wangqing@vivo.com> From: Andy Shevchenko Date: Mon, 11 Apr 2022 18:07:45 +0300 Message-ID: Subject: Re: [PATCH] arch_topology: Do not set llc_sibling if llc_id is invalid To: Qing Wang Cc: Sudeep Holla , Greg Kroah-Hartman , "Rafael J. Wysocki" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 11, 2022 at 12:10 PM Qing Wang wrote: > > From: Wang Qing > > When ACPI is not enabled, cpuid_topo->llc_id = cpu_topo->llc_id = -1, which > will set llc_sibling 0xff(...), this is misleading. Shouldn't it be a Fixes tag then? > Don't set llc_sibling(default 0) if we don't know the cache topology. ... > - if (cpuid_topo->llc_id == cpu_topo->llc_id) { > + if (cpu_topo->llc_id != -1 && cpuid_topo->llc_id == cpu_topo->llc_id) { I'm wondering if more strict check is better here, i.e. if (cpu_topo->llc_id >= 0 && cpuid_topo->llc_id == cpu_topo->llc_id) { > cpumask_set_cpu(cpu, &cpuid_topo->llc_sibling); > cpumask_set_cpu(cpuid, &cpu_topo->llc_sibling); > } -- With Best Regards, Andy Shevchenko