Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1064271imj; Thu, 14 Feb 2019 00:15:38 -0800 (PST) X-Google-Smtp-Source: AHgI3IY0xwJI4V/v87WyN4p/FIecn1IeAjorJutiQLP7ho3TKUIZTNgboyhFuY6bAjudOH1G122X X-Received: by 2002:a63:6cc8:: with SMTP id h191mr2494607pgc.366.1550132138554; Thu, 14 Feb 2019 00:15:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550132138; cv=none; d=google.com; s=arc-20160816; b=xEGn1o4WiWazeZd86rNZiJU7kRTbsdDa2acvp9BlQnoAqNe5fzAI7azVs8xJa+qD8d jE5wHdRekty8EL4LC9HRH2xDcK+VcYpdSOCB56BYyR3N0UOnVtJGZyBLB1jrskQFrZep S6ruOGR+oTT7u9dUNrfEZOeZStiDjjFa9+fUwWZetmiMWpgXNR/OHrpG7/lNEy7wfTR8 vFkfFbkk/L9vmXgOw+E/kEluk3UniHqMRvLe4WksWKuXxtpf2mPcTv2/QuJb5eIiOsAP oI0Bw8cMv2f2U9HgHCiSoK3Gvf9rz5gIHPAhnvs/EblzuY+PU5G/5czGByjXtHSOq4rO c12g== 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=87rGaPCNvnPMoRvfHg59ErTtp4YG/5RuiuPHBKNFGTc=; b=AHDipGp5HKKfghO19xax6pHwpoU1+VE1dyTey/Gs4GVvr4g4dgh60JOnt53BBIpdTq B4z3K4dcvVxyyWABhb2d2fnuJz4Oq1yy/IykPu57TwSZrUqxfMDB+A3DndaTwy29jwuP Mjc7+aBxqEcZckVpkiEdhpaTJwZrRj4HKKmgc0R+HXpgJy1PezuNVRbs9nDc2e+klinC 48MX/OtXyhyFvjhM2XFL2gODYzYf2k6iwi9uhPsYaf7x5VIm3wZoRMfXNOoGwZ70wpAi EWnKMATeXdi24fGxbec751nmDZZOc3IXZJLK8sQ2VmyE9/tMQu+3xNoJ23RPr6OmyYcQ P8Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=J0wINNfd; 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 j6si1786778pfc.57.2019.02.14.00.15.22; Thu, 14 Feb 2019 00:15:38 -0800 (PST) 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=J0wINNfd; 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 S2436643AbfBMUS4 (ORCPT + 99 others); Wed, 13 Feb 2019 15:18:56 -0500 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:63574 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732903AbfBMUSV (ORCPT ); Wed, 13 Feb 2019 15:18:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1550089100; x=1581625100; h=from:to:cc:subject:date:message-id; bh=snRz3dxhJ3mJ1sCcBiRAupRtv4dSEiuNGvoXjteiknM=; b=J0wINNfdbm2hFk6ExIUta2C7slaT+xtciHvKoq910/UPpztw9vP+IAIH NYkImpHjZYTXuIGdhJwWEElZ5UbLFpIDMucP04klaRlA/9UNNADe8jbiM o/iQ8ZuUobS+BKPUrg8ha8iBiUFDysiusYY2fn4ZF1I5Mhs1vmIU9YKAu 0aOtU7aLubFGhUh/3+t79Bn3ytKNyGIUX8yXzztgBLZ6F1rN6krQY6O9T Bu//38KtfXYBQ4vaLmzKIFqjR6mLSFPUEvVpGDYU8zwnKYrJtkdeUmEgC 1FMnqkoHSytqDpOQewJ2cSfMAWjtKLIao9KDmmKHSVCbCxyAe/QL7uc/c w==; X-IronPort-AV: E=Sophos;i="5.58,366,1544457600"; d="scan'208";a="206321176" 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; 14 Feb 2019 04:18:19 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 13 Feb 2019 11:58:53 -0800 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; 13 Feb 2019 12:18:20 -0800 From: Atish Patra To: linux-riscv@lists.infradead.org Cc: Atish Patra , Alan Kao , Albert Ou , Andreas Schwab , Anup Patel , Daniel Lezcano , Dmitriy Cherkasov , Guenter Roeck , Jason Cooper , Johan Hovold , linux-kernel@vger.kernel.org, Marc Zyngier , Palmer Dabbelt , Paul Walmsley , Thomas Gleixner Subject: [v5 PATCH 0/8] Various SMP related fixes Date: Wed, 13 Feb 2019 12:18:04 -0800 Message-Id: <1550089092-28783-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 The existing upstream kernel doesn't boot for non-smp configuration. This patch series address various issues with non-smp configurations. The patch series is based on 5.0-rc5 + Johan's below mentioned patch series. Tested on both QEMU and HiFive Unleashed board using both OpenSBI & BBL. https://lore.kernel.org/lkml/20190118140308.9599-1-johan@kernel.org/ Changes from v4->v5 1. Continue processing other harts even if isa string is incorrect for a single hart during HWCAP processing. Changes from v3->v4 1. Fixed commit text length issues. 2. Updated hwcap patch to use common capabilities of all harts. 3. Rebased on Johan's patch series. Changes from v2->v3 1. Fixed spurious white space. 2. Added lockdep for smpboot completion variable. 2. Added a sanity check for hwcap. Changes from v1->v2 1. Move the cpuid to hartid map to smp.c from setup.c 2. Split 3rd patch into several small patches based on logical grouping. 3. Added a new patch that fixes an issue in hwcap query. 4. Changed the title of the patch series. Atish Patra (8): RISC-V: Do not wait indefinitely in __cpu_up RISC-V: Move cpuid to hartid mapping to SMP. RISC-V: Remove NR_CPUs check during hartid search from DT RISC-V: Allow hartid-to-cpuid function to fail. RISC-V: Compare cpuid with NR_CPUS before mapping. clocksource/drivers/riscv: Add required checks during clock source init irqchip/irq-sifive-plic: Check and continue in case of an invalid cpuid. RISC-V: Assign hwcap as per comman capabilities. arch/riscv/include/asm/smp.h | 18 ++++++++++++----- arch/riscv/kernel/cpu.c | 4 ---- arch/riscv/kernel/cpufeature.c | 41 +++++++++++++++++++++------------------ arch/riscv/kernel/setup.c | 9 --------- arch/riscv/kernel/smp.c | 10 +++++++++- arch/riscv/kernel/smpboot.c | 20 ++++++++++++++++--- drivers/clocksource/timer-riscv.c | 23 +++++++++++++++++++--- drivers/irqchip/irq-sifive-plic.c | 5 +++++ 8 files changed, 86 insertions(+), 44 deletions(-) -- 2.7.4