[PATCH RESEND -next] mtd: rawnand: Remove redundant dev_err call in hisi_nfc_probe()

2021-04-07 Thread Wei Li
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Wei Li --- drivers/mtd/nand/raw/hisi504_nand.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd

[PATCH RESEND -next] drm: kirin: Remove redundant dev_err call in ade_hw_ctx_alloc()

2021-04-07 Thread Wei Li
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Wei Li --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git

Re: [PATCH] arm64: mm: decrease the section size to reduce the memory reserved for the page map

2020-12-07 Thread Wei Li
; On Mon, Dec 07, 2020 at 09:35:06AM +, Marc Zyngier wrote: >>>>> On 2020-12-07 09:09, Ard Biesheuvel wrote: >>>>>> (+ Marc) >>>>>> >>>>>> On Fri, 4 Dec 2020 at 12:14, Will Deacon wrote: >>>>>>> >&

[PATCH] arm64: mm: decrease the section size to reduce the memory reserved for the page map

2020-12-03 Thread Wei Li
For the memory hole, sparse memory model that define SPARSEMEM_VMEMMAP do not free the reserved memory for the page map, decrease the section size can reduce the waste of reserved memory. Signed-off-by: Wei Li Signed-off-by: Baopeng Feng Signed-off-by: Xia Qing --- arch/arm64/include/asm

[PATCH v4] drivers/perf: Add support for ARMv8.3-SPE

2020-12-03 Thread Wei Li
. It is not possible to filter on vector length. - Incomplete predicate and empty predicate fields in the Events packet, and filtering on these events using PMSEVFR_EL1. Update the check of pmsevfr for empty/partial predicated SVE and alignment event in SPE driver. Signed-off-by: Wei Li --- v3 ->

[PATCH] MIPS: SMP-CPS: Add support for irq migration when CPU offline

2020-12-02 Thread Wei Li
it was not supported on all MIPS platforms. This patch add the support for irq migration on MIPS CPS platform, and it's tested on the interAptiv processor. Signed-off-by: Wei Li --- arch/mips/Kconfig | 1 + arch/mips/kernel/smp-cps.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch

[PATCH v3] drivers/perf: Add support for ARMv8.3-SPE

2020-11-26 Thread Wei Li
'pmsver' as cap attribute to userspace. Signed-off-by: Wei Li --- v2 -> v3: - Make the definition of 'pmsevfr_res0' progressive and easy to check. (Suggested by Will.) --- v1 -> v2: - Rename 'pmuver' to 'pmsver', change it's type to 'u16' from 'int'. (Suggested by Will and Leo.) -

[PATCH] drivers/pcmcia: Fix error return code in electra_cf_probe()

2020-11-23 Thread Wei Li
When it fails to call of_get_property(), it just jumps to 'fail1', while the 'status' which will be returned is not updated. Fixes: 2b571a066a2f ("pcmcia: CompactFlash driver for PA Semi Electra boards") Signed-off-by: Wei Li --- drivers/pcmcia/electra_cf.c | 1 + 1 file changed, 1

[PATCH] net: fs_enet: Fix incorrect IS_ERR_VALUE macro usages

2020-11-23 Thread Wei Li
rheap functions to use ulongs instead of pointers") Signed-off-by: Wei Li --- drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 2 +- drivers/net/ethernet/freescale/fs_enet/mac-scc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/

[PATCH] net/ethernet/freescale: Fix incorrect IS_ERR_VALUE macro usages

2020-11-23 Thread Wei Li
IS_ERR_VALUE macro should be used only with unsigned long type. Especially it works incorrectly with unsigned shorter types on 64bit machines. Fixes: 4c35630ccda5 ("[POWERPC] Change rheap functions to use ulongs instead of pointers") Signed-off-by: Wei Li --- drivers/net/ethernet

[PATCH] Documentation/features: Update feature lists for 5.10

2020-11-18 Thread Wei Li
dd SECCOMP_FILTER") Fixes: bdcd93ef9afb ("csky: Add context tracking support") Signed-off-by: Wei Li --- .../features/locking/queued-rwlocks/arch-support.txt | 2 +- .../features/locking/queued-spinlocks/arch-support.txt| 2 +- .../features/seccomp/secc

