Received: by 10.223.185.116 with SMTP id b49csp4046454wrg; Tue, 13 Feb 2018 11:50:12 -0800 (PST) X-Google-Smtp-Source: AH8x225w7T4ql5XatvWp7mu6GWkLnXL6s5AIosLw3qiiuszglFfdo0JqLY4I5aHUKdAKBn6ufVgG X-Received: by 2002:a17:902:be0f:: with SMTP id r15-v6mr2147789pls.1.1518551412748; Tue, 13 Feb 2018 11:50:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518551412; cv=none; d=google.com; s=arc-20160816; b=XAPq8unyCqmKP+Xgcc+jXhJuy/Pf9v4ehfPixekQXkbPZctEWMI/GLXyl7P2+AV2GU KgDQNHk1psnYQ8YKZumTL+gnKvx6wiG8TCB8zDNarOAVQpTEnuuFckbVeq+tARQv+Na4 txyGEpbY302pOl6lIwR807hItlq9vkcuH3n2sd/Wb417FZSNbB3chCBwKcSO1ARCuqkU M6i9Wpj0r5i6Lq6PK3AsHCWzx5iaADf/GIbNa+PNLQ2iDlGWk2HThajynCsSdMZXkzvP sX2Xi7VxL3ASguYMVc8GE8lXKVofBdJ+WUd7mvbAu4m6lo5y3f5Y8awDIjo0Oqx6HZ+m ecYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=Rjdu2wbekDgJdWk/5F/cBZYkgPjVDe31qyK+uAlIK9M=; b=EzkcJSdMZYUifVANkleF4wA5p59Immew0kvNqGTpsfn26mawP4NfsEZkfoiV82L0UZ 0H/hf6GNO/CZh+j1eGEl9E6CIaKYWP25aqC5O7K6rKVSgd1aD0SwKYZUfSPn8p/B9utR ldN6xxbuXZiJets7EJb4wyph8oBiWVgl/JVyuVNoQ+uYmX5FGwaAWjPPk6PBCXTbzVD8 Hgq6o7hyPqTyLOV0OykM+u5UGdVT7qNeIusfKYra+s/nqg+vb+JXdRUOyRQmZEceU+Zx rnghGbLqgtRqoPPaqfSW+Sh7Xaz9ncsY/QqoQwPyTYZUWCkqmAzmGZuGKL9p74KjMlgA RNGQ== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4-v6si1622822pln.121.2018.02.13.11.49.57; Tue, 13 Feb 2018 11:50:12 -0800 (PST) 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965624AbeBMTtT (ORCPT + 99 others); Tue, 13 Feb 2018 14:49:19 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:53740 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965551AbeBMTtR (ORCPT ); Tue, 13 Feb 2018 14:49:17 -0500 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1DJi7u0007299 for ; Tue, 13 Feb 2018 14:49:17 -0500 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0b-001b2d01.pphosted.com with ESMTP id 2g43cmycw2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 13 Feb 2018 14:49:16 -0500 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 13 Feb 2018 12:49:15 -0700 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 13 Feb 2018 12:49:13 -0700 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w1DJnCtN9765172; Tue, 13 Feb 2018 12:49:12 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BD3E5136040; Tue, 13 Feb 2018 12:49:12 -0700 (MST) Received: from oc6857751186.ibm.com (unknown [9.85.157.251]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id 3CF1913603A; Tue, 13 Feb 2018 12:49:11 -0700 (MST) Subject: Re: [PATCH 2/2] powerpc/pseries: Declare optional dummy function for find_and_online_cpu_nid To: Guenter Roeck , Benjamin Herrenschmidt Cc: linux-kernel@vger.kernel.org, Michael Bringmann , Paul Mackerras , Nathan Fontenot , linuxppc-dev@lists.ozlabs.org References: <1518474848-3158-1-git-send-email-linux@roeck-us.net> <1518474848-3158-2-git-send-email-linux@roeck-us.net> From: Tyrel Datwyler Date: Tue, 13 Feb 2018 11:49:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <1518474848-3158-2-git-send-email-linux@roeck-us.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 18021319-0020-0000-0000-00000D70A211 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008528; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000253; SDB=6.00989255; UDB=6.00502300; IPR=6.00768610; BA=6.00005827; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00019537; XFM=3.00000015; UTC=2018-02-13 19:49:14 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18021319-0021-0000-0000-00006018A835 Message-Id: <943e73c6-cadb-cf9e-9c7f-a7b687e7177a@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-02-13_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1802130235 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/12/2018 02:34 PM, Guenter Roeck wrote: > Commit e67e02a544e9 ("powerpc/pseries: Fix cpu hotplug crash with > memoryless nodes") adds an unconditional call to find_and_online_cpu_nid(), > which is only declared if CONFIG_PPC_SPLPAR is enabled. This results in > the following build error if this is not the case. > > arch/powerpc/platforms/pseries/hotplug-cpu.o: In function `dlpar_online_cpu': > arch/powerpc/platforms/pseries/hotplug-cpu.c:369: > undefined reference to `.find_and_online_cpu_nid' > > Follow the guideline provided by similar functions and provide a dummy > function if CONFIG_PPC_SPLPAR is not enabled. This also moves the external > function declaration into an include file where it should be. > > Fixes: e67e02a544e9 ("powerpc/pseries: Fix cpu hotplug crash with ...") > Cc: Michael Bringmann > Cc: Michael Ellerman > Cc: Nathan Fontenot > Signed-off-by: Guenter Roeck Nathan already sent a patch on the 9th for this issue to the list. -Tyrel > --- > arch/powerpc/include/asm/topology.h | 5 +++++ > arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 -- > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h > index 88187c285c70..52815982436f 100644 > --- a/arch/powerpc/include/asm/topology.h > +++ b/arch/powerpc/include/asm/topology.h > @@ -82,6 +82,7 @@ static inline int numa_update_cpu_topology(bool cpus_locked) > extern int start_topology_update(void); > extern int stop_topology_update(void); > extern int prrn_is_enabled(void); > +extern int find_and_online_cpu_nid(int cpu); > #else > static inline int start_topology_update(void) > { > @@ -95,6 +96,10 @@ static inline int prrn_is_enabled(void) > { > return 0; > } > +static inline int find_and_online_cpu_nid(int cpu) > +{ > + return 0; > +} > #endif /* CONFIG_NUMA && CONFIG_PPC_SPLPAR */ > > #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_NEED_MULTIPLE_NODES) > diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c > index dceb51454d8d..f5c6a8cd2926 100644 > --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c > +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c > @@ -340,8 +340,6 @@ static void pseries_remove_processor(struct device_node *np) > cpu_maps_update_done(); > } > > -extern int find_and_online_cpu_nid(int cpu); > - > static int dlpar_online_cpu(struct device_node *dn) > { > int rc = 0; >