From patchwork Mon Jul 22 11:47:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jocelyn Falempe X-Patchwork-Id: 13738743 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9F5FFC3DA5D for ; Mon, 22 Jul 2024 11:48:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D508C10E4EC; Mon, 22 Jul 2024 11:48:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="GcYxTg11"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3394210E4EC for ; Mon, 22 Jul 2024 11:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721648892; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mON0Gx7FVFtPkP0kLOreGdHs3og1l5iGH3FHLInhhao=; b=GcYxTg11WbKZt6sUymdpyRBJSVVD3DNh4RvynzV7MKSMPfNX1NT4yuPDTez/9dgde+GaQh 64if2BkmzuK5k+D7YvyFiv17sna7pKJ40eQCpXGfua2Ng3mFukSNoBU/5ahoZPsDYCbo03 A+byGZSI2ncxO2SsnV6QFJPM/K/WSDU= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-411-V5fsc56OOI-XBxKw3Dy7Ww-1; Mon, 22 Jul 2024 07:48:10 -0400 X-MC-Unique: V5fsc56OOI-XBxKw3Dy7Ww-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 96DFE19560AA; Mon, 22 Jul 2024 11:48:07 +0000 (UTC) Received: from hydra.redhat.com (unknown [10.39.193.104]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 50B453000188; Mon, 22 Jul 2024 11:48:03 +0000 (UTC) From: Jocelyn Falempe To: lkp@intel.com Cc: Daniel Vetter , Helge Deller , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Javier Martinez Canillas , Thomas Zimmermann , oe-kbuild-all@lists.linux.dev, Jocelyn Falempe Subject: [PATCH] fbcon: Use oops_in_progress instead of panic_cpu Date: Mon, 22 Jul 2024 13:47:51 +0200 Message-ID: <20240722114800.174558-1-jfalempe@redhat.com> In-Reply-To: <202407210203.2ISiIC9m-lkp@intel.com> References: <202407210203.2ISiIC9m-lkp@intel.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Panic_cpu is not exported, so it can't be used if fbcon is used as a module. Use oops_in_progress in this case, but non-fatal oops won't be printed. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407210203.2ISiIC9m-lkp@intel.com/ Signed-off-by: Jocelyn Falempe Reviewed-by: Daniel Vetter --- drivers/video/fbdev/core/fbcon.c | 9 +++++++++ 1 file changed, 9 insertions(+) base-commit: 7e33fc2ff6754b5ff39b11297f713cd0841d9962 diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index 498d9c07df80..2e093535884b 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -64,6 +64,8 @@ #include #include #include +#include +#include #include #include #include @@ -272,7 +274,14 @@ static int fbcon_get_rotate(struct fb_info *info) static bool fbcon_skip_panic(struct fb_info *info) { +/* panic_cpu is not exported, and can't be used if built as module. Use + * oops_in_progress instead, but non-fatal oops won't be printed. + */ +#if defined(MODULE) + return (info->skip_panic && unlikely(oops_in_progress)); +#else return (info->skip_panic && unlikely(atomic_read(&panic_cpu) != PANIC_CPU_INVALID)); +#endif } static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info)