From patchwork Thu Jun 22 20:19:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Tatashin X-Patchwork-Id: 779688 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wttGC1hdzz9s8H for ; Fri, 23 Jun 2017 06:19:15 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751546AbdFVUTO (ORCPT ); Thu, 22 Jun 2017 16:19:14 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:26951 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbdFVUTO (ORCPT ); Thu, 22 Jun 2017 16:19:14 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v5MKJ9pJ017350 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Jun 2017 20:19:10 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id v5MKJ9dK014156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Jun 2017 20:19:09 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v5MKJ8qc017043; Thu, 22 Jun 2017 20:19:09 GMT Received: from ca-ldom103.us.oracle.com (/10.129.68.23) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 22 Jun 2017 13:19:08 -0700 From: Pavel Tatashin To: sparclinux@vger.kernel.org, davem@davemloft.net Subject: [v1] sparc64: fix typo in property Date: Thu, 22 Jun 2017 16:19:04 -0400 Message-Id: <1498162744-840346-1-git-send-email-pasha.tatashin@oracle.com> X-Mailer: git-send-email 1.7.1 X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org There is a typo in a comment that propogated into code: upa-portis instead of upa-portid This problem was detected by code inspection, and I am not sure if it effects any current systems. It was not reproduced by QEMU. It is likely that all existing implementations of OpenBoot have cpuid property in cpu node. Signed-off-by: Pavel Tatashin Reported-by: Steven Sistare Reviewed-by: Steven Sistare --- arch/sparc/kernel/prom_64.c | 2 +- arch/sparc/kernel/time_64.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/sparc/kernel/prom_64.c b/arch/sparc/kernel/prom_64.c index 20cc5d8..baeaeed 100644 --- a/arch/sparc/kernel/prom_64.c +++ b/arch/sparc/kernel/prom_64.c @@ -381,7 +381,7 @@ bool arch_find_n_match_cpu_physical_id(struct device_node *cpun, int this_cpu_id; /* On hypervisor based platforms we interrogate the 'reg' - * property. On everything else we look for a 'upa-portis', + * property. On everything else we look for a 'upa-portid', * 'portid', or 'cpuid' property. */ diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index f584c53..564f0e4 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c @@ -175,8 +175,8 @@ static unsigned long cpuid_to_freq(phandle node, int cpuid) if (prom_getproperty(node, "device_type", type, sizeof(type)) != -1) is_cpu_node = (strcmp(type, "cpu") == 0); - /* try upa-portis then cpuid to get cpuid, see prom_64.c */ - if (is_cpu_node && (prom_getint(node, "upa-portis") == cpuid || + /* try upa-portid then cpuid to get cpuid, see prom_64.c */ + if (is_cpu_node && (prom_getint(node, "upa-portid") == cpuid || prom_getint(node, "cpuid") == cpuid)) freq = prom_getintdefault(node, "clock-frequency", 0); if (!freq)