Make AIE PSP code common for aie2 and aie4#1119
Make AIE PSP code common for aie2 and aie4#1119donwalkarsoham wants to merge 8 commits intoamd:mainfrom
Conversation
Signed-off-by: Soham Donwalkar <soham.donwalkar@amd.com>
|
Can one of the admins verify this patch? |
|
ok to test |
src/driver/amdxdna/aie2_message.c
Outdated
| } | ||
|
|
||
| return aie2_psp_waitmode_poll(ndev->psp_hdl); | ||
| return aie_psp_waitmode_poll(ndev->psp_hdl); |
There was a problem hiding this comment.
this is aie2 only, so keep it as aie2_psp_waitmode_poll
There was a problem hiding this comment.
the implementations of aie2_psp_waitmode_poll() and aie4_psp_waitmode_poll() is identical hence made a common function for both platforms
There was a problem hiding this comment.
the implementations of aie2_psp_waitmode_poll() and aie4_psp_waitmode_poll() is identical hence made a common function for both platforms
aie4 doesn't use this api.
For upstreaming, we try not to move code around when it is not necessary.
I'd like to hold off my review for now. Please re-sync with the latest patches and update your PRs please.
including aie_message, aie_smu and aie_psp PRs.
There was a problem hiding this comment.
Sure, makes sense. Working on integrating latest patches
There was a problem hiding this comment.
Synced with latest upstream patch as well as rebased the commit on top of other changes added to the driver.
Addressed above comments in the latest version.
src/driver/amdxdna/aie2_pci.c
Outdated
| void __iomem *tbl[PCI_NUM_RESOURCES] = {0}; | ||
| struct amdxdna_dev_hdl *ndev; | ||
| struct psp_config psp_conf; | ||
| struct psp_config psp_conf = {}; |
There was a problem hiding this comment.
do not init it, community doesn't like this because it takes extra space to init, this will be init later when it is used.
please sync with my latest upstream patch
There was a problem hiding this comment.
ok got it. Will remove this.
There was a problem hiding this comment.
Synced with latest upstream patch as well as rebased the commit on top of other changes added to the driver.
Addressed above comments in the latest version.
Signed-off-by: Soham Donwalkar <soham.donwalkar@amd.com>
Signed-off-by: Soham Donwalkar <soham.donwalkar@amd.com>
Signed-off-by: Soham Donwalkar <soham.donwalkar@amd.com>
Signed-off-by: Soham Donwalkar <soham.donwalkar@amd.com>
src/driver/amdxdna/aie_psp.c
Outdated
| return psp; | ||
| } | ||
|
|
||
| void aie_psp_destroy(struct device *dev, struct psp_device *psp) |
There was a problem hiding this comment.
this should be a 3rd comment to make xen based code in common, please take this out as a separate PR.
There was a problem hiding this comment.
Added back aie2_psp_destroy() and removed common aie_psp_destroy() in latest version
|
retest this please |
Signed-off-by: Soham Donwalkar <soham.donwalkar@amd.com>
| #include "aie_common.h" | ||
| #include "amdxdna_xen.h" | ||
|
|
||
| struct psp_device *aie_psp_create(struct device *dev, struct psp_config *conf) |
There was a problem hiding this comment.
The name should be aiem_psp_create. Why because it is using drmm_zalloc.
your code is not up to data.
Please fix this.
Problem solved by the commit
Add common psp code for both aie2 and aie4
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
N/A
How problem was solved, alternative solutions (if any) and why they were rejected
1> Removed duplicates and merged common code.
Risks (if any) associated the changes in the commit
Should be backward compatible
What has been tested and how, request additional testing if necessary
1> Driver installation successful.
Documentation impact (if any)
N/A