Subject: avoid bit fields in cbe_regs.h From: Kevin Corry Structures with bit-fields are against kernel coding standards. Change the cbe_pmd_regs structure to use simple u64 fields for the PMU registers instead of defining a bit-field structure for each register. Signed-off-by: Kevin Corry Signed-off-by: Arnd Bergmann --- Index: linux-2.6/arch/powerpc/platforms/cell/cbe_regs.h =================================================================== --- linux-2.6.orig/arch/powerpc/platforms/cell/cbe_regs.h +++ linux-2.6/arch/powerpc/platforms/cell/cbe_regs.h @@ -35,112 +35,6 @@ * */ -struct pm { - u32 val; - u32 pad; -}; - -struct pm_status { - union { - u32 val; - struct { - u32 ctr_overflow:8; -#define CBE_CTR_OVERFLOW(ctr) (1 << (7 - ((ctr) & 7))) - - u32 interval_timeout:1; - u32 trace_buffer_full:1; - u32 trace_buffer_underflow:1; - u32 reserved:21; - }; - }; - u32 pad; -}; - -struct pm_control { - union { - u32 val; - struct { - u32 ena_perf_mon:1; - u32 stop_at_max:1; - u32 trace_mode:2; -#define CBE_TRC_MODE_NONE 0 -#define CBE_TRC_MODE_COUNT 1 -#define CBE_TRC_MODE_OCCURRENCE 2 -#define CBE_TRC_MODE_THRESHOLD 3 - - u32 count_qualifiers:2; - u32 thermal_trace_en:1; - u32 sixteen_bit_ctr:4; -#define CBE_16BIT_CTR(ctr) (1 << (3 - ((ctr) & 3))) - - u32 freeze:1; - u32 ppu_count_mode:2; -#define CBE_COUNT_SUPERVISOR_MODE 0 -#define CBE_COUNT_HYPERVISOR_MODE 1 -#define CBE_COUNT_PROBLEM_MODE 2 -#define CBE_COUNT_ALL_MODES 3 - - u32 trace_buffer_overwrite:1; - u32 trace_8_bits:1; - u32 ext_tr_enable:1; - u32 ppu_th0_addr_tr_enable:1; - u32 ppu_th1_addr_tr_enable:1; - u32 ppu_th0_bkmk_tr_enable:1; - u32 ppu_th1_bkmk_tr_enable:1; - u32 spu_addr_tr_enable_0:1; - u32 spu_addr_tr_enable_1:1; - u32 spu_bkmk_tr_enable_0:1; - u32 spu_bkmk_tr_enable_1:1; - u32 reserved:7; - }; - }; - u32 pad; -}; - -struct pm07_control { - union { - u32 val; -#define CBE_ENABLE_CTR 0x00400000 -#define CBE_COUNT_ALL_CYCLES 0x42800000 - - struct { - u32 multiplexor:6; - u32 input_control:1; - u32 polarity:1; - u32 count_cycles:1; - u32 count_enable:1; - u32 reserved:22; - }; - }; - u32 pad; -}; - -struct trace_address { - union { - u64 val; - struct { - u64 write_addr:10; - u64 read_addr:10; - u64 full:1; - u64 empty:1; - u64 data_count:10; -#define CBE_TA_MAX_COUNT 0x400 - - u64 reserved:32; - }; - }; -}; - -struct ext_tr_timer { - union { - u64 val; - struct { - u64 ext_tr_timer:16; - u64 reserved:48; - }; - }; -}; - union spe_reg { u64 val; u8 spe[8]; @@ -156,32 +50,32 @@ union ppe_spe_reg { struct cbe_pmd_regs { - /* Trace Logic Analyzer */ + /* Debug Bus Control */ u64 pad_0x0000; /* 0x0000 */ - struct pm group_control; /* 0x0008 */ + u64 group_control; /* 0x0008 */ u8 pad_0x0010_0x00a8 [0x00a8 - 0x0010]; /* 0x0010 */ - struct pm debug_bus_control; /* 0x00a8 */ + u64 debug_bus_control; /* 0x00a8 */ u8 pad_0x00b0_0x0100 [0x0100 - 0x00b0]; /* 0x00b0 */ u64 trace_aux_data; /* 0x0100 */ u64 trace_buffer_0_63; /* 0x0108 */ u64 trace_buffer_64_127; /* 0x0110 */ - struct trace_address trace_address; /* 0x0118 */ - struct ext_tr_timer ext_tr_timer; /* 0x0120 */ + u64 trace_address; /* 0x0118 */ + u64 ext_tr_timer; /* 0x0120 */ u8 pad_0x0128_0x0400 [0x0400 - 0x0128]; /* 0x0128 */ /* Performance Monitor */ - struct pm_status pm_status; /* 0x0400 */ - struct pm_control pm_control; /* 0x0408 */ - struct pm pm_interval; /* 0x0410 */ - struct pm pm_ctr[4]; /* 0x0418 */ - struct pm pm_start_stop; /* 0x0438 */ - struct pm07_control pm07_control[8]; /* 0x0440 */ + u64 pm_status; /* 0x0400 */ + u64 pm_control; /* 0x0408 */ + u64 pm_interval; /* 0x0410 */ + u64 pm_ctr[4]; /* 0x0418 */ + u64 pm_start_stop; /* 0x0438 */ + u64 pm07_control[8]; /* 0x0440 */ u8 pad_0x0480_0x0800 [0x0800 - 0x0480]; /* 0x0480 */