aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/ds.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-11-06[SPARC]: Remove duplicate includes.Lucas Woods1-1/+0
Signed-off-by: Lucas Woods <woodzy@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-20[SPARC64]: Do not flood log with failed DS messages.David S. Miller1-2/+0
When booting up a control node it's quite common to not be able to register several service types. And likewise on guests at least one or two are going to not be there. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-20[SPARC64]: Handle multiple domain-services-port nodes properly.David S. Miller1-94/+157
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-19[SPARC64]: Use orderly_poweroff().David S. Miller1-4/+2
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-18[SPARC64]: Handle LDC resets properly in domain-services driver.David S. Miller1-0/+19
Reset the handshake and per-capability state so that when the link comes back up we'll renegotiate the DS version and then reregister all of the services. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Fix race between MD update and dr-cpu add.David S. Miller1-130/+140
We need to make sure the MD update occurs before we try to process dr-cpu configure requests. MD update and dr-cpu were being processed by seperate threads so that did not happen occaisionally. Fix this by executing all domain services data packets from a single thread, in order. This will help simplify some other things as well. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: dr-cpu unconfigure support.David S. Miller1-2/+23
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Give more accurate errors in dr_cpu_configure().David S. Miller1-3/+13
When cpu_up() fails, we can discern the most likely cause. If cpu_present() is false, this means the cpu did not appear in the MD. If -ENODEV is the error return value, then the processor did not boot properly into the kernel. Pass this information back in the dr-cpu response packet. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Process dr-cpu events in a kthread instead of workqueue.David S. Miller1-8/+34
This will be necessary to handle unconfigure requests properly. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: SMP build fixes.David S. Miller1-10/+0
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: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Fix build regressions added by dr-cpu changes.David S. Miller1-48/+6
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: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Initial LDOM cpu hotplug support.David S. Miller1-84/+430
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: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Fix setting of variables in LDOM guest.David S. Miller1-13/+174
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: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Abstract out mdesc accesses for better MD update handling.David S. Miller1-15/+7
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: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Use more mearningful names for IRQ registry.David S. Miller1-1/+1
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: David S. Miller <davem@davemloft.net>
2007-07-16[SPARC64]: Initial domain-services driver.David S. Miller1-0/+654
Signed-off-by: David S. Miller <davem@davemloft.net>