Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp1450090imd; Thu, 1 Nov 2018 16:06:52 -0700 (PDT) X-Google-Smtp-Source: AJdET5eoJ+kA7SoC3qcXBalU53LdHFycNR8T+z20O3Egueknu4MfMlgJIsPHv47oB9YYjbhKU0aW X-Received: by 2002:a17:902:bb07:: with SMTP id l7-v6mr9561342pls.230.1541113612785; Thu, 01 Nov 2018 16:06:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541113612; cv=none; d=google.com; s=arc-20160816; b=KyeQQevgm1ky083VDHbkZCjDp5yYdrbpxZCX90AjHn+IL9p4Ln4/KBvzzqUQvK1MAo NFYVNzCBT5jiugrhhye7lanziq/LjBj7J8yQ6wzMHsrjVjj/MSxOOCVIKfhyNN51QkiT Og5negcglT0YfArBK8BDAY5frAdYF1OSWKGh2OzRdj2OTF4kJ9OXbiyLNih85rDEAb4c FHmmI06h/pZNTFJo+SN3E1BfM712p+atEyivli14MXUp//HH1qIpogp8aYRD8CLabJPy sIkhjXGelZqEhKuoZevU6AvLHaUauhYUAKVclCkzR9TY7HOjrrGz/cf+9AlXmWYizi+r Od2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=kO0mt+WCBr3PczD3/1riPZ6WEEiEfW+ZYgUpW3EcjWk=; b=FqzEoWAFZtKvKntfwZ9gh8SNZVzc+l2ywGuFzcGCA9tgz/Bq1u3vPXKX2AoenyZa4H VQOLKT1zhmuSjJ7jIi+/ozClDddGGq8IA6l14WCIP1k0DsgJJJVug4/ZkKNzLqxP/r3u ryLwIYwbAp4cDR3DA5cj7UWfdkJiWMmIArweI6vv0KA6qKggFrkBZWHjkkaKkpMKnRkX tpI0xtBOFS9hbcSOHMAO7c5OjW0xwaxE8gAIINO5ls9LY9XDzUyPfFLzbOjTOaIt0U9M cfljh0gjv9Lk3TZvVcqDaX7UQTUlfDX9IJnYqc4ZcaCq4v13JNXZLkuTl810JOHxPi0S XIHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=KNKTjC8r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q132-v6si16632919pfc.198.2018.11.01.16.06.37; Thu, 01 Nov 2018 16:06:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=KNKTjC8r; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728065AbeKBIJ3 (ORCPT + 99 others); Fri, 2 Nov 2018 04:09:29 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:34533 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727749AbeKBIJ3 (ORCPT ); Fri, 2 Nov 2018 04:09:29 -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=1541113469; x=1572649469; h=from:to:cc:subject:date:message-id; bh=u58J7OBrDe40sG+JE5QsBGfXlwVdiMnwpU4kzKzSGGo=; b=KNKTjC8rIZUeJWiEBuYArLWlJZoiGZ31EQdtfrMyfklNg1hrBBdb1A7w RjEO8OnMRONJ+DkrCpd6edMovEhPzTbRTo4YoG1oH2n5S3U2SgAgGTMgJ T51ioXLPCvHEyCCzOl4P/s1s9LCRylGYDbFCoH30Y1j7HEuuEbiqOMnXC uxaIxoIBytinCAomyT0t3PjreUVit9JQMi0MvdChFBHPeZw5hI19+r4Jx zTPqGJWh3x3CYXy4FDkB0BkS61nDLYtdQTlDQapChwynozJa/oOCewpbO Bitfyb1azGpsJ3CCmOljtXm9ZcG38KxMQWvXbIZlCPztYBv5QamTMRpBC g==; X-IronPort-AV: E=Sophos;i="5.54,454,1534780800"; d="scan'208";a="197776149" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 02 Nov 2018 07:04:28 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 01 Nov 2018 15:48:30 -0700 Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip02.wdc.com with ESMTP; 01 Nov 2018 16:04:29 -0700 From: Atish Patra To: linux-riscv@lists.infradead.org Cc: palmer@sifive.com, anup@brainfault.org, hch@infradead.org, Damien.LeMoal@wdc.com, tglx@linutronix.de, mark.rutland@arm.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, devicetree@vger.kernel.org, alankao@andestech.com, zong@andestech.com Subject: [RFC 0/2] Add RISC-V cpu topology Date: Thu, 1 Nov 2018 16:04:26 -0700 Message-Id: <1541113468-22097-1-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series adds the cpu topology for RISC-V. It contains both the DT binding and actual source code. It has been tested on QEMU & Unleashed board. The idea is based on cpu-map in ARM with changes related to how we define SMT systems. The reason for adopting a similar approach to ARM as I feel it provides a very clear way of defining the topology compared to parsing cache nodes to figure out which cpus share the same package or core. I am open to any other idea to implement cpu-topology as well. Atish Patra (2): dt-bindings: topology: Add RISC-V cpu topology. RISC-V: Introduce cpu topology. .../devicetree/bindings/riscv/topology.txt | 154 ++++++++++++++++ arch/riscv/include/asm/topology.h | 28 +++ arch/riscv/kernel/Makefile | 1 + arch/riscv/kernel/smpboot.c | 5 +- arch/riscv/kernel/topology.c | 194 +++++++++++++++++++++ 5 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/riscv/topology.txt create mode 100644 arch/riscv/include/asm/topology.h create mode 100644 arch/riscv/kernel/topology.c -- 2.7.4