arch/mips/include/asm/octeon/cvmx-packet.h

Source file repositories/reference/linux-study-clean/arch/mips/include/asm/octeon/cvmx-packet.h

File Facts

System
Linux kernel
Corpus path
arch/mips/include/asm/octeon/cvmx-packet.h
Extension
.h
Size
2115 bytes
Lines
70
Domain
Architecture Layer
Bucket
arch/mips
Inferred role
Architecture Layer: implementation source
Status
source implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __CVMX_PACKET_H__
#define __CVMX_PACKET_H__

/**
 * This structure defines a buffer pointer on Octeon
 */
union cvmx_buf_ptr {
	void *ptr;
	uint64_t u64;
	struct {
#ifdef __BIG_ENDIAN_BITFIELD
		/* if set, invert the "free" pick of the overall
		 * packet. HW always sets this bit to 0 on inbound
		 * packet */
		uint64_t i:1;

		/* Indicates the amount to back up to get to the
		 * buffer start in cache lines. In most cases this is
		 * less than one complete cache line, so the value is
		 * zero */
		uint64_t back:4;
		/* The pool that the buffer came from / goes to */
		uint64_t pool:3;
		/* The size of the segment pointed to by addr (in bytes) */
		uint64_t size:16;
		/* Pointer to the first byte of the data, NOT buffer */
		uint64_t addr:40;
#else
	        uint64_t addr:40;
	        uint64_t size:16;
	        uint64_t pool:3;
	        uint64_t back:4;
	        uint64_t i:1;
#endif
	} s;
};

#endif /*  __CVMX_PACKET_H__ */

Annotation

Implementation Notes