Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp247189pxb; Fri, 3 Sep 2021 00:58:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqxEaZHEjj2Rd9QtzLyhxgd7CsyPyMa2SJu6Biz+MX08/gCmfSpc/qONEGDaXOFcJpCiH9 X-Received: by 2002:a92:902:: with SMTP id y2mr1831124ilg.304.1630655896376; Fri, 03 Sep 2021 00:58:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630655896; cv=none; d=google.com; s=arc-20160816; b=detbnmyMpTWFZfFy5721HmFpeYGzFcE/bjm9Bh3c6ahtW4AZkDNs89Owomrb5AQAEz Qu/IzvgQHUMJbxQ/pbdDbw12Rz3otbMQTLQ+ZcdbvUn8yy5rOGN1Owcku7zxD7jibXAx nRRH11RrW0z/oSe4BH586uiK+JwH2TGwiH8JmsHzzd1LlRbYL22IOew/XWnnCqN5FAAp QGnbMTUDKCcZm+6wXASIHjTEJ3Fa+bkPLdRp1yip1P+l/r/inRORP05N61T4dsor6wa4 NxvDzmnaFGbGW95jmYKdsM/LVeq6TGvgKsQYUZI05a1+rcPYMgd6d+xJrVDVxdO3m1IP UcTQ== 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=3EzTvK/9UwFvtjEDurK48O7RI8g22JgDw2/OSGI9Ff0=; b=wG76fiT8Uh7sp0uLY78jnNtHIoGdV5mB/89mx0XxssQ+dzgSyJ1oE3LB75FmTzKz23 P+448L/Y96QXZxc8kLUcYosLG9Qb63UcSQ20BPLvl+5oQ2Z4hsL1Wb4ijFk+GEMDNkZF lFzA35b0/bqs5vAv8C8kRlI91zjaNmyPQH9JPrHZbhXwDLqCknnMOfjGw2BiN2Qg37rV 6papuqSO34Ir2jzU9eoJYDgshx3vq4IXV8tCTtvRu8IZ1VTUUhjwY0aZV9tSz40Atd3Z FsNPB0chUst1F2WR49ZpVRSAy0rzTIrMs3HQ+o6ztX/2I5PU69Rz84+4cQj6j5pNwDAg IgCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JYFfX3O5; 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 w67si4130764jaa.124.2021.09.03.00.58.04; Fri, 03 Sep 2021 00:58:16 -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=JYFfX3O5; 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 S1348034AbhICH6P (ORCPT + 99 others); Fri, 3 Sep 2021 03:58:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234772AbhICH6O (ORCPT ); Fri, 3 Sep 2021 03:58:14 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C8F6C061575; Fri, 3 Sep 2021 00:57:14 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id e7so4805907pgk.2; Fri, 03 Sep 2021 00:57:14 -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:mime-version :content-transfer-encoding; bh=3EzTvK/9UwFvtjEDurK48O7RI8g22JgDw2/OSGI9Ff0=; b=JYFfX3O5Uxz2kOe9S7N2hFwmwhv6Ug6z7tVtB2GTYcdhv5XkDIID9By4MJKXFR/nxF WHMim5jjf6n85UFWs74FZ5oNH7pZMpSO8IoIz7+0bK6YCPAXYdmlSn9/TkPNWXN2LUCv N8mB4yycrSrUbYbVWnSc327+nvZWfZjt03Q99/VdLUIeRrPuEQi1lQgtjHRwzJRXTgo6 cKhQZHXhYZI+k3eG9p84+5JMD6HX4A3V0+Ohs1h3leaG3Iohg/BA46O09stt5Z2LpxwD 91Xg52ZHlGSSqz6KP7NU+m5vpEFTkhxGaVdV7jWCKiAlKTDT4Ge0CD3apY4cuvgS4B72 lZUw== 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:mime-version :content-transfer-encoding; bh=3EzTvK/9UwFvtjEDurK48O7RI8g22JgDw2/OSGI9Ff0=; b=YQ8mI086A+RNkqdoRDpocr0fTflJcdQjJCZjBpDFLOrFdSpN6/YWRWJV2q5le5nHYU QZ7poSO1wihOjPaJvMip8o+MymuBylovovJqUB0UuBOc26w7np3yORqkX44+g7JsVOPu E3Qq979/bEpuni2M8W8TErO94jkDaCA1hReT5djOgR0NvaTMi/SJWOErjZ3y2U2EjaLE daehIQYFyKQvYOXGIMeTKMpB8SqFP0jWL2LNBah6Py7yzJNhaci2Xr+ulvXwd5vIHLIL ieDEPqNGN85oxp/mYc8O37XJoXgSBjgVRwt7xWBZfgpXLDReqmtUHxl1h5ExGN8odD2U Jthg== X-Gm-Message-State: AOAM532i2ro3uAjPEoX2y/jo1UJBRS6g2n0n/8qdurscqq0ssHsZxNmn A6eJcgmjt4lVK0MFksNU5CU= X-Received: by 2002:aa7:8097:0:b029:3cd:b205:cfe9 with SMTP id v23-20020aa780970000b02903cdb205cfe9mr2377877pff.1.1630655833936; Fri, 03 Sep 2021 00:57:13 -0700 (PDT) Received: from ubt.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id u8sm5420534pgc.69.2021.09.03.00.57.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 00:57:13 -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 15:56:41 +0800 Message-Id: <20210903075641.2807623-1-zhang.lyra@gmail.com> X-Mailer: git-send-email 2.25.1 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 functionsi 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