[PATCH] drm/msm: Fix error return code in msm_drm_init()

2020-11-16 Thread Wei Li
When it fail to create crtc_event kthread, it just jump to err_msm_uninit, while the 'ret' is not updated. So assign the return code before that. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Reported-by: Hulk Robot Signed-off-by: Wei Li --- drivers/gpu/drm/msm/msm_drv.

[PATCH] scsi: fdomain: Fix error return code in fdomain_probe()

2020-11-16 Thread Wei Li
When it fail to request_region, it just jump to 'fail_disable', while the 'ret' is not updated. So assign the return code before that. Fixes: 8674a8aa2c39 ("scsi: fdomain: Add PCMCIA support") Reported-by: Hulk Robot Signed-off-by: Wei Li --- drivers/scsi/pcmcia/fdomain_cs.c | 4 ++

[PATCH v2] drivers/perf: Add support for ARMv8.3-SPE

2020-09-30 Thread Wei Li
'pmsver' as cap attribute to userspace. Signed-off-by: Wei Li --- v1 -> v2: - Rename 'pmuver' to 'pmsver', change it's type to 'u16' from 'int'. (Suggested by Will and Leo.) - Expose 'pmsver' as cap attribute through sysfs, instead of printing. (Suggested by Will.) --- arch/arm64/incl

[PATCH] MIPS: Add the missing 'CPU_1074K' into __get_cpu_type()

2020-09-23 Thread Wei Li
Commit 442e14a2c55e ("MIPS: Add 1074K CPU support explicitly.") split 1074K from the 74K as an unique CPU type, while it missed to add the 'CPU_1074K' in __get_cpu_type(). So let's add it back. Fixes: 442e14a2c55e ("MIPS: Add 1074K CPU support explicitly.") Signed-off-by: We

[PATCH] MIPS: BCM47XX: Remove the needless check with the 1074K

2020-09-23 Thread Wei Li
As there is no known soc powered by mips 1074K in bcm47xx series, the check with 1074K is needless. So just remove it. Link: https://wireless.wiki.kernel.org/en/users/Drivers/b43/soc Fixes: 442e14a2c55e ("MIPS: Add 1074K CPU support explicitly.") Signed-off-by: Wei Li --- arch/mi

[PATCH 0/2] perf stat: Unbreak perf stat with ARMv8 PMU events

2020-09-21 Thread Wei Li
iss_rd/ 0.001416690 seconds time elapsed 0.001469000 seconds user 0.0 seconds sys Wei Li (2): perf stat: Fix segfault when counting armv8 PMU events perf stat: Unbreak perf stat with armv8 PMU events tools/lib/perf/include/in

[PATCH 1/2] perf stat: Fix segfault when counting armv8_pmu events

2020-09-21 Thread Wei Li
to mark this situation and avoid using the affinity technique when closing/enabling/disabling events. Fixes: 7736627b865d ("perf stat: Use affinity for closing file descriptors") Fixes: 704e2f5b700d ("perf stat: Use affinity for enabling/disabling events") Signed-off-by: Wei Li

[PATCH 2/2] perf stat: Unbreak perf stat with armv8_pmu events

2020-09-21 Thread Wei Li
ation. Fixes: 4804e0111662 ("perf stat: Use affinity for opening events") Signed-off-by: Wei Li --- tools/perf/builtin-stat.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-st

[PATCH] MIPS: Correct the header guard of r4k-timer.h

2020-09-17 Thread Wei Li
Rename the header guard of r4k-timer.h from __ASM_R4K_TYPES_H to __ASM_R4K_TIMER_H what corresponding with the file name. Signed-off-by: Wei Li --- arch/mips/include/asm/r4k-timer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/mips/include/asm/r4k-timer.h b

[PATCH v2] perf metric: Code cleanup with map_for_each_event()

2020-09-17 Thread Wei Li
Since we have introduced map_for_each_event() to walk the 'pmu_events_map', clean up metricgroup__print() and metricgroup__has_metric() with it. Signed-off-by: Wei Li Acked-by: Namhyung Kim --- v1 -> v2: - Move map_for_each_metric() after match_metric() to avoid potential use-before-decl

[PATCH net v2] hinic: fix potential resource leak

