{"id":2008485,"url":"http://patchwork.ozlabs.org/api/patches/2008485/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/patch/20241108143600.756224-6-herve.codina@bootlin.com/","project":{"id":28,"url":"http://patchwork.ozlabs.org/api/projects/28/?format=json","name":"Linux PCI development","link_name":"linux-pci","list_id":"linux-pci.vger.kernel.org","list_email":"linux-pci@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20241108143600.756224-6-herve.codina@bootlin.com>","list_archive_url":null,"date":"2024-11-08T14:35:58","name":"[v2,5/6] of: Add #address-cells/#size-cells in the device-tree root empty node","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"8cddbe734e6646bf7ddb59176e025cdabc2b0873","submitter":{"id":81983,"url":"http://patchwork.ozlabs.org/api/people/81983/?format=json","name":"Herve Codina","email":"herve.codina@bootlin.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-pci/patch/20241108143600.756224-6-herve.codina@bootlin.com/mbox/","series":[{"id":431925,"url":"http://patchwork.ozlabs.org/api/series/431925/?format=json","web_url":"http://patchwork.ozlabs.org/project/linux-pci/list/?series=431925","date":"2024-11-08T14:35:53","name":"Add support for the PCI host bridge device-tree node creation.","version":2,"mbox":"http://patchwork.ozlabs.org/series/431925/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2008485/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2008485/checks/","tags":{},"related":[],"headers":{"Return-Path":"\n <linux-pci+bounces-16332-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=gm1 header.b=IquwqNOR;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=147.75.80.249; helo=am.mirrors.kernel.org;\n envelope-from=linux-pci+bounces-16332-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=\"IquwqNOR\"","smtp.subspace.kernel.org;\n arc=none smtp.client-ip=217.70.183.200","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com","smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=bootlin.com"],"Received":["from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4XlM2v05Nzz1xyM\n\tfor <incoming@patchwork.ozlabs.org>; Sat,  9 Nov 2024 01:36:55 +1100 (AEDT)","from smtp.subspace.kernel.org (wormhole.subspace.kernel.org\n [52.25.139.140])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby am.mirrors.kernel.org (Postfix) with ESMTPS id 724441F260F4\n\tfor <incoming@patchwork.ozlabs.org>; Fri,  8 Nov 2024 14:36:52 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 51CC91F6699;\n\tFri,  8 Nov 2024 14:36:12 +0000 (UTC)","from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net\n [217.70.183.200])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C2971F4295;\n\tFri,  8 Nov 2024 14:36:09 +0000 (UTC)","by mail.gandi.net (Postfix) with ESMTPA id 722B420004;\n\tFri,  8 Nov 2024 14:36:07 +0000 (UTC)"],"ARC-Seal":"i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1731076572; cv=none;\n b=a4yxyYoqvdbD0S68ONqFQootnhYnopVPSseBI/ibjD0LPYleeKSHSMReHrjJ2uMq36FN/z0YFM82OsYzxf4fjwbUmWlAdgbrP4VO7kMwnfLNQfyv6lluMPKggsd9G4+tJ8TpbgnoIgJ3fZf9ZurpMCr1nha8YxPAAo7VnRW7BLE=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1731076572; c=relaxed/simple;\n\tbh=6slO009d/9VQJg5blm25QM7TQPdNoNYn/yLCwGyNYeE=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=cLwew3yqleV1dvE8ceCUUZ0IOMG7TrvXFj9cztR9RYDXTuponZFCeZRqhK28VuEu81rRmztNGtbNkGnB0Kht5RELf5GPHrYnoSNc6TjzLzaDvxSB0J0JoShDyN+kMnFPW/Mqq1neADh/DdPHNq1QayygcvRyE0xjkR3IHxTtACs=","ARC-Authentication-Results":"i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=bootlin.com;\n spf=pass smtp.mailfrom=bootlin.com;\n dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com\n header.b=IquwqNOR; arc=none smtp.client-ip=217.70.183.200","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1;\n\tt=1731076568;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\t to:to:cc:cc:mime-version:mime-version:\n\t content-transfer-encoding:content-transfer-encoding:\n\t in-reply-to:in-reply-to:references:references;\n\tbh=7OgyLhE+jNXZk7m4HF7bpGki7AeOrZWO847eMX6Y0+o=;\n\tb=IquwqNOR4EnGHdegHxI9dVN3UTG9kf0ueY3C6wpWTPwhdamaUcup9x5YbQk8EnZhjWcOZw\n\tGcEfTFf6G8MNjEbOEawHlWM1gVcLVVdxCLOgeFHWh0MxI7lIdjDqEqeehLDf4M8Z+FGEcW\n\t9d/okO+nvGOl/KCZBvMCI2NXOOavUzhEpr0yu38qYr8V3hPpkQyNx1SbpNrlFo4xxD2XCe\n\t3jVBsmmZUctWM5pA2F1omGiM7YWFhxe3+Jw6XymaId4crtdxHsmTDG7x+XTnb56/E7NiSj\n\tFNpnF05NV0uTeMQHxLukYkzge1HCAnxf3KDD3dMop6wiJkL11jUQTBHR9qCYBg==","From":"Herve Codina <herve.codina@bootlin.com>","To":"Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\t\"Rafael J. Wysocki\" <rafael@kernel.org>,\n\tRob Herring <robh@kernel.org>,\n\tSaravana Kannan <saravanak@google.com>,\n\tBjorn Helgaas <bhelgaas@google.com>,\n\tLizhi Hou <lizhi.hou@amd.com>","Cc":"linux-kernel@vger.kernel.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tAllan Nielsen <allan.nielsen@microchip.com>,\n\tHoratiu Vultur <horatiu.vultur@microchip.com>,\n\tSteen Hegelund <steen.hegelund@microchip.com>,\n\tThomas Petazzoni <thomas.petazzoni@bootlin.com>,\n\tHerve Codina <herve.codina@bootlin.com>","Subject":"[PATCH v2 5/6] of: Add #address-cells/#size-cells in the device-tree\n root empty node","Date":"Fri,  8 Nov 2024 15:35:58 +0100","Message-ID":"<20241108143600.756224-6-herve.codina@bootlin.com>","X-Mailer":"git-send-email 2.46.2","In-Reply-To":"<20241108143600.756224-1-herve.codina@bootlin.com>","References":"<20241108143600.756224-1-herve.codina@bootlin.com>","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-GND-Sasl":"herve.codina@bootlin.com"},"content":"On systems where ACPI is enabled or when a device-tree is not passed to\nthe kernel by the bootloader, a device-tree root empty node is created.\nThis device-tree root empty node doesn't have the #address-cells and the\n\nThis leads to the use of the default address cells and size cells values\nwhich are defined in the code to 1 for address cells and 1 for size cells\n\nAccording to the devicetree specification and the OpenFirmware standard\n(IEEE 1275-1994) the default value for #address-cells should be 2.\n\nAlso, according to the devicetree specification, the #address-cells and\nthe #size-cells are required properties in the root node.\n\nModern implementation should have the #address-cells and the #size-cells\nproperties set and should not rely on default values.\n\nOn x86, this root empty node is used and the code default values are\nused.\n\nIn preparation of the support for device-tree overlay on PCI devices\nfeature on x86 (i.e. the creation of the PCI root bus device-tree node),\nthe default value for #address-cells needs to be updated. Indeed, on\nx86_64, addresses are on 64bits and the upper part of an address is\nneeded for correct address translations. On x86_32 having the default\nvalue updated does not lead to issues while the uppert part of a 64bits\naddress is zero.\n\nChanging the default value for all architectures may break device-tree\ncompatibility. Indeed, existing dts file without the #address-cells\nproperty set in the root node will not be compatible with this\nmodification.\n\nInstead of updating default values, add required #address-cells and\n\nSigned-off-by: Herve Codina <herve.codina@bootlin.com>\n---\n drivers/of/empty_root.dts | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)","diff":"diff --git a/drivers/of/empty_root.dts b/drivers/of/empty_root.dts\nindex cf9e97a60f48..5017579f34dc 100644\n--- a/drivers/of/empty_root.dts\n+++ b/drivers/of/empty_root.dts\n@@ -2,5 +2,11 @@\n /dts-v1/;\n \n / {\n-\n+\t/*\n+\t * #address-cells/#size-cells are required properties at root node\n+\t * according to the devicetree specification. Use same values as default\n+\t * values mentioned for #address-cells/#size-cells properties.\n+\t */\n+\t#address-cells = <0x02>;\n+\t#size-cells = <0x01>;\n };\n","prefixes":["v2","5/6"]}