Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4135228pxb; Mon, 8 Feb 2021 08:44:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxsLJSva0Fb77RRfpRP9ZCuMgBMmR0DDQXDnLSfgKgPLaPWTW+75I/ibOoOJd2xzf1dJ2ld X-Received: by 2002:aa7:ce15:: with SMTP id d21mr18431076edv.246.1612802677227; Mon, 08 Feb 2021 08:44:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612802677; cv=none; d=google.com; s=arc-20160816; b=T5NsM6aeARxPCOLUUqa6ZC10H2iU1/ldlMATxmp6Wc6bEmfzOP3Iar0fEz3yX+nRBS PKmvCyw+TTpEg7c7uDPkXTtfOFW4Sig2Bq6sgvtYJ5MHF1pPOv4GTRXTVauEC3/5JeFJ Fm5ZBRNJgMod/ppP9QJEbqZjCBIeVlk5LnKQq/7rFYPmp6S7NKLuQw505hepU/iTlNaM LxwivuYiOeFyfClM2/+EAmvrg8IwPw6LrqD5yEwRCWgJKmVLQK5yXkHpbi5tuuBzqSql VKpe1XIcgf6nkBy0ZY/mxW08SfHnUoGOYdvvEFpFnP2Ztv2KPJZo+l1bZ7I7MfqyC4Qv mp7w== 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=0k+QvAjIYVku7XM38LVZZDL2asuHBuR/8kGDKUp6JN0=; b=CKehj+UByhFIQdr+Vj9hf+D4G1qiQodgOiaqRmm1oqjIJ6bDrfTdd+xoNfAUJ+wUbJ 3j7syxdpENqvEYH7hLjBUMpcf4xO4mQSK2a1AsCrcKpbvDUoxNKDQvruFR0J9/B4+n9P lp6p5yDDQtIcx6fPiegZq0LKA+Azs07Waa2r0GR7IW/y4roqB5uuNJF3RPpTjOmywhg0 x6yX8Up1imFpfZv0AXYKP2S7wRksRULfYIwe7MS7mxjx494decaA9+PL2wHkbMrAh99H sNehT6c/VE15bBEb/yNgErsnc92/kk7wVHuaKS+eCZU6eE45jigyexx/muyGFE/YTmmg /T7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sWeq49Ff; 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 x2si11283117ejn.747.2021.02.08.08.44.11; Mon, 08 Feb 2021 08:44:37 -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=sWeq49Ff; 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 S234578AbhBHQm4 (ORCPT + 99 others); Mon, 8 Feb 2021 11:42:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:56852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233528AbhBHPPF (ORCPT ); Mon, 8 Feb 2021 10:15:05 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 97A1C64ED2; Mon, 8 Feb 2021 15:11:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612797071; bh=BgBOIb6gf0TxXbt/KLw9wsSu+uUcH0cIKELf7exbx+E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sWeq49FfAzYb/kbZnf29UHZjbK6ZKeL2NHneffL+Rzyj4jm1QSW3/egoUXqkM1GQY 8YRG3AFqpYugd8DlrPAAvWibGxHCkwzCDcUrRfaLWxE9oMFEoX1Um9xiL4rCVLOEQK mssl+eFpMBlUN6v2AdRYmaUnTqsWzqO9nLVspkIg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King Subject: [PATCH 5.4 47/65] ARM: footbridge: fix dc21285 PCI configuration accessors Date: Mon, 8 Feb 2021 16:01:19 +0100 Message-Id: <20210208145812.038233678@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145810.230485165@linuxfoundation.org> References: <20210208145810.230485165@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 @@ -66,15 +66,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; } @@ -100,17 +100,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;