* Re: [PATCH v1 06/11] powerpc/code-patching: Fix patch_branch() return on out-of-range failure
From: Christophe Leroy @ 2021-12-22 13:16 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
In-Reply-To: <8540cb64b1f06710eaf41e3835c7ba3e21fa2b05.1638446239.git.christophe.leroy@csgroup.eu>
Le 02/12/2021 à 13:00, Christophe Leroy a écrit :
> Do not silentely ignore a failure of create_branch() in
> patch_branch(). Return -ERANGE.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
From
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/4940b03de220d1dfe2c6b47a41e60925497ce125.1630657331.git.christophe.leroy@csgroup.eu/
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
> ---
> arch/powerpc/lib/code-patching.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c
> index a43ca22313ee..e7a2a41ae8eb 100644
> --- a/arch/powerpc/lib/code-patching.c
> +++ b/arch/powerpc/lib/code-patching.c
> @@ -191,7 +191,9 @@ int patch_branch(u32 *addr, unsigned long target, int flags)
> {
> ppc_inst_t instr;
>
> - create_branch(&instr, addr, target, flags);
> + if (create_branch(&instr, addr, target, flags))
> + return -ERANGE;
> +
> return patch_instruction(addr, instr);
> }
>
>
^ permalink raw reply
* [PATCH] powerpc/32: Fix boot failure with GCC latent entropy plugin
From: Christophe Leroy @ 2021-12-22 13:07 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman
Cc: Erhard Furtner, linux-kernel@vger.kernel.org,
stable@vger.kernel.org, Emese Revfy,
linuxppc-dev@lists.ozlabs.org
Boot fails with GCC latent entropy plugin enabled.
This is due to early boot functions trying to access 'latent_entropy'
global data while the kernel is not relocated at its final
destination yet.
As there is no way to tell GCC to use PTRRELOC() to access it,
disable latent entropy plugin in early_32.o and feature-fixups.o and
code-patching.o
Reported-by: Erhard Furtner <erhard_f@mailbox.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215217
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Fixes: 38addce8b600 ("gcc-plugins: Add latent_entropy plugin")
Cc: stable@vger.kernel.org
Cc: Emese Revfy <re.emese@gmail.com>
---
arch/powerpc/kernel/Makefile | 1 +
arch/powerpc/lib/Makefile | 3 +++
2 files changed, 4 insertions(+)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 5fa68c2ef1f8..36f3f5a8868d 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -11,6 +11,7 @@ CFLAGS_prom_init.o += -fPIC
CFLAGS_btext.o += -fPIC
endif
+CFLAGS_early_32.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
CFLAGS_cputable.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
CFLAGS_prom_init.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
CFLAGS_btext.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
index 9e5d0f413b71..0b08e85d3839 100644
--- a/arch/powerpc/lib/Makefile
+++ b/arch/powerpc/lib/Makefile
@@ -19,6 +19,9 @@ CFLAGS_code-patching.o += -DDISABLE_BRANCH_PROFILING
CFLAGS_feature-fixups.o += -DDISABLE_BRANCH_PROFILING
endif
+CFLAGS_code-patching.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
+CFLAGS_feature-fixups.o += $(DISABLE_LATENT_ENTROPY_PLUGIN)
+
obj-y += alloc.o code-patching.o feature-fixups.o pmem.o test_code-patching.o
ifndef CONFIG_KASAN
--
2.33.1
^ permalink raw reply related
* Re: [PATCH 4/4] powerpc/perf: Add data source encodings for power10 platform
From: Arnaldo Carvalho de Melo @ 2021-12-22 12:41 UTC (permalink / raw)
To: Kajol Jain
Cc: mark.rutland, atrajeev, ak, daniel, rnsastry, peterz,
linux-kernel, ast, linux-perf-users, alexander.shishkin, yao.jin,
mingo, paulus, maddy, jolsa, namhyung, songliubraving,
linuxppc-dev, kan.liang
In-Reply-To: <20211206091749.87585-5-kjain@linux.ibm.com>
Em Mon, Dec 06, 2021 at 02:47:49PM +0530, Kajol Jain escreveu:
> The code represent memory/cache level data based on PERF_MEM_LVL_*
> namespace, which is in the process of deprication in the favour of
> newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_,HOPS_} fields.
> Add data source encodings to represent cache/memory data based on
> newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_,HOPS_} fields.
Thanks, applied.
- Arnaldo
> Add data source encodings to represent data coming from local
> memory/Remote memory/distant memory and remote/distant cache hits.
>
> Inorder to represent data coming from OpenCAPI cache/memory, we use
> LVLNUM "PMEM" field which is used to present persistent memory accesses.
>
> Result in power10 system with patch changes:
>
> localhost:# ./perf mem report --sort="mem,sym,dso" --stdio
> # Overhead Samples Memory access Symbol Shared Object
> # ........ ............ ........................ .......................... ................
> #
> 29.46% 2331 L1 or L1 hit [.] __random libc-2.28.so
> 23.11% 2121 L1 or L1 hit [.] producer_populate_cache producer_consumer
> 18.56% 1758 L1 or L1 hit [.] __random_r libc-2.28.so
> 15.64% 1559 L2 or L2 hit [.] __random libc-2.28.so
> .....
> 0.09% 5 Remote socket, same board Any cache hit [.] __random libc-2.28.so
> 0.07% 4 Remote socket, same board Any cache hit [.] __random libc-2.28.so
> .....
>
> Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
> Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
> ---
> arch/powerpc/perf/isa207-common.c | 54 ++++++++++++++++++++++++-------
> 1 file changed, 42 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
> index 6c6bc8b7d887..4037ea652522 100644
> --- a/arch/powerpc/perf/isa207-common.c
> +++ b/arch/powerpc/perf/isa207-common.c
> @@ -229,13 +229,28 @@ static inline u64 isa207_find_source(u64 idx, u32 sub_idx)
> ret = PH(LVL, L3) | LEVEL(L3) | P(SNOOP, HIT);
> break;
> case 4:
> - if (sub_idx <= 1)
> - ret = PH(LVL, LOC_RAM);
> - else if (sub_idx > 1 && sub_idx <= 2)
> - ret = PH(LVL, REM_RAM1);
> - else
> - ret = PH(LVL, REM_RAM2);
> - ret |= P(SNOOP, HIT);
> + if (cpu_has_feature(CPU_FTR_ARCH_31)) {
> + ret = P(SNOOP, HIT);
> +
> + if (sub_idx == 1)
> + ret |= PH(LVL, LOC_RAM) | LEVEL(RAM);
> + else if (sub_idx == 2 || sub_idx == 3)
> + ret |= P(LVL, HIT) | LEVEL(PMEM);
> + else if (sub_idx == 4)
> + ret |= PH(LVL, REM_RAM1) | REM | LEVEL(RAM) | P(HOPS, 2);
> + else if (sub_idx == 5 || sub_idx == 7)
> + ret |= P(LVL, HIT) | LEVEL(PMEM) | REM;
> + else if (sub_idx == 6)
> + ret |= PH(LVL, REM_RAM2) | REM | LEVEL(RAM) | P(HOPS, 3);
> + } else {
> + if (sub_idx <= 1)
> + ret = PH(LVL, LOC_RAM);
> + else if (sub_idx > 1 && sub_idx <= 2)
> + ret = PH(LVL, REM_RAM1);
> + else
> + ret = PH(LVL, REM_RAM2);
> + ret |= P(SNOOP, HIT);
> + }
> break;
> case 5:
> if (cpu_has_feature(CPU_FTR_ARCH_31)) {
> @@ -261,11 +276,26 @@ static inline u64 isa207_find_source(u64 idx, u32 sub_idx)
> }
> break;
> case 6:
> - ret = PH(LVL, REM_CCE2);
> - if ((sub_idx == 0) || (sub_idx == 2))
> - ret |= P(SNOOP, HIT);
> - else if ((sub_idx == 1) || (sub_idx == 3))
> - ret |= P(SNOOP, HITM);
> + if (cpu_has_feature(CPU_FTR_ARCH_31)) {
> + if (sub_idx == 0)
> + ret = PH(LVL, REM_CCE1) | LEVEL(ANY_CACHE) | REM |
> + P(SNOOP, HIT) | P(HOPS, 2);
> + else if (sub_idx == 1)
> + ret = PH(LVL, REM_CCE1) | LEVEL(ANY_CACHE) | REM |
> + P(SNOOP, HITM) | P(HOPS, 2);
> + else if (sub_idx == 2)
> + ret = PH(LVL, REM_CCE2) | LEVEL(ANY_CACHE) | REM |
> + P(SNOOP, HIT) | P(HOPS, 3);
> + else if (sub_idx == 3)
> + ret = PH(LVL, REM_CCE2) | LEVEL(ANY_CACHE) | REM |
> + P(SNOOP, HITM) | P(HOPS, 3);
> + } else {
> + ret = PH(LVL, REM_CCE2);
> + if (sub_idx == 0 || sub_idx == 2)
> + ret |= P(SNOOP, HIT);
> + else if (sub_idx == 1 || sub_idx == 3)
> + ret |= P(SNOOP, HITM);
> + }
> break;
> case 7:
> ret = PM(LVL, L1);
> --
> 2.27.0
--
- Arnaldo
^ permalink raw reply
* Re: [PATCH 3/4] powerpc/perf: Add encodings to represent data based on newer composite PERF_MEM_LVLNUM* fields
From: Arnaldo Carvalho de Melo @ 2021-12-22 12:38 UTC (permalink / raw)
To: Kajol Jain
Cc: mark.rutland, atrajeev, ak, daniel, rnsastry, peterz,
linux-kernel, ast, linux-perf-users, alexander.shishkin, yao.jin,
mingo, paulus, maddy, jolsa, namhyung, songliubraving,
linuxppc-dev, kan.liang
In-Reply-To: <20211206091749.87585-4-kjain@linux.ibm.com>
Em Mon, Dec 06, 2021 at 02:47:48PM +0530, Kajol Jain escreveu:
> The code represent data coming from L1/L2/L3 cache hits based on
> PERF_MEM_LVL_* namespace, which is in the process of deprecation in
> the favour of newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_,HOPS_}
> fields.
Thanks, applied.
- Arnaldo
> Add data source encodings to represent L1/L2/L3 cache hits based on
> newer composite PERF_MEM_{LVLNUM_,REMOTE_,SNOOPX_,HOPS_} fields for
> power10 and older platforms
>
> Result in power9 system without patch changes:
>
> localhost:# ./perf mem report --sort="mem,sym,dso" --stdio
> # Overhead Samples Memory access Symbol Shared Object
> # ........ ............ ........................ ................................. ................
> #
> 29.51% 1 L2 hit [k] perf_event_exec [kernel.vmlinux]
> 27.05% 1 L1 hit [k] perf_ctx_unlock [kernel.vmlinux]
> 13.93% 1 L1 hit [k] vtime_delta [kernel.vmlinux]
> 13.11% 1 L1 hit [k] prepend_path.isra.11 [kernel.vmlinux]
> 8.20% 1 L1 hit [.] 00000038.plt_call.__GI_strlen libc-2.28.so
> 8.20% 1 L1 hit [k] perf_event_interrupt [kernel.vmlinux]
>
> Result in power9 system with patch changes:
>
> localhost:# ./perf mem report --sort="mem,sym,dso" --stdio
> # Overhead Samples Memory access Symbol Shared Object
> # ........ ............ ........................ .......................... ................
> #
> 36.63% 1 L2 or L2 hit [k] perf_event_exec [kernel.vmlinux]
> 25.50% 1 L1 or L1 hit [k] vtime_delta [kernel.vmlinux]
> 13.12% 1 L1 or L1 hit [k] unmap_region [kernel.vmlinux]
> 12.62% 1 L1 or L1 hit [k] perf_sample_event_took [kernel.vmlinux]
> 6.93% 1 L1 or L1 hit [k] perf_ctx_unlock [kernel.vmlinux]
> 5.20% 1 L1 or L1 hit [.] __memcpy_power7 libc-2.28.so
>
> Reviewed-by: Madhavan Srinivasan <maddy@linux.ibm.com>
> Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
> ---
> arch/powerpc/perf/isa207-common.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
> index 7ea873ab2e6f..6c6bc8b7d887 100644
> --- a/arch/powerpc/perf/isa207-common.c
> +++ b/arch/powerpc/perf/isa207-common.c
> @@ -220,13 +220,13 @@ static inline u64 isa207_find_source(u64 idx, u32 sub_idx)
> /* Nothing to do */
> break;
> case 1:
> - ret = PH(LVL, L1);
> + ret = PH(LVL, L1) | LEVEL(L1) | P(SNOOP, HIT);
> break;
> case 2:
> - ret = PH(LVL, L2);
> + ret = PH(LVL, L2) | LEVEL(L2) | P(SNOOP, HIT);
> break;
> case 3:
> - ret = PH(LVL, L3);
> + ret = PH(LVL, L3) | LEVEL(L3) | P(SNOOP, HIT);
> break;
> case 4:
> if (sub_idx <= 1)
> --
> 2.27.0
--
- Arnaldo
^ permalink raw reply
* Re: [PATCH 2/4] tools/perf: Add new macros for mem_hops field
From: Arnaldo Carvalho de Melo @ 2021-12-22 12:36 UTC (permalink / raw)
To: Kajol Jain
Cc: mark.rutland, atrajeev, ak, daniel, rnsastry, peterz,
linux-kernel, ast, linux-perf-users, alexander.shishkin, yao.jin,
mingo, paulus, maddy, jolsa, namhyung, songliubraving,
linuxppc-dev, kan.liang
In-Reply-To: <20211206091749.87585-3-kjain@linux.ibm.com>
Em Mon, Dec 06, 2021 at 02:47:47PM +0530, Kajol Jain escreveu:
> Add new macros for mem_hops field which can be used to
> represent remote-node, socket and board level details.
>
> Currently the code had macro for HOPS_0 which, corresponds
> to data coming from another core but same node.
> Add new macros for HOPS_1 to HOPS_3 to represent
> remote-node, socket and board level data.
>
> Also add corresponding strings in the mem_hops array to
> represent mem_hop field data in perf_mem__lvl_scnprintf function
>
> Incase mem_hops field is used, PERF_MEM_LVLNUM field also need
> to be set inorder to represent the data source. Hence printing
> data source via PERF_MEM_LVL field can be skip in that scenario.
>
> For ex: Encodings for mem_hops fields with L2 cache:
Thanks, applied.
- Arnaldo
> L2 - local L2
> L2 | REMOTE | HOPS_0 - remote core, same node L2
> L2 | REMOTE | HOPS_1 - remote node, same socket L2
> L2 | REMOTE | HOPS_2 - remote socket, same board L2
> L2 | REMOTE | HOPS_3 - remote board L2
>
> Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
> ---
> tools/include/uapi/linux/perf_event.h | 5 ++++-
> tools/perf/util/mem-events.c | 29 +++++++++++++++++----------
> 2 files changed, 22 insertions(+), 12 deletions(-)
>
> diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h
> index bd8860eeb291..4cd39aaccbe7 100644
> --- a/tools/include/uapi/linux/perf_event.h
> +++ b/tools/include/uapi/linux/perf_event.h
> @@ -1332,7 +1332,10 @@ union perf_mem_data_src {
>
> /* hop level */
> #define PERF_MEM_HOPS_0 0x01 /* remote core, same node */
> -/* 2-7 available */
> +#define PERF_MEM_HOPS_1 0x02 /* remote node, same socket */
> +#define PERF_MEM_HOPS_2 0x03 /* remote socket, same board */
> +#define PERF_MEM_HOPS_3 0x04 /* remote board */
> +/* 5-7 available */
> #define PERF_MEM_HOPS_SHIFT 43
>
> #define PERF_MEM_S(a, s) \
> diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
> index 3167b4628b6d..ed0ab838bcc5 100644
> --- a/tools/perf/util/mem-events.c
> +++ b/tools/perf/util/mem-events.c
> @@ -309,6 +309,9 @@ static const char * const mem_hops[] = {
> * to be set with mem_hops field.
> */
> "core, same node",
> + "node, same socket",
> + "socket, same board",
> + "board",
> };
>
> int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
> @@ -316,7 +319,7 @@ int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
> size_t i, l = 0;
> u64 m = PERF_MEM_LVL_NA;
> u64 hit, miss;
> - int printed;
> + int printed = 0;
>
> if (mem_info)
> m = mem_info->data_src.mem_lvl;
> @@ -335,18 +338,22 @@ int perf_mem__lvl_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
> l += 7;
> }
>
> - if (mem_info && mem_info->data_src.mem_hops)
> + /*
> + * Incase mem_hops field is set, we can skip printing data source via
> + * PERF_MEM_LVL namespace.
> + */
> + if (mem_info && mem_info->data_src.mem_hops) {
> l += scnprintf(out + l, sz - l, "%s ", mem_hops[mem_info->data_src.mem_hops]);
> -
> - printed = 0;
> - for (i = 0; m && i < ARRAY_SIZE(mem_lvl); i++, m >>= 1) {
> - if (!(m & 0x1))
> - continue;
> - if (printed++) {
> - strcat(out, " or ");
> - l += 4;
> + } else {
> + for (i = 0; m && i < ARRAY_SIZE(mem_lvl); i++, m >>= 1) {
> + if (!(m & 0x1))
> + continue;
> + if (printed++) {
> + strcat(out, " or ");
> + l += 4;
> + }
> + l += scnprintf(out + l, sz - l, mem_lvl[i]);
> }
> - l += scnprintf(out + l, sz - l, mem_lvl[i]);
> }
>
> if (mem_info && mem_info->data_src.mem_lvl_num) {
> --
> 2.27.0
--
- Arnaldo
^ permalink raw reply
* [BISECTED] power8: watchdog: CPU 3 self-detected hard LOCKUP @ queued_spin_lock_slowpath+0x154/0x2d0
From: Stijn Tintel @ 2021-12-22 1:20 UTC (permalink / raw)
To: linuxppc-dev, Nicholas Piggin, Davidlohr Bueso, Michael Ellerman,
Christophe Leroy, Paul Mackerras, Benjamin Herrenschmidt,
Michael Ellerman
Hi,
After upgrading my Power8 server from 5.10 LTS to 5.15 LTS, I started
experiencing CPU hard lockups, usually rather quickly after boot:
watchdog: CPU 3 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x154/0x2d0
watchdog: CPU 3 TB:265651929071, last heartbeat TB:259344820187 (12318ms
ago)
watchdog: CPU 4 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x22c/0x2d0
watchdog: CPU 4 TB:265651929059, last heartbeat TB:259344820045 (12318ms
ago)
watchdog: CPU 5 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 5 TB:265651929037, last heartbeat TB:259349940303 (12308ms
ago)
watchdog: CPU 6 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x144/0x2d0
watchdog: CPU 6 TB:265651929056, last heartbeat TB:259349940294 (12308ms
ago)
watchdog: CPU 12 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x280/0x2d0
watchdog: CPU 12 TB:242479050267, last heartbeat TB:236822174350
(11048ms ago)
watchdog: CPU 26 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x22c/0x2d0
watchdog: CPU 26 TB:265657049348, last heartbeat TB:259355060595
(12308ms ago)
watchdog: CPU 40 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 40 TB:265657049289, last heartbeat TB:259360180427
(12298ms ago)
watchdog: CPU 47 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x21c/0x2d0
watchdog: CPU 47 TB:265657049213, last heartbeat TB:259365300321
(12288ms ago)
watchdog: CPU 60 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 60 TB:265651929348, last heartbeat TB:259370420527
(12268ms ago)
watchdog: CPU 72 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 72 TB:265718488733, last heartbeat TB:259375540545
(12388ms ago)
watchdog: CPU 13 detected hard LOCKUP on other CPUs 0-2,7,10,44
watchdog: CPU 13 TB:267541867921, last SMP heartbeat TB:259380660378
(15939ms ago)
watchdog: CPU 34 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 34 TB:269913954376, last heartbeat TB:263456144470
(12612ms ago)
watchdog: CPU 41 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 41 TB:267865972392, last heartbeat TB:261408162383
(12612ms ago)
watchdog: CPU 74 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 74 TB:267766470637, last heartbeat TB:261423522630
(12388ms ago)
watchdog: CPU 8 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 8 TB:274978264599, last heartbeat TB:269237436681 (11212ms
ago)
watchdog: CPU 9 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 9 TB:268029810836, last heartbeat TB:261397922093 (12952ms
ago)
watchdog: CPU 11 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 11 TB:279685725759, last heartbeat TB:273685814104
(11718ms ago)
watchdog: CPU 16 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 16 TB:267865972449, last heartbeat TB:261397922458
(12632ms ago)
watchdog: CPU 18 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 18 TB:269913954314, last heartbeat TB:263445904285
(12632ms ago)
watchdog: CPU 24 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 24 TB:267865972338, last heartbeat TB:261403042311
(12622ms ago)
watchdog: CPU 31 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x22c/0x2d0
watchdog: CPU 31 TB:268029811095, last heartbeat TB:261403042673
(12942ms ago)
watchdog: CPU 32 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 32 TB:267865972528, last heartbeat TB:261403042589
(12622ms ago)
watchdog: CPU 33 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 33 TB:268029811013, last heartbeat TB:261408162474
(12932ms ago)
watchdog: CPU 35 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 35 TB:280174344471, last heartbeat TB:273696054625
(12652ms ago)
watchdog: CPU 37 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x230/0x2d0
watchdog: CPU 37 TB:269913954356, last heartbeat TB:263456144501
(12612ms ago)
watchdog: CPU 38 self-detected hard LOCKUP @
queued_spin_lock_slowpath+0x228/0x2d0
watchdog: CPU 38 TB:290393774681, last heartbeat TB:283946212510
(12592ms ago)
Bisecting lead to the following commit:
deb9b13eb2571fbde164ae012c77985fd14f2f02 is the first bad commit
commit deb9b13eb2571fbde164ae012c77985fd14f2f02
Author: Davidlohr Bueso <dave@stgolabs.net>
Date: Mon Mar 8 17:59:50 2021 -0800
powerpc/qspinlock: Use generic smp_cond_load_relaxed
The problem persists in 2f47a9a4dfa3674fad19a49b40c5103a9a8e1589 and
goes away if I revert deb9b13eb2571fbde164ae012c77985fd14f2f02 on top of
that. As deb9b13eb2571fbde164ae012c77985fd14f2f02 seems to be a revert
of 49a7d46a06c30c7beabbf9d1a8ea1de0f9e4fdfe, I suspect this problem
might have existed before 49a7d46a06c30c7beabbf9d1a8ea1de0f9e4fdfe. I
therefore tried to build 49a7d46a06c30c7beabbf9d1a8ea1de0f9e4fdfe and
49a7d46a06c30c7beabbf9d1a8ea1de0f9e4fdfe^1 to verify if the problem
exists there as well, unfortunately these commits don't build due to the
following compile error:
kernel/smp.c:In function 'smp_init':
./include/linux/compiler.h:392:38:error: call to
'__compiletime_assert_150' declared with attribute error: BUILD_BUG_ON
failed: offsetof(struct task_struct, wake_entry_type) - offsetof(struct
task_struct, wake_entry) != offsetof(struct __call_single_data, flags) -
offsetof(struct __call_single_data, llist)
392 | _compiletime_assert(condition, msg, __compiletime_assert_,
__COUNTER__)
| ^
Is this report enough to revert deb9b13eb2571fbde164ae012c77985fd14f2f02
for now?
Stijn
^ permalink raw reply
* Re: [PATCH 1/3] powerpc/64s: Mask NIP before checking against SRR0
From: Sachin Sant @ 2021-12-22 10:25 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Nicholas Piggin
In-Reply-To: <20211221135101.2085547-1-mpe@ellerman.id.au>
> On 21-Dec-2021, at 7:20 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> When CONFIG_PPC_RFI_SRR_DEBUG=y we check that NIP and SRR0 match when
> returning from interrupts. This can trigger falsely if NIP has either of
> its two low bits set via sigreturn or ptrace, while SRR0 has its low two
> bits masked in hardware.
>
> As a quick fix make sure to mask the low bits before doing the check.
>
> Fixes: 59dc5bfca0cb ("powerpc/64s: avoid reloading (H)SRR registers if they are still valid")
> Reported-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
Tested this 3 patch series successfully (with and without PPC_RFI_SRR_DEBUG)
on Power9/Power10 LPAR as well as Power9 PowerNV.
Tested-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
^ permalink raw reply
* Re: [PATCH 3/3] powerpc/vdso: Merge vdso64 and vdso32 into a single directory
From: Christophe Leroy @ 2021-12-22 9:50 UTC (permalink / raw)
To: kernel test robot, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, masahiroy@kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, llvm@lists.linux.dev,
kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
In-Reply-To: <202112221723.qyvrCJHe-lkp@intel.com>
Le 22/12/2021 à 10:25, kernel test robot a écrit :
> Hi Christophe,
>
> I love your patch! Yet something to improve:
>
> [auto build test ERROR on powerpc/next]
> [also build test ERROR on v5.16-rc6 next-20211221]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
>
> url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-vdso-augment-VDSO32-functions-to-support-64-bits-build/20211222-021033
> base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
> config: powerpc-randconfig-r023-20211222 (https://download.01.org/0day-ci/archive/20211222/202112221723.qyvrCJHe-lkp@intel.com/config)
> compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project de4e0195ae1c39f1c3b07834b8e32c113f4f20eb)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install powerpc cross compiling tool for clang build
> # apt-get install binutils-powerpc-linux-gnu
> # https://github.com/0day-ci/linux/commit/16137812dbb55d25ebe3962d5fb7486cb5b43311
> git remote add linux-review https://github.com/0day-ci/linux
> git fetch --no-tags linux-review Christophe-Leroy/powerpc-vdso-augment-VDSO32-functions-to-support-64-bits-build/20211222-021033
> git checkout 16137812dbb55d25ebe3962d5fb7486cb5b43311
> # save the config file to linux build tree
> mkdir build_dir
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc prepare
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> <stdin>:1559:2: warning: syscall futex_waitv not implemented [-W#warnings]
> #warning syscall futex_waitv not implemented
> ^
> 1 warning generated.
>>> arch/powerpc/kernel/vdso/gettimeofday.S:75:8: error: unsupported directive '.stabs'
> .stabs "_restgpr_31_x:F-1",36,0,0,_restgpr_31_x; .globl _restgpr_31_x; _restgpr_31_x:
> ^
> arch/powerpc/kernel/vdso/gettimeofday.S:76:8: error: unsupported directive '.stabs'
> .stabs "_rest32gpr_31_x:F-1",36,0,0,_rest32gpr_31_x; .globl _rest32gpr_31_x; _rest32gpr_31_x:
This problem is unrelated to this patch, you can see below it is from
2021-03-09, and it isn't even introduced by that commit but only by the
fact that it uses _GLOBAL() which has existed for years.
Anyway, there is already a patch to fix it at
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/68932ec2ba6b868d35006b96e90f0890f3da3c05.1638273868.git.christophe.leroy@csgroup.eu/
> ^
> make[2]: *** [arch/powerpc/kernel/vdso/Makefile:71: arch/powerpc/kernel/vdso/gettimeofday-32.o] Error 1
> make[2]: Target 'include/generated/vdso32-offsets.h' not remade because of errors.
> make[1]: *** [arch/powerpc/Makefile:421: vdso_prepare] Error 2
> make[1]: Target 'prepare' not remade because of errors.
> make: *** [Makefile:219: __sub-make] Error 2
> make: Target 'prepare' not remade because of errors.
>
>
> vim +75 arch/powerpc/kernel/vdso/gettimeofday.S
>
> 08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 70
> 08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 71 /* Routines for restoring integer registers, called by the compiler. */
> 08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 72 /* Called with r11 pointing to the stack header word of the caller of the */
> 08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 73 /* function, just beyond the end of the integer restore area. */
> 11f0a078a8b6be arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-12-21 74 #ifndef __powerpc64__
> 08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 @75 _GLOBAL(_restgpr_31_x)
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
^ permalink raw reply
* Re: [PATCH 3/3] powerpc/vdso: Merge vdso64 and vdso32 into a single directory
From: kernel test robot @ 2021-12-22 9:25 UTC (permalink / raw)
To: Christophe Leroy, Benjamin Herrenschmidt, Paul Mackerras,
Michael Ellerman, masahiroy@kernel.org
Cc: linuxppc-dev@lists.ozlabs.org, llvm, kbuild-all,
linux-kernel@vger.kernel.org
In-Reply-To: <c4ff129869fa6b0c936ff7e388eee42bb5f46778.1640108961.git.christophe.leroy@csgroup.eu>
Hi Christophe,
I love your patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.16-rc6 next-20211221]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-vdso-augment-VDSO32-functions-to-support-64-bits-build/20211222-021033
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-randconfig-r023-20211222 (https://download.01.org/0day-ci/archive/20211222/202112221723.qyvrCJHe-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project de4e0195ae1c39f1c3b07834b8e32c113f4f20eb)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/16137812dbb55d25ebe3962d5fb7486cb5b43311
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christophe-Leroy/powerpc-vdso-augment-VDSO32-functions-to-support-64-bits-build/20211222-021033
git checkout 16137812dbb55d25ebe3962d5fb7486cb5b43311
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=powerpc prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
<stdin>:1559:2: warning: syscall futex_waitv not implemented [-W#warnings]
#warning syscall futex_waitv not implemented
^
1 warning generated.
>> arch/powerpc/kernel/vdso/gettimeofday.S:75:8: error: unsupported directive '.stabs'
.stabs "_restgpr_31_x:F-1",36,0,0,_restgpr_31_x; .globl _restgpr_31_x; _restgpr_31_x:
^
arch/powerpc/kernel/vdso/gettimeofday.S:76:8: error: unsupported directive '.stabs'
.stabs "_rest32gpr_31_x:F-1",36,0,0,_rest32gpr_31_x; .globl _rest32gpr_31_x; _rest32gpr_31_x:
^
make[2]: *** [arch/powerpc/kernel/vdso/Makefile:71: arch/powerpc/kernel/vdso/gettimeofday-32.o] Error 1
make[2]: Target 'include/generated/vdso32-offsets.h' not remade because of errors.
make[1]: *** [arch/powerpc/Makefile:421: vdso_prepare] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +75 arch/powerpc/kernel/vdso/gettimeofday.S
08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 70
08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 71 /* Routines for restoring integer registers, called by the compiler. */
08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 72 /* Called with r11 pointing to the stack header word of the caller of the */
08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 73 /* function, just beyond the end of the integer restore area. */
11f0a078a8b6be arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-12-21 74 #ifndef __powerpc64__
08c18b63d9656e arch/powerpc/kernel/vdso32/gettimeofday.S Christophe Leroy 2021-03-09 @75 _GLOBAL(_restgpr_31_x)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* [PATCH v2] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
From: cgel.zte @ 2021-12-22 9:06 UTC (permalink / raw)
To: mpe
Cc: arnd, zealci, linux-kernel, deng.changcheng, paulus, cgel.zte,
linuxppc-dev
In-Reply-To: <87h7b1lcvt.fsf@mpe.ellerman.id.au>
From: Changcheng Deng <deng.changcheng@zte.com.cn>
Fix the following coccicheck warning:
./arch/powerpc/platforms/cell/axon_msi.c: 456: 0-23: WARNING: fops_msic
should be defined with DEFINE_DEBUGFS_ATTRIBUTE
DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
imposes some significant overhead as compared to
DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
arch/powerpc/platforms/cell/axon_msi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 354a58c1e6f2..362c1efe4180 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -453,7 +453,7 @@ static int msic_get(void *data, u64 *val)
return 0;
}
-DEFINE_SIMPLE_ATTRIBUTE(fops_msic, msic_get, msic_set, "%llu\n");
+DEFINE_DEBUGFS_ATTRIBUTE(fops_msic, msic_get, msic_set, "%llu\n");
void axon_msi_debug_setup(struct device_node *dn, struct axon_msic *msic)
{
@@ -474,6 +474,6 @@ void axon_msi_debug_setup(struct device_node *dn, struct axon_msic *msic)
snprintf(name, sizeof(name), "msic_%d", of_node_to_nid(dn));
- debugfs_create_file(name, 0600, arch_debugfs_dir, msic, &fops_msic);
+ debugfs_create_file_unsafe(name, 0600, arch_debugfs_dir, msic, &fops_msic);
}
#endif /* DEBUG */
--
2.25.1
^ permalink raw reply related
* Re: [PATCH 4/8] sched: powerpc: Remove unused TASK_SIZE_OF
From: Guo Ren @ 2021-12-22 8:22 UTC (permalink / raw)
To: Christophe Leroy
Cc: juri.lelli@redhat.com, linux-s390@vger.kernel.org, Guo Ren,
arnd@arndb.de, peterz@infradead.org, x86@kernel.org,
inux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org,
sparclinux@vger.kernel.or, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, mingo@redhat.com,
tglx@linutronix.de, will@kernel.org,
linux-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <7ce6caf5-b16d-97de-fcc3-882a9a98437a@csgroup.eu>
Got it. Thx
On Wed, Dec 22, 2021 at 3:27 PM Christophe Leroy
<christophe.leroy@csgroup.eu> wrote:
>
>
>
> Le 22/12/2021 à 04:02, Guo Ren a écrit :
> > On Wed, Dec 22, 2021 at 2:43 AM Christophe Leroy
> > <christophe.leroy@csgroup.eu> wrote:
> >>
> >>
> >>
> >> Le 21/12/2021 à 18:00, guoren@kernel.org a écrit :
> >>> From: Guo Ren <guoren@linux.alibaba.com>
> >>>
> >>> This macro isn't used in Linux sched, now. Delete in
> >>> include/linux/sched.h and arch's include/asm.
> >>>
> >>> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> >>> ---
> >>> arch/powerpc/include/asm/task_size_64.h | 6 ++----
> >>> 1 file changed, 2 insertions(+), 4 deletions(-)
> >>>
> >>> diff --git a/arch/powerpc/include/asm/task_size_64.h b/arch/powerpc/include/asm/task_size_64.h
> >>> index c993482237ed..7e2eca4fac4d 100644
> >>> --- a/arch/powerpc/include/asm/task_size_64.h
> >>> +++ b/arch/powerpc/include/asm/task_size_64.h
> >>> @@ -44,12 +44,10 @@
> >>> */
> >>> #define TASK_SIZE_USER32 (0x0000000100000000UL - (1 * PAGE_SIZE))
> >>>
> >>> -#define TASK_SIZE_OF(tsk) \
> >>> - (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
> >>> +#define TASK_SIZE \
> >>> + (test_tsk_thread_flag(current, TIF_32BIT) ? TASK_SIZE_USER32 : \
> >>> TASK_SIZE_USER64)
> >>
> >> I think you should use test_thread_flag() instead.
> >>
> >> Or even better: use is_32bit_task() and bring back this macro as a
> >> single line, something like:
> >>
> >> #define TASK_SIZE (is_32bit_task() ? TASK_SIZE_USER32 : TASK_SIZE_USER64)
> > Okay, looks better. I would fix it in the next version.
>
> Note that is_32bit_task() exists on powerpc, parisc and sparc.
>
> For other ones you can still use test_thread_flag() instead of
> test_tsk_thread_flag(current)
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply
* Re: [PATCH 1/3] powerpc/vdso: augment VDSO32 functions to support 64 bits build
From: Christophe Leroy @ 2021-12-22 7:36 UTC (permalink / raw)
To: Segher Boessenkool
Cc: masahiroy@kernel.org, linux-kernel@vger.kernel.org,
Paul Mackerras, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <20211221193608.GD614@gate.crashing.org>
Le 21/12/2021 à 20:36, Segher Boessenkool a écrit :
> On Tue, Dec 21, 2021 at 05:49:33PM +0000, Christophe Leroy wrote:
>> diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S
>> index 65244416ab94..db8e167f0166 100644
>> --- a/arch/powerpc/kernel/vdso32/datapage.S
>> +++ b/arch/powerpc/kernel/vdso32/datapage.S
>> @@ -30,11 +30,15 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
>> mr. r4,r3
>> get_datapage r3
>> mtlr r12
>> +#ifdef __powerpc64__
>> + addi r3,r3,CFG_SYSCALL_MAP64
>> +#else
>> addi r3,r3,CFG_SYSCALL_MAP32
>> +#endif
>> + crclr cr0*4+so
>> beqlr
>> li r0,NR_syscalls
>> stw r0,0(r4)
>> - crclr cr0*4+so
>> blr
>
> This now clears cr0.3 if r3 is zero on entry. Is that on purpose?
All crclr where added by commit 5d66da3d71e6 ("[PATCH] powerpc: Make the
vDSO functions set error code (#2)")
It looks like it was properly added to ppc64's version of
__kernel_get_syscall_map() but for ppc32 CR.SO was left undefined in
case of early exit of __kernel_get_syscall_map()
So yes, I think the change is on purpose.
>
> Rest looks good.
>
> Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
>
Thanks
Christophe
^ permalink raw reply
* Re: [PATCH 4/8] sched: powerpc: Remove unused TASK_SIZE_OF
From: Christophe Leroy @ 2021-12-22 7:27 UTC (permalink / raw)
To: Guo Ren
Cc: juri.lelli@redhat.com, linux-s390@vger.kernel.org, Guo Ren,
arnd@arndb.de, peterz@infradead.org, x86@kernel.org,
inux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org,
sparclinux@vger.kernel.or, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, mingo@redhat.com,
tglx@linutronix.de, will@kernel.org,
linux-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <CAJF2gTQbpVczn=Zz9rgvgNRSM9AFaoc2zVz9YaL_hWpgYSaR2w@mail.gmail.com>
Le 22/12/2021 à 04:02, Guo Ren a écrit :
> On Wed, Dec 22, 2021 at 2:43 AM Christophe Leroy
> <christophe.leroy@csgroup.eu> wrote:
>>
>>
>>
>> Le 21/12/2021 à 18:00, guoren@kernel.org a écrit :
>>> From: Guo Ren <guoren@linux.alibaba.com>
>>>
>>> This macro isn't used in Linux sched, now. Delete in
>>> include/linux/sched.h and arch's include/asm.
>>>
>>> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
>>> ---
>>> arch/powerpc/include/asm/task_size_64.h | 6 ++----
>>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/arch/powerpc/include/asm/task_size_64.h b/arch/powerpc/include/asm/task_size_64.h
>>> index c993482237ed..7e2eca4fac4d 100644
>>> --- a/arch/powerpc/include/asm/task_size_64.h
>>> +++ b/arch/powerpc/include/asm/task_size_64.h
>>> @@ -44,12 +44,10 @@
>>> */
>>> #define TASK_SIZE_USER32 (0x0000000100000000UL - (1 * PAGE_SIZE))
>>>
>>> -#define TASK_SIZE_OF(tsk) \
>>> - (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
>>> +#define TASK_SIZE \
>>> + (test_tsk_thread_flag(current, TIF_32BIT) ? TASK_SIZE_USER32 : \
>>> TASK_SIZE_USER64)
>>
>> I think you should use test_thread_flag() instead.
>>
>> Or even better: use is_32bit_task() and bring back this macro as a
>> single line, something like:
>>
>> #define TASK_SIZE (is_32bit_task() ? TASK_SIZE_USER32 : TASK_SIZE_USER64)
> Okay, looks better. I would fix it in the next version.
Note that is_32bit_task() exists on powerpc, parisc and sparc.
For other ones you can still use test_thread_flag() instead of
test_tsk_thread_flag(current)
^ permalink raw reply
* Re: [PATCH 4/8] sched: powerpc: Remove unused TASK_SIZE_OF
From: Guo Ren @ 2021-12-22 3:02 UTC (permalink / raw)
To: Christophe Leroy
Cc: juri.lelli@redhat.com, linux-s390@vger.kernel.org, Guo Ren,
arnd@arndb.de, peterz@infradead.org, x86@kernel.org,
inux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org,
sparclinux@vger.kernel.or, linux-mips@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, mingo@redhat.com,
tglx@linutronix.de, will@kernel.org,
linux-riscv@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <c084037b-1f30-53be-bf6b-06e3401b20e8@csgroup.eu>
On Wed, Dec 22, 2021 at 2:43 AM Christophe Leroy
<christophe.leroy@csgroup.eu> wrote:
>
>
>
> Le 21/12/2021 à 18:00, guoren@kernel.org a écrit :
> > From: Guo Ren <guoren@linux.alibaba.com>
> >
> > This macro isn't used in Linux sched, now. Delete in
> > include/linux/sched.h and arch's include/asm.
> >
> > Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> > ---
> > arch/powerpc/include/asm/task_size_64.h | 6 ++----
> > 1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/powerpc/include/asm/task_size_64.h b/arch/powerpc/include/asm/task_size_64.h
> > index c993482237ed..7e2eca4fac4d 100644
> > --- a/arch/powerpc/include/asm/task_size_64.h
> > +++ b/arch/powerpc/include/asm/task_size_64.h
> > @@ -44,12 +44,10 @@
> > */
> > #define TASK_SIZE_USER32 (0x0000000100000000UL - (1 * PAGE_SIZE))
> >
> > -#define TASK_SIZE_OF(tsk) \
> > - (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
> > +#define TASK_SIZE \
> > + (test_tsk_thread_flag(current, TIF_32BIT) ? TASK_SIZE_USER32 : \
> > TASK_SIZE_USER64)
>
> I think you should use test_thread_flag() instead.
>
> Or even better: use is_32bit_task() and bring back this macro as a
> single line, something like:
>
> #define TASK_SIZE (is_32bit_task() ? TASK_SIZE_USER32 : TASK_SIZE_USER64)
Okay, looks better. I would fix it in the next version.
>
> >
> > -#define TASK_SIZE TASK_SIZE_OF(current)
> > -
> > #define TASK_UNMAPPED_BASE_USER32 (PAGE_ALIGN(TASK_SIZE_USER32 / 4))
> > #define TASK_UNMAPPED_BASE_USER64 (PAGE_ALIGN(DEFAULT_MAP_WINDOW_USER64 / 4))
> >
> >
--
Best Regards
Guo Ren
ML: https://lore.kernel.org/linux-csky/
^ permalink raw reply
* [powerpc:merge] BUILD SUCCESS 6963dbc89ab1337394f51957136084c8854b6e7f
From: kernel test robot @ 2021-12-22 1:39 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git merge
branch HEAD: 6963dbc89ab1337394f51957136084c8854b6e7f Automatic merge of 'next' into merge (2021-12-21 22:22)
elapsed time: 806m
configs tested: 118
configs skipped: 3
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm allyesconfig
arm allmodconfig
arm64 defconfig
arm64 allyesconfig
arm cm_x300_defconfig
mips malta_qemu_32r6_defconfig
sh se7712_defconfig
m68k m5275evb_defconfig
powerpc ppc44x_defconfig
arm alldefconfig
powerpc mpc832x_rdb_defconfig
powerpc storcenter_defconfig
powerpc eiger_defconfig
powerpc stx_gp3_defconfig
sh sh7710voipgw_defconfig
mips rt305x_defconfig
mips gcw0_defconfig
mips bmips_be_defconfig
powerpc skiroot_defconfig
mips maltaaprp_defconfig
m68k alldefconfig
sh urquell_defconfig
sh shx3_defconfig
powerpc mpc85xx_cds_defconfig
powerpc tqm8541_defconfig
arm versatile_defconfig
arm neponset_defconfig
powerpc ep88xc_defconfig
mips pic32mzda_defconfig
arm bcm2835_defconfig
arm pcm027_defconfig
arm ezx_defconfig
xtensa defconfig
xtensa virt_defconfig
arm randconfig-c002-20211220
ia64 defconfig
ia64 allmodconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nds32 allnoconfig
nios2 defconfig
arc allyesconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
s390 allyesconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 defconfig
i386 debian-10.3-kselftests
i386 debian-10.3
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
i386 randconfig-a002-20211220
i386 randconfig-a003-20211220
i386 randconfig-a001-20211220
i386 randconfig-a004-20211220
i386 randconfig-a005-20211220
i386 randconfig-a006-20211220
i386 randconfig-a012-20211221
i386 randconfig-a011-20211221
i386 randconfig-a013-20211221
i386 randconfig-a014-20211221
i386 randconfig-a016-20211221
i386 randconfig-a015-20211221
x86_64 randconfig-a001-20211220
x86_64 randconfig-a003-20211220
x86_64 randconfig-a005-20211220
x86_64 randconfig-a004-20211220
x86_64 randconfig-a002-20211220
x86_64 randconfig-a006-20211220
arc randconfig-r043-20211221
riscv randconfig-r042-20211221
s390 randconfig-r044-20211221
riscv nommu_k210_defconfig
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
um i386_defconfig
um x86_64_defconfig
x86_64 allyesconfig
x86_64 rhel-8.3-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-func
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20211220
x86_64 randconfig-a014-20211220
x86_64 randconfig-a012-20211220
x86_64 randconfig-a011-20211220
x86_64 randconfig-a016-20211220
x86_64 randconfig-a015-20211220
hexagon randconfig-r041-20211220
hexagon randconfig-r045-20211220
riscv randconfig-r042-20211220
s390 randconfig-r044-20211220
hexagon randconfig-r041-20211221
hexagon randconfig-r045-20211221
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* [powerpc:next-test] BUILD SUCCESS WITH WARNING 9c4c79c450672b18889a42e6b16a0254ed9721e0
From: kernel test robot @ 2021-12-22 0:14 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
branch HEAD: 9c4c79c450672b18889a42e6b16a0254ed9721e0 selftests/powerpc: Add a test of sigreturning to an unaligned address
Warning reports:
https://lore.kernel.org/lkml/202112220137.X16y07Dp-lkp@intel.com
Warning in current branch:
arch/powerpc/perf/core-book3s.c:2455:6: warning: no previous prototype for 'power_pmu_wants_prompt_pmi' [-Wmissing-prototypes]
Warning ids grouped by kconfigs:
gcc_recent_errors
`-- powerpc-allyesconfig
`-- arch-powerpc-perf-core-book3s.c:warning:no-previous-prototype-for-power_pmu_wants_prompt_pmi
elapsed time: 720m
configs tested: 115
configs skipped: 3
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
sh espt_defconfig
mips loongson1c_defconfig
arm realview_defconfig
powerpc storcenter_defconfig
sh edosk7705_defconfig
powerpc mpc832x_rdb_defconfig
powerpc eiger_defconfig
powerpc stx_gp3_defconfig
sh sh7710voipgw_defconfig
arm alldefconfig
mips rt305x_defconfig
mips gcw0_defconfig
mips bmips_be_defconfig
powerpc skiroot_defconfig
mips maltaaprp_defconfig
mips bmips_stb_defconfig
um alldefconfig
arm ixp4xx_defconfig
m68k q40_defconfig
powerpc lite5200b_defconfig
arm pcm027_defconfig
powerpc katmai_defconfig
arm assabet_defconfig
sh shmin_defconfig
powerpc sam440ep_defconfig
m68k m5407c3_defconfig
powerpc tqm8548_defconfig
sh se7780_defconfig
arm randconfig-c002-20211220
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nds32 allnoconfig
nios2 defconfig
arc allyesconfig
nds32 defconfig
csky defconfig
alpha defconfig
alpha allyesconfig
nios2 allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 defconfig
i386 debian-10.3-kselftests
i386 debian-10.3
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a001-20211220
x86_64 randconfig-a003-20211220
x86_64 randconfig-a005-20211220
x86_64 randconfig-a006-20211220
x86_64 randconfig-a004-20211220
x86_64 randconfig-a002-20211220
i386 randconfig-a006-20211220
i386 randconfig-a004-20211220
i386 randconfig-a002-20211220
i386 randconfig-a003-20211220
i386 randconfig-a005-20211220
i386 randconfig-a001-20211220
arc randconfig-r043-20211220
arc randconfig-r043-20211221
riscv randconfig-r042-20211221
s390 randconfig-r044-20211221
riscv nommu_k210_defconfig
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
um x86_64_defconfig
um i386_defconfig
x86_64 allyesconfig
x86_64 rhel-8.3-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-func
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20211220
x86_64 randconfig-a015-20211220
x86_64 randconfig-a014-20211220
x86_64 randconfig-a012-20211220
x86_64 randconfig-a011-20211220
x86_64 randconfig-a016-20211220
i386 randconfig-a012-20211220
i386 randconfig-a011-20211220
i386 randconfig-a014-20211220
i386 randconfig-a016-20211220
i386 randconfig-a015-20211220
i386 randconfig-a013-20211220
hexagon randconfig-r041-20211220
hexagon randconfig-r045-20211220
riscv randconfig-r042-20211220
s390 randconfig-r044-20211220
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* [powerpc:next] BUILD SUCCESS 18678591846d668649fbd4f87b4a4c470818d386
From: kernel test robot @ 2021-12-22 0:14 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
branch HEAD: 18678591846d668649fbd4f87b4a4c470818d386 selftests/powerpc: skip tests for unavailable mitigations.
elapsed time: 720m
configs tested: 115
configs skipped: 3
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
sh espt_defconfig
mips loongson1c_defconfig
arm realview_defconfig
powerpc storcenter_defconfig
sh edosk7705_defconfig
powerpc mpc832x_rdb_defconfig
powerpc eiger_defconfig
powerpc stx_gp3_defconfig
sh sh7710voipgw_defconfig
arm alldefconfig
mips rt305x_defconfig
mips gcw0_defconfig
mips bmips_be_defconfig
powerpc skiroot_defconfig
mips maltaaprp_defconfig
mips bmips_stb_defconfig
um alldefconfig
arm ixp4xx_defconfig
m68k q40_defconfig
powerpc lite5200b_defconfig
arm pcm027_defconfig
powerpc katmai_defconfig
arm assabet_defconfig
sh shmin_defconfig
powerpc sam440ep_defconfig
m68k m5407c3_defconfig
powerpc tqm8548_defconfig
sh se7780_defconfig
arm randconfig-c002-20211220
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nds32 allnoconfig
nios2 defconfig
arc allyesconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 defconfig
i386 debian-10.3-kselftests
i386 debian-10.3
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a001-20211220
x86_64 randconfig-a003-20211220
x86_64 randconfig-a005-20211220
x86_64 randconfig-a006-20211220
x86_64 randconfig-a004-20211220
x86_64 randconfig-a002-20211220
i386 randconfig-a006-20211220
i386 randconfig-a004-20211220
i386 randconfig-a002-20211220
i386 randconfig-a003-20211220
i386 randconfig-a005-20211220
i386 randconfig-a001-20211220
arc randconfig-r043-20211220
arc randconfig-r043-20211221
riscv randconfig-r042-20211221
s390 randconfig-r044-20211221
riscv nommu_k210_defconfig
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
um x86_64_defconfig
um i386_defconfig
x86_64 allyesconfig
x86_64 rhel-8.3-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-func
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20211220
x86_64 randconfig-a015-20211220
x86_64 randconfig-a014-20211220
x86_64 randconfig-a012-20211220
x86_64 randconfig-a011-20211220
x86_64 randconfig-a016-20211220
i386 randconfig-a012-20211220
i386 randconfig-a011-20211220
i386 randconfig-a014-20211220
i386 randconfig-a016-20211220
i386 randconfig-a015-20211220
i386 randconfig-a013-20211220
hexagon randconfig-r041-20211220
hexagon randconfig-r045-20211220
s390 randconfig-r044-20211220
riscv randconfig-r042-20211220
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* [powerpc:fixes-test] BUILD SUCCESS 8d84fca4375e3c35dadc16b8c7eee6821b2a575c
From: kernel test robot @ 2021-12-22 0:14 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git fixes-test
branch HEAD: 8d84fca4375e3c35dadc16b8c7eee6821b2a575c powerpc/ptdump: Fix DEBUG_WX since generic ptdump conversion
elapsed time: 721m
configs tested: 121
configs skipped: 130
The following configs have been built successfully.
More configs may be tested in the coming days.
gcc tested configs:
arm defconfig
arm64 allyesconfig
arm64 defconfig
arm allyesconfig
arm allmodconfig
sh espt_defconfig
mips loongson1c_defconfig
arm realview_defconfig
powerpc storcenter_defconfig
sh edosk7705_defconfig
powerpc mpc832x_rdb_defconfig
powerpc eiger_defconfig
powerpc stx_gp3_defconfig
sh sh7710voipgw_defconfig
arm alldefconfig
arm moxart_defconfig
mips qi_lb60_defconfig
arm magician_defconfig
mips ip32_defconfig
mips rt305x_defconfig
mips gcw0_defconfig
mips bmips_be_defconfig
powerpc skiroot_defconfig
mips maltaaprp_defconfig
sh se7206_defconfig
mips jmr3927_defconfig
mips capcella_defconfig
powerpc canyonlands_defconfig
sh dreamcast_defconfig
mips ci20_defconfig
m68k q40_defconfig
powerpc lite5200b_defconfig
arm pcm027_defconfig
powerpc katmai_defconfig
arm assabet_defconfig
sh shmin_defconfig
powerpc sam440ep_defconfig
m68k m5407c3_defconfig
powerpc tqm8548_defconfig
sh se7780_defconfig
arm randconfig-c002-20211220
ia64 allmodconfig
ia64 defconfig
ia64 allyesconfig
m68k allmodconfig
m68k defconfig
m68k allyesconfig
nios2 defconfig
arc allyesconfig
nds32 defconfig
nios2 allyesconfig
csky defconfig
alpha defconfig
alpha allyesconfig
xtensa allyesconfig
h8300 allyesconfig
arc defconfig
sh allmodconfig
parisc defconfig
s390 allyesconfig
s390 allmodconfig
parisc allyesconfig
s390 defconfig
i386 allyesconfig
sparc allyesconfig
sparc defconfig
i386 defconfig
i386 debian-10.3-kselftests
i386 debian-10.3
nds32 allnoconfig
mips allyesconfig
mips allmodconfig
powerpc allyesconfig
powerpc allmodconfig
powerpc allnoconfig
x86_64 randconfig-a001-20211220
x86_64 randconfig-a003-20211220
x86_64 randconfig-a005-20211220
x86_64 randconfig-a006-20211220
x86_64 randconfig-a004-20211220
x86_64 randconfig-a002-20211220
i386 randconfig-a013-20211219
i386 randconfig-a011-20211219
i386 randconfig-a016-20211219
i386 randconfig-a015-20211219
i386 randconfig-a014-20211219
i386 randconfig-a012-20211219
arc randconfig-r043-20211221
riscv randconfig-r042-20211221
s390 randconfig-r044-20211221
riscv nommu_k210_defconfig
riscv allyesconfig
riscv nommu_virt_defconfig
riscv allnoconfig
riscv defconfig
riscv rv32_defconfig
riscv allmodconfig
um x86_64_defconfig
um i386_defconfig
x86_64 allyesconfig
x86_64 rhel-8.3-kselftests
x86_64 defconfig
x86_64 rhel-8.3
x86_64 rhel-8.3-func
x86_64 kexec
clang tested configs:
x86_64 randconfig-a013-20211220
x86_64 randconfig-a015-20211220
x86_64 randconfig-a014-20211220
x86_64 randconfig-a012-20211220
x86_64 randconfig-a011-20211220
x86_64 randconfig-a016-20211220
i386 randconfig-a012-20211220
i386 randconfig-a011-20211220
i386 randconfig-a014-20211220
i386 randconfig-a016-20211220
i386 randconfig-a015-20211220
i386 randconfig-a013-20211220
hexagon randconfig-r041-20211220
hexagon randconfig-r045-20211220
riscv randconfig-r042-20211220
s390 randconfig-r044-20211220
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
^ permalink raw reply
* Re: [PATCH] powerpc/cell/axon_msi: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
From: Michael Ellerman @ 2021-12-22 0:08 UTC (permalink / raw)
To: cgel.zte, arnd
Cc: Zeal Robot, Changcheng Deng, linux-kernel, paulus, linuxppc-dev
In-Reply-To: <20211221144814.480849-1-deng.changcheng@zte.com.cn>
cgel.zte@gmail.com writes:
> From: Changcheng Deng <deng.changcheng@zte.com.cn>
>
> Fix the following coccicheck warning:
> ./arch/powerpc/platforms/cell/axon_msi.c: 456: 0-23: WARNING: fops_msic
> should be defined with DEFINE_DEBUGFS_ATTRIBUTE
>
> Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE for
> debugfs files.
But it also says:
//# Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
//# imposes some significant overhead as compared to
//# DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().
Your patch doesn't change it to use debugfs_create_file_unsafe(),
shouldn't it?
cheers
> diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
> index 354a58c1e6f2..47bb0ae8d6c9 100644
> --- a/arch/powerpc/platforms/cell/axon_msi.c
> +++ b/arch/powerpc/platforms/cell/axon_msi.c
> @@ -453,7 +453,7 @@ static int msic_get(void *data, u64 *val)
> return 0;
> }
>
> -DEFINE_SIMPLE_ATTRIBUTE(fops_msic, msic_get, msic_set, "%llu\n");
> +DEFINE_DEBUGFS_ATTRIBUTE(fops_msic, msic_get, msic_set, "%llu\n");
>
> void axon_msi_debug_setup(struct device_node *dn, struct axon_msic *msic)
> {
> --
> 2.25.1
^ permalink raw reply
* Re: [PATCH 1/3] powerpc/vdso: augment VDSO32 functions to support 64 bits build
From: Segher Boessenkool @ 2021-12-21 19:36 UTC (permalink / raw)
To: Christophe Leroy
Cc: masahiroy@kernel.org, linux-kernel@vger.kernel.org,
Paul Mackerras, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <09b25a22cd5179eba4580ae95414f18fc162bedf.1640108961.git.christophe.leroy@csgroup.eu>
On Tue, Dec 21, 2021 at 05:49:33PM +0000, Christophe Leroy wrote:
> diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S
> index 65244416ab94..db8e167f0166 100644
> --- a/arch/powerpc/kernel/vdso32/datapage.S
> +++ b/arch/powerpc/kernel/vdso32/datapage.S
> @@ -30,11 +30,15 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
> mr. r4,r3
> get_datapage r3
> mtlr r12
> +#ifdef __powerpc64__
> + addi r3,r3,CFG_SYSCALL_MAP64
> +#else
> addi r3,r3,CFG_SYSCALL_MAP32
> +#endif
> + crclr cr0*4+so
> beqlr
> li r0,NR_syscalls
> stw r0,0(r4)
> - crclr cr0*4+so
> blr
This now clears cr0.3 if r3 is zero on entry. Is that on purpose?
Rest looks good.
Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Segher
^ permalink raw reply
* [Bug 215381] BUG: Unable to handle kernel data access on read at 0x6600cc00000004
From: bugzilla-daemon @ 2021-12-21 18:52 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <bug-215381-206035@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=215381
--- Comment #1 from Erhard F. (erhard_f@mailbox.org) ---
Created attachment 300107
--> https://bugzilla.kernel.org/attachment.cgi?id=300107&action=edit
kernel .config (kernel 5.15.10, Talos II)
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply
* [Bug 215381] New: BUG: Unable to handle kernel data access on read at 0x6600cc00000004
From: bugzilla-daemon @ 2021-12-21 18:50 UTC (permalink / raw)
To: linuxppc-dev
https://bugzilla.kernel.org/show_bug.cgi?id=215381
Bug ID: 215381
Summary: BUG: Unable to handle kernel data access on read at
0x6600cc00000004
Product: Platform Specific/Hardware
Version: 2.5
Kernel Version: 5.15.10
Hardware: PPC-64
OS: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: PPC-64
Assignee: platform_ppc-64@kernel-bugs.osdl.org
Reporter: erhard_f@mailbox.org
Regression: No
Created attachment 300105
--> https://bugzilla.kernel.org/attachment.cgi?id=300105&action=edit
dmesg (kernel 5.15.10, Talos II)
Happened not during boot but shortly afterwards compiling some stuff via ssh.
[...]
BUG: Unable to handle kernel data access on read at 0x6600cc00000004
Faulting instruction address: 0xc0000000001398c4
Oops: Kernel access of bad area, sig: 11 [#1]
BE PAGE_SIZE=4K MMU=Radix SMP NR_CPUS=192 NUMA PowerNV
Modules linked in: auth_rpcgss nfsv4 dns_resolver nfs lockd grace sunrpc rfkill
evdev ecb xts snd_hda_codec_hdmi radeon xhci_pci snd_hda_intel ctr
snd_intel_dspcfg xhci_hcd snd_hda_codec snd_hwdep ofpart cbc snd_hda_core
drm_ttm_helper ttm snd_pcm powernv_flash i2c_algo_bit aes_generic ibmpowernv
libaes usbcore drm_kms_helper mtd at24 vmx_crypto snd_timer gf128mul opal_prd
hwmon regmap_i2c snd sysimgblt syscopyarea sysfillrect fb_sys_fops usb_common
soundcore lz4 lz4_compress lz4_decompress zram zsmalloc powernv_cpufreq drm
fuse drm_panel_orientation_quirks backlight configfs
CPU: 22 PID: 55708 Comm: clang Not tainted 5.15.10-gentoo-TalosII #1
NIP: c0000000001398c4 LR: c000000000a9b6c0 CTR: 0000000000000000
REGS: c000200009dcef10 TRAP: 0380 Not tainted (5.15.10-gentoo-TalosII)
MSR: 9000000000009032 <SF,HV,EE,ME,IR,DR,RI> CR: 28228244 XER: 000000ae
CFAR: c000000000a9b6bc IRQMASK: 0
GPR00: c000000000315d88 c000200009dcf1b0 c000000001256d00 006600cc00000000
GPR04: c00000000d966370 00003fff8dc00000 0000000000000000 0000000000000000
GPR08: 0000000000000009 ffffffffdead4ead c00c000000000000 0000000000000000
GPR12: 0000000088228244 c0002007ff7f6500 c000200009dcf710 c00020000595e660
GPR16: c0000000012a5bc0 00003fff8dc3e000 c000200005436080 00003fff8dc5e000
GPR20: 0000400000000000 0000000000000000 c0002000097de4a0 006600cc00000000
GPR24: c000000001260985 0000000000000000 c0000000012a5b28 0000000000000000
GPR28: c000200009dcf710 c0000000012a5bc0 c00000000d966370 006600cc00000000
NIP [c0000000001398c4] .do_raw_spin_lock+0x14/0x1d0
LR [c000000000a9b6c0] ._raw_spin_lock+0x10/0x30
Call Trace:
[c000200009dcf1b0] [00000000000000c8] 0xc8 (unreliable)
[c000200009dcf230] [c00000000029d9d4] .finish_fault+0x3e4/0x4f0
[c000200009dcf2a0] [c000000000315d88] .__split_huge_pmd+0xe8/0x1190
[c000200009dcf430] [c00000000029a5bc] .unmap_page_range+0x43c/0xfe0
[c000200009dcf5c0] [c00000000029b618] .unmap_vmas+0xd8/0x200
[c000200009dcf6a0] [c0000000002a8324] .unmap_region+0xc4/0x160
[c000200009dcf7c0] [c0000000002ab5fc] .__do_munmap+0x1fc/0x5f0
[c000200009dcf880] [c0000000002aba70] .__vm_munmap+0x80/0x110
[c000200009dcf940] [c0000000003ef160] .elf_map+0xa0/0x120
[c000200009dcf9d0] [c0000000003f1168] .load_elf_binary+0xbf8/0x1fa0
[c000200009dcfb40] [c00000000034ecc8] .bprm_execve+0x2a8/0x700
[c000200009dcfc10] [c00000000034fcc8] .do_execveat_common.isra.0+0x188/0x230
[c000200009dcfcd0] [c000000000350dfc] .__se_sys_execve+0x3c/0x50
[c000200009dcfd40] [c00000000002de48] .system_call_exception+0x1c8/0x530
[c000200009dcfe10] [c00000000000c068] system_call_vectored_common+0xe8/0x278
--- interrupt: 3000 at 0x3fffbd817c0c
NIP: 00003fffbd817c0c LR: 0000000000000000 CTR: 0000000000000000
REGS: c000200009dcfe80 TRAP: 3000 Not tainted (5.15.10-gentoo-TalosII)
MSR: 900000000000f032 <SF,HV,EE,PR,FP,ME,IR,DR,RI> CR: 42220442 XER:
00000000
IRQMASK: 0
GPR00: 000000000000000b 00003fffbd12dd20 00003fffbd935300 000000002cbe3700
GPR04: 000000002cc377e0 000000002cbe2cc0 0000000000000008 0000000000000001
GPR08: 0000000000000001 0000000000000000 0000000000000000 0000000000000000
GPR12: 0000000000000000 00003fffbda03810 0000000000000000 0000000000000020
GPR16: 00000000100514a0 000000000000005c 0000000000000000 00000000100348d4
GPR20: 0000000000000000 00003fffbd125000 00003fffea78ba68 0000000000000000
GPR24: 00003fffbd12de10 0000000000000000 00003fffea78b638 00003fffea78ba18
GPR28: 000000002cc182c0 00003fffea78ba68 0000000000000001 0000000000100000
NIP [00003fffbd817c0c] 0x3fffbd817c0c
LR [0000000000000000] 0x0
--- interrupt: 3000
Instruction dump:
f9430010 792907c6 6529ffff 6129ffff f9230004 4e800020 60000000 fbe1fff8
f821ff81 3d20dead 7c7f1b78 61294ead <81430004> 7c0a4800 408200d4 e95f0010
---[ end trace 063d70c8fce39c11 ]---
# inxi -bZ
System: Host: T1000 Kernel: 5.15.10-TalosII ppc64 bits: 64 Console: tty 2
Distro: Gentoo Base System release 2.7
Machine: Type: PowerPC Device System: T2P9D01 REV 1.01 details: PowerNV
T2P9D01 REV 1.01 rev: 2.2 (pvr 004e 1202)
CPU: Info: 32-Core POWER9 altivec supported [MCP] speed: 2154 MHz
min/max: 2154/3800 MHz
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Turks XT [Radeon HD
6670/7670] driver: radeon v: kernel
Device-2: ASPEED Graphics Family driver: N/A
Display: server: X.org 1.20.14 driver: radeon tty: 211x57
Message: Advanced graphics data unavailable in console for root.
Network: Device-1: Broadcom and subsidiaries NetXtreme BCM5719 Gigabit
Ethernet PCIe driver: tg3
Device-2: Broadcom and subsidiaries NetXtreme BCM5719 Gigabit
Ethernet PCIe driver: tg3
Drives: Local Storage: total: 447.13 GiB used: 18.79 GiB (4.2%)
Info: Processes: 370 Uptime: 1h 10m Memory: 62.75 GiB used: 1.74 GiB
(2.8%) Init: systemd Shell: Bash inxi: 3.1.06
# lspci
0000:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0000:01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI]
Turks XT [Radeon HD 6670/7670]
0000:01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Turks HDMI
Audio [Radeon HD 6500/6600 / 6700M Series]
0001:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0001:01:00.0 Non-Volatile memory controller: Phison Electronics Corporation
Device 5008 (rev 01)
0002:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0003:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0003:01:00.0 USB controller: Texas Instruments TUSB73x0 SuperSpeed USB 3.0 xHCI
Host Controller (rev 02)
0004:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0004:01:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme
BCM5719 Gigabit Ethernet PCIe (rev 01)
0004:01:00.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme
BCM5719 Gigabit Ethernet PCIe (rev 01)
0005:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0005:01:00.0 PCI bridge: ASPEED Technology, Inc. AST1150 PCI-to-PCI Bridge (rev
04)
0005:02:00.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics
Family (rev 41)
0030:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0031:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0032:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
0033:00:00.0 PCI bridge: IBM POWER9 Host Bridge (PHB4)
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply
* Re: [PATCH 1/2] mm/cma: provide option to opt out from exposing pages on activation failure
From: David Hildenbrand @ 2021-12-21 18:48 UTC (permalink / raw)
To: Hari Bathini, akpm, linux-mm, mpe, linuxppc-dev
Cc: mike.kravetz, mahesh, sourabhjain, osalvador
In-Reply-To: <20211220193419.104242-2-hbathini@linux.ibm.com>
On 20.12.21 20:34, Hari Bathini wrote:
> Commit 072355c1cf2d ("mm/cma: expose all pages to the buddy if
> activation of an area fails") started exposing all pages to buddy
> allocator on CMA activation failure. But there can be CMA users that
> want to handle the reserved memory differently on CMA allocation
> failure. Provide an option to opt out from exposing pages to buddy
> for such cases.
Can you elaborate why that is important and what the target user can
actually do with it?
It certainly cannot do CMA allocations :)
--
Thanks,
David / dhildenb
^ permalink raw reply
* Re: [PATCH 4/8] sched: powerpc: Remove unused TASK_SIZE_OF
From: Christophe Leroy @ 2021-12-21 18:43 UTC (permalink / raw)
To: guoren@kernel.org, will@kernel.org, tglx@linutronix.de,
benh@kernel.crashing.org, arnd@arndb.de, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com
Cc: linux-s390@vger.kernel.org, Guo Ren, x86@kernel.org,
linux-mips@vger.kernel.org, sparclinux@vger.kernel.or,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linuxppc-dev@lists.ozlabs.org, inux-parisc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <20211221170057.2637763-5-guoren@kernel.org>
Le 21/12/2021 à 18:00, guoren@kernel.org a écrit :
> From: Guo Ren <guoren@linux.alibaba.com>
>
> This macro isn't used in Linux sched, now. Delete in
> include/linux/sched.h and arch's include/asm.
>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
> ---
> arch/powerpc/include/asm/task_size_64.h | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/task_size_64.h b/arch/powerpc/include/asm/task_size_64.h
> index c993482237ed..7e2eca4fac4d 100644
> --- a/arch/powerpc/include/asm/task_size_64.h
> +++ b/arch/powerpc/include/asm/task_size_64.h
> @@ -44,12 +44,10 @@
> */
> #define TASK_SIZE_USER32 (0x0000000100000000UL - (1 * PAGE_SIZE))
>
> -#define TASK_SIZE_OF(tsk) \
> - (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
> +#define TASK_SIZE \
> + (test_tsk_thread_flag(current, TIF_32BIT) ? TASK_SIZE_USER32 : \
> TASK_SIZE_USER64)
I think you should use test_thread_flag() instead.
Or even better: use is_32bit_task() and bring back this macro as a
single line, something like:
#define TASK_SIZE (is_32bit_task() ? TASK_SIZE_USER32 : TASK_SIZE_USER64)
>
> -#define TASK_SIZE TASK_SIZE_OF(current)
> -
> #define TASK_UNMAPPED_BASE_USER32 (PAGE_ALIGN(TASK_SIZE_USER32 / 4))
> #define TASK_UNMAPPED_BASE_USER64 (PAGE_ALIGN(DEFAULT_MAP_WINDOW_USER64 / 4))
>
>
^ permalink raw reply
* Re: [PATCH 1/8] sched: Remove unused TASK_SIZE_OF
From: Arnd Bergmann @ 2021-12-21 17:28 UTC (permalink / raw)
To: Guo Ren
Cc: Juri Lelli, linux-s390, the arch/x86 maintainers, Arnd Bergmann,
Peter Zijlstra, linuxppc-dev, Guo Ren, Linux Kernel Mailing List,
sparclinux, inux-parisc, Ingo Molnar, Thomas Gleixner,
open list:BROADCOM NVRAM DRIVER, Will Deacon, linux-riscv,
Linux ARM
In-Reply-To: <20211221170057.2637763-2-guoren@kernel.org>
On Tue, Dec 21, 2021 at 6:00 PM <guoren@kernel.org> wrote:
>
> From: Guo Ren <guoren@linux.alibaba.com>
>
> This macro isn't used in Linux, now. Delete in include/linux/sched.h
> and arch's include/asm. This would confuse people who are
> implementing the COMPAT feature for architecture.
>
> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
It would help to list how long it has been unused for. Looking through
the git history, I see commit a06db751c321 ("pagemap: check
permissions and capabilities at open time") removing the last user.
I would normally offer to take the entire series through the asm-generic
tree, as I do for this kind of cross-architecture work. I'll probably
not have time before the merge window to pick it up though, so it
may be better to go through the architecture trees, or possibly
linux-mm for anything that fails to get picked up.
For the series:
Review-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox