Skip to content

Commit

Permalink
Blackfin arch: force irq_flags into the .data section
Browse files Browse the repository at this point in the history
force irq_flags into the .data section by initializing it to
the hardware masks that cannot be disabled.  this way if we
use irq enable/disable functions before the .bss has been
zeroed out (as does our l1 relocate/dma functions), we dont
hit a problem where bss contains bogus crap.

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Oct 21, 2007
1 parent 876a668 commit a99bbcc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion arch/blackfin/mach-common/ints-priority-dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,13 @@
* -
*/

unsigned long irq_flags = 0;
/* Initialize this to an actual value to force it into the .data
* section so that we know it is properly initialized at entry into
* the kernel but before bss is initialized to zero (which is where
* it would live otherwise). The 0x1f magic represents the IRQs we
* cannot actually mask out in hardware.
*/
unsigned long irq_flags = 0x1f;

/* The number of spurious interrupts */
atomic_t num_spurious;
Expand Down
8 changes: 7 additions & 1 deletion arch/blackfin/mach-common/ints-priority-sc.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@
* -
*/

unsigned long irq_flags = 0;
/* Initialize this to an actual value to force it into the .data
* section so that we know it is properly initialized at entry into
* the kernel but before bss is initialized to zero (which is where
* it would live otherwise). The 0x1f magic represents the IRQs we
* cannot actually mask out in hardware.
*/
unsigned long irq_flags = 0x1f;

/* The number of spurious interrupts */
atomic_t num_spurious;
Expand Down

0 comments on commit a99bbcc

Please sign in to comment.