| 152 | } |
| 153 | |
| 154 | void |
| 155 | xlp_msgring_cpu_init(int node, int cpu, int credit) |
| 156 | { |
| 157 | uint64_t cmspcibase = nlm_get_cms_pcibase(node); |
| 158 | uint64_t cmsbase = nlm_get_cms_regbase(node); |
| 159 | int qid, maxqid, src; |
| 160 | |
| 161 | maxqid = nlm_read_reg(cmspcibase, XLP_PCI_DEVINFO_REG0); |
| 162 | |
| 163 | /* cpu credit setup is done only from thread-0 of each core */ |
| 164 | if((cpu % 4) == 0) { |
| 165 | src = cpu << 2; /* each thread has 4 vc's */ |
| 166 | for (qid = 0; qid < maxqid; qid++) |
| 167 | nlm_cms_setup_credits(cmsbase, qid, src, credit); |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | /* |
| 172 | * Drain out max_messages for the buckets set in the bucket mask. |
no test coverage detected