On 06/08/16 02:39, Peter Zijlstra wrote:
>
> So I think using bool as return type or argument is fine, using it in
> structures is 'insane'.
>
Yes, scalar use only, and not across the kernel boundary, please.
-hpa
On 06/08/16 02:39, Peter Zijlstra wrote:
>
> So I think using bool as return type or argument is fine, using it in
> structures is 'insane'.
>
Yes, scalar use only, and not across the kernel boundary, please.
-hpa
On 06/08/16 02:20, Ingo Molnar wrote:
>
> Also, unless I'm missing something it's not really 'hard' or dangerous per se
> to
> do that change for every architecture, just incredibly boring! ;-)
>
> I'm not sure how much it matters though, given other asymmetries in the
> bitops API
>
On 06/08/16 02:20, Ingo Molnar wrote:
>
> Also, unless I'm missing something it's not really 'hard' or dangerous per se
> to
> do that change for every architecture, just incredibly boring! ;-)
>
> I'm not sure how much it matters though, given other asymmetries in the
> bitops API
>
On Wed, Jun 08, 2016 at 02:31:31AM -0700, H. Peter Anvin wrote:
> On 06/08/16 02:20, Ingo Molnar wrote:
> >
> > Yeah, absolutely. I hate 'bool' with a vengence but if 'int' generates
> > worse code
> > with modern compilers then I'm not going to argue for worse code. Would a
> > 'char'
> >
On Wed, Jun 08, 2016 at 02:31:31AM -0700, H. Peter Anvin wrote:
> On 06/08/16 02:20, Ingo Molnar wrote:
> >
> > Yeah, absolutely. I hate 'bool' with a vengence but if 'int' generates
> > worse code
> > with modern compilers then I'm not going to argue for worse code. Would a
> > 'char'
> >
On 06/08/16 02:20, Ingo Molnar wrote:
>
> Yeah, absolutely. I hate 'bool' with a vengence but if 'int' generates worse
> code
> with modern compilers then I'm not going to argue for worse code. Would a
> 'char'
> return type be very weird?
>
Yes. I have to admit I don't share your hatred
On 06/08/16 02:20, Ingo Molnar wrote:
>
> Yeah, absolutely. I hate 'bool' with a vengence but if 'int' generates worse
> code
> with modern compilers then I'm not going to argue for worse code. Would a
> 'char'
> return type be very weird?
>
Yes. I have to admit I don't share your hatred
* H. Peter Anvin wrote:
> On 06/08/16 02:01, Ingo Molnar wrote:
> >
> > That's a divergence with an underlying reason - but not harmonizing the
> > return
> > code is an unforced error AFAICS and can be fixed.
> >
>
> Perhaps. It is also no real question that "bool" is the
* H. Peter Anvin wrote:
> On 06/08/16 02:01, Ingo Molnar wrote:
> >
> > That's a divergence with an underlying reason - but not harmonizing the
> > return
> > code is an unforced error AFAICS and can be fixed.
> >
>
> Perhaps. It is also no real question that "bool" is the right return
>
On 06/08/16 02:01, Ingo Molnar wrote:
>
> That's a divergence with an underlying reason - but not harmonizing the
> return
> code is an unforced error AFAICS and can be fixed.
>
Perhaps. It is also no real question that "bool" is the right return
type for a single bit. Changing that in all
On 06/08/16 02:01, Ingo Molnar wrote:
>
> That's a divergence with an underlying reason - but not harmonizing the
> return
> code is an unforced error AFAICS and can be fixed.
>
Perhaps. It is also no real question that "bool" is the right return
type for a single bit. Changing that in all
* H. Peter Anvin wrote:
> On 06/08/16 01:28, Ingo Molnar wrote:
> >
> > It does matter:
> >
> > In file included from arch/x86/kernel/cpu/common.c:21:0:
> > ./arch/x86/include/asm/archrandom.h:95:20: error: redefinition of
> > ‘arch_get_random_long’
> > static inline bool
* H. Peter Anvin wrote:
> On 06/08/16 01:28, Ingo Molnar wrote:
> >
> > It does matter:
> >
> > In file included from arch/x86/kernel/cpu/common.c:21:0:
> > ./arch/x86/include/asm/archrandom.h:95:20: error: redefinition of
> > ‘arch_get_random_long’
> > static inline bool
* H. Peter Anvin wrote:
> On 06/08/16 01:33, Ingo Molnar wrote:
> >
> > Note that this particular build error was introduced by b0bdba9825fe, a
> > later
> > patch in this series - but in generaly I'm uneasy about allowing function
> > signatures diverge between
* H. Peter Anvin wrote:
> On 06/08/16 01:33, Ingo Molnar wrote:
> >
> > Note that this particular build error was introduced by b0bdba9825fe, a
> > later
> > patch in this series - but in generaly I'm uneasy about allowing function
> > signatures diverge between architectures.
> >
>
> For
On 06/08/16 01:28, Ingo Molnar wrote:
>
> It does matter:
>
> In file included from arch/x86/kernel/cpu/common.c:21:0:
> ./arch/x86/include/asm/archrandom.h:95:20: error: redefinition of
> ‘arch_get_random_long’
> static inline bool arch_get_random_long(unsigned long *v)
> In file included
On 06/08/16 01:28, Ingo Molnar wrote:
>
> It does matter:
>
> In file included from arch/x86/kernel/cpu/common.c:21:0:
> ./arch/x86/include/asm/archrandom.h:95:20: error: redefinition of
> ‘arch_get_random_long’
> static inline bool arch_get_random_long(unsigned long *v)
> In file included
On 06/08/16 01:33, Ingo Molnar wrote:
>
> Note that this particular build error was introduced by b0bdba9825fe, a later
> patch in this series - but in generaly I'm uneasy about allowing function
> signatures diverge between architectures.
>
For the bitops, they already do: PowerPC, for
On 06/08/16 01:33, Ingo Molnar wrote:
>
> Note that this particular build error was introduced by b0bdba9825fe, a later
> patch in this series - but in generaly I'm uneasy about allowing function
> signatures diverge between architectures.
>
For the bitops, they already do: PowerPC, for
* Ingo Molnar wrote:
>
> * Peter Zijlstra wrote:
>
> > On Tue, Jun 07, 2016 at 04:31:01PM -0700, H. Peter Anvin wrote:
> > > From: "H. Peter Anvin"
> > >
> > > The gcc people have confirmed that using "bool" when combined with
> > >
* Ingo Molnar wrote:
>
> * Peter Zijlstra wrote:
>
> > On Tue, Jun 07, 2016 at 04:31:01PM -0700, H. Peter Anvin wrote:
> > > From: "H. Peter Anvin"
> > >
> > > The gcc people have confirmed that using "bool" when combined with
> > > inline assembly always is treated as a byte-sized operand
* Peter Zijlstra wrote:
> On Tue, Jun 07, 2016 at 04:31:01PM -0700, H. Peter Anvin wrote:
> > From: "H. Peter Anvin"
> >
> > The gcc people have confirmed that using "bool" when combined with
> > inline assembly always is treated as a byte-sized operand
* Peter Zijlstra wrote:
> On Tue, Jun 07, 2016 at 04:31:01PM -0700, H. Peter Anvin wrote:
> > From: "H. Peter Anvin"
> >
> > The gcc people have confirmed that using "bool" when combined with
> > inline assembly always is treated as a byte-sized operand that can be
> > assumed to be 0 or 1,
On Tue, Jun 07, 2016 at 04:31:01PM -0700, H. Peter Anvin wrote:
> From: "H. Peter Anvin"
>
> The gcc people have confirmed that using "bool" when combined with
> inline assembly always is treated as a byte-sized operand that can be
> assumed to be 0 or 1, which is exactly what
On Tue, Jun 07, 2016 at 04:31:01PM -0700, H. Peter Anvin wrote:
> From: "H. Peter Anvin"
>
> The gcc people have confirmed that using "bool" when combined with
> inline assembly always is treated as a byte-sized operand that can be
> assumed to be 0 or 1, which is exactly what the SET
From: "H. Peter Anvin"
The gcc people have confirmed that using "bool" when combined with
inline assembly always is treated as a byte-sized operand that can be
assumed to be 0 or 1, which is exactly what the SET instruction
emits. Change the output types and intermediate
From: "H. Peter Anvin"
The gcc people have confirmed that using "bool" when combined with
inline assembly always is treated as a byte-sized operand that can be
assumed to be 0 or 1, which is exactly what the SET instruction
emits. Change the output types and intermediate variables of as many
28 matches
Mail list logo