Circular dependency between asm/system.h and asm/processor.h (Was:
David Mosberger <[email protected]> writes:
|> The latest ia64 patch relative to 2.4.18 is now available |> at ftp://ftp.kernel.org/pub/linux/kernel/ports/ia64/v2.4/ |> in file: |> |> linux-2.4.18-ia64-020410.diff.gz
local_irq_restore in asm/system.h needs IA64_PSR_I which is only defined in asm/processor.h. linux/tqueue.h defines the inline function queue_task that uses spin_unlock_irqrestore, which is defined in terms of local_irq_restore, so it does not compile because IA64_PSR_I is undefined. But asm/processor.h already depends on asm/system.h, so we cannot just include it there.
Andreas.
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected] SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Andreas Schwab
Andreas> local_irq_restore in asm/system.h needs IA64_PSR_I which is Andreas> only defined in asm/processor.h. linux/tqueue.h defines Andreas> the inline function queue_task that uses Andreas> spin_unlock_irqrestore, which is defined in terms of Andreas> local_irq_restore, so it does not compile because Andreas> IA64_PSR_I is undefined. But asm/processor.h already Andreas> depends on asm/system.h, so we cannot just include it Andreas> there.
I moved the PSR and DCR bit definitions into kregs.h and include this file in system.h. That seems cleaner and will avoid recursive dependencies.
Thanks,
--david