From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 705F6C433FF for ; Wed, 7 Aug 2019 10:41:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4469F21E70 for ; Wed, 7 Aug 2019 10:41:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rFbK0KQo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4469F21E70 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mrSWkv3sxDOYDx5gYUQDUuvtgY3h1JqbcJDPXq+FnSs=; b=rFbK0KQoFWbnt2 hx5yHYFhslZSeLiFsJZwBGOyNuAjqoxrhkpvjDRO4WBYvkjOE34eeJZHQ/mk36VnPmyDzSoGiOyV/ 9iwtcf/Bwar2BGMJdwHhJD7kWDouWvzOfpS4UG34JzAeW5XToyjCXLUyvDK3KDvjgunw8f43suYir 5cugGsyn1mVXYSeZEeDyVS9NYgulX/38icwwOTf2YjC/DsPTMOCNG/mmdy09ukSSWL2pVp3rHAoRz XGw7qQTBuW82xXJYWW/nXLf8cP/xVwEiozp4H3a3VB3ByAOoSD7Xf5u7rQ5y5J90gjgZP+uefqVVp oaLgMdAqYMBo5cpcw8+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvJNS-0006tf-Lf; Wed, 07 Aug 2019 10:41:06 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hvJNQ-0006tJ-Sh; Wed, 07 Aug 2019 10:41:04 +0000 Date: Wed, 7 Aug 2019 03:41:04 -0700 From: Christoph Hellwig To: "Koenig, Christian" Subject: Re: [PATCH] drm/amdgpu: replace readq/writeq with atomic64 operations Message-ID: <20190807104104.GA18773@infradead.org> References: <20190807025640.682-1-tao.zhou1@amd.com> <20190807070834.GA24792@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-arm-kernel@lists.infradead.org" , "kernel-build-reports@lists.linaro.org" , "Zhou1, Tao" , "amd-gfx@lists.freedesktop.org" , Christoph Hellwig , "broonie@kernel.org" , "linux-next@vger.kernel.org" , "Deucher, Alexander" , "akpm@linux-foundation.org" , "Li, Dennis" , "Zhang, Hawking" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Aug 07, 2019 at 08:53:25AM +0000, Koenig, Christian wrote: > Am 07.08.19 um 09:08 schrieb Christoph Hellwig: > > On Wed, Aug 07, 2019 at 10:56:40AM +0800, Tao Zhou wrote: > >> readq/writeq are not supported on all architectures > > NAK. You must not use atomic_* on __iomem (MMIO) memory. > > Well then what's the right thing to do here? > > Essentially writeq/readq doesn't seems to be available on all > architectures either. writeq/readq are provided whenever the CPU actually supports 64-bit atomic loads and stores. If it doesn't provide them atomic64* is not going to be atomic vs the I/O device either. And that is on top of the fact that for various architectures you can't simply use plain loads and stores on MMIO memory to start with, which is why we have the special accessors and the __iomem annotation. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel