There are a few places on Arm where we use pretty much an open-coded
version of is_hardware_domain(). The main difference, is the helper
will also block speculation (not yet implemented on Arm).
The existing users are not in hot path, so blocking speculation
would not hurt when it is implemented. So remove the open-coded
version within the arm codebase.
Signed-off-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
[julieng: Rework the commit message]
Acked-by: Julien Grall <jgrall@amazon.com>
*/
bool irq_type_set_by_domain(const struct domain *d)
{
- return (d == hardware_domain);
+ return is_hardware_domain(d);
}
/*
int ret = 0;
/* Don't allow remapping on other domain than hwdom */
- if ( t && t != hardware_domain )
+ if ( t && !is_hardware_domain(t) )
return -EPERM;
if ( t == s )
int ret = 0;
/* Don't allow remapping on other domain than hwdom */
- if (t && t != hardware_domain)
+ if ( t && !is_hardware_domain(t) )
return -EPERM;
if (t == s)
int ret = 0;
/* Don't allow remapping on other domain than hwdom */
- if (t && t != hardware_domain)
+ if ( t && !is_hardware_domain(t) )
return -EPERM;
if (t == s)
#endif
/* The hardware domain has always its memory direct mapped. */
-#define is_domain_direct_mapped(d) ((d) == hardware_domain)
+#define is_domain_direct_mapped(d) is_hardware_domain(d)
struct vtimer {
struct vcpu *v;