Skip to content

Commit

Permalink
Merge remote-tracking branch 'lineage-18.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
usertam committed Apr 19, 2022
2 parents 1bd0115 + 36c7d16 commit 8c39776
Show file tree
Hide file tree
Showing 16 changed files with 544 additions and 407 deletions.
6 changes: 0 additions & 6 deletions arch/arm64/configs/msmcortex-oqc_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,7 @@ CONFIG_MSM_TIMER_LEAP=y
CONFIG_IOMMU_IO_PGTABLE_FAST=y
# CONFIG_IOMMU_IO_PGTABLE_FAST_SELFTEST is not set
CONFIG_ARM_SMMU=y
<<<<<<< HEAD:arch/arm64/configs/msmcortex-oqc_defconfig
CONFIG_IOMMU_DEBUG=y
CONFIG_IOMMU_DEBUG_TRACKING=y
CONFIG_IOMMU_TESTS=y
CONFIG_QCOM_COMMON_LOG=y
=======
>>>>>>> 74f26eab6b40 ({chiron,sagit}_defconfig: remove various debug configs):arch/arm64/configs/chiron_defconfig
CONFIG_MSM_SMEM=y
CONFIG_QPNP_HAPTIC=y
CONFIG_MSM_SMD=y
Expand Down
28 changes: 18 additions & 10 deletions drivers/char/adsprpc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2012-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
Expand Down Expand Up @@ -298,6 +298,7 @@ struct fastrpc_mmap {
int uncached;
int secure;
uintptr_t attr;
bool is_filemap; /*flag to indicate map used in process init*/
};

