ia64/xen-unstable

view unmodified_drivers/linux-2.6/mkbuildtree @ 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 ed4311db1cf6
children 736e7cf0a3a5
line source
1 #! /bin/sh
3 if [ $1 ]; then
4 uname="$1"
5 else
6 uname=`uname -m`
7 echo "Defaulting to this machine's architecture, $uname, for linking."
8 echo "This may be overridden on the command line (i386,x86_64,ia64)."
9 fi
11 C=$PWD
13 XEN=$C/../../xen
14 XL=$C/../../linux-2.6-xen-sparse
16 for d in $(find ${XL}/drivers/xen/ -maxdepth 1 -type d | sed -e 1d); do
17 if ! echo $d | egrep -q back; then
18 lndir $d $(basename $d) > /dev/null 2>&1
19 fi
20 if ! echo $d | egrep -q ball; then
21 lndir $d $(basename $d) > /dev/null 2>&1
22 fi
23 done
25 ln -sf ${XL}/drivers/xen/core/gnttab.c platform-pci
26 ln -sf ${XL}/drivers/xen/core/features.c platform-pci
27 ln -sf ${XL}/drivers/xen/core/xen_proc.c xenbus
28 ln -sf ${XL}/drivers/xen/core/reboot.c platform-pci
30 mkdir -p include/asm include/xen
32 lndir -silent ${XL}/include/xen include/xen
33 ln -nsf ${XEN}/include/public include/xen/interface
35 # Need to be quite careful here: we don't want the files we link in to
36 # risk overriding the native Linux ones (in particular, system.h must
37 # be native and not xenolinux).
38 case "$uname"
39 in
40 "x86_64")
41 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypervisor.h include/asm
42 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/hypercall.h include/asm
43 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/synch_bitops.h include/asm
44 ln -sf ${XL}/include/asm-x86_64/mach-xen/asm/maddr.h include/asm
45 mkdir include/asm-i386
46 lndir -silent ${XL}/include/asm-i386 include/asm-i386
47 ;;
48 i[34567]86)
49 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypervisor.h include/asm
50 ln -sf ${XL}/include/asm-i386/mach-xen/asm/hypercall.h include/asm
51 ln -sf ${XL}/include/asm-i386/mach-xen/asm/synch_bitops.h include/asm
52 ln -sf ${XL}/include/asm-i386/mach-xen/asm/maddr.h include/asm
53 ;;
54 "ia64")
55 ln -sf ${XL}/include/asm-ia64/hypervisor.h include/asm
56 ln -sf ${XL}/include/asm-ia64/hypercall.h include/asm
57 ln -sf ${XL}/include/asm-ia64/synch_bitops.h include/asm
58 ln -sf ${XL}/include/asm-ia64/maddr.h include/asm
59 mkdir include/asm/xen
60 ln -sf ${XL}/include/asm-ia64/xen/xcom_hcall.h include/asm/xen
61 ln -sf ${XL}/include/asm-ia64/xen/xencomm.h include/asm/xen
62 ln -sf ${XL}/arch/ia64/xen/xcom_mini.c platform-pci
63 ln -sf ${XL}/arch/ia64/xen/xencomm.c platform-pci
64 ;;
65 *)
66 echo unknown architecture $uname
67 exit 1
68 ;;
69 esac