Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1482imm; Wed, 5 Sep 2018 12:41:29 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZGzmTt0TjatFUJ0JuRiHlDpA74/pcDVAPqOJlFw9PSk9w5M89nFLu2s+qzGwDEEgF+OhvJ X-Received: by 2002:a63:f902:: with SMTP id h2-v6mr38232838pgi.154.1536176489717; Wed, 05 Sep 2018 12:41:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176489; cv=none; d=google.com; s=arc-20160816; b=Tl2I6j9DNgKZuBHgOrmN8ofcABIuiUdWA0eBS0nVNnE7d60kWrvjTfarHJHaErTlSt OMXVV7570BctYr/g3Uri6WnmfOh28Jr5iLQD8DaP7zvgFyH9VH/Wyhz9mjTgvs0dzAcP JvLilYzjlYNJ9lDZkuXQT1g79c4UyDPSWNqmjtLdH5w3hYhixuN1ogbuOcrQQq8lWRfx J2JilXVVWMZBabLzaq/KmA0XssB4azCytzhBoBIZh43ghIZbdgJlH2hev+bXhgVEa8H+ ndhoeJK17rJwP+l62FYPStS98RcUet2TcwQ3hfnne/5t2AbiaNoRoh23YUTWDeFSviYP yjuQ== 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 l63-v6si2906159pfg.326.2018.09.05.12.41.14; Wed, 05 Sep 2018 12:41:29 -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 S1727984AbeIFAJV (ORCPT + 99 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(+) 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; -- 2.17.1