Patchwork [V10,2/8] hw/apm.c: replace register_ioport*

login
register
mail settings
Submitter Andreas Färber
Date Nov. 27, 2012, 12:10 a.m.
Message ID <50B404E8.6070102@suse.de>
Download mbox | patch
Permalink /patch/202050/
State New
Headers show

Comments

Andreas Färber - Nov. 27, 2012, 12:10 a.m.
Am 19.09.2012 13:50, schrieb Julien Grall:
> This patch replaces all register_ioport* by a MemorySection.
> It permits to use the new Memory stuff like listener.
> 
> Moreover, the PCI is added as an argument for apm_init, so we
> can register IO inside the pci IO address space.
> 
> Signed-off-by: Julien Grall <julien.grall@citrix.com>

Following today's q35 merge I needed the following diff to fix the build:

Julien/Jason, can you please verify that this is the correct device to pass?

Thanks,
Andreas
Jason Baron - Nov. 27, 2012, 8:46 p.m.
On Tue, Nov 27, 2012 at 01:10:16AM +0100, Andreas Färber wrote:
> Am 19.09.2012 13:50, schrieb Julien Grall:
> > This patch replaces all register_ioport* by a MemorySection.
> > It permits to use the new Memory stuff like listener.
> > 
> > Moreover, the PCI is added as an argument for apm_init, so we
> > can register IO inside the pci IO address space.
> > 
> > Signed-off-by: Julien Grall <julien.grall@citrix.com>
> 
> Following today's q35 merge I needed the following diff to fix the build:
> 
> diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c
> index 2fc83a4..7de5427 100644
> --- a/hw/lpc_ich9.c
> +++ b/hw/lpc_ich9.c
> @@ -472,7 +472,7 @@ static int ich9_lpc_initfn(PCIDevice *d)
>      lpc->isa_bus = isa_bus;
> 
>      ich9_cc_init(lpc);
> -    apm_init(&lpc->apm, ich9_apm_ctrl_changed, lpc);
> +    apm_init(d, &lpc->apm, ich9_apm_ctrl_changed, lpc);
>      return 0;
>  }
> 
> Julien/Jason, can you please verify that this is the correct device to pass?
> 

Looks correct to me.

Thanks,

-Jason
Julien Grall - Dec. 3, 2012, 4:29 p.m.
On 11/27/2012 08:46 PM, Jason Baron wrote:

> On Tue, Nov 27, 2012 at 01:10:16AM +0100, Andreas Färber wrote:
>> Am 19.09.2012 13:50, schrieb Julien Grall:
>>> This patch replaces all register_ioport* by a MemorySection.
>>> It permits to use the new Memory stuff like listener.
>>>
>>> Moreover, the PCI is added as an argument for apm_init, so we
>>> can register IO inside the pci IO address space.
>>>
>>> Signed-off-by: Julien Grall <julien.grall@citrix.com>
>>
>> Following today's q35 merge I needed the following diff to fix the build:
>>
>> diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c
>> index 2fc83a4..7de5427 100644
>> --- a/hw/lpc_ich9.c
>> +++ b/hw/lpc_ich9.c
>> @@ -472,7 +472,7 @@ static int ich9_lpc_initfn(PCIDevice *d)
>>      lpc->isa_bus = isa_bus;
>>
>>      ich9_cc_init(lpc);
>> -    apm_init(&lpc->apm, ich9_apm_ctrl_changed, lpc);
>> +    apm_init(d, &lpc->apm, ich9_apm_ctrl_changed, lpc);
>>      return 0;
>>  }
>>
>> Julien/Jason, can you please verify that this is the correct device to pass?
>>
> 
> Looks correct to me.

It's ok for me.

Thanks,

Julien

Patch

diff --git a/hw/lpc_ich9.c b/hw/lpc_ich9.c
index 2fc83a4..7de5427 100644
--- a/hw/lpc_ich9.c
+++ b/hw/lpc_ich9.c
@@ -472,7 +472,7 @@  static int ich9_lpc_initfn(PCIDevice *d)
     lpc->isa_bus = isa_bus;

     ich9_cc_init(lpc);
-    apm_init(&lpc->apm, ich9_apm_ctrl_changed, lpc);
+    apm_init(d, &lpc->apm, ich9_apm_ctrl_changed, lpc);
     return 0;
 }