Message ID | 20250313085526.1439092-1-yong.liang.choong@linux.intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] platform/x86: intel_pmc_ipc: add option to build without ACPI | expand |
On Thu, Mar 13, 2025 at 10:55 AM Choong Yong Liang <yong.liang.choong@linux.intel.com> wrote: > > From: David E. Box <david.e.box@linux.intel.com> > > Introduce a configuration option that allows users to build the > intel_pmc_ipc driver without ACPI support. This is useful for > systems where ACPI is not available or desired. > > Based on the discussion from the patch [1], it was necessary to > provide this option to accommodate specific use cases. > Link: https://patchwork.kernel.org/project/netdevbpf/patch/20250227121522.1802832-6-yong.liang.choong@linux.intel.com/#26280764 [1] > No blank line here, but I think Hans or Ilpo may tweak this when applying. Otherwise LGTM, Reviewed-by: Andy Shevchenko <andy@kernel.org> Thanks! > Signed-off-by: David E. Box <david.e.box@linux.intel.com> > Co-developed-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> > Signed-off-by: Choong Yong Liang <yong.liang.choong@linux.intel.com>
On Thu, 13 Mar 2025, Andy Shevchenko wrote: > On Thu, Mar 13, 2025 at 10:55 AM Choong Yong Liang > <yong.liang.choong@linux.intel.com> wrote: > > > > From: David E. Box <david.e.box@linux.intel.com> > > > > Introduce a configuration option that allows users to build the > > intel_pmc_ipc driver without ACPI support. This is useful for > > systems where ACPI is not available or desired. > > > > Based on the discussion from the patch [1], it was necessary to > > provide this option to accommodate specific use cases. > > > Link: https://patchwork.kernel.org/project/netdevbpf/patch/20250227121522.1802832-6-yong.liang.choong@linux.intel.com/#26280764 [1] > > > > > No blank line here, but I think Hans or Ilpo may tweak this when applying. > > Otherwise LGTM, > Reviewed-by: Andy Shevchenko <andy@kernel.org> > Thanks! Hi both, The original commit went through net-next tree so I cannot take this into pdx86 tree until after the merge window. It seems low impact enough that coordinating with the netdev might not be worth the effort. To get it going through net-next tree, you'd need to submit v3 so that in addition to the current receipients, all relevant netdev people & ML are included as receipients. But I'd be fine if you leave it until after the merge window and I can then handle it then. > > Signed-off-by: David E. Box <david.e.box@linux.intel.com> > > Co-developed-by: Choong Yong Liang <yong.liang.choong@linux.intel.com> > > Signed-off-by: Choong Yong Liang <yong.liang.choong@linux.intel.com>
diff --git a/include/linux/platform_data/x86/intel_pmc_ipc.h b/include/linux/platform_data/x86/intel_pmc_ipc.h index 6e603a8c075f..1d34435b7001 100644 --- a/include/linux/platform_data/x86/intel_pmc_ipc.h +++ b/include/linux/platform_data/x86/intel_pmc_ipc.h @@ -36,6 +36,7 @@ struct pmc_ipc_rbuf { */ static inline int intel_pmc_ipc(struct pmc_ipc_cmd *ipc_cmd, struct pmc_ipc_rbuf *rbuf) { +#ifdef CONFIG_ACPI struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; union acpi_object params[PMC_IPCS_PARAM_COUNT] = { {.type = ACPI_TYPE_INTEGER,}, @@ -89,6 +90,9 @@ static inline int intel_pmc_ipc(struct pmc_ipc_cmd *ipc_cmd, struct pmc_ipc_rbuf } return 0; +#else + return -ENODEV; +#endif /* CONFIG_ACPI */ } #endif /* INTEL_PMC_IPC_H */