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.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 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 97A3FC76188 for ; Tue, 16 Jul 2019 06:32:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6CCDA20880 for ; Tue, 16 Jul 2019 06:32:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730028AbfGPGcJ (ORCPT ); Tue, 16 Jul 2019 02:32:09 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:56979 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729995AbfGPGcJ (ORCPT ); Tue, 16 Jul 2019 02:32:09 -0400 Received: from windsurf (alyon-656-1-672-152.w92-137.abo.wanadoo.fr [92.137.69.152]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id C292024000A; Tue, 16 Jul 2019 06:32:05 +0000 (UTC) Date: Tue, 16 Jul 2019 08:32:04 +0200 From: Thomas Petazzoni To: Russell King - ARM Linux admin Cc: Grzegorz Jaszczyk , lorenzo.pieralisi@arm.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mw@semihalf.com Subject: Re: [PATCH] PCI: aardvark: fix big endian support Message-ID: <20190716083204.375afc1e@windsurf> In-Reply-To: <20190715151016.6amymuikizmmmsph@shell.armlinux.org.uk> References: <1563200122-8323-1-git-send-email-jaz@semihalf.com> <20190715170840.326acd73@windsurf> <20190715151016.6amymuikizmmmsph@shell.armlinux.org.uk> Organization: Bootlin X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org Hello, On Mon, 15 Jul 2019 16:10:16 +0100 Russell King - ARM Linux admin wrote: > > Also, the advk_pci_bridge_emul_pcie_conf_read() and > > advk_pci_bridge_emul_pcie_conf_write() return values that are in the > > CPU endianness. > > > > Am I missing something ? > > Getting the types correct and then using Sparse to validate the code > will help to identify issues exactly like this. Yes, I absolutely agree with your recommendation on the other thread. In fact, I am wondering if it really makes sense to store the "fake" config space in LE, since anyway the read/write accessors should return values in the CPU endianness. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com 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_2 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 99B1CC76188 for ; Tue, 16 Jul 2019 06:32:20 +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 6E3C421738 for ; Tue, 16 Jul 2019 06:32:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DuwX40Av" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6E3C421738 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com 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:MIME-Version:References:In-Reply-To: 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=WK9tV85N5rRc0ydIuuN6GtML7dzKIuJ9Voy6AeuN0cQ=; b=DuwX40AvzN9Y2X WJvp4yyOmt4mDLpgpSKUFdCEt6wMMkjDzC6KC8pOmsWQU6FwqVCESTiATOtoZO8OPt+FdEYBZhbY7 qJdfoEh+wj5NM7j9h2wurCv/Wl6OkLG52qRk8c2gpaNkC3mfdgnqrcC0koq5cpdZuOgE1FXNMDQtg Dy3taovas7FmoXAvkTxtF8bx+Q/icd0d7zyVAWxTwEVN4a0srBdNmXN6alI8X879UbYMU/atwT0mE ESYae3Ygev8u5PKlAfB8kHoI03IeyNQ2+xjot8paJUPjUTyJ+hwuKV7eeII0gRjrCf4p+XtRleK7C EbcktYxfJB8ASxbWiyZQ==; 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 1hnH0c-0005KB-FA; Tue, 16 Jul 2019 06:32:18 +0000 Received: from relay10.mail.gandi.net ([217.70.178.230]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hnH0Y-0005JU-Kk for linux-arm-kernel@lists.infradead.org; Tue, 16 Jul 2019 06:32:16 +0000 Received: from windsurf (alyon-656-1-672-152.w92-137.abo.wanadoo.fr [92.137.69.152]) (Authenticated sender: thomas.petazzoni@bootlin.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id C292024000A; Tue, 16 Jul 2019 06:32:05 +0000 (UTC) Date: Tue, 16 Jul 2019 08:32:04 +0200 From: Thomas Petazzoni To: Russell King - ARM Linux admin Subject: Re: [PATCH] PCI: aardvark: fix big endian support Message-ID: <20190716083204.375afc1e@windsurf> In-Reply-To: <20190715151016.6amymuikizmmmsph@shell.armlinux.org.uk> References: <1563200122-8323-1-git-send-email-jaz@semihalf.com> <20190715170840.326acd73@windsurf> <20190715151016.6amymuikizmmmsph@shell.armlinux.org.uk> Organization: Bootlin X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190715_233214_840488_4EF4C88B X-CRM114-Status: GOOD ( 10.98 ) 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: lorenzo.pieralisi@arm.com, Grzegorz Jaszczyk , linux-pci@vger.kernel.org, bhelgaas@google.com, mw@semihalf.com, linux-arm-kernel@lists.infradead.org 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 Hello, On Mon, 15 Jul 2019 16:10:16 +0100 Russell King - ARM Linux admin wrote: > > Also, the advk_pci_bridge_emul_pcie_conf_read() and > > advk_pci_bridge_emul_pcie_conf_write() return values that are in the > > CPU endianness. > > > > Am I missing something ? > > Getting the types correct and then using Sparse to validate the code > will help to identify issues exactly like this. Yes, I absolutely agree with your recommendation on the other thread. In fact, I am wondering if it really makes sense to store the "fake" config space in LE, since anyway the read/write accessors should return values in the CPU endianness. Best regards, Thomas -- Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel