Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10931968pxu; Wed, 30 Dec 2020 16:28:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJYuUvSnOZyD9RWUFEJPCejOg2ft/RNuuONWRdwKJn1Z8A//7KI2zsbP9j607orByl3dn8 X-Received: by 2002:a17:906:3513:: with SMTP id r19mr50554931eja.445.1609374534145; Wed, 30 Dec 2020 16:28:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609374534; cv=none; d=google.com; s=arc-20160816; b=Zc9PWhdIf18bVM7foq9fzNNVdo0G5LfyQNTuU3w1MtbhECJ2MpcNm2+1XOR/jk1L0x ojMbvMHbqCyW1C/q3nm7yBvHaDRsyFKSa35XFC4zRdcwv4ITA/rXqCqEYkmlZJ4xm/13 doWSO5vDIjZzPxKsRMrvY0zMNfCthfdB/WTuZB75q4fdIzkwZZ9ksBKY8B/0jB4TN8aZ ERfSnbE9uo+a65XRGO0V08+pJ+omFdFTHzuR0ExMeq3nim6Q3gc0gGwa6yUPgdDA6PoX zR4vzevksosIG8zxiWf4+8c3l3LHpKX1ehSQBggVlm+cMekFGwBpleX+ZTrN61kXkcZS Nb9w== 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; bh=N/Ox5CnHjGfyTpyg7UknKoBBMvVDVteClM0MzbFDa/E=; b=MjYM2QUqX8vd2MXbPjHAWBe89sT/mLyutcwqdBKRoRRtNXAB+m7RXBN4TtHgVuA4aS ENo49psshIE3g25Hq0uGnrsrXl1SImCh5W+D3D/qKABSQ8Z+X88b3i/Mt7undAril2Tn Gk4Mti4ArPEsU418jTz7/ijObZMtCVWDL/dHLbfbO3HhdgHvnfEn+z8sbE+jUPQnzTIT IQBmeveGalHt0L24O4WmXV/ZPA9P1rT2FEkayiNDKGdQKQOp4T6S/LNHlBtlqxowy3qs dFA0SSUnw16H1iHIvzq16C45Npu3SDSGJu5WhcUU8k4Xa7MvN/V2ScitQdxsiIdBhWVF eWnw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si26078891edi.38.2020.12.30.16.28.32; Wed, 30 Dec 2020 16:28:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbgLaA14 (ORCPT + 99 others); Wed, 30 Dec 2020 19:27:56 -0500 Received: from mail-il1-f177.google.com ([209.85.166.177]:34525 "EHLO mail-il1-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726289AbgLaA14 (ORCPT ); Wed, 30 Dec 2020 19:27:56 -0500 Received: by mail-il1-f177.google.com with SMTP id x15so16233135ilq.1; Wed, 30 Dec 2020 16:27:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=N/Ox5CnHjGfyTpyg7UknKoBBMvVDVteClM0MzbFDa/E=; b=SCgB9BFSNVD8g2iph8/jH8ZKlIHtaqZfN2S/lEAp8d53CEPh8MbRXObj6KXbOVK/gJ NBbuwApCdlx3Udc/62/k7XIvMK6iUEXrK2z+SyuT1X008gbbf+8b63ssYBmTL9mfsA1+ zA4+LkL6Xq6cqSH7DfvyZ0AzSpioDXHz73ko9az/Uh4ObgGqRIRnddbR9oOvSgI6aWbk zI/EpZHWgzQD99YppIdvDojmPZX6ALACVWjn+doqAUJuOVQXpt9hZXNV9MFJvuAiE8rn EE0xXxLn4ozIV/xoFC5VRBN2nRtxzUaFm+JmlFnW683PTKUUTURQe3bZJCcbdOaqVAut RvDw== X-Gm-Message-State: AOAM5318e0NgqLkmBdNxgIYpzq612Z0vGhKPKFkLuSAor86AElhe+Y6U cMm+OMHLrAe9i5NblmPq0sOuQaES2HOFiyEazLPQ8DKP X-Received: by 2002:a05:6e02:1187:: with SMTP id y7mr54327534ili.143.1609374435507; Wed, 30 Dec 2020 16:27:15 -0800 (PST) MIME-Version: 1.0 References: <20201230033950.13839-1-jiaxun.yang@flygoat.com> <20201230033950.13839-2-jiaxun.yang@flygoat.com> In-Reply-To: <20201230033950.13839-2-jiaxun.yang@flygoat.com> From: Huacai Chen Date: Thu, 31 Dec 2020 08:27:03 +0800 Message-ID: Subject: Re: [PATCH 2/2] MIPS: Loongson64: Set cluster for cores To: Jiaxun Yang Cc: "open list:MIPS" , Tiezhu Yang , Thomas Bogendoerfer , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Huacai Chen On Wed, Dec 30, 2020 at 11:43 AM Jiaxun Yang wrote: > > cluster is required for cacheinfo to set shared_cpu_map correctly. > > Signed-off-by: Jiaxun Yang > Reviewed-by: Tiezhu Yang > Tested-by: Tiezhu Yang > --- > arch/mips/loongson64/smp.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/mips/loongson64/smp.c b/arch/mips/loongson64/smp.c > index e744e1bee49e..fae3a97d853c 100644 > --- a/arch/mips/loongson64/smp.c > +++ b/arch/mips/loongson64/smp.c > @@ -403,6 +403,8 @@ static void __init loongson3_smp_setup(void) > __cpu_number_map[i] = num; > __cpu_logical_map[num] = i; > set_cpu_possible(num, true); > + /* Loongson processors are always grouped by 4 */ > + cpu_set_cluster(&cpu_data[num], i / 4); > num++; > } > i++; > -- > 2.30.0 >