All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] Problem in compiling without optimisations
@ 2006-05-22 14:11 Nikola Knezevic
  2006-05-22 14:50 ` [uml-devel] " Nikola Knezevic
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nikola Knezevic @ 2006-05-22 14:11 UTC (permalink / raw)
  To: user-mode-linux-devel

Hi all,
When I change Makefile to have -O0 instead of -O2, this is what I get
after make ARCH=um:

  CC      arch/um/kernel/skas/clone.o
arch/um/include/sysdep/stub.h: In function 'remap_stack':
arch/um/include/sysdep/stub.h:90: warning: asm operand 7 probably
doesn't match constraints
arch/um/include/sysdep/stub.h:90: error: impossible constraint in 'asm'
make[2]: *** [arch/um/kernel/skas/clone.o] Error 1
make[1]: *** [arch/um/kernel/skas] Error 2
make: *** [arch/um/kernel] Error 2

This is the culprit:
static inline void remap_stack(int fd, unsigned long offset)
{
        __asm__ volatile ("movl %%eax,%%ebp ; movl %0,%%eax ; int $0x80 ;"
                          "movl %7, %%ebx ; movl %%eax, (%%ebx)"
                          : : "g" (STUB_MMAP_NR), "b" (UML_CONFIG_STUB_DATA),
                            "c" (UM_KERN_PAGE_SIZE),
                            "d" (PROT_READ | PROT_WRITE),
                            "S" (MAP_FIXED | MAP_SHARED), "D" (fd),
                            "a" (offset),
                            "i" (&((struct stub_data *)
UML_CONFIG_STUB_DATA)->err)
                          : "memory");
}


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [uml-devel] Re: Problem in compiling without optimisations
  2006-05-22 14:11 [uml-devel] Problem in compiling without optimisations Nikola Knezevic
@ 2006-05-22 14:50 ` Nikola Knezevic
  2006-05-22 17:12   ` Jeff Dike
  2006-05-22 15:08 ` [uml-devel] " Jeff Dike
  2006-06-01 19:07 ` Blaisorblade
  2 siblings, 1 reply; 5+ messages in thread
From: Nikola Knezevic @ 2006-05-22 14:50 UTC (permalink / raw)
  To: user-mode-linux-devel

On 5/22/06, Nikola Knezevic <laladelausanne@gmail.com> wrote:
> This is the culprit:
> static inline void remap_stack(int fd, unsigned long offset)
> {
>         __asm__ volatile ("movl %%eax,%%ebp ; movl %0,%%eax ; int $0x80 ;"
>                           "movl %7, %%ebx ; movl %%eax, (%%ebx)"
>                           : : "g" (STUB_MMAP_NR), "b" (UML_CONFIG_STUB_DATA),
>                             "c" (UM_KERN_PAGE_SIZE),
>                             "d" (PROT_READ | PROT_WRITE),
>                             "S" (MAP_FIXED | MAP_SHARED), "D" (fd),
>                             "a" (offset),
>                             "i" (&((struct stub_data *)
> UML_CONFIG_STUB_DATA)->err)
>                           : "memory");
> }

Well, after reading about asm constrains, solution was to change that
"i" to "g". Now, there are other problem, regarding inline functions
and their ordering. Related to kernel in whole: has anyone ever tried
to compile it without optimisations?

Cheers,
Nikola


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [uml-devel] Problem in compiling without optimisations
  2006-05-22 14:11 [uml-devel] Problem in compiling without optimisations Nikola Knezevic
  2006-05-22 14:50 ` [uml-devel] " Nikola Knezevic
@ 2006-05-22 15:08 ` Jeff Dike
  2006-06-01 19:07 ` Blaisorblade
  2 siblings, 0 replies; 5+ messages in thread
From: Jeff Dike @ 2006-05-22 15:08 UTC (permalink / raw)
  To: Nikola Knezevic; +Cc: user-mode-linux-devel

On Mon, May 22, 2006 at 04:11:11PM +0200, Nikola Knezevic wrote:
> Hi all,
> When I change Makefile to have -O0 instead of -O2, this is what I get
> after make ARCH=um:

