Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6832583imm; Tue, 28 Aug 2018 01:38:08 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbqtzhoink16wG74I99K9A/dCGkvik09CLWJKjWRhgikGAiSqbFgExLiB7ZQDoXmYGFlVfD X-Received: by 2002:a63:4386:: with SMTP id q128-v6mr515195pga.353.1535445487952; Tue, 28 Aug 2018 01:38:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535445487; cv=none; d=google.com; s=arc-20160816; b=J+roM3dDvdOF227W/qprQB3SI3tBMZtbUBWpSgve6eWoJatl+lY6Jm/5L0vzC4nY9Y Ijgy4rZRlGltAQibeW6bAYF960fy5P+/iQu4Lhr9dtKFgIK38ee3Y6zjz4GHsaeWNVIt ZmVeIEO78vqd4sv3yVRxCZ5L6Qst43iqSwqy67h1vyOUej7+KFEtBJR1lvtV1ifPMljM h9FJIhctBs840dwRQ9jgS4MAlDnTPzeWyQCqK9zZZJ9pFQBtlXft8ks7HqKKHXNPWqRz b0hCcmPBjTBVVEJFrafnyw6uzXN96gYC4OLLM2JP64YuB6GLEOi3H9THORcvBL2965F2 4VXQ== 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:arc-authentication-results; bh=hOEMf8lhzk/r9aL/2s6zLoMPDnIsUQlCTmEK8BktinA=; b=l5QqBRVrIs5jXhqAmDCKksuumaagWGHVXsaKm1g25An6oJhFYe9jhpbZshP7dA1kaq SYd5GL4yKH3TTs14K4CfqESM/2GdERoyb6O+4h9S4HbJwMgdvUiEjTmPUJUsg4AyNRle mEGwUiV82NfVsOqm442kFrCl3XKw9yOUZZzN9yOahk1AFwLb5zsZGz1LTUVaCquXR8Rz fwWZlpIEnNC0941c3chzjZew9nBwlqfG65/lxnBtRx0qUXAu1CjXk2/EVFE5bjKqLnmE 4Mf08/KyZjq2J2PWo9QiTPGGqjQMCqoTs7f6p+mFPhEb1xu2kjtZ2PcnGLDYxQD8m5X5 e0dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=ZotF9bUY; 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 m5-v6si515233pgt.361.2018.08.28.01.37.52; Tue, 28 Aug 2018 01:38:07 -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=ZotF9bUY; 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 S1727450AbeH1M0p (ORCPT + 99 others); Tue, 28 Aug 2018 08:26:45 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:54531 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726997AbeH1M0p (ORCPT ); Tue, 28 Aug 2018 08:26:45 -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=1535445407; x=1566981407; h=from:to:cc:subject:date:message-id; bh=Wykkqqy7tUmxM6aSYALi1eP8zK57QFGS7kw1FeXnjc0=; b=ZotF9bUYzlduGKOK/idFOCf37w79xpzb1AQTXAEShP5QsersFvxgvvXz oTJJRYceivjgUcX9cV0kQIRGWr2Rj0Xv9k8h3+7efmY9n48Mw3EqB+V3Z MEK3Ca2kVEIiZDEXvNd5q1mShXKatuItfeoLxaihl/zFv7JmYVcXyttHv LIvJj6n4r39W7BQb5tDZ3QgycCyKDK2YqRc1/9vHS6S0WieH28MJURCuM Xohyn/bjmnAOgE86e2U4fx0y8TtXX4rkPI5upjbBnO1Z0HB4CBT2QxthW 5nVKIkx/sKH5N/YAj9hpXcIOpYggCFczgRrIejKU1IXPmb0Hw1qsWHy13 Q==; X-IronPort-AV: E=Sophos;i="5.53,298,1531756800"; d="scan'208";a="185994289" 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; 28 Aug 2018 16:36:46 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 28 Aug 2018 01:23:08 -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; 28 Aug 2018 01:36:11 -0700 From: Atish Patra To: palmer@sifive.com, linux-riscv@lists.infradead.org, mark.rutland@arm.com, anup@brainfault.org, hch@infradead.org Cc: atish.patra@wdc.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, damein@vger.kernel.org Subject: [PATCH v2 0/3] RISC-V: Add new smp features Date: Tue, 28 Aug 2018 01:36:07 -0700 Message-Id: <1535445370-19004-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 implements following smp related features. Some of the work has been inspired from ARM64. 1. Decouple linux logical cpu ids from hardware cpu id 2. Support cpu hotplug. Tested on QEMU & HighFive Unleashed board with/without SMP enabled. v1->v2: 1. Dropped cpu_ops patch. 2. Moved back IRQ cause definiations to irq.h 3. Keep boot cpu hart id and assign zero as the cpu id for boot cpu. 4. Renamed cpu id and hart id correctly. Atish Patra (3): RISC-V: Add logical CPU indexing for RISC-V RISC-V: Use Linux logical cpu number instead of hartid RISC-V: Support cpu hotplug. arch/riscv/Kconfig | 12 +++++- arch/riscv/include/asm/irq.h | 1 + arch/riscv/include/asm/smp.h | 33 ++++++++++++++- arch/riscv/include/asm/tlbflush.h | 17 ++++++-- arch/riscv/kernel/cpu.c | 8 ++-- arch/riscv/kernel/head.S | 17 +++++++- arch/riscv/kernel/irq.c | 27 +++++++++++- arch/riscv/kernel/process.c | 7 ++++ arch/riscv/kernel/setup.c | 25 ++++++++++- arch/riscv/kernel/smp.c | 51 +++++++++++++++++++---- arch/riscv/kernel/smpboot.c | 87 +++++++++++++++++++++++++++++++++------ arch/riscv/kernel/traps.c | 6 +-- drivers/clocksource/riscv_timer.c | 12 ++++-- drivers/irqchip/irq-sifive-plic.c | 11 +++-- 14 files changed, 269 insertions(+), 45 deletions(-) -- 2.7.4