Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp252286pxb; Fri, 3 Sep 2021 01:05:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPODqMFuSMmnBwi3dDAP2qaDCOtgy4GCx5orbQ3SnsivLuJx3jtpzXuAVJ25pZDP7cnUPU X-Received: by 2002:a5d:8505:: with SMTP id q5mr2079974ion.53.1630656307569; Fri, 03 Sep 2021 01:05:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630656307; cv=none; d=google.com; s=arc-20160816; b=kRTTQpFdyKUwdc8GQSJac/Ne9KiwlGrghsEbOb99qTnBsQL1Eo26X3z57HdWhSIq2b gF8XVeOJyZIsChZFE0xnIRqV5uPevJpTHI2YIn6VokIaombMtJ4tOSRjb9UtEKwHgyHD Kp4E+bWkcpEcRlJFTwpuVs51SQsdE8o8HsZNU9m4OSwLfLkmuc3MBOS9sXdUE6nfq9mK FxW7FFsy5iscZ1R8WxaYucFl0i3dE5n7OLF8gapzQi1Sg5v6tLP6qqoKMhmpFRSrksbU jjLC2IdIRmgrZBnOeQNjfgfiKT3GpALAAIu0Nmjk3gAvZKcSXjdDJksQw0qEElFrstsM HrQQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6L64VU0IF2J9r1dk8gShwbL6aTlx7NpiPDjd+XxYvPU=; b=pLxCfUMLiWLIwwbOX4dPo/liWuzHUBnEM7uUepH5betaWPcZ9hpLlYJnK0btu/vt/J +kfqxXAU1QnMcNjblOoH+GtKsXb9BlGr27AltZNOvQlAw9pG6raLdtkvRjCpWgmmOmSj uB+259z9xDn3icsCT5pOiOvaosmdyJ/VYFP9KveknwFHNBgCpuKPg+7+JjJCr2JQQm1u ECqeM0cuAseZ/Y7jtqZw2kKil8DkUZNFxw5AaUgWtbnnJSMjGGjdi6To92HI/as3Bjpf W/qzm9GkX7GS4Hp40XPfRp71w8q1jQ/UXrGj+WJsitia6cqrDENkFupvkuKhGorUFFk2 Ubig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ltpz16+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 13si5323647jan.43.2021.09.03.01.04.55; Fri, 03 Sep 2021 01:05:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Ltpz16+0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348188AbhICIFJ (ORCPT + 99 others); Fri, 3 Sep 2021 04:05:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348134AbhICIEi (ORCPT ); Fri, 3 Sep 2021 04:04:38 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DB68C061575; Fri, 3 Sep 2021 01:03:26 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id f129so4818121pgc.1; Fri, 03 Sep 2021 01:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6L64VU0IF2J9r1dk8gShwbL6aTlx7NpiPDjd+XxYvPU=; b=Ltpz16+0MI/vRLTQNSqjmTEViTUxTZBeW/ro+ozL7tE9ux2vC/RZLYlFJWWutPCxCT Or0u+cx/xkJnwSk9vvMOIBXVx/8ESLEXzwuiDU5PojtigUJIWZSbEXSnaOuasewHpnqr YmufC1lUt+hIayVubApOGKtKD1Zox3JCh2SDccto7+W3vZX9rsDrkmyr/4HRYeloy+8i /1UOyqTMNtLy9rzWTDaKgBqZZKa9bu7WX6UhSxcb0iGHA4GwxEd/rGa9L2Q9/apPLKEC CzELDCvMSuFAI3bWH++mKFe1KnAIfJIT+FsxmfiTg+dRS2eUrMZc5ejZ6xgK5xaAqxAh M6jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6L64VU0IF2J9r1dk8gShwbL6aTlx7NpiPDjd+XxYvPU=; b=kfZ4niicVkhT6NV8h0gyBrwjJC/i7qnx3dvw8JjSep3Rp0E14VlP45uXMx/EOzIz2u 5SwFCz6K6q7pv0UR8+VAgDN6C+sfRk5UITXiTPs5d8lhJrp4IxXhCuMBJ+x5iXvIY98v +78WCj4D8YyCOl0utOsqnArfuFrv9k9UYhO3oIgn5Ste+REV46u/ryk8qUggcxc4M/+h CYQ+sPAFFj2w9XCZDYMorrb2Il/TSZshaqngz3sW95lC66yB0zZ2kKiqjarBg/Pn+Ns/ Vjn1Px6cqHEEQ0tBiGnL9dNRDcUZGO4mqvudf/QzRyNF++i2xhRL9gjj3BHlqgU9TEYa rpgQ== X-Gm-Message-State: AOAM530GFOfPW/zf52W69Mac+bLf8a/o6ECu5lrOIEzVHIcx/PZg5A2v TouxARyyVWgIhQ7NplcxugQ= X-Received: by 2002:a63:aa43:: with SMTP id x3mr2527544pgo.208.1630656205743; Fri, 03 Sep 2021 01:03:25 -0700 (PDT) Received: from ubt.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id 26sm6200531pgx.72.2021.09.03.01.03.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 01:03:25 -0700 (PDT) From: Chunyan Zhang To: Vasily Gorbik , Heiko Carstens , Christian Borntraeger , Sebastian Ott , Martin Schwidefsky Cc: linux-s390@vger.kernel.org, kernel test robot , Thomas Gleixner , Chunyan Zhang , Chunyan Zhang , LKML Subject: [PATCH] s390/io: Fix ioremap and iounmap undefinded issue for s390 Date: Fri, 3 Sep 2021 16:03:16 +0800 Message-Id: <20210903080316.2808017-1-zhang.lyra@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210903075641.2807623-1-zhang.lyra@gmail.com> References: <20210903075641.2807623-1-zhang.lyra@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chunyan Zhang There would not be ioremap and iounmap implementations if CONFIG_PCI is not set for s390, so add default declarations of these two functions for the case to avoid 'undefined reference' issue. Fixes: 71ba41c9b1d9 ("s390/pci: provide support for MIO instructions") Reported-by: kernel test robot Signed-off-by: Chunyan Zhang --- The issue was reported from https://lkml.org/lkml/2021/8/1/18 --- arch/s390/include/asm/io.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h index e3882b012bfa..9438370c6445 100644 --- a/arch/s390/include/asm/io.h +++ b/arch/s390/include/asm/io.h @@ -23,11 +23,8 @@ void unxlate_dev_mem_ptr(phys_addr_t phys, void *addr); #define IO_SPACE_LIMIT 0 void __iomem *ioremap_prot(phys_addr_t addr, size_t size, unsigned long prot); -void __iomem *ioremap(phys_addr_t addr, size_t size); void __iomem *ioremap_wc(phys_addr_t addr, size_t size); void __iomem *ioremap_wt(phys_addr_t addr, size_t size); -void iounmap(volatile void __iomem *addr); - static inline void __iomem *ioport_map(unsigned long port, unsigned int nr) { return NULL; @@ -39,6 +36,9 @@ static inline void ioport_unmap(void __iomem *p) #ifdef CONFIG_PCI +void __iomem *ioremap(phys_addr_t addr, size_t size); +void iounmap(volatile void __iomem *addr); + /* * s390 needs a private implementation of pci_iomap since ioremap with its * offset parameter isn't sufficient. That's because BAR spaces are not @@ -70,6 +70,15 @@ static inline void ioport_unmap(void __iomem *p) #define __raw_writel zpci_write_u32 #define __raw_writeq zpci_write_u64 +#else +static inline void __iomem *ioremap(unsigned long offset, unsigned long size) +{ + return (void __iomem *) offset; +} + +static inline void iounmap(void __iomem *addr) +{ +} #endif /* CONFIG_PCI */ #include -- 2.25.1