[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 2/6] xen: add a p2mt parameter to map_mmio_regions



On 09.08.2019 12:51, Julien Grall wrote:
Hi,

On 09/08/2019 11:37, Jan Beulich wrote:
On 09.08.2019 12:23, Julien Grall wrote:
On 07/08/2019 01:23, Stefano Stabellini wrote:
Add a p2mt parameter to map_mmio_regions, pass p2m_mmio_direct_dev on
ARM and p2m_mmio_direct on x86 -- no changes in behavior.

On x86, introduce a macro to strip away the last parameter and rename
the existing implementation of map_mmio_regions to map_mmio_region.
Use map_mmio_region in vpci as it is x86-only today.

This feels quite wrong. You have a "plural" function calling a "singular" 
function. This is usually the other way around. This is also quite difficult for a user to 
understand why the 's' is been dropped/added (depending how you view it) because in both case you 
only deal with a single region.

"Happy" is the wrong term. I'd welcome any better suggestion. I
simply couldn't think of a sensible alternative, but I do want
to see the leading underscores gone that were there originally.

We are already modifying all the callers in this series, so doing the renaming 
should not make the diff worst.

A few of suggestion:
     1) map_mmio_region() calling map_mmio_regions()
     2) arch_map_mmio_region() calling map_mmio_region()
     3) map_mmio_region() calling arch_map_mmio_region()

Ideally the top level functions (i.e. also the unmap one) would lose
their plurals. Seeing that both require a per-arch implementation, I
guess the best choice from the above would be 2 (with the unmap one
following suit).

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.