~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to hw/intc/grlib_irqmp.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
#define FORCE_OFFSET     0x80
46
46
#define EXTENDED_OFFSET  0xC0
47
47
 
 
48
#define TYPE_GRLIB_IRQMP "grlib,irqmp"
 
49
#define GRLIB_IRQMP(obj) OBJECT_CHECK(IRQMP, (obj), TYPE_GRLIB_IRQMP)
 
50
 
48
51
typedef struct IRQMPState IRQMPState;
49
52
 
50
53
typedef struct IRQMP {
51
 
    SysBusDevice busdev;
 
54
    SysBusDevice parent_obj;
 
55
 
52
56
    MemoryRegion iomem;
53
57
 
54
58
    void *set_pil_in;
102
106
 
103
107
void grlib_irqmp_ack(DeviceState *dev, int intno)
104
108
{
105
 
    SysBusDevice *sdev;
106
 
    IRQMP        *irqmp;
 
109
    IRQMP        *irqmp = GRLIB_IRQMP(dev);
107
110
    IRQMPState   *state;
108
111
    uint32_t      mask;
109
112
 
110
 
    assert(dev != NULL);
111
 
 
112
 
    sdev = SYS_BUS_DEVICE(dev);
113
 
    assert(sdev != NULL);
114
 
 
115
 
    irqmp = FROM_SYSBUS(typeof(*irqmp), sdev);
116
 
    assert(irqmp != NULL);
117
 
 
118
113
    state = irqmp->state;
119
114
    assert(state != NULL);
120
115
 
132
127
 
133
128
void grlib_irqmp_set_irq(void *opaque, int irq, int level)
134
129
{
135
 
    IRQMP      *irqmp;
 
130
    IRQMP      *irqmp = GRLIB_IRQMP(opaque);
136
131
    IRQMPState *s;
137
132
    int         i = 0;
138
133
 
139
 
    assert(opaque != NULL);
140
 
 
141
 
    irqmp = FROM_SYSBUS(typeof(*irqmp), SYS_BUS_DEVICE(opaque));
142
 
    assert(irqmp != NULL);
143
 
 
144
134
    s = irqmp->state;
145
135
    assert(s         != NULL);
146
136
    assert(s->parent != NULL);
325
315
 
326
316
static void grlib_irqmp_reset(DeviceState *d)
327
317
{
328
 
    IRQMP *irqmp = container_of(d, IRQMP, busdev.qdev);
329
 
    assert(irqmp        != NULL);
 
318
    IRQMP *irqmp = GRLIB_IRQMP(d);
330
319
    assert(irqmp->state != NULL);
331
320
 
332
321
    memset(irqmp->state, 0, sizeof *irqmp->state);
335
324
 
336
325
static int grlib_irqmp_init(SysBusDevice *dev)
337
326
{
338
 
    IRQMP *irqmp = FROM_SYSBUS(typeof(*irqmp), dev);
339
 
 
340
 
    assert(irqmp != NULL);
 
327
    IRQMP *irqmp = GRLIB_IRQMP(dev);
341
328
 
342
329
    /* Check parameters */
343
330
    if (irqmp->set_pil_in == NULL) {
344
331
        return -1;
345
332
    }
346
333
 
347
 
    memory_region_init_io(&irqmp->iomem, &grlib_irqmp_ops, irqmp,
 
334
    memory_region_init_io(&irqmp->iomem, OBJECT(dev), &grlib_irqmp_ops, irqmp,
348
335
                          "irqmp", IRQMP_REG_SIZE);
349
336
 
350
337
    irqmp->state = g_malloc0(sizeof *irqmp->state);
371
358
}
372
359
 
373
360
static const TypeInfo grlib_irqmp_info = {
374
 
    .name          = "grlib,irqmp",
 
361
    .name          = TYPE_GRLIB_IRQMP,
375
362
    .parent        = TYPE_SYS_BUS_DEVICE,
376
363
    .instance_size = sizeof(IRQMP),
377
364
    .class_init    = grlib_irqmp_class_init,