Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4176117pxb; Mon, 8 Feb 2021 09:39:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzs9YzeemCEr6cbFtKdNLO9sJHm+41QOoXpR6GiWJ0hO8ADS8qvl75AmBUqXhlqx2nrTilU X-Received: by 2002:a2e:b949:: with SMTP id 9mr11762922ljs.384.1612805978887; Mon, 08 Feb 2021 09:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612805978; cv=none; d=google.com; s=arc-20160816; b=SObKae6dDe0c4VeDVtSHO8b5J+Lt7U2hH4PomPU2sW4I/pN4Ja4lBWQg0h+24BHbKg sFVW9TuvASexOA6zMIvjTk+cEHVPzFCkG+rmCUx2KDf/cXMAp02pn5SpdWGGNe3+FxMF ILhKtb6TAun10on1ACVnUASco+faoLKMqnFlW3xEQj6zb035MEU8rywr2qj7loT3WGsP 5vGc5//ucY/jmbqDGtvLr2t4U+56AppJEno8S/iy4AfGM9TEN7xxO3MayzM3CdeTm2Br 4CZ1VhzNE1LEexDIuXYU8Ju/jn7htzUl9buR0NUoJFIshJZwKFuBO80hTAwcmZZIDI90 12BQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2hiKgKot05MHnnQwwNgfF/0mO05MLNP6FC6dlmrJ3g8=; b=FoIiSc4h/f7zbY1nxMoWXJYXltnTN/KnXwGspBC09+nBj11oteAcf9WVDAlYcB285m WApXGykDoTprHetlod/SxRbS4h5VnJ6PYU5EmTdfjCfvAbhlkXA7s/e7lWwZyDezZ4Hk TnsTYq+6vbBkWuVWSBTc0bH9GAMe7ipnC/MKU7NmkkYgPjOrb0W4mU2hyyY0501D5Z7c nWfO+K5SVpLbwUeZkTwhcRWtx85n3yhfw8trhKcCysnIuixX/B+YqUGFnrz5I8W2hlGm F6IlkD7qRCKEDTmBimTBJn5Ew8tC4KIqGa3Jrg/U0XAIPWadf8LPlWvsmVRA0N/ZNVJq /jFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jy+Pr4+1; 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=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 k13si11531882eds.28.2021.02.08.09.39.13; Mon, 08 Feb 2021 09:39:38 -0800 (PST) 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=@linuxfoundation.org header.s=korg header.b=jy+Pr4+1; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234938AbhBHRgZ (ORCPT + 99 others); Mon, 8 Feb 2021 12:36:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:36580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233747AbhBHPaA (ORCPT ); Mon, 8 Feb 2021 10:30:00 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B4A8164ECF; Mon, 8 Feb 2021 15:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797419; bh=cs2i0zQJo6kJaYFXcsC58TeKtkSQPupNvIV5ikM+cRM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jy+Pr4+1NJsypMTZeaSV5IGj7mC0lyfiyMnHL/Yp8Qeqc3AuOjibf0gFfiRiX4MQ1 YiDRFEZIrenPhBqptnMhWt3s+sDXMt+FVsS2vJOMIWOxnK7GBdXo8GqLm6Zl78KsJr v40PC8pNKj+X+GS2iZOH8MyCFiA+ALiWi3wYeySY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King Subject: [PATCH 5.10 096/120] ARM: footbridge: fix dc21285 PCI configuration accessors Date: Mon, 8 Feb 2021 16:01:23 +0100 Message-Id: <20210208145822.213842637@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145818.395353822@linuxfoundation.org> References: <20210208145818.395353822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Russell King commit 39d3454c3513840eb123b3913fda6903e45ce671 upstream. Building with gcc 4.9.2 reveals a latent bug in the PCI accessors for Footbridge platforms, which causes a fatal alignment fault while accessing IO memory. Fix this by making the assembly volatile. Cc: stable@vger.kernel.org Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-footbridge/dc21285.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/arch/arm/mach-footbridge/dc21285.c +++ b/arch/arm/mach-footbridge/dc21285.c @@ -65,15 +65,15 @@ dc21285_read_config(struct pci_bus *bus, if (addr) switch (size) { case 1: - asm("ldrb %0, [%1, %2]" + asm volatile("ldrb %0, [%1, %2]" : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; case 2: - asm("ldrh %0, [%1, %2]" + asm volatile("ldrh %0, [%1, %2]" : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; case 4: - asm("ldr %0, [%1, %2]" + asm volatile("ldr %0, [%1, %2]" : "=r" (v) : "r" (addr), "r" (where) : "cc"); break; } @@ -99,17 +99,17 @@ dc21285_write_config(struct pci_bus *bus if (addr) switch (size) { case 1: - asm("strb %0, [%1, %2]" + asm volatile("strb %0, [%1, %2]" : : "r" (value), "r" (addr), "r" (where) : "cc"); break; case 2: - asm("strh %0, [%1, %2]" + asm volatile("strh %0, [%1, %2]" : : "r" (value), "r" (addr), "r" (where) : "cc"); break; case 4: - asm("str %0, [%1, %2]" + asm volatile("str %0, [%1, %2]" : : "r" (value), "r" (addr), "r" (where) : "cc"); break;