Hi--Ack.
On 8/18/23 07:42, Devaraj Rangasamy wrote:
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt128 (MBs).
index 722b6eca2e93..5e38423f3d53 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -363,6 +363,13 @@
selects a performance level in this range and appropriate
to the current workload.
+ amdtee_cma=nn [HW,TEE]
+ Sets the memory size reserved for contiguous memory
+ allocations, to be used by amdtee device driver.
+ Value is in MB and can range from 4 to 128 (MBs)
Ack, as above.
+ CMA will be active only when CMA is enabled, and amdtee isThat could use some improvement. How about:
AMD-TEE CMA will be active only when CONFIG_CMA is enabled,
and amdtee is
Ack.
+ built as inbuilt driver, and not loaded as module.Why won't this default value cause an allocation error message?
+
amijoy.map= [HW,JOY] Amiga joystick support
Map of devices attached to JOY0DAT and JOY1DAT
Format: <a>,<b>
diff --git a/drivers/tee/amdtee/Kconfig b/drivers/tee/amdtee/Kconfig
index 191f9715fa9a..5843c739a7b8 100644
--- a/drivers/tee/amdtee/Kconfig
+++ b/drivers/tee/amdtee/Kconfig
@@ -6,3 +6,12 @@ config AMDTEE
depends on CRYPTO_DEV_SP_PSP && CRYPTO_DEV_CCP_DD
help
This implements AMD's Trusted Execution Environment (TEE) driver.
+
+config AMDTEE_CMA_SIZE
+ int "Size of Memory in MiB reserved in CMA for AMD-TEE"
+ default "0"
Maybe I'm just not following the call paths correctly.
It looks to me like this causes a call to
cma_declare_contiguous_nid() with @size = 0, and that function says:
if (!size)
return -EINVAL;
Ack.+ depends on CMA && (AMDTEE=y)driver.
+ help
+ Specify the default amount of memory in MiB reserved in CMA for AMD-TEE driver
Ack.+ Any amdtee shm buffer allocation larger than 64k will allocate memory from the CMACMA.
Ack, as above. Thanks for the review.+ The default can be overridden with the kernel commandline parameter "amdtee_cma".Please fix that ^^^ warning.
\ No newline at end of file
Thanks.