2020-09-17 Thread Wei Li
In rx_request_irq(), it will just return what irq_set_affinity_hint() returns. If it is failed, the napi and irq requested are not freed properly. So add exits for failures to handle these. Signed-off-by: Wei Li --- v1 -> v2: - Free irq as well when irq_set_affinity_hint() fails. --- driv

[PATCH] Revert "perf report: Treat an argument as a symbol filter"

2020-09-16 Thread Wei Li
user (e.g. missing -i for perf.data). As we can use "--symbol-filter=" if we really want to filter a symbol, it may be better to revert this misfeature. Signed-off-by: Wei Li --- tools/perf/builtin-report.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH] hinic: fix potential resource leak

2020-09-16 Thread Wei Li
In rx_request_irq(), it will just return what irq_set_affinity_hint() returns. If it is failed, the napi added is not deleted properly. Add a common exit for failures to do this. Signed-off-by: Wei Li --- drivers/net/ethernet/huawei/hinic/hinic_rx.c | 19 --- 1 file changed, 12

[PATCH] perf metric: Code cleanup with map_for_each_event()

2020-09-16 Thread Wei Li
Since we have introduced map_for_each_event() to walk the 'pmu_events_map', clean up metricgroup__print() and metricgroup__has_metric() with it. Signed-off-by: Wei Li --- tools/perf/util/metricgroup.c | 33 + 1 file changed, 13 insertions(+), 20 deletions

[PATCH] perf record: Correct the help info of option "--no-bpf-event"

2020-08-18 Thread Wei Li
The help info of option "--no-bpf-event" is wrongly described as "record bpf events", correct it. Fixes: 71184c6ab7e6 ("perf record: Replace option --bpf-event with --no-bpf-event") Signed-off-by: Wei Li --- tools/perf/builtin-record.c | 2 +- 1 file chang

[PATCH v2] arm64: mm: free unused memmap for sparse memory model that define VMEMMAP

2020-08-11 Thread Wei Li
For the memory hole, sparse memory model that define SPARSEMEM_VMEMMAP do not free the reserved memory for the page map, this patch do it. Signed-off-by: Wei Li Signed-off-by: Chen Feng Signed-off-by: Xia Qing v2: fix the patch v1 compile errors that are not based on the latest mainline

[PATCH 1/4] drivers/perf: Add support for ARMv8.3-SPE

2020-07-24 Thread Wei Li
. It is not possible to filter on vector length. - Incomplete predicate and empty predicate fields in the Events packet, and filtering on these events using PMSEVFR_EL1. Update the check of pmsevfr for empty/partial predicated SVE and alignment event in kernel driver. Signed-off-by: Wei Li --- arch/arm64

[PATCH 0/4] Add support for ARMv8.3-SPE

2020-07-24 Thread Wei Li
packet and Operation Type packet in perf tool. Patch 3-4: Synthesize unaligned address access events and partial/empty predicated SVE events, also add two itrace options for filtering. Wei Li (4): drivers/perf: Add support for ARMv8.3-SPE perf: arm-spe: Add support for ARMv8.3-SPE perf

[PATCH 2/4] perf: arm-spe: Add support for ARMv8.3-SPE

2020-07-24 Thread Wei Li
. It is not possible to filter on vector length. - Incomplete predicate and empty predicate fields in the Events packet, and filtering on these events using PMSEVFR_EL1. Add the corresponding decode process of Events packet and Operation Type packet in perf tool. Signed-off-by: Wei Li --- .../arm-spe

[PATCH 4/4] perf: arm-spe: Synthesize new events for ARMv8.3-SPE

2020-07-24 Thread Wei Li
Synthesize unaligned address access events and partial/empty predicated SVE operation introduced by ARMv8.3-SPE. They can be filtered by itrace options when reporting. Signed-off-by: Wei Li --- .../util/arm-spe-decoder/arm-spe-decoder.c| 11 .../util/arm-spe-decoder/arm-spe-decoder.h

[PATCH 3/4] perf auxtrace: Add new itrace options for ARMv8.3-SPE

2020-07-24 Thread Wei Li
This patch is to add two options to synthesize events which are described as below: 'u': synthesize unaligned address access events 'v': synthesize partial/empty predicated SVE events This two options will be used by ARM SPE as their first consumer. Signed-off-by: Wei Li --- tools/perf

