ia64/xen-unstable

view buildconfigs/mk.linux-2.6-xen @ 15017:63263d715d43

[IA64] Fix vcpu hotplug

When domain is saved and restored, the following message is printed out.
bind_ipi_to_irqhandler()/bind_virq_to_irqhandler() should be called
in process context. Move the call from cpu_init() to __cpu_init() like x86.

BUG: sleeping function called from invalid context at /src1/yamahata/hg/xen/ia64
/my150/compile/test-0/xen-ia64-unstable.hg/linux-2.6.18-xen/mm/slab.c:2901
in_atomic():0, irqs_disabled():1

Call Trace:
[<a00000010001b190>] show_stack+0x50/0xa0
sp=e0000000004ff8b0 bsp=e0000000004f9358
[<a00000010001b210>] dump_stack+0x30/0x60
sp=e0000000004ffa80 bsp=e0000000004f9340
[<a000000100070f40>] __might_sleep+0x2c0/0x2e0
sp=e0000000004ffa80 bsp=e0000000004f9318
[<a00000010012c230>] __kmalloc+0xb0/0x320
sp=e0000000004ffa90 bsp=e0000000004f92e0
[<a0000001001a98d0>] proc_create+0x110/0x1c0
sp=e0000000004ffa90 bsp=e0000000004f9298
[<a0000001001a9ca0>] proc_mkdir_mode+0x40/0xe0
sp=e0000000004ffaa0 bsp=e0000000004f9268
[<a0000001001a9d70>] proc_mkdir+0x30/0x60
sp=e0000000004ffab0 bsp=e0000000004f9240
[<a0000001000e97e0>] register_handler_proc+0x1a0/0x1e0
sp=e0000000004ffab0 bsp=e0000000004f91f0
[<a0000001000e6420>] setup_irq+0x440/0x4e0
sp=e0000000004ffb30 bsp=e0000000004f9198
[<a0000001000e68c0>] request_irq+0x140/0x1a0
sp=e0000000004ffb30 bsp=e0000000004f9150
[<a0000001003e7a20>] bind_ipi_to_irqhandler+0x260/0x2c0
sp=e0000000004ffb30 bsp=e0000000004f90e8
[<a000000100019780>] xen_register_percpu_irq+0x2c0/0x880
sp=e0000000004ffb40 bsp=e0000000004f9098
[<a00000010001a1f0>] xen_smp_intr_init+0x170/0x1c0
sp=e0000000004ffb40 bsp=e0000000004f9070
[<a00000010003d350>] cpu_init+0x1090/0x10e0
sp=e0000000004ffb50 bsp=e0000000004f8fe0
[<a0000001000607a0>] start_secondary+0xc0/0x520
sp=e0000000004ffe30 bsp=e0000000004f8f90
[<a0000001000105f0>] __end_ivt_text+0x6d0/0x700
sp=e0000000004ffe30 bsp=e0000000004f8f90

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Thu May 03 14:38:26 2007 -0600 (2007-05-03)
parents 3c8bb086025e
children 98efd2e410ae 3fcd0b9fd083
line source
1 LINUX_SERIES = 2.6
2 LINUX_VER = 2.6.18
4 EXTRAVERSION ?= xen
6 LINUX_SRCDIR = linux-$(LINUX_VER)-xen
7 LINUX_DIR = build-linux-$(LINUX_VER)-$(EXTRAVERSION)_$(XEN_TARGET_ARCH)
9 IMAGE_TARGET ?= vmlinuz
10 INSTALL_BOOT_PATH ?= $(DESTDIR)
12 ifeq ($(XEN_TARGET_ARCH),ia64)
13 INSTALL_BOOT_PATH := $(DESTDIR)/boot
14 endif
16 LINUX_VER3 := $(LINUX_SERIES).$(word 3, $(subst ., ,$(LINUX_VER)))
18 include buildconfigs/Rules.mk
20 # The real action starts here!
21 .PHONY: build
22 build: $(LINUX_DIR)/include/linux/autoconf.h
23 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
24 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
25 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
26 fi
27 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) $(IMAGE_TARGET)
28 mkdir -p $(INSTALL_BOOT_PATH)
29 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(INSTALL_BOOT_PATH) install
31 $(LINUX_SRCDIR)/.valid-src: ref-linux-$(LINUX_VER)/.valid-ref
32 rm -rf $(LINUX_SRCDIR)
33 cp -al $(<D) $(LINUX_SRCDIR)
34 # Apply arch-xen patches
35 ( cd linux-$(LINUX_SERIES)-xen-sparse && \
36 LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_SRCDIR) )
37 # Patch kernel Makefile to set EXTRAVERSION
38 ( cd $(LINUX_SRCDIR) ; \
39 sed -e 's,^EXTRAVERSION.*,&$$(XENGUEST),' \
40 -e 's,^KERNELRELEASE,XENGUEST := $$(shell [ -r $$(objtree)/.xenguest ] \&\& cat $$(objtree)/.xenguest)\n&,' Makefile >Mk.tmp ; \
41 rm -f Makefile ; mv Mk.tmp Makefile )
42 touch $@
44 $(LINUX_DIR)/include/linux/autoconf.h: $(LINUX_SRCDIR)/.valid-src
45 rm -rf $(LINUX_DIR)
46 mkdir -p $(LINUX_DIR)
47 # Re-use config from install dir if one exits else use default config
48 CONFIG_VERSION=$$(sed -ne 's/$$(XENGUEST)//; s/^EXTRAVERSION = //p' $(LINUX_SRCDIR)/Makefile); \
49 [ -r $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
50 cp $(DESTDIR)/boot/config-$(LINUX_VER3)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
51 || sh buildconfigs/create_config.sh $(LINUX_DIR)/.config $(EXTRAVERSION) $(XEN_TARGET_ARCH) $(XEN_SYSTYPE)
52 # See if we need to munge config to enable PAE
53 $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
54 echo "-$(EXTRAVERSION)" >$(LINUX_DIR)/.xenguest
55 $(MAKE) -C $(LINUX_SRCDIR) ARCH=$(LINUX_ARCH) oldconfig O=$$(/bin/pwd)/$(LINUX_DIR)
57 .PHONY: prep
58 prep: $(LINUX_DIR)/include/linux/autoconf.h
60 .PHONY: config
61 config: CONFIGMODE = menuconfig
62 config: $(LINUX_DIR)/include/linux/autoconf.h
63 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
65 .PHONY: clean
66 clean::
67 [ ! -d $(LINUX_DIR) ] || \
68 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
71 .PHONY: delete
72 delete:
73 rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR)
75 .PHONY: mrpropper
76 mrpropper:
77 rm -rf $(LINUX_SRCDIR)
78 rm -f linux-$(LINUX_VER).tar.bz2