mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
arm/vgic: drop const attribute from gic_iomem_deny_access()
While correct from a code point of view, the usage of the const
attribute for the domain parameter of gic_iomem_deny_access() is at
least partially bogus. Contents of the domain structure (the iomem
rangeset) is modified by the function. Such modifications succeed
because right now the iomem rangeset is allocated separately from
struct domain, and hence is not subject to the constness of struct
domain.
Amend this by dropping the const attribute from the function
parameter.
This is required by further changes that will convert
iomem_{permit,deny}_access into a function.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
This commit is contained in:
1 parent
0db195c1a9
commit
9982fe275b
4 files changed
+5
-5
No files matched your search
@@ -1083,7 +1083,7 @@ static void __init gicv2_dt_init(void)
|
||||
gicv2_extension_dt_init(node);
|
||||
}
|
||||
|
||||
static int gicv2_iomem_deny_access(const struct domain *d)
|
||||
static int gicv2_iomem_deny_access(struct domain *d)
|
||||
{
|
||||
int rc;
|
||||
unsigned long mfn, nr;
|
||||
|
||||
@@ -1424,7 +1424,7 @@ static void __init gicv3_dt_init(void)
|
||||
&vbase, &vsize);
|
||||
}
|
||||
|
||||
static int gicv3_iomem_deny_access(const struct domain *d)
|
||||
static int gicv3_iomem_deny_access(struct domain *d)
|
||||
{
|
||||
int rc, i;
|
||||
unsigned long mfn, nr;
|
||||
|
||||
+1
-1
@@ -462,7 +462,7 @@ unsigned long gic_get_hwdom_madt_size(const struct domain *d)
|
||||
}
|
||||
#endif
|
||||
|
||||
int gic_iomem_deny_access(const struct domain *d)
|
||||
int gic_iomem_deny_access(struct domain *d)
|
||||
{
|
||||
return gic_hw_ops->iomem_deny_access(d);
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ struct gic_hw_operations {
|
||||
/* Map extra GIC MMIO, irqs and other hw stuffs to the hardware domain. */
|
||||
int (*map_hwdom_extra_mappings)(struct domain *d);
|
||||
/* Deny access to GIC regions */
|
||||
int (*iomem_deny_access)(const struct domain *d);
|
||||
int (*iomem_deny_access)(struct domain *d);
|
||||
/* Handle LPIs, which require special handling */
|
||||
void (*do_LPI)(unsigned int lpi);
|
||||
};
|
||||
@@ -449,7 +449,7 @@ unsigned long gic_get_hwdom_madt_size(const struct domain *d);
|
||||
#endif
|
||||
|
||||
int gic_map_hwdom_extra_mappings(struct domain *d);
|
||||
int gic_iomem_deny_access(const struct domain *d);
|
||||
int gic_iomem_deny_access(struct domain *d);
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif
|
||||
|
||||