diff options
author | Lucas Wei <lucaswei@google.com> | 2021-05-31 12:16:12 +0800 |
---|---|---|
committer | Lucas Wei <lucaswei@google.com> | 2021-05-31 12:16:12 +0800 |
commit | 210a5a912446212ed8c7a3c23af1363937c98310 (patch) | |
tree | e8d30415c0c3ca0c2e0a2cc19e649a0aabdd1a4d | |
parent | b888176a60ff8df3d261ccc0bbd315a79e46d524 (diff) | |
parent | 85564eaabf02749260b6e6c57daa4dd7767aa085 (diff) | |
download | data-kernel-210a5a912446212ed8c7a3c23af1363937c98310.tar.gz |
Merge android-msm-pixel-4.19 into android-msm-barbet-4.19android-s-v2-beta-3_r0.5android-s-v2-beta-2_r0.5android-s-v2-beta-1_r0.5android-s-qpr3-beta-3_r0.4android-s-qpr3-beta-2_r0.4android-s-qpr3-beta-1_r0.4android-s-beta-5_r0.6android-12.1.0_r0.5android-12.1.0_r0.34android-12.1.0_r0.27android-12.1.0_r0.21android-12.1.0_r0.15android-12.0.0_r0.7android-12.0.0_r0.41android-12.0.0_r0.35android-12.0.0_r0.25android-12.0.0_r0.15android-msm-barbet-4.19-s-v2-beta-3android-msm-barbet-4.19-s-v2-beta-1android-msm-barbet-4.19-s-qpr3-beta-3android-msm-barbet-4.19-s-qpr3-beta-2android-msm-barbet-4.19-s-beta-5android-msm-barbet-4.19-android12Landroid-msm-barbet-4.19-android12-v2-beta-2android-msm-barbet-4.19-android12-qpr3android-msm-barbet-4.19-android12-qpr1android-msm-barbet-4.19-android12
Bug: 187909050
Signed-off-by: Lucas Wei <lucaswei@google.com>
Change-Id: I6204bb96c31c0f8eebce8716c8ece3b426ef9904
-rw-r--r-- | eth-rps/Android.mk | 16 | ||||
-rw-r--r-- | eth-rps/emac_rps_settings.sh | 34 |
2 files changed, 50 insertions, 0 deletions
diff --git a/eth-rps/Android.mk b/eth-rps/Android.mk new file mode 100644 index 0000000..4bb90f4 --- /dev/null +++ b/eth-rps/Android.mk @@ -0,0 +1,16 @@ +#This makefile is only to compile EMAC for AUTO platform + +ifeq ($(TARGET_BOARD_AUTO),true) +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE := emac_rps_settings.sh +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_EXECUTABLES) +LOCAL_SRC_FILES := emac_rps_settings.sh +include $(BUILD_PREBUILT) + +endif + + diff --git a/eth-rps/emac_rps_settings.sh b/eth-rps/emac_rps_settings.sh new file mode 100644 index 0000000..6fd84e2 --- /dev/null +++ b/eth-rps/emac_rps_settings.sh @@ -0,0 +1,34 @@ +#!/vendor/bin/sh +#Copyright (c) 2019, 2021, The Linux Foundation. All rights reserved. +# +#This program is free software; you can redistribute it and/or modify +#it under the terms of the GNU General Public License version 2 and +#only version 2 as published by the Free Software Foundation. +# +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. +# +# +plateform_hana=1 +plateform_talos=2 +plateform_poipu=3 +irq_num=`cat /proc/interrupts | grep -i DWC_ETH_QOS| grep -i gic | awk {'print $1'} | awk -F : {'print $1'}`; +echo irqnum=$irq_num; +case $1 in + $plateform_hana) + echo $2 > /sys/class/net/eth0/queues/rx-0/rps_cpus; + ;; + $plateform_poipu) + echo $2 > /sys/class/net/eth0/queues/rx-0/rps_cpus; + ;; + $plateform_talos) + # Here 08 is forcing ISR to CPU 3 + echo 08 > /proc/irq/$irq_num/smp_affinity; + echo $2 > /sys/class/net/eth0/queues/rx-0/rps_cpus; + ;; + *) + echo "Invalid plateform $1"; + ;; +esac |