From patchwork Fri Jun 9 00:33:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 105184 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp632685vqr; Thu, 8 Jun 2023 17:43:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ45wl/t97lSZYwM5terFbkuxfWNK8l4TwwPZ4zsU7ejV9YS8z/n7GmGKIQLdWSpeBaGxaWu X-Received: by 2002:a05:6a00:234b:b0:661:a374:7688 with SMTP id j11-20020a056a00234b00b00661a3747688mr6331940pfj.12.1686271429532; Thu, 08 Jun 2023 17:43:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686271429; cv=none; d=google.com; s=arc-20160816; b=T19k6262bQc7E/lZcKsW4m3s+S0DyGpBgRSWsCFF3ju6c3kxhZ2SJJEtaHkKEbUjRS OrZyqZGxS9Aq0S39VMGuGqRutsgphmvEC5tk0PXaQ4DtWm1jZxu+4JZgF0DDo4/tFhiY q/E+oxanvLDGfAHWeyYK1oKDwZvWKOeKWYIJvsl2kJG4nwUAsIGYIQnicNXD+iKZSbsd 1Mj79XR/7UeaftZWJBAxcUXktBertgj62LxExricgPiJi4RKEh9zlK3s3hcMqeMbtwbe jAN0VRQEQSxONWXucb2cfnM/AH2jJieexpgr2ZT6oZOYZM/1g6Hp745XKTaNr4DajJ0K nYHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=07+hV5uSDDJLUm8XLuemkRmQ1/NA1t2O44DKghOBv+g=; b=ZRMziSii9PAHpaOJOrCB9K0QEKLaib+wG8n4RTt8zM9eeVBy1pVUnzrD3ybmpi3s24 IcgyF7eTbWDVWrv3igZDaIpjkKlceJgKO3Jh7gKnJAnSoXoi6hUYUDj2YAQ+RyV607+3 nsVVI4rqfu16Im69DQWbv/Yy3V0pR5fn/liDV0K3ddhajpdkrtW6wIBRVqAIE3mWSQgn 1ZcS0SKctfvvwj+mD1y3N8NrvraeDQbmtqxWhGhEcuwL+hldchY8T07AaV/8MKh2nTUM ObHzyVSy8FV2Nao0eymR+WZbkwwTa7BETZOeo7ZELdZpPfl90Fegbu3x6m9XKrEoejr2 Jgfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IMvII713; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c195-20020a6335cc000000b0053ef547263bsi1711692pga.165.2023.06.08.17.43.37; Thu, 08 Jun 2023 17:43:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=IMvII713; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229927AbjFIAdg (ORCPT + 99 others); Thu, 8 Jun 2023 20:33:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231580AbjFIAdd (ORCPT ); Thu, 8 Jun 2023 20:33:33 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 922DE30C8; Thu, 8 Jun 2023 17:33:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=07+hV5uSDDJLUm8XLuemkRmQ1/NA1t2O44DKghOBv+g=; b=IMvII713AqfhBro+1bWtv24I/j +na2Q4M5jPhrGex1+xBgwJL0Ky/SKldSBfpsGtbFPiBBFnb9l9+AsqffLboMQR8d0K5iDdoWwDseN gbqCEQytGNAcbJHkCh1mxMQ1cD+5qAOTVF09eFFTAZqj2Fg1MbsYZpd2VNEo//BquYL8hnIf9/2zB b49wKBH8ee/SdPPRUIUSHNUJBkdqBrL7SNx78waCio4SJeHUJ+kol/yEIl8/Pa9UvjlbMmxaFU2Tx mcMdMjwbFnejubjsdY34HDFghHtqnVZ+bfB9ME/YuyMr+QuPwJq9J+oiBdAXcD/ASdhluTmjTHidJ nIgwzJ1Q==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q7Q4I-00B4uV-2L; Fri, 09 Jun 2023 00:33:30 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Greg Kroah-Hartman , linux-serial@vger.kernel.org, Michael Ellerman , Nicholas Piggin , Christophe Leroy , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] powerpc/legacy_serial: check CONFIG_SERIAL_8250_CONSOLE Date: Thu, 8 Jun 2023 17:33:28 -0700 Message-Id: <20230609003328.15008-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768183750182237415?= X-GMAIL-MSGID: =?utf-8?q?1768183750182237415?= When SERIAL_8250_CONSOLE is not set but PPC_UDBG_16550=y, the legacy_serial code references fsl8250_handle_irq, which is only built when SERIAL_8250_CONSOLE is set. Be consistent in referencing the used CONFIG_SERIAL_8250* symbols so that the build errors do not happen. Prevents these build errors: powerpc-linux-ld: arch/powerpc/kernel/legacy_serial.o: in function `serial_dev_init': legacy_serial.c:(.init.text+0x2aa): undefined reference to `fsl8250_handle_irq' powerpc-linux-ld: legacy_serial.c:(.init.text+0x2b2): undefined reference to `fsl8250_handle_irq' Fixes: 66eff0ef528b ("powerpc/legacy_serial: Warn about 8250 devices operated without active FSL workarounds") Signed-off-by: Randy Dunlap Cc: Uwe Kleine-König Cc: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/kernel/legacy_serial.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -- a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c --- a/arch/powerpc/kernel/legacy_serial.c +++ b/arch/powerpc/kernel/legacy_serial.c @@ -508,9 +508,9 @@ static void __init fixup_port_irq(int in port->irq = virq; - if (IS_ENABLED(CONFIG_SERIAL_8250) && + if (IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE) && of_device_is_compatible(np, "fsl,ns16550")) { - if (IS_REACHABLE(CONFIG_SERIAL_8250)) { + if (IS_REACHABLE(CONFIG_SERIAL_8250_CONSOLE)) { port->handle_irq = fsl8250_handle_irq; port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_8250_CONSOLE); } else {