From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D7C7C28CC0 for ; Wed, 29 May 2019 17:24:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5457223F4E for ; Wed, 29 May 2019 17:24:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="r1zdFY4M" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbfE2RYq (ORCPT ); Wed, 29 May 2019 13:24:46 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:33354 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725990AbfE2RYq (ORCPT ); Wed, 29 May 2019 13:24:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1559150750; x=1590686750; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=GmwkQjsql+93mksfGBKpKv07dJD3LbLgm/uiMZ0AHPo=; b=r1zdFY4MJ6Ewx3vjpjXzAAU7/hxykRnalg5HAAfOCkjQzup0PvIsw4qO +/RDxKI2Wjogcbrl/JQtJ/5BwoYR1EL9aQ1/Sr1fZx4hi4zQ8aycEjZMf wGSsRuN7PSn/qtXaHmRxtN8K49HgHHX4oBnxliP57k8s9io2rX8z5BYJG c47dsRXCzmEPqK77Wx+stCAZKULECyFOLgPN8Vkbr2k/HHNAx4LCLCyj7 t43MJWPNqDqqv4jKnouQrSe4evjkeAfsrpgvwUvUrBr8trmLlHMIUb3bl D7lSbP5vmDQ1n8bW65sSIvSvyEwz3b+fTZ3tQMC4PCDL9P+KUEBSfkWf7 A==; X-IronPort-AV: E=Sophos;i="5.60,527,1549900800"; d="scan'208";a="208888300" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 May 2019 01:25:50 +0800 IronPort-SDR: qJjPorv7NLTsDipQ/quAsdkOhmgOQxd3GEQHDCrxv2fjccRPwl2BvfzQ1r/vsIkVi57XGY1iiA IsajZazzTKIXLeHAwBQppRCnbM9TGtPNZ5ntWL+8XMyuRxTtDZowYzbaNI7x6hPlTwf0BVevwT 88OVgkwuR6SDXq7MQpx8RZWUS0iX1qKywgtouiVnSj7kAHPHfF5V3kKY+jjsGk0Uydqv3KU0kj uTWaroTTL1UNAqf2V+nGLr6oH8P05zuSC4jPtRFPcXNx/rih1uv/e5uAc/WYkzfF50Ey/XBOGW xsMY6vG/gCghuchMvWHONml5 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 29 May 2019 09:59:56 -0700 IronPort-SDR: qwx1yS5ZHNt0FCMSYqf+WJKfwEZzDe1m1COXuHEaXSEA1gbjcAghTgoZA/pAPmiHYjRRuhMwaS 4YU0yZuBBWOR8HMPPKVU5iZV0wOR6jpU6gpjoSofyjnMX+Yj+CLJ54VyieeJDHrICAWbFkwZEE 8fiPHmX0AWUyXp5ROGUHIaH1uox4cxYmupRrmw0K0LfN1+pPMJXpEiN7/T4ppYloUEVMdUMMYe 0f9cT1yfCL6ZBGsZeJTclAy1epn3qLfhy4lQ1mzKbXDz2qH6YA/AnqpC7lGAh68rWc2HbLUYqk pt8= Received: from r6220.sdcorp.global.sandisk.com (HELO [192.168.1.6]) ([10.196.157.143]) by uls-op-cesaip02.wdc.com with ESMTP; 29 May 2019 10:24:46 -0700 Subject: Re: [RFT PATCH v5 3/5] cpu-topology: Move cpu topology code to common code. To: Sudeep Holla , Jeffrey Hugo Cc: "linux-kernel@vger.kernel.org" , Albert Ou , Andreas Schwab , Anup Patel , Catalin Marinas , "devicetree@vger.kernel.org" , Greg Kroah-Hartman , Ingo Molnar , Jeremy Linton , "linux-riscv@lists.infradead.org" , Mark Rutland , Morten Rasmussen , Otto Sabart , Palmer Dabbelt , Paul Walmsley , "Peter Zijlstra (Intel)" , "Rafael J. Wysocki" , Rob Herring , Thomas Gleixner , Will Deacon , "linux-arm-kernel@lists.infradead.org" References: <20190524000653.13005-1-atish.patra@wdc.com> <20190524000653.13005-4-atish.patra@wdc.com> <20190529104801.GA13155@e107155-lin> From: Atish Patra Message-ID: Date: Wed, 29 May 2019 10:24:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190529104801.GA13155@e107155-lin> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/29/19 3:48 AM, Sudeep Holla wrote: > On Thu, May 23, 2019 at 05:06:50PM -0700, Atish Patra wrote: >> Both RISC-V & ARM64 are using cpu-map device tree to describe >> their cpu topology. It's better to move the relevant code to >> a common place instead of duplicate code. >> > > I couldn't test this on any ARM64 server platforms, tested on Juno > and other embedded platforms. > Jeff had tested earlier patch series on ARM64 server platform. Since then, the series has changed. Even though, I don't expect it break ARM64, if it can be verified again that would be great. @Jeff: Can you give it a shot if you have some time ? > Tested-by: Sudeep Holla > Reviewed-by: Sudeep Holla > Thanks! >> Signed-off-by: Atish Patra >> Tested-by: Jeffrey Hugo >> --- >> arch/arm64/include/asm/topology.h | 23 --- >> arch/arm64/kernel/topology.c | 303 +----------------------------- >> drivers/base/arch_topology.c | 296 +++++++++++++++++++++++++++++ >> include/linux/arch_topology.h | 28 +++ >> include/linux/topology.h | 1 + >> 5 files changed, 329 insertions(+), 322 deletions(-) >> > > [...] > >> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c >> index 0825c4a856e3..6b95c91e7d67 100644 >> --- a/arch/arm64/kernel/topology.c >> +++ b/arch/arm64/kernel/topology.c >> > > [...] > >> -static int __init parse_cluster(struct device_node *cluster, int depth) >> -{ >> - char name[10]; >> - bool leaf = true; >> - bool has_cores = false; >> - struct device_node *c; >> - static int package_id __initdata; >> - int core_id = 0; > > [Ultra minor nit]: you seem to have reordered the above declaration when > you moved, just noticed as it showed up when comparing. > Arrgh. Sorry! I think I was trying to fix a checkpatch or something and forgot to revert. I will update it. >> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c >> index 1739d7e1952a..20a960131bee 100644 >> --- a/drivers/base/arch_topology.c >> +++ b/drivers/base/arch_topology.c > > [...] > >> + >> +static int __init parse_cluster(struct device_node *cluster, int depth) >> +{ >> + char name[10]; >> + bool leaf = true; >> + bool has_cores = false; >> + int core_id = 0; >> + static int package_id __initdata; >> + struct device_node *c; >> + int i, ret; >> + > > [...] > >> +#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV) >> +void update_siblings_masks(unsigned int cpu); >> +#endif >> +void remove_cpu_topology(unsigned int cpuid); >> + > > Another thing(not a block and we can do it once this is merged) is to > remove these #ifdefs > This #ifdef is removed in patch 4. But we should remove the other ones around init_cpu_topology, parse_dt_topology and friends in a follow up patch once this is merged. > -- > Regards, > Sudeep > -- Regards, Atish From mboxrd@z Thu Jan 1 00:00:00 1970 From: Atish Patra Subject: Re: [RFT PATCH v5 3/5] cpu-topology: Move cpu topology code to common code. Date: Wed, 29 May 2019 10:24:44 -0700 Message-ID: References: <20190524000653.13005-1-atish.patra@wdc.com> <20190524000653.13005-4-atish.patra@wdc.com> <20190529104801.GA13155@e107155-lin> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20190529104801.GA13155@e107155-lin> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Sudeep Holla , Jeffrey Hugo Cc: "linux-kernel@vger.kernel.org" , Albert Ou , Andreas Schwab , Anup Patel , Catalin Marinas , "devicetree@vger.kernel.org" , Greg Kroah-Hartman , Ingo Molnar , Jeremy Linton , "linux-riscv@lists.infradead.org" , Mark Rutland , Morten Rasmussen , Otto Sabart , Palmer Dabbelt , Paul Walmsley , "Peter Zijlstra (Intel)" , "Rafael J. Wysocki" , Rob Herring List-Id: devicetree@vger.kernel.org On 5/29/19 3:48 AM, Sudeep Holla wrote: > On Thu, May 23, 2019 at 05:06:50PM -0700, Atish Patra wrote: >> Both RISC-V & ARM64 are using cpu-map device tree to describe >> their cpu topology. It's better to move the relevant code to >> a common place instead of duplicate code. >> > > I couldn't test this on any ARM64 server platforms, tested on Juno > and other embedded platforms. > Jeff had tested earlier patch series on ARM64 server platform. Since then, the series has changed. Even though, I don't expect it break ARM64, if it can be verified again that would be great. @Jeff: Can you give it a shot if you have some time ? > Tested-by: Sudeep Holla > Reviewed-by: Sudeep Holla > Thanks! >> Signed-off-by: Atish Patra >> Tested-by: Jeffrey Hugo >> --- >> arch/arm64/include/asm/topology.h | 23 --- >> arch/arm64/kernel/topology.c | 303 +----------------------------- >> drivers/base/arch_topology.c | 296 +++++++++++++++++++++++++++++ >> include/linux/arch_topology.h | 28 +++ >> include/linux/topology.h | 1 + >> 5 files changed, 329 insertions(+), 322 deletions(-) >> > > [...] > >> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c >> index 0825c4a856e3..6b95c91e7d67 100644 >> --- a/arch/arm64/kernel/topology.c >> +++ b/arch/arm64/kernel/topology.c >> > > [...] > >> -static int __init parse_cluster(struct device_node *cluster, int depth) >> -{ >> - char name[10]; >> - bool leaf = true; >> - bool has_cores = false; >> - struct device_node *c; >> - static int package_id __initdata; >> - int core_id = 0; > > [Ultra minor nit]: you seem to have reordered the above declaration when > you moved, just noticed as it showed up when comparing. > Arrgh. Sorry! I think I was trying to fix a checkpatch or something and forgot to revert. I will update it. >> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c >> index 1739d7e1952a..20a960131bee 100644 >> --- a/drivers/base/arch_topology.c >> +++ b/drivers/base/arch_topology.c > > [...] > >> + >> +static int __init parse_cluster(struct device_node *cluster, int depth) >> +{ >> + char name[10]; >> + bool leaf = true; >> + bool has_cores = false; >> + int core_id = 0; >> + static int package_id __initdata; >> + struct device_node *c; >> + int i, ret; >> + > > [...] > >> +#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV) >> +void update_siblings_masks(unsigned int cpu); >> +#endif >> +void remove_cpu_topology(unsigned int cpuid); >> + > > Another thing(not a block and we can do it once this is merged) is to > remove these #ifdefs > This #ifdef is removed in patch 4. But we should remove the other ones around init_cpu_topology, parse_dt_topology and friends in a follow up patch once this is merged. > -- > Regards, > Sudeep > -- Regards, Atish From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37B25C28CC2 for ; Wed, 29 May 2019 17:25:06 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0F8F223F61 for ; Wed, 29 May 2019 17:25:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BFcBFf/l"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="IcNAdzEQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F8F223F61 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=I42tx2v0W4IA+nhfmX0eC+PHEjTBYNoqKmK4oqy6hZM=; b=BFcBFf/lv4b2qF2bNestKFDpn V0h58lE3S9JLZWk57I4pqd3CF+TDIn5r3wBuQv+/FjgbGQy/5nZRCnzWq+jnCQZRQwFWrfT0w5j11 kV81Vxs/P83UOkaVS/RZZhp5+sYnDgu89knGHRUNcfStzaPCe6iQh++cj2xfddFoNxCvSI+aOsqTu cpbXJUiGK81++or+0JuT/EuHcEX6HZtYxjVSbeZtjuKVsFzX+EouBEZeAvme8mzxDGcmcuRRzFQP7 Cdiq6A50KL0A+J6Sd/bhRLd4o85yLY3SMFuZCeh4pi+kCHiBvMBCaUorZaQfegNAmI6xb9ihpvcM2 BfFAzu4mQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hW2Jz-0008LY-7q; Wed, 29 May 2019 17:25:03 +0000 Received: from esa3.hgst.iphmx.com ([216.71.153.141]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hW2Jq-0008EQ-FA; Wed, 29 May 2019 17:24:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1559150694; x=1590686694; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=GmwkQjsql+93mksfGBKpKv07dJD3LbLgm/uiMZ0AHPo=; b=IcNAdzEQHPgc+4aIKJ22ALt59JN4DyaiFuyqq7AuV8FrszVDq1OToeZF hKjf8sR/F6JPKoG1cwNqrxYG6jRzy8nuuMNmwyadTVlWu/8wpt23WCvk9 sQO8rnL4kdphpgEw6lo9zN0rk9HcYDNtNOpoSuFILuvYCwlRbwx2hgMFl MZdBwy8RUcnX8cOm8ukqkXZTfvlpBX4L1DKRCoPXwbEGywOET3j+DmvL/ mgLr35s4QlONX3Rs80dX6CCiyG2hwVPwxe2MRpxRV12UhMf37gbJEXA01 5vO+c0Mgg9avdPKB1rpK0gwjJXI6aEsPTuVUn1afzqh8+kpELr33pBC/F g==; X-IronPort-AV: E=Sophos;i="5.60,527,1549900800"; d="scan'208";a="114284009" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 May 2019 01:24:45 +0800 IronPort-SDR: a+vStgqvpc6Uh0GexzAsMiaaK9j75+cUaBAeZ4PzStqO2Pz9zuZdwl3jaUPIGnYvKcxNt1MCfu ZOkTi8KUxiZiNR6XRS+5+mnwMlMsHlNpVDYAu6bEyVyN38N1dSy+sk583IyPQBLfR5oyXUwumO 0XB0zeT0cd9sBh4lvPKUz9wf6foe9lXhA8y/L1pt3hk3En8MrzaHLiBTDG3itHLYVfmXI8ihcP sLJITa19PAOs5+47rYFeV9M7PAjiYidtLphWB5n51Lxc8rNxAbTEnN5ltGxzCbg+3Nl/01nAhj o/oNgfoxhFYk+ysxt7tyeCuw Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 29 May 2019 10:02:17 -0700 IronPort-SDR: qwx1yS5ZHNt0FCMSYqf+WJKfwEZzDe1m1COXuHEaXSEA1gbjcAghTgoZA/pAPmiHYjRRuhMwaS 4YU0yZuBBWOR8HMPPKVU5iZV0wOR6jpU6gpjoSofyjnMX+Yj+CLJ54VyieeJDHrICAWbFkwZEE 8fiPHmX0AWUyXp5ROGUHIaH1uox4cxYmupRrmw0K0LfN1+pPMJXpEiN7/T4ppYloUEVMdUMMYe 0f9cT1yfCL6ZBGsZeJTclAy1epn3qLfhy4lQ1mzKbXDz2qH6YA/AnqpC7lGAh68rWc2HbLUYqk pt8= Received: from r6220.sdcorp.global.sandisk.com (HELO [192.168.1.6]) ([10.196.157.143]) by uls-op-cesaip02.wdc.com with ESMTP; 29 May 2019 10:24:46 -0700 Subject: Re: [RFT PATCH v5 3/5] cpu-topology: Move cpu topology code to common code. To: Sudeep Holla , Jeffrey Hugo References: <20190524000653.13005-1-atish.patra@wdc.com> <20190524000653.13005-4-atish.patra@wdc.com> <20190529104801.GA13155@e107155-lin> From: Atish Patra Message-ID: Date: Wed, 29 May 2019 10:24:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190529104801.GA13155@e107155-lin> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190529_102454_616890_C6B07A9B X-CRM114-Status: GOOD ( 24.65 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , Albert Ou , Greg Kroah-Hartman , "Peter Zijlstra \(Intel\)" , Andreas Schwab , Anup Patel , Palmer Dabbelt , Will Deacon , "linux-kernel@vger.kernel.org" , Jeremy Linton , Morten Rasmussen , Rob Herring , Thomas Gleixner , Otto Sabart , Paul Walmsley , Catalin Marinas , "Rafael J. Wysocki" , "linux-riscv@lists.infradead.org" , Ingo Molnar , "linux-arm-kernel@lists.infradead.org" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+infradead-linux-riscv=archiver.kernel.org@lists.infradead.org On 5/29/19 3:48 AM, Sudeep Holla wrote: > On Thu, May 23, 2019 at 05:06:50PM -0700, Atish Patra wrote: >> Both RISC-V & ARM64 are using cpu-map device tree to describe >> their cpu topology. It's better to move the relevant code to >> a common place instead of duplicate code. >> > > I couldn't test this on any ARM64 server platforms, tested on Juno > and other embedded platforms. > Jeff had tested earlier patch series on ARM64 server platform. Since then, the series has changed. Even though, I don't expect it break ARM64, if it can be verified again that would be great. @Jeff: Can you give it a shot if you have some time ? > Tested-by: Sudeep Holla > Reviewed-by: Sudeep Holla > Thanks! >> Signed-off-by: Atish Patra >> Tested-by: Jeffrey Hugo >> --- >> arch/arm64/include/asm/topology.h | 23 --- >> arch/arm64/kernel/topology.c | 303 +----------------------------- >> drivers/base/arch_topology.c | 296 +++++++++++++++++++++++++++++ >> include/linux/arch_topology.h | 28 +++ >> include/linux/topology.h | 1 + >> 5 files changed, 329 insertions(+), 322 deletions(-) >> > > [...] > >> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c >> index 0825c4a856e3..6b95c91e7d67 100644 >> --- a/arch/arm64/kernel/topology.c >> +++ b/arch/arm64/kernel/topology.c >> > > [...] > >> -static int __init parse_cluster(struct device_node *cluster, int depth) >> -{ >> - char name[10]; >> - bool leaf = true; >> - bool has_cores = false; >> - struct device_node *c; >> - static int package_id __initdata; >> - int core_id = 0; > > [Ultra minor nit]: you seem to have reordered the above declaration when > you moved, just noticed as it showed up when comparing. > Arrgh. Sorry! I think I was trying to fix a checkpatch or something and forgot to revert. I will update it. >> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c >> index 1739d7e1952a..20a960131bee 100644 >> --- a/drivers/base/arch_topology.c >> +++ b/drivers/base/arch_topology.c > > [...] > >> + >> +static int __init parse_cluster(struct device_node *cluster, int depth) >> +{ >> + char name[10]; >> + bool leaf = true; >> + bool has_cores = false; >> + int core_id = 0; >> + static int package_id __initdata; >> + struct device_node *c; >> + int i, ret; >> + > > [...] > >> +#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV) >> +void update_siblings_masks(unsigned int cpu); >> +#endif >> +void remove_cpu_topology(unsigned int cpuid); >> + > > Another thing(not a block and we can do it once this is merged) is to > remove these #ifdefs > This #ifdef is removed in patch 4. But we should remove the other ones around init_cpu_topology, parse_dt_topology and friends in a follow up patch once this is merged. > -- > Regards, > Sudeep > -- Regards, Atish _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE5B7C28CC0 for ; Wed, 29 May 2019 17:25:05 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 99A3623F69 for ; Wed, 29 May 2019 17:25:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="soDbhH10"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="IcNAdzEQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99A3623F69 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4f84qHM6O1cpOoQ0YSJFfv3fE0wbAWMHRrCtfB9C81o=; b=soDbhH10I9X4FT5+0DHLnoZMw LPQeIQ6hlommWKva7dUkbR4fs6NqnjOf27QXcE7TrU3UZpJk95yng2948cVa5ZPO9JTAfJqrhD3OX tV1U3OVHHhQY50bRrgrrsFSuwtal7dTqr0jcqpittwLRO5PMw9i0DAzw5pY0N0IUUVkHU+8HQQ0nZ W05PpCng9n9zJKpJiQk7RgdDCzEzdNgUmsE1rmBv9PUoKRVwj/tAzh8FUHX5lW3g++mHxxNf4Jxty K+kgLDkFbcRmD5BtYafwXIBD8f2Gtd6jPcc8jk0tDFwzBjS2Vzx1sFq62pAWsNKlfP35kjVXKNfhj D8loiJkaw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hW2Jt-0008F4-RU; Wed, 29 May 2019 17:24:57 +0000 Received: from esa3.hgst.iphmx.com ([216.71.153.141]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hW2Jq-0008EQ-FA; Wed, 29 May 2019 17:24:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1559150694; x=1590686694; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=GmwkQjsql+93mksfGBKpKv07dJD3LbLgm/uiMZ0AHPo=; b=IcNAdzEQHPgc+4aIKJ22ALt59JN4DyaiFuyqq7AuV8FrszVDq1OToeZF hKjf8sR/F6JPKoG1cwNqrxYG6jRzy8nuuMNmwyadTVlWu/8wpt23WCvk9 sQO8rnL4kdphpgEw6lo9zN0rk9HcYDNtNOpoSuFILuvYCwlRbwx2hgMFl MZdBwy8RUcnX8cOm8ukqkXZTfvlpBX4L1DKRCoPXwbEGywOET3j+DmvL/ mgLr35s4QlONX3Rs80dX6CCiyG2hwVPwxe2MRpxRV12UhMf37gbJEXA01 5vO+c0Mgg9avdPKB1rpK0gwjJXI6aEsPTuVUn1afzqh8+kpELr33pBC/F g==; X-IronPort-AV: E=Sophos;i="5.60,527,1549900800"; d="scan'208";a="114284009" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 May 2019 01:24:45 +0800 IronPort-SDR: a+vStgqvpc6Uh0GexzAsMiaaK9j75+cUaBAeZ4PzStqO2Pz9zuZdwl3jaUPIGnYvKcxNt1MCfu ZOkTi8KUxiZiNR6XRS+5+mnwMlMsHlNpVDYAu6bEyVyN38N1dSy+sk583IyPQBLfR5oyXUwumO 0XB0zeT0cd9sBh4lvPKUz9wf6foe9lXhA8y/L1pt3hk3En8MrzaHLiBTDG3itHLYVfmXI8ihcP sLJITa19PAOs5+47rYFeV9M7PAjiYidtLphWB5n51Lxc8rNxAbTEnN5ltGxzCbg+3Nl/01nAhj o/oNgfoxhFYk+ysxt7tyeCuw Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 29 May 2019 10:02:17 -0700 IronPort-SDR: qwx1yS5ZHNt0FCMSYqf+WJKfwEZzDe1m1COXuHEaXSEA1gbjcAghTgoZA/pAPmiHYjRRuhMwaS 4YU0yZuBBWOR8HMPPKVU5iZV0wOR6jpU6gpjoSofyjnMX+Yj+CLJ54VyieeJDHrICAWbFkwZEE 8fiPHmX0AWUyXp5ROGUHIaH1uox4cxYmupRrmw0K0LfN1+pPMJXpEiN7/T4ppYloUEVMdUMMYe 0f9cT1yfCL6ZBGsZeJTclAy1epn3qLfhy4lQ1mzKbXDz2qH6YA/AnqpC7lGAh68rWc2HbLUYqk pt8= Received: from r6220.sdcorp.global.sandisk.com (HELO [192.168.1.6]) ([10.196.157.143]) by uls-op-cesaip02.wdc.com with ESMTP; 29 May 2019 10:24:46 -0700 Subject: Re: [RFT PATCH v5 3/5] cpu-topology: Move cpu topology code to common code. To: Sudeep Holla , Jeffrey Hugo References: <20190524000653.13005-1-atish.patra@wdc.com> <20190524000653.13005-4-atish.patra@wdc.com> <20190529104801.GA13155@e107155-lin> From: Atish Patra Message-ID: Date: Wed, 29 May 2019 10:24:44 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190529104801.GA13155@e107155-lin> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190529_102454_616890_C6B07A9B X-CRM114-Status: GOOD ( 24.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , "devicetree@vger.kernel.org" , Albert Ou , Greg Kroah-Hartman , "Peter Zijlstra \(Intel\)" , Andreas Schwab , Anup Patel , Palmer Dabbelt , Will Deacon , "linux-kernel@vger.kernel.org" , Jeremy Linton , Morten Rasmussen , Rob Herring , Thomas Gleixner , Otto Sabart , Paul Walmsley , Catalin Marinas , "Rafael J. Wysocki" , "linux-riscv@lists.infradead.org" , Ingo Molnar , "linux-arm-kernel@lists.infradead.org" Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 5/29/19 3:48 AM, Sudeep Holla wrote: > On Thu, May 23, 2019 at 05:06:50PM -0700, Atish Patra wrote: >> Both RISC-V & ARM64 are using cpu-map device tree to describe >> their cpu topology. It's better to move the relevant code to >> a common place instead of duplicate code. >> > > I couldn't test this on any ARM64 server platforms, tested on Juno > and other embedded platforms. > Jeff had tested earlier patch series on ARM64 server platform. Since then, the series has changed. Even though, I don't expect it break ARM64, if it can be verified again that would be great. @Jeff: Can you give it a shot if you have some time ? > Tested-by: Sudeep Holla > Reviewed-by: Sudeep Holla > Thanks! >> Signed-off-by: Atish Patra >> Tested-by: Jeffrey Hugo >> --- >> arch/arm64/include/asm/topology.h | 23 --- >> arch/arm64/kernel/topology.c | 303 +----------------------------- >> drivers/base/arch_topology.c | 296 +++++++++++++++++++++++++++++ >> include/linux/arch_topology.h | 28 +++ >> include/linux/topology.h | 1 + >> 5 files changed, 329 insertions(+), 322 deletions(-) >> > > [...] > >> diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c >> index 0825c4a856e3..6b95c91e7d67 100644 >> --- a/arch/arm64/kernel/topology.c >> +++ b/arch/arm64/kernel/topology.c >> > > [...] > >> -static int __init parse_cluster(struct device_node *cluster, int depth) >> -{ >> - char name[10]; >> - bool leaf = true; >> - bool has_cores = false; >> - struct device_node *c; >> - static int package_id __initdata; >> - int core_id = 0; > > [Ultra minor nit]: you seem to have reordered the above declaration when > you moved, just noticed as it showed up when comparing. > Arrgh. Sorry! I think I was trying to fix a checkpatch or something and forgot to revert. I will update it. >> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c >> index 1739d7e1952a..20a960131bee 100644 >> --- a/drivers/base/arch_topology.c >> +++ b/drivers/base/arch_topology.c > > [...] > >> + >> +static int __init parse_cluster(struct device_node *cluster, int depth) >> +{ >> + char name[10]; >> + bool leaf = true; >> + bool has_cores = false; >> + int core_id = 0; >> + static int package_id __initdata; >> + struct device_node *c; >> + int i, ret; >> + > > [...] > >> +#if defined(CONFIG_ARM64) || defined(CONFIG_RISCV) >> +void update_siblings_masks(unsigned int cpu); >> +#endif >> +void remove_cpu_topology(unsigned int cpuid); >> + > > Another thing(not a block and we can do it once this is merged) is to > remove these #ifdefs > This #ifdef is removed in patch 4. But we should remove the other ones around init_cpu_topology, parse_dt_topology and friends in a follow up patch once this is merged. > -- > Regards, > Sudeep > -- Regards, Atish _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel