Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1237771pxa; Thu, 20 Aug 2020 06:26:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX3tZ7nn26HO5/vnbtpJdb3SMS8HfxnCTMuwFoZXV0i/IdUPfnph6lGSC7U9Yju3sMCV4s X-Received: by 2002:a50:ccd1:: with SMTP id b17mr2816006edj.165.1597930006728; Thu, 20 Aug 2020 06:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597930006; cv=none; d=google.com; s=arc-20160816; b=Aq9Ncd1guLUgsl1zhX85N6eSYqnk2nzUg+t5jmEA/AXxDjAaBXA6hK1PvYwCnhaMX6 tk4qhgd/mayE3ZmXXtZcoqEMxFJHVeYMRqD/J7vtWSrfnjOiqEkE8XxEclgAmABjr7+x +FyaKBTprcFmz5u+DuSd6hXX3iIN2CYwD8TN/uX0qJeOW8+kh9Cu+kvilanKFUvB9XYU e50voCGp8RyT7r00h1SLjRvD6Zpv8Yl7SlB2AxMr3Rvia7IyFpk/u8QfDTOccTkTnuro nT5ruhgSZZuucDjunMLhk51nT0sSftzK0KTyQrN+sairZNzcpQP9Amn4If60842vXdfs 8a2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=H5UDUWkp3autsOIZffVr/0iMNgj11j7rbof1FWMTrDw=; b=Zkykpb1ATW3YY2j1iij3Vf1NNah8zRddOXYXXPvcr/XxAzYkkBvMefPnlURlOU3gn5 s3GtDpRt9w8QwqZT893v12oKhMyidGmCeGrj6GUyNRJ/TAKyEyEO2HvNEkmIkQLBtI/8 171uLtNzEsNifnJtd83i1j8bm781DI2fCeG1kisYUg07xoI8e3i2queZzGy16H0gKyqY A7/Z/mdW4R8wyxyYiw3kHzNz9MpudbaNy+f+dRnO00MsqR+e2G0baFK4QJRjvO+oFXJk tU+CpXOg1V9NxpreZP6ChapUfslEqXLWpEYsaHfvfCUXGacltZWvFZNkIeElMF41So2U uksw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VYNlzpyg; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g17si1972154edj.109.2020.08.20.06.26.22; Thu, 20 Aug 2020 06:26:46 -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=@kernel.org header.s=default header.b=VYNlzpyg; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728320AbgHTNXn (ORCPT + 99 others); Thu, 20 Aug 2020 09:23:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:45056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728435AbgHTJeL (ORCPT ); Thu, 20 Aug 2020 05:34:11 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7E2D122BEB; Thu, 20 Aug 2020 09:33:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597916031; bh=I8uEIPz1Akn5O5ubpZWgVp4PADz7yYhOyHoDeLbjUI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VYNlzpygUYhQQTeCJ7O2sNSq3XvEzU3dEqC0nebr36TYLvQ5qYsz+3jqQxqptqDTc Qa/QO3WZ8n5CjuY9hi6nItFYBUvoOZNLdKWqmjFroIHhhOa4zKBjSSPv2HsRnV9xg9 SRAGhPYbrLEBa8cLp7DM7jEAKErnFnLBJQXg2aJ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Geert Uytterhoeven , Rich Felker , Sasha Levin Subject: [PATCH 5.8 218/232] sh: landisk: Add missing initialization of sh_io_port_base Date: Thu, 20 Aug 2020 11:21:09 +0200 Message-Id: <20200820091623.350940963@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820091612.692383444@linuxfoundation.org> References: <20200820091612.692383444@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Geert Uytterhoeven [ Upstream commit 0c64a0dce51faa9c706fdf1f957d6f19878f4b81 ] The Landisk setup code maps the CF IDE area using ioremap_prot(), and passes the resulting virtual addresses to the pata_platform driver, disguising them as I/O port addresses. Hence the pata_platform driver translates them again using ioport_map(). As CONFIG_GENERIC_IOMAP=n, and CONFIG_HAS_IOPORT_MAP=y, the SuperH-specific mapping code in arch/sh/kernel/ioport.c translates I/O port addresses to virtual addresses by adding sh_io_port_base, which defaults to -1, thus breaking the assumption of an identity mapping. Fix this by setting sh_io_port_base to zero. Fixes: 37b7a97884ba64bf ("sh: machvec IO death.") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rich Felker Signed-off-by: Sasha Levin --- arch/sh/boards/mach-landisk/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/sh/boards/mach-landisk/setup.c b/arch/sh/boards/mach-landisk/setup.c index 16b4d8b0bb850..2c44b94f82fb2 100644 --- a/arch/sh/boards/mach-landisk/setup.c +++ b/arch/sh/boards/mach-landisk/setup.c @@ -82,6 +82,9 @@ device_initcall(landisk_devices_setup); static void __init landisk_setup(char **cmdline_p) { + /* I/O port identity mapping */ + __set_io_port_base(0); + /* LED ON */ __raw_writeb(__raw_readb(PA_LED) | 0x03, PA_LED); -- 2.25.1