Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4092627pxb; Mon, 8 Feb 2021 07:47:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuk230sJ5heEaWkTjkkB7EMSyCdmuksqYJo+AQqCHZEcs0QTNqJXYI+5HEP4s+S+pPr3zw X-Received: by 2002:a05:6402:19bd:: with SMTP id o29mr17533424edz.161.1612799227715; Mon, 08 Feb 2021 07:47:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612799227; cv=none; d=google.com; s=arc-20160816; b=zvwWvpOPdLvZVsDZSrDFIwcsYPjhgPB9r5P7jqK3pIDb0X8p2ZSv9lsXTfcwTYcSOY 7i6QeYG0xcylthf6Qa7V2mbVfzkLnA5Lk+2xS9+4VDpFzOMpXf7jFrP3y9weIZ0CCIog n24g324ufxOlgT2QzJrejMdPCARoOOv7uvlJOkZyR1s9tSXEKN6dXMqCAKUKCEkIQUsV nmeM8KxAi/NSDvf0HQ/XTBC/I03Y2s74iysWyCC9sR53S5+juwJDPJC3tPQvL1uEKMeA 655/eCgIvECVBOWcbCzjWWRn+a9jvj3xHqdyBPzyu7EJwn4+e2WcXc52rkNIVkKlPiza KmMg== 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=PsDDn/LwAC3RS4z7Z4vExwJus+vXAnS1bH/fejdGCiflgRLaX2kYpqjHNq6+60U4Pl TzdHRkfbHPUk8wBUrkHdEvy2dy/gQ8PveruroQ8mFI5eBKyjqZ0WpQYJNmBPk1cehN2E GDkyOH8Dq4LXGLlxNY3MNOtxNc1vTy5Uw8zviHfYVJs0MEHQh53iSHY5fgdUhWMMTd62 UGuiV3A9wfr3rLMpvdnahZj0SkR35dZK/ZxeVdYyc2EfcBkYsrIRZ6OQ7ENcE0WsAzCe mbxEYFiiOoF/Nw4b3EoYg81DQiHlGPQQSIynJsMQ3h3zh5CVgiW4KYC0NJGDpGE3MjlY EzsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YrrgivUD; 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 jz15si11422863ejb.290.2021.02.08.07.46.43; Mon, 08 Feb 2021 07:47:07 -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=YrrgivUD; 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 S234139AbhBHPqL (ORCPT + 99 others); Mon, 8 Feb 2021 10:46:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:51776 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232774AbhBHPG3 (ORCPT ); Mon, 8 Feb 2021 10:06:29 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5D94E64E8A; Mon, 8 Feb 2021 15:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612796698; bh=1B5uALRLICfV9TWV/llmgG8y96SQqcS4IxY09JRtY3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YrrgivUDUfzwjeyE40CiBT7hgeeMYoNSI+YkNs3Du6UU7yaN0RQfVdkJp475cDZ5t 0atb1jRrCcC6Z6GBlAFoh2sxLZFWkBhnK2OGBKDSET1FjJOjS2bUGN+pSoPjH3lGN1 guo77AS+c8a78xFsNHfmP89sFQFYjhg1D2DoHAe0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King Subject: [PATCH 4.9 33/43] ARM: footbridge: fix dc21285 PCI configuration accessors Date: Mon, 8 Feb 2021 16:00:59 +0100 Message-Id: <20210208145807.655853093@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145806.281758651@linuxfoundation.org> References: <20210208145806.281758651@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;