From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965375AbbGVOqM (ORCPT ); Wed, 22 Jul 2015 10:46:12 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:41325 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965347AbbGVOqK (ORCPT ); Wed, 22 Jul 2015 10:46:10 -0400 Message-ID: <55AFACAF.7020004@free.fr> Date: Wed, 22 Jul 2015 16:46:07 +0200 From: Mason User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1 MIME-Version: 1.0 To: Linux ARM CC: LKML Subject: Write to memory-mapped register has actually reached the device Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello everyone, I'm using an ARMv7 platform (Cortex A9). The hardware designer said something that confused me: he said that when a driver writes to a device memory-mapped register, there is no way to "know" when the write has actually reached the device, other than to read the value back. I had been using this kind of code: static void __iomem *device_base; device_base = ioremap(DEVICE_ADDR, RANGE); writel_relaxed(val, device_base + N); The situation where he said this would bite me is: write to a device register to clear an interrupt notification unmask interrupts The interrupt might fire because the interrupt bit has not been cleared yet. Does that make any sense? Should I use writel instead of writel_relaxed in that situation? Do I really have to read-after-write? Regards.