Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-05 Thread Segher Boessenkool
On Mon, Jul 04, 2022 at 12:34:08PM +, Christophe Leroy wrote: > Le 04/07/2022 à 13:45, Peter Zijlstra a écrit : > > I'm somewhat confused; how is an empty STT_FUNC a valid construct on > > Power? > > So am I. It is likely not a valid construct, but that's what GCC seems > to generate when you

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-04 Thread Peter Zijlstra
On Mon, Jul 04, 2022 at 12:44:30PM +, Christophe Leroy wrote: > > > Le 04/07/2022 à 14:05, Peter Zijlstra a écrit : > > On Sat, Jun 25, 2022 at 06:46:54AM +, Christophe Leroy wrote: > >> > >> > >> Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : > >>> objtool is throwing *unannotated i

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-04 Thread Christophe Leroy
Le 04/07/2022 à 14:05, Peter Zijlstra a écrit : > On Sat, Jun 25, 2022 at 06:46:54AM +, Christophe Leroy wrote: >> >> >> Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : >>> objtool is throwing *unannotated intra-function call* >>> warnings with a few instructions that are marked >>> unrea

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-04 Thread Christophe Leroy
Le 04/07/2022 à 13:45, Peter Zijlstra a écrit : > On Wed, Jun 29, 2022 at 06:30:23PM +, Christophe Leroy wrote: > > >> The problem is that that function has size 0: >> >> 03d0 l F .text >> qdisc_root_sleeping_lock.part.0 > > I'm somewhat confused; how

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-04 Thread Peter Zijlstra
On Sat, Jun 25, 2022 at 06:46:54AM +, Christophe Leroy wrote: > > > Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : > > objtool is throwing *unannotated intra-function call* > > warnings with a few instructions that are marked > > unreachable. Remove unreachable() from WARN_ON() > > to fi

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-04 Thread Peter Zijlstra
On Thu, Jun 30, 2022 at 10:58:11AM -0500, Segher Boessenkool wrote: > On Thu, Jun 30, 2022 at 04:07:47PM +0530, Naveen N. Rao wrote: > > Objtool classifies 'ud2' as INSN_BUG, and 'int3' as INSN_TRAP. In x86 > > BUG(), there is no need for an annotation since objtool assumes that > > 'ud2' termina

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-04 Thread Peter Zijlstra
On Wed, Jun 29, 2022 at 06:30:23PM +, Christophe Leroy wrote: > The problem is that that function has size 0: > > 03d0 l F .text > qdisc_root_sleeping_lock.part.0 I'm somewhat confused; how is an empty STT_FUNC a valid construct on Power?

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-07-04 Thread Peter Zijlstra
On Thu, Jun 30, 2022 at 04:07:47PM +0530, Naveen N. Rao wrote: > Objtool classifies 'ud2' as INSN_BUG, and 'int3' as INSN_TRAP. In x86 BUG(), Yes, ud2 is the traditional 'kill' instruction and a number of emulators treat it as such, however it also being the shortest encoding (2 bytes) for #UD Li

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON() (gcc issue ?)

