From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935139AbdDFOEe (ORCPT ); Thu, 6 Apr 2017 10:04:34 -0400 Received: from mail.kernel.org ([198.145.29.136]:36464 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935132AbdDFOEY (ORCPT ); Thu, 6 Apr 2017 10:04:24 -0400 MIME-Version: 1.0 In-Reply-To: <1491459529-31391-1-git-send-email-frowand.list@gmail.com> References: <1491459529-31391-1-git-send-email-frowand.list@gmail.com> From: Rob Herring Date: Thu, 6 Apr 2017 09:03:50 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] of: change fixup of dma-ranges size to error To: Frank Rowand Cc: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 6, 2017 at 1:18 AM, wrote: > From: Frank Rowand > > of_dma_get_range() has workaround code to fixup a device tree that > incorrectly specified a mask instead of a size for property > dma-ranges. That device tree was fixed a year ago in v4.6, so > the workaround is no longer needed. Leave a data validation > check in place, but no longer do the fixup. Move the check > one level deeper in the call stack so that other possible users > of dma-ranges will also be protected. > > The fix to the device tree was in > commit c91cb9123cdd ("dtb: amd: Fix DMA ranges in device tree"). NACK. This was by design. You can't represent a size of 2^64 or 2^32. Well, technically you can for the latter, but then you have to grow #size-cells to 2 for an otherwise all 32-bit system which seems kind of pointless and wasteful. You could further restrict this to only allow ~0 and not just any case with bit 0 set. I'm pretty sure AMD is not the only system. There were 32-bit systems too. Rob