···2020#define _ASM_POWERPC_LPPACA_H2121#ifdef __KERNEL__22222323-/* These definitions relate to hypervisors that only exist when using2323+/*2424+ * These definitions relate to hypervisors that only exist when using2425 * a server type processor2526 */2627#ifdef CONFIG_PPC_BOOK3S27282828-//=============================================================================2929-//3030-// This control block contains the data that is shared between the3131-// hypervisor and the OS.3232-//3333-//3434-//----------------------------------------------------------------------------2929+/*3030+ * This control block contains the data that is shared between the3131+ * hypervisor and the OS.3232+ */3533#include <linux/cache.h>3634#include <linux/threads.h>3735#include <asm/types.h>···4143 */4244#define NR_LPPACAS 143454444-4545-/* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k4646- * alignment is sufficient to prevent this */4646+/*4747+ * The Hypervisor barfs if the lppaca crosses a page boundary. A 1k4848+ * alignment is sufficient to prevent this4949+ */4750struct lppaca {4848-//=============================================================================4949-// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data5050-//=============================================================================5151- u32 desc; // Eye catcher 0xD397D781 x00-x035252- u16 size; // Size of this struct x04-x055353- u16 reserved1; // Reserved x06-x075454- u16 reserved2:14; // Reserved x08-x095555- u8 shared_proc:1; // Shared processor indicator ...5656- u8 secondary_thread:1; // Secondary thread indicator ...5757- u8 reserved3[14]; // x0A-x175858- volatile u32 dyn_hw_node_id; // Dynamic Hardware Node id x18-x1B5959- volatile u32 dyn_hw_proc_id; // Dynamic Hardware Proc Id x1C-x1F6060- u8 reserved4[56]; // Reserved x20-x576161- volatile u8 vphn_assoc_counts[8]; // Virtual processor home node6262- // associativity change counters x58-x5F6363- u8 reserved5[32]; // Reserved x60-x7F5151+ /* cacheline 1 contains read-only data */64526565-//=============================================================================6666-// CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data6767-//=============================================================================5353+ u32 desc; /* Eye catcher 0xD397D781 */5454+ u16 size; /* Size of this struct */5555+ u16 reserved1;5656+ u16 reserved2:14;5757+ u8 shared_proc:1; /* Shared processor indicator */5858+ u8 secondary_thread:1; /* Secondary thread indicator */5959+ u8 reserved3[14];6060+ volatile u32 dyn_hw_node_id; /* Dynamic hardware node id */6161+ volatile u32 dyn_hw_proc_id; /* Dynamic hardware proc id */6262+ u8 reserved4[56];6363+ volatile u8 vphn_assoc_counts[8]; /* Virtual processor home node */6464+ /* associativity change counters */6565+ u8 reserved5[32];68666969- u8 reserved6[48]; // x00-x2f7070- u8 cede_latency_hint; /* x30 */7171- u8 reserved7[7]; /* x31-x37 */7272- u8 dtl_enable_mask; // Dispatch Trace Log mask x38-x387373- u8 donate_dedicated_cpu; // Donate dedicated CPU cycles x39-x397474- u8 fpregs_in_use; // FP regs in use x3A-x3A7575- u8 pmcregs_in_use; // PMC regs in use x3B-x3B7676- u8 reserved8[28]; // x3C-x577777- u64 wait_state_cycles; // Wait cycles for this proc x58-x5F7878- u8 reserved9[28]; // x60-x7B7979- u16 slb_count; // # of SLBs to maintain x7C-x7D8080- u8 idle; // Indicate OS is idle x7E8181- u8 vmxregs_in_use; // VMX registers in use x7F6767+ /* cacheline 2 contains local read-write data */82688383-//=============================================================================8484-// CACHE_LINE_3 0x0100 - 0x017F: This line is shared with other processors8585-//=============================================================================8686- // This is the yield_count. An "odd" value (low bit on) means that8787- // the processor is yielded (either because of an OS yield or a PLIC8888- // preempt). An even value implies that the processor is currently8989- // executing.9090- // NOTE: This value will ALWAYS be zero for dedicated processors and9191- // will NEVER be zero for shared processors (ie, initialized to a 1).9292- volatile u32 yield_count; // PLIC increments each dispatchx00-x039393- volatile u32 dispersion_count; // dispatch changed phys cpu x04-x079494- volatile u64 cmo_faults; // CMO page fault count x08-x0F9595- volatile u64 cmo_fault_time; // CMO page fault time x10-x179696- u8 reserved10[104]; // Reserved x18-x7F6969+ u8 reserved6[48];7070+ u8 cede_latency_hint;7171+ u8 reserved7[7];7272+ u8 dtl_enable_mask; /* Dispatch Trace Log mask */7373+ u8 donate_dedicated_cpu; /* Donate dedicated CPU cycles */7474+ u8 fpregs_in_use;7575+ u8 pmcregs_in_use;7676+ u8 reserved8[28];7777+ u64 wait_state_cycles; /* Wait cycles for this proc */7878+ u8 reserved9[28];7979+ u16 slb_count; /* # of SLBs to maintain */8080+ u8 idle; /* Indicate OS is idle */8181+ u8 vmxregs_in_use;97829898-//=============================================================================9999-// CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data100100-//=============================================================================101101- u32 page_ins; // CMO Hint - # page ins by OS x00-x03102102- u8 reserved11[148]; // Reserved x04-x97103103- volatile u64 dtl_idx; // Dispatch Trace Log head idx x98-x9F104104- u8 reserved12[96]; // Reserved xA0-xFF8383+ /* cacheline 3 is shared with other processors */8484+8585+ /*8686+ * This is the yield_count. An "odd" value (low bit on) means that8787+ * the processor is yielded (either because of an OS yield or a8888+ * hypervisor preempt). An even value implies that the processor is8989+ * currently executing.9090+ * NOTE: This value will ALWAYS be zero for dedicated processors and9191+ * will NEVER be zero for shared processors (ie, initialized to a 1).9292+ */9393+ volatile u32 yield_count;9494+ volatile u32 dispersion_count; /* dispatch changed physical cpu */9595+ volatile u64 cmo_faults; /* CMO page fault count */9696+ volatile u64 cmo_fault_time; /* CMO page fault time */9797+ u8 reserved10[104];9898+9999+ /* cacheline 4-5 */100100+101101+ u32 page_ins; /* CMO Hint - # page ins by OS */102102+ u8 reserved11[148];103103+ volatile u64 dtl_idx; /* Dispatch Trace Log head index */104104+ u8 reserved12[96];105105} __attribute__((__aligned__(0x400)));106106107107extern struct lppaca lppaca[];···112116 * ESID is stored in the lower 64bits, then the VSID.113117 */114118struct slb_shadow {115115- u32 persistent; // Number of persistent SLBs x00-x03116116- u32 buffer_length; // Total shadow buffer length x04-x07117117- u64 reserved; // Alignment x08-x0f119119+ u32 persistent; /* Number of persistent SLBs */120120+ u32 buffer_length; /* Total shadow buffer length */121121+ u64 reserved;118122 struct {119123 u64 esid;120124 u64 vsid;121121- } save_area[SLB_NUM_BOLTED]; // x10-x40125125+ } save_area[SLB_NUM_BOLTED];122126} ____cacheline_aligned;123127124128extern struct slb_shadow slb_shadow[];