Skip to contentSkip to conversation

mailbox: pcc: Add PCC request and free channel declarations

PATCH Superseded Hoan Tran 2 participants 3 messages Jun 14, 2016 – Jun 15, 2016

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Hoan Tran

author
#0 lore raw

PATCH 1/1 mailbox: pcc: Add PCC request and free channel declarations

As PCC will be used by other clients not only CPPC.
This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel() declarations

---
 include/acpi/cppc_acpi.h       | 4 ----
 include/linux/mailbox_client.h | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)
include/acpi/cppc_acpi.h +0 -4
index dad8af3..819b4b9 100644
@@ -130,8 +130,4 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
 extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
 extern int acpi_get_psd_map(struct cpudata **);
 
-/* Methods to interact with the PCC mailbox controller. */
-extern struct mbox_chan *
-	pcc_mbox_request_channel(struct mbox_client *, unsigned int);
-
 #endif /* _CPPC_ACPI_H*/
include/linux/mailbox_client.h +4 -0
index 41e2af8..2758d18 100644
@@ -50,4 +50,8 @@ void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
 bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
 void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
 
+/* Methods to interact with the PCC mailbox controller. */
+struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *, int);
+void pcc_mbox_free_channel(struct mbox_chan *chan);
+
 #endif /* __MAILBOX_CLIENT_H */
Signature · 1 line
1.9.1
#1 lore raw

Hi Hoan,

Quoted 28 lines · Hoan Tran

As PCC will be used by other clients not only CPPC.
This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel() declarations

---
 include/acpi/cppc_acpi.h       | 4 ----
 include/linux/mailbox_client.h | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)
include/acpi/cppc_acpi.h +0 -4
index dad8af3..819b4b9 100644
@@ -130,8 +130,4 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
 extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
 extern int acpi_get_psd_map(struct cpudata **);
 
-/* Methods to interact with the PCC mailbox controller. */
-extern struct mbox_chan *
-	pcc_mbox_request_channel(struct mbox_client *, unsigned int);
-
 #endif /* _CPPC_ACPI_H*/
include/linux/mailbox_client.h +0 -0
index 41e2af8..2758d18 100644

include/linux/mailbox_client.h void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */ · line 56

Quoted 7 lines
include/linux/mailbox_client.h +4 -0
@@ -50,4 +50,8 @@ void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
 bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
 void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
 
+/* Methods to interact with the PCC mailbox controller. */
+struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *, int);
+void pcc_mbox_free_channel(struct mbox_chan *chan);
+

Since these APIs are specific to PCC, may be we should introduce a new header for pcc clients instead of adding to the common mailbox_client header.

include/linux/mailbox_client.h void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */ · line 57

Quoted 1 line
include/linux/mailbox_client.h +0 -0
 #endif /* __MAILBOX_CLIENT_H */

Thanks,
Prashanth

author
#2 lore raw

Hi Prashanth,

Quoted 34 lines · Prashanth

Hi Hoan,

Quoted 31 lines · Hoan Tran

As PCC will be used by other clients not only CPPC.
This change exports pcc_mbox_request_channel() and pcc_mbox_free_channel() declarations

---
 include/acpi/cppc_acpi.h       | 4 ----
 include/linux/mailbox_client.h | 4 ++++
 2 files changed, 4 insertions(+), 4 deletions(-)
include/acpi/cppc_acpi.h +0 -4
index dad8af3..819b4b9 100644
@@ -130,8 +130,4 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
 extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
 extern int acpi_get_psd_map(struct cpudata **);
 
-/* Methods to interact with the PCC mailbox controller. */
-extern struct mbox_chan *
-     pcc_mbox_request_channel(struct mbox_client *, unsigned int);
-
 #endif /* _CPPC_ACPI_H*/
include/linux/mailbox_client.h +0 -0
index 41e2af8..2758d18 100644
@@ -50,4 +50,8 @@ void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
 bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
 void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
 
Quoted 6 lines

include/linux/mailbox_client.h void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */ · line 56

Quoted 4 lines
include/linux/mailbox_client.h +4 -0
+/* Methods to interact with the PCC mailbox controller. */
+struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *, int);
+void pcc_mbox_free_channel(struct mbox_chan *chan);
+

Since these APIs are specific to PCC, may be we should introduce a new header for pcc clients instead of adding to the common mailbox_client header.

Agreed, maybe I should create a "pcc.h" file inside "/include/acpi" folder. If you have any suggestion about the location of this file, please let me know.

Thanks
Hoan

Quoted 4 lines

include/linux/mailbox_client.h void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */ · line 57

Quoted 1 line
include/linux/mailbox_client.h +0 -0
 #endif /* __MAILBOX_CLIENT_H */

Thanks,
Prashanth