Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1500144imm; Wed, 15 Aug 2018 19:49:51 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyFZuXYCzoo6pnjOAuLnJZzfm8zYZjsm5sPkxSUayA+MaadX3GWe4/ubC1V6hG7ktc4IHrJ X-Received: by 2002:a62:5543:: with SMTP id j64-v6mr30016173pfb.188.1534387790976; Wed, 15 Aug 2018 19:49:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534387790; cv=none; d=google.com; s=arc-20160816; b=qDsgGhxChLrI4ItSMhtkJhGcC4VJFUI/qFrGlox12gVqXkB3ORcNCm1PpI2j9lkQWU ee3m459HW1qO6ZyXBFVU5M9F09fQGya5rB4157tP+yPjGjtVYbBTSM3BOuplLcH5WQzh SSGS8aSAtHz9LrK6UcjyJqo0yEep5CEjiw6zP5LsJ0FLP2VfX2QY6VIf6/OdWeH4OTr7 v2cnApc11WK6n0JzInJS0IdW24FCFLJtneEA4sKHFMprkN8c59THLYK9VdV3ghWHtMFC 8C/AcH+f3e8I9Kc9OKN/cOhXAQFbgzdOYOwBgVUgrT66r6koNt0BVGethYtxHLsIY9+l EaqQ== 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=O3YP1flA7UAbTSQad1WH8Mk3hqJXJ1J5cvcXgNfD5tc=; b=qz7NgruRBmFrU7qIlkFa2dh11Yfsac3tj3s9n8pK6SBzBATrjtGh9JxJSf0mOX5ZYi Dtmr4wNxltFTqGUS/69OpDKWgBFHJFz59hfklQZZjvHX+NTZ5ac1J8DwyA2CCPMG/xRK 3LtcSc8MWDXqjyhbvGrnK3Zdt6F7golAv2/c6ZSMNHrGg5qI+wuLIAAWaYwe+8oyokv1 9NrtZd2b4vSOyAKC8NW7bk1USsAZkEmUXqYwjY3hRSBXlWZ7deWP5kgnU0cDoq2waR75 gcygkcpJdmsRIxEiYDD08YjYlBhXhWTVbEfu/SkA/GWsrITUGLnnkiK1cGgQogWPTrQ6 FL2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=rTq9pm5y; 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 t6-v6si19803502plq.268.2018.08.15.19.49.35; Wed, 15 Aug 2018 19:49:50 -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=rTq9pm5y; 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 S1728881AbeHPCut (ORCPT + 99 others); Wed, 15 Aug 2018 22:50:49 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:25856 "EHLO esa5.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbeHPCut (ORCPT ); Wed, 15 Aug 2018 22:50:49 -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=1534377379; x=1565913379; h=from:to:cc:subject:date:message-id; bh=/ALim0HvIQixEG/GWULXYgvQPEPt76plpIPUiQHzn/g=; b=rTq9pm5ybgZAHAVG0DDw9kF3N8kv1Pd+sRhPUPC5R/zRSh6D5ftr4mNB F8u3FnmVT6zKiEy6BjP516mviaWilsufldmyHy8wPhE9d+P74zC6nmABA l/ojwlpdFBGO0lD3HFkSxgdaCHYLUjaqu+D1j2lo+cx6nvFhRhDBFXu2w s0mFJNz4yjNuosPNhwJxD86B4wKgEHAcCNmFWW43bTw7SgE2oNJdksX9j vMdnnpL/orEgfoJs4VETMABL/4w0DwD3vS1k64LhHQ1IDAz7Mhv8Euiew vOYH5qKnac9XL0pq8Hv4mMpInIK1YxHGHu9kvUxzfyyaSZwZcORoyzmCZ Q==; X-IronPort-AV: E=Sophos;i="5.53,245,1531756800"; d="scan'208";a="88557060" Received: from uls-op-cesaip01.wdc.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 16 Aug 2018 07:56:18 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP; 15 Aug 2018 16:44:16 -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; 15 Aug 2018 16:56:18 -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, Damien.LeMoal@wdc.com Subject: [RFC PATCH 0/5] RISC-V: Improve smp functionality & support cpu hotplug Date: Wed, 15 Aug 2018 16:56:12 -0700 Message-Id: <1534377377-70108-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. Introduce cpu_operations structure for better flexibility & extesnability of future smp enablement methods. It also makes it easier to implement different booting algorithms later. 3. Support cpu hotplug. Tested on QEMU & HighFive Unleashed board with/without SMP enabled. Atish Patra (5): RISC-V: Add logical CPU indexing for RISC-V RISC-V: Use Linux logical cpu number instead of hartid RISC-V: Add cpu_operatios structure RISC-V: Move interrupt cause declarations to irq.h RISC-V: Support cpu hotplug. arch/riscv/Kconfig | 12 ++- arch/riscv/include/asm/irq.h | 7 ++ arch/riscv/include/asm/smp.h | 42 +++++++++- arch/riscv/include/asm/tlbflush.h | 17 +++- arch/riscv/kernel/cpu.c | 4 +- arch/riscv/kernel/head.S | 13 +++ arch/riscv/kernel/irq.c | 7 -- arch/riscv/kernel/process.c | 7 ++ arch/riscv/kernel/setup.c | 27 +++++++ arch/riscv/kernel/smp.c | 51 +++++++++--- arch/riscv/kernel/smpboot.c | 161 +++++++++++++++++++++++++++++++++----- arch/riscv/kernel/traps.c | 6 +- drivers/clocksource/riscv_timer.c | 12 ++- drivers/irqchip/irq-sifive-plic.c | 11 ++- 14 files changed, 325 insertions(+), 52 deletions(-) -- 2.7.4