From patchwork Mon Feb 14 18:00:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 12745964 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2E81C433F5 for ; Mon, 14 Feb 2022 18:00:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345670AbiBNSA3 (ORCPT ); Mon, 14 Feb 2022 13:00:29 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:51834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232358AbiBNSA3 (ORCPT ); Mon, 14 Feb 2022 13:00:29 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE47C65171; Mon, 14 Feb 2022 10:00:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=HygV3XynhCWrLpKM8VJKHu9+X1H4p6aYXQjio6QBpNQ=; b=deznadcEnTnsRwCjyeG/X5REA4 Sgx4C3jljYLtS61dg9r+fGYuXtq8p6i9+KXM0N6IL1bMS0FaoCAKHMQAWnwEqpjPiIpt9aeBVGeTL KeXlfV3RyYlvf2DdAmP6PJ7LNttLivHoy975w2qUAJkj6mAhOg1RLpAQ4U5HWDadMON3d9/FunguZ OaIYF3Uqfhf4/mM3kzPxVns5Jq7rzM6f8vPu4H7AfXlE4l8+JzUNVzIP2gkxvNYcD89uaBiiipsfv svS/72ZEM+SqWlbjl3YhVYs7SlPa7CgGKpSR9IT2nBwL5L0kl+FWspdZUBnQOgS/Y5mpdiw9I6nK5 24A+t8sA==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJfe8-00GSyp-2F; Mon, 14 Feb 2022 18:00:20 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , kernel test robot , "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Greg Kroah-Hartman , linux-serial@vger.kernel.org, Jiri Slaby , Johan Hovold Subject: [PATCH v2] serial: parisc: GSC: fix build when IOSAPIC is not set Date: Mon, 14 Feb 2022 10:00:19 -0800 Message-Id: <20220214180019.20384-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org There is a build error when using a kernel .config file from 'kernel test robot' for a different build problem: hppa64-linux-ld: drivers/tty/serial/8250/8250_gsc.o: in function `.LC3': (.data.rel.ro+0x18): undefined reference to `iosapic_serial_irq' when: CONFIG_GSC=y CONFIG_SERIO_GSCPS2=y CONFIG_SERIAL_8250_GSC=y CONFIG_PCI is not set and hence PCI_LBA is not set. IOSAPIC depends on PCI_LBA, so IOSAPIC is not set/enabled. Make the use of iosapic_serial_irq() conditional to fix the build error. Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: linux-parisc@vger.kernel.org Cc: Greg Kroah-Hartman Cc: linux-serial@vger.kernel.org Cc: Jiri Slaby Cc: Johan Hovold Suggested-by: Helge Deller Acked-by: Helge Deller --- v2: make the call to iosapic_serial_irq() conditional based on CONFIG_ settings (thanks, Helge) drivers/tty/serial/8250/8250_gsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20220211.orig/drivers/tty/serial/8250/8250_gsc.c +++ linux-next-20220211/drivers/tty/serial/8250/8250_gsc.c @@ -26,7 +26,7 @@ static int __init serial_init_chip(struc unsigned long address; int err; -#ifdef CONFIG_64BIT +#if defined(CONFIG_64BIT) && defined(CONFIG_IOSAPIC) if (!dev->irq && (dev->id.sversion == 0xad)) dev->irq = iosapic_serial_irq(dev); #endif