[PATCH 20/41] sparc/irq: Implement new interrupt directives

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Jul 21 18:31:03 UTC 2021


On 21/07/2021 20:28, Gedare Bloom wrote:
> Why not throw an error here instead? In production, you wouldn't want
> this code...

The main issue is the bad chip design. If we don't have this code, we 
can't test the extended interrupts. In production, you want tested code.

> 
>> +    rtems_interrupt_lock_context lock_context;
>> +
>> +    /*
>> +     * This is a very dangerous operation and should only be used for test
>> +     * software.  We may accidentally clear the pending state set by
>> +     * peripherals with this read-modify-write operation.
>> +     */
>> +    LEON3_IRQCTRL_ACQUIRE(&lock_context);
>> +    LEON3_IrqCtrl_Regs->ipend |= bit;
>> +    LEON3_IRQCTRL_RELEASE(&lock_context);
>> +  }
>> +
>> +  return RTEMS_SUCCESSFUL;
>>   }

-- 
embedded brains GmbH
Herr Sebastian HUBER
Dornierstr. 4
82178 Puchheim
Germany
email: sebastian.huber at embedded-brains.de
phone: +49-89-18 94 741 - 16
fax:   +49-89-18 94 741 - 08

Registergericht: Amtsgericht München
Registernummer: HRB 157899
Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
Unsere Datenschutzerklärung finden Sie hier:
https://embedded-brains.de/datenschutzerklaerung/


More information about the devel mailing list