struct fastrpc_perf {
Expand Down Expand Up @@ -557,9 +558,10 @@ static int fastrpc_mmap_remove(struct fastrpc_file *fl, uintptr_t va,

spin_lock(&me->hlock);
hlist_for_each_entry_safe(map, n, &me->maps, hn) {
if (map->raddr == va &&
if (map->refs == 1 && map->raddr == va &&
map->raddr + map->len == va + len &&
map->refs == 1) {
/*Remove map if not used in process initialization*/
!map->is_filemap) {
match = map;
hlist_del_init(&map->hn);
break;
Expand All @@ -572,9 +574,10 @@ static int fastrpc_mmap_remove(struct fastrpc_file *fl, uintptr_t va,
}
spin_lock(&fl->hlock);
hlist_for_each_entry_safe(map, n, &fl->maps, hn) {
if (map->raddr == va &&
if (map->refs == 1 && map->raddr == va &&
map->raddr + map->len == va + len &&
map->refs == 1) {
/*Remove map if not used in process initialization*/
!map->is_filemap) {
match = map;
hlist_del_init(&map->hn);
break;
Expand Down Expand Up @@ -712,6 +715,7 @@ static int fastrpc_mmap_create(struct fastrpc_file *fl, int fd, unsigned attr,
map->fl = fl;
map->fd = fd;
map->attr = attr;
map->is_filemap = false;
if (mflags == ADSP_MMAP_HEAP_ADDR ||
mflags == ADSP_MMAP_REMOTE_HEAP_ADDR) {
DEFINE_DMA_ATTRS(rh_attrs);
Expand Down Expand Up @@ -1901,6 +1905,8 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
if (init->filelen) {
VERIFY(err, !fastrpc_mmap_create(fl, init->filefd, 0,
init->file, init->filelen, mflags, &file));
if (file)
file->is_filemap = true;
if (err)
goto bail;
}
Expand Down Expand Up @@ -2329,11 +2335,13 @@ static int fastrpc_internal_munmap(struct fastrpc_file *fl,
VERIFY(err, !fastrpc_mmap_remove(fl, ud->vaddrout, ud->size, &map));
if (err)
goto bail;
VERIFY(err, !fastrpc_munmap_on_dsp(fl, map->raddr,
map->phys, map->size, map->flags));
if (err)
goto bail;
fastrpc_mmap_free(map);
if (map) {
VERIFY(err, !fastrpc_munmap_on_dsp(fl, map->raddr,
map->phys, map->size, map->flags));
if (err)
goto bail;
fastrpc_mmap_free(map);
}
bail:
if (err && map)
fastrpc_mmap_add(map);
Expand Down
1 change: 1 addition & 0 deletions drivers/char/diag/diag_dci.c
Original file line number Diff line number Diff line change
Expand Up @@ -3157,6 +3157,7 @@ int diag_dci_register_client(struct diag_dci_reg_tbl_t *reg_entry)
kfree(new_entry);
new_entry = NULL;
}
put_task_struct(current);
mutex_unlock(&driver->dci_mutex);
return DIAG_DCI_NO_REG;
}
Expand Down
18 changes: 9 additions & 9 deletions drivers/cpufreq/cpufreq_times.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static int uid_time_in_state_seq_show(struct seq_file *m, void *v)
if (freqs->freq_table[i] ==
CPUFREQ_ENTRY_INVALID)
continue;
seq_put_decimal_ull(m, ' ',
seq_put_decimal_ull(m, " ",
freqs->freq_table[i]);
}
}
Expand All @@ -233,15 +233,15 @@ static int uid_time_in_state_seq_show(struct seq_file *m, void *v)

hlist_for_each_entry_rcu(uid_entry, (struct hlist_head *)v, hash) {
if (uid_entry->max_state) {
seq_put_decimal_ull(m, 0, uid_entry->uid);
seq_put_decimal_ull(m, "", uid_entry->uid);
seq_putc(m, ':');
}
for (i = 0; i < uid_entry->max_state; ++i) {
u64 time;
if (freq_index_invalid(i))
continue;
time = cputime_to_clock_t(uid_entry->time_in_state[i]);
seq_put_decimal_ull(m, ' ', time);
seq_put_decimal_ull(m, " ", time);
}
if (uid_entry->max_state)
seq_putc(m, '\n');
Expand All @@ -262,13 +262,13 @@ static int concurrent_time_seq_show(struct seq_file *m, void *v,
hlist_for_each_entry_rcu(uid_entry, (struct hlist_head *)v, hash) {
atomic64_t *times = get_times(uid_entry->concurrent_times);

seq_put_decimal_ull(m, 0, (u64)uid_entry->uid);
seq_put_decimal_ull(m, "", (u64)uid_entry->uid);
seq_putc(m, ':');

for (i = 0; i < num_possible_cpus; ++i) {
u64 time = cputime_to_clock_t(atomic64_read(&times[i]));

seq_put_decimal_ull(m, ' ', time);
seq_put_decimal_ull(m, " ", time);
}
seq_putc(m, '\n');
}
Expand All @@ -286,7 +286,7 @@ static inline atomic64_t *get_active_times(struct concurrent_times *times)
static int concurrent_active_time_seq_show(struct seq_file *m, void *v)
{
if (v == uid_hash_table) {
seq_printf(m, "cpus: %d", num_possible_cpus());
seq_put_decimal_ull(m, "cpus: ", num_possible_cpus());
seq_putc(m, '\n');
}

Expand All @@ -312,18 +312,18 @@ static int concurrent_policy_time_seq_show(struct seq_file *m, void *v)
continue;
if (freqs != last_freqs) {
if (last_freqs) {
seq_printf(m, ": %d", cnt);
seq_put_decimal_ull(m, ": ", cnt);
seq_putc(m, ' ');
cnt = 0;
}
seq_printf(m, "policy%d", i);
seq_put_decimal_ull(m, "policy", i);

last_freqs = freqs;
}
cnt++;
}
if (last_freqs) {
seq_printf(m, ": %d", cnt);
seq_put_decimal_ull(m, ": ", cnt);
seq_putc(m, '\n');
}
}
Expand Down
Loading

0 comments on commit 8c39776

Please sign in to comment.