Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Reformat lppaca.h

Reformat lppaca.h to match Linux coding standards.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Anton Blanchard and committed by
Benjamin Herrenschmidt
59c19cb2 448054a6

+64 -68
+64 -68
arch/powerpc/include/asm/lppaca.h
··· 20 20 #define _ASM_POWERPC_LPPACA_H 21 21 #ifdef __KERNEL__ 22 22 23 - /* These definitions relate to hypervisors that only exist when using 23 + /* 24 + * These definitions relate to hypervisors that only exist when using 24 25 * a server type processor 25 26 */ 26 27 #ifdef CONFIG_PPC_BOOK3S 27 28 28 - //============================================================================= 29 - // 30 - // This control block contains the data that is shared between the 31 - // hypervisor and the OS. 32 - // 33 - // 34 - //---------------------------------------------------------------------------- 29 + /* 30 + * This control block contains the data that is shared between the 31 + * hypervisor and the OS. 32 + */ 35 33 #include <linux/cache.h> 36 34 #include <linux/threads.h> 37 35 #include <asm/types.h> ··· 41 43 */ 42 44 #define NR_LPPACAS 1 43 45 44 - 45 - /* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k 46 - * alignment is sufficient to prevent this */ 46 + /* 47 + * The Hypervisor barfs if the lppaca crosses a page boundary. A 1k 48 + * alignment is sufficient to prevent this 49 + */ 47 50 struct lppaca { 48 - //============================================================================= 49 - // CACHE_LINE_1 0x0000 - 0x007F Contains read-only data 50 - //============================================================================= 51 - u32 desc; // Eye catcher 0xD397D781 x00-x03 52 - u16 size; // Size of this struct x04-x05 53 - u16 reserved1; // Reserved x06-x07 54 - u16 reserved2:14; // Reserved x08-x09 55 - u8 shared_proc:1; // Shared processor indicator ... 56 - u8 secondary_thread:1; // Secondary thread indicator ... 57 - u8 reserved3[14]; // x0A-x17 58 - volatile u32 dyn_hw_node_id; // Dynamic Hardware Node id x18-x1B 59 - volatile u32 dyn_hw_proc_id; // Dynamic Hardware Proc Id x1C-x1F 60 - u8 reserved4[56]; // Reserved x20-x57 61 - volatile u8 vphn_assoc_counts[8]; // Virtual processor home node 62 - // associativity change counters x58-x5F 63 - u8 reserved5[32]; // Reserved x60-x7F 51 + /* cacheline 1 contains read-only data */ 64 52 65 - //============================================================================= 66 - // CACHE_LINE_2 0x0080 - 0x00FF Contains local read-write data 67 - //============================================================================= 53 + u32 desc; /* Eye catcher 0xD397D781 */ 54 + u16 size; /* Size of this struct */ 55 + u16 reserved1; 56 + u16 reserved2:14; 57 + u8 shared_proc:1; /* Shared processor indicator */ 58 + u8 secondary_thread:1; /* Secondary thread indicator */ 59 + u8 reserved3[14]; 60 + volatile u32 dyn_hw_node_id; /* Dynamic hardware node id */ 61 + volatile u32 dyn_hw_proc_id; /* Dynamic hardware proc id */ 62 + u8 reserved4[56]; 63 + volatile u8 vphn_assoc_counts[8]; /* Virtual processor home node */ 64 + /* associativity change counters */ 65 + u8 reserved5[32]; 68 66 69 - u8 reserved6[48]; // x00-x2f 70 - u8 cede_latency_hint; /* x30 */ 71 - u8 reserved7[7]; /* x31-x37 */ 72 - u8 dtl_enable_mask; // Dispatch Trace Log mask x38-x38 73 - u8 donate_dedicated_cpu; // Donate dedicated CPU cycles x39-x39 74 - u8 fpregs_in_use; // FP regs in use x3A-x3A 75 - u8 pmcregs_in_use; // PMC regs in use x3B-x3B 76 - u8 reserved8[28]; // x3C-x57 77 - u64 wait_state_cycles; // Wait cycles for this proc x58-x5F 78 - u8 reserved9[28]; // x60-x7B 79 - u16 slb_count; // # of SLBs to maintain x7C-x7D 80 - u8 idle; // Indicate OS is idle x7E 81 - u8 vmxregs_in_use; // VMX registers in use x7F 67 + /* cacheline 2 contains local read-write data */ 82 68 83 - //============================================================================= 84 - // CACHE_LINE_3 0x0100 - 0x017F: This line is shared with other processors 85 - //============================================================================= 86 - // This is the yield_count. An "odd" value (low bit on) means that 87 - // the processor is yielded (either because of an OS yield or a PLIC 88 - // preempt). An even value implies that the processor is currently 89 - // executing. 90 - // NOTE: This value will ALWAYS be zero for dedicated processors and 91 - // will NEVER be zero for shared processors (ie, initialized to a 1). 92 - volatile u32 yield_count; // PLIC increments each dispatchx00-x03 93 - volatile u32 dispersion_count; // dispatch changed phys cpu x04-x07 94 - volatile u64 cmo_faults; // CMO page fault count x08-x0F 95 - volatile u64 cmo_fault_time; // CMO page fault time x10-x17 96 - u8 reserved10[104]; // Reserved x18-x7F 69 + u8 reserved6[48]; 70 + u8 cede_latency_hint; 71 + u8 reserved7[7]; 72 + u8 dtl_enable_mask; /* Dispatch Trace Log mask */ 73 + u8 donate_dedicated_cpu; /* Donate dedicated CPU cycles */ 74 + u8 fpregs_in_use; 75 + u8 pmcregs_in_use; 76 + u8 reserved8[28]; 77 + u64 wait_state_cycles; /* Wait cycles for this proc */ 78 + u8 reserved9[28]; 79 + u16 slb_count; /* # of SLBs to maintain */ 80 + u8 idle; /* Indicate OS is idle */ 81 + u8 vmxregs_in_use; 97 82 98 - //============================================================================= 99 - // CACHE_LINE_4-5 0x0180 - 0x027F Contains PMC interrupt data 100 - //============================================================================= 101 - u32 page_ins; // CMO Hint - # page ins by OS x00-x03 102 - u8 reserved11[148]; // Reserved x04-x97 103 - volatile u64 dtl_idx; // Dispatch Trace Log head idx x98-x9F 104 - u8 reserved12[96]; // Reserved xA0-xFF 83 + /* cacheline 3 is shared with other processors */ 84 + 85 + /* 86 + * This is the yield_count. An "odd" value (low bit on) means that 87 + * the processor is yielded (either because of an OS yield or a 88 + * hypervisor preempt). An even value implies that the processor is 89 + * currently executing. 90 + * NOTE: This value will ALWAYS be zero for dedicated processors and 91 + * will NEVER be zero for shared processors (ie, initialized to a 1). 92 + */ 93 + volatile u32 yield_count; 94 + volatile u32 dispersion_count; /* dispatch changed physical cpu */ 95 + volatile u64 cmo_faults; /* CMO page fault count */ 96 + volatile u64 cmo_fault_time; /* CMO page fault time */ 97 + u8 reserved10[104]; 98 + 99 + /* cacheline 4-5 */ 100 + 101 + u32 page_ins; /* CMO Hint - # page ins by OS */ 102 + u8 reserved11[148]; 103 + volatile u64 dtl_idx; /* Dispatch Trace Log head index */ 104 + u8 reserved12[96]; 105 105 } __attribute__((__aligned__(0x400))); 106 106 107 107 extern struct lppaca lppaca[]; ··· 112 116 * ESID is stored in the lower 64bits, then the VSID. 113 117 */ 114 118 struct slb_shadow { 115 - u32 persistent; // Number of persistent SLBs x00-x03 116 - u32 buffer_length; // Total shadow buffer length x04-x07 117 - u64 reserved; // Alignment x08-x0f 119 + u32 persistent; /* Number of persistent SLBs */ 120 + u32 buffer_length; /* Total shadow buffer length */ 121 + u64 reserved; 118 122 struct { 119 123 u64 esid; 120 124 u64 vsid; 121 - } save_area[SLB_NUM_BOLTED]; // x10-x40 125 + } save_area[SLB_NUM_BOLTED]; 122 126 } ____cacheline_aligned; 123 127 124 128 extern struct slb_shadow slb_shadow[];