ia64/xen-unstable

view buildconfigs/Rules.mk @ 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 bd207697f0c7
children 98efd2e410ae
line source
2 include Config.mk
4 export DESTDIR
6 # Choose the best mirror to download linux kernel
7 KERNEL_REPO = http://www.kernel.org
9 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
10 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
12 # Setup pristine search path
13 PRISTINE_SRC_PATH ?= .:..
14 vpath pristine-% $(PRISTINE_SRC_PATH)
16 # Let XEN_TARGET_ARCH override ARCH.
17 ifeq ($(XEN_TARGET_ARCH),x86_32)
18 LINUX_ARCH ?= i386
19 else
20 LINUX_ARCH ?= $(XEN_TARGET_ARCH)
21 endif
23 # Expand Linux series to Linux version
24 LINUX_SERIES ?= 2.6
25 LINUX_VER ?= $(shell grep "^LINUX_VER " buildconfigs/mk.linux-2.6-xen | sed -e 's/.*=[ ]*//')
27 # Setup Linux search path
28 LINUX_SRC_PATH ?= .:..
29 vpath linux-%.tar.bz2 $(LINUX_SRC_PATH)
30 vpath patch-%.bz2 $(LINUX_SRC_PATH)
32 # download a pristine Linux kernel tarball if there isn't one in LINUX_SRC_PATH
33 linux-%.tar.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$*)).$(word 2,$(subst ., ,$*))
34 linux-%.tar.bz2:
35 @echo "Cannot find $@ in path $(LINUX_SRC_PATH)"
36 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$@ -O./$@
38 patch-%.bz2: override _LINUX_VDIR = $(word 1,$(subst ., ,$(*F))).$(word 2,$(subst ., ,$(*F)))
39 patch-%.bz2: override _LINUX_XDIR = $(if $(word 3,$(subst -, ,$(*F))),snapshots,testing)
40 patch-%.bz2:
41 @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
42 wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
44 pristine-%: pristine-%/.valid-pristine
45 @true
47 pristine-%/.valid-pristine: %.tar.bz2
48 rm -rf tmp-pristine-$* $(@D)
49 mkdir -p tmp-pristine-$*
50 tar -C tmp-pristine-$* -jxf $<
51 -@rm -f tmp-pristine-$*/pax_global_header
52 mv tmp-pristine-$*/* $(@D)
53 @rm -rf tmp-pristine-$*
54 touch $(@D)/.hgskip
55 touch $@ # update timestamp to avoid rebuild
57 PATCHDIRS := $(wildcard patches/*-*)
59 ifneq ($(PATCHDIRS),)
60 -include $(patsubst %,%/.makedep,$(PATCHDIRS))
62 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep:
63 @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
65 ref-%/.valid-ref: pristine-%/.valid-pristine
66 set -e
67 rm -rf $(@D)
68 cp -al $(<D) $(@D)
69 if [ -d patches/$* ] ; then \
70 echo Applying patches from patches/$*... ; \
71 for i in $$(cat patches/$*/series) ; do \
72 echo ... $$i ; \
73 patch -d $(@D) -p1 --quiet <patches/$*/$$i || exit 1 ; \
74 done ; \
75 fi
76 touch $@ # update timestamp to avoid rebuild
77 endif
79 %-install:
80 $(MAKE) -f buildconfigs/mk.$* build
82 %-dist: DESTDIR=$(DISTDIR)/install
83 %-dist: %-install
84 @: # do nothing
86 # Legacy dist target
87 %-build: %-dist
88 @: # do nothing
90 %-prep: DESTDIR=$(DISTDIR)/install
91 %-prep:
92 $(MAKE) -f buildconfigs/mk.$* prep
94 %-config: DESTDIR=$(DISTDIR)/install
95 %-config:
96 $(MAKE) -f buildconfigs/mk.$* config
98 %-delete:
99 $(MAKE) -f buildconfigs/mk.$* delete
101 %-clean:
102 $(MAKE) -f buildconfigs/mk.$* clean
104 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
105 rm -rf tmp-$@
106 cp -al $(<D) tmp-$@
107 ( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
108 diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
109 rm -rf tmp-$@
111 %-xen.patch: ref-%/.valid-ref
112 rm -rf tmp-$@
113 cp -al $(<D) tmp-$@
114 ( cd $*-xen-sparse && bash ./mkbuildtree ../tmp-$@ )
115 diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
116 rm -rf tmp-$@
118 %-mrproper:
119 $(MAKE) -f buildconfigs/mk.$*-xen mrpropper
120 rm -rf pristine-$(*)* ref-$(*)*
121 rm -rf $*-xen.patch
123 .PHONY: config-update-pae
124 config-update-pae:
125 ifeq ($(XEN_TARGET_X86_PAE),y)
126 sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
127 else
128 grep '^CONFIG_HIGHMEM64G=y' $(CONFIG_FILE) >/dev/null && ( sed -e 's!^CONFIG_HIGHMEM64G=y$$!\# CONFIG_HIGHMEM64G is not set!;s!^\# CONFIG_HIGHMEM4G is not set$$!CONFIG_HIGHMEM4G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE) ) || true
129 endif
131 # never delete any intermediate files.
132 .SECONDARY: