dataipa: enable IPA/GSI driver compilation for niobe

Changes to enable modular compilation for niobe and
modify the dependency inclusions as needed.

Change-Id: I437e88c39ec0f423c8bd8d948c86ca1ad7a8e0b2
Signed-off-by: Jagadeesh Ponduru <quic_jponduru@quicinc.com>
This commit is contained in:
Jagadeesh Ponduru
2024-02-23 14:24:00 +05:30
committed by Prasad Arepalli
parent 81767124b0
commit 024163aed6
5 changed files with 34 additions and 6 deletions

View File

@@ -21,6 +21,9 @@ define_modules("volcano", "consolidate")
define_modules("volcano", "gki")
define_modules("niobe", "consolidate")
define_modules("niobe", "gki")
package(
default_visibility = [
"//visibility:public",

View File

@@ -9,7 +9,7 @@ else
endif
ifeq ($(TARGET_DATAIPA_DLKM_ENABLE), true)
DATA_DLKM_BOARD_PLATFORMS_LIST := taro kalama bengal monaco pineapple blair holi cliffs pitti volcano
DATA_DLKM_BOARD_PLATFORMS_LIST := taro kalama bengal monaco pineapple blair holi cliffs pitti volcano niobe
ifneq ($(TARGET_BOARD_AUTO),true)
ifeq ($(call is-board-platform-in-list,$(DATA_DLKM_BOARD_PLATFORMS_LIST)),true)
BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/gsim.ko

View File

@@ -10,6 +10,23 @@ def define_modules(target, variant):
include_defconfig = ":{}_defconfig".format(variant)
mod_list = []
ipam_deps_list = []
ipam_local_defines = []
if target != "niobe":
ipam_deps_list.append(
"//vendor/qcom/opensource/datarmnet-ext/mem:{}_rmnet_mem".format(kernel_build_variant),
)
ipam_local_defines.append(
"CONFIG_IPA_RMNET_MEM=y".format(include_base),
)
if target == "niobe":
ipam_deps_list.extend([
"//vendor/qcom/opensource/synx-kernel:synx_headers",
"//vendor/qcom/opensource/synx-kernel:{}_modules".format(kernel_build_variant),
])
ipam_local_defines.append(
"CONFIG_IPA_RTP=y".format(include_base),
)
ddk_module(
name = "{}_gsim".format(kernel_build_variant),
@@ -195,7 +212,7 @@ def define_modules(target, variant):
"GSI_TRACE_INCLUDE_PATH={}/drivers/platform/msm/gsi".format(include_base),
"IPA_TRACE_INCLUDE_PATH={}/drivers/platform/msm/ipa/ipa_v3".format(include_base),
"RNDIS_TRACE_INCLUDE_PATH={}/drivers/platform/msm/ipa/ipa_clients".format(include_base),
],
] + ipam_local_defines,
kernel_build = "//msm-kernel:{}".format(kernel_build_variant),
deps = [
":{}_config_headers".format(variant),
@@ -205,8 +222,7 @@ def define_modules(target, variant):
":ipa_clients",
"//msm-kernel:all_headers",
":{}_gsim".format(kernel_build_variant),
"//vendor/qcom/opensource/datarmnet-ext/mem:{}_rmnet_mem".format(kernel_build_variant),
],
] + ipam_deps_list,
)
mod_list.append("{}_ipam".format(kernel_build_variant))

View File

@@ -1,7 +1,7 @@
ifeq ($(TARGET_DATAIPA_DLKM_ENABLE), true)
ifneq ($(TARGET_BOARD_PLATFORM),qssi)
GSI_DLKM_PLATFORMS_LIST := taro kalama bengal monaco pineapple blair holi cliffs pitti volcano
GSI_DLKM_PLATFORMS_LIST := taro kalama bengal monaco pineapple blair holi cliffs pitti volcano niobe
#Enabling BAZEL
LOCAL_MODULE_DDK_BUILD := true

View File

@@ -27,7 +27,9 @@
#include "ipahal.h"
#include "ipahal_fltrt.h"
#include "ipa_stats.h"
#ifdef CONFIG_IPA_RMNET_MEM
#include <rmnet_mem.h>
#endif
#define IPA_GSI_EVENT_RP_SIZE 8
#define IPA_WAN_NAPI_MAX_FRAMES (NAPI_WEIGHT / IPA_WAN_AGGR_PKT_CNT)
@@ -2677,6 +2679,7 @@ static struct page *ipa3_alloc_page(
return page;
}
#ifdef CONFIG_IPA_RMNET_MEM
static struct page *ipa3_rmnet_alloc_page(
gfp_t flag, u32 *page_order, bool try_lower)
{
@@ -2706,7 +2709,7 @@ static struct page *ipa3_rmnet_alloc_page(
*page_order = p_order;
return page;
}
#endif
static struct ipa3_rx_pkt_wrapper *ipa3_alloc_rx_pkt_page(
gfp_t flag, bool is_tmp_alloc, struct ipa3_sys_context *sys)
@@ -2723,8 +2726,14 @@ static struct ipa3_rx_pkt_wrapper *ipa3_alloc_rx_pkt_page(
/* For temporary allocations, avoid triggering OOM Killer. */
if (is_tmp_alloc) {
flag |= __GFP_RETRY_MAYFAIL | __GFP_NOWARN;
#ifdef CONFIG_IPA_RMNET_MEM
rx_pkt->page_data.page = ipa3_rmnet_alloc_page(
flag, &rx_pkt->page_data.page_order, true);
#else
rx_pkt->page_data.page = ipa3_alloc_page(flag,
&rx_pkt->page_data.page_order,
(is_tmp_alloc && rx_pkt->page_data.page_order == 3));
#endif
} else {
/* Try a lower order page for order 3 pages in case allocation fails. */
rx_pkt->page_data.page = ipa3_alloc_page(flag,