[PATCH] perf: arm-spe: Fix check error when synthesizing events

2020-07-24 Thread Wei Li
In arm_spe_read_record(), when we are processing an events packet, 'decoder->packet.index' is the length of payload, which has been transformed in payloadlen(). So correct the check of 'idx'. Signed-off-by: Wei Li --- tools/perf/util/arm-spe-decoder/arm-spe-decoder.c | 6 +++--- 1 file chan

[PATCH v2 2/2] perf tools: ARM SPE code cleanup

2020-07-24 Thread Wei Li
far it only supports "statistical-profiling-extension-v1" and we have no chance to use multiple SPE's PMU events in Perf command. So remove the useless check code to make it clear. Signed-off-by: Wei Li --- tools/perf/arch/arm/util/auxtrace.c | 9 - 1 file changed, 4 insertions(

[PATCH v2 0/2] perf tools: Fix record failure when mixed with ARM SPE event

2020-07-24 Thread Wei Li
v1 -> v2: - Optimize code in patch 1 as Mathieu adviced. - Fix memleak in patch 2. - Detail the commit info to explain the reason. This patch set fixes perf record failure when we mix arm_spe_x event with other events in specific order. Wei Li (2): perf tools: Fix record failure when mi

[PATCH v2 1/2] perf tools: Fix record failure when mixed with ARM SPE event

2020-07-24 Thread Wei Li
ols: Add ARM Statistical Profiling Extensions (SPE) support") Signed-off-by: Wei Li --- tools/perf/arch/arm/util/auxtrace.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c index 0a6e75b8777a.

[PATCH] arm64: mm: free unused memmap for sparse memory model that define VMEMMAP

2020-07-21 Thread Wei Li
For the memory hole, sparse memory model that define SPARSEMEM_VMEMMAP do not free the reserved memory for the page map, this patch do it. Signed-off-by: Wei Li Signed-off-by: Chen Feng Signed-off-by: Xia Qing --- arch/arm64/mm/init.c | 81

[PATCH 2/2] perf tools: Fix record failure when mixed with ARM SPE event

2020-06-23 Thread Wei Li
: ffd3d18c20b8d ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support") Signed-off-by: Wei Li --- tools/perf/arch/arm/util/auxtrace.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtra

[PATCH 0/2] perf tools: Fix record failure when mixed with ARM SPE event

2020-06-23 Thread Wei Li
This patch set fixes perf record failure when we mix arm_spe_x event with other events in specific order. Wei Li (2): perf tools: ARM SPE code cleanup perf tools: Fix record failure when mixed with ARM SPE event tools/perf/arch/arm/util/auxtrace.c | 16 +++- 1 file changed, 11

[PATCH 1/2] perf tools: ARM SPE code cleanup

2020-06-23 Thread Wei Li
Remove the useless check code to make it clear. Signed-off-by: Wei Li --- tools/perf/arch/arm/util/auxtrace.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c index 0a6e75b8777a..62b7b03d691a

[PATCH] perf list: Fix memleak in print_sdt_events()

2020-06-20 Thread Wei Li
blocks Signed-off-by: Wei Li --- tools/perf/util/parse-events.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 3decbb203846..b2acacd5646e 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf

[PATCH] perf report TUI: Fix segmentation fault in perf_evsel__hists_browse()

2020-06-12 Thread Wei Li
->he_selection when accessing it's member res_samples in perf_evsel__hists_browse(). These processes are meaningful for specified samples, so we can skip these when nothing is selected. Fixes: 4968ac8fb7c3 ("perf report: Implement browsing of individual samples") Signed-off-by: Wei Li ---

[PATCH 0/4] perf: Fix memory errors

2020-05-21 Thread Wei Li
Fix several memory errors in perf tool. Hongbo Yao (1): perf metrictroup: Fix memory leak of metric_events Li Bin (2): perf svghelper: Fix memory leak in svg_build_topology_map perf util: Fix potential segment fault in put_tracepoints_path Xie XiuQi (1): perf util: Fix memory leak of

[PATCH 4/4] perf util: Fix potential segment fault in put_tracepoints_path

