1. 25 7月, 2007 1 次提交
    • J
      uml: more __init annotations · 97a1fcbb
      Jeff Dike 提交于
      2.6.23-rc1 turned up another batch of references from non-__init code to
      __init code.  In most cases, these were missing __init annotations.  In one
      case (os_drop_memory), the annotation was present but wrong.
      
      init_maps is __init, but for some reason was being very careful about the
      mechanism by which it allocated memory, checking whether it was OK to use
      kmalloc (at this point in the boot, it definitely isn't) and using either
      alloc_bootmem_low_pages or kmalloc/vmalloc.  So, the kmalloc/vmalloc code is
      removed.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      97a1fcbb
  2. 09 5月, 2007 1 次提交
    • J
      uml: network and pcap cleanup · 7d98230a
      Jeff Dike 提交于
      Some network device cleanup.
      
      When setup_etheraddr found a globally valid MAC being assigned to an
      interface, it went ahead and used it rather than assigning a random MAC like
      the other cases do.  This isn't really an error like the others, but it seems
      consistent to make it behave the same.
      
      We were getting some duplicate kfree() in the error case in eth_configure
      because platform_device_unregister frees buffers that the error cases
      following tried to free again.
      
      The pcap initialization routine wasn't doing the proper printk of its
      information, causing a printk of the first part of that line to be
      unterminated by a newline.
      
      The pcap code had a bunch of style violations, which are now fixed.
      
      pcap_setup wasn't returning false when it detected an unrecognized
      option.
      
      The printks in pcap_user all got UM_KERN_BLAH prepended to their
      format strings.
      
      pcap_remove now checks for a non-NULL pcap structure before it calls
      pcap_close.
      Signed-off-by: NJeff Dike <jdike@linux.intel.com>
      Acked-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7d98230a
  3. 08 5月, 2007 6 次提交
  4. 26 4月, 2007 1 次提交
  5. 12 2月, 2007 5 次提交
  6. 14 12月, 2006 1 次提交
  7. 13 12月, 2006 1 次提交
  8. 06 12月, 2006 1 次提交
  9. 09 10月, 2006 1 次提交
  10. 04 10月, 2006 1 次提交
  11. 30 9月, 2006 4 次提交
    • O
      [PATCH] uml build fix · d6c64102
      Ollie Wild 提交于
      Cc: Jeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d6c64102
    • J
      [PATCH] uml: don't roll my own random MAC generator · fade5d54
      Jeff Dike 提交于
      Use the existing random_ether_addr() instead of cooking up my own
      version.  Pointed out by Dave Hollis and Jason Lunz.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fade5d54
    • J
      [PATCH] uml: mechanical tidying after random MACs change · b10aeeef
      Jeff Dike 提交于
      Mechanical, hopefully non-functional changes stemming from
      setup_etheraddr always succeeding now that it always assigns a MAC,
      either from the command line or generated randomly:
         the test of the return of setup_etheraddr is removed, and code
      dependent on it succeeding is now unconditional
         setup_etheraddr can now be made void
         struct uml_net.have_mac is now always 1, so tests of it can be
      similarly removed, and uses of it can be replaced with 1
         struct uml_net.have_mac is no longer used, so it can be removed
         struct uml_net_private.have_mac is copied from struct uml_net, so
      it is always 1
         tests of uml_net_private.have_mac can be removed
         uml_net_private.have_mac can now be removed
         the only call to dev_ip_addr was removed, so it can be deleted
      
      It also turns out that setup_etheraddr is called only once, from the same
      file, so it can be static and its declaration removed from net_kern.h.
      
      Similarly, set_ether_mac is defined and called only from one file.
      
      Finally, setup_etheraddr and set_ether_mac were moved to avoid needing forward
      declarations.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b10aeeef
    • J
      [PATCH] uml: assign random MACs to interfaces if necessary · f3e7ed2b
      Jeff Dike 提交于
      Assign a random MAC to an ethernet interface if one was not provided on the
      command line.  This became pressing when distros started bringing interfaces
      up before assigning IPs to them.  The previous pattern of assigning an IP then
      bringing it up allowed the MAC to be generated from the first IP assigned.
      However, once the thing is up, it's probably a bad idea to change the MAC, so
      the MAC stayed initialized to fe:fd:0:0:0:0.
      
      Now, if there is no MAC from the command line, one is generated.  We use the
      microseconds from gettimeofday (20 bits), plus the low 12 bits of the pid to
      seed the random number generator.  random() is called twice, with 16 bits of
      each result used.  I didn't want to have to try to fill in 32 bits optimally
      given an arbitrary RAND_MAX, so I just assume that it is greater than 65536
      and use 16 bits of each random() return.
      
      There is also a bit of reformatting and whitespace cleanup here.
      Signed-off-by: NJeff Dike <jdike@addtoit.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f3e7ed2b
  12. 29 9月, 2006 1 次提交
  13. 27 9月, 2006 2 次提交
  14. 26 9月, 2006 1 次提交
  15. 03 7月, 2006 1 次提交
  16. 08 2月, 2006 1 次提交
  17. 19 1月, 2006 2 次提交
  18. 07 1月, 2006 3 次提交
  19. 10 11月, 2005 1 次提交
  20. 09 11月, 2005 1 次提交
  21. 07 11月, 2005 1 次提交
  22. 30 10月, 2005 1 次提交
  23. 26 6月, 2005 1 次提交
  24. 22 6月, 2005 1 次提交
    • P
      [PATCH] uml: add and use generic hw_controller_type->release · dbce706e
      Paolo 'Blaisorblade' Giarrusso 提交于
      With Chris Wedgwood <cw@f00f.org>
      
      Currently UML must explicitly call the UML-specific
      free_irq_by_irq_and_dev() for each free_irq call it's done.
      
      This is needed because ->shutdown and/or ->disable are only called when the
      last "action" for that irq is removed.
      
      Instead, for UML shared IRQs (UML IRQs are very often, if not always,
      shared), for each dev_id some setup is done, which must be cleared on the
      release of that fd.  For instance, for each open console a new instance
      (i.e.  new dev_id) of the same IRQ is requested().
      
      Exactly, a fd is stored in an array (pollfds), which is after read by a
      host thread and passed to poll().  Each event registered by poll() triggers
      an interrupt.  So, for each free_irq() we must remove the corresponding
      host fd from the table, which we do via this -release() method.
      
      In this patch we add an appropriate hook for this, and remove all uses of
      it by pointing the hook to the said procedure; this is safe to do since the
      said procedure.
      
      Also some cosmetic improvements are included.
      
      This is heavily based on some work by Chris Wedgwood, which however didn't
      get the patch merged for something I'd call a "misunderstanding" (the need
      for this patch wasn't cleanly explained, thus adding the generic hook was
      felt as undesirable).
      Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      CC: Ingo Molnar <mingo@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dbce706e