I don't think the kernel will build at all with -O0.

				Jeff


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [uml-devel] Re: Problem in compiling without optimisations
  2006-05-22 14:50 ` [uml-devel] " Nikola Knezevic
@ 2006-05-22 17:12   ` Jeff Dike
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff Dike @ 2006-05-22 17:12 UTC (permalink / raw)
  To: Nikola Knezevic; +Cc: user-mode-linux-devel

On Mon, May 22, 2006 at 04:50:57PM +0200, Nikola Knezevic wrote:
> On 5/22/06, Nikola Knezevic <laladelausanne@gmail.com> wrote:
> >This is the culprit:
> >static inline void remap_stack(int fd, unsigned long offset)
> >{
> >        __asm__ volatile ("movl %%eax,%%ebp ; movl %0,%%eax ; int $0x80 ;"
> >                          "movl %7, %%ebx ; movl %%eax, (%%ebx)"
> >                          : : "g" (STUB_MMAP_NR), "b" 
> >                          (UML_CONFIG_STUB_DATA),
> >                            "c" (UM_KERN_PAGE_SIZE),
> >                            "d" (PROT_READ | PROT_WRITE),
> >                            "S" (MAP_FIXED | MAP_SHARED), "D" (fd),
> >                            "a" (offset),
> >                            "i" (&((struct stub_data *)
> >UML_CONFIG_STUB_DATA)->err)
> >                          : "memory");
> >}
> 
> Well, after reading about asm constrains, solution was to change that
> "i" to "g". 

Checking my fuzzy recollection of asm constraints -
	"i" means immediate, i.e. a compile-time constant and "g" means
anything?  So, "i" breaks when gcc isn't trying hard enough to turn that
expression into a constant.

If so, it doesn't look worth changing.

				Jeff


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [uml-devel] Problem in compiling without optimisations
  2006-05-22 14:11 [uml-devel] Problem in compiling without optimisations Nikola Knezevic
  2006-05-22 14:50 ` [uml-devel] " Nikola Knezevic
  2006-05-22 15:08 ` [uml-devel] " Jeff Dike
@ 2006-06-01 19:07 ` Blaisorblade
  2 siblings, 0 replies; 5+ messages in thread
From: Blaisorblade @ 2006-06-01 19:07 UTC (permalink / raw)
  To: user-mode-linux-devel; +Cc: Nikola Knezevic

On Monday 22 May 2006 16:11, Nikola Knezevic wrote:
> Hi all,
> When I change Makefile to have -O0 instead of -O2, this is what I get
> after make ARCH=um:

There are other spots where -O0 would lead to failure; search for -O0 on the 
ML, I remember that adding -finline and something else made it work (IIRC 
2.6.15 time), and this code was present.

>   CC      arch/um/kernel/skas/clone.o
> arch/um/include/sysdep/stub.h: In function 'remap_stack':
> arch/um/include/sysdep/stub.h:90: warning: asm operand 7 probably
> doesn't match constraints
> arch/um/include/sysdep/stub.h:90: error: impossible constraint in 'asm'
> make[2]: *** [arch/um/kernel/skas/clone.o] Error 1
> make[1]: *** [arch/um/kernel/skas] Error 2
> make: *** [arch/um/kernel] Error 2
>
> This is the culprit:
> static inline void remap_stack(int fd, unsigned long offset)
> {
>         __asm__ volatile ("movl %%eax,%%ebp ; movl %0,%%eax ; int $0x80 ;"
>                           "movl %7, %%ebx ; movl %%eax, (%%ebx)"
>
>                           : : "g" (STUB_MMAP_NR), "b"
>                           : : (UML_CONFIG_STUB_DATA),
>
>                             "c" (UM_KERN_PAGE_SIZE),
>                             "d" (PROT_READ | PROT_WRITE),
>                             "S" (MAP_FIXED | MAP_SHARED), "D" (fd),
>                             "a" (offset),
>                             "i" (&((struct stub_data *)
> UML_CONFIG_STUB_DATA)->err)
>
>                           : "memory");
>
> }

-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

Chiacchiera con i tuoi amici in tempo reale! 
 http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com 



_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-06-02 13:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-22 14:11 [uml-devel] Problem in compiling without optimisations Nikola Knezevic
2006-05-22 14:50 ` [uml-devel] " Nikola Knezevic
2006-05-22 17:12   ` Jeff Dike
2006-05-22 15:08 ` [uml-devel] " Jeff Dike
2006-06-01 19:07 ` Blaisorblade

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.