Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp770506pxk; Sun, 30 Aug 2020 23:40:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6rPdIZnPF3wc024AMzsu1Zl42Gd1ofGdRSoZcH4h4UqV7BiNHD2Phl4LtXsQyuLG0Mn82 X-Received: by 2002:a50:a0c7:: with SMTP id 65mr9807020edo.375.1598856020576; Sun, 30 Aug 2020 23:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598856020; cv=none; d=google.com; s=arc-20160816; b=ry0Sx0Wxx3wfF1EBAj/fBVespD9K2AwOhou/mOT0M/0AgqZ1pV9V3hWyIkWnCPKvqX r+notcfdRwxlUgWAfRQJL4trm0ZiAapZ/KT5cl83UPbVTioTEyXOFgIIW2eZk1ktw43A 3sb2qiD6aiMkH7CRcTceMVHlJDoTgdkX1GzvTwH9n6u1tB/TTOBi04Va64gpR4RxFVtt EWJBOmmqmJv4DlHgVgzydTiZL3LTe63+lSmeHyv8jCGwrVOW9Nsit+HvGbcnJvk+sar+ L3r8U42Orptu+rouWSEFmoWSWB3vnsk8jn+X76/tzxBuPLse5BcZ33u3jrz3msEupnGX 4oiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=E+oc/3R+3SOa0yd9fC6aSdVbrVDB+WT9Eip+kjWzXQU=; b=BQRt7O1u+tbXLMs+3CY2aIBi/VzTgOlUGIeJ5AUG03A6ECdCRiLih2pwE6is7ni9ms 6TbCQikMY1Nb452Sig9oGGuUQvkVF9eq8nDjzGTVVvCSelIfs95oK9uJEqzcdMCX06Dr 95Ir2f19qIR7voInP0lfkiM+nrOAj//qesptlANhN0clalAAZiEeKckjIFdZOMl1et0u ztjA/8WdziiDJN8PV1ZU2gfmjuZ7bRFF4YEIW91x1BS+BKpsLEn62xA4QeRU8ns75ArS OQiRjvIA64pe5+xAdmoHZuAAcyi8osGfZNbDyqz9GVSuM609tBG6qALxhMTVC+97LGK+ +Usw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZPg3a5ub; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id cc8si4907927edb.204.2020.08.30.23.39.57; Sun, 30 Aug 2020 23:40:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZPg3a5ub; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726244AbgHaGjN (ORCPT + 99 others); Mon, 31 Aug 2020 02:39:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:46496 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725835AbgHaGjL (ORCPT ); Mon, 31 Aug 2020 02:39:11 -0400 Received: from localhost (unknown [122.171.38.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28B45206B5; Mon, 31 Aug 2020 06:39:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598855951; bh=U4io1zxnAO7T1rZA8Y3taxV0t0AWxjlAw/i8bJz3C0I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZPg3a5ubsLYkjCjzZHic1V1OAPnSWHBrTe1uSB/3HF0EDYGqOxDOcq3yo22pE+TJy YedGVzZOPrZ06Fa2bPpVV6MYk/4cTA0prmsYmd5OsLNZogaD0xX/SXRZ3jwPmFIMwG rFMCFA0mKyRuZfo8FJ+hm+XDGuPrkg4+K/tPsIxM= Date: Mon, 31 Aug 2020 12:09:06 +0530 From: Vinod Koul To: Linus Torvalds Cc: Guenter Roeck , Luc Van Oostenryck , Herbert Xu , Andrew Morton , Joerg Roedel , Li Yang , Zhang Wei , Dan Williams , linuxppc-dev , dma , Linux Kernel Mailing List Subject: Re: [PATCH] fsldma: fsl_ioread64*() do not need lower_32_bits() Message-ID: <20200831063906.GD2639@vkoul-mobl> References: <20200829105116.GA246533@roeck-us.net> <20200829124538.7475-1-luc.vanoostenryck@gmail.com> <59cc6c99-9894-08b3-1075-2156e39bfc8e@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, On 29-08-20, 14:20, Linus Torvalds wrote: > On Sat, Aug 29, 2020 at 1:40 PM Guenter Roeck wrote: > > > > Except for > > > > CHECK: spaces preferred around that '+' (ctx:VxV) > > #29: FILE: drivers/dma/fsldma.h:223: > > + u32 val_lo = in_be32((u32 __iomem *)addr+1); > > Added spaces. > > > I don't see anything wrong with it either, so > > > > Reviewed-by: Guenter Roeck > > > > Since I didn't see the real problem with the original code, > > I'd take that with a grain of salt, though. > > Well, honestly, the old code was so confused that just making it build > is clearly already an improvement even if everything else were to be > wrong. > > So I committed my "fix". If it turns out there's more wrong in there > and somebody tests it, we can fix it again. But now it hopefully > compiles, at least. > > My bet is that if that driver ever worked on ppc32, it will continue > to work whatever we do to that function. > > I _think_ the old code happened to - completely by mistake - get the > value right for the case of "little endian access, with dma_addr_t > being 32-bit". Because then it would still read the upper bits wrong, > but the cast to dma_addr_t would then throw those bits away. And the > lower bits would be right. > > But for big-endian accesses or for ARCH_DMA_ADDR_T_64BIT it really > looks like it always returned a completely incorrect value. > > And again - the driver may have worked even with that completely > incorrect value, since the use of it seems to be very incidental. Thank you for the fix. Acked-By: Vinod Koul > > In either case ("it didn't work before" or "it worked because the > value doesn't really matter"), I don't think I could possibly have > made things worse. > > Famous last words. I guess no one tested this on 32bits seems to have caused this. -- ~Vinod