Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp4073100pxb; Mon, 8 Feb 2021 07:19:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3HkmXcQ4K+VBfRXjlRlb+kGFEPUBzyAP60ZJHBw8/AQLKQLXYTvSr3LyUEryBImAjKwdx X-Received: by 2002:a2e:b1c6:: with SMTP id e6mr11721595lja.140.1612797541090; Mon, 08 Feb 2021 07:19:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612797541; cv=none; d=google.com; s=arc-20160816; b=0A4wDH33O8zeBkdFf7T+aTPyPVlRkmBWqVk1s9yaJLBhD94Ta2MekrnsP+qUDCoO5I 0O8NI9fup55U888DcMkYLdCbW93uLizi9SIPzCpVSl/q6Fnn65gv15QxaD05jblQI0OM o8+IK8r9pjRrq9RAMeC3Zous9YLjHHDYrzDXJRsW2TOpCRfBKhTrDTaygdXjSBF6dwWP UitMragDTryAIw0WokGn6Toaa6Brupfp/LlcwE7Yt7xfcCU3asQEdE7kaZW7dkX5xG+1 c1FEBI9J+jtB2DJwsPn3PKbd8X3HEHPlOlMFs0gS0HtJ6CCOku6LdvFgpMULNc4BtUj6 V2zw== 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=TU3KKEd7vvm2eMS0YRcGZDnfiv1guK2LkXOmyr8A7cMiks48CtMLM8h9Z2EYoGLAQA E6DSYggLUE8FWAw9onrje4PvydoAJE9cwViXySBtLP4eJb/wiY89hENFhHxDOf8SOiua EuN4WWx2De9d3sYUt1ADVJOXdjiKdqpznrINgyFVvuITsRu3cebAPpVxeBG/agMAkUBh Kdb0clxcJahnu9W2Qx7RZd7eLPW1s2IsLONpv1byvvyYzi+UCZDoUWSsyMFAGLegF2hp 7KfRYP204xB5zJ+bjRRpOiw006UXLCA7sx7bWsjMn4qD5uAxEglaf1YT/yGfJ0Gh7tUo r+kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zG5JwHYQ; 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 bx24si11323728ejb.98.2021.02.08.07.18.36; Mon, 08 Feb 2021 07:19:01 -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=zG5JwHYQ; 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 S232868AbhBHPRQ (ORCPT + 99 others); Mon, 8 Feb 2021 10:17:16 -0500 Received: from mail.kernel.org ([198.145.29.99]:52046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232871AbhBHPD5 (ORCPT ); Mon, 8 Feb 2021 10:03:57 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9999064EBE; Mon, 8 Feb 2021 15:02:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612796578; bh=1B5uALRLICfV9TWV/llmgG8y96SQqcS4IxY09JRtY3k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zG5JwHYQZdB5DtcxmPkYNzVRTDrzzrYl52w06dGmSA8xWtidKNXKNfRrVdF/sx0US GYwmMYw9QAmcKU7/Mn7F20zlKegbirVFxzZyI/kcuYt3WepnFTlfKzye8unrORRs+N mFaZqMMZFNtqzpzAyydyGO/mxuuhxK17uhabj0ZI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Russell King Subject: [PATCH 4.4 30/38] ARM: footbridge: fix dc21285 PCI configuration accessors Date: Mon, 8 Feb 2021 16:00:52 +0100 Message-Id: <20210208145806.452501763@linuxfoundation.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210208145805.279815326@linuxfoundation.org> References: <20210208145805.279815326@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;