Re: -freg-struct-return?
> To some degree linux-arch would be a good list for it, but it's closed, > even to monitor. linux-arch is only for architecture code, but yes it serves a similar purpose. But it's very specialized. What is discussed there is unlikely to be of much interest to most people. I was thinking of a relatively low volume list where quick notes for any general interfaces changes that likely needs adaptions in a wide range of code could be sent. Then even people who cannot follow l-k or git due to volume could subscribe to that and adapt their code as needed. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Jan Engelhardt wrote: On Feb 22 2007 19:36, Andi Kleen wrote: BTW would it make sense to have a special announcement list for such changes? A changelog in the kernel tree would be helpful. A real changelog that is, not that info blob located at /Documentation/Changes. I presume you're talking about a BSD-style ChangeLog. I've always found those utterly useless, since they're basically the equivalent of SCM history but without any of the abilities to sort, filter, etc, thus making it utterly impossible to find anything. They're a pain to maintain (they inherently *always* cause merge failures) and add very little. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Feb 22 2007 19:36, Andi Kleen wrote: > >BTW would it make sense to have a special announcement list for such changes? A changelog in the kernel tree would be helpful. A real changelog that is, not that info blob located at /Documentation/Changes. Jan -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Andi Kleen wrote: On Thu, Feb 22, 2007 at 09:39:04AM -0800, Jeremy Fitzhardinge wrote: H. Peter Anvin wrote: Sometimes returning small structures is really nice. If you can pass them in registers, it's often generates the fastest possible code; much better than using a pointer. Yes, but specifically, are there any pieces of assembler which return structures? It appears there are none (since Ingo got a booting kernel), but there might be something obscure in some corner. When I did the x86-64 port I went over all assembler and I can't remember anything that did that. Of course there might be out of tree drivers that do, but they just have to fix it up. BTW would it make sense to have a special announcement list for such changes? To some degree linux-arch would be a good list for it, but it's closed, even to monitor. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Thu, Feb 22, 2007 at 09:39:04AM -0800, Jeremy Fitzhardinge wrote: > H. Peter Anvin wrote: > > Sometimes returning small structures is really nice. If you can pass > > them in registers, it's often generates the fastest possible code; > > much better than using a pointer. > > Yes, but specifically, are there any pieces of assembler which return > structures? It appears there are none (since Ingo got a booting > kernel), but there might be something obscure in some corner. When I did the x86-64 port I went over all assembler and I can't remember anything that did that. Of course there might be out of tree drivers that do, but they just have to fix it up. BTW would it make sense to have a special announcement list for such changes? -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
H. Peter Anvin wrote: > Sometimes returning small structures is really nice. If you can pass > them in registers, it's often generates the fastest possible code; > much better than using a pointer. Yes, but specifically, are there any pieces of assembler which return structures? It appears there are none (since Ingo got a booting kernel), but there might be something obscure in some corner. J - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Andi Kleen wrote: I didn't think we had any that returned structures. Sometimes returning small structures is really nice. If you can pass them in registers, it's often generates the fastest possible code; much better than using a pointer. -hpa - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Thu, Feb 22, 2007 at 12:09:04AM -0800, Jeremy Fitzhardinge wrote: > Arjan van de Ven wrote: > > Do we know how many gcc bugs this has? (regparm used to have many) > > other than that.. sounds like a win... > > > > The documentation suggests that its the preferred mode of operation, and > that its the default on platforms where gcc is the primary compiler. So > the fact that it isn't for Linux suggests either an oversight or that it > is actually broken... > > Do we have much assembler which cares about the struct return calling > convention? If not, it should be a fairly easy test. I didn't think we had any that returned structures. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Thu, Feb 22, 2007 at 12:09:04AM -0800, Jeremy Fitzhardinge wrote: > Arjan van de Ven wrote: > > Do we know how many gcc bugs this has? (regparm used to have many) > > other than that.. sounds like a win... > > > > The documentation suggests that its the preferred mode of operation, and > that its the default on platforms where gcc is the primary compiler. So > the fact that it isn't for Linux suggests either an oversight or that it > is actually broken... It is used for Linux on many architectures (x86_64, sparc64, ia64, ppc{,64}, arm, sh, m68k to name just a few), but it is an ABI decision, so e.g. on i386 is not used by default as the ABI mandates structs/unions are returned in memory. Jakub - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
* Arjan van de Ven <[EMAIL PROTECTED]> wrote: > > Do we have much assembler which cares about the struct return > > calling convention? If not, it should be a fairly easy test. > > is there an attribute to turn it off? because if so we should just > make that part of "asmlinkage" (not that I know much code using > structs in asm) i dont know of any such code - asmlinkage is 'long' or pointer based. Ingo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Arjan van de Ven wrote: >> Do we have much assembler which cares about the struct return calling >> convention? If not, it should be a fairly easy test. >> > > is there an attribute to turn it off? because if so we should just make > that part of "asmlinkage" (not that I know much code using structs > in asm) > There doesn't appear to be; just -freg-struct-return and -fpcc-struct-return. J - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
> Do we have much assembler which cares about the struct return calling > convention? If not, it should be a fairly easy test. is there an attribute to turn it off? because if so we should just make that part of "asmlinkage" (not that I know much code using structs in asm) -- if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Arjan van de Ven wrote: > Do we know how many gcc bugs this has? (regparm used to have many) > other than that.. sounds like a win... > The documentation suggests that its the preferred mode of operation, and that its the default on platforms where gcc is the primary compiler. So the fact that it isn't for Linux suggests either an oversight or that it is actually broken... Do we have much assembler which cares about the struct return calling convention? If not, it should be a fairly easy test. J - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Wed, 2007-02-21 at 17:28 -0800, Jeremy Fitzhardinge wrote: > We have a number of functions which return small structures (such as > pte_t). It seems that the kernel is not compiled with > -freg-struct-return, so all these small structures are being returned > via the stack, even though they would fit into registers. > > Is there a reason for this? Would -freg-struct-return be preferred? It > would make a good compliment to -mregparm. Do we know how many gcc bugs this has? (regparm used to have many) other than that.. sounds like a win... -- if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Wed, 2007-02-21 at 17:28 -0800, Jeremy Fitzhardinge wrote: We have a number of functions which return small structures (such as pte_t). It seems that the kernel is not compiled with -freg-struct-return, so all these small structures are being returned via the stack, even though they would fit into registers. Is there a reason for this? Would -freg-struct-return be preferred? It would make a good compliment to -mregparm. Do we know how many gcc bugs this has? (regparm used to have many) other than that.. sounds like a win... -- if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Arjan van de Ven wrote: Do we know how many gcc bugs this has? (regparm used to have many) other than that.. sounds like a win... The documentation suggests that its the preferred mode of operation, and that its the default on platforms where gcc is the primary compiler. So the fact that it isn't for Linux suggests either an oversight or that it is actually broken... Do we have much assembler which cares about the struct return calling convention? If not, it should be a fairly easy test. J - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Do we have much assembler which cares about the struct return calling convention? If not, it should be a fairly easy test. is there an attribute to turn it off? because if so we should just make that part of asmlinkage (not that I know much code using structs in asm) -- if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Arjan van de Ven wrote: Do we have much assembler which cares about the struct return calling convention? If not, it should be a fairly easy test. is there an attribute to turn it off? because if so we should just make that part of asmlinkage (not that I know much code using structs in asm) There doesn't appear to be; just -freg-struct-return and -fpcc-struct-return. J - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
* Arjan van de Ven [EMAIL PROTECTED] wrote: Do we have much assembler which cares about the struct return calling convention? If not, it should be a fairly easy test. is there an attribute to turn it off? because if so we should just make that part of asmlinkage (not that I know much code using structs in asm) i dont know of any such code - asmlinkage is 'long' or pointer based. Ingo - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Thu, Feb 22, 2007 at 12:09:04AM -0800, Jeremy Fitzhardinge wrote: Arjan van de Ven wrote: Do we know how many gcc bugs this has? (regparm used to have many) other than that.. sounds like a win... The documentation suggests that its the preferred mode of operation, and that its the default on platforms where gcc is the primary compiler. So the fact that it isn't for Linux suggests either an oversight or that it is actually broken... It is used for Linux on many architectures (x86_64, sparc64, ia64, ppc{,64}, arm, sh, m68k to name just a few), but it is an ABI decision, so e.g. on i386 is not used by default as the ABI mandates structs/unions are returned in memory. Jakub - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Thu, Feb 22, 2007 at 12:09:04AM -0800, Jeremy Fitzhardinge wrote: Arjan van de Ven wrote: Do we know how many gcc bugs this has? (regparm used to have many) other than that.. sounds like a win... The documentation suggests that its the preferred mode of operation, and that its the default on platforms where gcc is the primary compiler. So the fact that it isn't for Linux suggests either an oversight or that it is actually broken... Do we have much assembler which cares about the struct return calling convention? If not, it should be a fairly easy test. I didn't think we had any that returned structures. -Andi - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Andi Kleen wrote: I didn't think we had any that returned structures. Sometimes returning small structures is really nice. If you can pass them in registers, it's often generates the fastest possible code; much better than using a pointer. -hpa - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
H. Peter Anvin wrote: Sometimes returning small structures is really nice. If you can pass them in registers, it's often generates the fastest possible code; much better than using a pointer. Yes, but specifically, are there any pieces of assembler which return structures? It appears there are none (since Ingo got a booting kernel), but there might be something obscure in some corner. J - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Thu, Feb 22, 2007 at 09:39:04AM -0800, Jeremy Fitzhardinge wrote: H. Peter Anvin wrote: Sometimes returning small structures is really nice. If you can pass them in registers, it's often generates the fastest possible code; much better than using a pointer. Yes, but specifically, are there any pieces of assembler which return structures? It appears there are none (since Ingo got a booting kernel), but there might be something obscure in some corner. When I did the x86-64 port I went over all assembler and I can't remember anything that did that. Of course there might be out of tree drivers that do, but they just have to fix it up. BTW would it make sense to have a special announcement list for such changes? -Andi - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Andi Kleen wrote: On Thu, Feb 22, 2007 at 09:39:04AM -0800, Jeremy Fitzhardinge wrote: H. Peter Anvin wrote: Sometimes returning small structures is really nice. If you can pass them in registers, it's often generates the fastest possible code; much better than using a pointer. Yes, but specifically, are there any pieces of assembler which return structures? It appears there are none (since Ingo got a booting kernel), but there might be something obscure in some corner. When I did the x86-64 port I went over all assembler and I can't remember anything that did that. Of course there might be out of tree drivers that do, but they just have to fix it up. BTW would it make sense to have a special announcement list for such changes? To some degree linux-arch would be a good list for it, but it's closed, even to monitor. -hpa - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
On Feb 22 2007 19:36, Andi Kleen wrote: BTW would it make sense to have a special announcement list for such changes? A changelog in the kernel tree would be helpful. A real changelog that is, not that info blob located at /Documentation/Changes. Jan -- - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
Jan Engelhardt wrote: On Feb 22 2007 19:36, Andi Kleen wrote: BTW would it make sense to have a special announcement list for such changes? A changelog in the kernel tree would be helpful. A real changelog that is, not that info blob located at /Documentation/Changes. I presume you're talking about a BSD-style ChangeLog. I've always found those utterly useless, since they're basically the equivalent of SCM history but without any of the abilities to sort, filter, etc, thus making it utterly impossible to find anything. They're a pain to maintain (they inherently *always* cause merge failures) and add very little. -hpa - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: -freg-struct-return?
To some degree linux-arch would be a good list for it, but it's closed, even to monitor. linux-arch is only for architecture code, but yes it serves a similar purpose. But it's very specialized. What is discussed there is unlikely to be of much interest to most people. I was thinking of a relatively low volume list where quick notes for any general interfaces changes that likely needs adaptions in a wide range of code could be sent. Then even people who cannot follow l-k or git due to volume could subscribe to that and adapt their code as needed. -Andi - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/