Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,3 +118,6 @@ all.config

# fetched Android config fragments
kernel/configs/android-*.cfg

drivers/net/wireguard/crypto/zinc/chacha20/chacha20-arm64.S
drivers/net/wireguard/crypto/zinc/poly1305/poly1305-arm64.S
11 changes: 10 additions & 1 deletion arch/arm64/configs/checkers_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ CONFIG_GTP9XX_SLEEP_MODE=y
CONFIG_INPUT_MISC=y
CONFIG_INPUT_UINPUT=y
CONFIG_INPUT_HALL_BU520=y
# CONFIG_VT is not set
CONFIG_LEGACY_PTY_COUNT=16
# CONFIG_DEVMEM is not set
# CONFIG_DEVKMEM is not set
Expand Down Expand Up @@ -388,3 +387,13 @@ CONFIG_CRYPTO_LZ4=y
# CONFIG_CRYPTO_HW is not set
CONFIG_CRYPTO_SHA2_ARM64_CE=y
CONFIG_CRYPTO_AES_ARM64_CE_BLK=y

## akku fix
## kallsyms failure: relative symbol value 0xffffff8008081000 out of range in relative mode
CONFIG_KALLSYMS=n

CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FONTS=y
CONFIG_FONT_8x16=y
8 changes: 4 additions & 4 deletions arch/arm64/kernel/vdso/gettimeofday.S
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ x_tmp .req x8
9998:
.endm

.macro clock_gettime_return, shift=0
.macro clock_gettime_return shift=0
.if \shift == 1
lsr x11, x11, x12
.endif
Expand Down Expand Up @@ -220,7 +220,7 @@ realtime:
get_clock_shifted_nsec res=x15, cycle_last=x10, mult=x11
get_ts_realtime res_sec=x10, res_nsec=x11, \
clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9
clock_gettime_return, shift=1
clock_gettime_return shift=1

ALIGN
monotonic:
Expand All @@ -243,7 +243,7 @@ monotonic:
clock_nsec=x15, xtime_sec=x13, xtime_nsec=x14, nsec_to_sec=x9

add_ts sec=x10, nsec=x11, ts_sec=x3, ts_nsec=x4, nsec_to_sec=x9
clock_gettime_return, shift=1
clock_gettime_return shift=1

ALIGN
monotonic_raw:
Expand All @@ -264,7 +264,7 @@ monotonic_raw:
clock_nsec=x15, nsec_to_sec=x9

add_ts sec=x10, nsec=x11, ts_sec=x13, ts_nsec=x14, nsec_to_sec=x9
clock_gettime_return, shift=1
clock_gettime_return shift=1

