| 8560b277 | 12-Nov-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Change the error type
When file is opened in WRITE only mode, then GET messages are not allowed and when file is opened in READ only mode, SET messages are not allowed. In the
platform/x86/amd/hsmp: Change the error type
When file is opened in WRITE only mode, then GET messages are not allowed and when file is opened in READ only mode, SET messages are not allowed. In these scenerios, return error EPERM to userspace instead of EINVAL.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| 1349dd7d | 21-Oct-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Make hsmp_pdev static instead of global
Instead of making hsmp_pdev global and exporting this symbol from hsmp.c, make it static and create a wrapper function get_hsmp_pdev()
platform/x86/amd/hsmp: Make hsmp_pdev static instead of global
Instead of making hsmp_pdev global and exporting this symbol from hsmp.c, make it static and create a wrapper function get_hsmp_pdev() to access hsmp_pdev from plat.c and acpi.c.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| c1691730 | 21-Oct-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Use dev_groups in the driver structure
Move out of device_add_group() variants, instead assign static array of attribute groups to .dev_groups in platform_driver structure. Th
platform/x86/amd/hsmp: Use dev_groups in the driver structure
Move out of device_add_group() variants, instead assign static array of attribute groups to .dev_groups in platform_driver structure. Then use is_visible to enable only the necessary files on the platform.
.read() and .is_bin_visibile() have slightly different implemetations on ACPI and non-ACPI system, so move them to respective files.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| 4fc0366e | 21-Oct-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Use name space while exporting module symbols
hsmp_send_message() is exported with AMD_HSMP name space. The other modules who would like to use this symbol, need to import AMD
platform/x86/amd/hsmp: Use name space while exporting module symbols
hsmp_send_message() is exported with AMD_HSMP name space. The other modules who would like to use this symbol, need to import AMD_HSMP namespace using MODULE_IMPORT_NS() to get away with warning.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| 7d3135d1 | 21-Oct-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Create separate ACPI, plat and common drivers
Separate the probes for HSMP ACPI and platform device drivers.
Provide a Kconfig option to choose between ACPI or the platform d
platform/x86/amd/hsmp: Create separate ACPI, plat and common drivers
Separate the probes for HSMP ACPI and platform device drivers.
Provide a Kconfig option to choose between ACPI or the platform device based driver. The common code which is the core part of the HSMP driver maintained at hsmp.c is guarded by AMD_HSMP config and is selected by these two driver configs. This will be built into separate hsmp_common.ko module and acpi as hsmp_acpi and plat as amd_hsmp respectively.
Also add "|| COMPILE_TEST" clause in Kconfig to get build coverage for HSMP.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Link: https://lore.kernel.org/r/[email protected] [ij: Fixed doc to use pre-formatted text for the ACPI dump.] Reviewed-by: Ilpo Järvinen <[email protected]> Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| 8e75dff5 | 21-Oct-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Change generic plat_dev name to hsmp_pdev
plat_dev is a commonly used variable name, since its made as extern now, change it to more specific name. Also change miscdevice hsmp
platform/x86/amd/hsmp: Change generic plat_dev name to hsmp_pdev
plat_dev is a commonly used variable name, since its made as extern now, change it to more specific name. Also change miscdevice hsmp_device to mdev.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| 969f9154 | 21-Oct-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Move ACPI code to acpi.c
An upcoming change splits HSMP driver into ACPI and platform device variants. Prepare for the split by moving ACPI related code to acpi.c from hsmp.c.
platform/x86/amd/hsmp: Move ACPI code to acpi.c
An upcoming change splits HSMP driver into ACPI and platform device variants. Prepare for the split by moving ACPI related code to acpi.c from hsmp.c. Common code is kept in hsmp.c.
No logical/functional change. We still have one driver at this point, the driver probe will be split in the next patch.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| 1757d2b8 | 21-Oct-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Move structure and macros to header file
This is in preparation to splitting ACPI and platform device drivers. No logical change, move common structures, macros to hsmp.h, add
platform/x86/amd/hsmp: Move structure and macros to header file
This is in preparation to splitting ACPI and platform device drivers. No logical change, move common structures, macros to hsmp.h, add missed header files, remove unwanted header inclusions, and re-order the header file in hsmp.c file.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|
| d9a621eb | 21-Oct-2024 |
Suma Hegde <[email protected]> |
platform/x86/amd/hsmp: Convert amd_hsmp_rdwr() to a function pointer
This is in preparation to ACPI, Non-ACPI split. amd_hsmp_rdwr() is used to access HSMP protocol registers. ACPI and Non-ACPI use
platform/x86/amd/hsmp: Convert amd_hsmp_rdwr() to a function pointer
This is in preparation to ACPI, Non-ACPI split. amd_hsmp_rdwr() is used to access HSMP protocol registers. ACPI and Non-ACPI use different methods to access these registers. Now that code is split and common functionality is kept in hsmp.c we need to define a function pointer to handle these functions separately.
Signed-off-by: Suma Hegde <[email protected]> Reviewed-by: Naveen Krishna Chatradhi <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ilpo Järvinen <[email protected]>
show more ...
|