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: 192882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp223116dyb; Fri, 26 Jan 2024 16:03:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHD7KWWuJK2l4/VrqxshuVShT886NVx1AmmE7TS/vZhQQmgqLl/PKC1vH4P6Z4v6I+LuY9M X-Received: by 2002:a05:6214:c82:b0:686:1e2:747f with SMTP id r2-20020a0562140c8200b0068601e2747fmr829911qvr.2.1706313827043; Fri, 26 Jan 2024 16:03:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313827; cv=pass; d=google.com; s=arc-20160816; b=EnfE3Hc/JqADLIdkKgA06dbc21mLebCM8+sJ3HZ5X0ew4+aqetR9UcYooKjVOCS/sd kqj8Xkplyoon7V0Dk18xjRFvqN2gXZIBgIh0WEimbzrtxkk5RZ7NOFTna6+WDAzEXDPX N9Srd/g1a7QFgNx4rb1q8mxhUziADKrWfBlDA+pySFcxz1bcgXMUyY11kw2PeOpwMSP5 Qo9549UEkYXRLHnqehWx/kip/rknFj/IKERT1lcVZwaiWbPvE6/0iMqa+ND8pKd0k82R odthixyUC0D9L3tqR9P1/2b3L8XMyXp8OgFV2YQabpsgY8dM+9LNPB+TPQm9QlPc466X EeGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yHkSFlkLJD2JCjneLpD2tGeP0zrZRJG5TSxIZCtLSpU=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=rrbJ6pJFrZxNE7HTz7wIf0jFUM9pTkL5XefemSvIfSeDFjtjzoLzdMMpbu4/9PREmO 2ixqHy3yGG7B9Txe8WNpB+u5V2D+xJsMR2F9r+CgV82/IK4A+DCGlzK+g+9dpHHLn6A+ LDr6ofFN1eSh6GZiWeoFlQtyVr+QqZ7DPUSvPKB5CalscHC5HLieMnOMDl3LZxDIx+OU +5DvQx4u5dfpF1mwfZbVK5TZvlW4jeGVbwDIDxBegNfh7AZiuYWTJ3SUJ7yfso4ZJY1y a36B0VJx8AzFB3LQNrJmKDwZFRGlip8gOHcVQmRdoNGSs7O3sDJWDlAoLMbKdR0CnjM8 tYRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Y0JDkIMt; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40880-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40880-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id q9-20020a056214194900b00683b4080978si2515067qvk.509.2024.01.26.16.03.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:03:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40880-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Y0JDkIMt; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40880-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40880-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4CDFB1C28B84 for ; Sat, 27 Jan 2024 00:01:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CCDE565BAC; Fri, 26 Jan 2024 23:56:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Y0JDkIMt" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199727654556122 X-GMAIL-MSGID: 1789199727654556122 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: 192886 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp223953dyb; Fri, 26 Jan 2024 16:05:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEXk6DKwj8hvya3h1oTBqN4IVe48upD+0uPWXYsn4hVrFST7Ph/VyUT47Rr4LppLRnodx6J X-Received: by 2002:a17:906:278f:b0:a35:3174:8dc1 with SMTP id j15-20020a170906278f00b00a3531748dc1mr459521ejc.25.1706313918189; Fri, 26 Jan 2024 16:05:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313918; cv=pass; d=google.com; s=arc-20160816; b=aQ2VcrLeZzgeJUUGsg0o60787odO/UmZ7sdpapxDPHqq/bhsoNQTBs6+1QUoagGvaY OUamamarC2SC4DIkAjhZ5H1hl0ukUu+MEO6AgrpNm8hUI82YMbwHxk/o8B25Bppav33N bBUFOLCb/TYx4tQTocXaGwdn5XWPUWz9lSzpIsjuEfz822Kf+938qtgwlDy7ItIrmele kxjVdeNjdoYpdKum444TPwQ2/gHO3bDubQMXMvZZNUbeNCRhdctxIosb4tAWkt2kSWzj yyXVHUWipeERfTXwN2G+5bqK7S0Eo5xuqDEqTZ4+EnaxOmJXHAJwMTFowOk1unhlx3x8 0F2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kZa2Pe53+6g14o/QY6sXE+C2csDopSUWS/8cevqSYa0=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=gPVeoH2YNyOosh7BvtprBTLG7AcyPI6iZg0JaFS0mTpg3dB1epF4Otl7oMv1wOVXG5 ICTzJQ07h0mfwDUM1azMViXAnRX8Yy6FAVL5GA/vZADB0Wm7vYCBOxHwCv8RlOjRmQCb ovTBzjonelX3ZJC/HMMDnM7WyVbaMHh5UoReqcWgPJ8hEi/gfj5FykgynbbBxE+r3hxR uR9LS+vEphYuZvKRwpHSgIihtDwCzishiH2t5CaRQ1Q6oiyNxo+Tqet4P2X7ltaTj+k/ RkRFpSqY58A0Ga2AvnVNDxVnnLykEgrCcmIdDBRqVAP7/0pJvnf928z1kJnZujczXYtp 7wLQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Q9MFmI/0"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id hg15-20020a170906f34f00b00a33dbe94e64si1090435ejb.243.2024.01.26.16.05.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:05:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Q9MFmI/0"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A147F1F22039 for ; Sat, 27 Jan 2024 00:05:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F18B86A327; Fri, 26 Jan 2024 23:56:13 +0000 (UTC) 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 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199823062318614 X-GMAIL-MSGID: 1789199823062318614 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: 192873 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp220203dyb; Fri, 26 Jan 2024 15:58:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IETv+UFC2LcxE9y2sspReSI/X0hiSXry7eTvsjelHW4kgqTMnvICYTauRIyRcHqywT/HZRS X-Received: by 2002:a05:600c:3b82:b0:40e:d4bc:edaf with SMTP id n2-20020a05600c3b8200b0040ed4bcedafmr403730wms.16.1706313493968; Fri, 26 Jan 2024 15:58:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313493; cv=pass; d=google.com; s=arc-20160816; b=myjSliN5ClIwhPG1ForayDF775tn2Kx3LKy576US3/7skjG3dzLhD+OMGMC4d38X5u xi/VFMnLUM4uFKj3Ak4avmQZheOSmjG6ifCLMYNMPtc5vRI30XCJqXqpddtEYkfBKqaH A/uKwSK9mFevKXGor8NkT4UTCx+9ZadmriE5EyfwghqeE4gAPxpozYUzZiJS3sLDqco8 OP32zSX0nmViGl5KfCbs57IZegmCbU2Xq3p8CGrV1r44vSYCM7IM3Q+z9TIWDxs7VENt QnDKL+gsbUHKfAwTs8bT71Tv0RihI2LK7x5QY5zekt5me3mFurUBqIZpVAtrHIGyhmvB VoMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CYGPa6HCLDQH93au0PnQ9A1HcHQ+bX43VIg/AvMOFCk=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=Q5rJYB7GQI+gX4N3xqotreyiu807DSr0w4rsmtpEBrtvXZYxqEgnt+TuJ64Y7Huzn/ cii73E88LXCFoIVeU5d2BZzYjgSjOprRKcUsH4zktiN3hvf6PKvCf1axJRddf4cYJD+k xRjXy36yfHAhuXM3SCtvGQWIa0V3qDeuophkTFLToUQg0jXt+OhFEsYnLRHgo+x91re+ 3Q5/VDFi9fL7crSe+LgZXg96j+MHoS5PHxCK5t48S5gKxpPUO2wVLxETTf1qOs5xCSNk 6cEHWY3KmpNZB4OT5BVCIyOs0x2oFQtXzjlezfw3jcnZplumfMsPgKl03htODF82+/UP R7Ng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=DZh1sery; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40872-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40872-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a16-20020a17090680d000b00a352eafa349si231880ejx.111.2024.01.26.15.58.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 15:58:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40872-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=DZh1sery; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40872-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40872-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AFD061F29E40 for ; Fri, 26 Jan 2024 23:57:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A19E605AB; Fri, 26 Jan 2024 23:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="DZh1sery" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199377844299810 X-GMAIL-MSGID: 1789199377844299810 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:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192903 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225525dyb; Fri, 26 Jan 2024 16:08:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IEzX00xA0uZ8d81++HLenWFs549vWCD17Wb+bPnt2p408Iti5ku9VXQ1UhFm5fNqgJFRVIn X-Received: by 2002:ac8:5e11:0:b0:42a:5add:9922 with SMTP id h17-20020ac85e11000000b0042a5add9922mr775632qtx.82.1706314104750; Fri, 26 Jan 2024 16:08:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314104; cv=pass; d=google.com; s=arc-20160816; b=LI1AKG/BlFLR7my6maOgFY78W4Ph/BTcBEs6Nr38Olns/p+IgO6aC1zS55hodrvqhf u5LXPpYKCjbNzAJG1dURsc6cG4aKVCIhvvLDUyx5730oWH7to6kUlnjci74diIx9ZlTI uNAj0ATSTloW/6ZjS/3RQqYWnBHaDGILN8WwwVz3WxZOF1tKLLg5EvcrPFriRoPVDjdm 8lMfOkCuBzFlUCmJWu1R0CVuGFB3lJc43da3WJS559iMRFJF3oOFG4w+0+aw9IhTgB2K pCtGuhWMaxM67GAfUkjjxOAdAXVjyCFe2gqARA13ByafIrhMv8Ewss8Nh9Z5feMMj2XE Fb4A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sccXe/sdIxYBN7YJuYLiwtdANC45YLpyHhdyVFhG5pc=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=rpyUW8H27SQZeQDS6HqyV2pjkMpI4WZtAkmxqCue6B8pHIg46aEWIKuNR1WqqoZ/m9 Uoa0tu7+P7R6QUi3DIY+0eMlMXis8z15/X9EF193w+ZhrMQVPBsRzuNMVaX+qOFdNaz6 HhUFAw3XdE1KGtiaY2PpxrKdQFmZ9iLRrIYivTnt2O8HkimrwjbCnvtqw/TH7jicvNix rj8Fry6LtZth0bQ0uWb/m9NTXBt9MVVli9yGltzzix0ShojNqI+3RiU6RpHfurEtZXIh XMbXsHCjY3X8DrzoSu6YGPaLV4Yyey34OSKBc3r0ZhmN11M9vX6CD/O9RsuLtXSiFAdC q77g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MxiHhyAE; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40893-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40893-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y6-20020a05622a120600b0042987d554d9si2374916qtx.605.2024.01.26.16.08.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:08:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40893-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=MxiHhyAE; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40893-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40893-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 49A531C261F4 for ; Sat, 27 Jan 2024 00:05:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D1176A358; Fri, 26 Jan 2024 23:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="MxiHhyAE" 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 C46DD60874; 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=CHY6Prdfil4BgASnF7rBzW9wJOwkNtrlJMimlOpFpVG2xFM3EbugWxgkZvZRcYanIqg6GaItYpqhP4PeSRGbKE0ydzbsi5JaqhhyH1/C7C4tedHTqWp3RacNYG8j0HL/yl0e2AlVbRCMU3BV7T8JC7SJ5J7rZev7OK2FJlWnobQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313366; c=relaxed/simple; bh=CFnzipWZ6TMUFWDkFhb+oY6rrGeryUjUZKxboWcFyjA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=gOl0V+Uc9Aia+Lks0ZYvfHwEbnAllWrNphOWfzWnsUxOYMx5GMckknOQhybSyINWwsZmKhCwsELY+fh6Xp5Pdcm9EfWpIlb1SZ1SCXLQtq8APlYyt760Fql8vbWUIEb0iJeYsBrX9rdpn9xWzCcm2941i7JBPqUJUFXE/ksKleI= 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=MxiHhyAE; 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 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 40QNWcCA023887; Fri, 26 Jan 2024 23:55:04 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=sccXe/sdIxYBN7YJuYLi wtdANC45YLpyHhdyVFhG5pc=; b=MxiHhyAE7TCJZBPowgWCCZhS1ac6ZKEZYw6i F0Bpzq0fr92v1JIe+wydOMDApN2wu4oP+LwrXArjbwg3MI9KSX0K+NDuYcbM49eQ Sfp/mo+Wz+ip02AFsjObkL0Cvf5nXeYLbwzVRVC87qR1rqT4hFzqVvFf2J+2KBcy bsb3iAbmdgtvq/mUjsie0dcTmValSX/HGfcsslUFLsQv8DNS2fCcTspVpsZL6SCw HI4CXq8adiTCFv7PZAPI8YV2R8S7gj4e/obGx0OutWmAHOEVWuowmQszlCGg1ZdX fmrPBTlN1P4FfLN/2fEKxwR8HGlhsienHKc/ihIllkb8RZXdgw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjbg8fyx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:03 +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 40QNt2cZ009297 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:02 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 05/46] arm64: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:44 -0800 Message-ID: <20240126235425.12233-6-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: linux-kernel@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: ZAGFw0ueASHC3NgzxQ65JjMDpxIUTyN7 X-Proofpoint-ORIG-GUID: ZAGFw0ueASHC3NgzxQ65JjMDpxIUTyN7 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=465 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200018437761577 X-GMAIL-MSGID: 1789200018437761577 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 arm64 architecture. Signed-off-by: Oreoluwa Babatunde --- arch/arm64/kernel/setup.c | 3 +++ arch/arm64/mm/init.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 42c690bb2d60..2a9e98104af7 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -346,6 +347,8 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) paging_init(); + fdt_init_reserved_mem(); + acpi_table_upgrade(); /* Parse the ACPI tables for possible boot-time configuration */ diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 74c1db8ce271..0fe8587e550c 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -310,7 +310,7 @@ void __init arm64_memblock_init(void) initrd_end = initrd_start + phys_initrd_size; } - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); high_memory = __va(memblock_end_of_DRAM() - 1) + 1; } 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: 192885 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp223852dyb; Fri, 26 Jan 2024 16:05:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxl/+KEXZ+Kysrx954udAMaJ43TpRdPQwHPiMRWGPzgHaIKDcG7IwgZ2JjVukpM5dGtuAh X-Received: by 2002:a05:600c:420a:b0:40e:5f87:fccd with SMTP id x10-20020a05600c420a00b0040e5f87fccdmr398459wmh.8.1706313906384; Fri, 26 Jan 2024 16:05:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313906; cv=pass; d=google.com; s=arc-20160816; b=aXTan2tvmUTn939YaW3SDUQO8Y6bovIOvi6o0aGvKr0fFYxL6ugjCx4wvdUw+qzHh1 kwBbLB9FCSqXUCkYIC+xpEWbLKTJlOVgqqkuXeocVFtOrX7Wt4XXN8EBEXqrpupg70j2 a78e5NY6geWi9vKhl67VRxkOeRICxmd+ZkltpTdMlp88fpUbAtIAClB8UtKBMnv4lAHf st3QMZd+r1Ci1MVyqjWeWz+RVKC8O7x8B6+9ba7+83GY7HDo4qfZP8zGqhaqH5pEc1zh 38F2zbzhFDH2Gq7B7WYtM09ER4L+kT/RcXknPETGtRPYkHFTL53xjf2ht/glf9JzR9EP hD3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=KCJm0dJ1lEjoehqyNacnzNbiUGF+gV0ewKaAufw0NKM=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=jCw5ZERinLgnt5IqhxDVwdrl81GtOA1vgyMeD46zl4L6r02h0hvNat/MdlMKueJLai mGUH11jvqEB4XvC5MsGekJbHOkDhiFWLCjQSd+odVsOUTdHyAnAwHJD8A92DHklZyxki s3ZQoTWkda0XCn1Vv3I1DVgXMgbz3PtVcMuN0BeEwAofpJhCV3eiKSDWcEos96cAv5nK LGK+ZX1+l+GQsr+8tl9im+19mu3lSHEf5q3YANcWyOfQSoEg2F0xZv5DfCMZP/Hbwy9P u22EM611FvcPNFkr0arP+f8+y9NdgMFD7SUxEwrBghnwUCCj/vWeARvlzfbiMye3NVlG Xr8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="TGwA/Y/I"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40888-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40888-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id e16-20020a50ec90000000b005581f79bc90si1144009edr.598.2024.01.26.16.05.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:05:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40888-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="TGwA/Y/I"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40888-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40888-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0243C1F218A3 for ; Sat, 27 Jan 2024 00:05:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0AFC6A037; Fri, 26 Jan 2024 23:56:13 +0000 (UTC) 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 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199810793159448 X-GMAIL-MSGID: 1789199810793159448 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: 192887 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp223977dyb; Fri, 26 Jan 2024 16:05:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMoMu6akvVvJZLVhZyEHlHYN3MSQJ7ZdtkvNfUvNPKeb08pkBBSReygpcZw8z8QEIM8qoV X-Received: by 2002:a1c:4c0c:0:b0:40e:e8e8:c3c4 with SMTP id z12-20020a1c4c0c000000b0040ee8e8c3c4mr370012wmf.112.1706313922128; Fri, 26 Jan 2024 16:05:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313922; cv=pass; d=google.com; s=arc-20160816; b=BQN5gqCi/jlLLEyqNXnodrRd/sfnTvOWcc6SnlTmzlJyy4QVcYlSxyMEyUgCJsEJsv 9YahMUUBFf47YtOiBlMmyWnY11tF80YwyHzWaflR9tJsyp6MO9NC48VqdjCtgpenjIMp TOXlZcFX52rEAj7ZwdDI3UfAJC4IP1eBRG2AzAxSVV8fQNuadxo14vduS+uV9v+XuAdJ QoGO7UoPaNW0/AIu0qprlSV2kWylTJ4PdvZDUti5WugBCV3rTBFOa579bf9M7+FsCN4N RCWT2dSPaVxG5n9MF5EyqySzDzOuIHrCww22pNM0JjBdMO6n2f2DWvrnpZDx3aOGV9Ak GWzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T3DjNUlLclRRSxUX+FF8745CWeIU93BibdyqAGILJoQ=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=ZhXcxi05XYJupDjNyee5HnDKpJVyjm2YBRu/fXlanKgQw46JJddkbz15icK4PQ9IjD sENZo1PGbJ9yVWEO7QXNwwb+73Md3WMJdcAIVJluhYH3SVKCwKZjMkwAppRLpuuIL0PF 8LbeIFPW5J3oudVQy7tMRDZGzppiMnsjaeNNNeB2W1h118SY0anXjPEHBzHi9Hqzu2X1 5slhkZAVAUneLGvN9tfXlnPjcDVMxwwjoFsx8iW6Ry+RudVPaWNqnkhEvkANRw66vvvh 4vAF8af7uKSkwCrxG6AU2pwLJ596H35Xfjd78Or93HN79ybSp/0jN2gGlEmlWzs84VCS aTVQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GjgSbFTT; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40896-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40896-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id q11-20020a170906b28b00b00a34a4cef07asi1061249ejz.222.2024.01.26.16.05.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:05:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40896-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=GjgSbFTT; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40896-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40896-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B6B401F220C5 for ; Sat, 27 Jan 2024 00:05:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C85E6A33B; Fri, 26 Jan 2024 23:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="GjgSbFTT" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199827552009007 X-GMAIL-MSGID: 1789199827552009007 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: 192897 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225322dyb; Fri, 26 Jan 2024 16:07:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjc9tdQLIsVLLzXAtdOJWp6IkGg+T2ndXVi8g+1IHm3kfxCm4jf1bsUoQC122r5rOG1BV+ X-Received: by 2002:a17:907:1746:b0:a2f:8533:af79 with SMTP id lf6-20020a170907174600b00a2f8533af79mr294713ejc.36.1706314078138; Fri, 26 Jan 2024 16:07:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314078; cv=pass; d=google.com; s=arc-20160816; b=rNkQNyiVZxUroItpCBgNE7x9vIKl2QSTAzXAtdSIEqlVIneF7GWsB0ECTFwSrBXmGX 4ZKC5nvH3kOT9RcTKHkyJFM1dbKKmY20OmvL6kejXTWrb9jPKYjX12Y3fZqi3JWFG3os Daqm4XHOm0ZzlxIFAFnGXMAAtjpk7jlqP+88OW83uiJc7zGtro7Km4T0vPVo0DkeYh+s qT0xq52XkZZwE5o87IxyyxAxK9Q2HN3Up63UvLuiWf92EPfC24OICTkNZzriCta/TS1n JedBWSIPfNPBAiRrm6Giu0YZQ007/nnmP7biF2BTDzCb+4EP5/ljGyok0U7onIpAdbnf Rl/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zeUxzUumBvjgi1Mu/sc156Nea3aBso1ghvF6G53PO+Q=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=R69UWkLrGE5vG1+ORLeU+GwOHJuzeXxz3OCy80bSFpCw59BFD3O/fUib7JcPjXB8xN LC/q3/wQd/iqaqwtETB5u7oWxE2Yg4nDkmG5DIkX3DG5xKKc0GBmar4IDxZ/XOfDbOm1 iYWZ7ACq7wwu4BGbF/RTA3xJbIqxycn00+oacP+HAskDGec2Tq4Ud0iwGqTQDlJQ61Hl iW0bAAPN0u2owXbFuIPtw7dP5HhVxBOfhQ/9dG0QvdMJwIvKeqPikAKnexrYmwk4qEgO ELHhavLPc2UENDY6vVWG3K3wqAQKWAwoNqyH/w9Q0gQByLyGJoiru9XLTvDRFwMbr0cJ iQxA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="anw6k/Jk"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40907-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40907-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id an15-20020a17090656cf00b00a2cea3474b6si1056462ejc.231.2024.01.26.16.07.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40907-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="anw6k/Jk"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40907-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40907-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 980CC1F213AE for ; Sat, 27 Jan 2024 00:07:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D77177690F; Fri, 26 Jan 2024 23:56:18 +0000 (UTC) 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 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199990409318447 X-GMAIL-MSGID: 1789199990409318447 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: 192910 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp227057dyb; Fri, 26 Jan 2024 16:12:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSWeiucm0im28N11ogD16Hoy25LHLfMobdpk6w0+70cmpSW2ckds8RFm/lRSx6eU7lQllR X-Received: by 2002:a17:902:e548:b0:1d4:4467:97dc with SMTP id n8-20020a170902e54800b001d4446797dcmr661598plf.6.1706314323780; Fri, 26 Jan 2024 16:12:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314323; cv=pass; d=google.com; s=arc-20160816; b=uvxiQDTpTS+P4hMXUVAv5j1GVflwlwfdItJlmYZHQ2129cKsUbdKrPGuKJOEvNyzse lqmOTnmAzF/+ixbArZZeEfjYlDKFbsvVacYG4e8xHBS9UZ4NNkH6Lw8skWEftA7QJ6xx KvnHnBfrAzksw/miLTOIWcci4NFehz2lrA7ZDbybcwH/ukv8MvGFxhabi/oL5zBN3ubC 1UFF+00FC30GBOc90yj7oMVIlrMSiC8a8Oz0SVvQFOQXYFWfeJt2IXL1h1rLYv64BqaX y1cm+I8k7GehpHopGKuxEqGjD82Cdby2tmnh7DZ5gDmsAHO2rBcm6P2/eenURqk+exQq knXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=V0LEvpWcWygNAyG9WGDnfp0Gm0ltd++h0qHGAExwYhc=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=x/dFe5WHoF9Pk+UMgZmOTLyxiHeb6lDQELYfo/nv0CgfKh1oHYKsiZ0LamOeLAXt/4 e7SV6xjSRJ8NHW5BGYQahKP4v1t/mSwfhBxETMxIRAFUtSgqieejt69FWE+v8I+0p56s qmkOB/PJ4F70mwEbSSk+9GI0kjXlyo+mPhgMuwHwejleLEFl6/oLXBgpAF7pjrz14Z95 NPI+cPS/Pz0wHaFp4LHAf4ZRRHMk/UtoPhkqTIv/e5Kt0rhL53oE+3x7eoDXz826DWcM UvRky3SXqpBT6F0KEC+XO8IEQwEWm4jBBQTfv0TPmvWhv1pANdhsIL3eosYtnWZ8delV SZtA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mA62snqA; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40874-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40874-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w7-20020a170902e88700b001d6f183f54csi1890961plg.68.2024.01.26.16.12.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:12:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40874-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mA62snqA; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40874-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40874-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BF3ABB27CB4 for ; Fri, 26 Jan 2024 23:57:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 450C2605A1; Fri, 26 Jan 2024 23:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="mA62snqA" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200248549292352 X-GMAIL-MSGID: 1789200248549292352 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:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp222527dyb; Fri, 26 Jan 2024 16:02:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IH+Sto2DdqWMZEB73k8eHHVrHPn/R3TkyA2Mrgwc0Xlulj8X7T6WLu/v7wF+q2yG8AqAY8j X-Received: by 2002:a05:6214:2404:b0:681:7ba3:3649 with SMTP id fv4-20020a056214240400b006817ba33649mr1085273qvb.63.1706313765306; Fri, 26 Jan 2024 16:02:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313765; cv=pass; d=google.com; s=arc-20160816; b=jsGW2CHVUqsWVbh8J71jrHbD/WPtBLIfCFTyJz81Sp+CL9L+mRLdjGDqyJzcaT0O/1 YnMuZaLb3QJXh47OrJSrRNrLxkNalIzGxeACdbVlCkDaE8uw2GT+LxcrYumepgpbJ9WU 3t4j6kDlL2Ik9PWsbn3vpExNp3WqsQIMQubEMa53EsanyXuny/VBm/mtEpwtqz5RgbHE KqWmJq5l3WVrCei99Mprs5PExKZQyoSLAkfy+XoY1tA19kt7uG7N+/6yiWatA+RhB4z+ AxntOKwa7oW1qguQKqk57p9uGkTIkGA+w55rFFH14zdEYoBFJhEBaeWEC1BT/66ZfAxn 9zxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=68XaOo5mtlDufcCTXlMylNztjt7G6G1w91QU9lahYmo=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=rfGYWSfga41kRNK7Z3ca2MeVXHmu0HuuekxvKmK5s91BrtxEg+eSTIT9z3R6Ykz6n/ I2c8dDnyL07DKDZgCLvNZIeab5jk6f6YJM3NrNPQd2p2ofnQLsofHYA7jT+XOMk1O3CX KKBpKUIwRy3DebQPdR1qNV4oU+OQdHe0Ttlw99wo4v2B92zFqcDqkmC3uFxwT4zhgKPb w9IGivKtXeb+EuHHoglBCJAMVZVtVPTQXRmdHzQdlK3x6YLt8epayJwsZT46gg5blG7A k7P9PQBObGA5BjoS8/SogKskVSCEeK+ZtbIA8vOTq902a9chwYb3LSOB3QSf2MO6fb9C D4Mg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Tco1QsjL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40877-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40877-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id ey3-20020a0562140b6300b00681993a0b3asi2530067qvb.265.2024.01.26.16.02.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:02:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40877-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Tco1QsjL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40877-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40877-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CCFAA1C27BF4 for ; Sat, 27 Jan 2024 00:00:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6F60634EF; Fri, 26 Jan 2024 23:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Tco1QsjL" 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 6187B224CF; 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=rxrhGZhxSd6DC6IBCNTs8cOj1X+rZ2gt2jqK9QXO1fXfy5Wu5rr9UxHx28kZHzfkY+MQRXaxpFZVjI5+YXer6OIb1h9ixbZVYa4F5nun+5OHgrBOUHErfgCVRDh/SPS6PnJEgbbieBIVt8U2ZwKW+32QXHst/GC+9h9hHPlNZ0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; c=relaxed/simple; bh=dzyLzkh4N078yyTKCYTC/gXD1gm5QyH6T4MNhRf2r60=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JKR4ahfnB7WSHAxAUq+ycDJ56mz9xH5hB5lJ+MaFu90apQ70zTsHCI3/q4drCKkQIb7ARjTDeK6xdIYkZsV7L5HFz3XWSY5RNKL3wSkjgwkvP+E4lDKaQx//liu7ppPvgy6KxCntO0W6Rl0NP2RWCi+pZmohevAlCjTw7Dvnp0o= 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=Tco1QsjL; 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 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNkFUP021405; 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=68XaOo5mtlDufcCTXlMy lNztjt7G6G1w91QU9lahYmo=; b=Tco1QsjLrURRbbdF0B8BNcqmg3sjwJNyBOVI LmwLBhfz8EtNCKATOKAFJO/NOblaeF/VyhZUJdRA80i2Ls+Gk0G8zT7yuwN73R0+ gbbJzjFni8D5YiHzQ976s5P+jSJTvuHlSo23Gk3ePJqL3iZYMRjPoWar1rows/Lt EE/9ffhNWIrWE7RVZp2OjS+cfi6kNo1YBKVvbeAS/7YL/fNUn5e7b598QWkNqY7/ VQDTj2nsy2ex4hJM1KfgfzDegnnvUpz5sejqfURQBXMZeOQP1N6l2qz2Go9Bu4La YODDqvmo/hEFMQa/K/3My5GtTEwTr4G3OgaZ3vvlxLyOamvcmg== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvhxyrhxs-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 NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNt5Kr010122 (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:00 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 10/46] nios2: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:49 -0800 Message-ID: <20240126235425.12233-11-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: linux-kernel@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: _frN9e1ZnvTiTu7GT8d5gUZ0-Lm28G7a X-Proofpoint-ORIG-GUID: _frN9e1ZnvTiTu7GT8d5gUZ0-Lm28G7a 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 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 clxscore=1015 mlxlogscore=639 priorityscore=1501 bulkscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199662602249469 X-GMAIL-MSGID: 1789199662602249469 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 already writable at this point. Signed-off-by: Oreoluwa Babatunde --- arch/nios2/kernel/setup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c index da122a5fa43b..c1d42861cc72 100644 --- a/arch/nios2/kernel/setup.c +++ b/arch/nios2/kernel/setup.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -167,7 +168,8 @@ void __init setup_arch(char **cmdline_p) #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(); unflatten_and_copy_device_tree(); 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: 192874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp220209dyb; Fri, 26 Jan 2024 15:58:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHD1/UfXH6oAgLXNTXVHauOqe/c2tigTXbEKnIlIdCJ4DeXTTRlTmdvQkQSYinKRNOegBVX X-Received: by 2002:a05:600c:22c8:b0:40e:ceaf:f237 with SMTP id 8-20020a05600c22c800b0040eceaff237mr255219wmg.356.1706313494854; Fri, 26 Jan 2024 15:58:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313494; cv=pass; d=google.com; s=arc-20160816; b=aDIQ3/+C4/z1kQvPdoA90LQU3dTQp/eSwR1xhz2fCy4l1QkaOFtI6wbE8NAK5J5ULp Xtc9TgwMVL4+Oha4xLxv8y6Z2hmiqESw++DrLgmXt+BbHcdLtP590zM4yJotaGIIpCpz NZsKU8T1hnZLLIujLO2q8dNhwhgKtt3GWjcFuqIvo4cU0F2y9xZaGC0fvtx72xl8NMwr 9z9LyL+o37/ZNFOjVhEMv8vghhPLyHFO7SFBmLSd8EQ7uBljcTUZbYwqptxZQ723RvlD +7Dsekx5n71ytDA2I4jNu8nI1V/7GT+zofd+uH/8FiadpLqCw7T03zE1aWbC0qd1GV+4 1zrQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mLHtTIAeQUQkSAuDL0y5SXd0co7k212sKGf9Z9Z0dkk=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=dqWQgoBr+lXq/hw+AQc3ah3lnaKPHWByiAEFfytjCisGp2cXqn+D4bOQ+FOrDFFxlH x+lxf+JXJFMbK5CtfDq1ay+/a+Y6+u6Op1P1HLrsAIOLus24X6V2dvHtlDjlQPAoPTva 9tCvRhbaa/vL2VVy+JaB3mfHiKbTurHO9F8rzUOKuB3HkNHgSb9oaPk6+3CNopLFggZa La9IEmoutMHdjo0bi7d+GuMwDfuEOWuHoeHRQqscjtGI6VEGREiBoC6c9V3291iSg8O8 iMTkv4FTBEVRdZGGxO6Lajm7H1k6f0NQTpmqQfSUg/8CotKh1TCzyG0oxIRlxDlIM7id KHxQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IJXMEjF7; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40876-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40876-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id zn6-20020a170906ff0600b00a349982a383si1160076ejb.751.2024.01.26.15.58.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 15:58:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40876-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IJXMEjF7; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40876-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40876-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3DEEA1F29DF4 for ; Fri, 26 Jan 2024 23:57:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DB3E605B2; Fri, 26 Jan 2024 23:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="IJXMEjF7" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199378966977128 X-GMAIL-MSGID: 1789199378966977128 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:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp220950dyb; Fri, 26 Jan 2024 16:00:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IH7xEJNy+3NMSeNv+5K9t+T1nbkznEkznC4/IHJIAJ/AZcO1sQJMIbhZiy2DaLn5RGdZYRl X-Received: by 2002:a17:907:1008:b0:a35:103e:3614 with SMTP id ox8-20020a170907100800b00a35103e3614mr513757ejb.52.1706313620459; Fri, 26 Jan 2024 16:00:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313620; cv=pass; d=google.com; s=arc-20160816; b=gkPyaJB/Wx4SFaao7uv+5F+g8SHgx+pTdT340B2F21A08YsffKqKf7mr7jU7RdbyI4 7TpJup8c+FBTqi77cdoo1OTsy1Z7JeOFQCQqdFoQYg4mZLgV0Akgu0SbEH2FrMtQGetd O/kQuzZ5Z/7+J67VfDflosZPxMMrfLRVG2ZRgLDU4qcG+8adWQ+oKn4KZBSKsdrUdRan VkT+gvns4QkEmg5+4rLf2PrfrqaiHSoAkXLcomdIpD1E6NyO/9dBf7bTxUgXM0vZg0eU jzhU76BgY4n8k2e6xM4fa89/7+wMQofvPU5UNwFZAZBg+oHbTyf4NjvVevGiTA9g+Kgx 08mQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WsEewaVlfB7RsqptAU4GHy3EHjeZxoaQFefGwrjCEyg=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=wjIacR1jO4dQUdo3tM5jVkDfXzRSGk1olVvDyQ+ybnL5gtdXbK6BHnW7I9CJXgpdUk ewo7+yXEiKeZHkklbnFjiZw3xmJVy73k6d9ECBUjvA2D6VJ0zBeBdfKAH+lKhaP9OSP8 SxIcouNZkSuhuF53PSpKu43h1SHuf4jB6MfRf4ZOkbFpYbfRlqrXw4uGPpIDp8qx7Q69 TZWui+MZB5RQPSi72/e3oU/1hTcan9LxXsRdz4hZKmzlT3RUKJociT1WxJBW4YYFcDIq cij6wZYiSup1oHxRkCQ8WKNBqDSRX0bmEj2ZwINkrxwIM6Fm3UjxZjFMZTC+4kk5zCd0 qMpg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fI0BWdys; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40881-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40881-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id k23-20020a170906055700b00a2ea51472acsi1063193eja.788.2024.01.26.16.00.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:00:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40881-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fI0BWdys; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40881-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40881-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 161EF1F21B6B for ; Sat, 27 Jan 2024 00:00:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4C40634F3; Fri, 26 Jan 2024 23:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="fI0BWdys" 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 43D8459B49; 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=1706313359; cv=none; b=UaJVxLEkOIeMRF9HJcIxFplTXr/yo8WDhlpboXu8cbqACjfxnUogLG1uX09QBTruU0ClCwMRMdTxuCjZfmC3aE0pk+iSjkH8kUxIEzXrUkB5wQlTJaroKC3fwUwzSNRPbEmhUHTcfL+le1sFZ66LIZ26gZL6grqjAQExv5Cs8n0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313359; c=relaxed/simple; bh=iLwqQEUv3xXzbAHMlo/ipltG/KfziM9wZR+CyyLS+xc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jp53MxDNeVeT8nfdmZssLkYQdoDQgWg5OcPdwYfowEEjg/nF3CEBo+SdDhrfVpQPBxkrds2DUXzge0n/vBC5a14PBEh6DWbuLMliO6w6Az282CLixtLNZkPHmkJZWOKbMkDOJTT06Jk6aabbRZZhtQ4paBGPCsk+KNOPMTG1z8Y= 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=fI0BWdys; 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 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 40QNBIhb031418; Fri, 26 Jan 2024 23:55:08 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=WsEewaVlfB7RsqptAU4G Hy3EHjeZxoaQFefGwrjCEyg=; b=fI0BWdyskI/UkLqe4ZTWGCMA5Y7lyscVOk6T NAmbmPrYbYkeZAuybzur8RSZNjsBTsyOWVOWOyB4DmFlqwfNJSD3MOt7u0i4vSnd 0r+7fvQQGZ5XQls/g4NzWUZYklBLfQsIlUKfXdKWNA5FExRYJtJM0B5JZdkYLyYt fBNMonVdrANwBRe4kxP/5v4tOJRw/F/TliPOuRU7iFgYC7o0POv/ApGxRL+SJlZ5 /bgEu38uwH5y8NFukvjRuxkOwuChvq/Gm7j7f6lmnw/AxtmAvzojHLvVdNBBFwWV VB1GqcERrUREeMTjKyZK5qpCCWvmCzonL4/c0t9Tt9cE7XG/4w== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4nrad0s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:08 +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 40QNt7M4010138 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:07 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 12/46] powerpc: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:51 -0800 Message-ID: <20240126235425.12233-13-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: linux-kernel@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: aGKhftysxgp9oJ-6bSGDhkjVR5rqVpH_ X-Proofpoint-GUID: aGKhftysxgp9oJ-6bSGDhkjVR5rqVpH_ 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=713 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199510740440251 X-GMAIL-MSGID: 1789199510740440251 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 already writable at this point. Signed-off-by: Oreoluwa Babatunde --- arch/powerpc/kernel/prom.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 0b5878c3125b..5f6307ea3069 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -619,7 +620,8 @@ static void __init early_reserve_mem_dt(void) const __be32 *prop; early_init_fdt_reserve_self(); - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); + fdt_init_reserved_mem(); dt_root = of_get_flat_dt_root(); From patchwork Fri Jan 26 23:53:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192902 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225500dyb; Fri, 26 Jan 2024 16:08:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IG9ln6fSb9/wKvxwVHmkwu/myd5f9F3Ijqfra40bEx9QBI2g/VCYzHLrDMuz4R8tjv1nUrt X-Received: by 2002:a05:6358:71c:b0:176:4145:30e5 with SMTP id e28-20020a056358071c00b00176414530e5mr628759rwj.30.1706314100798; Fri, 26 Jan 2024 16:08:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314100; cv=pass; d=google.com; s=arc-20160816; b=WwtlFw6yZiKCEbboksuQotiBWUWiCPpbqiyfr5GdF77hu7eBvWVKgYyysaepdDKbyx UQS8PcJ7vIlVSW2YQq1jc1baV5bhfiQWH8I6xegJtJxCe0g6txrRCgoBFIFqPOnnfoZe EqJfigUTwMy9VUPg2FzkdrawNIvCwFnW0Og+igCtwOrEfjkKX27Xgs1rZgpgvdB1Sk/x +zQcmGwXF+FpMv64GwiAn3JW/7+3oz3A0u9Ac5AIeXCjKi6z1+7szCvh/1wIi/lfbP3y ZOV+1WSum9n9AnJe6cSBZzBNcwFPUvRvL6+buWP7ls3XNOQcP2n1emwJvgPHcNFxgNeG lbpg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FPFZD1Rm/nqqowAfp/HlIZdajqjXw49ivI2WyXs86D4=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=TXirQyYlYENFbibLf0uxbdmE2At+26Y+cpJVeawdRCcS6eDJTGjXEt4aJQ3G15K3E7 Xa9mY4+BmbIf4zfToZs5gpwdIBv6gzS5vYGW5EXjK1434XGOWXYa9z/W+aDc8xJqlmxx TwYb1dxnKSaubND+2HKD+pZmSr025jTBjQ6TBnbkuLEXJhFtzZJQnxOB2+c6K9Vum435 oHHZQTl3M0Ltih99RuV6ooPBJU9/KdtF0vqKuDbhA0YFZX8YLaxOwgsvOg/TLjk0X11+ Ry45/C89rFTSfI5B4YN3p42KNrgynZKDxodEOFEUBzgK66IbFNmgfiskWAWENbevxmqx BnOg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=j+PlOEBw; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40900-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40900-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bo11-20020a056a02038b00b005cf29b05cf5si1946625pgb.767.2024.01.26.16.08.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:08:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40900-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=j+PlOEBw; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40900-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40900-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8423F28EFD5 for ; Sat, 27 Jan 2024 00:06:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2ECF96BB55; Fri, 26 Jan 2024 23:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="j+PlOEBw" 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 A627C60DE1; Fri, 26 Jan 2024 23:56:04 +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=lvnIOEIVw7kwLUgtUMx+L/XzZwbBvyfYY5oZZmkrDwWIDrF2bSHLXwWcluHgRq1QkxsVi73oEW1gSP/LwwviCrWF62lBsDLCSxQlhwXSbOUmJ7AGN0lrecDGbGb1T78P7/C+qWuYRiWU9SboyQph7N8hSeIFHeYUzZukljcxKqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; c=relaxed/simple; bh=bhYP0B3JMmlAreSL8lioILNkF6Sx082GDkD2VmQ/990=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ITgYMP9B4Mm+ysE/+u6dVgIhGB4lgnBTd5/70v/Fq+1OxiRwDULHwKNxNbSLTss4ObSZ12tsoJZM/9484oW1b64cH1Ux01Y4rvnlkkaHSCDTKUfa2zFHkAhaERkxiPZg/1/5gBb968z+MAfwtFh23/03IXwOoji7zUIqqH1bFcI= 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=j+PlOEBw; 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 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 40QNeIEN029503; Fri, 26 Jan 2024 23:55:10 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=FPFZD1Rm/nqqowAfp/Hl IZdajqjXw49ivI2WyXs86D4=; b=j+PlOEBwERMJ1ddJ0ONx2CHGkNUIz6eCB0L8 tIieFujtQ6yEDDkGHhOw6ffBfuQbH/q1TzelqZAYazMx0zQh9uRqkRiZPNfrYzLe Q6RB7bwFNIgAy7ius0fYHbr0+7P0sbferLjP0r3jCA44qCO8q/XaWSU2jYbclDqr qLkDRquAFlL1ZJ4dcNWNVxLbZpo0j4Rgq4TOEX7raSRU1oQYcosE1Gv039fgOTvS up3fSBg0pX16Fi9RRgkzBKVsXTuvYmsypWkrY8bQLSE9zQNyfmcayqwpgf0ibxJp shPodKOv3vXyGD9U39LmCSxJHSN61SoOh0NWgdmJwv79IFjEXQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv8e89uxc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:09 +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 40QNt9hY010158 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:09 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 13/46] riscv: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:52 -0800 Message-ID: <20240126235425.12233-14-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: linux-kernel@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: IcZIFt1JpWJOoMQpQEm8vk-E1DJcZvSO X-Proofpoint-ORIG-GUID: IcZIFt1JpWJOoMQpQEm8vk-E1DJcZvSO 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=731 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200015018715739 X-GMAIL-MSGID: 1789200015018715739 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 paging_init() 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 riscv architecture. Signed-off-by: Oreoluwa Babatunde --- arch/riscv/kernel/setup.c | 3 +++ arch/riscv/mm/init.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index 4f73c0ae44b2..ea4fbc8e0ea1 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -261,6 +262,8 @@ 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(); diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 32cad6a65ccd..32b168d6672b 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -264,7 +264,7 @@ static void __init setup_bootmem(void) * in the device tree, otherwise the allocation could end up in a * reserved region. */ - early_init_fdt_scan_reserved_mem(); + early_fdt_scan_reserved_mem(); /* * If DTB is built in, no need to reserve its memblock. 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: 192896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225297dyb; Fri, 26 Jan 2024 16:07:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPHWv4ttWGQSN7tO6SzPohACKvTV0Dg6LCakyLKNdWqUpu+6wYB7cu1k3+ZJsK9mfOLAqe X-Received: by 2002:a17:906:d8f:b0:a30:d9c5:e5c with SMTP id m15-20020a1709060d8f00b00a30d9c50e5cmr264464eji.55.1706314075797; Fri, 26 Jan 2024 16:07:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314075; cv=pass; d=google.com; s=arc-20160816; b=k5ingSLV2vRlRqGhqv1yiOJaeE9wPHYgWVglPyJ1mmFcFQiRDit399bX63tX5gfe3H 3eiXktZxirM1fNb1Y9+soHzjKAvd6Ebki6j+9P5+c9Pu6HHbhvi01qLDQggB7bEbaR7z yVFWexmXS0hHDCSYMX60ZtJk6D2xQrFGVgO4Yp5sxQtHZHB6HcJ0bFmabWdc4OuwzraN EUCJ3bodP+MVkv1Cyh/kvRbou/5PKixNAUbG+eOFFYRuitvLYNf5pPtQAp3VOja1Tkou vBWGQqHfjx3bGlkTXE+svGRofQghZHwTSDR3RPDcfEDEr1EqGKrfXspoSeotgv3KfYCJ /btg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Rbfri0w8rs8j6hzJO9zwSwBaauq10llgtGmh4EGN4Iw=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=aROZUrkHbaJHUo91EL/fOsBdraQJNK6Y/mVNR1GERlNyPXdi4iR0w/Gkr1TdpyjcTI jBH0Vvv6l+XgcMmXiArWlE+Vr64Qcztq03xiNvFxvKrV9ZPjm+CjG5GJQshfyZfv9Se1 NuKngcA1CUP8oIUAkCeqa+p4x0PIsL+nAGpxIhrL/bQwkhU0waRU8cgTMESwsQGBOrKH xQnSOxt8HHiIq3JnaxXXkOAD4d/uKG/zyR7u2EtQJT+9uamiQe0tRvovRK0yB95Q2Iha ak6+9V2owhzlWGwFfWKKORIN3Fnt9nXinHicVza3TUKmFgIRn61znXZVJ9HkWzf+McJC 4YBw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YeV+7YJ8; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40909-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40909-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s8-20020a1709060c0800b00a2d5b1f5220si992045ejf.392.2024.01.26.16.07.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40909-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=YeV+7YJ8; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40909-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40909-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 699E01F21022 for ; Sat, 27 Jan 2024 00:07:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C5E9D76908; Fri, 26 Jan 2024 23:56:18 +0000 (UTC) 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 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199988344886138 X-GMAIL-MSGID: 1789199988344886138 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: 192875 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp220772dyb; Fri, 26 Jan 2024 16:00:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIoeo2Enr8QMY0ZR2cQ1ta411Q3btoh7R/9PHY19DJEY4sqmgC9hnlQEASXCAhUyu9MSuE X-Received: by 2002:ad4:5aaa:0:b0:681:30a6:e01a with SMTP id u10-20020ad45aaa000000b0068130a6e01amr711672qvg.93.1706313600644; Fri, 26 Jan 2024 16:00:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313600; cv=pass; d=google.com; s=arc-20160816; b=B21xmqfUwYd25CzObYJM2j/CaY4mnhmy1eXxJLjo7uoosriNEiTOESGXykr2w7kQpO JdET23N/izlWsmjUAZQmsu3/v0JXzZJatmq3Muaa7+cSyLU4sj8qE/koQTmWmN7WK7kl q4DxbKfHZ9oM2V2LqyRo6B/bRZxOSjdH8NVFsGxZFn9fZuQwQev6yvRC6DSIMbO5JMBY P7gesXyyqA86rKELsfL7lC4f+hluEVBZV3tD5rEY5aAhq60fapXXxM3c1yfUX8JnVNGg 09pjomRlg0hM6IlPscHBCoBd6J+Hqp2+Jn+6rhUBDvg/cAafCru/Al93deZkFtmYB325 4Ftg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=XHojE8I4UoGhN8L8CD1qTmSQB9PfOL1bfEmbuePPtGE=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=l8IZf4/z2g792OnU+Sa8DQQ8n9SwFWCV/ZKQrzm7/P5iWLLc0lspH8qrFc6HsOrXIy qvBAKlpXwI0+Sisy2wyCW5dFbOEQPw6D9gdNgozCrHk55oTxurlPXe6SLX4Hx3mYqEuD 2e4oyVrJfxhg57NEP+61hiMUgwt9qxIgP4vXFTV18OG5AwhlrfcT/JZ3D0ZUvvDNVZ1b 3r472qMBqegeLV3+aG74OrF4qnPq0aaAKMupxXTChY+HpT/wn74eICciow/BJ6Y03XAG Kn7/o9HmIkVNSPnMWap39bLJZbSyEEZWk2haGrC8U7wiUGX2y79RgQVwR+QYAjAgLb/p k3RA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Bdf+Zr9t; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40878-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40878-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r6-20020a056214124600b00685c776f959si1061360qvv.517.2024.01.26.16.00.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:00:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40878-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Bdf+Zr9t; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40878-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40878-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 633841C21E08 for ; Sat, 27 Jan 2024 00:00:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 662F46312A; Fri, 26 Jan 2024 23:56:07 +0000 (UTC) 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 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199490266804049 X-GMAIL-MSGID: 1789199490266804049 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:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192880 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp222761dyb; Fri, 26 Jan 2024 16:03:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5zNygrU3KIMVRA3tSLtFAzTdiRqNPxS/DSpAEY8a4VI3Uhy8xEKeYW14xBA0JMGXOyU/a X-Received: by 2002:a05:6808:601:b0:3bd:62ac:cd3d with SMTP id y1-20020a056808060100b003bd62accd3dmr594158oih.47.1706313790032; Fri, 26 Jan 2024 16:03:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313790; cv=pass; d=google.com; s=arc-20160816; b=BHd/hYWFUPBpDhXS0l/KEet8driB2c7u15lAXXc0Juh3wzZoPfELp7rkoqdNosSLd4 oaqKM6p8vfWnWRZvHnQhy186MDtrmWKpls7hAOAbY1WTrAHNKAi0XehtQsbU2Jb4nvYV 1m6pHZcQ6Ds1g7RJIBFUyZjxYF8xZVw00xmxiG5kgQKUAkZn0/GOjHw6OZw08zI+Z7LN ICsg4FMIPwjovSqKkrPqJ/khCHEXY1HNrmthj5HP0jH6NGsx0zpCz095kVI7tbd8nswG iOOBA9o6TXbV14DPv5SHhPsDvotWzVX2kSrm6yV/B8BBVCMnD2YYdqAo+Is7g0Dg3wdN dnUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U+UATSXEeXs8N4A3dvS/aUlabuPy4uxVicMZX+w6gGA=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=0kNDnIIDxGpXmvruIktmfHcevRuvWQW9F5VVkjqK+zuiE0LBStUicBCxd/JgWRVUaY 0Z2vHYMVRBvkbKVRyCZjIIr6uM/3an1RUYs7zCr96gfvBoxmqAjqzY6PK7+txzABhjgx qWevX01YahxwV0ewP/YNE/1ogOKyoOYum6VCeHXtnJaJjRnydNrrjo6+yqjCxOtAxiyH IJeQNYIxkn8DrLjN9eplV1l28ljta5ADunJkE/bC08G8H4Own55Q4GTXuJqtrnds4KG4 5o/DGejYHi92s03ZiMhfzAnItevTWOJb0nd+/SMrnKJmNcuRW98wE/tos9xthQCr3T6K oALg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OhZU6uAU; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40885-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40885-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id vz25-20020a05620a495900b0078326674eabsi2404946qkn.409.2024.01.26.16.03.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:03:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40885-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=OhZU6uAU; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40885-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40885-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3A7C41C283F8 for ; Sat, 27 Jan 2024 00:00:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A095E64CEF; Fri, 26 Jan 2024 23:56:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="OhZU6uAU" 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 A285E605B5; 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=ZKjamwedZlGgMhwDZfut/KTa3SpNoJ68oWD7KzOkNDWwJWF9+oBWbcmpyK/h3EvFHhxxT8/LHV+9FTyjFuUkYogEmPDu8X2o/Cp62jXdvAINDuPtqQG3N2aPXGvNxLXoPzP6VB9JEZQ76ZOENtlsYQ87O6zJ7zxZ8vhJBIoMzOU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313363; c=relaxed/simple; bh=UFtlQJJOP/ynG15B1VxGKrn6Aybnif7XJF/2t0ORLGM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Uw6hLqLJ+UHy/idzQ8Oip6ANpLSWiLGe6C/quuwotmdXoylneo91w6sBko2O2BTD5gNu7QvLiYlTnIrtGgFtebnmB55A9w1a+a2GREVB1q7IyvAcvitKwGB0c7xCrVauKxgQYCzm77d6HcE3vFK9STDtehohU/FJ+tZhYL9HyHE= 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=OhZU6uAU; 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 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 40QKa90W020977; 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=U+UATSXEeXs8N4A3dvS/ aUlabuPy4uxVicMZX+w6gGA=; b=OhZU6uAUDmSzZC0qc+jo1qHfgOBmTjY/5TbA qqr7FAM9+802uld+6AfYtc/wE5GRNTAig+31AW2bZhU84xhgH8BOhZHWHCMXev2R 3QmfqzyESYIUpdhWkTLKCL8YDeujiYUjbrhMG8eWzHcJwSXUQko+kRB5FFH/WM/m Yd+T45lAcGAGkOqHQ7dHHwJ14R7z84P81lzZyWI0LiaBr7X9s6shd/8liPVvjMfT JtICzAZe6jHsJlHMAbh8N7+S6ZYeOiAjqj5FAZkF5H6n/wWq79ypu5ALxa0vMr1b uHKWYf0fW4ZW6VOCBHkxOHtbsBCx48koACEMWcQ7HBXpM7Ry+Q== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjx88dmb-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 40QNtAhP009370 (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:03 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 16/46] xtensa: reserved_mem: Implement the new processing order for reserved memory Date: Fri, 26 Jan 2024 15:53:55 -0800 Message-ID: <20240126235425.12233-17-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: linux-kernel@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: 5nTE8YjTrsjVCPcMJnLNndpE1SmrgzBu X-Proofpoint-GUID: 5nTE8YjTrsjVCPcMJnLNndpE1SmrgzBu 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=555 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199688773630813 X-GMAIL-MSGID: 1789199688773630813 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/xtensa/mm/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index b2587a1a7c46..ed3dd5f67b4a 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -47,7 +48,8 @@ void __init bootmem_init(void) */ memblock_reserve(0, PHYS_OFFSET ? PHYS_OFFSET : 1); - early_init_fdt_scan_reserved_mem(); + 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: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: 192877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp222424dyb; Fri, 26 Jan 2024 16:02:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IGf84p5cudhaYOaE+o7c/gtaeJwhmM6GCjcGPMQH28EseuFBoutBwu2qzvySgRazn050ike X-Received: by 2002:ae9:e20a:0:b0:781:7084:b502 with SMTP id c10-20020ae9e20a000000b007817084b502mr628607qkc.118.1706313756661; Fri, 26 Jan 2024 16:02:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313756; cv=pass; d=google.com; s=arc-20160816; b=FVFz/MXi83ZCvqMZQupfXNVTS6ifQM5KUt7/RPivr5z6UCg374aLAejygmT5X7Z4vg clWQlofgeI+emCYZnYlUJHh94L/ZYxQ1y4V1MyBzdKTAXfd9ZGvByYc5qjtJN5REu59n QuA5wyswnE5x86XJE6iEKIwxSb20rmGKcl5PzFZNzxTD4xeOw7cR61fQRB5H1+66i2rB KDj3fofb5rAfEmpzDKbk8Db8TKL1LJ1kd8igggxuAQnS9VRVSGe6MKVH37WvnlMnyESl TurtBxbj48B2AQ/8xbyxLAtPBamcZmyrRiqOAuuAaOx1VqReTMlNAiO+HQvTpGspgis9 TgiQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RlnfElnCLOGgkR/BB4CzdA5j3vD5FsmMJ5CohK/Sl8M=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=G4lQOuBmJJM3W28gMMKLFjp1Omn7YH/j5HZJ5IXnlwiY+kxbtACYfpWNXV64NBISro nBrtU9D0cx1xBgzS2gIFZcTkGt2bL/Vj3QpSRWw3e7mwc+Wl/a/o7shdWWQkDhRcvIJ6 S2r5woSaFVgn+WFb/jXmkoXKU+w2jCbuyoX6ZWnAxcmOeztwITYzdrdjXQszQnamTDdS LHmE6mHujZrh4IgXy3zOgBMIV3YMxnR4eE5BfUAZOnJLsLeSCuFaIft1Y9XQXn/tyqNZ PzKOsqQGQl3cjFPMFJPMjiRVrwQ/xqKyD+PR10Nh8/QhoTLlz10oGafCw1YBPxYxu7mn uXUA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SNyeXf6R; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40882-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40882-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id vz25-20020a05620a495900b0078326674eabsi2404946qkn.409.2024.01.26.16.02.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:02:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40882-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=SNyeXf6R; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40882-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40882-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id DC9471C217D5 for ; Sat, 27 Jan 2024 00:00:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 817DE633F3; Fri, 26 Jan 2024 23:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SNyeXf6R" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199653714143614 X-GMAIL-MSGID: 1789199653714143614 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:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192892 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225204dyb; Fri, 26 Jan 2024 16:07:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IGK2stOq/jVKau19CSoHhYJKIc2oyamjQgFmRX3hx7U5scxtqA0D9/Wr1rt5ciTD7CYHSzB X-Received: by 2002:a05:6870:2c8c:b0:206:4d0e:c190 with SMTP id oh12-20020a0568702c8c00b002064d0ec190mr984087oab.52.1706314062741; Fri, 26 Jan 2024 16:07:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314062; cv=pass; d=google.com; s=arc-20160816; b=rWnZQ4iK8na6m0AoUyXtsgUQ/FjnsbndZdtpAiYOFECBPb2cZX0OSVJDnhblC5S1gV Eq4Gk+JxcGwtgH5P5S5jmBf7qGr14TqyrPHrni6LNhD6W+uIXcqBbQBV/Ro76vJiMPp3 6yEKdpHtDJGnZtke36zZGFNUsTh3k14/3FkbNC/ZxD+eQVuCfBexdkDE7vzsFGfgt3D1 Qg1UId++u+tt5FadTU9IXru/xgpAqDhku/LJnT2hgL2qjVz1UN/jxrqGarWMP5j4ytxi RfpMNZJ7AWZuDZFqbqSvxeyrSGqWoQTDlb5fqbbBE0QFiTDnxOGyrVwH52zi57b1PTQ6 Mm3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qI6VfLKrBrkEDM9xCiQNZx23EmHN2UyOxrcxb9sAKGo=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=QBmB8Sp9F+pyknhVPAIaXvCfqQ13npHx8IiTYOaYcTUi4bhLPp1UEytKH4ceAZu4EI HRZ+UdGH+DK/YYZEx0ceJDaHjhScCa5evf08LFCRlbFaaSgxEnZGyv645RLOPPjm7WVr XXp5Y4bFgxdFR0+4La0/3BVHFdAyswCZQvIMIY+rDpOGnitkofDRRCSn+y4k+XFhj0u7 F8B+yek2tT05pgpJarf3yCze6QkYkhnIk3bRQhsc+UQPzIBOwTZQ22jgC4wXUS1xubWX +uZC7Y5+rA/BhI+OvOBIXgHeEcbCL/q1wl04Y0N7kJo6C73atUqBCbx75tFxMdV4VUrp oP6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UZtyN71r; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40889-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40889-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bv190-20020a632ec7000000b005d8b6ebfb13si116256pgb.659.2024.01.26.16.07.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40889-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=UZtyN71r; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40889-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40889-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D262D289A11 for ; Sat, 27 Jan 2024 00:05:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02E196A32B; Fri, 26 Jan 2024 23:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="UZtyN71r" 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 C79356087C; 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=er/FiY1wndS39JrUNG6J5yLlY7ShWleqrmJkX6w14P1dKYuCurw3Kd7D/lO9DYUJINY+j3yzp5w54UP5bfS1mibblhwdu41ITix3/yPZgu80qbvL4AiBG2nU39yi/UngLXJzn0/jUTCDSOJW2r+FNspoA//VMtz2GlrY1Uzk9KA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; c=relaxed/simple; bh=mnaTXHL7qyvkBg0qOOl7qQWPWG3GB5Bnp457+ulZn3o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RpsKxeDcRnUX8sq/O1feGER3oK+2zvQT2ucjuCMNLsPZ1Vce8c9pGiZV6IWrDOmRkirH3xFC7h0b05vqMpsgtzpPp1pcm3yZCsIPjmtYhEBfktzMwrKEF9Z1JQZvXq+3T/K6i0Mfc8XoY2WxUmIBDFGzE9pWhPMO6irVZdlYDFE= 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=UZtyN71r; 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 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 40QNjlab020531; Fri, 26 Jan 2024 23:55:15 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=qI6VfLKrBrkEDM9xCiQN Zx23EmHN2UyOxrcxb9sAKGo=; b=UZtyN71rn7dLwmmFHoJXPMujguYOLAnW4PCx RElDN5UGhPa+1YZM7AnM+0WC9S4bmFQAPXfcCTR6S1e8d+nh6rWSp9o6I4uCvHYX e4x8BRN3v3M9Cj2ISg1pJSjllgGAXkN7H+0sfAzLcAN1vwxAfsK/xb3CDo3GagFZ viaFI+OiRbYEDcFYcfmdUmTUFQBKgNRm6w3dubsaNmNa92frzjf507L7/tBCavso e/rbHKd8lGmf4P8fvb0zV/lb2qJk1e1CMo7bb/A8vDbqUh2t3wMqnI9j4mCy3KyT VQCMmc4UcnQadY07eM/x0sncubgX0V10oqNXb6ip9zRxQp+uGg== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv4f9jd0k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:14 +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 40QNtEer030740 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:14 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:04 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 18/46] of: reserved_mem: Add code to dynamically allocate reserved_mem array Date: Fri, 26 Jan 2024 15:53:57 -0800 Message-ID: <20240126235425.12233-19-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: linux-kernel@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: eVS7f7ccMtCIjS3leU8ZnSql-wIPXqEV X-Proofpoint-GUID: eVS7f7ccMtCIjS3leU8ZnSql-wIPXqEV 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=999 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199974653151917 X-GMAIL-MSGID: 1789199974653151917 The reserved_mem array is statically allocated with a size of MAX_RESERVED_REGIONS(64). Therefore, if the number of reserved_mem regions exceeds this size, there will not be enough space to store all the data. Hence, extend the use of the static array by introducing a dynamically allocated array based on the number of reserved memory regions specified in the DT. The static array is initally used to store the information for the dynamically-placed regions. At the same time, the number of reserved memory regions specified in the DT is counted. The number counted is then used to dynamically allocate the memory required for the reserved_mem array. Afterwards, all entries from the static array is copied over to the new allocated memory for the array, and all other statically-placed regions are added in as well. The static array is also marked as __initdata so that once the init process is done running, this memory is freed back to buddy since it is no longer used after this point. Signed-off-by: Oreoluwa Babatunde --- drivers/of/fdt.c | 11 ++++++-- drivers/of/of_private.h | 1 + drivers/of/of_reserved_mem.c | 52 +++++++++++++++++++++++++++++++++--- 3 files changed, 59 insertions(+), 5 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index c6e8560946f4..ebd2fa9e0114 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -613,7 +613,7 @@ void __init fdt_scan_reserved_mem_reg_nodes(void) static int __init fdt_scan_reserved_mem(void) { int node, child; - int dynamic_nodes_cnt = 0; + int dynamic_nodes_cnt = 0, count = 0; int dynamic_nodes[MAX_RESERVED_REGIONS]; const void *fdt = initial_boot_params; @@ -636,6 +636,8 @@ static int __init fdt_scan_reserved_mem(void) uname = fdt_get_name(fdt, child, NULL); err = __reserved_mem_reserve_reg(child, uname); + if (!err) + count++; /* Delay allocation of the dynamically-placed regions * until after all other statically-placed regions have @@ -649,12 +651,17 @@ static int __init fdt_scan_reserved_mem(void) for (int i = 0; i < dynamic_nodes_cnt; i++) { const char *uname; + int err; child = dynamic_nodes[i]; uname = fdt_get_name(fdt, child, NULL); - __reserved_mem_alloc_size(child, uname); + err = __reserved_mem_alloc_size(child, uname); + if (!err) + count++; } + update_reserved_mem_max_cnt(count); + return 0; } diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index 542e37a37a24..c338e1c019c7 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -176,6 +176,7 @@ static inline struct device_node *__of_get_dma_parent(const struct device_node * } #endif +void update_reserved_mem_max_cnt(int max_count); 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 d62f1956024c..419b062cb41f 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -26,7 +26,9 @@ #include "of_private.h" -static struct reserved_mem reserved_mem[MAX_RESERVED_REGIONS]; +static struct reserved_mem reserved_mem_array[MAX_RESERVED_REGIONS] __initdata; +static struct reserved_mem *reserved_mem __refdata = reserved_mem_array; +static int total_reserved_mem_cnt = MAX_RESERVED_REGIONS; static int reserved_mem_count; static int __init early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, @@ -54,6 +56,46 @@ static int __init early_init_dt_alloc_reserved_memory_arch(phys_addr_t size, return err; } +void __init update_reserved_mem_max_cnt(int max_count) +{ + total_reserved_mem_cnt = max_count; +} + +/* + * alloc_reserved_mem_array() - allocate memory for the reserved_mem + * array. + */ +static int alloc_reserved_mem_array(void) +{ + struct reserved_mem *new_array; + size_t alloc_size, copy_size, memset_size; + + alloc_size = array_size(total_reserved_mem_cnt, sizeof(*new_array)); + if (alloc_size == SIZE_MAX) + return -1; + + new_array = memblock_alloc(alloc_size, SMP_CACHE_BYTES); + if (!new_array) + return -ENOMEM; + + copy_size = array_size(reserved_mem_count, sizeof(*new_array)); + if (copy_size == SIZE_MAX) + goto overlow_err; + + memset_size = alloc_size - copy_size; + + memcpy(new_array, reserved_mem, copy_size); + memset(new_array + reserved_mem_count, 0, memset_size); + + reserved_mem = new_array; + return 0; + +overlow_err: + memblock_free(new_array, alloc_size); + total_reserved_mem_cnt = MAX_RESERVED_REGIONS; + return -1; +} + /* * fdt_reserved_mem_save_node() - save fdt node for second pass initialization */ @@ -62,7 +104,7 @@ void __init fdt_reserved_mem_save_node(unsigned long node, const char *uname, { struct reserved_mem *rmem = &reserved_mem[reserved_mem_count]; - if (reserved_mem_count == ARRAY_SIZE(reserved_mem)) { + if (reserved_mem_count == total_reserved_mem_cnt) { pr_err("not enough space for all defined regions.\n"); return; } @@ -303,7 +345,11 @@ static void __init __rmem_check_for_overlap(void) */ void __init fdt_init_reserved_mem(void) { - int i; + int i, ret; + + ret = alloc_reserved_mem_array(); + if (ret) + pr_err("Failed to allocate memory for reserved_mem array with err: %d", ret); fdt_scan_reserved_mem_reg_nodes(); From patchwork Fri Jan 26 23:53:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192893 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225212dyb; Fri, 26 Jan 2024 16:07:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvejy+RTrCSUMS8n1YSvG0TqTa5n5Ll6UJziF/6eCVlidXCihz82K4L+rFAmu0xh7C90Pe X-Received: by 2002:a05:6a20:9d90:b0:19c:3264:ab1e with SMTP id mu16-20020a056a209d9000b0019c3264ab1emr764696pzb.15.1706314063400; Fri, 26 Jan 2024 16:07:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314063; cv=pass; d=google.com; s=arc-20160816; b=yJioLpfwAmVeMm2mKU9mnOV6PmHpVHbZDP4jAiVAUEqdinJ5pgyxebmP3k0lylAGDh HQeIWtBeDNC7b/UP5FM5sUduOnPOUtoPJrx5smo+Vy2dBWvMY1nnEmwHvioUcXbAlLl7 yDW0RJecABGLEXyq1VrW0WS9pL9/Mc5g1EQLI2S27iHFKT3k5hempNY/OT+cOC9TB+AA d05NrogR8PPALZt5uWiJU3AoK6F+tsNiuTB/25u8hlYu78+/osxHSLBfOwpeCrqOFbaB DKsYYPeCPu2E+QCrjw1mhD7jUJH7LWrUPaFXZzssUe8taTvpdUALFJYhJwoiVsTevDe2 YElA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NJDf58Ib8JkG06QROIbGFq58wYx8uf5SFt7cHo7V4UA=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=qWxfCUrbf8zXCdECBTMCgNAvxtdIDRxaNuLCEJTPqjggxYOuiDKfeaoE+ekW96PJni +VdlLShG76y15ZJbR2E9E8Jl51isCdhmNdk3+rl52uv8vVHwvC6I9AxeGrqhX8P+B9e8 /p8SqPD9ox/+d4jMm0k7lzo2UD6lsUP7pUTs0L3gJ/OEL5BEA8gFW8qKwx/56XIX1Fpq vwgcTvBYhDAeLIn9oDTQIQ9ON84G7/mPcCABGdoJhRDhw7r6vrXuomR1YMTVyf/PxvMo E9rkcHx6wjsSr0EwFCfxAFiPt61+Ow0U2mLKoKTu0vZVuSuzh01qWD1VghhzBeyZyv/y F+WA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lQ+1d9W1; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40897-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40897-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bv190-20020a632ec7000000b005d8b6ebfb13si116256pgb.659.2024.01.26.16.07.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40897-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lQ+1d9W1; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40897-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40897-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C25BE289376 for ; Sat, 27 Jan 2024 00:05:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CC2D6A333; Fri, 26 Jan 2024 23:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="lQ+1d9W1" 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 0047660BB6; 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=pRb/7/0191bqlBUGT4Stt0YhGyuUlFjUxOLNwlIWc6g/Vq6b5RQ8tRoEKsrRHsSj9FJEOZttKOz3KuW3nYwh57+P2fROS1ub8elB1ZyJm9LY8ZloT6C3UNGKX/cO8ti3Co8Olx6doSPHwstbl2MSOpdvfxsJAq8LLYk8fUiVi30= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; c=relaxed/simple; bh=JGl5v7seztCPmJHCh8o1VaGWv1C246LQNcYLKU0ZQ7o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ABOKfd3+ytvnVWvlV9XBA9OjlGDWRNXEvIsPz+0TT8PWp84TVTm7UGA5FS6BRuCN2JXSsBGdEbII0rr6Qb2hwzXmP3vFLkvRynk+LNPN0r0Q3aooYUGQqIfhImkmSMr3zDQvFuvxkcrvrl5vDmqGydRwkGB+BJ9eoX+/jIyzZ0k= 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=lQ+1d9W1; 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 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 40QNoS3B030684; Fri, 26 Jan 2024 23:55:19 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=NJDf58Ib8JkG06QROIbG Fq58wYx8uf5SFt7cHo7V4UA=; b=lQ+1d9W10WZvljWjj7QKWg1cbueMzniD4405 KJ0TazkBxnLedGDZJ8EphE8iAhoaMvB/X5o3y1PfleijleZC54+LtVU/BH/L0EYc Tc7ewrr0gw/wz5fa9OPHT7vXFqnRbkL2Qq5AU0lasGrZ/Wyd1QAhj+1o1q1QhJB6 NvFxQ1idepCjABmpNlMregoInl+aRX/TdnY0ce/OxokJ6+IdSdnPQZoBImc27SqQ M7j3rn6cTjPGFWj/A9ZT/7y5mm8T/NV6FDa/To+WF8jllngcgur9qrHHaMGfyg/b XSg/HFUzi8bQiKZY7ywemDyKnAfDyBFnc3aeD7zM473u22NCtw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjx88dmp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:18 +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 40QNtIZk010201 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:18 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 19/46] ARC: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:53:58 -0800 Message-ID: <20240126235425.12233-20-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: linux-kernel@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: a3Rk-vMM799K6srWhJ-MFC31_WrqEjYU X-Proofpoint-GUID: a3Rk-vMM799K6srWhJ-MFC31_WrqEjYU 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=774 lowpriorityscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199975308286064 X-GMAIL-MSGID: 1789199975308286064 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/arc/kernel/setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 44f00e8e16cd..c5e3c4abb249 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c @@ -524,11 +524,10 @@ 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(); + fdt_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: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: 192883 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp223768dyb; Fri, 26 Jan 2024 16:04:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXOJTFfHFA/F1dG9ORkHk4OplN/lDJuneAHLbzxDPcy7PPGZ22l4Yk70QOZIi8wCQYXZz/ X-Received: by 2002:a92:d98a:0:b0:35f:f6a4:53d8 with SMTP id r10-20020a92d98a000000b0035ff6a453d8mr708633iln.8.1706313897015; Fri, 26 Jan 2024 16:04:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313896; cv=pass; d=google.com; s=arc-20160816; b=iYgBOH1OFw4ZcWQpff/WROMV3qPrYJTRtp9Tui6o1DfBlQYNedW1AqBXfSpbqk1gvC 3qvQ03l7wQo3B4b0yPuBT0muFtCee/nYZMLWxjEt8TDzMjRp3Fh8rW25R+Vw3+zbw64C UkcNkWaQbfnL8BtwjIoKou8oea4wyT4G8mSrxYS7+c8o83LawpyjpAML1nfYIYhevjCg oh1WPI8xzYkYuF4WCtiZB0lxvYmxwNo+bcd/7y8u0NjxYG2J4AtsISdPcDO6J/PdiNRK 0A5asrRpBzG4ftPOq+o45WJ3vCUvLuhI/7o6Wc/mLmAJlEdxyvYy1C4DvTtLAlNRx0ia VPEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FYNloLSklg4we2MPnWB0/vfF5RwFSqhW13Tgm/u/lCM=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=PBxt6ia6rLNCDgiIfOw5vSnM18lJREkVO+rUoxY+W2o6iRSTticFn+AmkFs+SRiTjW JqFECUvDa83/Pv4SPoCJJp5vAW/9Vopnr9sj2E/c+jPVdZKQOUxyptzx0aFPajjYPASe tAThSgMpt7VZ0OddKeLhS3gkEVxd5lvm31nS2t18GJfwb0wpiG9Jt7WCehzdVbcKy8oC ifKME++8batHpg+aW4GB/k3IkBxaTvxtn9oMKHpcXoiDCRSfzxmvUkyQTblsaY/nYUG2 M2obsjiGxklqY9FIcSuNnX2W7WymuDd8puMaWsaf2EROva8z3/GBy74jTOEPGgOpsKPF dcJQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hcdD+Yg4; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40884-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40884-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id bv186-20020a632ec3000000b005d8a938910bsi768059pgb.429.2024.01.26.16.04.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:04:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40884-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hcdD+Yg4; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40884-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40884-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id CD79228FA83 for ; Sat, 27 Jan 2024 00:00:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64ABE64CD6; Fri, 26 Jan 2024 23:56:08 +0000 (UTC) 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 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199801275776399 X-GMAIL-MSGID: 1789199801275776399 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:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192922 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp232269dyb; Fri, 26 Jan 2024 16:25:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMU1nnJ8d8sJqwwkX945iPbAhJIZAAv5WwHRdCDGPUwp4u7fF81Dz6FmyvZ5qEjxg8qNZ+ X-Received: by 2002:a9d:6f1a:0:b0:6e1:1313:800 with SMTP id n26-20020a9d6f1a000000b006e113130800mr630868otq.25.1706315150433; Fri, 26 Jan 2024 16:25:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706315150; cv=pass; d=google.com; s=arc-20160816; b=L+nEBA97N9bmUzJk+FvshO+iHCMx0Fi4wE2M/j5hE4LUX/tIXfmGQgQ+pEnIXTnzZW X6zitZOUdXzE6wByw9zpH/Kq3VIWWG1kUs/77bM09LXApNXM9fKQLWFf0wIvazOEeekR waPbt5CcKZexbpxPjq5QGHBOc6z/0X9zOTDPWojnHtgEEWLrt3KAx4PbZkpc03QET4OW fX4FtLQsBikhg1njpsGmvwEgsJAbOCkR6mStF6YYYoOuDQdkCXTwyh+5Af/7P2u9b9AW 1Wt1JpBjThbImCIB36Sg+xjWvoJisyFYuw+Ih1V9oy8HwXYMayW0SdQdkgD9/KOt05C9 MZmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wV23Cz8RhkxYrTzcgCCI1jmDyjxgeWrGG2Rzo4HZDHM=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=xOBaN82TNznxKZhvTV3sTD8J3owXgE3YN+RDdIvD3kemvllgJw3VtEM6Vep89wue5b OUisXvIS8JYj7ZorWX6B/6mG9EWJQHrtdCpj8/9rOpIIDUlDNMFoZAZKU6td4NcdGfap VKINK/vTkQ96rgZQhjrfXDNpJAyE4NxIa/jslEm1MYbTwnGxDj4ec9EQ5yrS/+m4EOiF CWj2QSh1T/c2Bdfcp2a0JQ1kf3yNWcvef/NVv8kTanlJUe/N2ah1qsGSMSUJOIkYidME L63VlqKsb3o572uvJVSy5BKfw9RBd20NfTn7IgNKx4pXlHtfzWCd/mnwtoqv4+m242M1 vS8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=S2PebOW6; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40894-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40894-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l6-20020a656806000000b005ceeeedc4b1si1874526pgt.236.2024.01.26.16.25.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:25:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40894-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=S2PebOW6; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40894-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40894-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9B684B29AE3 for ; Sat, 27 Jan 2024 00:05:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2CC46A328; Fri, 26 Jan 2024 23:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="S2PebOW6" 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 BFB0C60B9F; 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=1706313366; cv=none; b=nZwLZhd3FOl5SNL7A8/T8N/xV+iP8C1KltGw+YvO6mlQ/+2D3kt0e4vdgntf9/o4K+MGFg7TsU32y1RCY9biQhQN7i1CcUqr/re02Pl4itlS2XNvcxUBHfXMKcdxDE4h9V7Wq+oGfTr5zrwKA6AgAjhBl52NRHB17nvxN6dQV+8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313366; c=relaxed/simple; bh=VPyIiL8kwP6zM8sAaBrV6q/kDbsX1JXchn1kSTe+1mo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DE984Kq46nhKizEoA9w0ifj2ww2MIQ07/M+NTZ5kEEyIju4FQjaslKiqJl/UhMleYdLAQmJPYbuWx8XWohOS/TKmzmNNkQosfjGS4lHk6RvvgcZYDsrMNDrdA58RnpHD18mA5bSrpK77TLgU8h6A/qAqjtTYlW1ff+E8jmQauf4= 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=S2PebOW6; 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 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 40QNWcCC023887; Fri, 26 Jan 2024 23:55:23 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=wV23Cz8RhkxYrTzcgCCI 1jmDyjxgeWrGG2Rzo4HZDHM=; b=S2PebOW630RS0l9md3IXDQrVxITsCjFRkyFs AF1fhbYixCvkjtcDW704OImHdT5e5gxapYeIaOaqLzB5YD71I7Cn4+7fFow5uLZD tLfaraYZkuI1lyBIxGVwwlqiAYtk0KvupapzgDZU3yOWsaWKt2QS66We43+KIZSO GkXL0NmM3OzOZxm16wyskWKJaEbRa0RYggxwmaUWyJ1JV9lLLODS3gDlY5212l9V llCM2vtu576SZce+kMkKM8fDgmhcWM/dtPP4W+oh7AlZLVbfvtB8B1L4KsGaQJ9i 4f6PE8EIB2XOpJbAu65eofPTnOpege0d9gM0NqKq80QNzzol8A== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjbg8g0f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:22 +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 40QNtMRS009460 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:22 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:06 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 21/46] arm64: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:00 -0800 Message-ID: <20240126235425.12233-22-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: linux-kernel@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: zz0R3V3NWIXN6wrH7GJy4PmPlRjdxdc7 X-Proofpoint-ORIG-GUID: zz0R3V3NWIXN6wrH7GJy4PmPlRjdxdc7 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=739 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789201115091390304 X-GMAIL-MSGID: 1789201115091390304 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/arm64/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 2a9e98104af7..426f9cc45ce2 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -347,8 +347,6 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) paging_init(); - fdt_init_reserved_mem(); - acpi_table_upgrade(); /* Parse the ACPI tables for possible boot-time configuration */ @@ -357,6 +355,8 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) if (acpi_disabled) unflatten_device_tree(); + fdt_init_reserved_mem(); + bootmem_init(); kasan_init(); From patchwork Fri Jan 26 23:54:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp222653dyb; Fri, 26 Jan 2024 16:02:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqX/gVi4tOxE8Gm33w3XQk0G4QEQCIZ/bW4xqVx+euCeQzGG8uOmJMUakCxisDTcbwfX3G X-Received: by 2002:a05:620a:278c:b0:783:4356:d6dc with SMTP id g12-20020a05620a278c00b007834356d6dcmr621912qkp.154.1706313779249; Fri, 26 Jan 2024 16:02:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313779; cv=pass; d=google.com; s=arc-20160816; b=rocTcnNuRUk8gPu9YHivty72nY4+4BNbrPd3/r//I61Se6S9tvxo6blrmKTlC5uldd AV7Qy1uPgYFJ1+P8ddklhMBMfIVUPibBTVCrBY9M3+GgORhU2iO+4h/4ysCq9Heq0XTt ZV/eW/CKlubgIJlENQR8u7BOx3SzJZNB5iEMspOh0Ej6AjVQJLQAUg3TWEaAVvwvrVq8 82tn8FWqGZY2iV5wz3xTE2Re+KC1meEBjd0xrwJ9/e0R682yr5P1kyEbMdTVRCMSrcw+ 8vNNhnzYZ0JfOlZ4lxfSXgPsM3e3kbu/rjoUi+Yc5eCOxnz9fvWFgT8Zcm8X42bLada+ kHWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9NIeVab+4KQFwJjvpVjahQhcsSm6ssiCjFbQstrLKNA=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=ovtkPZUcS+0SZBwqaFlw6756HR7CKPeM8zWPt4gS5NzaFsY50Xm5gNPlVAhKB/6pAg Q0NSiHeFDITql8Rd51u9F3+mUt84FI/mFUEXZru304uqa9EnczKKtBIPSjfI1z52DnRO HwicWiuxgG/4DyJIJP5xX05n4hUWAwzSRY3/8hgNZygBK7+jrWg7YjTb+dcsUwgRtYPG y1oJPZRi0XxYQ4zRcGmr0NJoJyvBgSfU+neCkukOQQJ6AtzFkLhpGXIEXNAGVuAispGG EdUMTLg/kE35ulpmzK4CzMyOUIjMLc2gwfRSXExx/DjCO7+aIN11u2ghEIV1hcZgvZnq WHTg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fMr+6M2D; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40883-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40883-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bk12-20020a05620a1a0c00b00783d48c8158si529890qkb.169.2024.01.26.16.02.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:02:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40883-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fMr+6M2D; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40883-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40883-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0C63B1C281BF for ; Sat, 27 Jan 2024 00:00:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 41E1A64CCD; Fri, 26 Jan 2024 23:56:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="fMr+6M2D" 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 768CF605AF; 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=1706313362; cv=none; b=kUx95lJm6MCJDK1UYIq+QOfyYVtM/bSrF+Yx+nVJhYGqtHL25D9hc4Oc1rNtpvItpt3gQ41TbBSQjlFp2IO6LfBCxkDLdGKNpHC8HXg1TT6+FlVKCuL6RkspCKRs0TU4VrfIbGI8mrMJuXp1ytRsejg5a2t34MInEM7n8fqGgag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313362; c=relaxed/simple; bh=oATBYg4WZvtVhxazY83MItcqBPQxfC9ckmoF5bcehvo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=GUOEO5VKmeKEVShpPGISTS6kVCODDbWiBqny8g8kdbM66pDu8UAOHPyxsj5PP3/JXdOSJHCn2OYc1JOeFCned0mbbc7rkaptqs3eFUPJPNVX/Wq+iQZxqNH188VOXS0qL9XjUxNBC2OqwpFIiPVDJn1JDhQ3QlwfssweOX6/uUE= 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=fMr+6M2D; 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 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNABQ2002718; 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=9NIeVab+4KQFwJjvpVja hQhcsSm6ssiCjFbQstrLKNA=; b=fMr+6M2D9JB9W03G4AclBkYHg1/U5DQfspNX 5yuTVgvmYEwIj8iK8EfN4MMYa67iFl+IYDwYcEJc1VEtdM93+iXz/OS4kruq0V6R l/678czq8sW12SjfGN+CYEQtse7BAKFrQILPO5ZTn+BzkYFtUjmBXVC+sLAcrHrY g09yy/jWWYTDBEw+ycJjfb0+8lHGKnvi3UCLsmMO5x9JuC9RgYAxSCL1IX7zHoja gpyjuA9L9ngrf6eximgRRNu9o0y0OB/0rACAHmr6AuCaf4ycIT7qWIMBazEqm6Az UCp/q6cFxXD0rf7/NdiBo0f4h3alKFvPmy+o3dO3GXQVMWaT6w== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvgp2gru5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:20 +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 40QNtJP6010237 (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:07 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 22/46] csky: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:01 -0800 Message-ID: <20240126235425.12233-23-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: linux-kernel@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: LxtbCnVNAdzpVkcCk8ApI7GAjVIE2oTM X-Proofpoint-ORIG-GUID: LxtbCnVNAdzpVkcCk8ApI7GAjVIE2oTM 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 mlxscore=0 malwarescore=0 mlxlogscore=863 phishscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199677448025760 X-GMAIL-MSGID: 1789199677448025760 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/csky/kernel/setup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/csky/kernel/setup.c b/arch/csky/kernel/setup.c index 4e2b739ac968..d8c65819877b 100644 --- a/arch/csky/kernel/setup.c +++ b/arch/csky/kernel/setup.c @@ -73,10 +73,9 @@ void __init setup_arch(char **cmdline_p) csky_memblock_init(); - fdt_init_reserved_mem(); - unflatten_and_copy_device_tree(); + fdt_init_reserved_mem(); #ifdef CONFIG_SMP setup_smp(); #endif From patchwork Fri Jan 26 23:54:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192913 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp229737dyb; Fri, 26 Jan 2024 16:18:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVQ7GE0gnCsVtbXkj/8AAIyhrzvY3U6M6m514KpvWNa0QWOXZgnv1CNYMlFDEX2QaYciZZ X-Received: by 2002:a05:6a21:2d85:b0:19c:7bc4:6c0 with SMTP id ty5-20020a056a212d8500b0019c7bc406c0mr805683pzb.41.1706314727160; Fri, 26 Jan 2024 16:18:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314727; cv=pass; d=google.com; s=arc-20160816; b=0tsXsUNGUs34Bipu0A++GCbJ0F9KS8UXeG8dK+QDzWgLtOnKF0y1Fp56btdhZjI497 WfZdCJNiZDrGXw+IFveV3VVE0S7BpmfMkFpJ0u1Ys2pHoLNiglWuT2dkf92uclDC9NdR fKiK0Y4/0AqqCXcsoUFSk7T3Ov0NHmg4Kh3PnZpjTlXtZRymvPSHZfZL8dNBPlUJJ12D sbcDPBV2ODjdBvVGUhxWhgtnvUf24QxKC70Bb5iLGQn0oTuLtc+fhvphhwxlp5SvxJQ0 Ls/cSL3KAMZIcAltY7epyQ2M4tYgYtP3saorYjj7xfPdxwtErL/mnp9CJDyHPpBH/u2a 0u/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TQbxaUradiVsQAjmlk+elqhTc/xEHMy4mH289Ds/6RY=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=XSEde7mrsnAHidqCByrBZoaIXb+EzD0BwuOei2wZuIc378umFaEEuyQcj8N3Ma+2R5 OblIS46UImDIpN9jAXRbyP29Y2HgXlKXMnhwf25Tr/Zhcz5nVQpx5yMJwv7bBQb0H0Wn zrFHqmcaWJqv3dQT5c9XTidLMxtv/Otp3OuVo2ppah10aHlJXQNEIUkwcSOnZ5zznTlR egFY/7kFeUgcF3d7F8QY+R7CxQhWAPl0MP45GlOHzZ8h2WPIJt+hioagineIQLBdwEPX 5g6vDgOFl28bguE4qqbBYj6Zv6O7oJXFiyOD4VJC5GbAcO0hZ8ijtdkx+AAGTr8+UQUn nY2w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hieDGjJE; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40887-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40887-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x15-20020a056a00270f00b006db79fe5c8csi1891565pfv.151.2024.01.26.16.18.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:18:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40887-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hieDGjJE; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40887-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40887-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5736EB28DF8 for ; Sat, 27 Jan 2024 00:02:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D76465BD3; Fri, 26 Jan 2024 23:56:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="hieDGjJE" 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 C471060876; 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=d+862qxFmC9fRVw/wf4+GGXIqvgJCtRUIGnb0DNu87e4wa/fhV787YNLxkdv3L9EYK7E4/pJV5knVYBf1fc3EDr7NQcTDSjDaZPt50bkOB7pzPvuPiSztFpM6kkDURt/ysRRgFY9Fs2cdvMBJJuEqHbsLkhBfkHN5qKQZm3cC8M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313365; c=relaxed/simple; bh=6T2WTb6El6HviQWBUPe5bY/jkQH9KN1dRogKYtmuuwk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YU6H97QEYQnqZe1Ci82eRXaIe2uVD2i72+Sn3Ri5rZXvLnG3ekWrVYGMddFPQVeQPv3SLXdIE9CPP20GDZXIe4YjL8/8OehtoYgWDSi2/s5UA7jU+C7FFLz9AeznU7E/g0PXqZpz2gTVIzF89z6y7TZvCTrRa0aQaDXVy+YJWUo= 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=hieDGjJE; 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 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 40QMNT1w023758; Fri, 26 Jan 2024 23:55:23 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=TQbxaUradiVsQAjmlk+e lqhTc/xEHMy4mH289Ds/6RY=; b=hieDGjJEIJ4KYvgxtpXww114lPvQuyPPwhqK Pa7vEvRIxH0Qw7sIubTcUXm3jsqqR4l1fZbbOc24cC9dlIgE53IU6yBLFt4yzjjC k27ffZcZw4h01AEGxpWUFv6lzfAW1XMkNZLuC2KLAld7CPfzAqPwxk8a3CrNLqZH uvD5hKcrlY+aBk11uJt+ge7todLie0qsNrCeHsWixzMjH8u7pWJmSJQ3c8pYymUV YZajBZPudI07T/rpQ/6lPY3ccxQ4+c8Rwhm1npPn/U8z+daaJo69gwAvJeHbiiLe 4b25/h9libYHFHakDkNUMPf0HS/77JYIhumU3MCMrMV5B5/OsA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvmmmg7w8-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 40QNtMRT009460 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:22 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:07 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 23/46] microblaze: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:02 -0800 Message-ID: <20240126235425.12233-24-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: linux-kernel@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: 1YFft0XNdhKnvYvkmrY4qIB5N9zsQ1B- X-Proofpoint-ORIG-GUID: 1YFft0XNdhKnvYvkmrY4qIB5N9zsQ1B- 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=863 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200671276012136 X-GMAIL-MSGID: 1789200671276012136 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/microblaze/kernel/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c index 631faa4613ec..d999ad774a44 100644 --- a/arch/microblaze/kernel/setup.c +++ b/arch/microblaze/kernel/setup.c @@ -55,12 +55,12 @@ void __init setup_arch(char **cmdline_p) setup_memory(); - fdt_init_reserved_mem(); - console_verbose(); unflatten_device_tree(); + fdt_init_reserved_mem(); + setup_cpuinfo(); microblaze_cache_init(); 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: 192891 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225188dyb; Fri, 26 Jan 2024 16:07:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQOOHpZop6KQ4ad1kNy5r/iFh2iikzb2uEgPvI06E+XlfvagOkp16p0u6MXNIw4sxkKWHD X-Received: by 2002:a05:6a20:9396:b0:19c:9acb:911e with SMTP id x22-20020a056a20939600b0019c9acb911emr350772pzh.11.1706314058902; Fri, 26 Jan 2024 16:07:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314058; cv=pass; d=google.com; s=arc-20160816; b=fSLKdmsnmv0ZMD2kXdHVfl3eLo8IQlL6sTHlhMKSQlYUQFFq/UxZts7WroXB50heRV DMJ9UlFtN4uq0FrLnF03kYwflfn30AiTIrY9s2WZFV3Vif7PjeOkpHVHt5oKZ6JaLz4X eo9MIewXMGDTSZsGxoNAm0Fcb+UPU5efWBmUgKODgtVDL96geIy3F2OCeGHKA8fSB4Ik E9kz2kU9PDNwUpVITZVA97isBbUxUPgVVpkci52dqqAN9vkaHV9EJhyQcpyedI0hhPli blM1hcx4LkwwTg+Bsg19HkMzLuC7it3n3ULOg2VKIGLbQF5IEIZJUx02CBQB3ZaPNg0n kOOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LZ6BeFYwTyGA42JiJKTJ7xVnip2wtZSVAMFXMR+jBT4=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=wOfqYTFuIgU3M3amcP+F4T91W0qQYq6U3+5RZbs7V4mxfQQenC51qBzLx9qBU8mAyl HrP4pqQFRsS7Tm9rKFwaYzkue4OhPy1o6mUw8IYFVw59MD/F0Vx1B1kk4eT5D1bsqAvt pl+/JrR5jeozAgg113E71NiUPRIvdEiMbt9irOzgk4hf1SGOIuYdM8wce9GIBCg0Vsqy eMD1iB0oavxLVRnPSGR2wlNb8grHpQxiBsKyfKcQ/cpy0c47riP1tqQwcawghY9IZrqE f4vsh7XfaNACE9G5o0RWMVfG9ceNJo1engS5aH5ZuoEgcnkUXaiil/DGhCc/7uRKVdya VvJQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hZz07JCj; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40891-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40891-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l21-20020a656815000000b005cda184c288si1840704pgt.212.2024.01.26.16.07.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40891-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=hZz07JCj; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40891-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40891-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BBF2C289023 for ; Sat, 27 Jan 2024 00:05:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C6B066A03A; Fri, 26 Jan 2024 23:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="hZz07JCj" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199970621363408 X-GMAIL-MSGID: 1789199970621363408 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:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192872 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp220040dyb; Fri, 26 Jan 2024 15:57:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IH84T9HOZ8ffcWAHzYYEKeh0Fv+Qh/r3Jo56OQUsGLmyiQShUQ8/sOPo3Fs8gBu0MnYDV6f X-Received: by 2002:a0c:b39c:0:b0:684:4106:4f75 with SMTP id t28-20020a0cb39c000000b0068441064f75mr2349757qve.30.1706313463940; Fri, 26 Jan 2024 15:57:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313463; cv=pass; d=google.com; s=arc-20160816; b=J98DLQn0evLghgHQIqmZixLKSJcjDxIRo2noo060h6NXJKcx0I5dac2djhEjD/Adj4 Udv4PZtXWqBQqcEPwaUE6fEFV3s/Y/dMYq67yz3dTrtpAcdetUq3+eXafeUZLsmz+CLk iSesS8HR26JhARokVdImg5jnCVJmXaFdNL9tNApdlCRiQbbjrHSZi9SYrbvWGX28wzX2 JxsSpaYEN9XSTxn/IeskWRH9cXWR1adU+sCY/S04DC8laEXoRBsDTrxKTCxoEO0xJosn OJ/i3Khr4fodvOoyoCQyW1N/kzQzepQ5rSl37x12tafriTwodSIEzgUQiMrUX8WgcYd2 h6NA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vp4tQtzbT+li35T+dpUcWvhuHZa8MXWH0P5L19tG/1U=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=ExBXQQ6TNb1KPDcPKHEteKBe2M14yTRn/BL+lb+pkOaW3IQXNITNYz3qNtzLU3iB3A vmW51d6tsi6KbsBW+o6nGCCk7IzqscsrIMrJGAvy9w4tdjqoGx4POerLkM0hnr26Vshe 4rwdvGIDY12gwPJzjHJiGHleno0d0UbZbJ8tAQrmaS+W60ORnacNVxSGt7E6G3LC08u9 Vb/rSzuIh0ht4FrvYg/BU0CjLYSmBwAl/PB/M42+tFWGjZABIoEMtNq6HGmmbvnfgGAD OFk8qH25IJnye8sRgzfTohj50RRuZQLv/NH0daMWSPV0yWsdfLtQwsN/WA85dqz8fEeQ mKcg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kxYcEZHX; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40875-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40875-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r6-20020a056214124600b00685c776f959si1061360qvv.517.2024.01.26.15.57.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 15:57:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40875-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=kxYcEZHX; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40875-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40875-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 462361C27D71 for ; Fri, 26 Jan 2024 23:57:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B26E605AC; Fri, 26 Jan 2024 23:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="kxYcEZHX" 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 619F158AAC; 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=oiA0hvIGviTfodH1l20JPRyDdTgwjtiFexbzWPnuYHQKHSZFexBx1/JbCtI0giygrvxMMmOOPMEzki7WNSlfbcTJciupwylD8PEUR9m6skTqDxpZBwcN8O5P9I+xQ/TDGIHVY6eOBar+3mvQ1NUV5bCdG62/lGgJlibLEaFJfDk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; c=relaxed/simple; bh=IRh0+yVCluUjh4TiBXNqovr9cFu9FRgiyHeDd9U6mbQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LpUqK0rjHaaskqE/GQY3PL9phitjTj7o2xqglWYE84d5R+zyjaBjwk8NCpleH7n+dMwxDrPfoBFetPkby1ozc5yzZ1IetSe4/I5dMRnyc8BMh12FWJc30tfWdi446w/REiuKj38/YQuwbS5K2IYZr/8k7cXEAUuK0aR8Pjd6/OI= 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=kxYcEZHX; 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 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 40QNlpwG008423; Fri, 26 Jan 2024 23:55:25 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=vp4tQtzbT+li35T+dpUc WvhuHZa8MXWH0P5L19tG/1U=; b=kxYcEZHXEYzh15dO8VolthugYS5OkhtHxDfN WMICWGS7ygQiMZbEMWDK8/xJ7YeQudDoWspg1iiOxkv+rZiSsQnl+9mUh43HxVr/ vCMeaIEryGoMjOkw1i7F9+PK3N3DGuRvUVETlYGqc0UahOmMNri5EN7mdp7XWs+Z EdSc1qEmeVyGxpR7lU6+lrrbDtNqKxYwV0wjX/Vt79y1iTQxBzOB+JY+bb5ARht5 G1ZqBweUyL5BwMIVZPiXLGqdgJpKSDxTXXQdiuI6ZSsbmXi4grQbZ/6Nc9eryVFq lKsEms2RQvh3cP1kMMOw68Tj91jhaptANhTbC0Oecqmq4EOORw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv6c8j5xr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:25 +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 40QNtODG018599 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:24 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 25/46] nios2: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:04 -0800 Message-ID: <20240126235425.12233-26-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: linux-kernel@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: kNswk0KfKKvQN3Lx3ruOY4arbnUkcHg3 X-Proofpoint-ORIG-GUID: kNswk0KfKKvQN3Lx3ruOY4arbnUkcHg3 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=587 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199346937248788 X-GMAIL-MSGID: 1789199346937248788 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/nios2/kernel/setup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/nios2/kernel/setup.c b/arch/nios2/kernel/setup.c index c1d42861cc72..a2f7360824df 100644 --- a/arch/nios2/kernel/setup.c +++ b/arch/nios2/kernel/setup.c @@ -169,10 +169,11 @@ void __init setup_arch(char **cmdline_p) early_init_fdt_reserve_self(); early_fdt_scan_reserved_mem(); - fdt_init_reserved_mem(); unflatten_and_copy_device_tree(); + fdt_init_reserved_mem(); + setup_cpuinfo(); copy_exception_handler(cpuinfo.exception_addr); From patchwork Fri Jan 26 23:54:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192881 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp222889dyb; Fri, 26 Jan 2024 16:03:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2iYE676UU49ApfmKDyNq6WOMxfAT/VBVYIsayQPlr5N/kQrNdgIzhYOVIuffzS4NcaDje X-Received: by 2002:a05:6358:6a41:b0:175:f9b8:89bf with SMTP id c1-20020a0563586a4100b00175f9b889bfmr633866rwh.22.1706313802959; Fri, 26 Jan 2024 16:03:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313802; cv=pass; d=google.com; s=arc-20160816; b=r8moQId4McVmRXIJ3oLqdeQn+jnwK9IP5+4CtuQWT16+2ekChjDYitgH49/4nFNxav 1JKl6r8Ldc83yemWMlAJsySQGqp8Vx1lJZiQ+PudPHAG7NIY+3jIjHXJmiwgRVaTZMj6 /Sfq0Q4bNf6unCSH5sRHYBxQUK9lMviSSGIFl4DbbH3q9DDV9YR0Qkz/aHn3p6Ky+Mul P5L0z3TtNG98euBuriVnmSLOE2vLm9MVaQJjtoUjpQS7p3ZJDy4JNzdJBGbPEaIGVy45 +cSBcKIgqLgs+rbuujiAPJvkhbkiAcuEdX6FnrLqGB+ZEBOKPKxJaUd5oYAVp+h7wTL2 mBgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GQs+FJwVsA823rjqyLGRcinzYCeaIEqNRS4nUJ1K5mQ=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=R2r9ErttE1nmLRan+4nAu7OQSCeMZbReW8sN2B6n78QBr/0t0i2gmqUnYeo2ivTlHq STgcphg68OHaOyAli24UoPHRAAjzgCeElsUO6lDYz48j4sc7GsoimET2agsQxhwGxT2M 43szhRYDG1T2LyGGwfCUbj/Yza055YuUTL3XqtF1jl5SmJ/ARPDcQRrN20HiTRTnh+lO osz4wUKDhayYXzaAhBUHS6AdjZvcfFw98HBunRwng3RF48bqGee/17tOOzUs+ADvsx2n qTtmIx5+ux67nXU14CZRCbm/2wVxc/YHEvjXjnT9EwN+dlzS2r02zQa+qj2+bY/OIhsZ BJOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nN6cuJjH; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40873-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40873-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k75-20020a62844e000000b006ddd1ea55bbsi1929822pfd.202.2024.01.26.16.03.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:03:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40873-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nN6cuJjH; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40873-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40873-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EDB24283384 for ; Fri, 26 Jan 2024 23:57:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 548C3605A7; Fri, 26 Jan 2024 23:56:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="nN6cuJjH" 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 618AE2557A; 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=QpkCwqmzS+zUdoJ1BjtUqifYQO+9wdIIT+CZcFb8NMXBhE2OldZ8+0kd202/GOeKsKGr4a/bmrcBaV/trSV7K4B4LcH9ubNY/oOqR5J5bxRebA+ULG/QXjVKl3v9296YWJP4sg7joRAs326ll6QwS2o2Oi9+/ij4iMAzuUENsMM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313358; c=relaxed/simple; bh=JdoaIgHtzRRSJ9Y6M9IcdrolW5MG1cM6H487IZFDdMg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CbVxq4RNmf6Jjer++IzlY/CEykM/o93RaLrwrf+mOaQBOKTE/jD+Ng2G2FocplixWmU4UIYuASPGEgmFz7x4DzjWw2USVUEleNOM/PDuso3BfuMFLp5o6Q9kiu2KcAXEQRMi/ljNZIHszBhLK1xNo9DJeaEwA5U0VmKycan5AUw= 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=nN6cuJjH; 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 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNnZbP027998; Fri, 26 Jan 2024 23:55:27 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=GQs+FJwVsA823rjqyLGR cinzYCeaIEqNRS4nUJ1K5mQ=; b=nN6cuJjHUxjIrloQjVh7Ipm2VfLMXv/5My1J c91boeGeg0PNzzRCsPkVv1MnZ4FFj4vR5E5Ef3rbtP0FI3TzNMMPcT+hfWu5X36m 26SuSVtUvm/2V/CxrzYEoi4XsapDpE/6k4N/AyChzgdwNo8vVPZMgrYkFwrhfPuf YYeL4wNfOLuj8RTA9sHyqM2bYsCw4vlve7EQtaWdOtbizbQ4/kI6JXk2LoVJURgD Vl7O86gffKATpclkhJSy+8LcsWBSFpQnvnBBsBgp0Zwk0yC5dilfZTBv19Cgl0EE 7XIlEHbVIRFUk0Asvf/el2OzuCQupu6Xc0sEBLG4Lmx6CxYzMA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvhxyrhya-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 40QNtPhh009489 (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:09 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 26/46] powerpc: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:05 -0800 Message-ID: <20240126235425.12233-27-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: linux-kernel@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: NllxamRcH2qFCdcEEfsv55660cYbKRqO X-Proofpoint-ORIG-GUID: NllxamRcH2qFCdcEEfsv55660cYbKRqO 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 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 clxscore=1015 mlxlogscore=769 priorityscore=1501 bulkscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199702365918209 X-GMAIL-MSGID: 1789199702365918209 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/powerpc/kernel/prom.c | 2 -- arch/powerpc/kernel/setup-common.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 5f6307ea3069..3cf8213b114c 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -621,7 +620,6 @@ static void __init early_reserve_mem_dt(void) early_init_fdt_reserve_self(); early_fdt_scan_reserved_mem(); - fdt_init_reserved_mem(); dt_root = of_get_flat_dt_root(); diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 9b142b9d5187..96bd4c964943 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -890,6 +891,8 @@ void __init setup_arch(char **cmdline_p) /* Unflatten the device-tree passed by prom_init or kexec */ unflatten_device_tree(); + fdt_init_reserved_mem(); + /* * Initialize cache line/block info from device-tree (on ppc64) or * just cputable (on ppc32). 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: 192890 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225079dyb; Fri, 26 Jan 2024 16:07:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQPqCPMgJ3cUq8DXJQGOWsu5uqy2I7weebInYA7z+lfndXikl7g/60FFcpaUF0aRFlkurc X-Received: by 2002:a9d:6756:0:b0:6e1:85e:8d01 with SMTP id w22-20020a9d6756000000b006e1085e8d01mr596246otm.59.1706314046153; Fri, 26 Jan 2024 16:07:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314046; cv=pass; d=google.com; s=arc-20160816; b=tZ3weBVuRklnU4gJwt5aNDboqEPlL0/g+XUpfKjpaDKFY+qjWDCWzX8ItgajF+cNrM R9Ul57an+F/OIPGs5ns6bxMhRtULu1UvPvalsE34FqLE/lBFC/ERQEwRKziUTbu8dzip s+xKb3WCV3AIN92r3Afn48R3MH8Bvqk6el80zkHzUG4i/njQwg4VNG9u6HjcvbKK0qmR NP3HrXmiHWBuPCas9B+huBNveIowIkZfiPboSuE0iIhP8cdj3JvrtSmo9JMxHNAcounz /EUCD5iDo+1saPjOKDf455d1W7Uv6/B87iwCKA+cImrQxG6h3opKq6AjFh+h7LFgTPIf QVVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WrXR8pIcGToq5+tEyXOqU2zww97hFs/foHrPQe8HFUk=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=Oq3PmFHJZTYaPfzqNxnBKY6xWY3ONzSvqjlMuXdy6AtpWcauE9MPlBpPWnKwf+DsfQ BT/y5c+PKFujwLUVo3/0QRZjaezkdfIQUQWKLEeie3PEmLuJIlWH3qtlW41DLuvQZHBR eNWlHYKcNpOfieoPSFqprXnxm212WK+QQ3JI9wsjMYeI0yyd80u05tyXJkZHLUPryxJ/ oko9GUNiR606Gx5OEVFOXLFjPL0oppV+IkimWz9VDusdoARjEJ60mIba3oI47+hyDNJk ODSOlNfmSZx3lm1eXiRlMazIivwscSiiejCCHZ4juJIaHgEgqQsdHLa3j0f5Sd0w8xBc APcg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AbBF+W0p; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l21-20020a656815000000b005cda184c288si1840704pgt.212.2024.01.26.16.07.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=AbBF+W0p; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40890-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9FCDB28D9DC for ; Sat, 27 Jan 2024 00:04:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A9AC6A00B; Fri, 26 Jan 2024 23:56:13 +0000 (UTC) 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 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199957067705065 X-GMAIL-MSGID: 1789199957067705065 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:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192884 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp223838dyb; Fri, 26 Jan 2024 16:05:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFhesYb6chebyDsAyMmSJuULYJ3/II/n7tbQOse0DEux4euxgA94FzuV6z6b82kzhJ17rfy X-Received: by 2002:adf:e98e:0:b0:337:c39a:1fb5 with SMTP id h14-20020adfe98e000000b00337c39a1fb5mr291419wrm.23.1706313904814; Fri, 26 Jan 2024 16:05:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313904; cv=pass; d=google.com; s=arc-20160816; b=rQV1oBL6pSeKujGgECRmUncy3iCK6wRZXSbbhOCSRlp7rG0lRs+AUy/9+6KYq5P+hR yXN+8joObWilRkPnkxYF9I8yVjv26HIE/4wJ1w9//bKgfMLO/luVvymdzPi/luFXM4aq /0yWgGVgCixGFq+I8tCIUkJZ6A81kAlBtnAFk3IdOZNfFea9vzs7YcDQUeuv22LjHBAZ q4+L1i+d8M7ZTxFeKNNKTn4ocWC76quGGoU2vvgu5MPAkYjFWRrz9uyoFg8a/U8a4tQQ Rz0nkQlchlSG0xQW/I7YRh9oQKIIJosh6bgDZl0wSdXRGJGMYUxyuPrfDiG1Gda36lCn O2kQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eShHXpDCJ4BD5txejNCWe8HZLN5QHa+jpumCWHtQOjg=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=LPM3JzwlejBfU1BuxUUEw1v9l3Ph1Qmml4Xl/raNf7u4GNhd+m75a4dcAyt73i5o1B jEW1KHB95h3Eh54dkBUkqPgP4qjPXnP+IDf6+uPFTY2I8UQUhrIeyWFjKZ5v6CQ+MCRd mCdAIBQo0ebIHFFHvNDisgWuVbQL6eSOSJJy2hsB6zSkobUh1Ee+SJslPeTO9+ulClqw vy9pnQPjFkU0Vjht8aSmwin8qMk4iUTsKYQb0bBgNGiZuCTke1XsusySHO6+XJiyMOpV /zPZ5yhnKt7btmgr+SGIdWv/dMRsPdb42nsA1NCPmypYvll6ag2VKHgM0eHXHdVknLka Xo+Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dtx+kKzF; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40892-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40892-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i15-20020a170906250f00b00a318ad9a8e5si1066436ejb.746.2024.01.26.16.05.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:05:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40892-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=dtx+kKzF; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40892-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40892-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6BDE21F21B6C for ; Sat, 27 Jan 2024 00:05:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B64A66A035; Fri, 26 Jan 2024 23:56:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="dtx+kKzF" 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 C79906087E; 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=h+CLc7zFP50qCnYnjCKJFG39NLB5Z0Dn5crIE416XQQtlR+pJVAPWhiJsqQCJBiSuOY/TW9LFxcyreUdxUSh5zGXZ+bNIC4zq1jMkOVeer/s/0ZDs3VimbZvyxrDjE67M7BQiVkoMy4xl/mkycPkv3iNzBsn55pagQgDW42BFpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313366; c=relaxed/simple; bh=cRfEBFsdnBK2iADLYrmymzMIGjloxIXjg8ZzIDcctLM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Z5suOSFWwTM18CV0E26Gv2iRAZsv31uX6ZSCrEjumKXiaRmbIlm/q5ou7uUNXflt9PiSLAPtDvwQOTRvyQz7nj4hcmZNubFzpPIVUmkj95WspSEkfzbUH3+684Yy7T8fcuWpMNj8P9DFqY5/SpWP3uLiwhkWWdIv6l7HMWuwfSE= 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=dtx+kKzF; 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 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 40QNtSgI004148; 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=eShHXpDCJ4BD5txejNCW e8HZLN5QHa+jpumCWHtQOjg=; b=dtx+kKzFFiOgXb9S5cPzxhv1vZWWC8GApfaa ErnXCETEtdz2dhS1u9bpUTudvYHLBsmfNno8Vl1SG+Y2JPb5p2iMw7030KliCRta ihTizeueyDnMINo+aM+5aVNSeP0GfbFfzSJcbGOcmp0wa1TICPRIwGGFZqrwyhHM X1TSHLvLB/lAVnjmJTExOKxfltiXIcUBNJDfnG5q5Wv2ZaPoZN/C1GcHU6Ty02kX iOapJ+uitg9LCJllXlP5iUX3VvOhd3xNX6+AEQ460yI/fHalFBiRv2nR9hfMqv9h 9VilgrtAcsd6EjdzvW24CMvxJGEc3IFqEVcjA+b7KfwnZkKNEw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjbg8g0p-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 NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtRAi009502 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:27 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 28/46] um: resrved_mem: Move fdt_init_reserved_mem() below unflatten_device_tree() Date: Fri, 26 Jan 2024 15:54:07 -0800 Message-ID: <20240126235425.12233-29-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: linux-kernel@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: JdUDySUL0Sb0attbw7OLSmGrM1dNMKEH X-Proofpoint-ORIG-GUID: JdUDySUL0Sb0attbw7OLSmGrM1dNMKEH 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=764 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199808965867408 X-GMAIL-MSGID: 1789199808965867408 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/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 3ecee151a083..ad6003412319 100644 --- a/arch/um/kernel/dtb.c +++ b/arch/um/kernel/dtb.c @@ -27,8 +27,8 @@ void uml_dtb_init(void) } early_fdt_scan_reserved_mem(); - fdt_init_reserved_mem(); unflatten_device_tree(); + fdt_init_reserved_mem(); } static int __init uml_dtb_setup(char *line, int *add) 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: 192900 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225473dyb; Fri, 26 Jan 2024 16:08:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFPl2G/VWOxMvQSKdEuvt+jPQVAHIS/ieBwtJnLis4hOA4cLjNrT7GHJhYXoWNY2ZCz89hP X-Received: by 2002:a05:620a:10b0:b0:783:69fe:dbdf with SMTP id h16-20020a05620a10b000b0078369fedbdfmr603221qkk.122.1706314096878; Fri, 26 Jan 2024 16:08:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314096; cv=pass; d=google.com; s=arc-20160816; b=q87pqh2fFGwEBtG9uxVtuJIYFdaJ4WmYLEtyYy1VIEHXzR9AoAelJ3TJ2Ge+h+xS7u rUYx6tH5E4qBdDjrYzJFBvBnwH1GHw/1qMHKa/ihroFaPExvm7kZjZzzPItIbu4Neo8A H+OFRItXoVN8XGFepm+dfg2UWl35SbDBd5K/i63S4J2ma30BwlUS/kDzMJY3vkbumYd9 y6XjygblYtNRnSx3TZdIaNEZR+7OsHGqajlbEvUtoDTnVk+Odche5JL0LKI1y0DXPZIo Ux8XCUOAeusZHrbuKx+wd0oVeYTWc/QBuDKK8eLdyz5YLjeRQsBAn5E6VWeP7dFxElZ/ pOBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Jx5Ie+iX+zXFm/ozaDr+RC/Fds5b7kbGceiUXNurK/w=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=oG2fK61M7vZ2UwZ7vHIVBC69P1yyNm3r3KKhRDzzTfnO148C7+/UXPOC3AYbzOPMMl FbmAD6MSrYX9gNvE1bnCBVCpNtKajIMRN0E6jtbWzTVEIQgMrO8NfE0PMUNVo/bu7SSX 5Uu3fZL1g2/VRR7a3MO93X9mV0H9XswbOMCJ3ROKC1L7WqPC8vjGXGlYhNilgpNdiYlZ gMy1V86XE1eVNBpA8HDVsVQoRy1NLOq2DWs4IoqH4PHWQZDLc5iF/P8A6b1btwmOiMJ/ nAqcYJS0wHWmBqy+kPkGCwMNO5LrE+dx2ZPEzrnqZF8zvjzfRPr85FWfd59aFAUrrNKx XZTw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EU3S0Dqq; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40895-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40895-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id pj29-20020a05620a1d9d00b00783b3c9be0fsi2269229qkn.481.2024.01.26.16.08.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:08:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40895-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=EU3S0Dqq; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40895-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40895-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A335E1C23FB5 for ; Sat, 27 Jan 2024 00:05:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 226BC6A335; Fri, 26 Jan 2024 23:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="EU3S0Dqq" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200010691060195 X-GMAIL-MSGID: 1789200010691060195 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:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192904 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225601dyb; Fri, 26 Jan 2024 16:08:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IEi97StPSdpvwaviHQEq8bpY1TUB+QTpotmFmaRU/5+klGa3nP7OSD/ov9ceK6JyUWaDyVX X-Received: by 2002:adf:f048:0:b0:337:5588:79f9 with SMTP id t8-20020adff048000000b00337558879f9mr228221wro.66.1706314120341; Fri, 26 Jan 2024 16:08:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314120; cv=pass; d=google.com; s=arc-20160816; b=oQ1vIw1AODAlfB3TisRAKgsh8uIs4/BbaUu1NawbXs595jERz7jPO0GB2fsyAbRarn o1WPYfzbBE8d69VOjGR7qS3RApOqgQ4mmmr0Ze5rALLiA8BJQ6ij5HWlrwyweQdQvO0+ g4dsTIdXRcYfGkkycqNvZqOsDyj+4aHuqNJgCYpkrIl1iA9nUdwbDyjWCirt/XDCvKYj A3oI4k49O9JaE9m4HHpPEuA12sK+hEuCxGHhuYVMBL2crZnDGENQtsXHIQVEbGiH8zlz unfc0jYZpXss/15C8csPETfDrolRPZsOOnjYeX87IhVkQf+Zh+2ZIMXnzFTTLU/K2CX4 MvhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SJ2uVxsVzF+RZp0UyxD5o7P5HuGaB56FNfvEAgO0PZI=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=A9zZVL63mXScIxNQc5pRADx8Znqr2EDfzgKJvpbsWi1WmHjKA8CN8UnmokMvNIwFCm kbj9V4kGv2VTus9MdUxqPUyjr3zqdKtvXmaY1RHaSztQjOkwdXGK1a0SDI2n/LMafxRV e/HQyS9HXaMmqqiYgLeEnV4QdXPWztJB6Q4a8MP0WnSa02FzG15pLlGSrn4kCiH9ToSr bksg7OPXl768Xqqm/lYZSKFI0eWDIbWWfovC86rMBIOZ1htXibKP6/iiTbTRtQ0PkC7E 64E1C830iQJsFKR2p7v1mfMnchtlRq7qUWmo8R9a/YLc9NpzmA5s3jWxYWmxSOstPB+z bmRQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oNDfq1XY; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40912-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40912-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s20-20020a170906285400b00a2aff41f3c7si1074784ejc.472.2024.01.26.16.08.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:08:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40912-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oNDfq1XY; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40912-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40912-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C5EFA1F2115F for ; Sat, 27 Jan 2024 00:08:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7813B7E785; Fri, 26 Jan 2024 23:56:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="oNDfq1XY" 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 79A6F6A01B; Fri, 26 Jan 2024 23:56:13 +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=1706313376; cv=none; b=KArjsh2ywKkUSvxlD9I4ZU+/JIXxQXe65RC/+4GyjFke0cWzoOp2mcht2g6jzV1Kw2jKuCBhrW+80rbJGSSVD3qaj65FnCpjEIenHe/WA1s7/Lat/bzRaUdJgoOouPuu+/Sm0f5sxY3gHc7x2NuB3rVqtOa/ahkE1eXe8nRj2EI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313376; c=relaxed/simple; bh=P1AkFxQdbHcnFpiYveH/lqCbOhuQDolNZukNjttahTM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=py3KojrCoDhWpCK3T+VqTKt88AJJ5znVZDd1hZYm5qDFUsSY1tPMbzrN+XYeVKiT0WcXIPsnp65lIDxqkdhC8J5WzfOSjGoiyH/AYZmGd8OYeJ4OfiKLBl1hmhRmF8pOjAOEsFYcBQDtdNErZM2sTziluaMnkoCrjbMjmgfr0tY= 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=oNDfq1XY; 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 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 40QNBGT1012061; 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=SJ2uVxsVzF+RZp0UyxD5 o7P5HuGaB56FNfvEAgO0PZI=; b=oNDfq1XYRkEu/t8bLl0QBHNmiWLwXtCFkH4z R1oEi3uV6zK9BDHhkLAPWuraRI4ztGytg2l7J0ttyGGDXnSLxwXp5B8zuPDfjkOT IwzcoFSMoqDz6AnUomoYTR7HO86jqFrqRvaoyi1yEXyDnwQaEVS/M/0/gN3xCmAD Zn68V5Hcxse4FZgRRRPME8WijeXz39V19ejoqTtyImHFdbwpW5ziRy5T88D/MKeU C5+xRiwYZ2vhJYzj8/l3tvCBDjkSnzXrPLJzLi6IwMfqi+ESa3Q2lJqZY9KcqW9n YnZU/l8XiSXe23OAYljeb0fo0GvkkG15U8f0Qd6r+DT9SfpghQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvjbg8g0s-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 NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtTDZ010350 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:29 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:12 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 30/46] of: reserved_mem: Add code to use unflattened DT for reserved_mem nodes Date: Fri, 26 Jan 2024 15:54:09 -0800 Message-ID: <20240126235425.12233-31-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: linux-kernel@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: oCU4TW6ixTZQc4WOuFDNAARpo2_btXl0 X-Proofpoint-ORIG-GUID: oCU4TW6ixTZQc4WOuFDNAARpo2_btXl0 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=752 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200034983774665 X-GMAIL-MSGID: 1789200034983774665 The unflattened devicetree APIs are available to be used not long after the processing is done for the reserved memory regions on some architectures, and is available even before that on other architectures. Therefore, use the unflattened devicetree APIs to process and store information for the reserved memory regions. Using the unflattened devicetree APIs is more efficient than using the flattened devicetree APIs. Signed-off-by: Oreoluwa Babatunde --- drivers/of/fdt.c | 49 ---------------------- drivers/of/of_private.h | 4 +- drivers/of/of_reserved_mem.c | 74 ++++++++++++++++++++++++++------- include/linux/of_fdt.h | 1 - include/linux/of_reserved_mem.h | 2 +- kernel/dma/coherent.c | 4 +- kernel/dma/contiguous.c | 8 ++-- kernel/dma/swiotlb.c | 10 ++--- 8 files changed, 72 insertions(+), 80 deletions(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index ebd2fa9e0114..2bc01ffdabfe 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -558,55 +558,6 @@ static int __init __reserved_mem_check_root(unsigned long node) return 0; } -/* - * 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. */ diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index c338e1c019c7..f7da22108e7a 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -177,7 +177,7 @@ static inline struct device_node *__of_get_dma_parent(const struct device_node * #endif void update_reserved_mem_max_cnt(int max_count); -void fdt_reserved_mem_save_node(unsigned long node, const char *uname, - phys_addr_t base, phys_addr_t size); +void fdt_reserved_mem_save_node(struct device_node *node, const char *uname, + phys_addr_t base, phys_addr_t size); #endif /* _LINUX_OF_PRIVATE_H */ diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 419b062cb41f..645b02e27492 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -96,11 +96,58 @@ static int alloc_reserved_mem_array(void) return -1; } +/* + * Save the reserved_mem reg nodes in the reserved_mem array + */ +static void __init dt_scan_reserved_mem_reg_nodes(void) +{ + int t_len = (dt_root_addr_cells + dt_root_size_cells) * sizeof(__be32); + struct device_node *node, *child; + phys_addr_t base, size; + const __be32 *prop; + int len; + + node = of_find_node_by_path("/reserved-memory"); + if (node < 0) { + pr_err("Reserved memory: Did not find reserved-memory node\n"); + return; + } + + for_each_child_of_node(node, child) { + const char *uname; + struct reserved_mem *rmem; + + if (!of_device_is_available(child)) + continue; + + prop = of_get_property(child, "reg", &len); + if (!prop) { + rmem = of_reserved_mem_lookup(child); + if (rmem) + rmem->dev_node = child; + continue; + } + + uname = of_node_full_name(child); + 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_reserved_mem_save_node() - save fdt node for second pass initialization */ -void __init fdt_reserved_mem_save_node(unsigned long node, const char *uname, - phys_addr_t base, phys_addr_t size) +void __init fdt_reserved_mem_save_node(struct device_node *node, const char *uname, + phys_addr_t base, phys_addr_t size) { struct reserved_mem *rmem = &reserved_mem[reserved_mem_count]; @@ -109,7 +156,7 @@ void __init fdt_reserved_mem_save_node(unsigned long node, const char *uname, return; } - rmem->fdt_node = node; + rmem->dev_node = node; rmem->name = uname; rmem->base = base; rmem->size = size; @@ -252,7 +299,7 @@ int __init __reserved_mem_alloc_size(unsigned long node, const char *uname) uname, (unsigned long)(size / SZ_1M)); return -ENOMEM; } - fdt_reserved_mem_save_node(node, uname, base, size); + fdt_reserved_mem_save_node(NULL, uname, base, size); return 0; } @@ -272,7 +319,7 @@ static int __init __reserved_mem_init_node(struct reserved_mem *rmem) reservedmem_of_init_fn initfn = i->data; const char *compat = i->compatible; - if (!of_flat_dt_is_compatible(rmem->fdt_node, compat)) + if (!of_device_is_compatible(rmem->dev_node, compat)) continue; ret = initfn(rmem); @@ -305,11 +352,6 @@ static int __init __rmem_cmp(const void *a, const void *b) if (ra->size > rb->size) return 1; - if (ra->fdt_node < rb->fdt_node) - return -1; - if (ra->fdt_node > rb->fdt_node) - return 1; - return 0; } @@ -351,23 +393,23 @@ void __init fdt_init_reserved_mem(void) if (ret) pr_err("Failed to allocate memory for reserved_mem array with err: %d", ret); - fdt_scan_reserved_mem_reg_nodes(); + 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]; - unsigned long node = rmem->fdt_node; + struct device_node *node = rmem->dev_node; int len; const __be32 *prop; int err = 0; bool nomap; - nomap = of_get_flat_dt_prop(node, "no-map", NULL) != NULL; - prop = of_get_flat_dt_prop(node, "phandle", &len); + nomap = of_get_property(node, "no-map", NULL) != NULL; + prop = of_get_property(node, "phandle", &len); if (!prop) - prop = of_get_flat_dt_prop(node, "linux,phandle", &len); + prop = of_get_property(node, "linux,phandle", &len); if (prop) rmem->phandle = of_read_number(prop, len/4); @@ -383,7 +425,7 @@ void __init fdt_init_reserved_mem(void) } else { phys_addr_t end = rmem->base + rmem->size - 1; bool reusable = - (of_get_flat_dt_prop(node, "reusable", NULL)) != NULL; + (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), diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h index 9b85bbc5d9f5..fb7b437141bd 100644 --- a/include/linux/of_fdt.h +++ b/include/linux/of_fdt.h @@ -73,7 +73,6 @@ 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 2a3178920bae..e92babd669c2 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h @@ -10,7 +10,7 @@ struct reserved_mem_ops; struct reserved_mem { const char *name; - unsigned long fdt_node; + struct device_node *dev_node; unsigned long phandle; const struct reserved_mem_ops *ops; phys_addr_t base; diff --git a/kernel/dma/coherent.c b/kernel/dma/coherent.c index ff5683a57f77..5ab26fe11c29 100644 --- a/kernel/dma/coherent.c +++ b/kernel/dma/coherent.c @@ -362,9 +362,9 @@ static const struct reserved_mem_ops rmem_dma_ops = { static int __init rmem_dma_setup(struct reserved_mem *rmem) { - unsigned long node = rmem->fdt_node; + struct device_node *node = rmem->dev_node; - if (of_get_flat_dt_prop(node, "reusable", NULL)) + if (of_get_property(node, "reusable", NULL)) return -EINVAL; #ifdef CONFIG_ARM diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c index f005c66f378c..b54cf128a9d9 100644 --- a/kernel/dma/contiguous.c +++ b/kernel/dma/contiguous.c @@ -462,8 +462,8 @@ static const struct reserved_mem_ops rmem_cma_ops = { static int __init rmem_cma_setup(struct reserved_mem *rmem) { - unsigned long node = rmem->fdt_node; - bool default_cma = of_get_flat_dt_prop(node, "linux,cma-default", NULL); + struct device_node *node = rmem->dev_node; + bool default_cma = of_get_property(node, "linux,cma-default", NULL); struct cma *cma; int err; @@ -473,8 +473,8 @@ static int __init rmem_cma_setup(struct reserved_mem *rmem) return -EBUSY; } - if (!of_get_flat_dt_prop(node, "reusable", NULL) || - of_get_flat_dt_prop(node, "no-map", NULL)) + if (!of_get_property(node, "reusable", NULL) || + of_get_property(node, "no-map", NULL)) return -EINVAL; if (!IS_ALIGNED(rmem->base | rmem->size, CMA_MIN_ALIGNMENT_BYTES)) { diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index b079a9a8e087..ea1f734c8c35 100644 --- a/kernel/dma/swiotlb.c +++ b/kernel/dma/swiotlb.c @@ -1732,12 +1732,12 @@ static const struct reserved_mem_ops rmem_swiotlb_ops = { static int __init rmem_swiotlb_setup(struct reserved_mem *rmem) { - unsigned long node = rmem->fdt_node; + struct device_node *node = rmem->dev_node; - if (of_get_flat_dt_prop(node, "reusable", NULL) || - of_get_flat_dt_prop(node, "linux,cma-default", NULL) || - of_get_flat_dt_prop(node, "linux,dma-default", NULL) || - of_get_flat_dt_prop(node, "no-map", NULL)) + if (of_get_property(node, "reusable", NULL) || + of_get_property(node, "linux,cma-default", NULL) || + of_get_property(node, "linux,dma-default", NULL) || + of_get_property(node, "no-map", NULL)) return -EINVAL; rmem->ops = &rmem_swiotlb_ops; From patchwork Fri Jan 26 23:54:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192888 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp224359dyb; Fri, 26 Jan 2024 16:05:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEaM55iwuhNuBmyc5wp7JhS8CyY0n+lS6g7J/FAjTCrtZ5uGBDjT9Yk+Ku5mMlHCVcgU9b X-Received: by 2002:aa7:d993:0:b0:559:6574:8c80 with SMTP id u19-20020aa7d993000000b0055965748c80mr303942eds.14.1706313957796; Fri, 26 Jan 2024 16:05:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706313957; cv=pass; d=google.com; s=arc-20160816; b=ErxY4D3Htnc8Od5xbkoFeLp63eszJphyF7kch+LUzQLZsCvTJKtcfs25VkSCg9EY00 cNFbXIVT4E//7cbv2KoK7Xa1KQdlVC4wndbIHyPHoutUsbYU0XKE3QqwoK9CgZV1cMNn BIqt5Rb4o+7FIFkwKmMZXvFfMoSF2S5vv1JkRzMLNu3hwpkrq4HMtmQ/PanK8P1KIAC6 DkwychlWJeOZAVYxf4kNt+AQGU2gqX91MQUPWQXkscF2hjKeXfYoMGG3zgQkw65dpjUG 2DrdWsVIVxeJlxvBGGQwizGlJuZVfl23VWXUZb6/z+r989zunH7IXXqvbbdDLkbpVAKQ Mvcw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rEH2huP6AGk9XFpyAelikvp4R8pHCMfGjVuoQPZZseo=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=NgX4yCZMXvMBJTek5wwR2w4RIV8J4ID3H8MhsDEV+DTEHdZwgTl62KvD70EJKaYDIw RMjRNT/nqhIceqALLfQwUIK22+5BRQKzb1aM7zTOm+yKWeSyquHTdDduacsiSwKbHwuh 8DZ/N9GvfEL4Ce5vmnxjnEcOM5VaBGDut0JoVGvxh3NpXGnM8EfN7jdzeIrUzL6j93Yf sZgpQ2kHiaftJezYMGu4Do9UH8ps951xcyuxFeZBsDcp5d/dQUIA+EowxkNioDI6PMoi 66UayvTj2zzEmrqwtkyTgGbWVfXYK/oP7oTo5lc6KzhnCQLgi8UsB3N6DWJWMI3nsDdH ho6w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="YDh/4SGd"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40898-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40898-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ba11-20020a0564021acb00b0055a62d4707esi1065302edb.624.2024.01.26.16.05.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:05:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40898-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="YDh/4SGd"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40898-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40898-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4027E1F2214B for ; Sat, 27 Jan 2024 00:05:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0654D66B40; Fri, 26 Jan 2024 23:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="YDh/4SGd" 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 001CC60BB4; 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=Kxy17T7ZG1HQ+fA/04yWuhZhpm0crDjzH2emt/bLFap1H+Ld7jiH7S54yxj/sJ4O5tJkhAcVgMvMkqcoBq1vH6wuVYuzxC+zwAu/ksTUQeetASE4Nd+WyPQlErEvZc5kpXWFGv2IAhQlSRIOyM5LEkwA/56Q6ATald5Me8KVa8I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313367; c=relaxed/simple; bh=AudqulAQ60IfEtaODp3Zx8VOJIFET5JKLr5kS7oiVrw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uCsiCwO9rMhrOB2axpNDSDmBgfBPFeYLggBVovwmAeigXBBp5HowBcLLkmC5y1915z3tzt7ZNEQmajIyfFYtcvUyzWzU2wSdfjZo2pYmO+ZzUWxtWmHsUCPZuyg6Q3neXZ5+q/lIHoa8fjhvbc5zjwfCvxJ6uLfij/sFFN5rt5M= 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=YDh/4SGd; 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 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 40QNrM4F027772; 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=rEH2huP6AGk9XFpyAeli kvp4R8pHCMfGjVuoQPZZseo=; b=YDh/4SGdUAyiP7uLcqDFOTc8Wc+f2gHwJpQi Vetg124F5hTd8MmzhbfZmnLPaqPpurVg1Nz2c0SAzadwsgUu+oPD3+3Enzbtstrx zjOmzbqHRV/Tct3yinXT5JGfBS7ZnzX6uYQ6y4ikkydS8AmESFT4zREYR/+/26FM 9bnx0feU6k4ewYRaYNZnLYqUv/gaxcKizVpC4VgWt+mmk+Tla/tf14ACEd3kycXC oSYjxwnHxsO1CCRywoG+l4AT2CIXLIjVcr7TDNQwTE7dcKQxVAnfrYQc4nRfiOEx Diff5us3UpXIP9H9XLMy5CKr+Nbiq6lcmHZC7zTbvz7lLRAOfQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvmmmg7we-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 40QNtSKh010339 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 26 Jan 2024 23:55:29 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 31/46] of: reserved_mem: Rename fdt_* functions to refelct use of unflattened devicetree APIs Date: Fri, 26 Jan 2024 15:54:10 -0800 Message-ID: <20240126235425.12233-32-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: linux-kernel@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: Hr4TeDNRkurySOwvrP4x31WI9EEga49r X-Proofpoint-ORIG-GUID: Hr4TeDNRkurySOwvrP4x31WI9EEga49r 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=659 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199864186706126 X-GMAIL-MSGID: 1789199864186706126 Rename the relevant fdt_* functions to a new scheme dt_* to reflect the use of the unflattened devicetree APIs to process the reserved memory regions. Signed-off-by: Oreoluwa Babatunde --- drivers/of/of_private.h | 4 +-- drivers/of/of_reserved_mem.c | 64 ++++++++++++++++++++++++++++++--- include/linux/of_reserved_mem.h | 3 ++ 3 files changed, 64 insertions(+), 7 deletions(-) diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index f7da22108e7a..1092615faa90 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -177,7 +177,7 @@ static inline struct device_node *__of_get_dma_parent(const struct device_node * #endif void update_reserved_mem_max_cnt(int max_count); -void fdt_reserved_mem_save_node(struct device_node *node, const char *uname, - phys_addr_t base, phys_addr_t size); +void dt_reserved_mem_save_node(struct device_node *node, const char *uname, + phys_addr_t base, phys_addr_t size); #endif /* _LINUX_OF_PRIVATE_H */ diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c index 645b02e27492..3650efab0afd 100644 --- a/drivers/of/of_reserved_mem.c +++ b/drivers/of/of_reserved_mem.c @@ -139,15 +139,15 @@ static void __init dt_scan_reserved_mem_reg_nodes(void) size = dt_mem_next_cell(dt_root_size_cells, &prop); if (size) - fdt_reserved_mem_save_node(child, uname, base, size); + dt_reserved_mem_save_node(child, uname, base, size); } } /* - * fdt_reserved_mem_save_node() - save fdt node for second pass initialization + * dt_reserved_mem_save_node() - save dt node for second pass initialization */ -void __init fdt_reserved_mem_save_node(struct device_node *node, const char *uname, - phys_addr_t base, phys_addr_t size) +void __init dt_reserved_mem_save_node(struct device_node *node, const char *uname, + phys_addr_t base, phys_addr_t size) { struct reserved_mem *rmem = &reserved_mem[reserved_mem_count]; @@ -299,7 +299,7 @@ int __init __reserved_mem_alloc_size(unsigned long node, const char *uname) uname, (unsigned long)(size / SZ_1M)); return -ENOMEM; } - fdt_reserved_mem_save_node(NULL, uname, base, size); + dt_reserved_mem_save_node(NULL, uname, base, size); return 0; } @@ -436,6 +436,60 @@ void __init fdt_init_reserved_mem(void) } } +/** + * dt_init_reserved_mem() - allocate and init all saved reserved memory regions + */ +void __init dt_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"); + } + } +} + static inline struct reserved_mem *__find_rmem(struct device_node *node) { unsigned int i; diff --git a/include/linux/of_reserved_mem.h b/include/linux/of_reserved_mem.h index e92babd669c2..b1f71a4894aa 100644 --- a/include/linux/of_reserved_mem.h +++ b/include/linux/of_reserved_mem.h @@ -32,6 +32,7 @@ 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 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); @@ -47,6 +48,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 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, 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: 192909 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp226886dyb; Fri, 26 Jan 2024 16:11:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IE+ZLlqxQPIbzhE91Hl4P2fR0AG4jqBU2+ax31xst1Iu1+u13tf8fioi5RdNGUyoImoeRUl X-Received: by 2002:a17:902:6b08:b0:1d7:7d1a:76a9 with SMTP id o8-20020a1709026b0800b001d77d1a76a9mr612514plk.77.1706314301157; Fri, 26 Jan 2024 16:11:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314301; cv=pass; d=google.com; s=arc-20160816; b=zQWL11rKHHrxI7KU4mStlxWY1iw/euR8l5VXmiqbLAOusdFx8tvp1tIghlf9jgcv2D joClpRPq1FC47CMqAZRtk5vrAd7u74HjY39DNb+KscUJYHyZ3E+4vrrrCUe0UqJq+NOY Xp5+w8Tz6mzV9ITXu2we+RmP0CAjbjMBF9Akt7RGcrlWRo72T/JPp6e5zJuQW92bkJst dI9ivXc6Cta/m0JISQrggeXfzxaPrPOGvaSyPBvfF4TsJwVAdnO8eRtVpPue65Um1D4J VvXdzJ4nDMHEJQo1QqlBX/Kcbz/+etC9MnVKJV2j9V6gXbhxqC+AvT5L4gy8g4vgExR0 wgGA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wEjJ1brwR7C5+1GYNX57qA6pmsMvaJpTSkLhKyrgky8=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=Gp4x3XTzDasfulvMPAjGL349j4yOyonk3jE+b1OabGn7Uihr+O8GV5AIVLC7VOITey pS3+FVrSiDd78mPv9UY/7UKhpt4qfv7SCL56YLYyUETEkoXJpOwdUnbBZcW8if+iLW5q yJnjnVEHZn7YSyO1AVLrhYsyX+SygIaF/Ru9c7/56NT7XjjWrsTMJsUSiDLqQ0FEVMpn jvA3pm2hKcwInbSa3oWoS/o1JXPq81+9YcX7SWp/xxVEiRqlHasREA3LyUC7RmlFh42W Fln0UqYqkIT7y097zNmMBISOJCQwDjGxcWGKXc+4omuSzxoAQypWcgBdszaDxFA1JsHV AF3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BWL89ILW; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40913-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40913-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id w68-20020a636247000000b005cdf9c8000asi1882573pgb.147.2024.01.26.16.11.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:11:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40913-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=BWL89ILW; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40913-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40913-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 64D7D289342 for ; Sat, 27 Jan 2024 00:08:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E47087E573; Fri, 26 Jan 2024 23:56:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="BWL89ILW" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200224537343933 X-GMAIL-MSGID: 1789200224537343933 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:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp226140dyb; Fri, 26 Jan 2024 16:09:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSDyIBuO3i8aisg+KaDu0CNzkc74aBdPAhnPNHmOTQq7wYbTzyZDPnUIHmIefpOVJSkOUa X-Received: by 2002:a05:6214:1d2e:b0:686:1e2:747d with SMTP id f14-20020a0562141d2e00b0068601e2747dmr1200104qvd.38.1706314198574; Fri, 26 Jan 2024 16:09:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314198; cv=pass; d=google.com; s=arc-20160816; b=NRxk1dApvSOMqROCNYVg+97yLudplgWGfUn5rN3rrcxQl7T3WdA+5ANxAVbjcAfxwR 4CAH2HmQVC0KbybTGOfZO1Qj+XVpkrNkDsAHzvyOKNeUKDSp7efut8MXi60GcLChgv2+ V2097yW61ijk17d2KrFhVtBIatlUAck0xm922I7OIZr2EQdr7++YM02Asl+DVaiFvoiU NzBkjS7nZoEIRb/E3qXdakDTM8Kf9mu0e7WRWTq5LpCp/qOYyQiGodkqxId0C6kT3B5F MEeD9Pf9nk8xd81gEm3SQCjOVBLWwyZwIccvfsjaM6kDENtkBNXZ/KhoPcsSlMvPeAim 4FrA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GirL3tL1+YPcD4kN5dchJ3YNHYEfvxB+UdK4fnkC2RM=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=mk4rByPss2jv6XL2g+jAWijaxgrg7k4AfBvomZ0nT6ata9l22fbQr/O/GvZin2YiIr JNFxRokKlIP8kPjZkwDjIi2Y5Z3iOAhQ/IOKvZQz2PzR/1L5wV8UxCJ+kn+qzZYFOaG9 PS0zGvI9bxhAWbf650UolJ1spy+m30+7cltWKFQv0OrOY5GzfI9yo2Z4NhaQ2eWX661k 6m9dnXgCe4OxEVkIMpaitjsdOAYaswgALYmZqwE06OKNd52AnoDjJ87adl7xpQ2zwtby RK07XcRKktBoYQ1xfB0kyE13LjWUn2y4koaHG6zhvpHWvcBO3p86eFOXzg76LFIivKSU 5OQA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fBmBlODu; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40916-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40916-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id gh3-20020a05621429c300b006817ece8f92si2456341qvb.431.2024.01.26.16.09.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:09:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40916-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fBmBlODu; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40916-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40916-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1F3521C2823F for ; Sat, 27 Jan 2024 00:09:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94E0582D9A; Fri, 26 Jan 2024 23:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="fBmBlODu" 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 6A5897CF36; 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=q6HBmXQjzFExxxsPDO7GqmrDbOlcugtYYVukLoateYxTDXviIq7XldUthkP8/I0vBQG3LaZOQXiWUT+bv6Mwhp+glrXD8vHc3j4BEmnbej//STQq/PHoaO3nxFdplK2+UbekZ2XkmUnSVgSMHtYF4nBjDLIJbCRXTG6qYJMBLfE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313381; c=relaxed/simple; bh=a4hgZ8PZcEHnRuXP4o+5oJ/zIrbeqnFxkc796YNaEhE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=D+vR0jIauSyvRtt/G0AYMolrZ8MNx6Cjc60g6onVGQqN8MEFAZdbm5IwfvMuDMH3BuKeQySNEZ6HykS88bs/A1uRRX1nmPoEbrFaEZt+qYGMG4wnLzfcgdT4M9oo5zN8P16yuAVCqd4r/YSFZfsCo6QpX90XBl7J5TsfcnmZUJg= 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=fBmBlODu; 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 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNtWTk027912; 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=GirL3tL1+YPcD4kN5dch J3YNHYEfvxB+UdK4fnkC2RM=; b=fBmBlODuNh5nyIgSpzDPrG5h8JuKKM9Leiqx 4FPIAUBUZxuOXwbuI6eDolLUyYTrT3fV+YwWDeyh39tD0QjO3l5pXcwfG9bWhQAH U/UjHoXbxIv9RbZge/LoJqxtEIBf0EE2CmuzW0QrcGj3UoIVbdTtC3wCvgP2lZPl lZNRDNfsFvzQeoRxiiIr+aDxa2Xs4tySymO1fxaduVLfc4aQKJlgPYoozV56BDXg r8K+hw11tDJYTN9TVuK+bqEzyt9AX8l4X84pHI6Tx/qIpY7AhpW/6/BIS9PDOq85 rVreYWIY4LwiflKoW+akMQ3av5SiHJPI2eE6PoLKbXsEcW3T/w== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvgp2grug-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 40QNtUwg018645 (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:13 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 33/46] ARM: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:12 -0800 Message-ID: <20240126235425.12233-34-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: linux-kernel@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: -JAgtChohlf1vYytIHlPiK1CHnocD_lU X-Proofpoint-ORIG-GUID: -JAgtChohlf1vYytIHlPiK1CHnocD_lU 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 mlxscore=0 malwarescore=0 mlxlogscore=566 phishscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200117286168081 X-GMAIL-MSGID: 1789200117286168081 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/arm/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 36fa18e80ab3..04d3a3693a02 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -1173,7 +1173,7 @@ void __init setup_arch(char **cmdline_p) unflatten_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); arm_dt_init_cpu_maps(); psci_dt_init(); From patchwork Fri Jan 26 23:54:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192907 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp226032dyb; Fri, 26 Jan 2024 16:09:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IFksB9VVarIpkRgZx1nVN0GkJciTd4WM22wZWTFfyyozX9pi8DXcZwW/1+FGIqDtUcbWe3+ X-Received: by 2002:ad4:5f8e:0:b0:686:aa7d:e55 with SMTP id jp14-20020ad45f8e000000b00686aa7d0e55mr1053228qvb.26.1706314182753; Fri, 26 Jan 2024 16:09:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314182; cv=pass; d=google.com; s=arc-20160816; b=RjPdiueWnr8xDwSfmAFCR5VfRA9Nsga8u+J6EHCcqTPI4skTMMUY+MZnmwhzL+7d3c lZc/9GplJU8eebiQ4p1hemOBbZmcnCPviTcllOj2er/o4tTOJ8pKIAe9hGyLFAcgq1ED iVdmwymSZcqkK8qMqAS4RESgEZpUPJsqD/LJScMd6AouBfVdJdUJAF8I1/N6jvMa9TyH rw26cZ2PVw/BPFy2n6K3T4AfxsVXJ5Yp49RYnRXf85ePqCnzJGDxPhLlKMTYicEC1cJl hDbf4grVb4Z+90+LrmrfrOjh4W7hqGWX9Tz5sYOmJoB5y+r7qE/XZtktmNFfM9KBIMGD AiLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Kwuub0pRoDm2hutewuQqS5bn11P7XWUHQylI6Xd4lX0=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=pHI7AQ4pR2u10DCLOVlXxQf6240vwq52NIpBKZ74IpAfaorz33uyJ7tBpQ9dhNzgTr CpoNsZBWesMKe1dl0KIp20oYCstOratWxZuGEulXLqAQxp+M9uumf9IWceIDpvjONdLm c4Jid4lI2i9MoxoxjOY58Vs4/gvmSa0GAnVliH7PgwVGymqEqDZPS9nyVqTmdZQZrlsl WPvJPhvKLAbpwTCmrzsgIkz7VoxarDmbTu3h/U9m0MhtLFMYVNoUC083+id78MOTPriY 0ZNqaJo2ghsS00I7gF/ulga1PqTfQbRM0GVep8ZLf5dqHRrmBxtJBTJQbumG+p8GmQSD pagA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=H9dISTiP; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40914-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40914-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h6-20020a0562140da600b006854171d8besi2492379qvh.238.2024.01.26.16.09.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:09:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40914-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=H9dISTiP; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40914-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40914-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8D5AC1C262B4 for ; Sat, 27 Jan 2024 00:08:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D847E7E798; Fri, 26 Jan 2024 23:56:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="H9dISTiP" 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 588AB6EB40; Fri, 26 Jan 2024 23:56:17 +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=1706313379; cv=none; b=PoDNPRRHZyFhLa20aahsBpPB0dotfF5K8cvhpvQa4xyGPYrsjfDg+s8BjFV4dNI8MLgGfwEqygUYo+djjLGxoWDXh3CDnaXR7/MY9/9oRHAO+S193EZSQ5UnE8pII8pP72LS2g2G+dYGIVUfs7PI0QlteNIv1Ca0VKDsNyp+W00= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313379; c=relaxed/simple; bh=gq96TeqVWEaAISSlV20CuybD+i1abjYTFugALBYzlZE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VUPLs4ewRqwH2Q+dGWg+5ELVI9q6md3Iq9shJ3sQjrWRNUtaE78L412/b7conDFQunQHcZxKBfDysJxoOpWCBsL9CzaDd9mA214ok2uc/MtQTpLffyCV7O/QGm4/xMkkGQ8BuJwzVpYS2i6crHBfv9DM/g1ucL9bFEvAasj/sNc= 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=H9dISTiP; 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 Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QLQ4kM018436; 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=Kwuub0pRoDm2hutewuQq S5bn11P7XWUHQylI6Xd4lX0=; b=H9dISTiPTZ/5eRwEDNzibFh4mURdDhRpVorm UkOvt3gaNuQSJH5P1sneBIN+gdAU5D1sDQvMUAJfwDTVJkNSsRKims1AXeLsCF1V TEk20pMUEc6SjL+vX/mnqX1Qp4L+CpC8wl+7bjWln5MYE4gfjHH6FkVHy/VpS+n8 vPMKkXxd89YLTduoFDv+h0ZjEthp75M5xydy00CsVVB8clrmI1Ks+NdVxk8csHGS BfkdWqUqWecN8mA2RpKX9AtB6DTfZJZMCI0b7g2vfRSlNYe01QtX1YIB218kbREx gt6FyOonytuGREVBXMba7QDhvnrJ2QUorQHoG7mX+nrAJ1Yd7Q== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvgp2gruf-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 NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40QNtUjN011871 (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 34/46] arm64: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:13 -0800 Message-ID: <20240126235425.12233-35-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: linux-kernel@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: c771YXR8YAJPA7u5K7vHq2DbsG48lrwi X-Proofpoint-ORIG-GUID: c771YXR8YAJPA7u5K7vHq2DbsG48lrwi 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 mlxscore=0 malwarescore=0 mlxlogscore=551 phishscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200100442790782 X-GMAIL-MSGID: 1789200100442790782 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/arm64/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 426f9cc45ce2..646de760c675 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c @@ -355,7 +355,7 @@ void __init __no_sanitize_address setup_arch(char **cmdline_p) if (acpi_disabled) unflatten_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); bootmem_init(); 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: 192924 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp233300dyb; Fri, 26 Jan 2024 16:28:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqziCLdAMa7KOBIUCG/fytI1Fe0Xuij8q2m8euMAtiWkS5RvWZtIaiExsknaEg1uXnB1lx X-Received: by 2002:a17:902:eed2:b0:1d7:6671:e490 with SMTP id h18-20020a170902eed200b001d76671e490mr1970134plb.21.1706315331141; Fri, 26 Jan 2024 16:28:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706315331; cv=pass; d=google.com; s=arc-20160816; b=zD3JFoVWhPIm7OdpznmgasQrR3BwGgyZYqoh2wipnHjHZp3uHNrfqxjc8DjfPBNWx1 slPiBAOQ/qNbBt0+Ynj1yhdZDY7vm6AWT2FWIxJyad73BEXeSfwQotOmEUrhWUPRlKEq FGouAkGb90jMhfYdq+hEVA48/ZJnkF9f9yMlXmjp1AXegSUe2c7GxR4x5p8KZQyCLV/Q mNahsij0BkaBFdsm8PPywL3nRUd3MLg5/17MohihdQP2QVPZ+/ms7BRJ9/ASoYS5vb1v D/maAHvvfADcP3aPMHocY0n2KteDoeqBGCWSS+476t2thejv0wjTNmiapaV9NLetxFrQ q0Iw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UlEeh0jWbYRswXXjxuRu8UqJPd5Uy7WeBtqa0gKn6zI=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=MwmIlL5caclccVytpbtiPJa53JV3Si1xfoRfTYjjQGiIb0FnXo+WeuhsIIGBiii00j PD8CSSHGAUjyFU7lG3TjbUCH3mmqhzHyo5SWlaIiMSYw2cOneIt2LPUm9Dx1Pw5haoEO ZqDkV0VuSiCO0tXgz/J6juwX0MqhJsthvDdutn4GOA3DmS+wmbZujboWhKzkTiIDispk yvb4gjjx2gunkjWe9N0As4VIBr++TlwvH/03mqI9fmy9X5dqP3xzhJzc0HqOnaWNHu8W 9pqqftCXr8VOUrBHYiEgLnx8BJjuMGqv694wkzmZ7p+iiOHwcrt7WonbNj888FLYbE1N ymbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TaXmpWzd; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40911-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40911-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l129-20020a632587000000b005cfbedda1e6si1920392pgl.312.2024.01.26.16.28.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:28:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40911-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TaXmpWzd; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40911-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40911-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id EBD73B2AA13 for ; Sat, 27 Jan 2024 00:07:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1A81768FF; Fri, 26 Jan 2024 23:56:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="TaXmpWzd" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789201304782098786 X-GMAIL-MSGID: 1789201304782098786 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: 192906 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225998dyb; Fri, 26 Jan 2024 16:09:36 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWAJmEKjOD1XqTKDFaHBWXuQE3ZXA6ilpIeFjOicoo+rh8FNF7ztoE6HRbdemgLguNgelD X-Received: by 2002:a17:906:278f:b0:a34:aa89:3db0 with SMTP id j15-20020a170906278f00b00a34aa893db0mr303146ejc.32.1706314176606; Fri, 26 Jan 2024 16:09:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314176; cv=pass; d=google.com; s=arc-20160816; b=lfmK/49RABJ4YJPFWNh8gvYfV3hcTXBxCt0DjheY7Z28ZSPGMELFKJ/2aYD3TnUpCz +7AZ6uZyAvuAWc+mNGKPQo6cqWSMXfreAG8oLN8an5oMo5brmvgwdeukexs8zybc07LJ SjssFPQED9is24BFamKAEvBP1tLiK2AuAKAXqMWRsOeP29l7qoidPMX9rn/ShZ8tl7di /lHEHHdVxmY/ZCkiELjIdSZMrJ1oZ5hbGNlTn8lr9yJ7OLvBTf6xzZ/Zi45f4xk7eyEF GvCmQd2V3qQClqcVlHZeJInL3t+2SB6Q3+05hdn1Ea+StdbstNTXkh/VBN3bNilYgh7b YVyQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=udFbvnZ/8iWY1ccpnC8Wdx6byaiXLZjLgDnc7m/RrNY=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=FG+bcyUcrW9f7NlZwiVUiAUoOZPyN27pBV0y5DjMGJlN+EH68/i3OMLYP/2iT4gdBk 7VEoO7zhxaDTjv/hSyMYhrxbdLyr5TSMS7lFo5Np+0c+SPrJd3Eflljgs78UgeQcMXh4 DGesvJRzh8wFeZultFJWQDh9icjGEfg2RWoRxWmabQ5BNI6XYRsFSKe482AUnwIw1Lqb urN1UKgnu6KNej8LoKqpI5euU9gRUIZl6/lzCEn292IfMs5whC/JUMPt7vlb0OCQ2FO8 aPWvQn99DBatA90T64hqcSvERoIKZcAR0kS89kOVXYkJTctLf8gwQUwudYbQzqcGekuS UFxw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Qa9QBzlq; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40917-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40917-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ca15-20020a170906a3cf00b00a318e1c412dsi1074370ejb.249.2024.01.26.16.09.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:09:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40917-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Qa9QBzlq; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40917-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40917-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3B2E41F21F2D for ; Sat, 27 Jan 2024 00:09:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 993D885C77; Fri, 26 Jan 2024 23:56:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Qa9QBzlq" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200094404340888 X-GMAIL-MSGID: 1789200094404340888 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: 192912 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp229589dyb; Fri, 26 Jan 2024 16:18:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGbnRDjqmbDeCWm8b8moRFeZm8YJ+KFKMBf7Wlr7iCLvaVE2xtLZLERv6J84GpVlPKgcjwC X-Received: by 2002:a17:903:41cd:b0:1d7:428f:50db with SMTP id u13-20020a17090341cd00b001d7428f50dbmr651585ple.112.1706314708246; Fri, 26 Jan 2024 16:18:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314708; cv=pass; d=google.com; s=arc-20160816; b=Jag9CTPcyl0gHufYOEw228z+pnn8B0JitcnjyNDem224+VjAYvfTyKgYlsoxeTBvFY fh5DpLCcY24W4Pg3ThDRfVajpjHSOlf6mOKce4AAweUrkUdByeUpFGN5PowS7WKWsJZc l0W/9lBT2ITOyn97iGCX2UNUIReA7cFK0cuJvLsL+1IZtX0IB5KSt8Wrmz2lQozYluDN RAD7B+GrlfaJ3/jIVTgVVDzFfk0eAXymHSUt6nbMsXSqw/6FuSvS0cdwC3WoZ1QK2914 kAxOjJCypiZbh9vr59Fto3rA9Q8/FvK9okXV+UX04oXkgEXM4qaWBILce036usDFlpSw 7oYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JHAwrxllOSXe9Lncc3BwhW25fiD1hVsmdl5djzDx1Po=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=BhaNt35oJY9ePNErplPkfxvt/zqsh2Db6golzj4RnO9N1cc+WSgHl9Uk1HXcIgSA4D 6OgAJ2Tfg7OTCj6lJFD/XzGLKoLH+0/jt2i/aJpiZgaxC1JLs3wcPpLMLq7fMRRK8rOC GQbv0xhTx8sDLU3fPnfhQNQa+sabDM0Vo2MkU4MnpuyeifUosMZj7vmr0u8K0yC4vIbt jFf5s624ESYDrSf3DAsgsZYyjvF2eHrj1/TQYZjanlODcwMlIJlTy0DN5n8CvsFg7KK7 9+9YoQvWGgDagiLi5DrW+xWtN57H3H8u3X83S1W7vSM2wVgwE2i1acPhFPrsCuDGLb3M IDDA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=W9g8gxYm; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40886-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40886-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l2-20020a170902d04200b001cf5cc3029fsi1808238pll.548.2024.01.26.16.18.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:18:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40886-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=W9g8gxYm; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40886-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40886-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6E76DB28C9D for ; Sat, 27 Jan 2024 00:01:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DB22265BB1; Fri, 26 Jan 2024 23:56:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="W9g8gxYm" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200651264976791 X-GMAIL-MSGID: 1789200651264976791 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: 192911 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp227123dyb; Fri, 26 Jan 2024 16:12:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOITtxLekHI5ElEW3HJXgNhFCXjQnvuznVhhxiB+4L79Vibl0us2orjERtL3DzPpuguGJm X-Received: by 2002:a17:902:e5c3:b0:1d5:b921:70ee with SMTP id u3-20020a170902e5c300b001d5b92170eemr544691plf.64.1706314329457; Fri, 26 Jan 2024 16:12:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314329; cv=pass; d=google.com; s=arc-20160816; b=xv2p1nNViGV2WFEsLXgxFe30BsvlEPemc55ZPDMTlBk0oENF644LgRcz6kj7fHChxk kLF2ZlrwnWVm8vfZjYwG+Zh5TAH1Y75OjqSKUXO0Rsio0M4a1wMKDdWJVw01tugRovHL oKngGGgU1cFMcmV/+h5cMcZ1P2/Iru9TvW7cfR6c2FfQJIb1wGiHW5p3iIm1jOz56nop pEtMSp60KQ7li9kE+EPSdRjghjs2afcoL5gaoJUi5V7Paqcnq2b3KjOwH3M107aQGs38 Bl530RBP+uQ6x4sB8aT5mphi/rgKLpc8sBNjRtzEaDZw6lrxYVrLN671aK1hEemOJhJM wMJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=shZIVqJkSo6fGcUiuMy2RrxMhrTh4VJfidj0yenmhxo=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=nnHVjnJISNaLB1VNqWHS7SLMEikkQQ9h3qbnOmqObNR9Kjrl9Ij7R+XVOqHPaphtvt Td7k4Yf1VkZpdT9IL8uuBreUrcrS14+HyuTb5RBe9rDFiUqBbJkRIhvC0yv1HM8vhiRm T2OanF/BGrRDhAeze6Gt8J5bx7sKQj6azczRXMWphRKVCd4AMUgkY/+tRnFNnMMpgciy +VAy7bMomW4GaseX4ixpzCbewqqfoKRxmI2UMaW9d7qO3rc+ep6PBC6xjVLIjmcQ4RTt kM4Y1oB1Gd31WnzFkquRpT/VBdTwMXhCWFVcSAwXEPa4cZeifX2LPWWavdIhaWY3zPUU IX7w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iacufijZ; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40915-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40915-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u20-20020a170903309400b001d76f6115c6si1842218plc.218.2024.01.26.16.12.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:12:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40915-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=iacufijZ; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40915-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40915-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 89DFA28CF0D for ; Sat, 27 Jan 2024 00:09:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 53B2C81AD7; Fri, 26 Jan 2024 23:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="iacufijZ" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200254229266546 X-GMAIL-MSGID: 1789200254229266546 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: 192901 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225483dyb; Fri, 26 Jan 2024 16:08:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEfFQcpIwg3tU6GnNc6hQ9VX6e1iKpWlURN3O4PhnGKBQ2qlam/PYvVmf8bucVRRGmKuCEv X-Received: by 2002:a17:90a:9b89:b0:28e:20d5:a047 with SMTP id g9-20020a17090a9b8900b0028e20d5a047mr667635pjp.27.1706314098597; Fri, 26 Jan 2024 16:08:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314098; cv=pass; d=google.com; s=arc-20160816; b=TQUFoHs2iqfRCK7H9zyxnSHbkD+rBD+rpG+pWMntNt/cHh5Cg0TBs/0xYa+dyffm0q nu5wA5TGH2UuRmiZQbHfObHqXrvc9AlnF4CeUCOrV4y1aFF/z4ZT/+4Eb9tSf30q9Fff YTRuiXVruChA7P5dY9rf/Ni7Twepg6V73GOcGP0biRVqr6QpSJ2G7js7OP2NPbi42fYB IuvP8KeuPC1bQSVQ5Ldf5+1KDMu0HIVSDTJ8fCAE4h6yqfbxwzzD3m/eBstWhgFC2lom 5QyzO91FRg9YO8N1UqWB3lKj+W4jeLMA7dJ48zmVLt4ZtRCcuDlZPdi5NmE3MHEqudfF lP3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=D7j9TQGUjE3GBaIvfop5UUy6cncf6YhWztzeNy307O0=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=mKdSDqC6Ywfdh2lx2pVp5axR4vmvHqHFYuHhN2N87L1J1LBwd/21AWcS6AKfxm+/Eq wTNu3eXZ3ywWI9GuCN6z1vMphKaYXoGUi40y2mzSVoARGULRHUmKIZnFWKzOwXiOEJfn Z+W1CMU5Gp+t+lopqjhDBGEaccDUfZYbXBSuKRYGwbTg4IRVAm6afG2e69XAh+4f/gh6 c2LiPgU0aHP2hdJSoPc+SlMptVq6fJhuqfXErTaNAr48OWC6l5POIbvolwNtA6dYRKoD I2fZ3CXSg6daaYzZyqRD0JFCzhW4wi9bAZkO9fzUOMDfVpmVUmGAcxGgoATNsM05i+4+ c3lg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ffFp0Xvz; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40903-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40903-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s9-20020a17090aa10900b0028d4738d19csi3892273pjp.15.2024.01.26.16.08.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:08:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40903-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ffFp0Xvz; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40903-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40903-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id ED94028EFB3 for ; Sat, 27 Jan 2024 00:06:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AB246BB48; Fri, 26 Jan 2024 23:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ffFp0Xvz" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200012022293110 X-GMAIL-MSGID: 1789200012022293110 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:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192889 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225033dyb; Fri, 26 Jan 2024 16:07:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFyBJqm49/YuxmE5HY1LYCc0qoKfw37rW7ujJfE9JbDus7nWUTNxYsR/KJpCaqVIiQvZA5o X-Received: by 2002:a05:6000:1cb:b0:337:9afa:6d2f with SMTP id t11-20020a05600001cb00b003379afa6d2fmr408573wrx.27.1706314038224; Fri, 26 Jan 2024 16:07:18 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314038; cv=pass; d=google.com; s=arc-20160816; b=ybJPN8fcF9qcQ4dtafn7h7jGqldGG6H8bIVgxFv4lDjSLnDhb1JhkblvKzy2ObkpHH tqn/om0kmzyNEYfd0oXF9OICB59sPXE91mlfDWKDb7ZkIAr0AVz3Zlul0BqisKQhFRqs Fyqgoqi06c8pTkLre6yLQMjC+knrIOnfGja4btzr+GiWO2Mg8QYIWpZG4GxSaCJIC5+2 QHWLBTckfcxuPO1wqyPDKIKCAhZamwMlCphXyXcOkCeJ8WvWqcc/R2Wnwrm7twEZOEkY 8VrwCBWu7TPSvstLGLpY3Ecvv7OZOC3k/ilvAekWE75UpuoR4s8QmD8R/kwutk7NBJaI RzFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/cgx85OG7pSKuzjRnW6V7YHZaA4noSYtheccrfypgac=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=le4zrX6WHJnZnO1jxUAZyAHqul5v/VfTn/l6crbeB7Jn9Q16DNiYDKF9G0V+fFIbKz M/7CVImatD1BkdVpVccTBhXctEDtjWgrvmN/WLgkVjgCRF2CcPHRz2wCrRkat2SULRxG XckXKAshchtwlJEca9Mp+LLzW/NDAcTfaJw+KWIcBizoEhDTmsK2vj48jETZoZY6TD9L OvGyV6KCcxT3+MB59Rnqhhra3R0fwkPk2dpeTUmtQ0WdEpD8J7BgMFGUS8w+l08NWPT1 q/Jg07xYcmXEH82/jT4+4bUgoVCoh2szoGt594EV3KyxnyLOOCeYote0z98kCTe077fQ Rt5g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=m8BY42k1; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40904-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40904-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id s8-20020a1709060c0800b00a2d5b1f5220si992045ejf.392.2024.01.26.16.07.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40904-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=m8BY42k1; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40904-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40904-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 211B81F27EB4 for ; Sat, 27 Jan 2024 00:06:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3428B6D1DF; Fri, 26 Jan 2024 23:56:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="m8BY42k1" 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 0EC146168F; 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=1706313369; cv=none; b=M6w1dwl1SbrMFURz4kneYwxFoZJg16dY7SudLEumqYfnAIeAb5/ZKEf8300oIdbOKfEqS14A70Y/chfgtJBnEJsZnVn1owRQo/8p40u0/pDm8aHG56o2bfqucPfgl9wKdUk8vi8U5FWYSH6laJMkHa1t9vM23eYqEHywKPBKuAw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313369; c=relaxed/simple; bh=eCCuw9ZCqAusxZlzgqxXtVC5HZa5Anfnnz/pbMlF0qY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=trHqHmcl+2znjOsT5YcpLCnFp03b7S9d2sJoXNZrc7IWV5X7tOXqtzOZexiuDk5mr3wfKI7hCT9eWOwdP5wctPqVcIdxMNPbooxT9hX1jwaiU7mfcaCP1aKffWkiexlLwomP5sxkx8mMej4JQ4AVwa2EY4lqOWZmaklWq1wzmL0= 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=m8BY42k1; 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 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 40QNFqjh015576; 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=/cgx85OG7pSKuzjRnW6V 7YHZaA4noSYtheccrfypgac=; b=m8BY42k1xK9i/FXhHwKIGYjDaNVy1OzcBWX8 7ZDJ+MwdRBl0Qq1vUqzF/SJx/P+5Snp02f9p9Qxy1t8n5Cbb3Yd97Nso83vKhqqG YgNN38rSHVIty8TseRj34bPOCar8wno05UyGQrCGMKmJKaKb+zLzwEAOgUjgQ4Ur izaMcAPuPZMl2rwsISiqsyRHY7mCUzkDjvfbeBIi+M3rsdG98+mgC0cJwfMVZwga TErNEwXffbEuYN7WhQYLAKUAVTXfB1qfcNXK+Mrd0g/OI7MiJLZVuqknltxm70KO 1rjIfYnsaRNWpBCTaVXweY/yvYzTIA+Qp0NwP2coieWtLz+N+A== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vv6c8j5xv-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 40QNtUwm018645 (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 40/46] openrisc: reserved_mem: Switch fdt_init_reserved_mem to dt_init_reserved_mem Date: Fri, 26 Jan 2024 15:54:19 -0800 Message-ID: <20240126235425.12233-41-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: linux-kernel@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: xQcFQN4n-fYxJVbxkl1bVT14pbo4Jvc4 X-Proofpoint-ORIG-GUID: xQcFQN4n-fYxJVbxkl1bVT14pbo4Jvc4 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=570 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199948851835587 X-GMAIL-MSGID: 1789199948851835587 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/openrisc/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/openrisc/kernel/setup.c b/arch/openrisc/kernel/setup.c index 2c7059a0484b..a7249538a497 100644 --- a/arch/openrisc/kernel/setup.c +++ b/arch/openrisc/kernel/setup.c @@ -88,7 +88,7 @@ static void __init setup_memory(void) early_init_fdt_reserve_self(); early_fdt_scan_reserved_mem(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); memblock_dump_all(); } From patchwork Fri Jan 26 23:54:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192894 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225256dyb; Fri, 26 Jan 2024 16:07:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6IDVpi55XKOjwgKYaYWMDdiAmDJchl2sJowqiN086t/mrHcxO3Tqf1jt3mHj3Cd19Ss9C X-Received: by 2002:a05:6402:14d4:b0:559:c6b8:2ac6 with SMTP id f20-20020a05640214d400b00559c6b82ac6mr305112edx.32.1706314068621; Fri, 26 Jan 2024 16:07:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314068; cv=pass; d=google.com; s=arc-20160816; b=SBkjDp6k/e0RpCza0esl82jMSFkQqqyPvtAAa1m4pEQxrdY9vPHPUoOTqDq3+LpFDC VHlCvUl2OlAyQFlnl09ZaUg5CKmjo/CTRkKFxm/lF5VBgncZi6g+K2bS1UvbhIsZLKhV rv9ZfZQ00dXE3DUbCBZIkrlPhKvD8TvwNr+a78mIEgJolIylIcAHMZbvH+zZQWBQp3fd gUQFMlatylGaDw+AUOR/shd8SylaStU/rCWAH3hoc9kzQGKD7bUTyBpBGtbE29y84qfa fPU41LkXOR7qiHE1A6GEjHrTz9k2Jvij+zlVK48r83K8TcOCFgqb+G7WNTO097cchsO+ 6G3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=T0h3z+K0rtV4faDRf1fwpDX6H/a9sME2F2MHueBtAkE=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=RnVLP5/x+wmn/WtRK6UtvIw11Ut/qWbZ+ndjbIoOFB+28zSjANf20P8J7bsBk0tJSO 6peWqr1cmZ+47fcELRSIoPecmSIxOAXeDREvPMavyO5lSDK517knCpPpzfw/eucQFS5M fxVh8C0Tuw5RxQmbqUrMQh+zLdtctgHdSt2BJmq8GckIDS/hCTjQHMtFPi6baf9sNgSi do+HVQQZ++PBVm6MrfVtdQCOQG3lO0QiHtNUpFbUY2i/VJPiskXUTilyYeBzZv53gW79 R8D+00edq/nKZgo0h32zyLHRW7wNjRQXoYqUAMjlDlX1RNFYDG9rT00+oqbr1iLIkfbw utyw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RmmbaUVy; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40908-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40908-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o8-20020a056402444800b0055eab7db46dsi259613edb.480.2024.01.26.16.07.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40908-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RmmbaUVy; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40908-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40908-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3CB2B1F21BFE for ; Sat, 27 Jan 2024 00:07:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FE14768F9; Fri, 26 Jan 2024 23:56:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RmmbaUVy" 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 709E367738; 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=1706313373; cv=none; b=Xyze42t5lQXY96lEFXfWm84cDuWRQ8V1/i8sG/1b08v5H2zU3o4R+KogmbnvdClerUShJa/IECn0JgW0V8Bis7Y1+C+04KRMeyM+JHO0KRQb4IVjQ8dwvvB7DB+V+UOwd+ROcdNhBe3ueDGZBk2ztwIXANkxqMdddrHJtHr3wdI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313373; c=relaxed/simple; bh=J6pPkakqNv2daF3IrtDrH+SZuJ5STbJAmAJQb9x5eQs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c0m4Pd2w22ZM3pp/ittvv50hTCBp6DvpRQtlQPUGdMRfeOwdP4qU9M9a348Ql++g7U6Z158u8xGNVYC8zkodq7ALnQaW6VOUCOOlXr+sjbplZljEJct7zJqJ1qOZ5DWPa2nCPR2915GbYs5bbtSj3ZcyKI29XsNUfIDT8Z/THbg= 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=RmmbaUVy; 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 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 40QNB7D6025095; 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=T0h3z+K0rtV4faDRf1fw pDX6H/a9sME2F2MHueBtAkE=; b=RmmbaUVyx/q9+lpQdKFEpD7F9RBa31grZwM4 a1vOIo5ZwdhfYOGAJ7VqIWhJTlugUNN/K+t1J3pqPDTgNToWpskXROE1XHkNSaKr xXozjbugETFrj743VUsC07jm7XmtddlX5jtPXwANWBV+22zCZvDeH6SgFirrRhan c6j4ksO2ci2aB82i2/yXaz4xpmHV1MIjSTtIbs7jtSxvT8i+HX/h2D908zon3BUv UC1h6s7BrRTeqQVjq5rQGSZf2IJoaV0uZzED/fjZZJh0Pv3Q1TU2MktVcbBxXx+S MvUcqOz+ST7vkCOK6E2pC7B6xpXNLgnOanGeJJC4H5FtMD2Klg== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvfc8h025-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 40QNtUwj018645 (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 41/46] powerpc: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:20 -0800 Message-ID: <20240126235425.12233-42-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: linux-kernel@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: DPuu-JorzJSPhOkMbk7tfX3FU2687aOJ X-Proofpoint-ORIG-GUID: DPuu-JorzJSPhOkMbk7tfX3FU2687aOJ 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=661 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199981113091335 X-GMAIL-MSGID: 1789199981113091335 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/powerpc/kernel/setup-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 96bd4c964943..fdb7cb8235d0 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -891,7 +891,7 @@ void __init setup_arch(char **cmdline_p) /* Unflatten the device-tree passed by prom_init or kexec */ unflatten_device_tree(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); /* * Initialize cache line/block info from device-tree (on ppc64) or From patchwork Fri Jan 26 23:54:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192905 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225912dyb; Fri, 26 Jan 2024 16:09:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqIs0fr11+xXpLk8+4oJCJKG1FFf7/hn7HibKW6Q4Vcr1HvgR+pZx1xjGCOXxpmXsnqT3n X-Received: by 2002:a05:6808:482:b0:3bd:cc23:6363 with SMTP id z2-20020a056808048200b003bdcc236363mr562976oid.35.1706314163302; Fri, 26 Jan 2024 16:09:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314163; cv=pass; d=google.com; s=arc-20160816; b=Jm5X1ErndIeeti2G7Xl+vResP9xTjDWgS6T/5SruUCEQgEkmFxxn2BDTYXxbTwGgzA hpUwAMsKXaxU3omx3lAwTUexM6QBwCem8n9ltP80fcSzeG4q8xAz0QO8c1NGybxCkkqh kjWMVMg2Sx5xDBEywkm0lTcTMsXedrIA1MLZMAWWmotXk/YBarspjq0pBMcu5z/VbtF3 DnD7lfjrwz8VLyJh30+CgNHzv2KnGJ7iPqTGh45s/T35gizQudARiEgdTfmoRxGVzzx6 IyR7KIkv0dONAdW9Rgj+vi1pfWVWimBE1xWzanedJsZf6clI0VrJ37/EBeLYKPw4SRhN iKfA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JehfiXL/jESvck/dHwB/tjacBNHINenDJXJssZftYA0=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=lAD0ZNxJ0rAIlPocekCYDM9Y3lQiIF+cMkw2yLw5btdHY4cMpmB4mR8+opWBmJLFG9 2yPCwMA7VGodeR9jMiCvi7ycyuFdsitMsIYP3aGzF5TyzCZioc/tlV0z0rwTrht8g2Ts zGHmhTro4pbx7fXRcAmiRkcf353wClCL1L287OM6qOYaGGeDEA1rWa9EoxQK0p2jQwL/ gv8owpiZFYA9teqg+VlBnwZwKIpwlk8563cx69ThkTFzUqceJ4bBdifjw9g9qt1/cBsJ cihhdXHhDKtywnqsMPaKQ7yZSxkkVx/uzSXrEM2LSUlaDFUkSuZnnNwp1VOow6mIDue8 dmeA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lywtgH4w; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40910-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40910-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id h5-20020a05622a170500b0042a8b54a6cesi307641qtk.122.2024.01.26.16.09.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:09:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40910-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lywtgH4w; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40910-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40910-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 232451C28EAD for ; Sat, 27 Jan 2024 00:07:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AE3F176901; Fri, 26 Jan 2024 23:56:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="lywtgH4w" 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 9CE6967E79; 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=EckVpCGuIEZ22nMdNVeWJpg2jTZiaL6KCX/z6iZVtKwzIYd/7L2Fp4BJ0fqs1wogf3OSeBVMmfBBAkr453rXHs8yf3peG3+iyutXGwefaPKusJ3jgIuUjLM6MpEEVxuK7MskPXyZg2MbJ8WEuUQYnnQTz+l0qCI/eJGcT9tz7l0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313374; c=relaxed/simple; bh=qAJ+51cbXvvCfLjg82KIFwc+7aRBvLZGpb7bO+kBVSk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lYFJ5hlSkOF0MOJa6zZeFdIEwyY5DCvt1iFG2l8oZ4oXVPclxiaCRQBUGy+3bP+ODRfglOEBrMxMOlRh/2AOSNhimrRIlTu3PVtQk3ypP8eOd67qnp2WKo5nZjJfSjjs0m7Y4TWRtOpfj9Ql4ZZZ2FitZcIUhoAJ9qcRSJsxTvo= 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=lywtgH4w; 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 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 40QLidNf001840; 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=JehfiXL/jESvck/dHwB/ tjacBNHINenDJXJssZftYA0=; b=lywtgH4wOf75UMzKTOMrxUO+QQzBiVuwolYi 4+3YY51x+Vuq9uVMWrFDeAFOgYM74dj1aDZHBX5IBmUshUpNwDMnRjq/u/yueF38 JnBOd4pRUen/fT+EKprd54SeS0Ekj3+5wReNqHikR3Gm0O1MKUN1SbFY33yBx+E3 mdIEJSuNc3BK12d1R5hE8wf/4W/LsFncrddpZNP9jgXxsF+t1QjJA7chRVbGWrEJ jZ/57DEy0G6Hv2+mN6h+ICl3dn/3FaTPsu6kUFAEmkPuFaG32QTvk8Y9PZWpfLBX aujNRaEOavRQ0HqyD+TKReQ51Mj2/YUS3HD7+trSOKnUxHOcaA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvgy8gq04-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 40QNtUwn018645 (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:17 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 42/46] riscv: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:21 -0800 Message-ID: <20240126235425.12233-43-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: linux-kernel@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: 7nA_V3mCURdgAzpTsaoIGUM62pOvtIbp X-Proofpoint-ORIG-GUID: 7nA_V3mCURdgAzpTsaoIGUM62pOvtIbp 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=605 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200080043648537 X-GMAIL-MSGID: 1789200080043648537 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/riscv/kernel/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c index 0601ed1e4ce6..3abc41217ede 100644 --- a/arch/riscv/kernel/setup.c +++ b/arch/riscv/kernel/setup.c @@ -271,7 +271,7 @@ void __init setup_arch(char **cmdline_p) unflatten_device_tree(); #endif - fdt_init_reserved_mem(); + dt_init_reserved_mem(); misc_mem_init(); init_resources(); From patchwork Fri Jan 26 23:54:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oreoluwa Babatunde X-Patchwork-Id: 192899 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225442dyb; Fri, 26 Jan 2024 16:08:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvuVsUOcYt1mHjb9XN3/rIkoWyg6MQitEuvFtBvL70Io5ZOgrQZ9UTVInfhPhPbYfkUc1a X-Received: by 2002:a17:90b:1097:b0:28f:f4bf:1e5d with SMTP id gj23-20020a17090b109700b0028ff4bf1e5dmr585233pjb.49.1706314092833; Fri, 26 Jan 2024 16:08:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314092; cv=pass; d=google.com; s=arc-20160816; b=qFkudsWSt3zH6yLrPbbanQHgJNmgpc77rkKdBfLanpuXHP4oFC6HjWiYZ052ZEdqfW F8kZH/FRRVKgzKxCLWZe1SQcGUJablNH4O1D0DBrOE9lkj+Ff0An0L+kffkMmGMwiM7Q qULa0hYwkCURQ/A+BrS80HEnrtLb4jsGk7RDCKn+tCQQ+rdaf8cLZP5psZjz7Zv0pV6I vTvSpYBjFjIAGAu85uecxhBygnIpL8FjIBPw3aLoffaqE3rap1bwBPuVqVtV/gb1CcnG 9Tl5x0ap52YIilJ6BRdFbrqvr3Yq5Vx9P64dPItSRmvMoecr57dsbV/UQz+0Mu0egtNM 4wXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hSEBhclzdPtz/3+25+WA7AGExPJFxgCWm0GuSCNyw/Y=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=CyDWjJUXu5jdwoJckfJ59cwv0xKT9cMnsYgEq3ouWrerqnm78yoKSlbdFgDn4f7Mtx HQq7dUoCGPMuPTN/IWXW+CkGY1dUp4884ykYilO3lofSqsyHECsi8syCqmTsHs8V/JWM P6Indmk7VqfTA5V4aRWZLRDIH7pDDD62bXoortswGs+Q254FN49nxFshiYczvGpgn6kS P8BSrryXznaE3d5fC8dJIbF2G6EHsPmO2UIlCoYKFuk/G3tGQW+2us8QSsoMFCQIMF0n l4O8viCNm+8O0U9NbApu9v0r3LcS+vRQ/gNattT8xiqycGFzBME5OCe8fkPT1AtzBxh+ Q5EA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gMe+LDee; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40902-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40902-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 15-20020a17090a08cf00b0029529cf0797si306315pjn.111.2024.01.26.16.08.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:08:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40902-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=gMe+LDee; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40902-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40902-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7AF0828EBCF for ; Sat, 27 Jan 2024 00:05:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EBF116BB3D; Fri, 26 Jan 2024 23:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="gMe+LDee" 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 4757360EE5; 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=1706313368; cv=none; b=eGW0aTlRkdKd9TJfMe+bTNJkH9yssRl6+m3vAVgyH8oUQ1xWtSaxSoyorEJLwu5+g+MZ6XawzTIeLTcaeQASY2VePaJXtU/iMmIGE9QbUBV9GfhH9bcI30hxiYyMPoKDi4rgEtXQ/6/8Qsms/Ye2t4QAO027tAaYJjOnWXdrRbU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706313368; c=relaxed/simple; bh=33AlP0PG1X5XE5N2phIchUCSvV/1Ba2tBExwhSL9D6M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q7frjKIyLdB8vwgZ+tkvDijmt1IRoelmmbd9fdxP80g+C92NARrDiZHJeViE31QiAKWjbGVHjWth+afA3UUMmZR4x3DRcf5GNuFdD8FA6yEyXkXQ+dKUHMZbeP2t8P2wY8//WZioOjWJNQueYm52ut7XHn3+GE2BvAM6IG2SF3E= 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=gMe+LDee; 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 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40QNAhrJ013451; 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=hSEBhclzdPtz/3+25+WA 7AGExPJFxgCWm0GuSCNyw/Y=; b=gMe+LDee82Uj+r+uvnAdrtsdaejpw+bfIiY4 8cFRaFv+IxomYPNbw6mJEA+23BAOhFF1hdlhci5dWv34ZtgbEE5SmtYzqyWkKqsW dfxHUE533MNRIZwwK06Y1OsiUD1zbWpPoxNSM6EmgXPaYjn2UmCJLXOB+wkzuKsf jxG6IBYTeMRExTKo78zY38cSRAtVVMmC8DfcsyVBpA+08wq4v2LuUgrgaM1/8+X9 PipubpjUkCsKLqjrtbd7/It7Q85eVZNn5Ntu8UK6hsJm+QEtasrUQedfJeI4GyS+ WA2dXSgxHbr9V/zRffb0XUNtwn1IG9zvREZXOmoo6/c49MePyA== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vvhxyrhye-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 40QNtUwl018645 (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:18 -0800 From: Oreoluwa Babatunde To: , , , , , , , , , , , , , , , , , , , , , , , , , , CC: , , , , , Oreoluwa Babatunde Subject: [PATCH 43/46] sh: reserved_mem: Switch fdt_init_reserved_mem() to dt_init_reserved_mem() Date: Fri, 26 Jan 2024 15:54:22 -0800 Message-ID: <20240126235425.12233-44-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: linux-kernel@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: qhgAPn61TOLMs8D5arF_CzdTGTaxbkAk X-Proofpoint-ORIG-GUID: qhgAPn61TOLMs8D5arF_CzdTGTaxbkAk 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 spamscore=0 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 clxscore=1015 mlxlogscore=536 priorityscore=1501 bulkscore=0 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2401190000 definitions=main-2401260176 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200006131535186 X-GMAIL-MSGID: 1789200006131535186 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/sh/boards/of-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c index 7bec409f077c..a9af31404167 100644 --- a/arch/sh/boards/of-generic.c +++ b/arch/sh/boards/of-generic.c @@ -112,7 +112,7 @@ static void __init sh_of_mem_reserve(void) { early_init_fdt_reserve_self(); early_fdt_scan_reserved_mem(); - fdt_init_reserved_mem(); + dt_init_reserved_mem(); } static void __init sh_of_setup(char **cmdline_p) 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: 192895 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225283dyb; Fri, 26 Jan 2024 16:07:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFPNk5jAt7zo1ej3Np5zdn9bsbrKomsr60os/0pTWIlwapdvwJidpxYN90DVH6UcD7ajHc X-Received: by 2002:a17:903:2592:b0:1d7:51b5:1f76 with SMTP id jb18-20020a170903259200b001d751b51f76mr787588plb.95.1706314073282; Fri, 26 Jan 2024 16:07:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314073; cv=pass; d=google.com; s=arc-20160816; b=LAAK+d/IKBV/0mwdYg6EScIVermuzEZEAGs3ZEqU72vFWNxvKDXuVZwwhHIfc6ADmR +kqzwkLOnp8uuiMHA4WYTZY3LdrFd2MCwMyyq6L4Hu64+Yi05W+ZT7sUticgvqSokErs Lm+L9QljojvNyIR+IXPyoBFwsB5aRrC8EJimW7N0FI5L4DAOAOWaJDWSAkptD50yPSzI u6SOMqqwtW9Cg1YUkIpWfepryiHYvKfXX9+mVv4M0WImOeQy62/gi1+bn7UZhTBQ4NOE 57acVKlzywQlIuLf85cH9l7jLDsAYQzV58qFLuWcucnNPBM2JDPNcnDPzyUrXZtW4udQ YOLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d3MBO7OpuFSlitrurZW9pSZSombH8uKspBY0F+LXyng=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=tL72FmQFTHxQJmY+IQw38AQSqqBhGdJY3+kO8wZbU/pwTOB1YLhgAOdhxmuEuq6Qds vekyvgmQskjK611cjYz3gl9ARN0QtBnsZBraoQPT8WhqtL7PulOolog7/22PsoRZkIEv zQrYgpcV3Dg83PoCvbBTg1R6yuWD6I0spE1s07uUYh1khNYyQ5xnMH8Dq7IJ+tVSScOk 9WhzJrV9HELF7sgQZkCgV//sBKv78KemrmrMUCXht2/rmmPK41Q2SaJ2v1eA5CM3Yqru JY0NWXrOm2VVPWr1veXD9tPbDDUlpwxkdEfJ3dbOK8GznW6EGFY3Jt/gWkaarV6Pn3Dp 1VBw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RFd6jO+C; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40899-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40899-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s5-20020a170902ea0500b001d5e55b25cbsi1899754plg.16.2024.01.26.16.07.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:07:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40899-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RFd6jO+C; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40899-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40899-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6878128C7FF for ; Sat, 27 Jan 2024 00:05:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 439DE6A340; Fri, 26 Jan 2024 23:56:14 +0000 (UTC) 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 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789199985510523566 X-GMAIL-MSGID: 1789199985510523566 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: 192898 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp225422dyb; Fri, 26 Jan 2024 16:08:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmOPJsUYsBk9CUfw2rmafJ3qB5ITmaiTHU5OzaKorxAwj/CO6h8MhiciK4xa6JoRjtl97i X-Received: by 2002:a05:6358:291c:b0:172:e3d3:4906 with SMTP id y28-20020a056358291c00b00172e3d34906mr607537rwb.34.1706314089675; Fri, 26 Jan 2024 16:08:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706314089; cv=pass; d=google.com; s=arc-20160816; b=mVJSZqcOeNmQyNIwuvOGRgsoviXjw2fHOoBtrZmVsnsMAllLDiq9mldqgmRYf3Y18h 5BOmJ4XXURI1tP0XSCWHngPOcOOY47oBvwJ7EI9LR+4+YUnLcfdSRJW/aFCBpw21kFxN 9b3pmG/Ob6Mnj99TUrJxDYM/xhZgPAOMLso+Asd7u4f6q6DbVF+jLceB4NB5B2jdzmNY ISb5+AI2sppQjM/44cGIYYaWrFimO6FL2njEYubjoQjTICMJ7Yvk+Ge+6o/NJMwsZPWZ VV+ZyAf8TU3ElJOiPq8dwPuS3rV5LDxAc4RRLl3zrZ92oFlS8NEIbRXcFo+pdZH6k3Bk i9fQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vs3VFS39EsjZIuvvSQ74CwddULOtH/piipMdRYmYCvM=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=rd5SO9hkY0YieWxT6qvX+BoH1PA9VSMmaJD+NO7NrSWOJ2qSI7Kbj6HyX7aRnv9diu bOHcRlGoRa2AxdqRBlXPuXtLXksc+4nioOtiAMPlR3NNFATVUKMYej/cI9iyk/aXD2n0 Jar6elwW3lIzdrhT2fuEqGXt/zsnWslK52SK4Ile9p2aduZhDUiDfQhMDe46L+slwxN1 m9Grm/itUKIVk03F3s+hn368A96+fJhCKg/UH99sppEfg+Jen9VMeghi6BFqABxII6Qb BxFPqFtKU9eKjeQQUeG160DjZYEK5nXj2u88RNCoCCZAVMRlNSAiSIrTBR35IrQo+fme loCQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Xp8mIwYj; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40901-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40901-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x35-20020a056a000be300b006db7041fbaasi1903419pfu.348.2024.01.26.16.08.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:08:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40901-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Xp8mIwYj; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40901-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40901-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7AE5228E8B8 for ; Sat, 27 Jan 2024 00:05:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D89066BB3A; Fri, 26 Jan 2024 23:56:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Xp8mIwYj" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789200002800076926 X-GMAIL-MSGID: 1789200002800076926 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: 192923 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp232959dyb; Fri, 26 Jan 2024 16:27:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFijsN1wLwX3McNauVaLzJslpk3+uhE731NyTULGAMWFWpjPG4fenugv+kcOI5ZCMvSd/Uo X-Received: by 2002:a17:902:768c:b0:1d4:32d8:ea78 with SMTP id m12-20020a170902768c00b001d432d8ea78mr571465pll.79.1706315267464; Fri, 26 Jan 2024 16:27:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706315267; cv=pass; d=google.com; s=arc-20160816; b=oTyk/nUTITa8mvPdK3KNyqgU+wwqc3d/2E9e7MBLgqmQWTwYv6Ti3q/esnZWFXVJUw J5vpOWzYy1wuMjfxJ+Xm+lMlhR/isGx/sP8+hV/uYaIroYMvu06UCzOdJNbu2CCEH7ue T6FcEykad9N+Sty3gHZlRx/BRLYftd/6uG/GAazhtNFH/KwVYdGPSL+5B8LGRgnmYsRW aPZAvgjD4skEQH8dqsYEigfF0u8oF9UL5xt7QoA3pIxOSSKy+4oUlBAuYpt8tzSR2Bdj lzMnW8hQnYTtLhcTx57xXTj7N8YSZayskOVwA+nIbpOQorqDkycH+6UYPtkiKmWcywBr Hbsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NSJIpzRt23eV6cwLNaH4bWRVS5c+2PsTe/XQM/ncC7Q=; fh=hY6kMi6FvW8wLTV87L8suYr4n1TqNWWZDZNH+E6XASg=; b=1Jo3eYBrZTU9rR6xhW3/qUyhg/F4VEcCZSY702W2iGRPA0WnSnCvjwACTBvcbFY3ie udCsRO58DmiYX2lXIIAJXSTHfJRxF+G8HovoXRawtismEGXGvUgrIOPoYqp/QP0NUIxs MkBvSB5oHDeBL/U5aJE81k9d5kMuWWrlEzYJ5zKI2hrsmObYyDdqMG8VnrayF8y1phOw 0VS4CkRM4walBbsdiQ5U4dzBbZtluuEM+yBIse4uk4IOth6iBGAN2+roGbqTuKRetUxR R3SEVPuUkEJDMMsfvoLS+KelBjexbT6bBiJPzlF5xlWFbSgrOYw2DbOoQpRGjS6PR4jw Ua1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RcS0XWtL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40905-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40905-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id t5-20020a17090ad14500b0028e80341b6csi3979097pjw.138.2024.01.26.16.27.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 16:27:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40905-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=RcS0XWtL; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-40905-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40905-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 80DFEB2A434 for ; Sat, 27 Jan 2024 00:06:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B94B46DD0A; Fri, 26 Jan 2024 23:56:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="RcS0XWtL" 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 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: linux-kernel@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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789201237506980498 X-GMAIL-MSGID: 1789201237506980498 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) {