From: EXTERNAL B. M. (P. ST-FIR/Eng) <ext...@de...> - 2007-08-13 15:37:59
|
Hi Magnus, thanks for the new priority feature. There are 3 things I noticed. First:=20 The declaration of the new function should probably go to hw_irq.h. Second: Is it forbidden to set the highest possible priority? If not there is a bug in set_priority. if (prio >=3D ((1 << _INTC_WIDTH(ihp->handle)) - 1)) Third: The code doesn't work for processors without mask registers. If the processor only has priority registers the "handle" will not be set in intc_register_irq (because of "if(!primary)") This leads to wrong results from _INTC_WIDTH, which causes intc_set_priority fail with EINVAL When I comment out the "if(!primary)" condition all priorities will be set immediatelly, which also enables them. When I hardcode the _INTC_WIDTH to the correct size in set_priority, the priority will be set as soon as the irq is requested. Regards Markus |