Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4123727pxb; Mon, 8 Feb 2021 08:29:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTWpftBcDw4HMZmc938R44WntynVBaCQX/gFHJ/j9/1umkX/RtVuG4AE/NCl/uNIxW9CG5 X-Received: by 2002:a17:906:3899:: with SMTP id q25mr17623635ejd.173.1612801791095; Mon, 08 Feb 2021 08:29:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612801791; cv=none; d=google.com; s=arc-20160816; b=L8XwVUOiWslEiyZMlF0PT8v11juzMsgNZGBTUsquVclB9kKjYOudYgIXiPLwniG5wf pAGrcJzf5hz/qPcu9wKbdhJRBA06UK9tHLsZOZtBNCVAySNvaJb/uEr+oEdYE3gmzAQ5 Lb+g/jRR951HI4anaWu7bQGnl7ENxJv15qihUHZvM0/ZFCGCkZGQMBxi7AOPSnwsMqlq qIuHv7b2n4SJs8V/fCb0LYxCIzt2pEqQwRcc2BAdvgEjX1DYuYRjjX0jtCA+MQeIAJy8 90MJI9NCqRSoUWbbuPrpyQhx+hS/x0KJXIcGPjq5KWmMrFQVJAA5O4AVeI69zisuKmqt BDPA== 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=RQ/0ybpQro4k4z2ob4jkLryDIpLR3QoISXVyuDaOluM=; b=SGuxrkilIUFgq444LgMglBgfSHu8/RJXjIg6wjYoQ5d55J5bJGCI7+wLnr0hWcyvI+ zJFxuzAfzeBKAEnJtngXjDcE5hfU+YDD0n46SH1vnqmDKGfFMu1XZf/cMONMyrj/Gs4d GedcbjqwEnfs1UjqUxirjdEG61vb520FN+Cdg6AztQ86Ug4GHMJPNMIHnkKrTdy/s30o MvxxgsDQQfk0LB7vpCuJ4wJBkG2TO9+86FfnMAn40EXL28ymORkinTdqObmX2kmxF2s6 TdjaPsUfsgDvKTZslkhZGeLRGYx7wZvr8YOWI5fOjaOCwwGjJ6vCm+TpVbc2DUzZEIsT 398w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zeeZpQx1; 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 k13si11486907eds.28.2021.02.08.08.29.26; Mon, 08 Feb 2021 08:29:51 -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=zeeZpQx1; 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 S234392AbhBHQ1l (ORCPT + 99 others); Mon, 8 Feb 2021 11:27:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:55544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232133AbhBHPLJ (ORCPT ); Mon, 8 Feb 2021 10:11:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6EEC364E84; Mon, 8 Feb 2021 15:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612796895; bh=1B5uALRLICfV9TWV/llmgG8y96SQqcS4IxY09JRtY3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zeeZpQx1BWRyCZCNGItbxqPIqQUhxaLwe13RjNrOyIOgQ1nhJwY/dZKv6n6qYfw2B s3aDx+DA+C7XzhV2OlQYAZ3RISrETIAe/yKV9Ryn0d6oQIxpUgU5XZASEQfrUPre+E diklQknDGz1GslUdcub4tYRuRtSRFmZkVzHmd8Wo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King Subject: [PATCH 4.19 26/38] ARM: footbridge: fix dc21285 PCI configuration accessors Date: Mon, 8 Feb 2021 16:01:13 +0100 Message-Id: <20210208145807.214320861@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145806.141056364@linuxfoundation.org> References: <20210208145806.141056364@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 @@ -69,15 +69,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; } @@ -103,17 +103,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;