Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp490547ybi; Fri, 21 Jun 2019 03:10:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5hOWV0ZCCf5tyMZZMwTpPrw1WS2PUOxNmjMsNxLPvCZGMFmAYfjeyhc7+Wnhkn24yQfWq X-Received: by 2002:a17:902:44f:: with SMTP id 73mr73069176ple.192.1561111801534; Fri, 21 Jun 2019 03:10:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561111801; cv=none; d=google.com; s=arc-20160816; b=pAA9fOdyMKV1S+1Nz0E+OEKzojj4tOo8JvS8EpwF9EHQD6o9oaFRfUz5AyG9Lh0sCs 49pcNQJkDtsH87X/n4hfQXv4rVI6CUuH8oWBZZD79fH1kxqR8gOl67fxoPdenTXRSUxl eI2AK2EB1MjDjhXPkKSGWhcm1kLqkmvVoo65S3+SyqNZ0wqZ4HSRolyB14xUjjsQs1Oz GQbY1K2Gi6nzsroLw7rbXBeII5Ow/WV8ywSlalzNCAWc45BgTY+qZ611E68DGXVyKBF3 3npCbKUy/cOr7DPo4dA6TtJBUmKHH34PYOsle8/5hgHM6wL0Uypq+EGsXU8Gjk+QjeqU 4J9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=uVwgl9UVADEe5+Ucrm5qMVFmngpsd1ueCkGvNhrEkuE=; b=fio8ZbBAxGRLkz3bMKznKoM25vaD5j3q8X+NF/Iw2KA+iJ7N7kzxMnBXoSxXGK2/3L 9096unu6DPH9SvYj65akRb2vli7P7JFmLOKpPP6ZQ1kforFDuW0xGuRMapfz1Sq+9txq 6KL05hjXBj4ERDppKMamR5mXHoFktY9tWB9J6UeURdurQ8/S9EVFzpOYcdUP1gNMbBNu zI7dWB/nJWaTRwoIY6fa75hBXhEMpwozP8+EgIk8Wzqwm7sG7C/BfmZC87Ac50DWr1VP ZmcOVyPm5XeW3547HMIKf2QIf8XEtsI4ko2tJQt5En+Up1vk++QnozC3iXAxdlDxc18T c1yA== 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 t1si2503883pfl.158.2019.06.21.03.09.46; Fri, 21 Jun 2019 03:10:01 -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 S1726776AbfFUKJH (ORCPT + 99 others); Fri, 21 Jun 2019 06:09:07 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:56132 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726759AbfFUKJG (ORCPT ); Fri, 21 Jun 2019 06:09:06 -0400 Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23994550AbfFUKJDD0AoN (ORCPT + 1 other); Fri, 21 Jun 2019 12:09:03 +0200 Date: Fri, 21 Jun 2019 11:09:03 +0100 (BST) From: "Maciej W. Rozycki" To: Arnd Bergmann cc: Paul Burton , Serge Semin , Ralf Baechle , James Hogan , Serge Semin , "Vadim V . Vlasov" , "linux-mips@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] mips: Remove q-accessors from non-64bit platforms In-Reply-To: Message-ID: References: <20190614063341.1672-1-fancer.lancer@gmail.com> <20190620174002.tgayzon7dc5d57fh@pburton-laptop> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 21 Jun 2019, Arnd Bergmann wrote: > > The use of 64-bit operations to access option's packet memory, which is > > true SRAM, i.e. no side effects, is to improve throughput only and there's > > no need for atomicity here nor also any kind of barriers, except at the > > conclusion. Splitting 64-bit accesses into 32-bit halves in software > > would not be a functional error here. > > The other property of packet memory and similar things is that you > basically want memcpy()-behavior with no byteswaps. This is one > of the few cases in which __raw_readq() is actually the right accessor > in (mostly) portable code. Correct, but we're missing an `__raw_readq_relaxed', etc. interface and having additional barriers applied on every access would hit performance very badly; in fact even the barriers `*_relaxed' accessors imply would best be removed in this use (which is why defza.c uses `readw_o' vs `readw_u', etc. internally), but after all the struggles over the years for weakly ordered internal APIs x86 people are so averse to I'm not sure if I want to start another one. We can get away with `readq_relaxed' in this use though as all the systems this device can be used with are little-endian as is TURBOchannel, so no byte-swapping will ever actually occur. Maciej