]> git.proxmox.com Git - qemu.git/commit
PPC: E500: Add PV spinning code
authorAlexander Graf <agraf@suse.de>
Fri, 22 Jul 2011 11:32:29 +0000 (13:32 +0200)
committerAlexander Graf <agraf@suse.de>
Thu, 6 Oct 2011 07:47:52 +0000 (09:47 +0200)
commit5c145dacacad04f751ca5c3fb6467e590e7f3c46
tree0de47ce902f0ba3831921499a42a7982de934bfc
parent66bc7e00404a2a6ce92b0f4ee2ecc5df416650b3
PPC: E500: Add PV spinning code

CPUs that are not the boot CPU need to run in spinning code to check if they
should run off to execute and if so where to jump to. This usually happens
by leaving secondary CPUs looping and checking if some variable in memory
changed.

In an environment like Qemu however we can be more clever. We can just export
the spin table the primary CPU modifies as MMIO region that would event based
wake up the respective secondary CPUs. That saves us quite some cycles while
the secondary CPUs are not up yet.

So this patch adds a PV device that simply exports the spinning table into the
guest and thus allows the primary CPU to wake up secondary ones.

Signed-off-by: Alexander Graf <agraf@suse.de>
---

v1 -> v2:

  - change into MMIO scheme
  - map the secondary NIP instead of 0 1:1
  - only map 64MB for TLB, same as u-boot
  - prepare code for 64-bit spinnings

v2 -> v3:

  - remove r6
  - set MAS2_M
  - map EA 0
  - use second TLB1 entry

v3 -> v4:

  - change to memoryops

v4 -> v5:

  - fix endianness bugs

v5 -> v6:

  - add header
Makefile.target
hw/ppce500_mpc8544ds.c
hw/ppce500_spin.c [new file with mode: 0644]