2022-07-01 Thread Christophe Leroy
Hi Segher, your help might be welcome, Le 01/07/2022 à 08:56, Sathvika Vasireddy a écrit : > Hi Chen, > > Thanks for pitching in and providing your inputs :-) > > On 01/07/22 07:43, Chen Zhongjin wrote: >> Hi everyone, >> >> Hope I'm not too late for this discussion. >> >> I'm not familiar with

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-30 Thread Sathvika Vasireddy
Hi Chen, Thanks for pitching in and providing your inputs :-) On 01/07/22 07:43, Chen Zhongjin wrote: Hi everyone, Hope I'm not too late for this discussion. I'm not familiar with ppc so it spent me some time to reproduce this. But at last I didn't make it. What I did: 1 checkout to tip/o

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-30 Thread Segher Boessenkool
On Thu, Jun 30, 2022 at 04:07:47PM +0530, Naveen N. Rao wrote: > Objtool classifies 'ud2' as INSN_BUG, and 'int3' as INSN_TRAP. In x86 > BUG(), there is no need for an annotation since objtool assumes that > 'ud2' terminates control flow. But, for __WARN_FLAGS(), since 'ud2' is > used, an explic

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-30 Thread Naveen N. Rao
Christophe Leroy wrote: Le 30/06/2022 à 10:05, Naveen N. Rao a écrit : Christophe Leroy wrote: The builtin variant of unreachable (__builtin_unreachable()) works. How about using that instead of unreachable() ? In fact the problem comes from the macro annotate_unreachable() which is cal

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-30 Thread Christophe Leroy
Le 30/06/2022 à 11:58, Christophe Leroy a écrit : Le 30/06/2022 à 10:05, Naveen N. Rao a écrit : Christophe Leroy wrote: Hi Sathvika, Adding ARM people as they seem to face the same kind of problem (see https://patchwork.kernel.org/project/linux-kbuild/patch/20220623014917.199563-33-chen

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-30 Thread Christophe Leroy
Le 30/06/2022 à 10:05, Naveen N. Rao a écrit : > Christophe Leroy wrote: >> Hi Sathvika, >> >> Adding ARM people as they seem to face the same kind of problem (see >> https://patchwork.kernel.org/project/linux-kbuild/patch/20220623014917.199563-33-chenzhong...@huawei.com/) >> >> >> >> Le 27/06

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-30 Thread Naveen N. Rao
Christophe Leroy wrote: Hi Sathvika, Adding ARM people as they seem to face the same kind of problem (see https://patchwork.kernel.org/project/linux-kbuild/patch/20220623014917.199563-33-chenzhong...@huawei.com/) Le 27/06/2022 à 17:35, Sathvika Vasireddy a écrit : On 25/06/22 12:16, Christo

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-29 Thread Christophe Leroy
Hi Sathvika, Adding ARM people as they seem to face the same kind of problem (see https://patchwork.kernel.org/project/linux-kbuild/patch/20220623014917.199563-33-chenzhong...@huawei.com/) Le 27/06/2022 à 17:35, Sathvika Vasireddy a écrit : > > On 25/06/22 12:16, Christophe Leroy wrote: >> >> L

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-27 Thread Sathvika Vasireddy
On 25/06/22 12:16, Christophe Leroy wrote: Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : objtool is throwing *unannotated intra-function call* warnings with a few instructions that are marked unreachable. Remove unreachable() from WARN_ON() to fix these warnings, as the codegen remains s

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-27 Thread Christophe Leroy
Le 27/06/2022 à 17:35, Sathvika Vasireddy a écrit : > > On 25/06/22 12:16, Christophe Leroy wrote: >> >> Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : >>> objtool is throwing *unannotated intra-function call* >>> warnings with a few instructions that are marked >>> unreachable. Remove unre

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-27 Thread Sathvika Vasireddy
On 25/06/22 12:16, Christophe Leroy wrote: Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : objtool is throwing *unannotated intra-function call* warnings with a few instructions that are marked unreachable. Remove unreachable() from WARN_ON() to fix these warnings, as the codegen remains

Re: [RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-24 Thread Christophe Leroy
Le 24/06/2022 à 20:32, Sathvika Vasireddy a écrit : > objtool is throwing *unannotated intra-function call* > warnings with a few instructions that are marked > unreachable. Remove unreachable() from WARN_ON() > to fix these warnings, as the codegen remains same > with and without unreachable() i

[RFC PATCH v3 11/12] powerpc: Remove unreachable() from WARN_ON()

2022-06-24 Thread Sathvika Vasireddy
objtool is throwing *unannotated intra-function call* warnings with a few instructions that are marked unreachable. Remove unreachable() from WARN_ON() to fix these warnings, as the codegen remains same with and without unreachable() in WARN_ON(). Signed-off-by: Sathvika Vasireddy --- arch/power