1. 28 3月, 2006 2 次提交
  2. 23 3月, 2006 1 次提交
    • G
      [PATCH] x86: SMP alternatives · 9a0b5817
      Gerd Hoffmann 提交于
      Implement SMP alternatives, i.e.  switching at runtime between different
      code versions for UP and SMP.  The code can patch both SMP->UP and UP->SMP.
      The UP->SMP case is useful for CPU hotplug.
      
      With CONFIG_CPU_HOTPLUG enabled the code switches to UP at boot time and
      when the number of CPUs goes down to 1, and switches to SMP when the number
      of CPUs goes up to 2.
      
      Without CONFIG_CPU_HOTPLUG or on non-SMP-capable systems the code is
      patched once at boot time (if needed) and the tables are released
      afterwards.
      
      The changes in detail:
      
        * The current alternatives bits are moved to a separate file,
          the SMP alternatives code is added there.
      
        * The patch adds some new elf sections to the kernel:
          .smp_altinstructions
      	like .altinstructions, also contains a list
      	of alt_instr structs.
          .smp_altinstr_replacement
      	like .altinstr_replacement, but also has some space to
      	save original instruction before replaving it.
          .smp_locks
      	list of pointers to lock prefixes which can be nop'ed
      	out on UP.
          The first two are used to replace more complex instruction
          sequences such as spinlocks and semaphores.  It would be possible
          to deal with the lock prefixes with that as well, but by handling
          them as special case the table sizes become much smaller.
      
       * The sections are page-aligned and padded up to page size, so they
         can be free if they are not needed.
      
       * Splitted the code to release init pages to a separate function and
         use it to release the elf sections if they are unused.
      Signed-off-by: NGerd Hoffmann <kraxel@suse.de>
      Signed-off-by: NChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9a0b5817
  3. 22 3月, 2006 2 次提交
  4. 08 2月, 2006 2 次提交
  5. 02 2月, 2006 4 次提交
  6. 19 1月, 2006 12 次提交
  7. 13 1月, 2006 2 次提交
  8. 12 1月, 2006 3 次提交
    • J
      [PATCH] uml: fix debug output on x86_64 · 621009f4
      Jeff Dike 提交于
      The debug-stub patch was broken on x86_64 because it thinks the frame size
      there is 168 words.  In reality, it is 168 bytes, and using HOST_FRAME_SIZE,
      which is expressed in consistent units across architectures, fixes this.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      621009f4
    • J
      [PATCH] uml: revert compile-time option checking · edc0e659
      Jeff Dike 提交于
      Undo the previous no-modes patch since Adrian Bunk sent in a kbuild way of
      doing the same thing.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      edc0e659
    • J
      [PATCH] uml: fix missing KBUILD_BASENAME · 4ee189a9
      Jeff Dike 提交于
      2.6.15-mm1 caused kernel-offsets.c to stop compiling with a syntax error in a
      header.  The problem was with KBUILD_BASENAME, which didn't get a definition
      with the by-hand compilation in the main UML Makefile.
      
      This was OK before since the expansion was syntactically the same as the
      KBUILD_BASENAME token.  With -mm1, the expansion is now a quote-delimited
      string, so there needs to be a definition of it.
      
      Since kernel-offsets.c is basically the same as other arches' asm-offsets.c,
      and those seem to build OK, this patch turns kernel-offsets.c into
      asm-offsets.c.  kernel-offsets.c is in arch/um/sys-$(SUBARCH), i.e.  sys-i386
      and sys-x86_64, while kbuild expects it to be in arch/um/kernel.
      kernel-offsets.c is moved to
      arch/um/include/sysdep-$(SUBARCH)/kernel-offsets.h, which is included by
      arch/um/kernel/asm-offsets.c.  With that, include/asm-um/asm-offsets.h is
      generated automatically.  kernel-offsets.h continues to exist because it needs
      to be accessible to userspace UML code, and include/asm-um isn't.  So, a
      symlink is made from arch/um/include/kernel-offsets.h to
      include/asm-um/asm-offsets.h.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4ee189a9
  9. 11 1月, 2006 1 次提交
  10. 09 1月, 2006 4 次提交
  11. 07 1月, 2006 4 次提交
    • J
      [PATCH] uml: umid cleanup · 7eebe8a9
      Jeff Dike 提交于
      This patch cleans up the umid code:
      
      - The only_if_set argument to get_umid is gone.
      
      - get_umid returns an empty string rather than NULL if there is no umid.
      
      - umid_is_random is gone since its users went away.
      
      - Some printfs were turned into printks because the code runs late enough
        that printk is working.
      
      - Error paths were cleaned up.
      
      - Some functions now return an error and let the caller print the error
        message rather than printing it themselves.  This eliminates the practice of
        passing a pointer to printf or printk in, depending on where in the boot
        process we are.
      
      - Major tidying of not_dead_yet - mostly error path cleanup, plus a comment
        explaining why it doesn't react to errors the way you might expect.
      
      - Calls to os_* interfaces that were moved under os are changed back to
        their native libc forms.
      
      - snprintf, strlcpy, and their bounds-checking friends are used more often,
        replacing by-hand bounds checking in some places.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7eebe8a9
    • J
      [PATCH] uml: separate libc-dependent umid code · 2264c475
      Jeff Dike 提交于
      I reworked Gennady's umid OS abstraction patch because the code shouldn't
      be moved entirely to os.  As it turns out, I moved most of it anyway.  This
      patch is the minimal one needed to move the code and have it work.
      It turns out that the concept of the umid is OS-independent, but
      almost everything else about the implementation is OS-dependent.
      
      This is code movement without cleanup - a follow-on patch tidies
      everything up without shuffling code around.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2264c475
    • J
      [PATCH] uml: Simplify console opening/closing and irq registration · 165dc591
      Jeff Dike 提交于
      This patch simplifies the opening and closing of host console devices and the
      registration and deregistration of IRQs.  The intent is to make it obvious
      that an IRQ can't exist without an open file descriptor.
      
      chan_enable will now open the channel, and when both opening and IRQ
      registration are desired, this should be used.  Opening only is done for the
      initial console, so that interface still needs to exist.
      
      The free_irqs_later interface is now gone.  It was intended to avoid freeing
      an IRQ while it was being processed.  It did this, but it didn't eliminate the
      possiblity of free_irq being called from an interrupt, which is bad.  In its
      place is a list of irqs to be freed, which is processed by the signal handler
      just before exiting.  close_one_chan now disables irqs.
      
      When a host device disappears, it is just closed, and that disables IRQs.
      
      The device id registered with the IRQ is now the chan structure, not the tty.
      This is because the interrupt arrives on a descriptor associated with the
      channel.  This caused equivalent changes in the arguments to line_timer_cb.
      line_disable is gone since it is not used any more.
      
      The count field in the line structure is gone.  tty->count is used instead.
      
      The complicated logic in sigio_handler with freeing IRQs when necessary and
      making sure its idea of the next irq is correct is now much simpler.  The irq
      list can't be rearranged underneath it, so it is now a simple list walk.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      165dc591
    • J
      [PATCH] uml: non-void functions should return something · 1b57e9c2
      Jeff Dike 提交于
      There are a few functions which are declared to return something, but don't.
      These are actually infinite loops which are forced to be declared as non-void.
       This makes them all return 0.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      1b57e9c2
  12. 19 12月, 2005 1 次提交
    • J
      [PATCH] uml skas0: stop gcc's insanity · 5b7b15af
      Jeff Dike 提交于
      With Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      
      UML skas0 stub has been miscompiling for many people (incidentally not
      the authors), depending on the used GCC versions.
      
      I think (and testing on some GCC versions shows) this patch avoids the
      fundamental issue which is behind this, namely gcc using the stack when
      we have just replaced it, behind gcc's back.  The remapping and storage
      of the return value is hidden in a blob of asm, hopefully giving gcc no
      room for creativity.
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5b7b15af
  13. 13 12月, 2005 1 次提交
  14. 23 11月, 2005 1 次提交