Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-only */
2#ifndef _PAPR_HVPIPE_H
3#define _PAPR_HVPIPE_H
4
5#define HVPIPE_HMC_ID_MASK 0x02000000 /*02-HMC,00-reserved and HMC ID */
6#define HVPIPE_MAX_WRITE_BUFFER_SIZE 4048
7/*
8 * hvpipe specific RTAS return values
9 */
10#define RTAS_HVPIPE_CLOSED -4
11
12#define HVPIPE_HDR_LEN sizeof(struct papr_hvpipe_hdr)
13
14enum hvpipe_migrate_action {
15 HVPIPE_SUSPEND,
16 HVPIPE_RESUME,
17};
18
19struct hvpipe_source_info {
20 struct list_head list; /* list of sources */
21 u32 srcID;
22 u32 hvpipe_status;
23 wait_queue_head_t recv_wqh; /* wake up poll() waitq */
24 struct task_struct *tsk;
25};
26
27/*
28 * Source ID Format 0xCCRRQQQQ
29 * CC = indicating value is source type (ex: 0x02 for HMC)
30 * RR = 0x00 (reserved)
31 * QQQQ = 0x0000 – 0xFFFF indicating the source index indetifier
32 */
33struct hvpipe_event_buf {
34 __be32 srcID; /* Source ID */
35 u8 event_type; /* 0x01 for hvpipe message available */
36 /* from specified src ID */
37 /* 0x02 for loss of pipe connection */
38 /* with specified src ID */
39};
40
41void hvpipe_migration_handler(int action);
42#endif /* _PAPR_HVPIPE_H */