Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1590048imm; Tue, 10 Jul 2018 04:43:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfhjd3cvQh+Tn9IyYIJhPmXbWV9vi0yFdKVK+rnOQuSHLaVBg4JNWEuGpGg+UvvisZUbUNh X-Received: by 2002:a63:5106:: with SMTP id f6-v6mr21754320pgb.95.1531223002354; Tue, 10 Jul 2018 04:43:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531223002; cv=none; d=google.com; s=arc-20160816; b=K9hDo+JXwTxujeeh7C56VJPHyv9wIfxAwmyYLB4CTxRDCp9E+CyuosUuuD19nvDzQo yeZu1Ss4ye1g0rpwaIYy6EW/ekAy5xUBZ9uwmwVqsPKgDsaD+NVyX8OIXHZStihfgELN MFntwtrVJG+erdDgyYmGR/xJ6CSSU7VKUHYF22+aLCjymEfskUDjzHtjzz706BU6qxvA ySoaENXaqUNsEo5HOp12ZewXMx1toEU3wEU6qxMKu9tcBkHikh8LtmkWBtfqY90is5hQ VrRfNdl8ob5UxHHQIjdAFzFlnBDwEv1b2mHxIE9sV6xjnHRn5oSly4zbmE5AWACatp3q VgTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=SvuSTnNEePDhX5KkxhGMjfZ3Nx5qNa6UkTikew9K8uo=; b=Au6QhiZPPJxa+4HmdsACWR/ffX+wnF8ekiMDB9GoHYYxXYUmWx89LMyyf69bzgQEpB WnoKD8DANubQkpOiioCyQPD2YBNp9F4zxaPF7DC7ctaUJXxOe912hRpdbOsiqH8MPG2/ 9XIAkL2Rekzn57G+b1GEsclYiktgk6wtgfwdcfeVsfA29Hyngl/S6W5M4DmBYnczmryX 1Rfu5V+1o5IVPLOB8yQ+bMcjMLpC+inxUW3OnlPJsUl9KjSFijO0Y9aJ1pigk2DCS+4a MIUjdbX7cbyiN0hDUn9XxYZqPw+sTc7zJBV7jjRze940ikygFoGcbsxrGpNWKyOWBmB8 3pdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=kFnT1had; 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 x65-v6si18213861pff.196.2018.07.10.04.43.07; Tue, 10 Jul 2018 04:43:22 -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=@infradead.org header.s=merlin.20170209 header.b=kFnT1had; 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 S933209AbeGJLm2 (ORCPT + 99 others); Tue, 10 Jul 2018 07:42:28 -0400 Received: from merlin.infradead.org ([205.233.59.134]:57476 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751715AbeGJLm1 (ORCPT ); Tue, 10 Jul 2018 07:42:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SvuSTnNEePDhX5KkxhGMjfZ3Nx5qNa6UkTikew9K8uo=; b=kFnT1hadasu5zxccHMMoBHNpA a4P+kBeOoD8nZkpIrXTn7vcLc0jYuJ9g7dFHmRucq6vvs+ZcFE9/apsnixzb6eMQi6B5rF2htS8tD SGFYNESW46lmqAem1l0PuqQjUTrCOTBCISrXI+rbVUJN5lf62q5s/QgmIpnLZRRQgByzxZxX3s5eK UgUF6PQzExxjv7HHEjg2ObIoCUPEsquWZrYyVSh92Fl2MD1OjuwYcSuLgseZ6Za8v1651uT6TElIY c61voeo/boQSsON9F1EWilzeL9XrGfRkyg6xnz5U4VLUanMS5qD7mVb09/bDCX9JWql6YVW764EL/ NdKmJS9NA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fcr24-0004FU-Qp; Tue, 10 Jul 2018 11:42:13 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1DA9920289331; Tue, 10 Jul 2018 13:42:10 +0200 (CEST) Date: Tue, 10 Jul 2018 13:42:10 +0200 From: Peter Zijlstra To: Abdul Haleem Cc: linuxppc-dev , linux-next , stephen Rothwell , mpe , sachinp , Ingo Molnar , linux-kernel Subject: [PATCH] watchdog/softlockup: Fix SOFTLOCKUP_DETECTOR=n build Message-ID: <20180710114210.GI2476@hirez.programming.kicks-ass.net> References: <1531129883.6480.7.camel@abdul.in.ibm.com> <20180709114716.GN2476@hirez.programming.kicks-ass.net> <1531159814.6480.11.camel@abdul.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1531159814.6480.11.camel@abdul.in.ibm.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 09, 2018 at 11:40:14PM +0530, Abdul Haleem wrote: > Thanks Peter for the patch, build and boot is fine. > > Reported-and-tested-by: Abdul Haleem Excellent, Ingo can you stick this in? --- Subject: watchdog/softlockup: Fix SOFTLOCKUP_DETECTOR=n build From: Peter Zijlstra Date: Mon, 9 Jul 2018 13:47:16 +0200 I got confused by all the various CONFIG options here about and conflated CONFIG_LOCKUP_DETECTOR and CONFIG_SOFTLOCKUP_DETECTOR. This results in a build failure for: CONFIG_LOCKUP_DETECTOR=y && CONFIG_SOFTLOCKUP_DETECTOR=n As reported by Abdul. Cc: Ingo Molnar Cc: stephen Rothwell Cc: linuxppc-dev Cc: sachinp Cc: mpe Reported-and-tested-by: Abdul Haleem Fixes: 9cf57731b63e ("watchdog/softlockup: Replace "watchdog/%u" threads with cpu_stop_work") Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/20180709114716.GN2476@hirez.programming.kicks-ass.net --- include/linux/nmi.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) --- a/include/linux/nmi.h +++ b/include/linux/nmi.h @@ -33,15 +33,10 @@ extern int sysctl_hardlockup_all_cpu_bac #define sysctl_hardlockup_all_cpu_backtrace 0 #endif /* !CONFIG_SMP */ -extern int lockup_detector_online_cpu(unsigned int cpu); -extern int lockup_detector_offline_cpu(unsigned int cpu); - #else /* CONFIG_LOCKUP_DETECTOR */ static inline void lockup_detector_init(void) { } static inline void lockup_detector_soft_poweroff(void) { } static inline void lockup_detector_cleanup(void) { } -#define lockup_detector_online_cpu NULL -#define lockup_detector_offline_cpu NULL #endif /* !CONFIG_LOCKUP_DETECTOR */ #ifdef CONFIG_SOFTLOCKUP_DETECTOR @@ -50,12 +45,18 @@ extern void touch_softlockup_watchdog(vo extern void touch_softlockup_watchdog_sync(void); extern void touch_all_softlockup_watchdogs(void); extern unsigned int softlockup_panic; -#else + +extern int lockup_detector_online_cpu(unsigned int cpu); +extern int lockup_detector_offline_cpu(unsigned int cpu); +#else /* CONFIG_SOFTLOCKUP_DETECTOR */ static inline void touch_softlockup_watchdog_sched(void) { } static inline void touch_softlockup_watchdog(void) { } static inline void touch_softlockup_watchdog_sync(void) { } static inline void touch_all_softlockup_watchdogs(void) { } -#endif + +#define lockup_detector_online_cpu NULL +#define lockup_detector_offline_cpu NULL +#endif /* CONFIG_SOFTLOCKUP_DETECTOR */ #ifdef CONFIG_DETECT_HUNG_TASK void reset_hung_task_detector(void);