From patchwork Fri Jan 26 23:53:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766584 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7F255914E; Fri, 26 Jan 2024 23:55:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313359; cv=none; b=JFYqb7RLVK5Oi3ul6bxC9EhrNKLs1s87REgyWvweT2EE48w9FwLb6OMTZmz+eBsxp9es/S2HsMWz4gOULfFlhyn12YTaa0KyR6gvLBWvYTGLu6G/aOEXr4LTcOqMGw7IDB6+d/08kd8qyiRlym47Ar45jBxYkOEFhrQhR61yJhU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313359; c=relaxed/simple; bh=+dLXzKA3GHsTNHgH7evQv80RkHciu+n+ZaSAz/AR0/c=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=EJQAvosZJ6IMTFHIvlBuuQPmLXDZOAphYrhQsj2Oe2+ldQtDkgIP9I1Iu4HNpr1vbh4d2oDaXQQ8huYXvCT0Ym1NEBv/GWYbepGTXLYUpC6Nqn51pfiYh7U5FEoEnrHrZA7Mn/doH9mLcnOIW8b9k2Zw9aFwtBgKIQ1s8iJLI2U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Y0JDkIMt; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Y0JDkIMt" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNf8t2022118; Fri, 26 Jan 2024 23:55:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=yHkSFlkLJD2JCjneLpD2 tGeP0zrZRJG5TSxIZCtLSpU=; b=Y0JDkIMtaYC79/V7DC96ZtZEioCLG+Pt7de/ JXSIEQHYMBBRwrL8DmsZZEIIi+6Rtwbl+fELpq5ZB+DAtfpJRvTCRdVp5X89UiSe KpCF6+0Efad0OXMdXtKuHwy2Zd1kZN29w/O1lEdAC4VtjMHX17UTedy48b7w/pac 5EzAuF2Bi43P9lxLhbI4RH5R0F4gfr8LbV/YM54AoXuLWQZvjzWPMpr8G7rDiICm lYZGPcDJYPWar/PI/2owSJuQs4HHXEAbowfi69L4FnoIGBWO5pySeBFcRKkohQIB qtwRfjzSCTEELSvZ9iIX8adw5Os01Y06QF1XoQxVwN6PSdMAeg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4nrad0m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:02 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt1JU009985 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:01 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:54:57 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 01/46] of: reserved_mem: Change the order that reserved_mem regions are stored Date: Fri, 26 Jan 2024 15:53:40 -0800 Message-ID: <20240126235425.12233-2-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: Dj5TYbGUioxz3V2ly4mHhjQfPVNWhSRr X-Proofpoint-GUID: Dj5TYbGUioxz3V2ly4mHhjQfPVNWhSRr X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Some architectures such as arm64 require the page tables to be setup before memblock allocated memory is writable. Therefore, the dynamic allocation of the reserved_mem array will need to be done after the page tables have been setup on these architectures. In most cases this will be after paging_init(). Reserved memory regions can be divided into 2 groups. i) Statically-placed reserved memory regions i.e. regions defined in the DT using the @reg property. ii) Dynamically-placed reserved memory regions. i.e. regions specified in the DT using the @alloc_ranges and @size properties. It is possible to call memblock_reserve() and memblock_mark_nomap() on the statically-placed reserved memory regions and not need to save them to the reserved_mem array until memory is allocated for it using memblock, which will be after the page tables have been setup. For the dynamically-placed reserved memory regions, it is not possible to wait to store its information because the starting address is allocated only at run time, and hence they need to be stored somewhere after they are allocated. Waiting until after the page tables have been setup to allocate memory for the dynamically-placed regions is also not an option because the allocations will come from memory that have already been added to the page tables, which is not good for memory that is supposed to be reserved and/or marked as nomap. Therefore, the processing of the reserved memory regions is split up into two stages, of which the first stage is carried out by early_init_fdt_scan_reserved_mem() and the second is carried out by fdt_init_reserved_mem(). The early_init_fdt_scan_reserved_mem(), which is called before the page tables are setup is used to: 1. Call memblock_reserve() and memblock_mark_nomap() on all the statically-placed reserved memory regions as needed. 2. Allocate memory from memblock for the dynamically-placed reserved memory regions and store them in the static array for reserved_mem. memblock_reserve() and memblock_mark_nomap() are also called as needed on all the memory allocated for the dynamically-placed regions. fdt_init_reserved_mem() is now used to carry out the following: 1. Add the information for the statically-placed reserved memory into reserved_mem array. 2. Run the region specific init functions for each of the reserve memory regions saved in the reserved_mem array. Since fdt_init_reserved_mem() is called from within early_init_fdt_scan_reserved_mem(), subsequent patches will make changes to separate both functions and call fdt_init_reserved_mem() after the page tables have been setup were needed. Signed-off-by: Oreoluwa Babatunde --- drivers/of/fdt.c | 78 +++++++++++++++++++++++++++++---- drivers/of/of_private.h | 2 +- drivers/of/of_reserved_mem.c | 54 ++++++++++------------- include/linux/of_fdt.h | 1 + include/linux/of_reserved_mem.h | 9 ++++ 5 files changed, 104 insertions(+), 40 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index bf502ba8da95..d02884ec0b6b 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -504,7 +504,6 @@ static int __init __reserved_mem_reserve_reg(unsigned long node, phys_addr_t base, size; int len; const __be32 *prop; - int first = 1; bool nomap; prop = of_get_flat_dt_prop(node, "reg", &len); @@ -532,10 +531,6 @@ static int __init __reserved_mem_reserve_reg(unsigned long node, uname, &base, (unsigned long)(size / SZ_1M)); len -= t_len; - if (first) { - fdt_reserved_mem_save_node(node, uname, base, size); - first = 0; - } } return 0; } @@ -564,11 +559,62 @@ static int __init __reserved_mem_check_root(unsigned long node) } /* - * fdt_scan_reserved_mem() - scan a single FDT node for reserved memory + * Save the reserved_mem reg nodes in the reserved_mem array + */ +void __init fdt_scan_reserved_mem_reg_nodes(void) + +{ + int t_len = (dt_root_addr_cells + dt_root_size_cells) * sizeof(__be32); + const void *fdt = initial_boot_params; + phys_addr_t base, size; + const __be32 *prop; + int node, child; + int len; + + node = fdt_path_offset(fdt, "/reserved-memory"); + if (node < 0) { + pr_err("Reserved memory: Did not find reserved-memory node\n"); + return; + } + + if (__reserved_mem_check_root(node) != 0) { + pr_err("Reserved memory: unsupported node format, ignoring\n"); + return; + } + + fdt_for_each_subnode(child, fdt, node) { + const char *uname; + + prop = of_get_flat_dt_prop(child, "reg", &len); + if (!prop) + continue; + + if (!of_fdt_device_is_available(fdt, child)) + continue; + + uname = fdt_get_name(fdt, child, NULL); + if (len && len % t_len != 0) { + pr_err("Reserved memory: invalid reg property in '%s', skipping node.\n", + uname); + continue; + } + + base = dt_mem_next_cell(dt_root_addr_cells, &prop); + size = dt_mem_next_cell(dt_root_size_cells, &prop); + + if (size) + fdt_reserved_mem_save_node(child, uname, base, size); + } +} + +/* + * fdt_scan_reserved_mem() - scan a single FDT node for reserved memory. */ static int __init fdt_scan_reserved_mem(void) { int node, child; + int dynamic_nodes_cnt = 0; + int dynamic_nodes[MAX_RESERVED_REGIONS]; const void *fdt = initial_boot_params; node = fdt_path_offset(fdt, "/reserved-memory"); @@ -590,8 +636,24 @@ static int __init fdt_scan_reserved_mem(void) uname = fdt_get_name(fdt, child, NULL); err = __reserved_mem_reserve_reg(child, uname); - if (err == -ENOENT && of_get_flat_dt_prop(child, "size", NULL)) - fdt_reserved_mem_save_node(child, uname, 0, 0); + + /* Delay allocation of the dynamically-placed regions + * until after all other statically-placed regions have + * been reserved or marked as nomap + */ + if (err == -ENOENT && of_get_flat_dt_prop(child, "size", NULL)) { + dynamic_nodes[dynamic_nodes_cnt] = child; + dynamic_nodes_cnt++; + } + } + + for (int i = 0; i < dynamic_nodes_cnt; i++) { + const char *uname; + + child = dynamic_nodes[i]; + uname = fdt_get_name(fdt, child, NULL); + + __reserved_mem_alloc_size(child, uname); } return 0; } diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index f38397c7b582..542e37a37a24 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -36,6 +36,7 @@ struct alias_prop { #endif #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 +#define MAX_RESERVED_REGIONS 64 extern struct mutex of_mutex; extern raw_spinlock_t devtree_lock; @@ -175,7 +176,6 @@ static inline struct device_node *__of_get_dma_parent(const struct device_node * } #endif -void fdt_init_reserved_mem(void); void fdt_reserved_mem_save_node(unsigned long node, const char *uname, phys_addr_t base, phys_addr_t size); diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 7ec94cfcbddb..d62f1956024c 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -26,7 +26,6 @@ #include "of_private.h" -#define MAX_RESERVED_REGIONS 64 static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS]; static int reserved_mem_count; @@ -132,8 +131,7 @@ static int __init __reserved_mem_alloc_in_range(phys_addr_t size, * __reserved_mem_alloc_size() - allocate reserved memory described by * 'size', 'alignment' and 'alloc-ranges' properties. */ -static int __init __reserved_mem_alloc_size(unsigned long node, - const char *uname, phys_addr_t *res_base, phys_addr_t *res_size) +int __init __reserved_mem_alloc_size(unsigned long node, const char *uname) { int t_len = (dt_root_addr_cells + dt_root_size_cells) * sizeof(__be32); phys_addr_t start = 0, end = 0; @@ -212,10 +210,7 @@ static int __init __reserved_mem_alloc_size(unsigned long node, uname, (unsigned long)(size / SZ_1M)); return -ENOMEM; } - - *res_base = base; - *res_size = size; - + fdt_reserved_mem_save_node(node, uname, base, size); return 0; } @@ -310,6 +305,8 @@ void __init fdt_init_reserved_mem(void) { int i; + fdt_scan_reserved_mem_reg_nodes(); + /* check for overlapping reserved regions */ __rmem_check_for_overlap(); @@ -328,30 +325,25 @@ void __init fdt_init_reserved_mem(void) if (prop) rmem->phandle = of_read_number(prop, len/4); - if (rmem->size == 0) - err = __reserved_mem_alloc_size(node, rmem->name, - &rmem->base, &rmem->size); - if (err == 0) { - err = __reserved_mem_init_node(rmem); - if (err != 0 && err != -ENOENT) { - pr_info("node %s compatible matching fail\n", - rmem->name); - if (nomap) - memblock_clear_nomap(rmem->base, rmem->size); - else - memblock_phys_free(rmem->base, - rmem->size); - } else { - phys_addr_t end = rmem->base + rmem->size - 1; - bool reusable = - (of_get_flat_dt_prop(node, "reusable", NULL)) != NULL; - - pr_info("%pa..%pa (%lu KiB) %s %s %s\n", - &rmem->base, &end, (unsigned long)(rmem->size / SZ_1K), - nomap ? "nomap" : "map", - reusable ? "reusable" : "non-reusable", - rmem->name ? rmem->name : "unknown"); - } + err = __reserved_mem_init_node(rmem); + if (err != 0 && err != -ENOENT) { + pr_info("node %s compatible matching fail\n", + rmem->name); + if (nomap) + memblock_clear_nomap(rmem->base, rmem->size); + else + memblock_phys_free(rmem->base, + rmem->size); + } else { + phys_addr_t end = rmem->base + rmem->size - 1; + bool reusable = + (of_get_flat_dt_prop(node, "reusable", NULL)) != NULL; + + pr_info("%pa..%pa (%lu KiB) %s %s %s\n", + &rmem->base, &end, (unsigned long)(rmem->size / SZ_1K), + nomap ? "nomap" : "map", + reusable ? "reusable" : "non-reusable", + rmem->name ? rmem->name : "unknown"); } } } diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index d69ad5bb1eb1..7b2a5d93d719 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h @@ -73,6 +73,7 @@ extern int early_init_dt_scan_root(void); extern bool early_init_dt_scan(void *params); extern bool early_init_dt_verify(void *params); extern void early_init_dt_scan_nodes(void); +extern void fdt_scan_reserved_mem_reg_nodes(void); extern const char *of_flat_dt_get_machine_name(void); extern const void *of_flat_dt_match_machine(const void *default_match, diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index 4de2a24cadc9..2a3178920bae 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h @@ -32,12 +32,14 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); #define RESERVEDMEM_OF_DECLARE(name, compat, init) \ _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) +void fdt_init_reserved_mem(void); int of_reserved_mem_device_init_by_idx(struct device *dev, struct device_node *np, int idx); int of_reserved_mem_device_init_by_name(struct device *dev, struct device_node *np, const char *name); void of_reserved_mem_device_release(struct device *dev); +int __reserved_mem_alloc_size(unsigned long node, const char *uname); struct reserved_mem *of_reserved_mem_lookup(struct device_node *np); #else @@ -45,6 +47,8 @@ struct reserved_mem *of_reserved_mem_lookup(struct device_node *np); #define RESERVEDMEM_OF_DECLARE(name, compat, init) \ _OF_DECLARE_STUB(reservedmem, name, compat, init, reservedmem_of_init_fn) +static inline void fdt_init_reserved_mem(void) { } + static inline int of_reserved_mem_device_init_by_idx(struct device *dev, struct device_node *np, int idx) { @@ -60,6 +64,11 @@ static inline int of_reserved_mem_device_init_by_name(struct device *dev, static inline void of_reserved_mem_device_release(struct device *pdev) { } +static inline int __reserved_mem_alloc_size(unsigned long node, const char *uname) +{ + return -ENOSYS; +} + static inline struct reserved_mem *of_reserved_mem_lookup(struct device_node *np) { return NULL; From patchwork Fri Jan 26 23:53:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766579 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E1A260891; Fri, 26 Jan 2024 23:56:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; cv=none; b=EgXJtVkDIK8TljsU4MOiK//eUG5tCY2KdQFPfjRRGxB6357/2AraSKvA9cVLeLj9G9e2pZHJFBY50bkVtDezPGzsorsflCSE3M3wjDHvHrwigdFWp5c4iD40yKtyTyiFbhNaNiQ94dT3pcBsl15HLVxm0uYLRK7Sx6yyMnuQrLE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; c=relaxed/simple; bh=NjEBBPmts20IxnmpGdS5v6kjIG4dAFLZZeM15CX6CZE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=QMpq7L/v2/3a5WJjikxuTcy4gtM9CnJY58UXRBceOtGG4MaJxAdtwt1T6Xfrz6vqEymF77PjSdKmP6DUFSf6Hr7ce9s/aUF3kkl1ocF0CBl8kfd8u7iYIlq/ovasY0b4D2ePsL1kl2TliYhzWFG4Hg4sGuDLD5GtfrAE3+GeSw0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Q9MFmI/0; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Q9MFmI/0" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNt2ql006015; Fri, 26 Jan 2024 23:55:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=kZa2Pe53+6g14o/QY6sX E+C2csDopSUWS/8cevqSYa0=; b=Q9MFmI/0qU7Eq7vCH9+LsoEjT4jkmvBEFP2b V18Uay8A2aX+UFs/VwyhFxWowzM3v8cV5nhv+GwYFeaOiirDeMnz9s5XRgGatEzH 5F8/c3YnxJDch0cP5O9Njt2C0LGiXnQHSZXn3NDNrFvDeSVnOUxhozcWHu+OKdQs juoHbzv2Kc2xncvwVClwqNQBCTPdhJuSuO4glagnQ2jfkG1ip9IZbMuNijR0S8qM 3Wv9mwMv3F6tfydwy5ofXznCETy3pZ64cQgVItgWKDHz0exYXfNaKmSjJvlgRbDd yn4jEw320ZG8nha5IDM/fruFWxh735g9QGqsClRIp3EpkLWc2g== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4f9jd0a-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:02 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt1JV009985 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:01 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:54:57 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 02/46] of: reserved_mem: Introduce new early reserved memory scan function Date: Fri, 26 Jan 2024 15:53:41 -0800 Message-ID: <20240126235425.12233-3-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: U2-fU3rRD1n6fc8VYjNIwksODXsmUq9K X-Proofpoint-GUID: U2-fU3rRD1n6fc8VYjNIwksODXsmUq9K X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 priorityscore=1501 impostorscore=0 mlxscore=0 suspectscore=0 mlxlogscore=452 spamscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Introduce new reserved memory scan function called early_fdt_scan_reserved_mem() which is a clone of the original early_init_fdt_scan_reserved_mem() function, but does not call fdt_init_reserved_mem() at the end. This will allow architectures to separate the first stage of the reserved memory processing which is done by early_init_fdt_scan_reserved_mem() from the second stage of the reserved memory processing which is done by fdt_init_reserved_mem(). Signed-off-by: Oreoluwa Babatunde --- drivers/of/fdt.c | 27 +++++++++++++++++++++++++++ include/linux/of_fdt.h | 2 ++ 2 files changed, 29 insertions(+) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index d02884ec0b6b..6bda033936af 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -711,6 +711,33 @@ void __init early_init_fdt_scan_reserved_mem(void) fdt_init_reserved_mem(); } +/** + * early_fdt_scan_reserved_mem() - create reserved memory regions + * + * This function grabs memory from early allocator for device exclusive use + * defined in device tree structures. It should be called by arch specific code + * once the early allocator (i.e. memblock) has been fully activated. + */ +void __init early_fdt_scan_reserved_mem(void) +{ + int n; + u64 base, size; + + if (!initial_boot_params) + return; + + fdt_scan_reserved_mem(); + fdt_reserve_elfcorehdr(); + + /* Process header /memreserve/ fields */ + for (n = 0; ; n++) { + fdt_get_mem_rsv(initial_boot_params, n, &base, &size); + if (!size) + break; + memblock_reserve(base, size); + } +} + /** * early_init_fdt_reserve_self() - reserve the memory used by the FDT blob */ diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 7b2a5d93d719..9b849c5c3917 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h @@ -63,6 +63,7 @@ extern int early_init_dt_scan_memory(void); extern void early_init_dt_check_for_usable_mem_range(void); extern int early_init_dt_scan_chosen_stdout(void); extern void early_init_fdt_scan_reserved_mem(void); +extern void early_fdt_scan_reserved_mem(void); extern void early_init_fdt_reserve_self(void); extern void early_init_dt_add_memory_arch(u64 base, u64 size); extern u64 dt_mem_next_cell(int s, const __be32 **cellp); @@ -88,6 +89,7 @@ extern void early_get_first_memblock_info(void *, phys_addr_t *); static inline void early_init_dt_check_for_usable_mem_range(void) {} static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; } static inline void early_init_fdt_scan_reserved_mem(void) {} +static inline void early_fdt_scan_reserved_mem(void) {} static inline void early_init_fdt_reserve_self(void) {} static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } static inline void unflatten_device_tree(void) {} From patchwork Fri Jan 26 23:53:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766588 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 618F5481B9; Fri, 26 Jan 2024 23:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; cv=none; b=bxI7pB8++Qbx2PZSgvX1VdeEasJiL1wl/aQk+uy3syIEUVwm9AmOmBrUusAoZUnNFEqSwP4qXf1p3xVpKCIRaLJ/Hjeew2uDPXDb7DCfpGnpDnBZoQfcQc4oWiZpvjTUR1wgE+kW2WjRvC34PFZm3tXNOxAonVrrIhDkbR9T3C0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; c=relaxed/simple; bh=ONtrm6R2V6s330NX24r9fohE5uKqpWTjEdCapV2pVlo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=h/A99/MGez+j0FjDE4Reb3qCxbcUp6YWT4rKsfcV2LOWY1sh+i6SVr9hdPHPoDEJtbIG8dSTEN7Dwt3BYYy6dwdtLfF7LjOLjCsr7tBBE42lzocRZTPYdJKnswPgQLhAlp4CED2b7IaIaoyrP7tzwGtUAPWj6pO0cnvbSEYaiAM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=DZh1sery; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="DZh1sery" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNFGM5000561; Fri, 26 Jan 2024 23:55:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=CYGPa6HCLDQH93au0PnQ 9A1HcHQ+bX43VIg/AvMOFCk=; b=DZh1seryCtl06KZoy15bb09RwDhtGF+wpYzG gXDOw3n9l8Hn+57E51AxaYuGWj9movkrRrk50rJawPy6/AyB3UtSAYRHBcZgtiZr neU94rjAExhOyA18jkzZWSinUnTn/VJYip4eW4aMax/wfqgmbi2rV1VJwz+XDa9I CZB301rCdqkdTQ3KjFJlHNBxuPwFwYA9l1b047HHInGsiU3rvp/0F7sGowjmTcZF L2FQRj5g2aW1WmhhA3p9RnX2LSmwW2Vm7EQCaFJPHRUO0z8DgXNOYf1Ehh1RkGVb SVUOy7zUILodwhFiAmrnc+haUAzo+S7qFAxoby9PDtXDChmHtA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvfc8h01b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:02 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt1TV010026 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:01 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:54:58 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 03/46] ARC: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:42 -0800 Message-ID: <20240126235425.12233-4-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Tj7EuhYxTjHT1Em1biSBx4kYC9Cl95-l X-Proofpoint-ORIG-GUID: Tj7EuhYxTjHT1Em1biSBx4kYC9Cl95-l X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 adultscore=0 clxscore=1015 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=582 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Call early_fdt_scan_reserved_mem() in place of early_init_fdt_scan_reserved_mem() to carry out the first stage of the reserved memory processing only. The early_fdt_scan_reserved_mem() function is used to scan through the DT and mark all the reserved memory regions as reserved or nomap as needed, as well as allocate the memory required by the dynamically-placed reserved memory regions. The second stage of the reserved memory processing is done by fdt_init_reserved_mem(). This function is used to store the information of the statically-placed reserved memory nodes in the reserved_mem array as well as call the region specific initialization function on all the stored reserved memory regions. The call to fdt_init_reserved_mem() is placed after setup_arch_memory() in preparation for the dynamic allocation of the reserved_mem array using memblock. This is because memblock allocated memory is not writable until after the page tables have been setup on the arc architecture. Signed-off-by: Oreoluwa Babatunde --- arch/arc/kernel/setup.c | 3 +++ arch/arc/mm/init.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index d08a5092c2b4..44f00e8e16cd 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -523,6 +524,8 @@ void __init setup_arch(char **cmdline_p) setup_processor(); setup_arch_memory(); + fdt_init_reserved_mem(); + /* copy flat DT out of .init and then unflatten it */ unflatten_and_copy_device_tree(); diff --git a/arch/arc/mm/init.c b/arch/arc/mm/init.c index 6a71b23f1383..8cd86259d9ae 100644 --- a/arch/arc/mm/init.c +++ b/arch/arc/mm/init.c @@ -118,7 +118,7 @@ void __init setup_arch_memory(void) #endif early_init_fdt_reserve_self(); - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); memblock_dump_all(); From patchwork Fri Jan 26 23:53:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766580 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C78EC60879; Fri, 26 Jan 2024 23:56:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; cv=none; b=qZKQrMGOgAHc9VWm/17QNL0ApdANHlQaqzDPlOZ/6L2i0otqetReaEQte87qPDYBbmnKEW4Z/fuRxcHm14JOS1PbwhB9CZ7K9sHN4Yfb//oSwZlLLPm5rKqyewIBBFr8Jvpku1qfNPe7u8NXteOpixwj6xeG7kUsl0s5AqN/T1w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; c=relaxed/simple; bh=uL5+npRYaSGCnMh8Fm60HV+nRAhoajM/Hs2+4VxFmnA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=l33YgTTWkDrNwvKU0M22L+W4FXysy2PrxF8TuPDhbucW96wJnyP/oGadyhvH7X5qWv6QAuMWIjXqR1n1D5xLDoKrR9dFy+6GRWcit9sDNmElgOiba5rlOXAV8cKfyljqYoKaWWFPFbHO8apgYpCh0avr22xgmHrMaKuA4xSF2dw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=TGwA/Y/I; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="TGwA/Y/I" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNdYat008658; Fri, 26 Jan 2024 23:55:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=KCJm0dJ1lEjoehqyNacn zNbiUGF+gV0ewKaAufw0NKM=; b=TGwA/Y/IOpjea7SusS+lNyIzwywxvfjmllUl wgBrIVsObxapGh1OBC8vlJjtw49qO/ILnbDFTr2mKhVHgmf15tNZQpqR6gZ/BglB /5lX1r6eESQZhGlM39TCQ3DIU6a1oJ4OQrx/PL3a+4V3k1VPD4o1DoAriKGAEVsV hwMmJ11LoGF68u0HF+LVcthtOupmQFXQJUtL3Y9DDwFxM0dm1i7yePLGt0lQzCbm VQSamZ7nE8mlq5FAeoaKRhy5sJUgtc6GiBSqmqFbzNwm9OzNCybabNTQtqR2IZb4 DMJssDpjT5dRROQGUfZR+4lNFqxmIrdsv0bnb/+9VcAn+4ohZg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjx88dm8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:05 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt43Q011314 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:04 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:54:59 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 06/46] csky: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:45 -0800 Message-ID: <20240126235425.12233-7-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 76b69Fyi_LVahkFNXdLy-ZNB-4Dp2px2 X-Proofpoint-GUID: 76b69Fyi_LVahkFNXdLy-ZNB-4Dp2px2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 priorityscore=1501 adultscore=0 phishscore=0 clxscore=1015 malwarescore=0 suspectscore=0 mlxlogscore=738 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Call early_fdt_scan_reserved_mem() in place of early_init_fdt_scan_reserved_mem() to carry out the first stage of the reserved memory processing only. The early_fdt_scan_reserved_mem() function is used to scan through the DT and mark all the reserved memory regions as reserved or nomap as needed, as well as allocate the memory required by the dynamically-placed reserved memory regions. The second stage of the reserved memory processing is done by fdt_init_reserved_mem(). This function is used to store the information of the statically-placed reserved memory nodes in the reserved_mem array as well as call the region specific initialization function on all the stored reserved memory regions. The call to fdt_init_reserved_mem() is placed after setup_arch_memory() in preparation for the dynamic allocation of the reserved_mem array using memblock. This is because memblock allocated memory is not writable until after the page tables have been setup on the csky architecture. Signed-off-by: Oreoluwa Babatunde --- arch/csky/kernel/setup.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c index 51012e90780d..4e2b739ac968 100644 --- a/arch/csky/kernel/setup.c +++ b/arch/csky/kernel/setup.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -22,7 +23,7 @@ static void __init csky_memblock_init(void) memblock_reserve(__pa(_start), _end - _start); early_init_fdt_reserve_self(); - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); memblock_dump_all(); @@ -72,6 +73,8 @@ void __init setup_arch(char **cmdline_p) csky_memblock_init(); + fdt_init_reserved_mem(); + unflatten_and_copy_device_tree(); #ifdef CONFIG_SMP From patchwork Fri Jan 26 23:53:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766575 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E60060B8F; Fri, 26 Jan 2024 23:56:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; cv=none; b=EzVGIbfj0qC7FSXnnxN0ngLuuS9zBiGQ5sDywTxUwpOOdkT2ZU3rBA/BYRbbIW2xhdjG/GUfyYWRVY78VuzyOWDWmV2PKh5BwmWo3s6BBrFNUN+akaJ6qsMgxYWWwXfZKuAXxGQwZj7p3N3O1k5oE243+sTDn0GW3xx9N9+sPkU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; c=relaxed/simple; bh=oVNU15qC16YaS2uCRkKXpDWVLLgd3P0pIWqagmXdBMM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rCX7L3a43ewAlfN6VRhJtjbRn41i90ebDo8eOZYmTKW/Bu/xKCZsgoVFW0K6fYRjedoz5P++SD/nATjY0ck0oZK61Cava7dMJYc12KvBcbxh6PlAGanejNz8RXv5f5QzwRo/RnSF0mpCttaryt6Rkj/esnn1mL0RXxCr3rZdwyo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=GjgSbFTT; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="GjgSbFTT" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNt5TQ028752; Fri, 26 Jan 2024 23:55:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=T3DjNUlLclRRSxUX+FF8 745CWeIU93BibdyqAGILJoQ=; b=GjgSbFTTGQ/HN0iWI3cgW+MBA6dak3/88u13 5ptkFzVdILA/nC4Q1LNv7vIkqlYYCgfZmmNDEUcUIp6Rc+XqK9eNZRo7C0xamKA3 RwQY8aPOWTjF50p1EX2VKzhG3jVnJ9T7O0NUXuoFe98JXEb2SN7Nt8/4+SbCFoH2 qR+1BY1cFoJ/VQOsouN73kpqpsniqsajlpcE5nyot4PWGNTIu9zSzYm5IOHObeSs E7G/2DuX/qWHYxmr8xRoM1j2/T7XPBZpWXc6sh6NCoofSiqf6iGx5M+JPURH/S7B syg3rbo67kG/52xFHHZp41WI5/XbIjWO7hXprQQiETO1V36u7w== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv8e89uxa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:05 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt43S011314 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:04 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:54:59 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 07/46] Loongarch: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:46 -0800 Message-ID: <20240126235425.12233-8-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 464t_X2bvbRs9OhyGDQ_riVstaAZ3xkC X-Proofpoint-ORIG-GUID: 464t_X2bvbRs9OhyGDQ_riVstaAZ3xkC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 phishscore=0 spamscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=632 impostorscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Call early_fdt_scan_reserved_mem() in place of early_init_fdt_scan_reserved_mem() to carry out the first stage of the reserved memory processing only. The early_fdt_scan_reserved_mem() function is used to scan through the DT and mark all the reserved memory regions as reserved or nomap as needed, as well as allocate the memory required by the dynamically-placed reserved memory regions. The second stage of the reserved memory processing is done by fdt_init_reserved_mem(). This function is used to store the information of the statically-placed reserved memory nodes in the reserved_mem array as well as call the region specific initialization function on all the stored reserved memory regions. The call to fdt_init_reserved_mem() is placed right after early_fdt_scan_reserved_mem() since memblock allocated memory should already be writable at this point. Signed-off-by: Oreoluwa Babatunde --- arch/loongarch/kernel/setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c index edf2bba80130..72b164d3ace0 100644 --- a/arch/loongarch/kernel/setup.c +++ b/arch/loongarch/kernel/setup.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -390,8 +391,9 @@ static void __init arch_mem_init(char **cmdline_p) check_kernel_sections_mem(); - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); + fdt_init_reserved_mem(); /* * In order to reduce the possibility of kernel panic when failed to * get IO TLB memory under CONFIG_SWIOTLB, it is better to allocate From patchwork Fri Jan 26 23:53:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766570 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9246C664C9; Fri, 26 Jan 2024 23:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313372; cv=none; b=F8TFEasTFPP5iRrJ10sLeyQBIv1EO4sQWPp3agxfhwiNKt9jHBW+RUuy7eUV7YoGs+bC7fvm2nGE+ZzzA6NcDTC4XUkkiiQMN5Zu34JSBvQO0JSvkq7NMAf+uYc984BK5flyBE9igfUdkb6TnHCAzV+O9w0yW6sfCNkjQxdW4Dk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313372; c=relaxed/simple; bh=jKWC7B28H1JalI1Fgriwlg4heR38wHwseI3hCbXy8cA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VDEQqRvN1IyiLDfW/4GxrhDgkxpzGD3/KllKOwX7unuUujNr05C1q7dAInkr9xZJZSaYkr8IvUREcfgbkBrGQLIdwXUGVr3EuSbtrMy5mi8T5rR4u36XQhyK0hERwHVE6d3bKt13TQEwZZUQ1D2gvpssY9X9C+VE/m1jeh/QPfw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=anw6k/Jk; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="anw6k/Jk" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNqddO019345; Fri, 26 Jan 2024 23:55:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=zeUxzUumBvjgi1Mu/sc1 56Nea3aBso1ghvF6G53PO+Q=; b=anw6k/JkVeEm6mwMvBj/X789STNlfvG/zsVM mah+vm7Zc+G/gBBxbyUdkafn7J656TXtFBZgf0jqDOnOunNfCjYv3YEb12WvW76i QcN3B5ZEpklwYjwn97R8d3Gs0ZEqF6pNjnNjvPNgBvNENGOW8E7NgjV8IkgA03t0 ZqzgNFuqRUkbnYfMRZHbPxMe/BtE8fjDP+N59ryPv3pSC7KwrJJmma0Yllr35+Ki bndo9z/7MS9z0fWWrP6nQ0QFOHXLu5yBuBR2MLR/EZQApPHLF9lvo0VFTiXo8Es3 xV7xJMmpSUywzGUfvHOOIrdPoS3R9M3Euz7ddkPAoBB5iXPhRA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv6c8j5x1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:05 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt43R011314 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:04 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:54:59 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 08/46] microblaze: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:47 -0800 Message-ID: <20240126235425.12233-9-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: ikUUN6btbAKQUQ66Yukzl8AuOh23gQVJ X-Proofpoint-ORIG-GUID: ikUUN6btbAKQUQ66Yukzl8AuOh23gQVJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=881 priorityscore=1501 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Call early_fdt_scan_reserved_mem() in place of early_init_fdt_scan_reserved_mem() to carry out the first stage of the reserved memory processing only. The early_fdt_scan_reserved_mem() function is used to scan through the DT and mark all the reserved memory regions as reserved or nomap as needed, as well as allocate the memory required by the dynamically-placed reserved memory regions. The second stage of the reserved memory processing is done by fdt_init_reserved_mem(). This function is used to store the information of the statically-placed reserved memory nodes in the reserved_mem array as well as call the region specific initialization function on all the stored reserved memory regions. The call to fdt_init_reserved_mem() is placed after setup_memory() in preparation for the dynamic allocation of the reserved_mem array using memblock. This is because memblock allocated memory is not writable until after the page tables have been setup on the microblaze architecture. Signed-off-by: Oreoluwa Babatunde --- arch/microblaze/kernel/setup.c | 3 +++ arch/microblaze/mm/init.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index f417333eccae..631faa4613ec 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -54,6 +55,8 @@ void __init setup_arch(char **cmdline_p) setup_memory(); + fdt_init_reserved_mem(); + console_verbose(); unflatten_device_tree(); diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c index 3827dc76edd8..9e73a1433dfa 100644 --- a/arch/microblaze/mm/init.c +++ b/arch/microblaze/mm/init.c @@ -262,7 +262,7 @@ asmlinkage void __init mmu_init(void) parse_early_param(); - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); /* CMA initialization */ dma_contiguous_reserve(memory_start + lowmem_size - 1); From patchwork Fri Jan 26 23:53:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766587 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 619B158232; Fri, 26 Jan 2024 23:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; cv=none; b=ImfR5pwLdx0hvosD+8UCma5VObpC1A6Q8/sSxvKIxjCrXgCgmNLzEqXP2PRZ2F0ed6Qb6ThcznvdKJrSWOwiVy0yYlAE6t+9xMiRihkGuQXdviE5MhFHbzlTbJllzCi1+/AH5IwQO9Dkse3b6r4D93JUZ7d4FQbjnWCywarQWSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; c=relaxed/simple; bh=9oAjT6eGilm06NGiGDpM3OUuJSSSbHjIaZGn12tBeUU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Ssn1JS5SJeGtxS+Z7yRFHGCxYMKS19xki+arRzLaAH0K9EyVRRUIXfCdyzRfmwAmoAABJwN2ePQUVJ8U33WvpDKBcYsDrE+DeHRMrtReAhFFZFAMbJaHf0SkJRgXTRBiTyUlsmvyQ31Mzi/cvDKPwMesQy9dYkzKkuABZKkzOUM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=mA62snqA; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="mA62snqA" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNf8t3022118; Fri, 26 Jan 2024 23:55:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=V0LEvpWcWygNAyG9WGDn fp0Gm0ltd++h0qHGAExwYhc=; b=mA62snqAlGQC4QpudaSR/kUKojXSWQE+SjeV v/zl6ClTFt5gpmgAmlx10hYXzfwku/HiLM/KFAaXkPQmYj3wvaS69ymSRHCh8qG2 wcgBcM9aUzsBJX++bE2Y+YgpgSZAwuNVamVT7NR9Ub0qCB7bJ/E/kG57nM6+Zd3h X64H21/nSJB/OSchBCRCHnF0OXcx2Uas1TkL5+wN6msaba+N9z4nSdZfSB7jAowX 3CdFsoehkAY2jODahUgQdEzj6956J0w/bZKPubSwWTKDMR/o8zUqFEGMEXxiTEJJ lHgaHt2lm7bMMLCDIA5UfAFnEh84Zq5kVt1UgfrM3GfQWxFKyQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4nrad0r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:05 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt43T011314 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:04 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:00 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 09/46] mips: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:48 -0800 Message-ID: <20240126235425.12233-10-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: S6wU07rNBCx7nZxx8XMNpsvpLyLtyokP X-Proofpoint-GUID: S6wU07rNBCx7nZxx8XMNpsvpLyLtyokP X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 mlxlogscore=613 spamscore=0 mlxscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Call early_fdt_scan_reserved_mem() in place of early_init_fdt_scan_reserved_mem() to carry out the first stage of the reserved memory processing only. The early_fdt_scan_reserved_mem() function is used to scan through the DT and mark all the reserved memory regions as reserved or nomap as needed, as well as allocate the memory required by the dynamically-placed reserved memory regions. The second stage of the reserved memory processing is done by fdt_init_reserved_mem(). This function is used to store the information of the statically-placed reserved memory nodes in the reserved_mem array as well as call the region specific initialization function on all the stored reserved memory regions. The call to fdt_init_reserved_mem() is placed right after early_fdt_scan_reserved_mem() because memblock allocated memory should be writable at this point. Signed-off-by: Oreoluwa Babatunde --- arch/mips/kernel/setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 9c30de151597..13e862151d5f 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -649,7 +650,8 @@ static void __init arch_mem_init(char **cmdline_p) check_kernel_sections_mem(); early_init_fdt_reserve_self(); - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); + fdt_init_reserved_mem(); #ifndef CONFIG_NUMA memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0); From patchwork Fri Jan 26 23:53:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766586 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6192D50A83; Fri, 26 Jan 2024 23:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; cv=none; b=KdI51lKKwe4k26wtZD0Ysz+1m50CMxZowGDZhk7m/UDDP//9yo/o/S2fiYWogTux6O9Kj+FHRAeLV2+171peq0oBByT1ptHsVeKZFlw3CL46p1YklMF+2MU7AIwd684azkCrAqjdKytaFYigl9h4ZvarX9+VoZeJbatfX5pxqgA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; c=relaxed/simple; bh=ZNkzYdVcT9Nj04++eh+mZpfKJlksh208udi2p7YM9nc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WVA18zHQQBxUrRaLWXxN4MLnarfPZLRShPJu7yngPmm7V7pSoM4qzfX3nMD1t9FiLxYi27s5ZIusDbHlN0aClfPr/2Y6zlD0g0//ribXEyC9zKYrywO4oPVP7n7RHTy91lYGTnZXRpw6l//ZA/Hp7OO3p5Mg6Sxc6GCQpA9rTs8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=IJXMEjF7; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="IJXMEjF7" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNlaNo008339; Fri, 26 Jan 2024 23:55:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=mLHtTIAeQUQkSAuDL0y5 SXd0co7k212sKGf9Z9Z0dkk=; b=IJXMEjF7Uf9M13f2zhf24fnDEdGz2TWFg1C5 ytslMBmKHiRRUvHPq06O45ipCWGpxlwUfB4Dv3sf5zUPN+ndYcyKVOmjrFiWKC6r o7XiAe0hkK19QXXrUsT3cTKZ1cYyEiJGzmyCz74ABN0HqWcDYNQLa4KKXtmwWuCh O1JgwtOXbb9vrjsAsTiFsICD5YYNhV9pmkYnacNM+rs3Khz5HUvTgFnw4M+ZSRRM b/p7WJUZHsoYlTVjOgi41oE8jv1u1kJEu5UkJmIOWuokC+3EWaprIpKm96qnibae rzYFMeidAiXuzQfim+ZBE7j2EseLOpc59QoIIqIp3uh8LiDDgQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv6c8j5x3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:06 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt5Vs018478 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:05 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:01 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 11/46] openrisc: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:50 -0800 Message-ID: <20240126235425.12233-12-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: VfDk2Qj4FCxoMOSbNRk_TB2J9m4IVAI3 X-Proofpoint-ORIG-GUID: VfDk2Qj4FCxoMOSbNRk_TB2J9m4IVAI3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=638 priorityscore=1501 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Call early_fdt_scan_reserved_mem() in place of early_init_fdt_scan_reserved_mem() to carry out the first stage of the reserved memory processing only. The early_fdt_scan_reserved_mem() function is used to scan through the DT and mark all the reserved memory regions as reserved or nomap as needed, as well as allocate the memory required by the dynamically-placed reserved memory regions. The second stage of the reserved memory processing is done by fdt_init_reserved_mem(). This function is used to store the information of the statically-placed reserved memory nodes in the reserved_mem array as well as call the region specific initialization function on all the stored reserved memory regions. The call to fdt_init_reserved_mem() is placed right after early_fdt_scan_reserved_mem() because memblock allocated memory should already be writable at this point. Signed-off-by: Oreoluwa Babatunde --- arch/openrisc/kernel/setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c index 9cf7fb60441f..2c7059a0484b 100644 --- a/arch/openrisc/kernel/setup.c +++ b/arch/openrisc/kernel/setup.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -86,7 +87,8 @@ static void __init setup_memory(void) #endif /* CONFIG_BLK_DEV_INITRD */ early_init_fdt_reserve_self(); - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); + fdt_init_reserved_mem(); memblock_dump_all(); } From patchwork Fri Jan 26 23:53:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766569 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 144C0679FD; Fri, 26 Jan 2024 23:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313374; cv=none; b=JqHmyhfUldnTXJT9ltfiR0maAKMoJyKf0kpBkBdq38TTVcVdRLCgo1xGbeIbNgENBLvmQAGfL/6BM/T1Xpzpg5pAeYHTSB6Df9dsOeRWfcjziVVA0EWMn2S4JWU85ycO7eUsYwpQvUgxrvOggJK+2kCWV4YVqpuyhMKsxBeC/6w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313374; c=relaxed/simple; bh=yJXUlQL/ARISjkzK6hWcgvNkadHMiwxGCuBeeftmnbQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SnwnkVK5MZzHdjCr+Z5QeH9cykG73cLrxaVM/fQ60AgiriRFRKESYdnq4atmQGCeokBWNq6qEuPalxK1FiN8QJqfAag64lZtCF5nAXJQvD2hiUtPCQ8W1tVdOCeL+W4kD3DVhK3KgEAmJfF3YAq/H5c4wjTCeHyUJGv6+mRiohI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=YeV+7YJ8; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="YeV+7YJ8" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNaTjh020399; Fri, 26 Jan 2024 23:55:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=Rbfri0w8rs8j6hzJO9zw SwBaauq10llgtGmh4EGN4Iw=; b=YeV+7YJ8kD35EMtHgwAtiZc8T+CPXgMFIAYQ bhxWyLFAGvdKLYOr5gN5breKWYgDCM2C2hfqd54afS7CsQbwzKhA6BOw9thu/jM4 hKpw6SCMiMeQ1sz8mzAglfszGN2pWdZ1btjb19HY7epiH139vt4OecLhZGtABUm+ OlcpfDuFgUZp1+6E99b1wA70sE2F6yeP+IZG4RTf3r9eYZDt0G/7z/pi8xTTr/V2 h73w5yRhep79bqOxYAMytTSsPWpbOPG6B7GSU3ThKOvXI+SOnXMaBLdwXn/iUiUv 7jRsMrVlsDQ717LLS74eMv6c2t0JQKaKsBta3t5PboyOwsEAkQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv6c8j5x5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:11 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtAhO009370 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:10 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:02 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 14/46] sh: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:53 -0800 Message-ID: <20240126235425.12233-15-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: xWIxx8I7sp_MTzBvsRofwlpzt5Nk-qWs X-Proofpoint-ORIG-GUID: xWIxx8I7sp_MTzBvsRofwlpzt5Nk-qWs X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=470 priorityscore=1501 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Call early_fdt_scan_reserved_mem() in place of early_init_fdt_scan_reserved_mem() to carry out the first stage of the reserved memory processing only. The early_fdt_scan_reserved_mem() function is used to scan through the DT and mark all the reserved memory regions as reserved or nomap as needed, as well as allocate the memory required by the dynamically-placed reserved memory regions. The second stage of the reserved memory processing is done by fdt_init_reserved_mem(). This function is used to store the information of the statically-placed reserved memory nodes in the reserved_mem array as well as call the region specific initialization function on all the stored reserved memory regions. The call to fdt_init_reserved_mem() is placed right after early_fdt_scan_reserved_mem() because memblock allocated memory should already be writable at this point. Signed-off-by: Oreoluwa Babatunde --- arch/sh/boards/of-generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c index f7f3e618e85b..7bec409f077c 100644 --- a/arch/sh/boards/of-generic.c +++ b/arch/sh/boards/of-generic.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -110,7 +111,8 @@ static int noopi(void) static void __init sh_of_mem_reserve(void) { early_init_fdt_reserve_self(); - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); + fdt_init_reserved_mem(); } static void __init sh_of_setup(char **cmdline_p) From patchwork Fri Jan 26 23:53:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766585 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6197354FA7; Fri, 26 Jan 2024 23:55:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; cv=none; b=WVxFCkmS9RQCeptPOgLyeVAuM9fXVklY4bqUEuDX5cRIpsgpfym1Yte0c6TdQgYLSbRb347FfHrfI3rSuEQzi+xaOKhHDP+pIsOnkVB3Adua6xwp7kYjyb+YBJ6r0us+U3kLeAmlfWyXOcz5idDBsGGQVzKAI8F9RS+DREFCq3k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; c=relaxed/simple; bh=Pr/2dw3NNQzn+eavSLaFBPYnK/RIlj3Um9xBPV5ZSzI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ojc1jSxMYGRbR/wDtDf40d4vnwA2eV8Blr9qnBqB4kGmMCwzY8T4blaNxJB1XLT+SQA3fxC3Tuq5O0UtspsKV3WrDnpUkaMMTKmx3ugl5NL4ooGsva4EBsVepDEuhM3Ubl+WaFzwpx80l5vtK2gAHiOtXQEE/j1MK2GvcJW3v/U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Bdf+Zr9t; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Bdf+Zr9t" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QND1Cd010380; Fri, 26 Jan 2024 23:55:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=XHojE8I4UoGhN8L8CD1q TmSQB9PfOL1bfEmbuePPtGE=; b=Bdf+Zr9tzpVxmUZEDqkPk6BSSPwPO3B5PeIy Hyt/id2HAk9UH0n7kh81sFPkWXVuqWCIE02yMYHmDwp63diX4maAQDCS11I8ekMp DGQagjOHg5L47S5hyQPbZfSy7HK42QpH8FrhJ1QCeM/vKxSs6qZI2ldXt6Li7C5F yFmO7EwNcJmB/HunViV3oTW6gI24mgDl8PGR0WXh6cwNNAozs8OZ6OXxrIiA7eZx CZTarzkteJ6OT8N199g9L2vHzeFd9l2bScXGqRScadqXek/DDaRdp3JIU5EnpzhA nJ6dEAT+aJhRw3uQ0ApaSGtCI9MgCcaAdqTgnRELMGDcQwq7gQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv6c8j5x6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:11 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtAhQ009370 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:10 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:02 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 15/46] um: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:54 -0800 Message-ID: <20240126235425.12233-16-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: uMbJo1Fa0UGEPMJzo1jpXqVqEdpyLG5I X-Proofpoint-ORIG-GUID: uMbJo1Fa0UGEPMJzo1jpXqVqEdpyLG5I X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxlogscore=501 priorityscore=1501 bulkscore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 spamscore=0 suspectscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Call early_fdt_scan_reserved_mem() in place of early_init_fdt_scan_reserved_mem() to carry out the first stage of the reserved memory processing only. The early_fdt_scan_reserved_mem() function is used to scan through the DT and mark all the reserved memory regions as reserved or nomap as needed, as well as allocate the memory required by the dynamically-placed reserved memory regions. The second stage of the reserved memory processing is done by fdt_init_reserved_mem(). This function is used to store the information of the statically-placed reserved memory nodes in the reserved_mem array as well as call the region specific initialization function on all the stored reserved memory regions. The call to fdt_init_reserved_mem() is placed right after early_fdt_scan_reserved_mem() because memblock allocated memory should already be writable at this point. Signed-off-by: Oreoluwa Babatunde --- arch/um/kernel/dtb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/um/kernel/dtb.c b/arch/um/kernel/dtb.c index 484141b06938..3ecee151a083 100644 --- a/arch/um/kernel/dtb.c +++ b/arch/um/kernel/dtb.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -25,7 +26,8 @@ void uml_dtb_init(void) return; } - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); + fdt_init_reserved_mem(); unflatten_device_tree(); } From patchwork Fri Jan 26 23:53:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766583 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D5105C8FD; Fri, 26 Jan 2024 23:55:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313360; cv=none; b=q6yYY4PSdywBnl1/OUEg6DvJIRxNeQXQzqq+WRfX8lpIT+cUqccZCQDvLUEvhf3YiWs4C7ovsmRcPNb/ZnGgS7Hl/tE72HMKKk46FydBnYh50w7apMaQQFxbothXhR++IOCm0W88QB6pm8gbuehkER2bawVgCHpT0NwMPKpQZQE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313360; c=relaxed/simple; bh=V6Jfwdz7cfuw8xz0rOiPIfZC0VoGr7aTRGVEnL4nr9g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Yp1wC9tLsvh2Fm8X9lGpm4q5AIQHILUhB1SWKKvOI3M7SWnu0lgFAdpcnqCU8RxWuM8UlkUE4wF89RZMvbPppzxXFthcUFLYycCn/JBqRrVRYi2F/rcf+POw87rHOM6e/4gYcOmBbxHf82fIHh9IOXwla4yX8HrBnWMPN9WmE6A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=SNyeXf6R; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SNyeXf6R" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNofxh032435; Fri, 26 Jan 2024 23:55:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=RlnfElnCLOGgkR/BB4Cz dA5j3vD5FsmMJ5CohK/Sl8M=; b=SNyeXf6ROn3tbOZF0JFukSBRevxqeDuBXnja YmUdDf+jByNPIccaRTBYaHWOVWaawruRk0B1i7ZW6z4btrxO8KbQDJEAmM5jgfnl o6idmLlYNCjrJMWA2zx5a94bj3eVpUo2Az2e7nmh4MBGhPBagfqhuwwh4lL1x8do JkqYSb715JlWaKP2Va1T8QgwEhggUbVp5J0aVPjgzfX5pPshEf+i4w2n+spYvrZu 3j0en8rkqJXzkJuu8aQ1T4c2lWgv4znM69plR5Swbys5sXau0HS8owwytpjahBbr xxnA21o7ChruKXWNjrz9ZvvEFyFZSXBnxW38npKKK69RLPa8uw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv1q5aq5p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:13 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtCt8009378 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:12 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:03 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 17/46] of: reserved_mem: Delete the early_init_fdt_scan_reserved_mem() function Date: Fri, 26 Jan 2024 15:53:56 -0800 Message-ID: <20240126235425.12233-18-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: u75yF4T-XBMIScbnN8Ykb2WGNs7x1ki5 X-Proofpoint-GUID: u75yF4T-XBMIScbnN8Ykb2WGNs7x1ki5 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 phishscore=0 mlxlogscore=447 impostorscore=0 bulkscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260175 Delete the early_init_fdt_scan_reserved_mem() function definition since this function is no longer being used anywhere in the kernel. Signed-off-by: Oreoluwa Babatunde --- drivers/of/fdt.c | 29 ----------------------------- include/linux/of_fdt.h | 2 -- 2 files changed, 31 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 6bda033936af..c6e8560946f4 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -682,35 +682,6 @@ static void __init fdt_reserve_elfcorehdr(void) elfcorehdr_size >> 10, elfcorehdr_addr); } -/** - * early_init_fdt_scan_reserved_mem() - create reserved memory regions - * - * This function grabs memory from early allocator for device exclusive use - * defined in device tree structures. It should be called by arch specific code - * once the early allocator (i.e. memblock) has been fully activated. - */ -void __init early_init_fdt_scan_reserved_mem(void) -{ - int n; - u64 base, size; - - if (!initial_boot_params) - return; - - fdt_scan_reserved_mem(); - fdt_reserve_elfcorehdr(); - - /* Process header /memreserve/ fields */ - for (n = 0; ; n++) { - fdt_get_mem_rsv(initial_boot_params, n, &base, &size); - if (!size) - break; - memblock_reserve(base, size); - } - - fdt_init_reserved_mem(); -} - /** * early_fdt_scan_reserved_mem() - create reserved memory regions * diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 9b849c5c3917..9b85bbc5d9f5 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h @@ -62,7 +62,6 @@ extern int early_init_dt_scan_chosen(char *cmdline); extern int early_init_dt_scan_memory(void); extern void early_init_dt_check_for_usable_mem_range(void); extern int early_init_dt_scan_chosen_stdout(void); -extern void early_init_fdt_scan_reserved_mem(void); extern void early_fdt_scan_reserved_mem(void); extern void early_init_fdt_reserve_self(void); extern void early_init_dt_add_memory_arch(u64 base, u64 size); @@ -88,7 +87,6 @@ extern void early_get_first_memblock_info(void *, phys_addr_t *); #else /* CONFIG_OF_EARLY_FLATTREE */ static inline void early_init_dt_check_for_usable_mem_range(void) {} static inline int early_init_dt_scan_chosen_stdout(void) { return -ENODEV; } -static inline void early_init_fdt_scan_reserved_mem(void) {} static inline void early_fdt_scan_reserved_mem(void) {} static inline void early_init_fdt_reserve_self(void) {} static inline const char *of_flat_dt_get_machine_name(void) { return NULL; } From patchwork Fri Jan 26 23:53:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766582 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 768FF605B1; Fri, 26 Jan 2024 23:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313363; cv=none; b=UByQqs3eIAA3c4UsqcmTVykhUFJVsXRRJdftdltwVUWsI9ZxCVACJtndycEKNxRHqMxsNaR+PBCDHEqWwdrNyW4hE0+lGYCLgsDpq09a/Nb4tR1rITQBk6OwsT92ql42spmcQGM8gdogPynF+HOA0MeKcLcqsm26+uG8gKjVXk8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313363; c=relaxed/simple; bh=LwLfhikA2V5sel4Unu9QZvHOZyMmLFYcYNtw3RrbuoU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HOYswTonqjmRM+rLIx7sODkAFFUhgyvzI7Rej493roaTd1sXjYE6IJoZFPmoTYYYiFKsbPvSvzLF3nrcHDPUdJSrqy0U7dXTbAB27+izIMcXZ0nTOmBtNCfbADxT0bVy8jrX9lORp7r4K1Nf1lkxN52gCT6vJ5flgjipd8KqtIA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=hcdD+Yg4; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="hcdD+Yg4" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNF6mC009282; Fri, 26 Jan 2024 23:55:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=FYNloLSklg4we2MPnWB0 /vfF5RwFSqhW13Tgm/u/lCM=; b=hcdD+Yg4WcX9yBVHG9+Jv0amItAekixfgN4w fXjJDe7gxyPYum74aK++bq3BHjicTedyPopxay0PHMuMniMwerjEzJJtZrsNmQD/ c0bJ7YE1OEmrZeAvhkkSkEgfGr+T25XgQsTqMnHS8ci7UFWJVjJh+auMHwtJUvkq RVNriPZTzF1HdIZgmr02qUmVfJn+PyOHESgaCZUs0SOcOfxp8rY1hcws/FrdwVrQ Cj/EujeZr1o3em9MmRXG241lJDcLVtxrp1G1KEHWK9IhWjpk4RZ6+Li7A+KMziJk si6QxipgN1JE3CGij82EfAxeltSlERAtOvIW3RBnce0lbS6a+g== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvmmmg7w6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:19 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtI3Q011795 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:19 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:05 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 20/46] ARM: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:53:59 -0800 Message-ID: <20240126235425.12233-21-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: MPEXGYeegBck1ubRNy3mTzFc2f9Wh7_U X-Proofpoint-ORIG-GUID: MPEXGYeegBck1ubRNy3mTzFc2f9Wh7_U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=806 priorityscore=1501 malwarescore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 The unflattened devicetree structure is available to be used not long after the page tables have been set up on most architectures, and is available even before that on other architectures. Hence, move the call to fdt_init_reserved_mem() to after unflatten_device_tree() is called so that the reserved memory nodes can be accessed using the unflattened device tree APIs. Using the unflattened devicetree APIs is more efficient than using the flattened devicetree APIs. Signed-off-by: Oreoluwa Babatunde --- arch/arm/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 8cf3709ed985..36fa18e80ab3 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -1163,8 +1163,6 @@ void __init setup_arch(char **cmdline_p) paging_init(mdesc); - fdt_init_reserved_mem(); - kasan_init(); request_standard_resources(mdesc); @@ -1175,6 +1173,8 @@ void __init setup_arch(char **cmdline_p) unflatten_device_tree(); + fdt_init_reserved_mem(); + arm_dt_init_cpu_maps(); psci_dt_init(); #ifdef CONFIG_SMP From patchwork Fri Jan 26 23:54:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766577 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F237460888; Fri, 26 Jan 2024 23:56:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313366; cv=none; b=WKuGkmyY4T/qzbSsKnxzHM0ahesLzpy4TXFdUA2RjObuJwaJUDiMq84afiLLadhDrt04AK4y/MhfuvQlBQsyraTo2K8w+PLR8jEWI/S+98wt1+JcTPzk9MO94zylanKEoBTC2V51Nsj3J7ZKN0bsvboazvT3EnxYfj0Duyy7kpc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313366; c=relaxed/simple; bh=IvXl42prVu4MmfDVrGBT0dLUIOOiJ7h1Q8FhLVi0uLo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FqygtL+AYKgP+bA03aEGBh3uzSwJD/XNX/sv1aK3EKswPJ3whPgDolH70Bb/AlsPO3546DP1T/L6S04BydBMbP8CMpY2EIOhn7f7Xfq6F4IOCOmWCtiDJGLf1XF+IcQfEp+Q06IDGJj8td4WXhW08KMUmmBk9fnIU0+JIdo5J+Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=hZz07JCj; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="hZz07JCj" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QMNT1x023758; Fri, 26 Jan 2024 23:55:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=LZ6BeFYwTyGA42JiJKTJ 7xVnip2wtZSVAMFXMR+jBT4=; b=hZz07JCj5MIpnp3+eIuQ0YROpZbT2jxEcDOv 1b6EE+YmskBh0liJsumy4zR9E0XxgPGZyhaIW5BLNInGMV4MWMpzeDEkPI0VKVlm 0RK/7WNYQsDRhb32yVW/0uCxxQlCR0bgSNRDsGDcfa9UDsUYM+L4FzwuoUEq0cqu 2L+kvJBTgwAlZB2GeUzaMBvK7tk1EwPVENsDGSUfLocdOI1f5RpdVR/zQR2wOvTx V4GeZ9cuz7rChO1FLj0XvNpTQxcD/ei3SBcWh+pgG+L7/rAO7h8OHcdKrfAWkM9s 4cnRfx3+BXyrDvokEjSCVwd2vV10cfI6bu4LSALFCeAYELQfgg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvmmmg7wa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:23 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtMRU009460 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:23 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:08 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 24/46] mips: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:03 -0800 Message-ID: <20240126235425.12233-25-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: b5dZeBXAhbIMB9BYSz51qaTKW95eS3J2 X-Proofpoint-ORIG-GUID: b5dZeBXAhbIMB9BYSz51qaTKW95eS3J2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=919 priorityscore=1501 malwarescore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 The unflattened devicetree structure is available to be used not long after the page tables have been set up on most architectures, and is available even before that on other architectures. Hence, move the call to fdt_init_reserved_mem() to after unflatten_device_tree() is called so that the reserved memory nodes can be accessed using the unflattened device tree APIs. Using the unflattened devicetree APIs is more efficient than using the flattened devicetree APIs. Signed-off-by: Oreoluwa Babatunde --- arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 13e862151d5f..eeafc3abcb96 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -651,7 +651,6 @@ static void __init arch_mem_init(char **cmdline_p) early_init_fdt_reserve_self(); early_fdt_scan_reserved_mem(); - fdt_init_reserved_mem(); #ifndef CONFIG_NUMA memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0); @@ -672,6 +671,7 @@ static void __init arch_mem_init(char **cmdline_p) mips_parse_crashkernel(); device_tree_init(); + fdt_init_reserved_mem(); /* * In order to reduce the possibility of kernel panic when failed to * get IO TLB memory under CONFIG_SWIOTLB, it is better to allocate From patchwork Fri Jan 26 23:54:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766578 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C79E260882; Fri, 26 Jan 2024 23:56:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; cv=none; b=nEJnZIjpsyxfWWrkYZqe3BX/dd3dexeSLLhWFUDUFho6/W/zYDeV1qK5HIKpoTHZPKnRjFp5/QixLq++ZjzjGnhinEaa/NLnKVTwWD2F+STMb1FP/7LAyd/GEOGDGR9rrZn1xN2yCYfcX3hgpU35TUVFxAAZPlBvK3hovbkh7fE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; c=relaxed/simple; bh=Nx5mZZCMthF9FLC2WPNQgytt8JoakZVJNTD7u6CK6m4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MSkjaiM/NdtARiVCKuFCjah6IThRQ2Lj3QyjkNAbAuP+KeospFDenmbzuXYJuqNHJ7SmimkjIDMGUQCtwTk2NwsMarDr12Me6Hw3qH8P5LkQH+ZJmt90gZ3OLKKqcifvEWZp/8jNMfE4AcW92A+p5UHbSYnd5BwztXrEfA5rVrk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=AbBF+W0p; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="AbBF+W0p" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNoS3C030684; Fri, 26 Jan 2024 23:55:26 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=WrXR8pIcGToq5+tEyXOq U2zww97hFs/foHrPQe8HFUk=; b=AbBF+W0peuMqGIaDVSsbuxbzShEO3H+9cQy0 nI1A/Py62BuvFmupFEHn23n8erBMKkro2AR8yWJrjlPGxBus3WJIWhrIcz0bVVqM GFpt6uFxRNLq9kOAlxgQnikLKhNm6DvZwOsaBd2ths7O+Kz6qxxMlc+0h888iId/ uiju77O8hY1y2aw6vf20Hziig7YQKkhUMw643riToJMMbhdl2U7Zj8URI88uv2wu 61zSBxdbQSfKrttDpLJQYuB52/cldFaOCWfWHP+ll1LeCIxfAYrZSL4nMBBkZMKF 0vg4aXpWyG1izFZ7iSGqzbf7mabVVwQrXtP7ics885+hYFm7MA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjx88dn1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:26 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtPhg009489 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:25 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:10 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 27/46] riscv: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:06 -0800 Message-ID: <20240126235425.12233-28-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: dv6m4OaXsC8stWk9QvcBlbUU_DqnJl-W X-Proofpoint-GUID: dv6m4OaXsC8stWk9QvcBlbUU_DqnJl-W X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 priorityscore=1501 adultscore=0 phishscore=0 clxscore=1015 malwarescore=0 suspectscore=0 mlxlogscore=847 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 The unflattened devicetree structure is available to be used not long after the page tables have been set up on most architectures, and is available even before that on other architectures. Hence, move the call to fdt_init_reserved_mem() to after unflatten_device_tree() is called so that the reserved memory nodes can be accessed using the unflattened device tree APIs. Using the unflattened devicetree APIs is more efficient than using the flattened devicetree APIs. Signed-off-by: Oreoluwa Babatunde --- arch/riscv/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index ea4fbc8e0ea1..0601ed1e4ce6 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -262,8 +262,6 @@ void __init setup_arch(char **cmdline_p) efi_init(); paging_init(); - fdt_init_reserved_mem(); - /* Parse the ACPI tables for possible boot-time configuration */ acpi_boot_table_init(); @@ -272,6 +270,8 @@ void __init setup_arch(char **cmdline_p) #else unflatten_device_tree(); #endif + + fdt_init_reserved_mem(); misc_mem_init(); init_resources(); From patchwork Fri Jan 26 23:54:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766576 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 02B2360BB8; Fri, 26 Jan 2024 23:56:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; cv=none; b=ZfzXP6QPo11GitPeA598g99RKxjbX8cDTZ0XIddWDlD03/NUV22q9LM81RQuAOVkTSxK//fRAQBeDNXRsrP7JME7xWOCoc8ALW4EB6X/dTuxTbcDBfCXhYSLVT0a/uGdv2wvQP/hlyNY+6hXECTGbUcRZX9mwAsWfn1uIckGIt4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; c=relaxed/simple; bh=brbafm8zG5bEO6ZEygmDVNrOQ4rLu6L3K3hY55OGH6g=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=u4KLdEukLznMCzZSLKLCHftVJM1XUILkuicpK4HxznOk/KEZYtFpOMv8U5yQc28nChqPw6IerYcxuyTOTzViy9rXrK8LX3KcV33UyYT/1EPnA/M4JHVwEMXwDR/uQ5ZacK6wn2zULL/5jJhZo9T8s8vLgJgXd6GjPW+OqKMtTsI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=EU3S0Dqq; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="EU3S0Dqq" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QN0apG024428; Fri, 26 Jan 2024 23:55:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=Jx5Ie+iX+zXFm/ozaDr+ RC/Fds5b7kbGceiUXNurK/w=; b=EU3S0DqqbCzdko0yxhM17OuvDNhJjjbAibGR dGTZf3seauf4BuQi859+zBathzf7d5gV2AatItu4iG0y43j+zUyGDEKFwsUfX/Ym YFWSxM6VWzcxv4eLctUcXl79b1p+4HcZptVGwgH7tnJVfm0Jby+s6GHu5wUIYVe5 MPT26aP1v1vwmWVv8XuM154iypbNnZcVOpMAMb+x+UGaZG4xji6WfG/ODwIQwj9k rh1EpXkk20Hg2A8eCjQ8pgFiWjoqVi6tyNccLj7JG+HBqjcPXP9Eay1akU6Ptj/2 ArHCeB8QukOTqT/BdDDQ1KL0u0GB4+/4fGgM/ZKRrUBej2tj0Q== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjx88dn3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:28 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtRhM031159 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:28 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:11 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 29/46] xtensa: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:08 -0800 Message-ID: <20240126235425.12233-30-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 9v-ytk88Is-UUgQjGm6F456kfs80pTZy X-Proofpoint-GUID: 9v-ytk88Is-UUgQjGm6F456kfs80pTZy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 priorityscore=1501 adultscore=0 phishscore=0 clxscore=1015 malwarescore=0 suspectscore=0 mlxlogscore=820 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 The unflattened devicetree structure is available to be used not long after the page tables have been set up on most architectures, and is available even before that on other architectures. Hence, move the call to fdt_init_reserved_mem() to after unflatten_device_tree() is called so that the reserved memory nodes can be accessed using the unflattened device tree APIs. Using the unflattened devicetree APIs is more efficient than using the flattened devicetree APIs. Signed-off-by: Oreoluwa Babatunde --- arch/xtensa/kernel/setup.c | 2 ++ arch/xtensa/mm/init.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index bdec4a773af0..cb2fb993de76 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -25,6 +25,7 @@ #include #include #include +#include #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) # include @@ -357,6 +358,7 @@ void __init setup_arch(char **cmdline_p) kasan_init(); unflatten_and_copy_device_tree(); + fdt_init_reserved_mem(); #ifdef CONFIG_SMP smp_init_cpus(); #endif diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index ed3dd5f67b4a..e205a89a2097 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include @@ -49,7 +48,6 @@ void __init bootmem_init(void) memblock_reserve(0, PHYS_OFFSET ? PHYS_OFFSET : 1); early_fdt_scan_reserved_mem(); - fdt_init_reserved_mem(); if (!memblock_phys_mem_size()) panic("No memory found!\n"); From patchwork Fri Jan 26 23:54:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766567 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 331AE6D1DD; Fri, 26 Jan 2024 23:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313377; cv=none; b=NQbM0xCga0SIxwUqzVf7HzZc7ymbEu5zPe/bZJWKHWPKukuIOGRm1xt+qCtCG8N0vWqv+l4ZznE/r9uBWvR+uPhwOc+IMoHLz7Wi/d5NwrIMZ6W/7pTCvm+tfIql1Cv8eIh82MNANWYapcRP76x4+Abm1JQXRgkXyr02n4fmCx0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313377; c=relaxed/simple; bh=Mo9fC7G0IhySyT5rxxSj1wdkaKLDABhzcQsrhzzM7T0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PG3pb5VV5O71E9fOW4zzeTUId4XI0rRnfnfDjebsAkaRWIJ5chCbKtBCv1WJAFQ9wNGBfAj01XsLwwm90P9qTiuvRnj41jZYm/Nszt9TNGF/V05mpjsEv2/3XVlE7x3Z+1xk7OCWrLsy/ajOgTTHNG/5h2QqUIjAS8addK1n1ks= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=BWL89ILW; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="BWL89ILW" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNn0hx028514; Fri, 26 Jan 2024 23:55:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=wEjJ1brwR7C5+1GYNX57 qA6pmsMvaJpTSkLhKyrgky8=; b=BWL89ILWQU9rLyLX/wzMZfJWUtEWyn4MnyWI lmB2/HhjAuG9vOYhNcxNF6wBkuIr4n9l2B7ioydVnI8yWEsiOnFAvLUHA1TmvXj8 O0C1eh76QsFi/Ns6DpZOlUWU8XHc6b7+YPs3BN1eoHTD0GKc36H+BlSWXRhlPzFW iMd8hB+rTGKxP72zeLlUC9YIYEiRwaeUeoLIwh1z1PEVEeerVdu+PYec4ZU437sV rgn4BQhlAoGPVgz6R835fZqk28Mwp2KsEEXx3CpsW7X6pm6iulh4GZm/8aKdJlM4 LEz5uo8RkMepaU+kqnzoom1hVpiipzz0gWAgtoZsBnOlL0KYsw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjx88dn4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:29 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtSKg010339 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:28 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:13 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 32/46] ARC: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:11 -0800 Message-ID: <20240126235425.12233-33-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: bw-EAurOWR83dPp_RmpNuX3YmpYpETML X-Proofpoint-GUID: bw-EAurOWR83dPp_RmpNuX3YmpYpETML X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 spamscore=0 priorityscore=1501 adultscore=0 phishscore=0 clxscore=1015 malwarescore=0 suspectscore=0 mlxlogscore=589 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Switch from using fdt_init_reserved_mem() to dt_init_reserved_mem() to reflect the use of the unflatten devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- arch/arc/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index c5e3c4abb249..6b904771c158 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -527,7 +527,7 @@ void __init setup_arch(char **cmdline_p) /* copy flat DT out of .init and then unflatten it */ unflatten_and_copy_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); /* Can be issue if someone passes cmd line arg "ro" * But that is unlikely so keeping it as it is */ From patchwork Fri Jan 26 23:54:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766568 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB98767E89; Fri, 26 Jan 2024 23:56:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313374; cv=none; b=gAW+9qPgwJoJpxGrkwkB88oGEEIbMRwR1rlzvlFEQxGtkhAi1HaL+DcC6K2HBaQYyUmKQsuStJ/mozPJTGjxvtXSkIvNA4D1954IknwkP2OeF3ePqizqGtcj3UFKUW7GM2pGoTKM/87l2IhcmKhscNF6CmjKs1qcILNcXQy3d9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313374; c=relaxed/simple; bh=R+ANnIabqRB82b5lO+AqEy4U1OVXkcgTZ2MbuW4uH7o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ojvW5PMIZhaKD5fmqD5NTROCRLcfGvQwr8YIpy9ozNqu07+4qJl0BWi6tSu2hmnz0h+44DE/uILjChrkRhkSis4RM4VtjsYzvxyljHC1Mo/GsIg1wOAKoHdnnWqdBx6K1iSa9g+CiF2ZmQjhy+9FOEIWElcyvjZAJqhURC3ZSiY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=TaXmpWzd; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="TaXmpWzd" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNknKE025912; Fri, 26 Jan 2024 23:55:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=UlEeh0jWbYRswXXjxuRu 8UqJPd5Uy7WeBtqa0gKn6zI=; b=TaXmpWzd3d0dZM074YQJxw4ON9e6d5GrXULa fCtn4vk9a/e0UC//Gvn7nMBqSc23QfGcNhOI4v77oFKbe6ZPEfElA7iiaexqCkZw ZP90xcL/zDGgzX1k4ufr/Ea7W0QHmFNx3AFeS6IAeYKu0QykT+s95v2iFquOi23H uSWJKbiQHAQOmt+36bXTAmEjuK872I3k0zGFQ9a7kSUFtWu0c+uKDrHDN8piNUhH 9aezvR8ba/ckZ9zh4hCbU6nvARLAtDOg9hyyALdcZBiK36M/eoWMyCPGgi5KVk6A A7GzWjLLFlp3A9W0MyuQgRsnDFdw2Xqb4provZHNN2VZgAEinQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv1q5aq65-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:32 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtUwi018645 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:31 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:14 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 35/46] csky: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:14 -0800 Message-ID: <20240126235425.12233-36-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: JrQELaB-gW1XzdRO7kYg4cLcotydKxYf X-Proofpoint-GUID: JrQELaB-gW1XzdRO7kYg4cLcotydKxYf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 phishscore=0 mlxlogscore=635 impostorscore=0 bulkscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260175 Switch from using fdt_init_reserved_mem() to dt_init_reserved_mem() to reflect the use of the unflatten devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- arch/csky/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c index d8c65819877b..eefbbfdba535 100644 --- a/arch/csky/kernel/setup.c +++ b/arch/csky/kernel/setup.c @@ -75,7 +75,7 @@ void __init setup_arch(char **cmdline_p) unflatten_and_copy_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); #ifdef CONFIG_SMP setup_smp(); #endif From patchwork Fri Jan 26 23:54:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766565 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D3195B5CE; Fri, 26 Jan 2024 23:56:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313382; cv=none; b=DaAvfEkRmWMLIE/KxCR8ALbmz3pcravqQ+xyeKjKPGo8Cr9OND30rrhP0MLVclW5V6GOJrqeVnF5hfvBw4/ZGZK/VWP6R6BTcFu5v8xKPF+l8efJRgtacaE4165DP+OjrinIJ5wr32CZrqwQ3+giBFDGaiylUkzjXB/zIohLlBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313382; c=relaxed/simple; bh=eHTE7xp1qh2V+SH5Pd9/EyE+5vVp2lM1nsdlXMkolvw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=i19S3XVT0ygoV7zwKAO5P/NBwVNe96pAa6g6C53qd4KewB1qaEuniDZcSXi9MZvyZBp2h2Tr9RHq3hgeCHI1+sZgnP7OQy5lD5N6Jsdi3nBK1MOw5WEx5+WJi9vsT/UuiPenaVqZuSR7mVlfzcLEOtV2xvQOtZlOAg77Tv8u5jo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Qa9QBzlq; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Qa9QBzlq" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNlQvV020504; Fri, 26 Jan 2024 23:55:31 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=udFbvnZ/8iWY1ccpnC8W dx6byaiXLZjLgDnc7m/RrNY=; b=Qa9QBzlq4y0jvIxd4Dl+nfe3gCZzGxsR63Io iL1v5HBN+soa4JjlNkvfCoJYbzLxCrVjxSvH1b/kDO2ugBJixTgb10dxyAAcDtD5 wqcKFkXYcW0cA+JBtJL1oWYyfpMTleWLiUObqxaAF8u9LylEAAU0ZTdkw7swR4YM OkYIuJzI4xc3E78dKfXGSvkwK8QBa5QvBLwB3tVbkuX2l6uykZx/rO4m6Hzk/D6D 8RpcTUatQjBzu+NUpcsaeU8ZcCvhTijrHH/LHhK90dMY1j8ZHaJduOSMvSJhQf1J wI3ZGeABN7SHBzz1HvH0cUDtuU8JOFICUZRVCpP8jwfubMZbVg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjbg8g0u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:31 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtUwf018645 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:30 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:14 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 36/46] loongarch: reserved_mem: Switch fdt_init_reserved_mem to dt_init_reserved_mem Date: Fri, 26 Jan 2024 15:54:15 -0800 Message-ID: <20240126235425.12233-37-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: mN3_NNa9YQJiwYLtNFvBQ5sga5Qdvp6B X-Proofpoint-ORIG-GUID: mN3_NNa9YQJiwYLtNFvBQ5sga5Qdvp6B X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 priorityscore=1501 mlxlogscore=683 phishscore=0 impostorscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Switch from using fdt_init_reserved_mem() to dt_init_reserved_mem() to reflect the use of the unflatten devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- arch/loongarch/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/kernel/setup.c b/arch/loongarch/kernel/setup.c index 72b164d3ace0..fd1bf9a74c14 100644 --- a/arch/loongarch/kernel/setup.c +++ b/arch/loongarch/kernel/setup.c @@ -393,7 +393,7 @@ static void __init arch_mem_init(char **cmdline_p) early_fdt_scan_reserved_mem(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); /* * In order to reduce the possibility of kernel panic when failed to * get IO TLB memory under CONFIG_SWIOTLB, it is better to allocate From patchwork Fri Jan 26 23:54:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766581 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA81460871; Fri, 26 Jan 2024 23:56:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; cv=none; b=phTDzF4BuJ7iXJsyAqcCl1IIRzGD2B0J2s9RNERD6j38et12PLAXIrLMwahaAgjpq5QwIyR5YzcQfsqEZT7tuezs+cT+989HSQj1OgaBf231t7ytIVLtBMpqwnfi1KWTfKsBin7Ago1LaEgz8To9+a82P85rS23wP+T6nlFjkvc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; c=relaxed/simple; bh=Q2lvlvdCAKdHkBs5TNo2Bo66/5y6fheUCHhBLb/qygU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Asl9AsUsDsRdsJ7snLg4b6oIzNxszzDkLZDRDe9B6pX9iEaQVjOmOxb0xmKcTUhAqBA448b0hHaveb0+HXN39RWwFev9Haq+CaWGGx12LabEIbe+q7bAn6Wy5R6ZO2pjFk0BnT13e0nKi6gtFlKPta6eoPksK8jabF74SZ+hPRY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=W9g8gxYm; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="W9g8gxYm" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNtChX020800; Fri, 26 Jan 2024 23:55:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=JHAwrxllOSXe9Lncc3Bw hW25fiD1hVsmdl5djzDx1Po=; b=W9g8gxYmcUjfRRE6D7smqhpnYf1XFu9a0rab qj9zbi6u5RdwTgtP/KKz7oRqfVlHAI+pQ863D7LZqd9cHAZG03yWTMCUO6ZmATqG eXM9zgh4aGGKEoKNMGyQApsuRknC92CZKHMKlzJyBX+aLfqA3rvvkuPSM4z8OUEb /I7dzKX79V7LDlQhPTXHgj1LVFm3M5lpSZqn/uLlYcw7a4aqQxa/zp2Rz4119ns5 Qhdtcs3OxNCREH4Km/oAjk0LcQ9RkdyK7HYUEAKC6dCqY3hI+6fb1WHfZallaD6Y ik0QO44xTaUP6ZAWabC1wA8sv/tobkT2d0qyH3ymYfy8F4fHxA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvgy8gq02-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:32 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtUwh018645 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:31 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:15 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 37/46] microblaze: reserved_mem: Switch fdt_init_reserved_mem to dt_init_reserved_mem Date: Fri, 26 Jan 2024 15:54:16 -0800 Message-ID: <20240126235425.12233-38-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: WGiY7kIbvTjv0FKjDvTQTDg0e-SPCZFX X-Proofpoint-ORIG-GUID: WGiY7kIbvTjv0FKjDvTQTDg0e-SPCZFX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=543 priorityscore=1501 lowpriorityscore=0 clxscore=1015 impostorscore=0 mlxscore=0 phishscore=0 spamscore=0 adultscore=0 suspectscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Switch from using fdt_init_reserved_mem() to dt_init_reserved_mem() to reflect the use of the unflatten devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- arch/microblaze/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index d999ad774a44..112a05572d8c 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c @@ -59,7 +59,7 @@ void __init setup_arch(char **cmdline_p) unflatten_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); setup_cpuinfo(); From patchwork Fri Jan 26 23:54:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766566 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45D0B7CF2C; Fri, 26 Jan 2024 23:56:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313381; cv=none; b=l4cY4EX3f/HXSBHBcAOAPQLjEQ2GvcsDVriF8wEFcT6eX9D2yBI42tfXS/DQ66jrPHhQE70dJlC8yMnl2WEArvnC+jegwPrKvWHAlX9mTgZIsaf2dDOX4R7vcX8QDxjmtCEpEGFwBTIu9K2sb3FMG7rgBZAP+5MZwzMOyfwSJY0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313381; c=relaxed/simple; bh=7lFV26PM2LNr4+1qOoEgiZTR9wLGkj9SedRT9qVyNgg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tVH+tKOXigRdmr5Zxfp4q3OFgpqbA7e0JLwR7GQJLGyQspWk9e4qN8jCxUmDp+5Nb9DwI74PcvfGagGuepT5vdvKjBEHS8TDwQA/CFIVvgd6NxXGQi+YUJw0Y+nGjiiuwWKh1anFD/+1KIgvieiQhPw/KXU/fUVVg5rFXitKl1Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=iacufijZ; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="iacufijZ" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNmXdJ023210; Fri, 26 Jan 2024 23:55:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=shZIVqJkSo6fGcUiuMy2 RrxMhrTh4VJfidj0yenmhxo=; b=iacufijZSTVqNAHOqawI8GQa9ys6DIbEHhqM 3EH/z5A8BLI5Y4mWDp8N+C43muOSfgu0Ip7f7cjx7KMZkZ8yD/fS7PiKEDBHv88+ nziYnkQbWc1P+HFbyDIN+zbaIcp0ZwCPnTY71cLbccF5PGOB5pSMyrtODARzbMor ACO0paQeHoXKpZak/W0n82JKEbs1bJB8lXVz8UZ3JHHQtGCayM/PPF1pPWd2Car3 XBdCJvqsv8vL70PM4jLqLeuZRFAAv42uK8gUYSihBqF6sIvoTuB0rj1zVc7LocCV jzPFyvWa29Jmu3YOQKVDXcKZMGhW2vTAb9u7txuvn23Prvag9Q== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjbg8g0t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:30 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtTDH031191 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:30 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:15 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 38/46] mips: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:17 -0800 Message-ID: <20240126235425.12233-39-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Q9e2HJHeUEGizgm_DG731AghkXl7Ufp7 X-Proofpoint-ORIG-GUID: Q9e2HJHeUEGizgm_DG731AghkXl7Ufp7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 priorityscore=1501 mlxlogscore=693 phishscore=0 impostorscore=0 malwarescore=0 bulkscore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Switch from using fdt_init_reserved_mem() to dt_init_reserved_mem() to reflect the use of the unflatten devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- arch/mips/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index eeafc3abcb96..8d2aaa96d3c3 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -671,7 +671,7 @@ static void __init arch_mem_init(char **cmdline_p) mips_parse_crashkernel(); device_tree_init(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); /* * In order to reduce the possibility of kernel panic when failed to * get IO TLB memory under CONFIG_SWIOTLB, it is better to allocate From patchwork Fri Jan 26 23:54:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766572 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2801629E1; Fri, 26 Jan 2024 23:56:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313368; cv=none; b=VcffygiPEJCLGs4HUmBr+JjhQ6YqTyTMp/yQMt0uI8RuKraixro6mBQ8khXqjSB2lzwbCa3NjnOtNdGihV8qFXW0NA5L+ieNA2XirwxuxGtBhOvnQLj5fas9ky5a4XaQm5SU9MdKKfTdVhVoeh9h7CSDILqVE9fCO64F0qfMDQ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313368; c=relaxed/simple; bh=a9oNwy93MqM64zTF4Q0F0zeY9OmyRMCPjj71wuTM+wY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=au0GN3Ywu6qoVqyPtrYi4yj9rcP+pDYpx3XejL5DBiaDCIG0gJMQVEBHZ8yiTTYIlFXTRgcyrrfCEdxtoJhiVoTWxjVkiu1w+uPKmIPXJHBei4nJTMaPhR6smc8hVENIlb5omPTHcKUmN6Qm2K7cgYds1l22jJ43xClnHSy3NsU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=ffFp0Xvz; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ffFp0Xvz" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QMsHA8032290; Fri, 26 Jan 2024 23:55:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=D7j9TQGUjE3GBaIvfop5 UUy6cncf6YhWztzeNy307O0=; b=ffFp0Xvz1MvJq/qv1ZaoUEcUnADHaOTMnNkC oJGb1SuublnV5chEFd71YzmDueqsIDYHvKNjIWQPp38pSI9lIhBpfzUO9qZ1Bi/d 9TdfhdWoXSA/c8y8jnPtqSbl/elQpt56Q6uog7Dpxl+bRaLLe2y33WZ9sfSN2qwV qvQXUL8je4/ZxV0xxT+aj2hFNAx9GM+YSi8QCkpuP5A0eOg83o/4dt6/+FcHfg4S un9PKncr3GUcsG3G3eGxXZEEduBb/rtUu5yx1ZA0O+FYNjUZ9WbmIbJWIIZj4ZWD yJfuD1Gl9PSCl7GzogGuDydPBd64tXbQxG/7mrt22lSI64RoiQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4nrad1j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:32 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtUwk018645 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:31 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:16 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 39/46] nios2: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:18 -0800 Message-ID: <20240126235425.12233-40-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: UY6akSCnzKllYszLBftYMwFZonlSncq8 X-Proofpoint-GUID: UY6akSCnzKllYszLBftYMwFZonlSncq8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 mlxlogscore=594 spamscore=0 mlxscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Switch from using fdt_init_reserved_mem() to dt_init_reserved_mem() to reflect the use of the unflatten devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- arch/nios2/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c index a2f7360824df..236ada3f4113 100644 --- a/arch/nios2/kernel/setup.c +++ b/arch/nios2/kernel/setup.c @@ -172,7 +172,7 @@ void __init setup_arch(char **cmdline_p) unflatten_and_copy_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); setup_cpuinfo(); From patchwork Fri Jan 26 23:54:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766574 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E89C60EED; Fri, 26 Jan 2024 23:56:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; cv=none; b=FtdKBl2OFW4QjgQKUlfJ1zCqTt7QEUYKFFtNDoHCSX9tkyyUWUrzl6az2T+BiscPsZticso8ObaHPxFn3SMBTwEp+KlEq4eiBht0VjX6B8l7SWh0yIv6WK0raQ/FDNjErN2Y9WMFmXaP72jbkNn8I+/o6uJVQncLuJURL76BMaE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; c=relaxed/simple; bh=DtQKy8AEMkcWwSlIJHSrykTPuYFnqjysRdUaGIGOowQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RL/2uxVrASa4qbfUF5tvcP0CtaeLw9EUhyfAZ6/SQBhzLNvUtN++AF7hHHLeihLwKoAUfHcO5bKgchMr9LQMJ1hNaQxNYZ0KtI9ikXdNEmcCVdFXgzU1ce8FKKnWsgqYDSim1W+Qnqw1PtD/bCctbPf04FG+2KWYoMgJFPlcFlc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=RFd6jO+C; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RFd6jO+C" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNkArv025084; Fri, 26 Jan 2024 23:55:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=d3MBO7OpuFSlitrurZW9 pSZSombH8uKspBY0F+LXyng=; b=RFd6jO+CqmkITwGgNZaC9ENaqmeqsi5zrfNO 7SxnuBTh7Ksn3mqd/QQHtPGnj4Pt/eSoDCR+5d5xZxzru1ZNxcptqFGG6W3lphSK Acthc5fe6tgfgsKXm3owFyCl7UK4Asp2ex1e5979f9bgUjSfcvFTDkrWKWiirEkZ oLNASRxs65MNdQWnwRhMdBWiPnD2E6CciPH6SL6Yoa8/C+aRSnS5kRzjCjVry7BA TXkCtpCuAnhR3TmbPUfZHsTY+qexSPNeraNuGZuqzI1MWr5xDEYYvXWGr9I9wRQW mF1+J+Qa0NLX9/3i630mtTRQx9lhGSOoEgTYNM6a3Y6kA+ccPQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv1q5aq67-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:33 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtUwo018645 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:32 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:19 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 44/46] um: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:23 -0800 Message-ID: <20240126235425.12233-45-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 9VEByrRL4XESGBMcSI8tXmFnRLDOSDdQ X-Proofpoint-GUID: 9VEByrRL4XESGBMcSI8tXmFnRLDOSDdQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 mlxscore=0 lowpriorityscore=0 adultscore=0 priorityscore=1501 phishscore=0 mlxlogscore=566 impostorscore=0 bulkscore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260175 Switch from using fdt_init_reserved_mem() to dt_init_reserved_mem() to reflect the use of the unflatten devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- arch/um/kernel/dtb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/kernel/dtb.c b/arch/um/kernel/dtb.c index ad6003412319..06aa2ab1641d 100644 --- a/arch/um/kernel/dtb.c +++ b/arch/um/kernel/dtb.c @@ -28,7 +28,7 @@ void uml_dtb_init(void) early_fdt_scan_reserved_mem(); unflatten_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); } static int __init uml_dtb_setup(char *line, int *add) From patchwork Fri Jan 26 23:54:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766573 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EDC960DD8; Fri, 26 Jan 2024 23:56:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; cv=none; b=oUGfr0kCeUi8fSwRl11uK9ovQJ+kTHeuAXqNSKiYU6tb1asbElpB2b6ykgF1/VzjrXmQX9Gi/gzj9YzME7jMLBNse231VQG8MSF9MR1lq79J5wGWNL5Wj3KkyiCO42Nytc/CzkiQpRxGqkIeiwYvvlr7Pht3/8xUo81xQEaYeuY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; c=relaxed/simple; bh=2gwhSMH2WST7E1wV8kAthAWz8qnRpEKSM+ZjcpcQer0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dsuSvXwB41vpqUc1Ns1GCGskd7/WraYaPgKdR9pxO1emfdeu6Te1lOdDdnh6j8/cJRfEPXx3Lag0vm9bhfjXBXutMl75nPqA8QfZ+LvLzaZfQGvjroSzgvRDOQk+Jt03zjUf6JTy3/XobpD7/SOb8SRy2KJqxO/5KrHhjI/kCoU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Xp8mIwYj; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Xp8mIwYj" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNDY5O001507; Fri, 26 Jan 2024 23:55:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=vs3VFS39EsjZIuvvSQ74 CwddULOtH/piipMdRYmYCvM=; b=Xp8mIwYjZBVI7ncW0sYYdsjiUUhdKW8M9sdb 2cAKwdcQA5Hakeo2Cvqk/vq/TG/8ohdRgFZvZzJ7LNiRqDD3Bvrmk5jX8/BAHNbt HP6Wkp8aJ1Dr47TrM709jSbpyEGVrSbds73XyyD3EQVHXa8Tx16M0v4TSezGArVJ 29XSszsizLNNn6UPL4IskEbrhGj79W14JD4g+eD1t6E+ZkL2Q4cdac8Ve9xYChRy L5mMZrvDptWt3XL5YjcYqPBx9PaB2OBf+GQaroEg76ShXK2Jj71xSCE7BnK9ZBZZ yNLdu8yUWEm6c52SYndNj3CTFd8roaBslBTpa+mkwMt8KvAdVA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4nrad1m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:33 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtUwq018645 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:32 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:20 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 45/46] xtensa: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:24 -0800 Message-ID: <20240126235425.12233-46-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: tESLxkGCTWxCf6iKaX8n9Zi1Ro2lKA8K X-Proofpoint-GUID: tESLxkGCTWxCf6iKaX8n9Zi1Ro2lKA8K X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 mlxlogscore=700 spamscore=0 mlxscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Switch from using fdt_init_reserved_mem() to dt_init_reserved_mem() to reflect the use of the unflatten devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- arch/xtensa/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index cb2fb993de76..67479911b0ae 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -358,7 +358,7 @@ void __init setup_arch(char **cmdline_p) kasan_init(); unflatten_and_copy_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); #ifdef CONFIG_SMP smp_init_cpus(); #endif From patchwork Fri Jan 26 23:54:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 766571 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F23063130; Fri, 26 Jan 2024 23:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313369; cv=none; b=pYyBcPg3j3bjDnUghSv+0psnFvhlnFPi6rrvoWM9srG3XGIxUAeIF22VHGziXdtbbt2oB7UOe0F1DTGMOZq4yiD3zkFWpf9eRHE1XWPZVomJTYx0teJ+BdyIvB9LjFPWYwmyCsWlCJZerjp+pp5NhZrVGNrEsmtaYhywhTM9c28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313369; c=relaxed/simple; bh=4kE40rentgCzKkOcqUeGGTq5KdPNr9+7RUBnuYinc/A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jrU2vIiUKCDzlR4LKJCwwX/1npydzPGqYRkna0ok2Hjt920gBB6reOuvW/SMgPFAk6DKuVWX3MSt8BK9rGc8QAGdXA/4Tha65qQoHK0jyyWy+4SPQdlaFOX1sVJn6s8NS403Dk4DZUPW/o3TIzZe1YUYXtWQ93zXTZFDEoWUSFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=RcS0XWtL; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RcS0XWtL" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QMoBpP016990; Fri, 26 Jan 2024 23:55:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=qcppdkim1; bh=NSJIpzRt23eV6cwLNaH4 bWRVS5c+2PsTe/XQM/ncC7Q=; b=RcS0XWtL768b2HlqXCg7qaVbfuHia+Sf8KoG sWcFqfiCM3xJY5b+Khh5WynJO8LX4v/KWbzbd4FCNC9ix8FVIMOo7KyEouGl3VQN XAUcfzS1HINpNPhxgaCDvMpiTG2DkR86j4M553RtOy76u94Q+E5UkKU1zje5J7TD NA9tDxQGLL1UXvjURO9pndNsONKVY/2EZx+Yoy8zgpNPFln1CFi0iVclYI75cw7T /pGtpruHJhQYqtSHLNylDrubfKSGQo5cF/JaNnvsHHwHT9xUxz3ks9N5H+30bF6b 3AkNx3rwQYvBf3RIC3CuaeA2bQ9joJqsW96ypEbDOB6HgBujlw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvfc8h027-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:33 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtUwp018645 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:32 GMT Received: from hu-obabatun-lv.qualcomm.com (10.49.16.6) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Fri, 26 Jan 2024 15:55:20 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 46/46] of: reserved_mem: Delete the fdt_init_reserved_mem() function Date: Fri, 26 Jan 2024 15:54:25 -0800 Message-ID: <20240126235425.12233-47-quic_obabatun@quicinc.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240126235425.12233-1-quic_obabatun@quicinc.com> References: <20240126235425.12233-1-quic_obabatun@quicinc.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 2QLwr9m8kGb_VZUlrTBCN69DQQNWIECu X-Proofpoint-ORIG-GUID: 2QLwr9m8kGb_VZUlrTBCN69DQQNWIECu X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-25_14,2024-01-25_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 adultscore=0 clxscore=1015 phishscore=0 malwarescore=0 spamscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=449 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 Delete the fdt_init_reserved_mem() function as all architectures have been switched to using dt_init_reserved_mem(), which is basically a copy of the function, but uses the unflatten devicetree APIs instead of the fdt APIs. Signed-off-by: Oreoluwa Babatunde --- drivers/of/of_reserved_mem.c | 54 --------------------------------- include/linux/of_reserved_mem.h | 3 -- 2 files changed, 57 deletions(-) diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 3650efab0afd..3d1ab2325217 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -382,60 +382,6 @@ static void __init __rmem_check_for_overlap(void) } } -/** - * fdt_init_reserved_mem() - allocate and init all saved reserved memory regions - */ -void __init fdt_init_reserved_mem(void) -{ - int i, ret; - - ret = alloc_reserved_mem_array(); - if (ret) - pr_err("Failed to allocate memory for reserved_mem array with err: %d", ret); - - dt_scan_reserved_mem_reg_nodes(); - - /* check for overlapping reserved regions */ - __rmem_check_for_overlap(); - - for (i = 0; i < reserved_mem_count; i++) { - struct reserved_mem *rmem = &reserved_mem[i]; - struct device_node *node = rmem->dev_node; - int len; - const __be32 *prop; - int err = 0; - bool nomap; - - nomap = of_get_property(node, "no-map", NULL) != NULL; - prop = of_get_property(node, "phandle", &len); - if (!prop) - prop = of_get_property(node, "linux,phandle", &len); - if (prop) - rmem->phandle = of_read_number(prop, len/4); - - err = __reserved_mem_init_node(rmem); - if (err != 0 && err != -ENOENT) { - pr_info("node %s compatible matching fail\n", - rmem->name); - if (nomap) - memblock_clear_nomap(rmem->base, rmem->size); - else - memblock_phys_free(rmem->base, - rmem->size); - } else { - phys_addr_t end = rmem->base + rmem->size - 1; - bool reusable = - (of_get_property(node, "reusable", NULL)) != NULL; - - pr_info("%pa..%pa (%lu KiB) %s %s %s\n", - &rmem->base, &end, (unsigned long)(rmem->size / SZ_1K), - nomap ? "nomap" : "map", - reusable ? "reusable" : "non-reusable", - rmem->name ? rmem->name : "unknown"); - } - } -} - /** * dt_init_reserved_mem() - allocate and init all saved reserved memory regions */ diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index b1f71a4894aa..dd67b9b2488e 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h @@ -33,7 +33,6 @@ typedef int (*reservedmem_of_init_fn)(struct reserved_mem *rmem); _OF_DECLARE(reservedmem, name, compat, init, reservedmem_of_init_fn) void dt_init_reserved_mem(void); -void fdt_init_reserved_mem(void); int of_reserved_mem_device_init_by_idx(struct device *dev, struct device_node *np, int idx); int of_reserved_mem_device_init_by_name(struct device *dev, @@ -50,8 +49,6 @@ struct reserved_mem *of_reserved_mem_lookup(struct device_node *np); static inline void dt_init_reserved_mem(void) { } -static inline void fdt_init_reserved_mem(void) { } - static inline int of_reserved_mem_device_init_by_idx(struct device *dev, struct device_node *np, int idx) {