From patchwork Wed Aug 2 23:03:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Anastasio X-Patchwork-Id: 13338907 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 lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 3B0D8C001DF for ; Wed, 2 Aug 2023 23:03:37 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.575866.901392 (Exim 4.92) (envelope-from ) id 1qRKsJ-00049W-LS; Wed, 02 Aug 2023 23:03:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 575866.901392; Wed, 02 Aug 2023 23:03:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qRKsJ-00047Z-Hd; Wed, 02 Aug 2023 23:03:27 +0000 Received: by outflank-mailman (input) for mailman id 575866; Wed, 02 Aug 2023 23:03:25 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qRKsH-0002ha-KG for xen-devel@lists.xenproject.org; Wed, 02 Aug 2023 23:03:25 +0000 Received: from raptorengineering.com (mail.raptorengineering.com [23.155.224.40]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c630955c-3188-11ee-8613-37d641c3527e; Thu, 03 Aug 2023 01:03:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id D90A58285755; Wed, 2 Aug 2023 18:03:18 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id q5S3udTYLjJ5; Wed, 2 Aug 2023 18:03:18 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by mail.rptsys.com (Postfix) with ESMTP id 3CF748286985; Wed, 2 Aug 2023 18:03:18 -0500 (CDT) Received: from mail.rptsys.com ([127.0.0.1]) by localhost (vali.starlink.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EVp_UIJ6pOb8; Wed, 2 Aug 2023 18:03:18 -0500 (CDT) Received: from raptor-ewks-026.lan (5.edge.rptsys.com [23.155.224.38]) by mail.rptsys.com (Postfix) with ESMTPSA id BEC5182857CC; Wed, 2 Aug 2023 18:03:17 -0500 (CDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c630955c-3188-11ee-8613-37d641c3527e DKIM-Filter: OpenDKIM Filter v2.10.3 mail.rptsys.com 3CF748286985 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raptorengineering.com; s=B8E824E6-0BE2-11E6-931D-288C65937AAD; t=1691017398; bh=mTHIJoDesvUL/1mvvl/fu0GmqgkC6yCd3GyR+DEjPQM=; h=From:To:Date:Message-Id:MIME-Version; b=gyhBMPrbZOxx2NbfavaS5idAmmnHNgceVgOSB2PqpVWV1kD5ciH4ZT6KQra/sBk0f ZKanThnkAWEw2pqLbkB6W2y9fYkk8hbs905OBqMGWFFAi4CoZL+Wxxo4K/PFThpH2e 4BXUcx1chDr7AJ6PQb5zo+eJnfZwpg2072AmoJAg= X-Virus-Scanned: amavisd-new at rptsys.com From: Shawn Anastasio To: xen-devel@lists.xenproject.org Cc: Timothy Pearson , Andrew Cooper , Jan Beulich , Shawn Anastasio Subject: [PATCH 6/9] ns16550: Guard accesses to `vuart` field by CONFIG_ARM Date: Wed, 2 Aug 2023 18:03:02 -0500 Message-Id: <1bee2fe06c4a9262b05cb4b8cd392d9630279f30.1691016993.git.sanastasio@raptorengineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 When CONFIG_ARM is defined, a `vuart` field is added to struct ns16550, but accesses to this field in ns16550_uart_dt_init weren't correctly guarded. Fix build on !ARM platforms that define CONFIG_HAS_DEVICE_TREE by correctly guarding access to the vuart field in this function. Signed-off-by: Shawn Anastasio Reviewed-by: Jan Beulich --- xen/drivers/char/ns16550.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 212a9c49ae..c0598efb27 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -1797,11 +1797,13 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev, uart->dw_usr_bsy = dt_device_is_compatible(dev, "snps,dw-apb-uart"); +#ifdef CONFIG_ARM uart->vuart.base_addr = uart->io_base; uart->vuart.size = uart->io_size; uart->vuart.data_off = UART_THR <reg_shift; uart->vuart.status_off = UART_LSR<reg_shift; uart->vuart.status = UART_LSR_THRE|UART_LSR_TEMT; +#endif /* Register with generic serial driver. */ serial_register_uart(uart - ns16550_com, &ns16550_driver, uart);