Re: [RFC 1/3] mm: iommu: An API to unify IOMMU, CPU and device memory management

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

 



Thank you for the corrections. I'm correcting them now. Some responses:

Randy Dunlap wrote:
>> +    struct vcm *vcm_create(size_t start_addr, size_t len);
> 
> Seems odd to use size_t for start_addr.

I used size_t because I wanted to allow the start_addr the same range
as len. Is there a better type to use? I see 'unsigned long' used
throughout the mm code. Perhaps that's better for both the start_addr
and len.


>> +A Reservation is created and destroyed with:
>> +
>> +    struct res *vcm_reserve(struct vcm *vcm, size_t len, uint32_t attr);
> 
> s/uint32_t/u32/ ?

Sure.


>> +    Associate and activate all three to their respective devices:
>> +
>> +        avcm_iommu = vcm_assoc(vcm_iommu, dev_iommu, attr0);
>> +        avcm_onetoone = vcm_assoc(vcm_onetoone, dev_onetoone, attr1);
>> +        avcm_vmm = vcm_assoc(vcm_vmm, dev_cpu, attr2);
> 
> error handling on vcm_assoc() failures?

I'll add the deassociate call to the example.


>> +        res_iommu = vcm_reserve(vcm_iommu, SZ_2MB + SZ_4K, attr);
>> +        res_onetoone = vcm_reserve(vcm_onetoone, SZ_2MB + SZ_4K, attr);
>> +        res_vmm = vcm_reserve(vcm_vmm, SZ_2MB + SZ_4K, attr);
> 
> error handling?

I'll add it here too.

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]