Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp626858ybl; Fri, 24 Jan 2020 06:41:14 -0800 (PST) X-Google-Smtp-Source: APXvYqwFjV1qGJADr3T+x+lfGRTEzi5fD3pWY2Pumx+Cnkf+BgZGbOWyAQy2Q3lQTxYt5kOGaCcQ X-Received: by 2002:aca:3542:: with SMTP id c63mr2244845oia.135.1579876873914; Fri, 24 Jan 2020 06:41:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579876873; cv=none; d=google.com; s=arc-20160816; b=TDi5rCVHgDEG7vVbjsVRlUyLU+g0UyoSXEvdQKr5bsPk3z4ynuN0gO2uJqQYflu4sP rtz2P8sQRIWcdZ9kJbfoqEILZl6gBCY+V5DRMoq06+KWAfk4GnbQoi7NuD4K/uEoemB4 xRIRNnuxy2rZWtS4UavfJKfumQocBc7ofQzbx9tf5kxxp0bo+FO3Sgy+kUeXkMBVCZ0j Y3nG4lF2DYxLpRnvsNyseyGAps2+TfEfSXQyMqIp9ZFuW1WfadyVqTu5dLGYF/RpZcpo OsJguCgzy8oyWZqGMfda2TU0ji6QChX8KUfwx/fQZB1ZsLYCho2j9w49vRBAMmzKJ7zo b4Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ZmHd73s4eZDvsQ78jGTzv8SffmF3llhCtsZCgAfX7pQ=; b=fLiAIu1ylqyBR3cnWYxMHRtzBGmEjn+qQ+P/9+4rgCKnfmJzFDEjuF43FTuL08LCb6 rMbHQI+6M6Lz5wO985KT1fD9lbfwc4b5NmmX1134nwC/hQ34IOZgNO9CJ9dnTRDskzGm kWRtXeMrHJUHp6M267b/3+KnNzZek08gNn1GZaSE19QdwGkIsEWO2G/qKsNOZDGRvFNd gv1AusIoZU5NKo5NJak5w7JR+i09RKl5tvgzjGIPQ0ZQLfDZ3LyDXpMtnkiQKxYXtNj+ hp8TxCm3WooRvY/wmstaIQE2COmc4DQldIlsVR2unHsVKov53E2a8SrCVvDi0awADMps ftag== 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 d14si2976425otp.151.2020.01.24.06.41.01; Fri, 24 Jan 2020 06:41:13 -0800 (PST) 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 S2392479AbgAXOYo (ORCPT + 99 others); Fri, 24 Jan 2020 09:24:44 -0500 Received: from elvis.franken.de ([193.175.24.41]:59877 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389799AbgAXOYm (ORCPT ); Fri, 24 Jan 2020 09:24:42 -0500 X-Greylist: delayed 980 seconds by postgrey-1.27 at vger.kernel.org; Fri, 24 Jan 2020 09:24:41 EST Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1iuzdC-0003XT-00; Fri, 24 Jan 2020 15:08:18 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id 454FCC0784; Fri, 24 Jan 2020 15:07:51 +0100 (CET) Date: Fri, 24 Jan 2020 15:07:51 +0100 From: Thomas Bogendoerfer To: Paul Burton Cc: Jiaxun Yang , linux-mips@vger.kernel.org, chenhc@lemote.com, paul.burton@mips.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] MIPS: Introduce aligned IO memory operations Message-ID: <20200124140751.GA17030@alpha.franken.de> References: <20200114122343.163685-1-jiaxun.yang@flygoat.com> <20200122184506.7zbzetn5xturxamj@pburton-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200122184506.7zbzetn5xturxamj@pburton-laptop> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 22, 2020 at 10:45:06AM -0800, Paul Burton wrote: > Hi Jiaxun, > > On Tue, Jan 14, 2020 at 08:23:43PM +0800, Jiaxun Yang wrote: > > Some platforms, such as Loongson64 or QEMU/KVM, don't support unaligned > > instructions like lwl or lwr in IO memory access. However, our current > > IO memcpy/memset is wired to the generic implementation, which leads > > to a fatal result. > > Hmm, I wonder if we should just do this unconditionally on all systems. > I can't think of a reason it'd ever be a good idea to use lwl/lwr on an > MMIO device. Any thoughts on that? depends on the type of device. I can see benefits for framebuffers and memory devices since memset/memcpy are more optimised than the function in this patch. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]