summaryrefslogtreecommitdiff
path: root/proto_vlan.h
blob: dc31cfac98e4c7185c7430ba9d48e7fa6283bc2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
 * proto_vlan.h - VLAN proto helpers & declarations
 * Subject to the GPL, version 2.
 */

#ifndef PROTO_VLAN_H
#define PROTO_VLAN_H

#include <stdbool.h>
#include <inttypes.h>

static inline uint16_t vlan_tci2prio(uint16_t tci)
{
	return (tci & 0xe000) >> 13;
}

static inline uint16_t vlan_tci2cfi(uint16_t tci)
{
	return (tci & 0x1000) >> 12;
}

static inline uint16_t vlan_tci2vid(uint16_t tci)
{
	return tci & 0x0fff;
}

#endif
15:47:06 +1000 commit5d31a96e6c0187f2c5d7004e005fd094a1277e9e (patch) tree5d2bf3efea21bedf6a0df86b66f4c420fd06190e /COPYING parentf63e6d89876034c21ecd18bb1cd0d6c5b8da11a5 (diff)
powerpc/livepatch: Add livepatch stack to struct thread_info
In order to support live patching we need to maintain an alternate stack of TOC & LR values. We use the base of the stack for this, and store the "live patch stack pointer" in struct thread_info. Unlike the other fields of thread_info, we can not statically initialise that value, so it must be done at run time. This patch just adds the code to support that, it is not enabled until the next patch which actually adds live patch support. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Acked-by: Balbir Singh <bsingharora@gmail.com>
Diffstat (limited to 'COPYING')