From patchwork Wed Sep 5 19:37:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146021 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340099ljw; Wed, 5 Sep 2018 12:37:46 -0700 (PDT) X-Google-Smtp-Source: ANB0VdagtISFnVtlIjOAHTSR+XQpScncl4D7YZrRxoECnrAEsjT8jZWC4yBCkGVVU/NjVD8cUbAD X-Received: by 2002:a17:902:748b:: with SMTP id h11-v6mr711310pll.192.1536176266713; Wed, 05 Sep 2018 12:37:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176266; cv=none; d=google.com; s=arc-20160816; b=hIu68R5O8mKWK+fy8BggePgDjFXP0/eltVgIp+fDR8InQOv4wxN5p+dpBwXmX5K9ZD 4eW8zTD5GnyG9r9pGyXucIGkqO2A+ILX7k1ImV8TyUxkEU6b3CsUVvQ4YR9LjpqqIeU0 si7FXjYkPY0jJCbdwmRYLz+GGUDw8D04A9TpT3bl6PPbD7rBoILhTRm8/ac0TY3tbGNA oiVI/NwOTgDLJ9VrLn2w+wCrw2JSL8/TR1Skb3lSorrWY698CEFUvbfghZ3TFPvJSREm 0j0HXiOBOvW4g7nYr7iwxAmVWaVE+g654hYQvPtx8f5M3NhkyXRtZ0YRG6fGBAzIvbjD iLPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=MKDQ1pakY0QZK7RcLSpB+cr/rJf9FazHt+NA8s09ORI=; b=fv+B5JQnbHgvRMSpPsIemRiZ39I5CnMprjnw/vjw2MG6YMIRB4Ln8qEt+QfZ1E75vx sKz+IJX0hFUCbaaLF0eCP8UiTnNCFyt4Zacqv2ZqWpPjyjQptvzWdIRl7YOwbvNBpYTY mKuKdZVbNtglvzhaQTzS8gJFNp1hHxcKFCYE3b54pDM84Fr36evSDDGHQTeaIjuxjQG8 jlCpo5hI5YWlxRnst+F2MY9L1pTGXsvoIMS6JdNqVdyjgLxwBTxP9WDpCbDmHh5fnAUS OaCv4PMvIpCEwD3RUvxSwStHJz2cIN5MKuOPyqMR1BgOdsTdW5j9YdGX55TsNUuz1279 XOIQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h126-v6si3181436pfe.72.2018.09.05.12.37.46; Wed, 05 Sep 2018 12:37:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727987AbeIFAJV (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:21 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:38140 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727844AbeIFAJV (ORCPT ); Wed, 5 Sep 2018 20:09:21 -0400 Received: by mail-oi0-f67.google.com with SMTP id x197-v6so15932064oix.5; Wed, 05 Sep 2018 12:37:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MKDQ1pakY0QZK7RcLSpB+cr/rJf9FazHt+NA8s09ORI=; b=HKXYtaOuSwZHe5/Ps0odrODp8uKTj1roVC8lbilcCfJIfXqkQxX1KcirBQfcB/WILH roSZrDz9cUEatE8xd2XxaSOn39KF7T5Wt0DPZiHD3Fdfb3HVKwGFVeyLa+fmikMVgH6t 9V0aj15n30jdJzg11a1l9+iL4z5GmHbY9JD5WJeTb/BA4J4HxnB1hLtgOgKQP4p+8z4b oKstuFutMrz2n4KoUapsQNdMDXcr8vXKu/QOXaQznfP/JUJM3AkrV0or55ywYi8q2+Zy soUBA81oK3x9el+/4qZj1kp+p5q5yekot5KQlKAFM8JGUtNK9F+MutKC1mKfN0ZEDrwm HZiw== X-Gm-Message-State: APzg51AAdC7NCyBuB/+TlsMG7DcjUdxfUMGVdz/xwT96JJHiXiwcSc7/ YYugAc+5ltgrnqkv4yQZG1Udcj0= X-Received: by 2002:aca:3d4:: with SMTP id 203-v6mr29749127oid.321.1536176262805; Wed, 05 Sep 2018 12:37:42 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:42 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Frank Rowand Subject: [PATCH 02/21] of: Support matching cpu nodes with no 'reg' property Date: Wed, 5 Sep 2018 14:37:19 -0500 Message-Id: <20180905193738.19325-3-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For some single core ARM systems, the DTs can have a single cpu node without a reg property and #address-cells == 0. This case is valid and should match on cpu #0. Cc: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/base.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.17.1 diff --git a/drivers/of/base.c b/drivers/of/base.c index 70609d5a2506..6389aeb2f48c 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -327,6 +327,8 @@ static bool __of_find_n_match_cpu_property(struct device_node *cpun, ac = of_n_addr_cells(cpun); cell = of_get_property(cpun, prop_name, &prop_len); + if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0)) + return true; if (!cell || !ac) return false; prop_len /= sizeof(*cell) * ac; From patchwork Wed Sep 5 19:37:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146022 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340130ljw; Wed, 5 Sep 2018 12:37:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaO+dyesJLdHPa3m22IEEnTZozRJx7bRdwtntji6sNjSf/dYpG6b8fAyDuBnGMtI/QBs7PK X-Received: by 2002:a63:60c1:: with SMTP id u184-v6mr38201293pgb.266.1536176268813; Wed, 05 Sep 2018 12:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176268; cv=none; d=google.com; s=arc-20160816; b=T+52tC4X+3vA3IKD5Vwndp2fEvEiDrluDARN67OV1KKQWbl2BWSq9U5ig5N8m7DicS QmZyAq8c6XZqX3e60BiyydBqmS9f3c70PgtGI+ZUD/aW1acrjs3WkcIwUOPuQh7jKlpM VHvvsay/g1Hf1pGWlXbWZeLhcZDh90c4tlFh6VBk+4MLRL0+ss+KSn2WAprPTY5agnDs NVj2ByZY7Fkt94CDIPKdaev+UwQjJtHhAg8eU69SXmzLumFFwhJogV5cpWUZA7zFwMIC +YXOYqQCNXC95jS6tSjk3xBY/j8HlN/BvKyFvVuj+d2Ej53AkSw/HJ5cHciQHYxmEyBp RCXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=fYOg6CktF2xwcGxesRIbKcKZKAY1qmPWe//TJ6Jiv44=; b=vSBKlkmFzsgn5Oo0LO404CcWumTqK0vOTzYGAkooy10uNPb4kNCKOQF3QybBWNX/I1 mlBRF5qQTaLlQ64qCj4dr0dugv32rS5aaPyseO99+Kf4hCf9wwugKNjpuWtaMkDwCtfM 3fHwJ9KK5SI2N3wn9zEe8IgenwVQl5Y9gZUivqEhTdbNbb2RATvsokbjXiWBOdm5t9Nt 8TJyUb5C2mWm2kHqwRzHd8Q/BAzh5X0IMkV34pBQf/mAS5GivLAVneVsaZOApiHSdQ2x pTD0j86gSaYBRq42lrE9nWogiLXfLJ06fnEw37J4/J9NQ88apwxciVsrlcEMkAb26a2O yz0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1-v6si972023plz.476.2018.09.05.12.37.48; Wed, 05 Sep 2018 12:37:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728023AbeIFAJX (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:23 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:39618 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727989AbeIFAJX (ORCPT ); Wed, 5 Sep 2018 20:09:23 -0400 Received: by mail-oi0-f66.google.com with SMTP id c190-v6so15916934oig.6; Wed, 05 Sep 2018 12:37:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fYOg6CktF2xwcGxesRIbKcKZKAY1qmPWe//TJ6Jiv44=; b=jfJk8ISVLU/8vHZXiB/KdbiO6GEA8ZxuAqyaLVzMpEbn5PcIH+8ODxM/FASaLGfjS/ fOwhh/Z/ImfSZLjgaI0OTTkw0vhj3W0EtEaIYCLsc8pz0fyWfDzsgPzXo4IIzcE/+FlI v7z4ZqhxhG0F+y+IzUWrR8lhZRO0YFeeAcB0l0ZRGwKID750uyUfgwlfwzOuC29rxccK 8GbpEl6GHJUm+jeNL0bImQerepGRnPzP3VFG5mGaCcLuYHOPb52H2vpBzjWIM6Vx75t+ GUsM6PMf5/zYSywThejnxtdq9LH5723vXl2TOQU4PJJQB/Q1JqZXDN3Syd2h+dMVJVSj Lz5w== X-Gm-Message-State: APzg51AMCAl4KrKxYLOKMvMu5iHOy6gP3MzRblxKhRVbZ0DCu06Whg6N vE4VK9Ku8nYQo1si7lmS4Fx1wyE= X-Received: by 2002:aca:3ad4:: with SMTP id h203-v6mr30022138oia.294.1536176264613; Wed, 05 Sep 2018 12:37:44 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:44 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/21] ARM: topology: remove unneeded check for /cpus node Date: Wed, 5 Sep 2018 14:37:21 -0500 Message-Id: <20180905193738.19325-5-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Checking for "/cpus" node is not necessary as of_get_cpu_node() will fail later on anyways. The call to of_find_node_by_path() also leaks a reference. So just remove the check. Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/arm/kernel/topology.c | 6 ------ 1 file changed, 6 deletions(-) -- 2.17.1 diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 24ac3cab411d..60e375ce1ab2 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -94,12 +94,6 @@ static void __init parse_dt_topology(void) __cpu_capacity = kcalloc(nr_cpu_ids, sizeof(*__cpu_capacity), GFP_NOWAIT); - cn = of_find_node_by_path("/cpus"); - if (!cn) { - pr_err("No CPU information found in DT\n"); - return; - } - for_each_possible_cpu(cpu) { const u32 *rate; int len; From patchwork Wed Sep 5 19:37:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146023 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340164ljw; Wed, 5 Sep 2018 12:37:50 -0700 (PDT) X-Google-Smtp-Source: ANB0VdanJszt6rXHK6bg98BneviPjMJsiLACyeqQuuWOnZ8Y7NH1kZOWdY6VKPZZBeOWfRn5nKEK X-Received: by 2002:a17:902:42a3:: with SMTP id h32-v6mr41087323pld.105.1536176270624; Wed, 05 Sep 2018 12:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176270; cv=none; d=google.com; s=arc-20160816; b=qmO38dW77QWaRjCPlgw5E2UWQckXsXejmiaUw0maON32IpgJlaM9/mHMWC/waSgbyY 0Ij5B9Wdc0rnFL2jyt3lQ/Am7YbcnUHNdc5U8NiwzWrjI499i8Ac0TlXDK5Qt9V5G7wV Axmuoy8xs3rqjzJD+Aby0UGL3hTR8mpctXfXIOF8Y43pzmN7Da+BfrzBe9bLKKEzO9Gd TxJU+K7iUSEYFrVRX6WSY/H/UVnFw2Hkea8G8tQJT9tJ3+hBVxYPEKxj6ch9cuJ3GQYA ahW7/ojFdlsmDMVd5RnpeZrQ6v/I8ZnAquVqdYiMLgTT8jlLkprBP7ZZa6vOoRWHrxyD L27Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=2baCbrjxYhnRd701tIbNh2fl7IulRiMGM3GGiuSaTNc=; b=jXAx0rxboaPF+eg8NdY582ALi0PP7FMAnKSrMj5R+Mo5qh4XgjU0JmCh0I0BrrBxrj LQS3GydRwqoeeO3tB4gjmiCTQEYr7xSOpEmY39xHS/C3HzGbziSS+1yVuT3xEF66rwxs Iy8QsnBPSyhx5AWXGDJx1vqH5HX1vObjqp3zgr6ZP5zy7NfBZsRu7gR2MtNTYSJSrIFT mI1DMMp+kgmqM2rlmrz64v4HROS36Yh9zuSBF5mx2BsgVzW4GMiE5B+bvKkEMPfmCsyf 7fShBaFoK/8Kxpq5xwgCE3yZTMgpfqSnGdihjtGP4jOb4x7IG42FC87ZYGmed9uH4AuE A6gQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w190-v6si2614709pgd.482.2018.09.05.12.37.50; Wed, 05 Sep 2018 12:37:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728044AbeIFAJZ (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:25 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:44585 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727837AbeIFAJX (ORCPT ); Wed, 5 Sep 2018 20:09:23 -0400 Received: by mail-oi0-f65.google.com with SMTP id l82-v6so15895166oih.11; Wed, 05 Sep 2018 12:37:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2baCbrjxYhnRd701tIbNh2fl7IulRiMGM3GGiuSaTNc=; b=J5ggoyifVIgVvgVglbiLUdYUSZgJ32qMGemCKojnnW7zOYhV0NDp3As36wQqXqtcrL 51WNDLiUPfClODvVLdBu1Iq7NlgVSi22PmKoeX2MXSrz8f8hsTnSmzd70W2BlomsPbNZ suJDJppZX8q+n2XXAmdv8r89v6D8OhJiZpFloEoGaSYqOxliQBglvcVsyqe6N+2018Mm Xw8dzLMHf2HYVyMLGVa7WfVWTw/dQfva27Q/f35pZYqLr+jLcK+4IXM7DD+YcOcrgtPh a3vnwoMvigcUa+SwwXAEnuwQrkbEYwW6/P6NyulxjlEojcLVkONePte2nT4zo3Gpu3Jv 7Ekg== X-Gm-Message-State: APzg51BCRtWoq9nQVLBHcjpea67CHVmU6SP4IKDmvfHfrL2LMEsaAROT 5DFdNr/WEXzXu7uvQdJnfhK5WOk= X-Received: by 2002:aca:44c5:: with SMTP id r188-v6mr32621954oia.280.1536176265556; Wed, 05 Sep 2018 12:37:45 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:45 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Simon Horman , Magnus Damm , Russell King , linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org Subject: [PATCH 05/21] ARM: shmobile: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:22 -0500 Message-Id: <20180905193738.19325-6-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Simon Horman Cc: Magnus Damm Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/arm/mach-shmobile/pm-rcar-gen2.c | 8 ++------ arch/arm/mach-shmobile/pm-rmobile.c | 2 +- arch/arm/mach-shmobile/timer.c | 10 ++-------- 3 files changed, 5 insertions(+), 15 deletions(-) -- 2.17.1 diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c index 345af3ebcc3a..7efe95bd584f 100644 --- a/arch/arm/mach-shmobile/pm-rcar-gen2.c +++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c @@ -50,7 +50,7 @@ void __init rcar_gen2_pm_init(void) void __iomem *p; u32 bar; static int once; - struct device_node *np, *cpus; + struct device_node *np; bool has_a7 = false; bool has_a15 = false; struct resource res; @@ -59,11 +59,7 @@ void __init rcar_gen2_pm_init(void) if (once++) return; - cpus = of_find_node_by_path("/cpus"); - if (!cpus) - return; - - for_each_child_of_node(cpus, np) { + for_each_of_cpu_node(np) { if (of_device_is_compatible(np, "arm,cortex-a15")) has_a15 = true; else if (of_device_is_compatible(np, "arm,cortex-a7")) diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c index e348bcfe389d..94fdeef11b81 100644 --- a/arch/arm/mach-shmobile/pm-rmobile.c +++ b/arch/arm/mach-shmobile/pm-rmobile.c @@ -202,7 +202,7 @@ static void __init get_special_pds(void) const struct of_device_id *id; /* PM domains containing CPUs */ - for_each_node_by_type(np, "cpu") + for_each_of_cpu_node(np) add_special_pd(np, PD_CPU); /* PM domain containing console */ diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c index 828e8aea037e..e48b0939693f 100644 --- a/arch/arm/mach-shmobile/timer.c +++ b/arch/arm/mach-shmobile/timer.c @@ -22,22 +22,16 @@ void __init shmobile_init_delay(void) { - struct device_node *np, *cpus; + struct device_node *np; u32 max_freq = 0; - cpus = of_find_node_by_path("/cpus"); - if (!cpus) - return; - - for_each_child_of_node(cpus, np) { + for_each_of_cpu_node(np) { u32 freq; if (!of_property_read_u32(np, "clock-frequency", &freq)) max_freq = max(max_freq, freq); } - of_node_put(cpus); - if (!max_freq) return; From patchwork Wed Sep 5 19:37:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146025 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340191ljw; Wed, 5 Sep 2018 12:37:52 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda5bW671V+N9IZxUgwpFVLdKGLKN3QnlZwkU46Rq9jYoZ6aSzLbYA4TzwciyLNJwPO5qrIa X-Received: by 2002:a62:d713:: with SMTP id b19-v6mr4109077pfh.88.1536176272128; Wed, 05 Sep 2018 12:37:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176272; cv=none; d=google.com; s=arc-20160816; b=vkIuKT5GxiVcZSUYOj99Mk88fzYiGtskEfwOlhcGrcxdNd/uucIQ9uKHuz64fSAxb/ tOHRKQakljcIUfuKaZBcIQqZ4mqGBRFAXapdYMEN5Izjx9Lf8em5/DZqynLiEe4Q36Mo wpTCtsFaNtHyzw4GJQKyDD1rRjgsxb5gEZh2x4WSPZSpjmtyGDeyvsMw+Z06G1oEb4MF afSB1KJSjehbSKhF4HjPYboQwM3AfpAO43w5jyzhswK7/L7Xy+gbFJfakCGQj8tYD59Y 0bI2V3SQltJHDMY5qsDnbswcUmIR39FgCYLSG7m2+wRGIfpNEMA7eCUFyew1HMEIbQpN 3kSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ogh2LMa7oIMA73dH0bBLUtgkzUXNill/EWPZtdCSSbg=; b=0+NQxodw875fd09cRnBU793wEpTxeuBTffX8eLws9eQK97gdpRK/HjwJB/CfQlY/+U LRsEkOTarbuYSxOe4D+TFynMGwEiHCfReEUNq/DQpIivB2/+wlrvU0utj6pI/XxOlkF5 bSm1P+yjwDrwErnKABQeZOaqLI7ReG5lD2hoDvaCJNmAkk7eBugqtlXcgnyTa/johcYX brQ6cCwQnLGGi5CowAfkeLdXBfJ+ay0LzYd3luNlanY1UnBdOQGZnY7GAWNwo9TaQgdM kBECK77XRshpROV0lNxQ1P3VpcalI8jHZZtK+wG7Ce3jGc9JjDJwBS9CuIqwIt0G3xPn h7OQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w190-v6si2614709pgd.482.2018.09.05.12.37.51; Wed, 05 Sep 2018 12:37:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728067AbeIFAJ1 (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:27 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:32784 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727837AbeIFAJZ (ORCPT ); Wed, 5 Sep 2018 20:09:25 -0400 Received: by mail-oi0-f66.google.com with SMTP id 8-v6so15991242oip.0; Wed, 05 Sep 2018 12:37:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ogh2LMa7oIMA73dH0bBLUtgkzUXNill/EWPZtdCSSbg=; b=M4GzTlCedGuW29+CZCFar2Vvb7YCYXW6z2s6nDJkVCy5rKL3Z6xJGru98xolCbDWUC VZz6GySp82n2096AVb0xKOuvYVrIHetTqBp7614jkB9jSIMSqkXXFBvx4biAMUMQGkp8 yDWXAICx8zG59MfeW4E+oia3jnCIxTHxKlbaxhFvdsuyaOlbGv/SnVl30r0IdDTSnsZV KgUeSpP0LJ7x0xFkvumORWqhMqL9aLPj3ocWX1VD/91ZAnOMhErHkDI8Lz4Bgt1SsZ/c ljR7rQiCtkVS9NV2qcueTcC1uKjJQdPGPg4165nq9CiE4g7wl3lOG6Vgiai22UXMa5b6 bhMQ== X-Gm-Message-State: APzg51DxxZaoMrdDRRr1I2BZGi74c/KZKv3hfrnG9Z5gv0XwhwW6+/Jz ZJASfiEpQnjFkXgbrQhfeyUl7XA= X-Received: by 2002:a54:4091:: with SMTP id i17-v6mr19204570oii.352.1536176267710; Wed, 05 Sep 2018 12:37:47 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:46 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org Subject: [PATCH 06/21] arm64: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:23 -0500 Message-Id: <20180905193738.19325-7-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Catalin Marinas Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/arm64/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 25fcd22a4bb2..96b8f2f51ab2 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -602,7 +602,7 @@ static void __init of_parse_and_init_cpus(void) { struct device_node *dn; - for_each_node_by_type(dn, "cpu") { + for_each_of_cpu_node(dn) { u64 hwid = of_get_cpu_mpidr(dn); if (hwid == INVALID_HWID) From patchwork Wed Sep 5 19:37:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146039 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5341461ljw; Wed, 5 Sep 2018 12:39:12 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaBjCG8rRikyCY+CNt87+YBsxU/VE6h1MRmqOWhik8mRXjPtnhMjj/P/wBgMvV7LfdGoo07 X-Received: by 2002:a63:cd4c:: with SMTP id a12-v6mr38367952pgj.15.1536176352150; Wed, 05 Sep 2018 12:39:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176352; cv=none; d=google.com; s=arc-20160816; b=0WJzmSjPi0GnurhBRoElY8yDrAKamIjS/YhJVN41XkIn+BjUyFMJdyJwKXu6St2ojM XmZ6wHg46Y+ZBx0Jlx4pspcvSSK0dwq3TJPEdicIOG3Bwu0RqLcw7Hf+XnNDntaCFNw6 rgy10llCCa1Nn0Zb7224Jqy3iD0nTfRee7dMghibIUL3xFJDiz06boW77R/W55+ui3vf +Q1AKH7kYBg2obBmCS6/tAMwZQzMH2X4BUkbA1mfjzgO8DOtSN4hT6u614WUPvdrWBp4 Y15GJ3VV7XPUUoMgDZ/a3LY/BHSj3uY4dhzcWnJLPnsT72eyyUHfkkqNTsUTOF+l74Yg 5QDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=w5y2GFORKjExM0nWitCpBSerVbpnpsUXlRB1soYRGOY=; b=emO/QIKNrjwFiLvzmdXPcPF+kbaX/DBcBJ/q/Z737x4ldsuGmrmuOiI9rAxy4FkW6E NhIWauLMY1FSuN6b7OQ1LchQXfwlbGqJDpqybJ2T+jpb4dprPuyshevNrCNytu9uWQdE oo7HKunByvjzFl5auF2zIwHQ77xh1CVSeTKZ5g3tB3jJAhd7J3iJxYRSOqp/SX/nqNOP UvAjjgRhUm0QTpPSM5rKV8PwTCFxF50QlQF2Kxhe0KB9nLq/8pwC7T8U9QjCCcmKuaAn YE5LOIYoQRbqdc1TdcbhLBg6a3EfZ35wE/ndO+CwwhK8OV1rThzw8ZYTYKF1bQJnUObo tSkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i32-v6si2860877pgl.74.2018.09.05.12.39.11; Wed, 05 Sep 2018 12:39:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728331AbeIFAKr (ORCPT + 32 others); Wed, 5 Sep 2018 20:10:47 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:41611 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728046AbeIFAJ0 (ORCPT ); Wed, 5 Sep 2018 20:09:26 -0400 Received: by mail-oi0-f68.google.com with SMTP id k12-v6so15892501oiw.8; Wed, 05 Sep 2018 12:37:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w5y2GFORKjExM0nWitCpBSerVbpnpsUXlRB1soYRGOY=; b=kmNKlpEjpwGzBWAkvC9mBGWRpHPNtvEr3D8DwcVlKMRoiLIl+SGDnRkBzMWtm8qr52 dpIdn2Gi1XEFnHvPZycazNwCYKIc3mnsmG0eLp8bIrCIid5wi0HMCXAM6FGpPaF48nJC uxJvOx4AY+vz6OeBqeiNe6wAYulbXcuQw9nHTGTAM+WjwmvWefEdBJaJhP0Ky0plPM6l jEsJ/aJjXDPVGYoPDPmBiEWnE0SCrT4WZRdbN4fjH1T4wxzIBIdvRm7NSL1Rdbc6u0pO +kLGgsQneEuUCX3nVC0eq4LWEiRoA6GPY3IU3cmQiMjW0lm7gZFgirStmQ4nehC8SZdn 7TEg== X-Gm-Message-State: APzg51CESvcVWwbIEVbVfhuQD1FkIuFVFp/C2VEbwLp+r6Uxzu86/gbi fmakhGZgBhUlzRy1FCxlySKt1LI= X-Received: by 2002:aca:af11:: with SMTP id y17-v6mr29484832oie.274.1536176268642; Wed, 05 Sep 2018 12:37:48 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:48 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mark Salter , Aurelien Jacquiot , linux-c6x-dev@linux-c6x.org Subject: [PATCH 07/21] c6x: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:24 -0500 Message-Id: <20180905193738.19325-8-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Mark Salter Cc: Aurelien Jacquiot Cc: linux-c6x-dev@linux-c6x.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/c6x/kernel/setup.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c index 786e36e2f61d..2e97455ca0b7 100644 --- a/arch/c6x/kernel/setup.c +++ b/arch/c6x/kernel/setup.c @@ -96,7 +96,7 @@ static void __init get_cpuinfo(void) unsigned long core_khz; u64 tmp; struct cpuinfo_c6x *p; - struct device_node *node, *np; + struct device_node *node; p = &per_cpu(cpu_data, smp_processor_id()); @@ -190,13 +190,8 @@ static void __init get_cpuinfo(void) p->core_id = get_coreid(); - node = of_find_node_by_name(NULL, "cpus"); - if (node) { - for_each_child_of_node(node, np) - if (!strcmp("cpu", np->name)) - ++c6x_num_cores; - of_node_put(node); - } + for_each_of_cpu_node(node) + ++c6x_num_cores; node = of_find_node_by_name(NULL, "soc"); if (node) { From patchwork Wed Sep 5 19:37:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146027 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340228ljw; Wed, 5 Sep 2018 12:37:54 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZBskSJI0xcB7CS6S9k1dB6YOfJATJSV6q5/bYZvR6DR284xaLdCobOkm82viNduXiI4RJc X-Received: by 2002:a17:902:1c5:: with SMTP id b63-v6mr41195645plb.82.1536176274785; Wed, 05 Sep 2018 12:37:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176274; cv=none; d=google.com; s=arc-20160816; b=0C4Gq5P5ASJcXrcTqfnXQdtdPSX+s6rJqLZc1mbyzLkgD/nDlBjsO2cq6zMW8knen5 4iSdhRorDDZCCAnsrluzxX50Acb7bhlCpBXW8LVTtLiS/BHaNfAJLKnicfyU90383/rW 2v3ahSiGk/9JwOHQOJgcoarwjhTCJQhznzVOSOMNQwMvazdk9QcoZvp2VUiE8BNJhCCr gyDG0EfOilB0ZDrg+whVLFKd425gQ+3Ez4m2Z2cSCyE1hwP+Kx9NodfRqLgI7i5WIVRu dlbz8aGDk8tqGrkAzVw0rPbkuZGip0kkD8A7eY+B9QOmuseRzzCs2OPLVb4w4E5RfEib dd6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=Jrg1zbMesAMdjnvTSH+V43cpguLxHWMPgV4Z9iIWt8s=; b=bgTU4gWqiwIAkXyn59XPIPFLxEzPIPqvbNrLvTyXhz4TaitC0FN+fHAnkECfJm1lUl xBOuYXedIM2jGtziC+RGg0kaUKtmn/TYh3qaq9BA36yGdPuvjkt8+UUH4vtZ+X7MliwN 9PFqvQ72QybcqgaUaB8E4UcpnwIcuyOVNVnpofFTdSjzNWPHm9GKOfw6gl6wGDxVX229 QzOECh6/aVWhHZOuOrwdlEcZrLJXh8y23PH+IJcX5gisbVC1+29Csm/EyveQTlZ5szki pLXKGz4xQSbhbc9jxExh8gzn10hDtYhmo0v9OLhhAf9hgMs8N2gPufRNXh/MIPUV+hZm D2GA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u64-v6si3001007pfd.297.2018.09.05.12.37.54; Wed, 05 Sep 2018 12:37:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728108AbeIFAJ3 (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:29 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:46131 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728077AbeIFAJ2 (ORCPT ); Wed, 5 Sep 2018 20:09:28 -0400 Received: by mail-oi0-f67.google.com with SMTP id y207-v6so15870195oie.13; Wed, 05 Sep 2018 12:37:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Jrg1zbMesAMdjnvTSH+V43cpguLxHWMPgV4Z9iIWt8s=; b=aFqzOloGM4RfxMM+ggBp5jeia2xvin7AZ7a/pj4fCNwXKh6yLcIu9dYrN6ChcjjrCo 0KmovKvizi6v7rVBE/bhAEZXxshjKXGTA4ZXzK5JyIdKILAGc6DV0DSU3PCcgUCi4W6d okexDvbLL7HMCF43VSlTI0iRSvG7yR1uMPuzULQcboStE15cwTC3b2Q1jOAAUUNDYPbH N8KiWW43nhvRLRO7qAtar8it70uUVQjGNM1QK6sR5+iTozHoB/AYBKiMfTow/BW9c/FH RSPM7RGLNHs4PHwjPmVnvhFdr/iJMWiVhH1B69g8JCUMZ4I19NThp6oNYjabdW8rz2rk fBhw== X-Gm-Message-State: APzg51DQBqlvYI3mXjamAc/2VaHC8+IAt6nJGSPaiacwZWDO6cNnUHqR p1o/RGDbE+CXOX8JUVvDJ/3Ks1Q= X-Received: by 2002:aca:5d86:: with SMTP id r128-v6mr7292755oib.243.1536176270404; Wed, 05 Sep 2018 12:37:50 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:49 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ley Foon Tan , nios2-dev@lists.rocketboards.org Subject: [PATCH 09/21] nios2: get cpu node with of_get_cpu_node Date: Wed, 5 Sep 2018 14:37:26 -0500 Message-Id: <20180905193738.19325-10-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Also, fix a leaked reference by adding a missing of_node_put. Cc: Ley Foon Tan Cc: nios2-dev@lists.rocketboards.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/nios2/kernel/cpuinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/nios2/kernel/cpuinfo.c b/arch/nios2/kernel/cpuinfo.c index 93207718bb22..ccc1d2a15a0a 100644 --- a/arch/nios2/kernel/cpuinfo.c +++ b/arch/nios2/kernel/cpuinfo.c @@ -47,7 +47,7 @@ void __init setup_cpuinfo(void) const char *str; int len; - cpu = of_find_node_by_type(NULL, "cpu"); + cpu = of_get_cpu_node(0, NULL); if (!cpu) panic("%s: No CPU found in devicetree!\n", __func__); @@ -120,6 +120,8 @@ void __init setup_cpuinfo(void) cpuinfo.reset_addr = fcpu(cpu, "altr,reset-addr"); cpuinfo.exception_addr = fcpu(cpu, "altr,exception-addr"); cpuinfo.fast_tlb_miss_exc_addr = fcpu(cpu, "altr,fast-tlb-miss-addr"); + + of_node_put(cpu); } #ifdef CONFIG_PROC_FS From patchwork Wed Sep 5 19:37:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146028 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340270ljw; Wed, 5 Sep 2018 12:37:57 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaBnTXjtJNiHB4PXtZDw5+pcHJjuQavvWzaXhZL/RJAg0uiuys/umK5b3j/y0xut8w+EEd7 X-Received: by 2002:a17:902:724c:: with SMTP id c12-v6mr40076955pll.326.1536176277257; Wed, 05 Sep 2018 12:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176277; cv=none; d=google.com; s=arc-20160816; b=1AEBCtoMZe+nlgMh8b8v5V21pUUotBEDE6ViXiF9uMMFIWpFnQjuyz+2Sm3nzcLF0d WEkQDamSwByrJ0ELVj8jW7N0AL+9nU/N0xBUbXV9CQZLsWl21dKbrUQXJFJg1JfvdG+O bG8LyVmwSgXVip9NytsXEiK5EEYRnZrSJbnX8pAePx6x/JUv6whTI4Vu2UXN8FzT2qYp 9PsxwRIurZyUwp2CLByLGWCfZ6kPEQV5fEKxT7K2Uhsxk4m619ng1kfVqDV3MG2V84c7 ZfvULexry58YmeBVqlhQTCQCQ9tr1I8gHSDhnb5LmOLiDvOb7xcQVa3wo1ca8WgvGo2l AQFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=/tHIj8M2GngKk2DgJXEcotoqfmP004BFGBxFORRWufc=; b=weiOB1hQCiQ2xKY4nS/jnQgJJ3/+EPfsuYJ6hIPXBBCdjnRgB4IgMstf9MmeVxfZMY 70qrVhQapsVcI66aopIg/OH4u9ZYsVen6tdavJ+SiKCFC4G5jL/qV5snUIVKgVRR3Q23 9yS2BmbzE502KVN3QLvPVbfr4wjs8RKhvSp3p+06sfTu3rf0JaLhEI8Awx+388Ii7CFH 8YHdZdeZ7zPpgKID9ewBQcx1MlyC+hdYA4aARufZgsAPezgvJO5Q8+hym+xlhAZ9uQgS YARFDd/ABqDLWnOXItWZSJDslZOW0+iWEJ7F+ma+qcJCg0zEXonHmFkRhX5FdrIPTTvx 6fZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q66-v6si2830384pfk.268.2018.09.05.12.37.56; Wed, 05 Sep 2018 12:37:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728144AbeIFAJc (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:32 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:42542 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728113AbeIFAJb (ORCPT ); Wed, 5 Sep 2018 20:09:31 -0400 Received: by mail-oi0-f65.google.com with SMTP id k81-v6so15915171oib.9; Wed, 05 Sep 2018 12:37:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/tHIj8M2GngKk2DgJXEcotoqfmP004BFGBxFORRWufc=; b=A8ncbPeMa5q0twPS4vxs/9dRQXtfnmr7HwId/KhhclZ5jL75GkjLCHvyoI4wCa4yl/ X0V66I20AM2J5ReGGanoa7IlMbX1DVLiytOhL2qOlRQtl/IEC9yubziSk1stWK3hprM9 ICC9Dq7dajMSQ1gYkuzwtcHKs/dgTk01sn0RsOUthYxUwz+4HxEMUmSs65zAP4O5aSD+ BiVd2OCBj4EN1l/mn3pKrQCHG6j9lvWfp+B3hMk5SiDUDVjGehlwTkers7uwTOrXKgsP DjLVBD6mNGYEs5NkgQfNh+zowBsmKWLwPCLe9Kbmxt2hV209Pf8lDDqZNdfTiJz+3Nsd F4jg== X-Gm-Message-State: APzg51DGBCHTxW0MrPG2rG3BoXIOrkGjM0SFiY+8Ia90jviJKkjGAUvP vOpzegBeyKck56bZlVlp2Z3U/0c= X-Received: by 2002:aca:5841:: with SMTP id m62-v6mr30375846oib.346.1536176272343; Wed, 05 Sep 2018 12:37:52 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:51 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 11/21] powerpc: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:28 -0500 Message-Id: <20180905193738.19325-12-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/powerpc/platforms/powermac/feature.c | 51 ++++++++--------------- arch/powerpc/platforms/powermac/setup.c | 15 +++---- 2 files changed, 26 insertions(+), 40 deletions(-) -- 2.17.1 diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c index 4eb8cb38fc69..ed2f54b3f173 100644 --- a/arch/powerpc/platforms/powermac/feature.c +++ b/arch/powerpc/platforms/powermac/feature.c @@ -1049,7 +1049,6 @@ core99_reset_cpu(struct device_node *node, long param, long value) unsigned long flags; struct macio_chip *macio; struct device_node *np; - struct device_node *cpus; const int dflt_reset_lines[] = { KL_GPIO_RESET_CPU0, KL_GPIO_RESET_CPU1, KL_GPIO_RESET_CPU2, @@ -1059,10 +1058,7 @@ core99_reset_cpu(struct device_node *node, long param, long value) if (macio->type != macio_keylargo) return -ENODEV; - cpus = of_find_node_by_path("/cpus"); - if (cpus == NULL) - return -ENODEV; - for (np = cpus->child; np != NULL; np = np->sibling) { + for_each_of_cpu_node(np) { const u32 *num = of_get_property(np, "reg", NULL); const u32 *rst = of_get_property(np, "soft-reset", NULL); if (num == NULL || rst == NULL) @@ -1072,7 +1068,6 @@ core99_reset_cpu(struct device_node *node, long param, long value) break; } } - of_node_put(cpus); if (np == NULL || reset_io == 0) reset_io = dflt_reset_lines[param]; @@ -1504,16 +1499,12 @@ static long g5_reset_cpu(struct device_node *node, long param, long value) unsigned long flags; struct macio_chip *macio; struct device_node *np; - struct device_node *cpus; macio = &macio_chips[0]; if (macio->type != macio_keylargo2 && macio->type != macio_shasta) return -ENODEV; - cpus = of_find_node_by_path("/cpus"); - if (cpus == NULL) - return -ENODEV; - for (np = cpus->child; np != NULL; np = np->sibling) { + for_each_of_cpu_node(np) { const u32 *num = of_get_property(np, "reg", NULL); const u32 *rst = of_get_property(np, "soft-reset", NULL); if (num == NULL || rst == NULL) @@ -1523,7 +1514,6 @@ static long g5_reset_cpu(struct device_node *node, long param, long value) break; } } - of_node_put(cpus); if (np == NULL || reset_io == 0) return -ENODEV; @@ -2515,31 +2505,26 @@ static int __init probe_motherboard(void) * supposed to be set when not supported, but I'm not very confident * that all Apple OF revs did it properly, I do it the paranoid way. */ - while (uninorth_base && uninorth_rev > 3) { - struct device_node *cpus = of_find_node_by_path("/cpus"); + if (uninorth_base && uninorth_rev > 3) { struct device_node *np; - if (!cpus || !cpus->child) { - printk(KERN_WARNING "Can't find CPU(s) in device tree !\n"); - of_node_put(cpus); - break; - } - np = cpus->child; - /* Nap mode not supported on SMP */ - if (np->sibling) { - of_node_put(cpus); - break; - } - /* Nap mode not supported if flush-on-lock property is present */ - if (of_get_property(np, "flush-on-lock", NULL)) { - of_node_put(cpus); - break; + for_each_of_cpu_node(np) { + int cpu_count = 1; + + /* Nap mode not supported on SMP */ + if (of_get_property(np, "flush-on-lock", NULL) || + (cpu_count > 1)) { + powersave_nap = 0; + of_node_put(np); + break; + } + + cpu_count++; + powersave_nap = 1; } - of_node_put(cpus); - powersave_nap = 1; - printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n"); - break; } + if (powersave_nap) + printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n"); /* On CPUs that support it (750FX), lowspeed by default during * NAP mode diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 3a529fcdae97..2f00e3daafb0 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -243,10 +243,9 @@ static void __init l2cr_init(void) { /* Checks "l2cr-value" property in the registry */ if (cpu_has_feature(CPU_FTR_L2CR)) { - struct device_node *np = of_find_node_by_name(NULL, "cpus"); - if (!np) - np = of_find_node_by_type(NULL, "cpu"); - if (np) { + struct device_node *np; + + for_each_of_cpu_node(np) { const unsigned int *l2cr = of_get_property(np, "l2cr-value", NULL); if (l2cr) { @@ -256,6 +255,7 @@ static void __init l2cr_init(void) _set_L2CR(ppc_override_l2cr_value); } of_node_put(np); + break; } } @@ -279,8 +279,8 @@ static void __init pmac_setup_arch(void) /* Set loops_per_jiffy to a half-way reasonable value, for use until calibrate_delay gets called. */ loops_per_jiffy = 50000000 / HZ; - cpu = of_find_node_by_type(NULL, "cpu"); - if (cpu != NULL) { + + for_each_of_cpu_node(cpu) { fp = of_get_property(cpu, "clock-frequency", NULL); if (fp != NULL) { if (pvr >= 0x30 && pvr < 0x80) @@ -292,8 +292,9 @@ static void __init pmac_setup_arch(void) else /* 601, 603, etc. */ loops_per_jiffy = *fp / (2 * HZ); + of_node_put(cpu); + break; } - of_node_put(cpu); } /* See if newworld or oldworld */ From patchwork Wed Sep 5 19:37:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146029 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340300ljw; Wed, 5 Sep 2018 12:37:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYWKGktObHwkZZO9mwHyHFk3xfoZFLfFDUcpSRYEqDLtD6z35pe0kY8Xr/u36j9oOT2HsKn X-Received: by 2002:a63:550b:: with SMTP id j11-v6mr37260516pgb.167.1536176279310; Wed, 05 Sep 2018 12:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176279; cv=none; d=google.com; s=arc-20160816; b=oipikqievPc0QKrIce1Yr53JCX4mHVH8Tfv6klJkKe6RN5uxvCHsky5SHGXTZowFmT 3dGjXNKuEovgZ+mZqLG1P04MmiaV57lCqe740K0u+GBTTRUd+zKBgt2RPeo2N55QzgO7 oWlLpKn188Ar1kabpTJTZ2d5nhg7m8mE14HeCcMivxXbhE6wkxyGfLb7CXbriqkLwrng ee8pZLftbPQLlQ3oel/CBRr27641Tf+tpEMPG95I1fkmBKJ8Is0TkzcMOKuKsUt24A4J rdqFw7st8I4FrFNKq1fAuxWvzq5a5+593fHAg4Yti9dtuwrnZngAlfIK/xbfwceljouq l6kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=s3OlCcnQtVwqjPItkwhGyBmzTtRlvMcJ/T8eD1Ua590=; b=icU2RVboS4vpZOJwdvJeDXN2vIDr34cHBofz8VRMiorUfv70oeZS+BDDzdvzNl7Yqi aB73JerItjxdGGcOPXlroRCPPwh/3ORyJw/DmGRGJgf+UodKQcQGn6DZtDQHbWRrHXMS 96aOniNO+SXUJpMm1LCD5o/9ojmXi0pBhF5qj6B5uUIW3+8dYbU+S9ye3G67H3RHsej1 mGoqhxkm0Z4pBybj+f4M1JmTIv6CK4FRQp+Bsx3zIQS/BZv01t7OuhOxsoZsAzUQu30y Y/OH0VGSAah33wZB6dIapMLWi/NV5i4dHZu3WcKVlxflYVT3Dy/kYW8lAm5NNX+519PR jnRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q66-v6si2830384pfk.268.2018.09.05.12.37.58; Wed, 05 Sep 2018 12:37:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728164AbeIFAJe (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:34 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:41629 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728113AbeIFAJd (ORCPT ); Wed, 5 Sep 2018 20:09:33 -0400 Received: by mail-oi0-f68.google.com with SMTP id k12-v6so15893041oiw.8; Wed, 05 Sep 2018 12:37:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=s3OlCcnQtVwqjPItkwhGyBmzTtRlvMcJ/T8eD1Ua590=; b=Vhte3upClIY0I+g+ED9LAaJ8FeZbmh61jvcNlg7hoH5BZN04W72KhOf/CIjzI3YgGW CQmXXuoTMhbo5J6laaHElA/HRuxcWsm1SGJ1DJN9kT+hFExgdDqlwW19wD2A4vBVw9u5 h3+t4F4J96+jT2YUYHA0M8Kc1CO9OF+Lc4oMNYmpoyvYApf/x+t8Se+Cp5j73UmivDBu +uGsUIddHnDUERHov6KPJe1tYJE+5/wP7wPeW8PwpY0fcTeZo+dt5p0MbjHIkVUWDWcy I5CpPZYN0adA9sRcnH67uOul4NiAa4V6fAQtTg+r0Mq60Dj0E69MSQtKBZKUwdl7OciE S9Fg== X-Gm-Message-State: APzg51Abbz2qtyEMVJNBpTAHkazaskc/vVx3Xd5CuRnl9Lre69/TCGAJ WNKRfugO/mfSWEicGrBqyuEOimE= X-Received: by 2002:a54:4091:: with SMTP id i17-v6mr19205119oii.352.1536176274820; Wed, 05 Sep 2018 12:37:54 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:52 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 12/21] powerpc: 4xx: get cpu node with of_get_cpu_node Date: Wed, 5 Sep 2018 14:37:29 -0500 Message-Id: <20180905193738.19325-13-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/powerpc/platforms/4xx/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/powerpc/platforms/4xx/soc.c b/arch/powerpc/platforms/4xx/soc.c index 5e36508b2a70..1844bf502fcf 100644 --- a/arch/powerpc/platforms/4xx/soc.c +++ b/arch/powerpc/platforms/4xx/soc.c @@ -200,7 +200,7 @@ void ppc4xx_reset_system(char *cmd) u32 reset_type = DBCR0_RST_SYSTEM; const u32 *prop; - np = of_find_node_by_type(NULL, "cpu"); + np = of_get_cpu_node(0, NULL); if (np) { prop = of_get_property(np, "reset-type", NULL); From patchwork Wed Sep 5 19:37:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146038 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5341170ljw; Wed, 5 Sep 2018 12:38:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdavqgqFRlcXnCtZVK0pavbzZ79W6aoSSVvjUifRVUvIixKgCPwzAyvsqZ0yq9NEv/HfCZzq X-Received: by 2002:a63:e14a:: with SMTP id h10-v6mr37772534pgk.358.1536176332627; Wed, 05 Sep 2018 12:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176332; cv=none; d=google.com; s=arc-20160816; b=sKT/GfMpIJqTIjf+T/9E8cD8x+PB9mi0QFSVtc6HFkAW/ELEEDy94r7D1mGov9BFrw 0qns3x0Wr5W+7IjzsfkHkGdKWxIrShlwByFrxzFyQc1Wd56hDECV0pP91BI0ZPr3p02t FCydkorledonC+Cd5PTl1WP4BinKdmJGRk6Z4+GV6UDIb1eRHm9Tgtp8Ciw3KIp7daa9 ZXttP/s4hVvRStgLPf/L6D5wTSlb1OPHbyYRCwswLUVLTvvvvscdhFgnhepPMmvs9Xhc Uc9WPNbOF372+mhRxA3paaLFvHQjJG2foY8UYVtj+zVQWD0SSdqDl9UDfk84MIZTSovz ninw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=L6E6vVywGO46HqOghl5n+w7OMYLN/eyqP7WNYCEryGg=; b=Y+XXKMR9b6+Uctw2NSobG8j0OsVZ2m26Wb/Yv5R66k5oDNsyJ11kWPfEAuAdzTCOKG Ea5gwAJ2EYvYafR4N3xFe/U7Lry4G/ZP+brilpCCObsJGXlIJCHhR36tHGmQ34ehIbLr o5YvdU/E/lN8ZwsSslGUU+phOLoGEptIDs1FWKquXlfo6/2+TN6zbWsFXYE9L0CtJXI2 oHP66Be/nq/xO7Sx4xtSUZ3OoQMduxx7T1+O9krltfcBsk8CRhPGxzIEJ9Yos4xXGE9j YfvJktA6nykEfb0dKDTV/LjkJHlb4sDwJ82rqJ8pSbEkw3+2iJbqq2cINkZQoFsYGA+1 v43A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj4-v6si2603680plb.119.2018.09.05.12.38.47; Wed, 05 Sep 2018 12:38:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728318AbeIFAKW (ORCPT + 32 others); Wed, 5 Sep 2018 20:10:22 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:39654 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727841AbeIFAJd (ORCPT ); Wed, 5 Sep 2018 20:09:33 -0400 Received: by mail-oi0-f67.google.com with SMTP id c190-v6so15917959oig.6; Wed, 05 Sep 2018 12:37:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=L6E6vVywGO46HqOghl5n+w7OMYLN/eyqP7WNYCEryGg=; b=EtiCVm6YGav73ifd6rnm5MoR//WaykKyKC+O5/sLWVhguYTnoDLYhWOuM2H3AidYht CnwWhyLyI/WlDKrj3T0s8HLyfmxcFXHDlhSR1lvd0080oaSwKOKSOFrcJ9+WOlQmarQU vHGVsmw9xJeUDyROeQ7weOlEVu9AVgZ4hqY5vZqYpj6UOxJNz+26Svylyyf9Dmz5vnbc 3j1kQGSSzCXmBFI1QmnLSjVSdoR1KF5GNafNGNeyDYvvRQwkfDvsUsLX+rj1cytCGDkT CH2L4Ge2uzCJoniSj5cvdVXN32Rz9k8MnWbWqSPGKbjshoSUoIQ08sgv6s89tpWOqctf E4VA== X-Gm-Message-State: APzg51B984xSwVEUWB+0rKm/YGNlzaz4XJVkno+LMTgrsM9Mt28A7vxa AgozP4xPoe2NHV+9MlYGkQqvxq4= X-Received: by 2002:aca:3ad4:: with SMTP id h203-v6mr30022899oia.294.1536176275757; Wed, 05 Sep 2018 12:37:55 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:55 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Vitaly Bordug , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 13/21] powerpc: 8xx: get cpu node with of_get_cpu_node Date: Wed, 5 Sep 2018 14:37:30 -0500 Message-Id: <20180905193738.19325-14-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Also, fix a leaked reference and add a missing of_node_put. Cc: Vitaly Bordug Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/powerpc/platforms/8xx/m8xx_setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c b/arch/powerpc/platforms/8xx/m8xx_setup.c index 027c42d8966c..f1c805c8adbc 100644 --- a/arch/powerpc/platforms/8xx/m8xx_setup.c +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c @@ -66,7 +66,7 @@ static int __init get_freq(char *name, unsigned long *val) int found = 0; /* The cpu node should have timebase and clock frequency properties */ - cpu = of_find_node_by_type(NULL, "cpu"); + cpu = of_get_cpu_node(0, NULL); if (cpu) { fp = of_get_property(cpu, name, NULL); @@ -147,8 +147,9 @@ void __init mpc8xx_calibrate_decr(void) * we have to enable the timebase). The decrementer interrupt * is wired into the vector table, nothing to do here for that. */ - cpu = of_find_node_by_type(NULL, "cpu"); + cpu = of_get_cpu_node(0, NULL); virq= irq_of_parse_and_map(cpu, 0); + of_node_put(cpu); irq = virq_to_hw(virq); sys_tmr2 = immr_map(im_sit); From patchwork Wed Sep 5 19:37:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146030 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340324ljw; Wed, 5 Sep 2018 12:38:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZPypMqJntqTWomyKrBKkKe9XgDjfoDez2iAzByT1f1gmiHK6JoHQnMgCSmX7dDymVSZvR+ X-Received: by 2002:a17:902:8e86:: with SMTP id bg6-v6mr40610495plb.108.1536176280743; Wed, 05 Sep 2018 12:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176280; cv=none; d=google.com; s=arc-20160816; b=TH53m4bJhFsyqBW3VhcEZtBgocQ3jy43tfKx2HxdkqGTE2p1SDGFfCUX59rCiD8uLd zceJ4Cj152cmds98a94KsTQpIuyX+cBmhW6mazVp73k0hGKqocumXob/ZYPTDFahy62K 9r4XVg1A9KnobAEIptSUbgTJHWAU0/SXXR+xIsD0bNnYd3nbUa4FX5zEH+M1zMgNeVJs YHerMYC9rKczdDmHpggsXYRgUJu/5FOtnoPv7jAZ8megasR+knt+oPSDI5TZ39XuI/WL uoEcGECFT66bh8tQq0aP4jX4K84Oob50lsrtxi/nZgrUFPl+y57dE1lALmAo777A+KCP PZsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=wal0t/pq4j6SHZM6giP5gRDOGILfFfu2UrsgCKzgCyY=; b=KDr/TUzZAZ5LojmehS3qZWYJWwrwmfrfc1MBWP459Atf7kSi2Y+ibadOr+HVxIwAhV dIkqGyxq+kZ7VvQ6u8mf2NjBgmobAQ2ko0jFOvXfHNFsszdzrWY7CGPXfapdZdeLZjOH ROUhLHKkSLa5wLj1JR3WGvHoFIhzqNeIablePiD7X7kBOD9z5fojG2ML75b6qMq+xepg ceLOVItLlQWk9jTZBdDMbvORJrMBId9e126ADpFZv47njkgkd6XbhvAkHDaq7xrsjfmm 1Z/FL/KDRJhimfm6F0aH0FF2RF3a5nyhIbUY8EwURO55j+gXu3Bqj2cawZgFab6Y2dTn km/A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q145-v6si2980338pfq.315.2018.09.05.12.38.00; Wed, 05 Sep 2018 12:38:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728180AbeIFAJf (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:35 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:40328 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728161AbeIFAJf (ORCPT ); Wed, 5 Sep 2018 20:09:35 -0400 Received: by mail-oi0-f68.google.com with SMTP id l202-v6so15924978oig.7; Wed, 05 Sep 2018 12:37:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wal0t/pq4j6SHZM6giP5gRDOGILfFfu2UrsgCKzgCyY=; b=iuCAHhVRieFUXudS26/i4l77r7BnNXdj4s1SyJmXl5EfBQsBnIUuFAYb12t4OC4d2x AXlm9zbRtBjs67lJsJtJFJjR2usaC+ocprn/UyuxZ+RhnUP3QAJ6Y8cH2Cb6oDf84RRq Ic9aKH76mdRwwtljfJWlwAYlXggdzAE9xPKNsF5P2kH7+B+HyU8UScHeLtmXq4kDppWE BTO6t9UrGdOS+GqTLyOVn3GVczfhOHfaKXb9K1b0GPPFBlML8fTavdzwYqvPsQH35N19 hlB7GdYNUHWqRwIpbvyQogS2rkx9k6grAFPJ+2PcQWgTdrAZvV9RHNdDC2ZrRdI944hQ 4stw== X-Gm-Message-State: APzg51AAgijYUfJ0KnurAk8s6J3yhTQrXK3JVvyvfF45cydtVPiVfQcF RVaK3vjvDBJhcW751DEgKdnSmC8= X-Received: by 2002:aca:b904:: with SMTP id j4-v6mr33254543oif.89.1536176276566; Wed, 05 Sep 2018 12:37:56 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:56 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org Subject: [PATCH 14/21] riscv: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:31 -0500 Message-Id: <20180905193738.19325-15-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/riscv/kernel/smpboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/riscv/kernel/smpboot.c b/arch/riscv/kernel/smpboot.c index 56abab6a9812..3c59afe67951 100644 --- a/arch/riscv/kernel/smpboot.c +++ b/arch/riscv/kernel/smpboot.c @@ -52,7 +52,7 @@ void __init setup_smp(void) struct device_node *dn = NULL; int hart, im_okay_therefore_i_am = 0; - while ((dn = of_find_node_by_type(dn, "cpu"))) { + for_each_of_cpu_node(dn) { hart = riscv_of_processor_hart(dn); if (hart >= 0) { set_cpu_possible(hart, true); From patchwork Wed Sep 5 19:37:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146031 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340353ljw; Wed, 5 Sep 2018 12:38:02 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYdg1ythIF97nRH/cZlRmICt2WgVKd1PYudyNbeBetgqtwl7jlt+8a6ZIp2UjmhyfYia7r1 X-Received: by 2002:a63:7d48:: with SMTP id m8-v6mr38722814pgn.0.1536176282362; Wed, 05 Sep 2018 12:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176282; cv=none; d=google.com; s=arc-20160816; b=m1OBN6fxkmoFrVJAXwrOPCMj0s3Cgm5h85qGXEuXoZGzwog2grXXQHi9mFqnxk5Y5X xe60RnXRPwz7380NSh4dWOjoKzga2e+nuvPudQvEUFdxYufTfYRZTY5hPbXLSDZNr62z JJuxCXNnCLojFGQgjmhr882uQRJ7Zhuo49QyLbo50/rd3CRtCnGldVUGAvMiDEBEC7N+ 3hR+koQ6Lunvezxmt7CQnSn6QhqwNW818QkPZCgZkfKC1SBW4mP8SNIKw4cXjOnqQOp4 Nxh5no/hOOJXh3l0UOmN/Urzpn61pZc1NocE99rXsSQHKYtuRJjwIak8J3ofnSWzm8R8 3reg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=esRW4epyy+tbCOE/OOJYFszu2Y4geAOJ7tPyxf0XQ90=; b=YxuOT1qo5akMnubigeW0Iu2LC5AgERY3XE8zj6zMN/OXh3UHv2mUHuG6wV5bF3xLKN 6PtYHtFghhIvVTDozu8Qu9anFeHYMKCSKsXB9erTFwg67HDcIqaXHxbJY3mI9HiQKBcJ 4TguAj4jisrN621iZDQCMFAU8hhXnWpmH8RFuskB4wqcrqDY76NPogHHCVv+azwAM4Fz oPFPXyvQ8gAMvFrcjYSihHMqehyTImghX32Zkw/NFF/E8flTPFzELjY1HjdN/9P6xNG9 qUYDY+FUc252rhU9yWkLUBr1stJsloTeHmfuZQTdc5Uqad5IQHtrD6D1YmwocEQr/wSO Q5Rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd2-v6si3020882plb.47.2018.09.05.12.38.01; Wed, 05 Sep 2018 12:38:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728203AbeIFAJh (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:37 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:38189 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728161AbeIFAJg (ORCPT ); Wed, 5 Sep 2018 20:09:36 -0400 Received: by mail-oi0-f68.google.com with SMTP id x197-v6so15933406oix.5; Wed, 05 Sep 2018 12:37:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=esRW4epyy+tbCOE/OOJYFszu2Y4geAOJ7tPyxf0XQ90=; b=UdtoerTgkdQIQj7B6Q9rQUVXEKionMBVczHwOdmxNxmTkUfjb+oPrSpoaFTpgyKJO1 HwgpRInQdbjKUWtSwFfyErjZ7f1SzM9uxs2jBkhaM1NziImdDGfL+DRrJxAzQ9CIGVkv 5pSpPMq73kWIXaLH4AeXMzX8+8ok+Qf0XJ37HC8tSD4a39VkVf7XKthY9QQPDGGPsFjm dnCLK/SOQVGVErUaImnfzUsYnLwQLNAE4VJqth4i/BzG0rKGURaTJuLtazNB5SkbmZ8m zkBSGNuIx0ZJGbt9f0bxsq0HYV38HdkSG5Zr2sDNnfD2kIA8Kf5uwgv+nCiRiiH3iEGd TlGg== X-Gm-Message-State: APzg51CaNQKs/7u5ffXYXeR5G0d9w7qxrf8Lbq2fJqhWuCsk5UZwudLA 6Aozt3fNcPOKNl3Ur79nXRiZpoM= X-Received: by 2002:aca:4aca:: with SMTP id x193-v6mr7630941oia.211.1536176277944; Wed, 05 Sep 2018 12:37:57 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:57 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org Subject: [PATCH 15/21] SH: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:32 -0500 Message-Id: <20180905193738.19325-16-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/sh/boards/of-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c index 26789ad28193..cde370cad4ae 100644 --- a/arch/sh/boards/of-generic.c +++ b/arch/sh/boards/of-generic.c @@ -64,7 +64,7 @@ static void sh_of_smp_probe(void) init_cpu_possible(cpumask_of(0)); - for_each_node_by_type(np, "cpu") { + for_each_of_cpu_node(np) { const __be32 *cell = of_get_property(np, "reg", NULL); u64 id = -1; if (cell) id = of_read_number(cell, of_n_addr_cells(np)); From patchwork Wed Sep 5 19:37:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146037 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340857ljw; Wed, 5 Sep 2018 12:38:32 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb/2/PVePJDhKZRa5Eh0kvbHyxdPmc93wtbhyp/Z2Cg8+CO7efKJxjTx65SyabJTWjYVnmG X-Received: by 2002:a63:9e41:: with SMTP id r1-v6mr37342730pgo.362.1536176312445; Wed, 05 Sep 2018 12:38:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176312; cv=none; d=google.com; s=arc-20160816; b=n/qqwVI0pCeTlsVp4udiMmqhOOzGh5FFapxT/B+NBQl0xSUyIAs1Te4RPk9lUmHon+ W488wevjU63NpITdueLu92vGY3SFPlTj3ApqjzldsHUbkH+9O+p54O8BP4l2zBsROWdB EjrpdYW9Aty8B8pZpzwyYKQfWMjmlAoP6gTMx12FdS5wA8stgPc0HexZgZ+r3bn5GiiV DpKyClveWwLmbL2X7JHZCdbbDHVVxVgq6eq1+wHPrwiXAP3+z9DLIYx2M6LgHMLrpRne l7rubOn945YyXLhBM5uRZIrTR1YKXHhqP4BuNGr/XYOG8uKLCj1G7LT6gyc6AOhFTpf3 lgGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=VGNyhY5tgQV4KWn3opIp4M/wV8dFtqeR1pRxx+K7ox8=; b=Mzs2+FWAiy25f9VAx+RXT+THtGQzu+3IhGJTp+0+Fpm2WtyPE/c/1K5paozaiOwxyw Xw16QU2t1S/iF/dV33g0494OySLzy1NvTYWWU0JJUuhPfw41jk+nXiaGBPFDMLt16+2d qFrdwJa7RqTev55TCRA+fp8Xs3xUkoIXy61vJyHQCT8DmQ49K130Zef9i6oMTDbb5AAN UG6jYn3IKq/YT9rqahqkbqiB2yy5Ybi9pN/RVS1pgIyErAWWA78X898yG807qD8ElDqt XiQW6gx/PRCVSvWAwM+3MdKg+nYC2dMa7ZDVVtUIRsm9woQnDNz6STifEO8PpkSftkPH isdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bj4-v6si2603680plb.119.2018.09.05.12.38.32; Wed, 05 Sep 2018 12:38:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728305AbeIFAKI (ORCPT + 32 others); Wed, 5 Sep 2018 20:10:08 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:45527 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728182AbeIFAJh (ORCPT ); Wed, 5 Sep 2018 20:09:37 -0400 Received: by mail-oi0-f66.google.com with SMTP id t68-v6so15895516oie.12; Wed, 05 Sep 2018 12:37:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VGNyhY5tgQV4KWn3opIp4M/wV8dFtqeR1pRxx+K7ox8=; b=chNCd9vk1q8uKgMf/9J9U9X5Dh3CIGsTDJSwVh5EmGkVNmj2+7LheeXkpaZXUyNNwd IjkC5l0W4M9JHZstAsXFK7eDxzbEQAz1xu9gJkW8KtbJ6eWVIa1MqDoTbEk7cZQ0TPRe b3pde8KKEuI9GA1sEiA91y6uBy4bIighG2L/OOufVnYmrMQqnxzkrTD4JffeV9qknoNE F1VKpQ8T99oNWRhjerBhtWLjDYHxB3jZd25FJaCknZEhd1IcNtsu7JsBkzmwOcEc771P x4IazCBsi+I2XcAbt35Bi3obf+U0kGTn0udGdoj2YzEeV2tR69JcTZrAV2I1MVUmkkcn KOUQ== X-Gm-Message-State: APzg51Df0uDW3DNm+CRZsT+7NcPuRwfDqHG9IZ+c9V91rHsXzbQitm+r lkSbW8ZT3ier04hRk5Al3RN/dns= X-Received: by 2002:aca:aa06:: with SMTP id t6-v6mr33049663oie.152.1536176278961; Wed, 05 Sep 2018 12:37:58 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:58 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org Subject: [PATCH 16/21] x86: DT: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:33 -0500 Message-Id: <20180905193738.19325-17-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/x86/kernel/devicetree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c index f39f3a06c26f..7299dcbf8e85 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c @@ -140,7 +140,7 @@ static void __init dtb_cpu_setup(void) int ret; version = GET_APIC_VERSION(apic_read(APIC_LVR)); - for_each_node_by_type(dn, "cpu") { + for_each_of_cpu_node(dn) { ret = of_property_read_u32(dn, "reg", &apic_id); if (ret < 0) { pr_warn("%pOF: missing local APIC ID\n", dn); From patchwork Wed Sep 5 19:37:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146032 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340385ljw; Wed, 5 Sep 2018 12:38:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY/9n4rBfcD7Lc/reoadO13gcWcLUzOcAxVdOyvHY3Ye/p62WZs14tHz2pqlj+PySxMFZ+a X-Received: by 2002:a62:8c8c:: with SMTP id m134-v6mr42098043pfd.130.1536176283909; Wed, 05 Sep 2018 12:38:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176283; cv=none; d=google.com; s=arc-20160816; b=DBvrtIVWXJw/K6l9PXY6JikUJIgS4ehT/9AD+9PAhryqtpjdZW0nx/WKgr8oMwndKV DXCIhBtfz/b51tkta39LVPqMQ9tvtY7aojQOr2NgbqKBjR09bz0w8j0lubhi1ondQLRg 4W/Zl9MnMBmN9dBK8rFqNDmeGu4W+N9upQiyYW17KciJQavNuSmcr+M21ew/FzAXO/2J gWCD9pDlEkTGfLkVk8sq64j8DCd2z0FeXiZBg4y9oXTNTTA3o/2l40sAFI9t+/wPsLsu Ofwnehi+yjK6CWlujP6rms1oybyTWQcmvVYSmsp0gYpQ9C6MuoziCFpfYWHoD3/AZPc6 ANLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=GgCElFhdjQyThXth4aH8s7Qmwk29mwNME1dnAGCxWmw=; b=hIcdthoMSqY0/OsDkOB1mwjAYgpj3/swXfbqpFyJUczqZOdKzdA46njtq+j26j6Hxl v4fPoWHiLOi87pBnQendVZ3BBTUYoOx4BAgy7Eq6QdLzwYIPYwG3Pc+AVracwPEX758D hsNAwjyTD7SMdbrAsx4WJpv3qYmFY5oabpdgnVO1WnyChcFB4/PccCYXKGbUeK6rE55T nmNaG7FanTygSzVxopKFK9ee5jMwfmhdo1deJoX2U97R29vTmDaMxhkLa84F7rPIHKS0 wAtGbQmSOKpyFC0LncLe4vLSz7m61yAn6wc00NhnpEvKafuTOR4rkJCIcZQwXs0UtATE 02WQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd2-v6si3020882plb.47.2018.09.05.12.38.03; Wed, 05 Sep 2018 12:38:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728224AbeIFAJj (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:39 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:44632 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728161AbeIFAJi (ORCPT ); Wed, 5 Sep 2018 20:09:38 -0400 Received: by mail-oi0-f65.google.com with SMTP id l82-v6so15896617oih.11; Wed, 05 Sep 2018 12:38:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GgCElFhdjQyThXth4aH8s7Qmwk29mwNME1dnAGCxWmw=; b=HgVs64jow0hvpvmgicYmIMzRHhtfR74JrySKD05KW4MZXxN1URHw9cdLyWlfpn+95j QYOj1XRpz8FDEzjAew+sayRTJRpLkPMrU6oRuvn9t9U057yR0b8U2VkG5GJtTGmG8Lzr 5R1JSLDPks6P1CDU+GibzdzS6JB5s9Nv8wHqBIVscA6mMH9n8Xi6/JFuzQSpevuK4htX U7xZeG/jxEBnH5ApJw2A+y3/K5u/yZyD3wCgvVBXZIops4qWb29krwN+kngiIBmfZgXx R7q6W/lez939kRMWQPKj9dM7y5F5IahfLsE80QmXA9LALd5+6cbAEeEt9yjt5iaYWl2j aP+Q== X-Gm-Message-State: APzg51Af6OvC9+Dg9Qa9I+5E/wEiDB6qSVmjp4uNxv4wXOfNm9hTewzI 8hMlrue7xK2QedoQXlEA8G9TFVc= X-Received: by 2002:aca:3507:: with SMTP id c7-v6mr34041839oia.46.1536176279859; Wed, 05 Sep 2018 12:37:59 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:59 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org Subject: [PATCH 17/21] clk: mvebu: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:34 -0500 Message-Id: <20180905193738.19325-18-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Michael Turquette Cc: Stephen Boyd Cc: linux-clk@vger.kernel.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. drivers/clk/mvebu/clk-cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c index 072aa38374ce..3045067448fb 100644 --- a/drivers/clk/mvebu/clk-cpu.c +++ b/drivers/clk/mvebu/clk-cpu.c @@ -183,7 +183,7 @@ static void __init of_cpu_clk_setup(struct device_node *node) pr_warn("%s: pmu-dfs base register not set, dynamic frequency scaling not available\n", __func__); - for_each_node_by_type(dn, "cpu") + for_each_of_cpu_node(dn) ncpus++; cpuclk = kcalloc(ncpus, sizeof(*cpuclk), GFP_KERNEL); @@ -194,7 +194,7 @@ static void __init of_cpu_clk_setup(struct device_node *node) if (WARN_ON(!clks)) goto clks_out; - for_each_node_by_type(dn, "cpu") { + for_each_of_cpu_node(dn) { struct clk_init_data init; struct clk *clk; char *clk_name = kzalloc(5, GFP_KERNEL); From patchwork Wed Sep 5 19:37:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146033 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340410ljw; Wed, 5 Sep 2018 12:38:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ/ysgm7WlFJ7GE6+Eiq/kwvL1ka9ILH6pPuKnDtRjWq7vlLEM3SSi34tFFaLYuipe/Ad2f X-Received: by 2002:a62:a6cc:: with SMTP id r73-v6mr42124579pfl.60.1536176286249; Wed, 05 Sep 2018 12:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176286; cv=none; d=google.com; s=arc-20160816; b=d0vgonecPuz/6OHZ39uZd0qwhhuHOMmnZRnAi2DltNtVhdGfyE+k2tOQSFKdxNdJN4 7zejjZgHKyxU5axbcnuil/8Kg9ww+tT/r5/0L2IjDm+eU+4TyJNVt71bdX2R+lt2mglg 1Xxtt/bJUmUIxTbTX1sZerUcpHfS/7o3/3yHBYu0Qucau15QSstYwdubRhqAivvjbfO5 z79c2gBK3owwZtJmCXtH4xf0JlwkaU8oL3Q+JMA8IRkLcbuqFpIbyV1qKFAJavAoNvqj T5+2PhU5HeQogUjCNHv2pWIuY+WDLf3Ncto9+2A/aQMDXeLIIKjLQlvi0mgAlC3/sJ/N e/GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=/iIXmhGiLNPb+oyB0fqAq/cBY95BW9PeH5qSGmIxXL0=; b=ID2DpeZ26yvqdEkaAm3m8bgV+dxzBg93dK5gA4ujjRFTYpo+qtAJ7aYA+Wpr+H0lfH g2l1Z1mGNdC4GaKqX9gt7QM7mu/6FJSevAJziayRRhTc4u/8yZjiADcxb3QGsqcx+N8w oq9HmJRlBGXa/mKqSEI60ppYvzHUXxqRhmo882UzCSumNHicVHSMIoIzGOFjurfa1erP wl+nakNM1omQgmWEghKTVH2Fm8WDlAZgt94jC9Ialj3BTVEojkfm54MX/yo6JYCcrMMq YH+gAqf8E9YOfHiF/X1PflVTSFpYoP4FHXWtao5FFZI9o1MxJkG3Tq00+3KdOlQzT+XX 68TQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190-v6si2917004pgc.241.2018.09.05.12.38.05; Wed, 05 Sep 2018 12:38:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728245AbeIFAJl (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:41 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:45538 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728161AbeIFAJk (ORCPT ); Wed, 5 Sep 2018 20:09:40 -0400 Received: by mail-oi0-f65.google.com with SMTP id t68-v6so15895841oie.12; Wed, 05 Sep 2018 12:38:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/iIXmhGiLNPb+oyB0fqAq/cBY95BW9PeH5qSGmIxXL0=; b=YNiwLuyQ4RsQYQzjOJXMBpis6UedyGBVq2QEPiHNc/SQC/2D9dgfCyiXaL0+Ogg8Er aLbSEa+cVG3eXaoeRsYQ+WJH3j4sx/Qu3eMdyxGbzpahKGMsV7QpYZDEeaZShZAqOVyT wCHgUQBmSn6rLDFE+e0cUqiIhtWFWWkzJfaErhhsgC4sIEj3BLZWnBS9Uu/ou4qbfeO/ Lz2lUZyDbM/Ie4t2Hk+nq/SoQsOqq8M3EKrAwyY6PutUptoOx57+lw4ZPuFwUT13H1bU WtVhotDflt6VMFXN2gjQh1ZpjZBT8pJYD2bQeFnnYY6vBqzBsJb1CKno2vWOq2Oh9L6B 7Yiw== X-Gm-Message-State: APzg51AEUsc6tUTO7sexfg2HbT7nTZJefwlAho9TunEw8V9M6V5rnEXQ GqmtZFqfNPAedj7MMWrUeU2HjFE= X-Received: by 2002:aca:af11:: with SMTP id y17-v6mr29485854oie.274.1536176282314; Wed, 05 Sep 2018 12:38:02 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.38.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:38:01 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Joerg Roedel , iommu@lists.linux-foundation.org Subject: [PATCH 19/21] iommu: fsl_pamu: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:36 -0500 Message-Id: <20180905193738.19325-20-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. drivers/iommu/fsl_pamu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index 8540625796a1..1b955aea44dd 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -543,7 +543,7 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu) return ~(u32)0; } - for_each_node_by_type(node, "cpu") { + for_each_of_cpu_node(node) { prop = of_get_property(node, "reg", &len); for (i = 0; i < len / sizeof(u32); i++) { if (be32_to_cpup(&prop[i]) == vcpu) { From patchwork Wed Sep 5 19:37:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146034 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340417ljw; Wed, 5 Sep 2018 12:38:06 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbPfb0dBUor70+4kT7nyV7Hh1HK0JC86y1hK7EXobY2fozb7xCV8+1AWJS6SBnEBHt9Lcze X-Received: by 2002:a63:77ce:: with SMTP id s197-v6mr38702235pgc.172.1536176286596; Wed, 05 Sep 2018 12:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176286; cv=none; d=google.com; s=arc-20160816; b=0zAZFf2DTGvs1FBGtl9tp6Wa0w3Z2bgc1GfMbVrbLNzo0fhZbYrASDLVeDrD7HbeLV 7XfgOrv6vQLAMns++uFm4ijnbCZoDEN5vOaISsHpSrXy6eiyE9ocSENWz80TdoEdeS6c BKP1YvBXh6BEvUnJZlTMdAgNvZKLhYS9fngQ9QREECDtZD9wpsjvBp9wA3KCiIP6n61R 041pk88PEZaPI37fV1O/bRcBjPf3haI9IXlPf/OD9mRiXziozHbkSNa0NO6j6XDVEn2h SIteNvlCK0C4oKX9NcaK7IFgztgZlvnurF/rqVccJuo8rpiPy3VF8PiF4pHgU2+WqZYI GzqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=XSLGQ9uqdAn4wTY6t09Z9k1WYMJrEeRcoehNp+zGb14=; b=Q+rjbu5sZ633FJ+MvJRW/ipiwztsp8112kvQAzqf8+kh8earDBdXjfyjwKoPeTSLe6 v6f0Bl8/d8UWyqpxiy1YqHBfgsk+YmjGnchtEkoaUdpcxnY0EE+G8D1ithPXx46XIUg0 lBjkfsRiJKXOL6PIqfpQ2XILL/Hbp3rU2TAn0ehJOKQYmi6/TcKquv1V80sniZzPit4y w4uVYd9xGfBV2j986dPEcr2dum5xBY4z31QN1yEGJHj2XxxLrBCYIiSyU1Embyq/2bzN /heYtt49ZnC8ZFsV/Ms4uIcfDfklx0Po3+QolTrsJ96ALlwc/FVBPunQClBfqP7XRrlg /m0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a190-v6si2917004pgc.241.2018.09.05.12.38.06; Wed, 05 Sep 2018 12:38:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728262AbeIFAJm (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:42 -0400 Received: from mail-oi0-f65.google.com ([209.85.218.65]:42571 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728237AbeIFAJl (ORCPT ); Wed, 5 Sep 2018 20:09:41 -0400 Received: by mail-oi0-f65.google.com with SMTP id k81-v6so15916221oib.9; Wed, 05 Sep 2018 12:38:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XSLGQ9uqdAn4wTY6t09Z9k1WYMJrEeRcoehNp+zGb14=; b=qOnEtPzxHa9mvw8XvkK4/zDt5kveZn+IfJIBlXQS8AHq9iAx5Vx8pFQxSbNTSuviaE hsCQgW/fEWchWRYMJ3ATA/HW7xr5pOTfg7zojNYjmwvTtYaJXq4tOB3y43A6P+iBahQE npg8XR3W30eh5HzxgnStOaPrBskRpljUytEFLMSNZzYhQDXq9fYZ1hCeNEAXUp2FeZu0 C9ZCMwRSDnj0VIHbXYafAfCka6r98TiZaph1IWcN6FTUoUbNr0S3628j1kYzmZ3vzTqO yAOP9Q/epiwiy/8O3tFlp5xdkZAsPNyyHpcTMKcM+o5cZNR2a5fyWtQdT4nKEt645ycI 1Rhg== X-Gm-Message-State: APzg51DPv/hSkJZ5XX+2Td1eRTFAU1sbm1OeS/uGf/gvY0anPXRhwjpH G6eyhOZZ/QTMclocbx4cwtaNQ+Y= X-Received: by 2002:aca:3fc2:: with SMTP id m185-v6mr31989616oia.240.1536176283327; Wed, 05 Sep 2018 12:38:03 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.38.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:38:02 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Frank Rowand Subject: [PATCH 20/21] of: use for_each_of_cpu_node iterator Date: Wed, 5 Sep 2018 14:37:37 -0500 Message-Id: <20180905193738.19325-21-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This has the side effect of defaulting to iterating using "cpu" node names in preference to the deprecated (for FDT) device_type == "cpu". Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. drivers/of/base.c | 2 +- drivers/of/of_numa.c | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) -- 2.17.1 diff --git a/drivers/of/base.c b/drivers/of/base.c index 6389aeb2f48c..8285c07cab44 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -389,7 +389,7 @@ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread) { struct device_node *cpun; - for_each_node_by_type(cpun, "cpu") { + for_each_of_cpu_node(cpun) { if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread)) return cpun; } diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c index 27d9b4bba535..f165fe28f49d 100644 --- a/drivers/of/of_numa.c +++ b/drivers/of/of_numa.c @@ -24,18 +24,9 @@ static void __init of_numa_parse_cpu_nodes(void) { u32 nid; int r; - struct device_node *cpus; - struct device_node *np = NULL; - - cpus = of_find_node_by_path("/cpus"); - if (!cpus) - return; - - for_each_child_of_node(cpus, np) { - /* Skip things that are not CPUs */ - if (of_node_cmp(np->type, "cpu") != 0) - continue; + struct device_node *np; + for_each_of_cpu_node(np) { r = of_property_read_u32(np, "numa-node-id", &nid); if (r) continue; @@ -46,8 +37,6 @@ static void __init of_numa_parse_cpu_nodes(void) else node_set(nid, numa_nodes_parsed); } - - of_node_put(cpus); } static int __init of_numa_parse_memory_nodes(void) From patchwork Wed Sep 5 19:37:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 146035 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340435ljw; Wed, 5 Sep 2018 12:38:08 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdar2hBvDdyaO/vx4tEj6xvSFK6ou/y6YRmppe1k5K5Aq2ntzRmwr+F7/EcKC8+uqxpIgcXt X-Received: by 2002:a62:59d5:: with SMTP id k82-v6mr41824176pfj.143.1536176288176; Wed, 05 Sep 2018 12:38:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176288; cv=none; d=google.com; s=arc-20160816; b=wuG3JO8KagCKl800TYQIGqVQEL+mgF47UQvvwnCYiLVelNwm9Ii1wrI4hSrUv6Faan WkRfBffhYs59d58uRldpEhm08NZ1KOLc7ZxqA74mK1i1Tgsnr9B5L2/Ket+LOlLJ3myE P0M6LHniGQqx209stRoVL3M+kQf8eedCndAdu/t+GWNCaRfQwoHFFyBBL64r3mRZhFqH yKmM5q1nbv3sfJPvN7z+42FaCAOP2imchoa4jELlItlTKCcszN82lTpyBfahSk5mxua/ iyXRLQBfy9+CK12XBmFzN91DdROdnLDNPOcpvDbDqeUTDTRxteACeBNo6kczG7bPHlWc MSPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=cs4PYL4EAbXhqa1/+qufL34SyOAY8TU08a3FgFNoxjw=; b=vIR5wQMbBvuPdZi8VeCNl25kRMtwGjg4xDqihQE4jrOByXH1Ap1Q+zOJIl1HHd5b2W pTDWwaYtuDuCMq1twNjHwAR8gTd/5n3m7CykJwDayMSSKdznHyleblbbZgPeorY8+BnD Wvq0vevSFJIJPpAQ50uAVFij3l7mdhBMO9kZfna80f1uDBzFaDlpK8kTypSgXAgGsJxw rUL45+27G7AareP4MIsnHsd1cBkl3c5slTExhAKYipsNkYOH/8RlF5jKkjIlFtURD8i7 M7KGt5C0yqfGVApMa/oI354JYz0pvDrnlfovO21YucxUDa20yhGZffsiNPXYcA+6SU0f q02w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8-v6si2971664pli.14.2018.09.05.12.38.07; Wed, 05 Sep 2018 12:38:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728280AbeIFAJn (ORCPT + 32 others); Wed, 5 Sep 2018 20:09:43 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:38208 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728264AbeIFAJm (ORCPT ); Wed, 5 Sep 2018 20:09:42 -0400 Received: by mail-oi0-f67.google.com with SMTP id x197-v6so15934019oix.5; Wed, 05 Sep 2018 12:38:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cs4PYL4EAbXhqa1/+qufL34SyOAY8TU08a3FgFNoxjw=; b=NlR3W54sTK8/O9n3dOhM3yPvMPjexCEXfeoNeqRVI5HY+48hUXGG7fwlC9V8YCfJkE IjgAxQMUZ34bRe6NERQoxkoeD+ZoEbOcBR0c++BWd4Hp6IrGj7n/VaANL+d0LsydZUmj 4+wr1mV9/qM4ZYHSu6Fb1wo2zB8W/brapm5fBOLUib5uLIeswy2y17cwf/7LjN7rt1sp jRkbaG7t54ZzHmGvMV9DkMGCC/j9N4GZwUdfq42coo2mHeJB3aSo6tl5kKE4vIgZh/2w kP4bxyr7PpXxOyPAFt6dhmjB+rPgFyeOGpBp3GyM8cAyMoSORCNF91+U8f+JyAeOCpkc XYzw== X-Gm-Message-State: APzg51DUurTojTThhXdAOkxy1lIoOGTT7wCFAxKgQ/wBOKP7+xigVcLe 95cTeBqLzf3gmdEVp6AphImvT7E= X-Received: by 2002:aca:b904:: with SMTP id j4-v6mr33255174oif.89.1536176284356; Wed, 05 Sep 2018 12:38:04 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.38.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:38:03 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Timur Tabi , Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 21/21] fbdev: fsl-diu: get cpu node with of_get_cpu_node Date: Wed, 5 Sep 2018 14:37:38 -0500 Message-Id: <20180905193738.19325-22-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Cc: Timur Tabi Cc: Bartlomiej Zolnierkiewicz Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. drivers/video/fbdev/fsl-diu-fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c index bc9eb8afc313..332a56b6811f 100644 --- a/drivers/video/fbdev/fsl-diu-fb.c +++ b/drivers/video/fbdev/fsl-diu-fb.c @@ -1925,7 +1925,7 @@ static int __init fsl_diu_init(void) pr_info("Freescale Display Interface Unit (DIU) framebuffer driver\n"); #ifdef CONFIG_NOT_COHERENT_CACHE - np = of_find_node_by_type(NULL, "cpu"); + np = of_get_cpu_node(0, NULL); if (!np) { pr_err("fsl-diu-fb: can't find 'cpu' device node\n"); return -ENODEV;