From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rywhl45v1zDrJM for ; Tue, 26 Jul 2016 08:21:43 +1000 (AEST) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6PMJbtd035581 for ; Mon, 25 Jul 2016 18:21:42 -0400 Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) by mx0a-001b2d01.pphosted.com with ESMTP id 24c545wf5x-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 25 Jul 2016 18:21:41 -0400 Received: from localhost by e33.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 25 Jul 2016 16:21:41 -0600 Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id 1A30E1FF0049 for ; Mon, 25 Jul 2016 16:21:22 -0600 (MDT) To: linuxppc-dev@lists.ozlabs.org Cc: Nathan Fontenot , Michael Bringmann From: Michael Bringmann Subject: [PATCH 7/8] powerpc: Check arch.vec earlier during boot for memory features Date: Mon, 25 Jul 2016 17:21:38 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Message-Id: <0721e01a-13b8-674f-3e0b-a9016f620baf@linux.vnet.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , architecture.vec5 features: The boot-time memory management needs to know the form of the "ibm,dynamic-memory-v2" property early during scanning of the flattened device tree. This patch moves execution of the function pseries_probe_fw_features() early enough to be before the scanning of the memory properties in the device tree to allow recognition of the supported properties. Signed-off-by: Michael Bringmann --- diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h index 9d86c66..e4c5076 100644 --- a/arch/powerpc/include/asm/opal.h +++ b/arch/powerpc/include/asm/opal.h @@ -215,6 +215,8 @@ extern int early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data); extern int early_init_dt_scan_recoverable_ranges(unsigned long node, const char *uname, int depth, void *data); +extern int pseries_probe_fw_features(unsigned long node, + const char *uname, int depth, void *data); extern int opal_get_chars(uint32_t vtermno, char *buf, int count); extern int opal_put_chars(uint32_t vtermno, const char *buf, int total_len); diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 946e34f..2034edc 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -777,6 +777,7 @@ void __init early_init_devtree(void *params) of_scan_flat_dt(early_init_dt_scan_chosen_ppc, boot_command_line); /* Scan memory nodes and rebuild MEMBLOCKs */ + of_scan_flat_dt(pseries_probe_fw_features, NULL); of_scan_flat_dt(early_init_dt_scan_root, NULL); of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 9883bc7..f554205 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c @@ -736,7 +736,7 @@ static void pseries_power_off(void) * Called very early, MMU is off, device-tree isn't unflattened */ -static int __init pseries_probe_fw_features(unsigned long node, +int __init pseries_probe_fw_features(unsigned long node, const char *uname, int depth, void *data) { @@ -770,6 +770,7 @@ static int __init pseries_probe_fw_features(unsigned long node, return hypertas_found && vec5_found; } +EXPORT_SYMBOL(pseries_probe_fw_features); static int __init pSeries_probe(void) {