Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2745350ybc; Wed, 13 Nov 2019 21:09:41 -0800 (PST) X-Google-Smtp-Source: APXvYqyc5fo2hG3e2uL9bo9tZ+E8cWgCPAgoG+O3h3suf/klvqjahEeKyksbDss9mWq2NA3YBEGL X-Received: by 2002:aa7:d299:: with SMTP id w25mr8089276edq.14.1573708180924; Wed, 13 Nov 2019 21:09:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573708180; cv=none; d=google.com; s=arc-20160816; b=vOm2eyM5/6XMGWNTIXHjd7GqLO2yl9/6s8PJVLPWWMRm25Z0++jj5SB5t4L5huL81z +3WBWzOHW2Qxu5/EJxMvwJCp5OCpwz0L/i0x2SOH+qk24vibrJChaMyOVNexlG2jL7R9 P7sigJc8L04kNE/21cZwuUHvGFJll2XEP5l9AgIwU8gaPpOlsOy6AzGOIO724B0qyK+b aPXMsu1km8BYKUFF+qWnKt7w7yay7okeZSFThna21eU8xsubdJ32zpG2W89iDCQS73+q /AEmiqw3HyJPmvL9Oau7nUrlvugt2/R1JC1sHplyqX0du36XANauvcqyxfN3ij2Lp3ce IJOA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=PRX69pRBpM1hM+WLWhUXuNzdnWs+iB4J8vWp+VAaNf0=; b=Hl27RvuiXeENzEWZTd5taa/5jvPxKFuU4gYfB49cT33U4kXT9cVWCaLBTQqHBORVwi 5ObLc0fWFWoNHppaRGLMPJlQKyy8Zsf9/23kPec2UwTDwcgBZVr10llfPjg3Z4baGAz5 C06SMcCPtJ6eUb+Voq2+O4OLnWEcqkp2WyK3KLFCm4ntWR6JVE59yeZmYM8e31QgLLOH 1vK62qMoI3P5fLWnCPHdjkwOUrID2L0eoR8ioP/l02HUVTkZ58eYSCHKFCAlqk8dhdXw MN/jSj18bblu2QnlUq1g27AlFlYg9hxaEmzvkV3zQ82olvroZu9Q+L6TnSV3JdnR6UWZ sLrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oP2extHT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c36si3095250edb.58.2019.11.13.21.09.16; Wed, 13 Nov 2019 21:09:40 -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; dkim=pass header.i=@kernel.org header.s=default header.b=oP2extHT; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725977AbfKNFIb (ORCPT + 99 others); Thu, 14 Nov 2019 00:08:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:43244 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725440AbfKNFIb (ORCPT ); Thu, 14 Nov 2019 00:08:31 -0500 Received: from [192.168.1.20] (cpe-24-28-70-126.austin.res.rr.com [24.28.70.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C49F1205C9; Thu, 14 Nov 2019 05:08:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573708110; bh=bwDoBs1Gl7X6kr+VvLWmGBoPwoIr2qMGBpkJq35K1x0=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=oP2extHTQUlymGuKHYc5HIla8CRurumrsbn+oG0uNtHazxGpSd3Oak/5IYj6pOQdX KGU6zsBBp82kB2G9cquR+DjnYRoOSwG54tzqCaNhuzcg9lbIOID2FB1PfnKDHSKsP2 1wcjKT4GVc9de18GzwVY2KFn6AM6YhbBiGc6Z8tM= Subject: Re: [PATCH v4 04/47] soc: fsl: qe: introduce qe_io{read,write}* wrappers To: Rasmus Villemoes Cc: Qiang Zhao , Li Yang , Christophe Leroy , Scott Wood , linuxppc-dev@lists.ozlabs.org, lkml , linux-arm-kernel References: <20191108130123.6839-1-linux@rasmusvillemoes.dk> <20191108130123.6839-5-linux@rasmusvillemoes.dk> From: Timur Tabi Message-ID: <38d87cf8-5945-61d7-80a7-c8374cbe729b@kernel.org> Date: Wed, 13 Nov 2019 23:08:28 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/12/19 1:14 AM, Rasmus Villemoes wrote: > but that's because readl and writel by definition work on little-endian > registers. I.e., on a BE platform, the readl and writel implementation > must themselves contain a swab, so the above would end up doing two > swabs on a BE platform. Do you know whether the compiler optimizes-out the double swab? > (On PPC, there's a separate definition of mmio_read32be, namely > writel_be, which in turn does a out_be32, so on PPC that doesn't > actually end up doing two swabs). > > So ioread32be etc. have well-defined semantics: access a big-endian > register and return the result in native endianness. It seems weird that there aren't any cross-arch lightweight endian-specific I/O accessors.