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_1 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 66D8DC33CA2 for ; Fri, 10 Jan 2020 10:51:21 +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 2F6B82072E for ; Fri, 10 Jan 2020 10:51:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="deWrpV+W" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F6B82072E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SZjgLOYPQb90cgacpifGUvA16YzmZEW9VTar1TIJ1Rg=; b=deWrpV+WFXSowrOfH7HeAsh43 im+tnM1Udsc2sUmjp4jUODSRPFjecACl6SmL8T2527bsFm3B9hKx4p4zYow0JIaq4nHQ2iiwCWfph EzF2ZRXX5QDtUFWrIJ+YofB62O9w/ZGJWePQHZlQqb+2Wy1MkTjO7xUNGu50wvOXGdgVlIcozYlGz DBaHx9XzRtyiMUmgAQsH2PQ2M1tNMgLmiaTzxWxOkl+lMcvXwS94PfAKALwOF1rIw/0BcpGLuJv7b dpULA8f9GcZQL3KbzjlbAn3DEZzX3pe5hspe2wHzgVGdntZIxhTQpQVYIf5VmgdHPQfNt7SrztjsP jeUZWCYeA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iprsu-0001AV-P5; Fri, 10 Jan 2020 10:51:20 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iprss-00019t-3T for linux-arm-kernel@lists.infradead.org; Fri, 10 Jan 2020 10:51:19 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9262B328; Fri, 10 Jan 2020 02:51:16 -0800 (PST) Received: from [192.168.1.123] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 43BDA3F703; Fri, 10 Jan 2020 02:51:15 -0800 (PST) Subject: Re: [PATCH v1] ACPI/IORT: Workaround for IORT ID count "minus one" issue To: Hanjun Guo , Lorenzo Pieralisi References: <1577708824-4873-1-git-send-email-guohanjun@huawei.com> <2ce224b2-d926-67b0-f9dd-85ac53d967c5@arm.com> <20200109160220.GA27079@e121166-lin.cambridge.arm.com> <4cee4a91-6459-819b-d4d4-f5e8899103b9@huawei.com> From: Robin Murphy Message-ID: <1649ca0b-27c5-7365-2184-7ef95f210561@arm.com> Date: Fri, 10 Jan 2020 10:51:12 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <4cee4a91-6459-819b-d4d4-f5e8899103b9@huawei.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200110_025118_188262_4DC9F042 X-CRM114-Status: GOOD ( 11.24 ) 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: "Rafael J. Wysocki" , Pankaj Bansal , John Garry , linuxarm@huawei.com, linux-acpi@vger.kernel.org, Sudeep Holla , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-01-10 6:22 am, Hanjun Guo wrote: > On 2020/1/10 0:02, Lorenzo Pieralisi wrote: >> On Mon, Jan 06, 2020 at 05:19:32PM +0000, Robin Murphy wrote: >>> On 30/12/2019 12:27 pm, Hanjun Guo wrote: >>>> The IORT spec [0] says Number of IDs = The number of IDs in the range minus >>>> one, it is confusing but it was written down in the first version of the >> >> Why is it confusing ? Because we botched the kernel code :) ? > > I think 'minus one' is not bringing any benefit :) Well, in order to describe a 1:1 mapping of the entire possible ID space, the alternative would have to be to overload the otherwise-nonsensical value of 0 to mean 2^32, which I would argue is an even more non-obvious inconsistency. Encoding strictly positive values as 'value - 1' is a relatively common thing (at least in hardware design). Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel