From d56d69a03289696afdf4057d1449b21f23ca6802 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Wed, 5 Oct 2005 15:05:38 +0100 Subject: Clean up DESTDIR handling. Default install is to root directory (/). This is only overridden automatically for the 'make dist' targets and their legacy aliases (make {xen,tools,kernels,docs}). Signed-off-by: Keir Fraser --- Config.mk | 4 +--- Makefile | 25 +++++++++++++--------- buildconfigs/Rules.mk | 5 ----- .../arch/xen/i386/kernel/process.c | 14 +++++++++++- xen/Makefile | 4 ---- 5 files changed, 29 insertions(+), 23 deletions(-) diff --git a/Config.mk b/Config.mk index 6f104e99e3..7bed4b8fe8 100644 --- a/Config.mk +++ b/Config.mk @@ -20,9 +20,7 @@ STRIP = $(CROSS_COMPILE)strip OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump -# Default is to install to local 'dist' directory. -DISTDIR ?= $(XEN_ROOT)/dist -DESTDIR ?= $(DISTDIR)/install +DISTDIR ?= $(XEN_ROOT)/dist INSTALL = install INSTALL_DIR = $(INSTALL) -d -m0755 diff --git a/Makefile b/Makefile index 91ee5b043a..b093417839 100644 --- a/Makefile +++ b/Makefile @@ -37,23 +37,33 @@ build: kernels $(MAKE) -C docs build # build and install everything into local dist directory -dist: xen kernels tools docs +dist: DESTDIR=$(DISTDIR)/install +dist: dist-xen dist-kernels dist-tools dist-docs $(INSTALL_DIR) $(DISTDIR)/check $(INSTALL_DATA) ./COPYING $(DISTDIR) $(INSTALL_DATA) ./README $(DISTDIR) $(INSTALL_PROG) ./install.sh $(DISTDIR) $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check +dist-%: DESTDIR=$(DISTDIR)/install +dist-%: install-% + @: # do nothing + +# Legacy dist targets +xen: dist-xen +tools: dist-tools +kernels: dist-kernels +docs: dist-docs -xen: +install-xen: $(MAKE) -C xen install -tools: +install-tools: $(MAKE) -C tools install -kernels: +install-kernels: for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done -docs: +install-docs: sh ./docs/check_pkgs && $(MAKE) -C docs install || true dev-docs: @@ -109,10 +119,6 @@ install-iptables: tar -jxf iptables-1.2.11.tar.bz2 $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install -install-%: DESTDIR= -install-%: % - @: # do nothing - help: @echo 'Installation targets:' @echo ' install - build and install everything' @@ -151,7 +157,6 @@ help: @echo ' with extreme care!)' # Use this target with extreme care! -uninstall: DESTDIR= uninstall: D=$(DESTDIR) uninstall: [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true diff --git a/buildconfigs/Rules.mk b/buildconfigs/Rules.mk index a75bd47b0c..e44a84e542 100644 --- a/buildconfigs/Rules.mk +++ b/buildconfigs/Rules.mk @@ -1,11 +1,6 @@ include Config.mk -# We expect these two to already be set if people -# are using the top-level Makefile -DISTDIR ?= $(CURDIR)/dist -DESTDIR ?= $(DISTDIR)/install - export DESTDIR ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*)) diff --git a/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c index db8cbed8cd..4fdeed1bd5 100644 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c @@ -94,7 +94,7 @@ void enable_hlt(void) } EXPORT_SYMBOL(enable_hlt); - +#define xxprint(msg) HYPERVISOR_console_io(CONSOLEIO_write, strlen(msg), msg) /* XXX XEN doesn't use default_idle(), poll_idle(). Use xen_idle() instead. */ extern void stop_hz_timer(void); extern void start_hz_timer(void); @@ -121,10 +121,17 @@ extern void smp_resume(void); /* We don't actually take CPU down, just spin without interrupts. */ static inline void play_dead(void) { + char foo[100]; + + sprintf(foo, "cpu=%d stack=%p\n", smp_processor_id(), foo); + xxprint(foo); + /* Death loop */ while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE) HYPERVISOR_sched_op(SCHEDOP_yield, 0); + xxprint("Out of loop\n"); + __flush_tlb_all(); /* * Restore IPI/IRQ mappings before marking online to prevent @@ -169,10 +176,15 @@ void cpu_idle (void) rmb(); if (cpu_is_offline(cpu)) { + char foo[100]; local_irq_disable(); #ifdef CONFIG_SMP smp_suspend(); #endif + + sprintf(foo, "X cpu=%d stack=%p\n", + cpu, &cpu); + xxprint(foo); #if defined(CONFIG_XEN) && defined(CONFIG_HOTPLUG_CPU) /* Ack it. From this point on until we get woken up, we're not allowed diff --git a/xen/Makefile b/xen/Makefile index 58eb34a88a..778f77ae46 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -1,7 +1,3 @@ -# Default is to install to local 'dist' directory. -DISTDIR ?= ../dist -DESTDIR ?= $(DISTDIR)/install - INSTALL = install INSTALL_DATA = $(INSTALL) -m0644 INSTALL_DIR = $(INSTALL) -d -m0755 -- cgit v1.2.3