2020-05-21 Thread Wei Li
From: Li Bin This patch fix potential segment fault triggerd in put_tracepoints_path when the address of the local variable 'path' be freed in error path of record_saved_cmdline. Signed-off-by: Li Bin --- tools/perf/util/trace-event-info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 1/4] perf metrictroup: Fix memory leak of metric_events

2020-05-21 Thread Wei Li
From: Hongbo Yao Fix memory leak of metric_events in function metricgroup__setup_events() Signed-off-by: Hongbo Yao --- tools/perf/util/metricgroup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c index

[PATCH 3/4] perf util: Fix memory leak of prefix_if_not_in

2020-05-21 Thread Wei Li
From: Xie XiuQi Need to free "str" before return when asprintf() failed to avoid memory leak. Signed-off-by: Xie XiuQi --- tools/perf/util/sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c index

[PATCH 2/4] perf svghelper: Fix memory leak in svg_build_topology_map

2020-05-21 Thread Wei Li
From: Li Bin Fix leak of memory pointed to by t.sib_thr and t.sib_core in svg_build_topology_map. Signed-off-by: Li Bin --- tools/perf/util/svghelper.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/svghelper.c b/tools/perf/util/svghelper.c

[PATCH v3] kdb: Remove the misfeature 'KDBFLAGS'

2020-05-21 Thread Wei Li
that 'KDBFLAGS' is a misfeature. So let's replace 'KDBFLAGS' with 'KDBDEBUG' to just show the value we wrote into. After this modification, we can use `md4c1 kdb_flags` instead, to observe the state flags. Suggested-by: Daniel Thompson Signed-off-by: Wei Li --- v2 -> v3: - Change to replace the internal

[PATCH v2] kdb: Make the internal env 'KDBFLAGS' undefinable

2020-05-16 Thread Wei Li
'KDBFLAGS' is an internal variable of kdb, it is combined by 'KDBDEBUG' and state flags. But the user can define an environment variable named 'KDBFLAGS' too, so let's make it undefinable to avoid confusion. Signed-off-by: Wei Li Reviewed-by: Douglas Anderson --- v1 -> v2: - Fix lack of bra

[PATCH] perf timechart: Remove redundant assignment

2020-05-11 Thread Wei Li
Remove redundant assignment, no functional change. Signed-off-by: Wei Li --- tools/perf/builtin-timechart.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/perf/builtin-timechart.c b/tools/perf/builtin-timechart.c index 9e84fae9b096..5e4f809d7e5d 100644 --- a/tools/perf/builtin

[PATCH] kdb: Make the internal env 'KDBFLAGS' undefinable

2020-05-10 Thread Wei Li
'KDBFLAGS' is an internal variable of kdb, it is combined by 'KDBDEBUG' and state flags. But the user can define an environment variable named 'KDBFLAGS' too, so let's make it undefinable to avoid confusion. Signed-off-by: Wei Li --- kernel/debug/kdb/kdb_main.c | 3 ++- 1 file changed, 2

[PATCH 0/4] arm64: kgdb/kdb: Fix single-step debugging issues

2020-05-09 Thread Wei Li
trap detection", https://www.spinics.net/lists/arm-kernel/msg803741.html Wei Li (4): arm64: kgdb: Fix single-step exception handling oops arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag() arm64: kgdb: Fix single-stepping into the irq handler wrongly arm64:

[PATCH 2/4] arm64: Extract kprobes_save_local_irqflag() and kprobes_restore_local_irqflag()

2020-05-09 Thread Wei Li
as kernel_prepare_single_step() and kernel_cleanup_single_step() for general use. Signed-off-by: Wei Li --- arch/arm64/include/asm/debug-monitors.h | 4 arch/arm64/kernel/debug-monitors.c | 26 +++ arch/arm64/kernel/probes/kprobes.c | 28 ++--- 3 files changed, 32

[PATCH 3/4] arm64: kgdb: Fix single-stepping into the irq handler wrongly

