diff mbox series

[05/14] hw/acpi/ich9_tco: Restrict ich9_generate_smi() declaration

Message ID 20240219163855.87326-6-philmd@linaro.org
State Superseded
Headers show
Series hw/southbridge: Extract ICH9 QOM container model | expand

Commit Message

Philippe Mathieu-Daudé Feb. 19, 2024, 4:38 p.m. UTC
Only files including "hw/acpi/ich9_tco.h" require
the ich9_generate_smi() declaration.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/hw/acpi/ich9_tco.h    | 1 +
 include/hw/southbridge/ich9.h | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé Feb. 20, 2024, 6:32 a.m. UTC | #1
On 19/2/24 17:38, Philippe Mathieu-Daudé wrote:
> Only files including "hw/acpi/ich9_tco.h" require
> the ich9_generate_smi() declaration.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   include/hw/acpi/ich9_tco.h    | 1 +
>   include/hw/southbridge/ich9.h | 2 --
>   2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/include/hw/acpi/ich9_tco.h b/include/hw/acpi/ich9_tco.h
> index 1c99781a79..68ee64942f 100644
> --- a/include/hw/acpi/ich9_tco.h
> +++ b/include/hw/acpi/ich9_tco.h
> @@ -76,6 +76,7 @@ typedef struct TCOIORegs {
>   } TCOIORegs;
>   
>   void ich9_acpi_pm_tco_init(TCOIORegs *tr, MemoryRegion *parent);
> +void ich9_generate_smi(void);

Bah it is only used in hw/acpi/ich9_tco.c, I'll declare it
statically there.
Philippe Mathieu-Daudé Feb. 26, 2024, 9:53 a.m. UTC | #2
On 20/2/24 07:32, Philippe Mathieu-Daudé wrote:
> On 19/2/24 17:38, Philippe Mathieu-Daudé wrote:
>> Only files including "hw/acpi/ich9_tco.h" require
>> the ich9_generate_smi() declaration.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   include/hw/acpi/ich9_tco.h    | 1 +
>>   include/hw/southbridge/ich9.h | 2 --
>>   2 files changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/include/hw/acpi/ich9_tco.h b/include/hw/acpi/ich9_tco.h
>> index 1c99781a79..68ee64942f 100644
>> --- a/include/hw/acpi/ich9_tco.h
>> +++ b/include/hw/acpi/ich9_tco.h
>> @@ -76,6 +76,7 @@ typedef struct TCOIORegs {
>>   } TCOIORegs;
>>   void ich9_acpi_pm_tco_init(TCOIORegs *tr, MemoryRegion *parent);
>> +void ich9_generate_smi(void);
> 
> Bah it is only used in hw/acpi/ich9_tco.c, I'll declare it
> statically there.

Unfortunately can't do that now because I really don't want
to add a x86 specific dependency here:

../../hw/acpi/ich9_tco.c:35:30: error: use of undeclared identifier 
'CPU_INTERRUPT_SMI'
     cpu_interrupt(first_cpu, CPU_INTERRUPT_SMI);
                              ^
diff mbox series

Patch

diff --git a/include/hw/acpi/ich9_tco.h b/include/hw/acpi/ich9_tco.h
index 1c99781a79..68ee64942f 100644
--- a/include/hw/acpi/ich9_tco.h
+++ b/include/hw/acpi/ich9_tco.h
@@ -76,6 +76,7 @@  typedef struct TCOIORegs {
 } TCOIORegs;
 
 void ich9_acpi_pm_tco_init(TCOIORegs *tr, MemoryRegion *parent);
+void ich9_generate_smi(void);
 
 extern const VMStateDescription vmstate_ich9_sm_tco;
 
diff --git a/include/hw/southbridge/ich9.h b/include/hw/southbridge/ich9.h
index 1ac4238f7e..bee522a4cf 100644
--- a/include/hw/southbridge/ich9.h
+++ b/include/hw/southbridge/ich9.h
@@ -11,8 +11,6 @@ 
 #include "qemu/notify.h"
 #include "qom/object.h"
 
-void ich9_generate_smi(void);
-
 #define ICH9_CC_SIZE (16 * 1024) /* 16KB. Chipset configuration registers */
 
 #define TYPE_ICH9_LPC_DEVICE "ICH9-LPC"