• Home
  • Raw
  • Download

Lines Matching +full:8 +full:- +full:cpu

2  * Copyright (c) 2003-2012 Broadcom Corporation
35 #include <asm/cpu-info.h>
39 #include <asm/cpu.h>
56 xlr_board_fmn_config.bucket_size[(bkt * 8) + 0], in print_credit_config()
57 xlr_board_fmn_config.bucket_size[(bkt * 8) + 1], in print_credit_config()
58 xlr_board_fmn_config.bucket_size[(bkt * 8) + 2], in print_credit_config()
59 xlr_board_fmn_config.bucket_size[(bkt * 8) + 3], in print_credit_config()
60 xlr_board_fmn_config.bucket_size[(bkt * 8) + 4], in print_credit_config()
61 xlr_board_fmn_config.bucket_size[(bkt * 8) + 5], in print_credit_config()
62 xlr_board_fmn_config.bucket_size[(bkt * 8) + 6], in print_credit_config()
63 xlr_board_fmn_config.bucket_size[(bkt * 8) + 7]); in print_credit_config()
70 fmn_info->credit_config[(bkt * 8) + 0], in print_credit_config()
71 fmn_info->credit_config[(bkt * 8) + 1], in print_credit_config()
72 fmn_info->credit_config[(bkt * 8) + 2], in print_credit_config()
73 fmn_info->credit_config[(bkt * 8) + 3], in print_credit_config()
74 fmn_info->credit_config[(bkt * 8) + 4], in print_credit_config()
75 fmn_info->credit_config[(bkt * 8) + 5], in print_credit_config()
76 fmn_info->credit_config[(bkt * 8) + 6], in print_credit_config()
77 fmn_info->credit_config[(bkt * 8) + 7]); in print_credit_config()
86 ncores = hweight32(nlm_current_node()->coremask); in check_credit_distribution()
90 total_credits += cfg->cpu[n].credit_config[bkt]; in check_credit_distribution()
91 total_credits += cfg->gmac[0].credit_config[bkt]; in check_credit_distribution()
92 total_credits += cfg->gmac[1].credit_config[bkt]; in check_credit_distribution()
93 total_credits += cfg->dma.credit_config[bkt]; in check_credit_distribution()
94 total_credits += cfg->cmp.credit_config[bkt]; in check_credit_distribution()
95 total_credits += cfg->sae.credit_config[bkt]; in check_credit_distribution()
96 total_credits += cfg->xgmac[0].credit_config[bkt]; in check_credit_distribution()
97 total_credits += cfg->xgmac[1].credit_config[bkt]; in check_credit_distribution()
98 if (total_credits > cfg->bucket_size[bkt]) in check_credit_distribution()
100 bkt, total_credits, cfg->bucket_size[bkt]); in check_credit_distribution()
116 * @cpu_credits: Allowed credits to cpu for each devices pointing by dev_info
123 struct xlr_fmn_info *cpu = xlr_board_fmn_config.cpu; in setup_fmn_cc() local
125 num_core = hweight32(nlm_current_node()->coremask); in setup_fmn_cc()
126 dev_info->num_buckets = num_buckets; in setup_fmn_cc()
127 dev_info->start_stn_id = start_stn_id; in setup_fmn_cc()
128 dev_info->end_stn_id = end_stn_id; in setup_fmn_cc()
140 cpu[j].credit_config[i] = credits_per_cpu; in setup_fmn_cc()
143 credits_per_cpu = size - (credits_per_cpu * num_core); in setup_fmn_cc()
147 cpu[j].credit_config[i] += 4; in setup_fmn_cc()
148 credits_per_cpu -= 4; in setup_fmn_cc()
152 /* Distributing cpu per bucket credits to devices */ in setup_fmn_cc()
155 dev_info->credit_config[(i * 8) + j] = cpu_credits; in setup_fmn_cc()
160 * Each core has 256 slots and 8 buckets,
161 * Configure the 8 buckets each with 32 slots
163 static void setup_cpu_fmninfo(struct xlr_fmn_info *cpu, int num_core) in setup_cpu_fmninfo() argument
168 cpu[i].start_stn_id = (8 * i); in setup_cpu_fmninfo()
169 cpu[i].end_stn_id = (8 * i + 8); in setup_cpu_fmninfo()
171 for (j = cpu[i].start_stn_id; j < cpu[i].end_stn_id; j++) in setup_cpu_fmninfo()
182 struct xlr_fmn_info *cpu = xlr_board_fmn_config.cpu; in xlr_board_info_setup() local
190 num_core = hweight32(nlm_current_node()->coremask); in xlr_board_info_setup()
193 setup_cpu_fmninfo(cpu, num_core); in xlr_board_info_setup()
198 FMN_STNID_GMAC0_TX3, 8, 16, 32); in xlr_board_info_setup()
200 FMN_STNID_DMA_3, 4, 8, 64); in xlr_board_info_setup()
202 FMN_STNID_SEC1, 2, 8, 128); in xlr_board_info_setup()
208 FMN_STNID_GMAC0_TX3, 8, 16, 32); in xlr_board_info_setup()
210 FMN_STNID_DMA_3, 4, 8, 64); in xlr_board_info_setup()
212 FMN_STNID_SEC1, 2, 8, 128); in xlr_board_info_setup()
223 FMN_STNID_GMAC0_TX3, 8, 8, 32); in xlr_board_info_setup()
225 FMN_STNID_GMAC1_TX3, 8, 8, 32); in xlr_board_info_setup()
231 FMN_STNID_SEC1, 2, 8, 128); in xlr_board_info_setup()
236 FMN_STNID_GMAC0_TX3, 8, 8, 32); in xlr_board_info_setup()
238 FMN_STNID_GMAC1_TX3, 8, 8, 32); in xlr_board_info_setup()
244 FMN_STNID_SEC1, 2, 8, 128); in xlr_board_info_setup()
250 FMN_STNID_GMAC0_TX3, 8, 16, 32); in xlr_board_info_setup()
252 FMN_STNID_DMA_3, 4, 8, 64); in xlr_board_info_setup()
262 FMN_STNID_GMAC0_TX3, 8, 16, 32); in xlr_board_info_setup()
264 FMN_STNID_DMA_3, 4, 8, 64); in xlr_board_info_setup()
272 FMN_STNID_XMAC0_15_TX, 8, 0, 32); in xlr_board_info_setup()
274 FMN_STNID_XMAC1_15_TX, 8, 0, 32); in xlr_board_info_setup()
276 FMN_STNID_GMAC0_TX3, 8, 24, 32); in xlr_board_info_setup()
283 pr_err("Unknown CPU with processor ID [%d]\n", processor_id); in xlr_board_info_setup()
290 print_credit_config(&cpu[0]); in xlr_board_info_setup()