2020-05-09 Thread Wei Li
iwei/main_code/linux/kernel/printk/printk.c:2076 2076{ (gdb) stepi 0xffff800010148750 2076{ (gdb) Fixes: 44679a4f142b ("arm64: KGDB: Add step debugging support") Signed-off-by: Wei Li --- arch/arm64/kernel/kgdb.c | 13 +++-- 1 file changed, 11 insertions(+), 2 de

[PATCH 4/4] arm64: kgdb: Set PSTATE.SS to 1 to reenable single-step

2020-05-09 Thread Wei Li
2076{ (gdb) stepi 0x800010148750 2076{ (gdb) stepi 2080va_start(args, fmt); (gdb) stepi 0x800010148758 2080va_start(args, fmt); (gdb) Fixes: 44679a4f142b ("arm64: KGDB: Add step debugging support") Signed-off-by: Wei Li --- arch/arm

[PATCH 1/4] arm64: kgdb: Fix single-step exception handling oops

2020-05-09 Thread Wei Li
on processor 0 due to SS trap @ 0x800010082ab8 [0]kdb> Fixes: 44679a4f142b ("arm64: KGDB: Add step debugging support") Signed-off-by: Wei Li --- arch/arm64/kernel/kgdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/kgdb.c b/arch/arm64/kernel/kgd

[PATCH] perf symbols: Don't split kernel symbols when using kallsyms

2019-09-29 Thread Wei Li
[k] 0xc1f738a4 3.08% sleep[unknown] [k] 0xc21a1ef8 3.05% sleep[unknown] [k] 0xc1f7109c 3.02% sleep[unknown] [k] 0xc1f59520 2.99% sleep[unknown] [k] 0xc23f54d4 ... Signed-off-by: Wei Li --- tools/perf/uti

[PATCH] clocksource/arm_arch_timer: mark arch_timer_read_counter() as notrace to avoid deadloop

2019-06-11 Thread Wei Li
arch_counter_get_cntvct+16 ... Fixes: 0ea415390cd3 ("clocksource/arm_arch_timer: Use arch_timer_read_counter to access stable counters") Signed-off-by: Wei Li --- drivers/clocksource/arm_arch_timer.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/c

[PATCH] ftrace: fix NULL pointer dereference in free_ftrace_func_mapper()

2019-06-05 Thread Wei Li
eption ]--- Signed-off-by: Wei Li --- kernel/trace/ftrace.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index a12aff849c04..7e2488da69ac 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -4221,10 +4221,13 @

[PATCH v2] fix use-after-free in perf_sched__lat

2019-05-08 Thread Wei Li
il all threads have been deleted. This can be reproduced by following steps: ulimit -c unlimited export MALLOC_MMAP_THRESHOLD_=0 perf sched record sleep 10 perf sched latency --sort max Segmentation fault (core dumped) Signed-off-by: Zhipeng Xie Signed-off-b

[PATCH 1/3] arm64: Add pseudo NMI support of GICv3 SGIs

2019-05-06 Thread Wei Li
the gic_enable_nmi_support() earlier to make the gic_supports_nmi() check works in gic_cpu_init(). Signed-off-by: Wei Li Cc: Julien Thierry --- arch/arm64/include/asm/smp.h | 2 ++ arch/arm64/kernel/smp.c| 4 +++ drivers/irqchip/irq-gic-v3.c | 46

[PATCH 2/3] arm64: Add support for on-demand backtrace of other CPUs

2019-05-06 Thread Wei Li
To support backtracing of other CPUs in the system on lockups, add the implementation of arch_trigger_cpumask_backtrace() for arm64. In this patch, we add an arm64 NMI-like IPI based backtracer, referring to the implementation on arm by Russell King and Chris Metcalf. Signed-off-by: Wei Li

[PATCH 0/3] arm64: Add support for on-demand backtrace by NMI-like IPI

2019-05-06 Thread Wei Li
] [ 272.195600] kthread+0x100/0x130 [ 272.195638] ret_from_fork+0x10/0x18 Wei Li (3): arm64: Add pseudo NMI support of GICv3 SGIs arm64: Add support for on-demand backtrace of other CPUs arm64: Avoid entering NMI context improperly arch/arm64/include/asm/arch_gicv3.h| 8 arch

[PATCH 3/3] arm64: Avoid entering NMI context improperly

2019-05-06 Thread Wei Li
-off-by: Wei Li --- arch/arm64/include/asm/arch_gicv3.h | 8 arch/arm64/kernel/smp.c | 14 -- drivers/irqchip/irq-gic-v3.c| 8 +--- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/arch/arm64/include/asm/arch_gicv3.h b/arch/arm64

[PATCH] fix use-after-free in perf_sched__lat

2019-05-02 Thread Wei Li
il all threads have been deleted. This can be reproduced by following steps: ulimit -c unlimited export MALLOC_MMAP_THRESHOLD_=0 perf sched record sleep 10 perf sched latency --sort max Segmentation fault (core dumped) Signed-off-by: Zhipeng Xie Signed-off-b

[RFC PATCH] arm64: irqflags: fix incomplete save & restore

2019-04-03 Thread Wei Li
rq can never be processed and leading to hang. In this patch, we do the save & restore exactly, and make sure the arch_irqs_disabled_flags() returns correctly. Fix: commit 4a503217ce37 ("arm64: irqflags: Use ICC_PMR_EL1 for interrupt masking") Signed-off-by: Wei Li --- ar

[tip:perf/urgent] perf machine: Update kernel map address and re-order properly

2019-03-29 Thread tip-bot for Wei Li
Commit-ID: 977c7a6d1e263ff1d755f28595b99e4bc0c48a9f Gitweb: https://git.kernel.org/tip/977c7a6d1e263ff1d755f28595b99e4bc0c48a9f Author: Wei Li AuthorDate: Thu, 28 Feb 2019 17:20:03 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 28 Mar 2019 14:41:21 -0300 perf machine

[PATCH] arm64: gic-v3: fix unexpected overwrite of spi/ppi/sgi prio

2019-03-26 Thread Wei Li
Signed-off-by: Wei Li --- drivers/irqchip/irq-gic.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index fd3110c171ba..5928c4338b28 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c

[PATCH] perf machine: Update kernel map address and re-order properly

2019-02-28 Thread Wei Li
id-list -i perf.data 28a6c690262896dbd1b5e1011ed81623e6db0610 [kernel.kallsyms] 106c14ce6e4acea3453e484dc604d6f08a2f [vdso] [root@localhost tools]# ./perf/perf buildid-list -i perf.data -H 28a6c690262896dbd1b5e1011ed81623e6db0610 /proc/kcore Signed-off-by: Wei Li --- tools/perf/util/machine.c | 32

[tip:perf/core] perf annotate: Fix getting source line failure

2019-02-27 Thread tip-bot for Wei Li
Commit-ID: 11db1ad4513d6205d2519e1a30ff4cef746e3243 Gitweb: https://git.kernel.org/tip/11db1ad4513d6205d2519e1a30ff4cef746e3243 Author: Wei Li AuthorDate: Thu, 21 Feb 2019 17:57:16 +0800 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 21 Feb 2019 17:00:35 -0300 perf annotate: Fix

[PATCH] perf: fix getting source line failure in annotate

2019-02-21 Thread Wei Li
ax common_while_1.c:64.54 : 626: add$0x1,%eax 4.73 : 629: mov%eax,-0x4(%rbp) common_while_1.c:6 19.54 : 62c: mov-0x4(%rbp),%eax common_while_1.c:64.54 : 62f: cmp$0xfff,%eax ... Fixes: 425859ff0de33 ("perf annotate: No need to calculate n

[PATCH] arm64: fix potential deadlock in arm64-provide-pseudo-NMI-with-GICv3

2019-01-29 Thread Wei Li
or some issues else: do_sp_pc_abort <- el0_sp_pc do_el0_ia_bp_hardening <- el0_ia kgdb_roundup_cpus <- el1_dbg Signed-off-by: Wei Li --- arch/arm64/kernel/kgdb.c | 4 arch/arm64/mm/fault.c| 6 ++ 2 files changed, 10 insertions(+) diff --git a/a

[PATCH] driver-core: remove lock for platform devices during probe

2017-04-23 Thread Wei Li
During driver probe procedure, lock on the parent of platform devices could be removed to make probe in parallel. Signed-off-by: Wei Li <we...@codeaurora.org> --- drivers/base/dd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/base/dd.c b/drivers/bas

[PATCH] driver-core: remove lock for platform devices during probe

2017-04-23 Thread Wei Li
During driver probe procedure, lock on the parent of platform devices could be removed to make probe in parallel. Signed-off-by: Wei Li --- drivers/base/dd.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index a1fbf55..e238fbc