ALIGN
realtime_coarse:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,18 +263,25 @@ Return: Returns the number of key. If you go wrong, return a negative number.
*************************************************************/
int ini_get_key_data(char *filedata)
{
char buf1[MAX_CFG_BUF + 1] = {0};
char *buf1 = kzalloc(MAX_CFG_BUF + 1, GFP_KERNEL);
int n = 0;
int ret = 0;
int dataoff = 0;
int iEqualSign = 0;
int i = 0;
char tmsection_name[MAX_CFG_BUF + 1] = {0};
char *tmsection_name = kzalloc(MAX_CFG_BUF + 1, GFP_KERNEL);
if (!buf1) return -ENOMEM;
if (!tmsection_name) {
kfree(buf1);
return -ENOMEM;
}

FTS_TEST_FUNC_ENTER();
ret = init_key_data();
if (ret < 0) {
FTS_TEST_ERROR("init key data failed");
kfree(buf1);
kfree(tmsection_name);
return -1;
}

Expand Down Expand Up @@ -357,11 +364,15 @@ int ini_get_key_data(char *filedata)

FTS_TEST_FUNC_EXIT();

kfree(buf1);
kfree(tmsection_name);
return 0;

cfg_scts_end:

FTS_TEST_FUNC_EXIT();
kfree(buf1);
kfree(tmsection_name);
return ret;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1606,9 +1606,9 @@ unsigned char FT5X46_TestItem_WeakShortTest( bool *bTestResult )
if ((iMin_CG > fGShortResistance[i]) || (iDsen - iDoffset < 0)) { //<=0 ShortResistance = 0
iCount++;
if (i + 1 <= iMaxTx)
FTS_TEST_SAVE_INFO("\nTx%02d: %02d (k��), ", i + 1, fGShortResistance[i]);
FTS_TEST_SAVE_INFO("\nTx%02d: %02d (kohm), ", i + 1, fGShortResistance[i]);
else
FTS_TEST_SAVE_INFO("\nRx%02d: %02d (k��), ", i + 1 - iMaxTx, fGShortResistance[i]);
FTS_TEST_SAVE_INFO("\nRx%02d: %02d (kohm), ", i + 1 - iMaxTx, fGShortResistance[i]);
if (iCount % 10 == 0)
FTS_TEST_SAVE_INFO("\n\n");
}
Expand Down Expand Up @@ -1660,9 +1660,9 @@ unsigned char FT5X46_TestItem_WeakShortTest( bool *bTestResult )
if ( fMShortResistance[i] <= 0 || fMShortResistance[i] < iMin_CC ) {
iCount++;
if (i + 1 <= iMaxTx)
FTS_TEST_SAVE_INFO("\nTx%02d: %02d(k��), ", i + 1, fMShortResistance[i]);
FTS_TEST_SAVE_INFO("\nTx%02d: %02d(kohm), ", i + 1, fMShortResistance[i]);
else
FTS_TEST_SAVE_INFO("\nRx%02d: %02d(k��), ", i + 1 - iMaxTx, fMShortResistance[i]);
FTS_TEST_SAVE_INFO("\nRx%02d: %02d(kohm), ", i + 1 - iMaxTx, fMShortResistance[i]);

if (iCount % 10 == 0)
FTS_TEST_SAVE_INFO("\n\n");
Expand Down
12 changes: 0 additions & 12 deletions drivers/misc/mediatek/base/power/mt8163/cpu_dormant.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,29 @@

.global write_cntpctl
write_cntpctl:
.func
msr CNTP_CTL_EL0, x0
ret
.endfunc

.global read_cntpctl
read_cntpctl:
.func
mrs x0, CNTP_CTL_EL0
ret
.endfunc

.global read_cpu_id
read_cpu_id:
.func
mrs x0, MPIDR_EL1
ands x0, x0, #0xff
ret
.endfunc

.global read_cluster_id
read_cluster_id:
.func
mrs x0, MPIDR_EL1
lsr x0, x0, #0x8
ands x0, x0, #0xff
ret
.endfunc

.global mt_save_generic_timer
mt_save_generic_timer:
.func
mrs x3, CNTKCTL_EL1
str x3, [x0, #0]
mrs x2, CNTP_CTL_EL0
Expand All @@ -54,11 +45,9 @@ mt_save_generic_timer:
mrs x3, CNTV_TVAL_EL0
stp x2, x3, [x0, #24]!
ret
.endfunc

.global mt_restore_generic_timer
mt_restore_generic_timer:
.func
ldr x3, [x0, #0]
msr CNTKCTL_EL1, x3
ldp x2, x3, [x0, #8]
Expand All @@ -68,4 +57,3 @@ mt_restore_generic_timer:
msr CNTV_CTL_EL0, x2
msr CNTV_TVAL_EL0, x3
ret
.endfunc
2 changes: 2 additions & 0 deletions drivers/misc/mediatek/cmdq/v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# common driver code for CMDQ
# 72/82/92 does not use this common code

ccflags-y += -Wno-typedef-redefinition

ccflags-y += -I$(srctree)/drivers/misc/mediatek/cmdq/v2/$(MTK_PLATFORM) \
-I$(srctree)/drivers/misc/mediatek/smi/ \
-I$(srctree)/drivers/misc/mediatek/mmp/ \
Expand Down
4 changes: 2 additions & 2 deletions drivers/misc/mediatek/cmdq/v2/cmdq_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -4621,8 +4621,8 @@ static ssize_t cmdq_write_test_proc_config(struct file *file,

#ifdef CMDQ_USE_CCF
if (trick_test) {
char node_name[25];
char clk_name[20];
char node_name[26];
char clk_name[21];
int clk_enable = 0;
struct clk *clk_module;
/* trick to control clock by test node for testing */
Expand Down
3 changes: 3 additions & 0 deletions drivers/misc/mediatek/cmdq/v2/mtee/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

# drivers/cmdq

ccflags-y += -Wno-typedef-redefinition \
-Wno-implicit-enum-enum-cast

ccflags-y += -I$(srctree)/drivers/misc/mediatek/cmdq/v2 \
-I$(srctree)/drivers/misc/mediatek/m4u/$(MTK_PLATFORM)\
-I$(srctree)/drivers/misc/mediatek/mach/$(MTK_PLATFORM)/include \
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/gpu/ged/src/ged_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ long ged_get_pid(void)
#endif
}

unsigned long long ged_get_time()
unsigned long long ged_get_time(void)
{
unsigned long long temp;

Expand Down
2 changes: 0 additions & 2 deletions drivers/misc/mediatek/gpu/ged/src/ged_dvfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ static int g_VsyncOffsetLevel;

static int g_probe_pid = GED_NO_UM_SERVICE;

typedef void (*gpufreq_input_boost_notify)(unsigned int);

extern void mt_gpufreq_input_boost_notify_registerCB(gpufreq_input_boost_notify pCB);
extern void mt_gpufreq_power_limit_notify_registerCB(gpufreq_power_limit_notify pCB);
extern void (*mtk_boost_gpu_freq_fp)(void);
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/gpu/ged/src/ged_monitor_3D_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void ged_monitor_3D_fence_work_cb(struct work_struct *psWork)
ged_free(psMonitor, sizeof(GED_MONITOR_3D_FENCE));
}

unsigned long ged_monitor_3D_fence_done_time()
unsigned long ged_monitor_3D_fence_done_time(void)
{
return g_ul3DFenceDoneTime;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
*
*/


/* 71 | return u64_to_user_ptr(p); */
#pragma clang diagnostic ignored "-Wdefault-const-init-var-unsafe"

#if defined(CONFIG_DMA_SHARED_BUFFER)
#include <linux/dma-buf.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/hwmon/hwmsen/hwmsen_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ static int hwmsen_enable(struct hwmdev_object *obj, int sensor, int enable)

}

} else if ((enable == 0)) {
} else if (enable == 0) {


obj->active_data_sensor &= ~sensor_type;
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/leds/mtk_leds_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <mtk_leds_hal.h>
#include <mtk_leds_drv.h>
#include "mtk_leds_drv.h"
#include <mt-plat/mtk_pwm.h>
#ifdef CONFIG_MTK_AAL_SUPPORT
#include <ddp_aal.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/m4u/mt8163/m4u.c
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ static struct page *m4u_cache_get_page(unsigned long va)

start = va & (~M4U_PAGE_MASK);
pa = m4u_user_v2p(start);
if ((pa == 0)) {
if (pa == 0) {
M4UMSG("error m4u_get_phys user_v2p return 0 on va=0x%lx\n",
start);
/* dump_page(page); */
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/m4u/mt8163/m4u_mva.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define MVAGRAPH_INDEX(mva) (mva>>MVA_BLOCK_SIZE_ORDER)


static short mvaGraph[MVA_MAX_BLOCK_NR + 1];
static unsigned short mvaGraph[MVA_MAX_BLOCK_NR + 1];
static void *mvaInfoGraph[MVA_MAX_BLOCK_NR + 1];
static DEFINE_SPINLOCK(gMvaGraph_lock);

Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/mtee/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# inconsistent state and crashed.
KCOV_INSTRUMENT_tz_system.o := n

ccflags-y += -Werror
ccflags-y += -Werror -Wno-typedef-redefinition
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat/trustzone

obj-y += tz_module.o
Expand Down
2 changes: 1 addition & 1 deletion drivers/misc/mediatek/rtc/mt6323/mtk_rtc_hal.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

//#include <mtk_rtc_hal.h>
#include <mtk_rtc_hal_common.h>
#include <mtk_rtc_hw.h>
#include "mtk_rtc_hw.h"
#if defined CONFIG_MTK_KERNEL_POWER_OFF_CHARGING
#include <mtk_boot.h>
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();


}
Expand Down Expand Up @@ -122,7 +122,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();

}
return 0;
Expand Down Expand Up @@ -159,7 +159,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();

}
return 0;
Expand Down Expand Up @@ -196,7 +196,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();

}
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();
}
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();

}
return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();
}
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();
}
return 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();
}

return 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ struct thermal_cooling_device *cdev, unsigned long state)
/* To trigger data abort to reset the system
* for thermal protection.
*/
*(unsigned int *)0x0 = 0xdead;
__builtin_trap();
}

return 0;
Expand Down
Loading