1. 16 7月, 2007 16 次提交
    • D
      [SPARC64]: More sensible udelay implementation. · 8b99cfb8
      David S. Miller 提交于
      Take a page from the powerpc folks and just calculate the
      delay factor directly.
      
      Since frequency scaling chips use a system-tick register,
      the value is going to be the same system-wide.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b99cfb8
    • D
      [SPARC64]: SMP build fixes. · 27a2ef38
      David S. Miller 提交于
      With the move of ldom_startcpu_cpuid() into smp.c some other
      things need to follow along:
      
      1) smp.c is not a driver so we can't use "PFX" macro in the
         printk calls.
      
      2) smp.c now needs asm/io.h and asm/hvtramp.h, ds.c no longer
         does
      
      3) kimage_addr_to_ra() also needs to move into smp.c
      
      While we're here, update copyright info and my email address
      in smp.c
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      27a2ef38
    • D
      [SPARC64]: mdesc.c needs linux/mm.h · 8f3fff20
      David S. Miller 提交于
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8f3fff20
    • D
      [SPARC64]: Fix build regressions added by dr-cpu changes. · b14f5c10
      David S. Miller 提交于
      Do not select HOTPLUG_CPU from SUN_LDOMS, that causes
      HOTPLUG_CPU to be selected even on non-SMP which is
      illegal.
      
      Only build hvtramp.o when SMP, just like trampoline.o
      
      Protect dr-cpu code in ds.c with HOTPLUG_CPU.
      
      Likewise move ldom_startcpu_cpuid() to smp.c and protect
      it and the call site with SUN_LDOMS && HOTPLUG_CPU.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b14f5c10
    • D
      [SPARC64]: Unconditionally register vio_bus_type. · f8be339c
      David S. Miller 提交于
      The VIO drivers register themselves unconditionally just
      like those of any other bus type, so to avoid crashes
      on non-VIO systems we need to always register vio_bus_type.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8be339c
    • D
      [SPARC64]: Initial LDOM cpu hotplug support. · 4f0234f4
      David S. Miller 提交于
      Only adding cpus is supports at the moment, removal
      will come next.
      
      When new cpus are configured, the machine description is
      updated.  When we get the configure request we pass in a
      cpu mask of to-be-added cpus to the mdesc CPU node parser
      so it only fetches information for those cpus.  That code
      also proceeds to update the SMT/multi-core scheduling bitmaps.
      
      cpu_up() does all the work and we return the status back
      over the DS channel.
      
      CPUs via dr-cpu need to be booted straight out of the
      hypervisor, and this requires:
      
      1) A new trampoline mechanism.  CPUs are booted straight
         out of the hypervisor with MMU disabled and running in
         physical addresses with no mappings installed in the TLB.
      
         The new hvtramp.S code sets up the critical cpu state,
         installs the locked TLB mappings for the kernel, and
         turns the MMU on.  It then proceeds to follow the logic
         of the existing trampoline.S SMP cpu bringup code.
      
      2) All calls into OBP have to be disallowed when domaining
         is enabled.  Since cpus boot straight into the kernel from
         the hypervisor, OBP has no state about that cpu and therefore
         cannot handle being invoked on that cpu.
      
         Luckily it's only a handful of interfaces which can be called
         after the OBP device tree is obtained.  For example, rebooting,
         halting, powering-off, and setting options node variables.
      
      CPU removal support will require some infrastructure changes
      here.  Namely we'll have to process the requests via a true
      kernel thread instead of in a workqueue.  workqueues run on
      a per-cpu thread, but when unconfiguring we might need to
      force the thread to execute on another cpu if the current cpu
      is the one being removed.  Removal of a cpu also causes the kernel
      to destroy that cpu's workqueue running thread.
      
      Another issue on removal is that we may have interrupts still
      pointing to the cpu-to-be-removed.  So new code will be needed
      to walk the active INO list and retarget those cpus as-needed.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4f0234f4
    • D
      [SPARC64]: Fix setting of variables in LDOM guest. · b3e13fbe
      David S. Miller 提交于
      There is a special domain services capability for setting
      variables in the OBP options node.  Guests don't have permanent
      store for the OBP variables like a normal system, so they are
      instead maintained in the LDOM control node or in the SC.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b3e13fbe
    • D
      [SPARC64]: Fix MD property lifetime bugs. · 83292e0a
      David S. Miller 提交于
      Property values cannot be referenced outside of
      mdesc_grab()/mdesc_release() pairs.  The only major
      offender was the VIO bus layer, easily fixed.
      
      Add some commentary to mdesc.h describing these rules.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      83292e0a
    • D
      [SPARC64]: Abstract out mdesc accesses for better MD update handling. · 43fdf274
      David S. Miller 提交于
      Since we have to be able to handle MD updates, having an in-tree
      set of data structures representing the MD objects actually makes
      things more painful.
      
      The MD itself is easy to parse, and we can implement the existing
      interfaces using direct parsing of the MD binary image.
      
      The MD is now reference counted, so accesses have to now take the
      form:
      
      	handle = mdesc_grab();
      
      	... operations on MD ...
      
      	mdesc_release(handle);
      
      The only remaining issue are cases where code holds on to references
      to MD property values.  mdesc_get_property() returns a direct pointer
      to the property value, most cases just pull in the information they
      need and discard the pointer, but there are few that use the pointer
      directly over a long lifetime.  Those will be fixed up in a subsequent
      changeset.
      
      A preliminary handler for MD update events from domain services is
      there, it is rudimentry but it works and handles all of the reference
      counting.  It does not check the generation number of the MDs,
      and it does not generate a "add/delete" list for notification to
      interesting parties about MD changes but that will be forthcoming.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43fdf274
    • D
      [SPARC64]: Use more mearningful names for IRQ registry. · 133f09a1
      David S. Miller 提交于
      All of the interrupts say "LDX RX" and "LDX TX" currently
      which is next to useless.  Put a device specific prefix
      before "RX" and "TX" instead which makes it much more
      useful.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      133f09a1
    • D
      [SPARC64]: Initial domain-services driver. · e450992d
      David S. Miller 提交于
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e450992d
    • D
      [SPARC64]: Export powerd facilities for external entities. · 13077d80
      David S. Miller 提交于
      Besides the existing usage for power-button interrupts, we'll
      want to make use of this code for domain-services where the
      LDOM manager can send reboot requests to the guest node.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      13077d80
    • D
      [SPARC64]: Add domain-services nodes to VIO device tree. · 2c4f4ecb
      David S. Miller 提交于
      They sit under the root of the MD tree unlike the rest of
      the LDC channel based virtual devices.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c4f4ecb
    • D
      [SPARC64]: Assorted LDC bug cures. · cb481235
      David S. Miller 提交于
      1) LDC_MODE_RELIABLE is deprecated an unused by anything, plus
         it and LDC_MODE_STREAM were mis-numbered.
      
      2) read_stream() should try to read as much as possible into
         the per-LDC stream buffer area, so do not trim the read_nonraw()
         length by the caller's size parameter.
      
      3) Send data ACKs when necessary in read_nonraw().
      
      4) In read_nonraw() when we get a pure ACK, advance the RX head
         unconditionally past it.
      
      5) Provide the ACKID field in the ldcdgb() packet dump in read_nonraw().
         This helps debugging stream mode LDC channel problems.
      
      6) Decrease verbosity of rx_data_wait() so that it is more useful.
         A debugging message each loop iteration is too much.
      
      7) In process_data_ack() stop the loop checking when we hit lp->tx_tail
         not lp->tx_head.
      
      8) Set the seqid field properly in send_data_nack().
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cb481235
    • D
      [SPARC64]: Do not ACK an INO if it is disabled or inprogress. · 5a606b72
      David S. Miller 提交于
      This is also a partial workaround for a bug in the LDOM firmware which
      double-transmits RX inos during high load.  Without this, such an
      event causes the kernel to loop forever in the interrupt call chain
      ACK'ing but never actually running the IRQ handler (and thus clearing
      the interrupt condition in the device).
      
      There is still a bad potential effect when double INOs occur,
      not covered by this changeset.  Namely, if the INO is already on
      the per-cpu INO vector list, we still blindly re-insert it and
      thus we can end up losing interrupts already linked in after
      it.
      
      We could deal with that by traversing the list before insertion,
      but that's too expensive for this edge case.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5a606b72
    • D
      [SPARC64]: Add LDOM virtual channel driver and VIO device layer. · e53e97ce
      David S. Miller 提交于
      Virtual devices on Sun Logical Domains are built on top
      of a virtual channel framework.  This, with help of hypervisor
      interfaces, provides a link layer protocol with basic
      handshaking over which virtual device clients and servers
      communicate.
      
      Built on top of this is a VIO device protocol which has it's
      own handshaking and message types.  At this layer attributes
      are exchanged (disk size, network device addresses, etc.)
      descriptor rings are registered, and data transfers are
      triggers and replied to.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e53e97ce
  2. 12 7月, 2007 1 次提交
  3. 10 7月, 2007 1 次提交
    • I
      sched: zap the migration init / cache-hot balancing code · 0437e109
      Ingo Molnar 提交于
      the SMP load-balancer uses the boot-time migration-cost estimation
      code to attempt to improve the quality of balancing. The reason for
      this code is that the discrete priority queues do not preserve
      the order of scheduling accurately, so the load-balancer skips
      tasks that were running on a CPU 'recently'.
      
      this code is fundamental fragile: the boot-time migration cost detector
      doesnt really work on systems that had large L3 caches, it caused boot
      delays on large systems and the whole cache-hot concept made the
      balancing code pretty undeterministic as well.
      
      (and hey, i wrote most of it, so i can say it out loud that it sucks ;-)
      
      under CFS the same purpose of cache affinity can be achieved without
      any special cache-hot special-case: tasks are sorted in the 'timeline'
      tree and the SMP balancer picks tasks from the left side of the
      tree, thus the most cache-cold task is balanced automatically.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0437e109
  4. 26 6月, 2007 2 次提交
  5. 13 6月, 2007 3 次提交
  6. 08 6月, 2007 4 次提交
  7. 05 6月, 2007 7 次提交
  8. 31 5月, 2007 1 次提交
  9. 30 5月, 2007 1 次提交
    • S
      sparc64: fix alignment bug in linker definition script · 4096b46f
      Sam Ravnborg 提交于
      The RO_DATA section were hardcoded to a specific
      alignment in include/asm-generic/vmlinux.h.
      But for sparc64 this did not match the PAGE_SIZE.
      
      Introduce a new section definition named:
      RO_DATA that takes actual alignment as parameter.
      RODATA are provided for backward compatibility.
      
      On top of this avoid hardcoding alignment for
      sparc64 in reset of the script
      Fix is build-tested on sparc64 + x86_64.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      4096b46f
  10. 29 5月, 2007 4 次提交