From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755438AbcBCDTp (ORCPT ); Tue, 2 Feb 2016 22:19:45 -0500 Received: from mailapp01.imgtec.com ([195.59.15.196]:30784 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932580AbcBCDTo (ORCPT ); Tue, 2 Feb 2016 22:19:44 -0500 From: Paul Burton To: , Ralf Baechle CC: Paul Burton , Matt Redfearn , Rusty Russell , , Niklas Cassel , Ezequiel Garcia , Markos Chandras Subject: [PATCH 14/15] MIPS: smp-cps: Add nothreads kernel parameter Date: Wed, 3 Feb 2016 03:15:34 +0000 Message-ID: <1454469335-14778-15-git-send-email-paul.burton@imgtec.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454469335-14778-1-git-send-email-paul.burton@imgtec.com> References: <1454469335-14778-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.100.200.215] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When debugging a new system or core it can be useful to disable the use of multithreading. Introduce a "nothreads" kernel command line parameter that can be set in order to do so. Signed-off-by: Paul Burton --- arch/mips/kernel/smp-cps.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arch/mips/kernel/smp-cps.c b/arch/mips/kernel/smp-cps.c index 27f1c04..23c29fc 100644 --- a/arch/mips/kernel/smp-cps.c +++ b/arch/mips/kernel/smp-cps.c @@ -27,14 +27,25 @@ #include #include +static bool threads_disabled; static DECLARE_BITMAP(core_power, NR_CPUS); struct core_boot_config *mips_cps_core_bootcfg; +static int __init setup_nothreads(char *s) +{ + threads_disabled = true; + return 0; +} +early_param("nothreads", setup_nothreads); + static unsigned core_vpe_count(unsigned core) { unsigned cfg; + if (threads_disabled) + return 1; + if ((!config_enabled(CONFIG_MIPS_MT_SMP) || !cpu_has_mipsmt) && (!config_enabled(CONFIG_CPU_MIPSR6) || !cpu_has_vp)) return 1; -- 2.7.0