summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt2011-06-16 17:08:24 +0200
committerBenjamin Herrenschmidt2011-06-29 09:48:30 +0200
commit048bee7718bb3532aa96d0ce8572cced2ea951e6 (patch)
treed29b370d9d467a541b510f60f6316e0f7636bd1a /arch/powerpc
parentpowerpc/hvsi: Move HVSI protocol definitions to a header file (diff)
downloadkernel-qcow2-linux-048bee7718bb3532aa96d0ce8572cced2ea951e6.tar.gz
kernel-qcow2-linux-048bee7718bb3532aa96d0ce8572cced2ea951e6.tar.xz
kernel-qcow2-linux-048bee7718bb3532aa96d0ce8572cced2ea951e6.zip
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')
-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 {
} __attribute__((packed));
struct hvsi_data {
- uint8_t type;
- uint8_t len;
- uint16_t seqno;
+ struct hvsi_header hdr;
uint8_t data[HVSI_MAX_OUTGOING_DATA];
} __attribute__((packed));
struct hvsi_control {
- uint8_t type;
- uint8_t len;
- uint16_t seqno;
+ struct hvsi_header hdr;
uint16_t verb;
/* optional depending on verb: */
uint32_t word;
@@ -46,16 +42,12 @@ struct hvsi_control {
} __attribute__((packed));
struct hvsi_query {
- uint8_t type;
- uint8_t len;
- uint16_t seqno;
+ struct hvsi_header hdr;
uint16_t verb;
} __attribute__((packed));
struct hvsi_query_response {
- uint8_t type;
- uint8_t len;
- uint16_t seqno;
+ struct hvsi_header hdr;
uint16_t verb;
uint16_t query_seqno;
union {