我在64位处理器上运行64位内核。我必须构建内核2.4.32才能安装特定软件的内核模块。但make bzImage
显示以下错误:
bus.c: Assembler messages:
bus.c:647: Error: operand type mismatch for `pop'
bus.c:649: Error: operand type mismatch for `push'
bus.c:685: Error: operand type mismatch for `pop'
bus.c:689: Error: operand type mismatch for `push'
错误来自函数spin_lock_irqsave
和spin_unlock_irqrestore
的bus.c文件以及这些定义:
#define spin_lock_irqsave(lock, flags) do { local_irq_save(flags); spin_lock(lock); } while (0)
#define spin_unlock_irqrestore(lock, flags) do { spin_unlock(lock); local_irq_restore(flags); } while (0)
问题来自函数local_irq_save
和local_irq_restore
:
#define local_irq_save(x) do { warn_if_not_ulong(x); __asm__ __volatile__("# local_irq_save \n\t pushfq ; popq %0 ; cli":"=g" (x): /* no input */ :"memory"); } while (0)
#define local_irq_restore(x) __asm__ __volatile__("# local_irq_restore \n\t pushq %0 ; popfq": /* no output */ :"g" (x):"memory")
请帮助我如何解决问题!