|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] memaccess: reduce include dependencies
On Mon, Mar 9, 2020 at 5:49 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> The common header doesn't itself need to include public/vm_event.h nor
> public/memory.h. Drop their inclusion. This requires using the non-
> typedef names in two prototypes and an inline function; by not changing
> the callers and function definitions at the same time it'll remain
> certain that the build would fail if the typedef itself was changed.
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
>
> --- a/xen/include/asm-arm/mem_access.h
> +++ b/xen/include/asm-arm/mem_access.h
> @@ -17,9 +17,11 @@
> #ifndef _ASM_ARM_MEM_ACCESS_H
> #define _ASM_ARM_MEM_ACCESS_H
>
> +struct vm_event_st;
> +
> static inline
> bool p2m_mem_access_emulate_check(struct vcpu *v,
> - const vm_event_response_t *rsp)
> + const struct vm_event_st *rsp)
> {
> /* Not supported on ARM. */
> return false;
> --- a/xen/include/asm-x86/mem_access.h
> +++ b/xen/include/asm-x86/mem_access.h
> @@ -26,6 +26,8 @@
> #ifndef __ASM_X86_MEM_ACCESS_H__
> #define __ASM_X86_MEM_ACCESS_H__
>
> +struct vm_event_st;
Wouldn't it make more sense to define this in xen/mem_access.h instead
of having to do it in both asm versions? Nothing directly includes
asm/mem_access.h, all users include xen/mem_access.h
Tamas
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |