aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-06-16 11:08:24 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-06-29 03:48:30 -0400
commit048bee7718bb3532aa96d0ce8572cced2ea951e6 (patch)
treed29b370d9d467a541b510f60f6316e0f7636bd1a /arch/powerpc/include
parent725e789f228641fdfafcd65458f0ac78b87acc5a (diff)
powerpc/pseries: Factor HVSI header struct in packet definitions
Embed the struct hvsi_header in the various packet definitions rather than open coding it multiple times. Will help provide stronger type checking. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r--arch/powerpc/include/asm/hvsi.h16
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/powerpc/include/asm/hvsi.h b/arch/powerpc/include/asm/hvsi.h
index f13125a0cb3a..ab2ddd76c2e0 100644
--- a/arch/powerpc/include/asm/hvsi.h
+++ b/arch/powerpc/include/asm/hvsi.h
@@ -29,16 +29,12 @@ struct hvsi_header {
29} __attribute__((packed)); 29} __attribute__((packed));
30 30
31struct hvsi_data { 31struct hvsi_data {
32 uint8_t type; 32 struct hvsi_header hdr;
33 uint8_t len;
34 uint16_t seqno;
35 uint8_t data[HVSI_MAX_OUTGOING_DATA]; 33 uint8_t data[HVSI_MAX_OUTGOING_DATA];
36} __attribute__((packed)); 34} __attribute__((packed));
37 35
38struct hvsi_control { 36struct hvsi_control {
39 uint8_t type; 37 struct hvsi_header hdr;
40 uint8_t len;
41 uint16_t seqno;
42 uint16_t verb; 38 uint16_t verb;
43 /* optional depending on verb: */ 39 /* optional depending on verb: */
44 uint32_t word; 40 uint32_t word;
@@ -46,16 +42,12 @@ struct hvsi_control {
46} __attribute__((packed)); 42} __attribute__((packed));
47 43
48struct hvsi_query { 44struct hvsi_query {
49 uint8_t type; 45 struct hvsi_header hdr;
50 uint8_t len;
51 uint16_t seqno;
52 uint16_t verb; 46 uint16_t verb;
53} __attribute__((packed)); 47} __attribute__((packed));
54 48
55struct hvsi_query_response { 49struct hvsi_query_response {
56 uint8_t type; 50 struct hvsi_header hdr;
57 uint8_t len;
58 uint16_t seqno;
59 uint16_t verb; 51 uint16_t verb;
60 uint16_t query_seqno; 52 uint16_t query_seqno;
61 union { 53 union {