Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1598229ybd; Sun, 23 Jun 2019 11:25:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxG2H4RC4+g7p7VeswjKYp/anT3WgEUZGzZmbcokjLak+sX9+h1R7rV5l2whQ4hjgov25wT X-Received: by 2002:a63:2326:: with SMTP id j38mr7236938pgj.134.1561314355317; Sun, 23 Jun 2019 11:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561314355; cv=none; d=google.com; s=arc-20160816; b=KPQ9imFla9qkf57geNfXQFTxkPkAQR0VCEtrlUDJnYiRtDeA5+N9qIQ87CE9iH1frJ h1ANnL317+jFs5VRZvhvQZJDHZ053vXDc1tkGAKdogKHWMcEU8s90YSjh26khRhvMPIQ uXPfCi5DH+L4pDJoWXn/sxvIjWPbUtfkUt/EtjZPzI4WyEfvZij0+4L3a0UOGEkzpp3f 52ohl7JMlWHqPJNTbgWZZKlNAvyFLiiNCsNtXpNTE/4A5P+936U07d3eN5nAhgFkuoUb TxZDUOx1FIdoZ7YFSIC7x5sMybMdI81uuT857WAm3HQVNbvQzWihFoZHH2iH/dC5qlMP WzuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=kAoDN3JXD+JZhMBJlglzDkAFlbLUDm6nxgTu8jCBDHc=; b=xgaFefo0f1VlHl98AVc4KusVnWg16e+OMZOVxQy3vfqeC3o4EyIBS7Fb0d5AfTuEQH xQOYtoN7PUv3jle/FcQcE9BPx5/qjNJRcAU9ZTlPrjuM51e74L6cnls/LgxVH1bI/1RS BDb0JuWncJYuwKqzF0wvhR9jD13NOd++mztfWAZcfTAhEASR/15abvVlO1zSK1GQYa7L cCJhfWpAzAGs6gh0ngXsALEffxEPA5OISK7h1essuh8sPzMBsAIkQ+t56iSaBhxPQ8sY 6Ou2aJK8E7NRkaKeVkcDnziuOYk2nSSCr9eQn15S8xotW9++xn4wIVHEIFHI80QYqWre pUVg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e1si8989125pfl.121.2019.06.23.11.25.29; Sun, 23 Jun 2019 11:25:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbfFWSZE (ORCPT + 99 others); Sun, 23 Jun 2019 14:25:04 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:43474 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfFWSZD (ORCPT ); Sun, 23 Jun 2019 14:25:03 -0400 Received: from localhost (unknown [IPv6:2601:601:9f80:35cd::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id B318A1263F1F8; Sun, 23 Jun 2019 11:25:02 -0700 (PDT) Date: Sun, 23 Jun 2019 11:25:02 -0700 (PDT) Message-Id: <20190623.112502.1981269479319700405.davem@davemloft.net> To: paul.burton@mips.com Cc: macro@linux-mips.org, netdev@vger.kernel.org, pburton@wavecomp.com, Sergey.Semin@t-platforms.ru, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] FDDI: defza: Include linux/io-64-nonatomic-lo-hi.h From: David Miller In-Reply-To: <20190620221224.27352-1-paul.burton@mips.com> References: <20190620221224.27352-1-paul.burton@mips.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sun, 23 Jun 2019 11:25:03 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Burton Date: Thu, 20 Jun 2019 22:13:58 +0000 > Currently arch/mips/include/asm/io.h provides 64b memory accessor > functions such as readq & writeq even on MIPS32 platforms where those > accessors cannot actually perform a 64b memory access. They instead > BUG(). This is unfortunate for drivers which either #ifdef on the > presence of these accessors, or can function with non-atomic > implementations of them found in either linux/io-64-nonatomic-lo-hi.h or > linux/io-64-nonatomic-hi-lo.h. As such we're preparing to remove the > definitions of these 64b accessor functions for MIPS32 kernels. > > In preparation for this, include linux/io-64-nonatomic-lo-hi.h in > defza.c in order to provide a non-atomic implementation of the > readq_relaxed & writeq_relaxed functions that are used by this code. In > practice this will have no runtime effect, since use of the 64b accessor > functions is conditional upon sizeof(unsigned long) == 8, ie. upon > CONFIG_64BIT=y. This means the calls to these non-atomic readq & writeq > implementations will be optimized out anyway, but we need their > definitions to keep the compiler happy. > > For 64bit kernels using this code this change should also have no effect > because asm/io.h will continue to provide the definitions of > readq_relaxed & writeq_relaxed, which linux/io-64-nonatomic-lo-hi.h > checks for before defining itself. > > Signed-off-by: Paul Burton ... > Maciej, David, if you'd be happy to provide an Ack so that I can take > this through the mips-next branch that would be great; that'll let me > apply it prior to the asm/io.h change. Acked-by: David S. Miller