Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp180337ybb; Thu, 9 Apr 2020 20:27:58 -0700 (PDT) X-Google-Smtp-Source: APiQypJpsPiu09GkiCs/x+X3TLLTE/BdxPahNwqr1J1hStnwBG9QoZ47b7ghqfVHxAAI6T1PQJXx X-Received: by 2002:a37:8741:: with SMTP id j62mr2040553qkd.441.1586489278032; Thu, 09 Apr 2020 20:27:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586489278; cv=none; d=google.com; s=arc-20160816; b=coCYi0UwRz+Xx7dUGmf40WeJfJYU3CmKrHBQQ4op5sR1lNrd9JjSHP6y5QaahGSqZL IPdhA0KZc3v/hege8oENnP2cDjZLq7/G7jZg9s5mtnzH9nvWgHZIeM2Duf9k64vZXsRJ OySjgf7FHSikX+/HU/50l7TdHc5xhAPCmz2NNhOaDyc3Kt26JwrRpkHIsc1PxdwnMuSu Xr5BGSBi47EXoBB9vAJTY1rDSPtJsUNcYYM/IUqkFxgTwjxjqcXaElWni6LtpWnSBmcI ILv3gd2iaSm4sLeoOHRqD7DVqotGLepvihyEdFtc4I9mIuU2hDkZ2QFObnZMPh0p4T7S cNxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zB6eoPbFxQzc9EsGjup8MvOhwkt3OS+0JMpUU/JQ+5I=; b=wkxk5muLBvnIaB8B41lY7q5fl5z3poS/qEedpGY3lz3IsLjtEaXIt2e0kby2Mv822k d4ai723PRymmDJ2zdJJK2lQ0JxmxpNJo1XEm06+M8X9q4sKvh2niy/RdG57BfnnzoMyN 3XWuV+kq0i8qw6+RVGsc2kVfchDbx+f2nV6Q92CHi22MAyUWClG/I1beRv5bQuoq5r0g qLCs9OwLq1B7kNReR1dbCar5GJFICYZynon/+jZMzJc64WeCjiOoQWP21Pk1c64jvNb3 JMQap95lOmy/yXoKNk+9WVw42dd7TccIHc7zHTby0NSQAQfzTvoxCi1//6kmNL4iEdnS NDFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=ni8EWjmu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z184si661535qka.136.2020.04.09.20.27.43; Thu, 09 Apr 2020 20:27:58 -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=pass header.i=@sifive.com header.s=google header.b=ni8EWjmu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726652AbgDJD0m (ORCPT + 99 others); Thu, 9 Apr 2020 23:26:42 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:39937 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726082AbgDJD0l (ORCPT ); Thu, 9 Apr 2020 23:26:41 -0400 Received: by mail-pl1-f196.google.com with SMTP id h11so253239plk.7 for ; Thu, 09 Apr 2020 20:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zB6eoPbFxQzc9EsGjup8MvOhwkt3OS+0JMpUU/JQ+5I=; b=ni8EWjmuQStnLsqCU4sK/2M4goQg86KfwvAnE/aO3L+hEhfDxeKN/FeSp43wy/SPI9 bvOPCTUR2KFzs1BO3hr0jpt3sSUgkXD50l+acpuGQhfr+nVnCsHUIdC2+lIHaAb78txV 1KkrykMoValQJ5HgmPmls73DBPIPw69rk+DJsmLTzvCPvM+Kc7jndDY3moN/qRPln0z6 zm8kAQ7u+GtoxIlC5+bxdiCH/MqCWbWVlPc6+lUEDL8811seCfROPECbULVgmjt1tsnw 8nDnZWuOa+SjuC6NrP26qrSlQQo9JllcVCFhA3zXOHc/bTkT/0+tS8NtAPpoqBEpNpSL LM5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zB6eoPbFxQzc9EsGjup8MvOhwkt3OS+0JMpUU/JQ+5I=; b=SXz43xk730mcNmVirucpMG8WpfMBfuKoVU66eZgHNQvAKRy9t0I99kMaE/WSs9pYcV 5R30p0CAtgnS6chwWqNRQkhO2iApaslfX0jCwdrduNK9UDbQRa7NJscGDFP5gmdHR6SS ysnmGDFomd//c0LR1eswN8DZTeHYNpVJJ0dMpmITe+8r3wHpluM6GLi0LIhZUotgCwKN 8Gke0dP4ybMSIGse/ItnZDqyk7BmUNFCt9aJunlHH77mX7Tqc/K/18HekIi2Pl4zf2Q5 YMm6mf58LgCVNOCLfrXu4A+vVZYYumoy2EiLutg8DZbONvL0SH/t+k2ymj30pWEYT/Pm pdTg== X-Gm-Message-State: AGi0PubDBjyC+tZpcFJii5rAZ+DSt76wqD0Q33TxlWvL7FId3+oMRCHz 4CFFEYXRBVk+n4jsco/MJ+zFIA== X-Received: by 2002:a17:902:8c94:: with SMTP id t20mr2699169plo.336.1586489199438; Thu, 09 Apr 2020 20:26:39 -0700 (PDT) Received: from hsinchu02.internal.sifive.com (114-34-229-221.HINET-IP.hinet.net. [114.34.229.221]) by smtp.gmail.com with ESMTPSA id w127sm480372pfw.218.2020.04.09.20.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Apr 2020 20:26:38 -0700 (PDT) From: Zong Li To: palmer@dabbelt.com, paul.walmsley@sifive.com, aou@eecs.berkeley.edu, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Zong Li Subject: [PATCH] riscv: remove the assert of lock for cpu_running Date: Fri, 10 Apr 2020 11:26:34 +0800 Message-Id: <20200410032634.57511-1-zong.li@sifive.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The cpu_running is not a lock-class, it lacks the dep_map member in completion. It causes the error as follow: arch/riscv/kernel/smpboot.c: In function '__cpu_up': ./include/linux/lockdep.h:364:52: error: 'struct completion' has no member named 'dep_map' 364 | #define lockdep_is_held(lock) lock_is_held(&(lock)->dep_map) | ^~ ./include/asm-generic/bug.h:113:25: note: in definition of macro 'WARN_ON' 113 | int __ret_warn_on = !!(condition); \ | ^~~~~~~~~ ./include/linux/lockdep.h:390:27: note: in expansion of macro 'lockdep_is_held' 390 | WARN_ON(debug_locks && !lockdep_is_held(l)); \ | ^~~~~~~~~~~~~~~ arch/riscv/kernel/smpboot.c:118:2: note: in expansion of macro 'lockdep_assert_held' 118 | lockdep_assert_held(&cpu_running); Signed-off-by: Zong Li --- arch/riscv/kernel/smpboot.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 8bc01f0ca73b..bbc1baa2d90c 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -115,7 +115,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle) task_stack_page(tidle) + THREAD_SIZE); WRITE_ONCE(__cpu_up_task_pointer[hartid], tidle); - lockdep_assert_held(&cpu_running); wait_for_completion_timeout(&cpu_running, msecs_to_jiffies(1000)); -- 2.26.0