From: NIIBE Y. <gn...@m1...> - 2002-06-18 04:04:05
|
Changes from mainline included. 2002-06-18 NIIBE Yutaka <gn...@m1...> * include/asm-sh/system.h (prepare_to_switch): Removed. (prepare_arch_schedule, finish_arch_schedule, prepare_arch_switch, finish_arch_switch): Added. (switch_to): New API. * AGAINST-2.5.22: New file. * AGAINST-2.5.21: Removed. * Makefile: Version 2.5.22. * arch/sh/kernel/setup.c, drivers/Makefile, drivers/block/rd.c, drivers/char/Makefile, drivers/pci/pci.ids, fs/nfs/inode.c, init/do_mounts.c, mm/memory.c: Incorporate changes in 2.5.22. Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.27 diff -u -3 -p -r1.27 Makefile --- Makefile 18 Jun 2002 03:36:24 -0000 1.27 +++ Makefile 18 Jun 2002 04:03:03 -0000 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 20 +SUBLEVEL = 22 EXTRAVERSION =-sh # We are using a recursive build, so we need to do a little thinking @@ -37,6 +37,56 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes - CROSS_COMPILE = +# That's our default target when none is given on the command line + +all: vmlinux + +# Print entire command lines instead of short version +# For now, leave the default + +ifndef KBUILD_VERBOSE + KBUILD_VERBOSE = 1 +endif + +# Decide whether to build built-in, modular, or both + +KBUILD_MODULES := 1 +KBUILD_BUILTIN := 1 + +export KBUILD_MODULES KBUILD_BUILTIN + +# Beautify output +# --------------------------------------------------------------------------- +# +# Normally, we echo the whole command before executing it. By making +# that echo $($(quiet)$(cmd)), we now have the possibility to set +# $(quiet) to choose other forms of output instead, e.g. +# +# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ +# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< +# +# If $(quiet) is empty, the whole command will be printed. +# If it is set to "quiet_", only the short version will be printed. +# If it is set to "silent_", nothing wil be printed at all, since +# the variable $(silent_cmd_cc_o_c) doesn't exist. + +# If the user wants quiet mode, echo short versions of the commands +# only and suppress the 'Entering/Leaving directory' messages + +ifneq ($(KBUILD_VERBOSE),1) + quiet=quiet_ + MAKEFLAGS += --no-print-directory +endif + +# If the user is running make -s (silent mode), suppress echoing of +# commands + +ifneq ($(findstring s,$(MAKEFLAGS)),) + quiet=silent_ +endif + +export quiet + # # Include the make variables (CC, etc...) # @@ -56,33 +106,48 @@ DEPMOD = /sbin/depmod PERL = perl MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) -AFLAGS_MODULE = +AFLAGS_MODULE = $(MODFLAGS) CFLAGS_KERNEL = AFLAGS_KERNEL = EXPORT_FLAGS = +NOSTDINC_FLAGS = -nostdinc -iwithprefix include export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ CONFIG_SHELL TOPDIR HPATH HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ CPP AR NM STRIP OBJCOPY OBJDUMP MAKE MAKEFILES GENKSYMS PERL -export CPPFLAGS EXPORT_FLAGS +export CPPFLAGS EXPORT_FLAGS NOSTDINC_FLAGS export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE -all: do-it-all +noconfig_targets := xconfig menuconfig config oldconfig randconfig \ + defconfig allyesconfig allnoconfig allmodconfig \ + clean mrproper distclean \ + tags TAGS sgmldocs psdocs pdfdocs htmldocs \ + checkconfig checkhelp checkincludes -# -# Make "config" the default target if there is no configuration file or -# "depend" the target if there is no top-level dependency information. -# +ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -ifeq (.config,$(wildcard .config)) -include .config -do-it-all: vmlinux -else -CONFIGURATION = config -do-it-all: config -endif +# Here goes the main Makefile +# =========================================================================== +# +# If the user gave a *config target, it'll be handled in another +# section below, since in this case we cannot include .config +# Same goes for other targets like clean/mrproper etc, which +# don't need .config, either + +# In this section, we need .config + +-include .config + +# If .config doesn't exist - tough luck + +.config: + @echo '***' + @echo '*** You have not yet configured your kernel!' + @echo '*** Please run "make xconfig/menuconfig/config/oldconfig"' + @echo '***' + @exit 1 # # INSTALL_PATH specifies where to place the updated kernel and system map @@ -114,18 +179,14 @@ ifdef CONFIG_MODULES EXPORT_FLAGS := -DEXPORT_SYMTAB endif -INIT =init/init.o -CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o -NETWORKS =net/network.o - -LIBS =$(TOPDIR)/lib/lib.a -SUBDIRS =init kernel lib drivers mm fs net ipc sound - -DRIVERS-y = drivers/built-in.o -DRIVERS-$(CONFIG_SOUND) += sound/sound.o - -DRIVERS := $(DRIVERS-y) - +# Link components for vmlinux +# --------------------------------------------------------------------------- +SUBDIRS := init kernel mm fs ipc lib drivers sound net +INIT := init/init.o +CORE_FILES := kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o +LIBS := lib/lib.a +DRIVERS := drivers/built-in.o sound/sound.o +NETWORKS := net/network.o include arch/$(ARCH)/Makefile @@ -149,6 +210,7 @@ boot: vmlinux vmlinux-objs := $(HEAD) $(INIT) $(CORE_FILES) $(LIBS) $(DRIVERS) $(NETWORKS) +quiet_cmd_link_vmlinux = LD $@ cmd_link_vmlinux = $(LD) $(LINKFLAGS) $(HEAD) $(INIT) \ --start-group \ $(CORE_FILES) \ @@ -162,17 +224,17 @@ cmd_link_vmlinux = $(LD) $(LINKFLAGS) $( define rule_link_vmlinux set -e - echo Generating build number + echo ' Generating build number' . scripts/mkversion > .tmpversion mv -f .tmpversion .version - $(MAKE) -C init - echo $(cmd_link_vmlinux) + +$(MAKE) -C init + $(call cmd,cmd_link_vmlinux) $(cmd_link_vmlinux) echo 'cmd_$@ := $(cmd_link_vmlinux)' > $(@D)/.$(@F).cmd $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map endef -vmlinux: $(CONFIGURATION) $(vmlinux-objs) FORCE +vmlinux: $(vmlinux-objs) FORCE $(call if_changed_rule,link_vmlinux) # The actual objects are generated when descending, @@ -183,15 +245,14 @@ $(sort $(vmlinux-objs)): $(SUBDIRS) ; # Handle descending into subdirectories listed in $(SUBDIRS) .PHONY: $(SUBDIRS) -$(SUBDIRS): prepare +$(SUBDIRS): .hdepend prepare @$(MAKE) -C $@ -# Things we need done before we even start the actual build. -# The dependency on .hdepend will in turn take care of -# include/asm, include/linux/version etc. +# Things we need done before we descend to build or make +# module versions are listed in "prepare" .PHONY: prepare -prepare: .hdepend include/config/MARKER +prepare: include/linux/version.h include/asm include/config/MARKER # Single targets # --------------------------------------------------------------------------- @@ -202,6 +263,8 @@ prepare: .hdepend include/config/MARKER @$(MAKE) -C $(@D) $(@F) %.o: %.c FORCE @$(MAKE) -C $(@D) $(@F) +%.lst: %.c FORCE + @$(MAKE) -C $(@D) $(@F) %.s: %.S FORCE @$(MAKE) -C $(@D) $(@F) %.o: %.S FORCE @@ -212,16 +275,25 @@ prepare: .hdepend include/config/MARKER # before switching between archs anyway. include/asm: - @echo 'Making asm->asm-$(ARCH) symlink' + @echo ' Making asm->asm-$(ARCH) symlink' @ln -s asm-$(ARCH) $@ - @echo 'Making directory include/linux/modules' - @mkdir include/linux/modules # Split autoconf.h into include/linux/config/* include/config/MARKER: scripts/split-include include/linux/autoconf.h - scripts/split-include include/linux/autoconf.h include/config - @ touch include/config/MARKER + @echo ' SPLIT include/linux/autoconf.h -> include/config/*' + @scripts/split-include include/linux/autoconf.h include/config + @touch $@ + +# if .config is newer than include/linux/autoconf.h, someone tinkered +# with it and forgot to run make oldconfig + +include/linux/autoconf.h: .config + @echo '***' + @echo '*** You changed .config w/o running make *config?' + @echo '*** Please run "make oldconfig"' + @echo '***' + @exit 1 # Generate some files # --------------------------------------------------------------------------- @@ -229,64 +301,77 @@ include/config/MARKER: scripts/split-inc # version.h changes when $(KERNELRELEASE) etc change, as defined in # this Makefile +uts_len := 64 + include/linux/version.h: Makefile - @echo Generating $@ - @. scripts/mkversion_h $@ $(KERNELRELEASE) $(VERSION) $(PATCHLEVEL) $(SUBLEVEL) + @if expr length "$(KERNELRELEASE)" \> $(uts_len) >/dev/null ; then \ + echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ + exit 1; \ + fi; + @echo -n ' Generating $@' + @(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \ + echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \ + echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \ + ) > $@.tmp + @$(update-if-changed) # Helpers built in scripts/ # --------------------------------------------------------------------------- -scripts/mkdep scripts/split-include : FORCE +scripts/fixdep scripts/split-include : scripts ; + +.PHONY: scripts +scripts: @$(MAKE) -C scripts -# Generate dependencies +# Generate module versions # --------------------------------------------------------------------------- -# In the same pass, generate module versions, that's why it's -# all mixed up here. +# The targets are still named depend / dep for traditional +# reasons, but the only thing we do here is generating +# the module version checksums. +# FIXME: For now, we are also calling "archdep" from here, +# which should be replaced by a more sensible solution. .PHONY: depend dep $(patsubst %,_sfdep_%,$(SUBDIRS)) depend dep: .hdepend -# .hdepend is missing prerequisites - in fact dependencies need -# to be redone basically each time anything changed - since -# that's too expensive, we traditionally rely on the user to -# run "make dep" manually whenever necessary. In this case, -# we make "FORCE" a prequisite, to force redoing the -# dependencies. Yeah, that's ugly, and it'll go away soon. - -.hdepend: scripts/mkdep include/linux/version.h include/asm \ - $(if $(filter dep depend,$(MAKECMDGOALS)),FORCE) - scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > $@ - @$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) +# .hdepend is our (misnomed) marker for whether we've run +# generated module versions and made archdep + +.hdepend: $(if $(filter dep depend,$(MAKECMDGOALS)),FORCE) + @$(MAKE) archdep include/linux/modversions.h + @touch $@ + ifdef CONFIG_MODVERSIONS - @$(MAKE) include/linux/modversions.h -endif - @$(MAKE) archdep + +# Update modversions.h, but only if it would change. + +include/linux/modversions.h: scripts/fixdep prepare FORCE + @rm -rf .tmp_export-objs + @$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) + @echo -n ' Generating $@' + @( echo "#ifndef _LINUX_MODVERSIONS_H";\ + echo "#define _LINUX_MODVERSIONS_H"; \ + echo "#include <linux/modsetver.h>"; \ + for f in `cd .tmp_export-objs; find modules -name \*.ver -print | sort`; do \ + echo "#include <linux/$${f}>"; \ + done; \ + echo "#endif"; \ + ) > $@.tmp; \ + $(update-if-changed) $(patsubst %,_sfdep_%,$(SUBDIRS)): FORCE @$(MAKE) -C $(patsubst _sfdep_%, %, $@) fastdep -# Update modversions.h, but only if it would change. +else # !CONFIG_MODVERSIONS -include/linux/modversions.h: FORCE - @(echo "#ifndef _LINUX_MODVERSIONS_H";\ - echo "#define _LINUX_MODVERSIONS_H"; \ - echo "#include <linux/modsetver.h>"; \ - cd $(TOPDIR)/include/linux/modules; \ - for f in *.ver; do \ - if [ -f $$f ]; then echo "#include <linux/modules/$${f}>"; fi; \ - done; \ - echo "#endif"; \ - ) > $@.tmp - @if [ -r $@ ] && cmp -s $@ $@.tmp; then \ - echo $@ was not updated; \ - rm -f $@.tmp; \ - else \ - echo $@ was updated; \ - mv -f $@.tmp $@; \ - fi +.PHONY: include/linux/modversions.h + +include/linux/modversions.h: + +endif # CONFIG_MODVERSIONS # --------------------------------------------------------------------------- # Modules @@ -300,11 +385,8 @@ MODFLAGS += -include $(HPATH)/linux/modv endif .PHONY: modules -modules: $(patsubst %, _mod_%, $(SUBDIRS)) - -.PHONY: $(patsubst %, _mod_%, $(SUBDIRS)) -$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER - @$(MAKE) -C $(patsubst _mod_%, %, $@) modules +modules: + @$(MAKE) KBUILD_BUILTIN= $(SUBDIRS) # Install modules @@ -351,44 +433,9 @@ modules modules_install: FORCE endif # CONFIG_MODULES -# Scripts to check various things for consistency -# --------------------------------------------------------------------------- - -checkconfig: - find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl - -checkhelp: - find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl - -checkincludes: - find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl - -# Generate tags for editors -# --------------------------------------------------------------------------- - -TAGS: FORCE - { find include/asm-${ARCH} -name '*.h' -print ; \ - find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \ - find $(SUBDIRS) init -name '*.[ch]' ; } | grep -v SCCS | etags - - -# Exuberant ctags works better with -I -tags: FORCE - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ - ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \ - find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \ - find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a - -# Assorted miscellaneous targets +# RPM target # --------------------------------------------------------------------------- -# Documentation targets - -sgmldocs psdocs pdfdocs htmldocs: - @$(MAKE) -C Documentation/DocBook $@ - - -# RPM target -# # If you do a make spec before packing the tarball you can rpm -ta it spec: @@ -412,37 +459,90 @@ rpm: clean spec rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \ rm $(TOPDIR)/../$(KERNELPATH).tar.gz +else # ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) + # Targets which don't need .config # =========================================================================== +# +# These targets basically have their own Makefile - not quite, but at +# least its own exclusive section in the same Makefile. The reason for +# this is the following: +# To know the configuration, the main Makefile has to include +# .config. That's a obviously a problem when .config doesn't exist +# yet, but that could be kludged around with only including it if it +# exists. +# However, the larger problem is: If you run make *config, make will +# include the old .config, then execute your *config. It will then +# notice that a piece it included (.config) did change and restart from +# scratch. Which will cause execution of *config again. You get the +# picture. +# If we don't explicitly let the Makefile know that .config is changed +# by *config (the old way), it won't reread .config after *config, +# thus working with possibly stale values - we don't that either. +# +# So we divide things: This part here is for making *config targets, +# and other targets which should work when no .config exists yet. +# The main part above takes care of the rest after a .config exists. # Kernel configuration # --------------------------------------------------------------------------- -.PHONY: oldconfig xconfig menuconfig config - -oldconfig: - $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in +.PHONY: oldconfig xconfig menuconfig config \ + make_with_config xconfig: @$(MAKE) -C scripts kconfig.tk wish -f scripts/kconfig.tk menuconfig: - @$(MAKE) -C scripts/lxdialog all + @$(MAKE) -C scripts lxdialog $(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in config: $(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in +oldconfig: + $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in + +randconfig: + $(CONFIG_SHELL) scripts/Configure -r arch/$(ARCH)/config.in + +allyesconfig: + $(CONFIG_SHELL) scripts/Configure -y arch/$(ARCH)/config.in + +allnoconfig: + $(CONFIG_SHELL) scripts/Configure -n arch/$(ARCH)/config.in + +allmodconfig: + $(CONFIG_SHELL) scripts/Configure -m arch/$(ARCH)/config.in + +defconfig: + yes '' | $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in + +# How we generate .config depends on which *config the +# user chose when calling make + +.config: $(filter oldconfig xconfig menuconfig config,$(MAKECMDGOALS)) ; + +# If the user gave commands from both the need / need not +# .config sections, we need to call make again after +# .config is generated, now to take care of the remaining +# targets we know nothing about in this section + +remaining_targets := $(filter-out $(noconfig_targets),$(MAKECMDGOALS)) + +$(remaining_targets) : make_with_config + +make_with_config: .config + @$(MAKE) $(remaining_targets) # Cleaning up # --------------------------------------------------------------------------- # files removed with 'make clean' CLEAN_FILES += \ - kernel/ksyms.lst include/linux/compile.h \ + include/linux/compile.h \ vmlinux System.map \ - .tmp* \ drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \ drivers/char/conmakehash \ drivers/char/drm/*-mod.c \ @@ -461,10 +561,6 @@ CLEAN_FILES += \ net/khttpd/times.h \ submenu* -# directories removed with 'make clean' -CLEAN_DIRS += \ - modules - # files removed with 'make mrproper' MRPROPER_FILES += \ include/linux/autoconf.h include/linux/version.h \ @@ -483,34 +579,79 @@ MRPROPER_FILES += \ scripts/lxdialog/*.o scripts/lxdialog/lxdialog \ .menuconfig.log \ include/asm \ - .hdepend scripts/mkdep scripts/split-include scripts/docproc \ - $(TOPDIR)/include/linux/modversions.h \ - kernel.spec + .hdepend scripts/split-include scripts/docproc \ + scripts/fixdep $(TOPDIR)/include/linux/modversions.h \ + tags TAGS kernel.spec \ + .tmpversion # directories removed with 'make mrproper' MRPROPER_DIRS += \ + .tmp_export-objs \ include/config \ $(TOPDIR)/include/linux/modules +# That's our way to know about arch specific cleanup. + +include arch/$(ARCH)/Makefile clean: archclean - find . \( -name '*.[oas]' -o -name core -o -name '.*.cmd' \) -type f -print \ + @echo 'Cleaning up' + @find . \( -name \*.[oas] -o -name core -o -name .\*.cmd -o \ + -name .\*.tmp -o -name .\*.d \) -type f -print \ | grep -v lxdialog/ | xargs rm -f - rm -f $(CLEAN_FILES) - rm -rf $(CLEAN_DIRS) + @rm -f $(CLEAN_FILES) @$(MAKE) -C Documentation/DocBook clean mrproper: clean archmrproper - find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f - rm -f $(MRPROPER_FILES) - rm -rf $(MRPROPER_DIRS) + @echo 'Making mrproper' + @find . \( -size 0 -o -name .depend \) -type f -print | xargs rm -f + @rm -f $(MRPROPER_FILES) + @rm -rf $(MRPROPER_DIRS) @$(MAKE) -C Documentation/DocBook mrproper distclean: mrproper - rm -f core `find . \( -not -type d \) -and \ - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + @echo 'Making distclean' + @find . \( -not -type d \) -and \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ - -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags + -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f \ + -print | xargs rm -f + +# Generate tags for editors +# --------------------------------------------------------------------------- + +TAGS: FORCE + { find include/asm-${ARCH} -name '*.h' -print ; \ + find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \ + find $(SUBDIRS) init arch/${ARCH} -name '*.[chS]' ; } | grep -v SCCS | etags - + +# Exuberant ctags works better with -I +tags: FORCE + CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ + ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \ + find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \ + find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a + +# Documentation targets +# --------------------------------------------------------------------------- + +sgmldocs psdocs pdfdocs htmldocs: + @$(MAKE) -C Documentation/DocBook $@ + + +endif # ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) + +# Scripts to check various things for consistency +# --------------------------------------------------------------------------- + +checkconfig: + find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl + +checkhelp: + find * -name [cC]onfig.in -print | sort | xargs $(PERL) -w scripts/checkhelp.pl + +checkincludes: + find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl # FIXME Should go into a make.lib or something # =========================================================================== @@ -530,5 +671,20 @@ if_changed_rule = $(if $(strip $? \ $(filter-out $(cmd_$(1)),$(cmd_$(@F)))\ $(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\ @$(rule_$(1))) + +# If quiet is set, only print short version of rule + +cmd = @$(if $($(quiet)$(1)),echo ' $($(quiet)$(1))' &&) $($(1)) + +define update-if-changed + if [ -r $@ ] && cmp -s $@ $@.tmp; then \ + echo ' (unchanged)'; \ + rm -f $@.tmp; \ + else \ + echo ' (updated)'; \ + mv -f $@.tmp $@; \ + fi +endef + FORCE: Index: arch/sh/boot/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/boot/Makefile,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 Makefile --- arch/sh/boot/Makefile 15 Oct 2001 20:44:47 -0000 1.1.1.1 +++ arch/sh/boot/Makefile 18 Jun 2002 04:03:03 -0000 @@ -10,19 +10,19 @@ SYSTEM =$(TOPDIR)/vmlinux -Image: $(CONFIGURE) $(SYSTEM) +Image: $(SYSTEM) $(OBJCOPY) $(SYSTEM) Image -zImage: $(CONFIGURE) compressed/vmlinux +zImage: compressed/vmlinux $(OBJCOPY) compressed/vmlinux zImage compressed/vmlinux: $(TOPDIR)/vmlinux $(MAKE) -C compressed vmlinux -install: $(CONFIGURE) Image +install: Image sh -x ./install.sh $(KERNELRELEASE) Image $(TOPDIR)/System.map "$(INSTALL_PATH)" -zinstall: $(CONFIGURE) zImage +zinstall: zImage sh -x ./install.sh $(KERNELRELEASE) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)" dep: Index: arch/sh/kernel/setup.c =================================================================== RCS file: /cvsroot/linuxsh/linux/arch/sh/kernel/setup.c,v retrieving revision 1.6 diff -u -3 -p -r1.6 setup.c --- arch/sh/kernel/setup.c 24 May 2002 14:40:45 -0000 1.6 +++ arch/sh/kernel/setup.c 18 Jun 2002 04:03:03 -0000 @@ -32,6 +32,7 @@ #include <linux/console.h> #include <linux/ctype.h> #include <linux/seq_file.h> +#include <linux/root_dev.h> #include <asm/processor.h> #include <asm/page.h> #include <asm/pgtable.h> @@ -275,7 +276,7 @@ void __init setup_arch(char **cmdline_p) sh_console_init(); #endif - ROOT_DEV = to_kdev_t(ORIG_ROOT_DEV); + ROOT_DEV = ORIG_ROOT_DEV; #ifdef CONFIG_BLK_DEV_RAM rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; Index: drivers/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/Makefile,v retrieving revision 1.9 diff -u -3 -p -r1.9 Makefile --- drivers/Makefile 18 Jun 2002 02:54:38 -0000 1.9 +++ drivers/Makefile 18 Jun 2002 04:03:03 -0000 @@ -6,12 +6,6 @@ # -mod-subdirs := dio mtd sbus video macintosh usb input telephony sgi ide \ - message scsi md ieee1394 pnp isdn atm \ - fc4 i2c acpi bluetooth input/serio \ - input/gameport parport hotplug \ - base char block misc net media cdrom maple - obj-$(CONFIG_PCI) += pci/ obj-$(CONFIG_ACPI) += acpi/ obj-$(CONFIG_PARPORT) += parport/ Index: drivers/block/rd.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/block/rd.c,v retrieving revision 1.14 diff -u -3 -p -r1.14 rd.c --- drivers/block/rd.c 18 Jun 2002 02:54:38 -0000 1.14 +++ drivers/block/rd.c 18 Jun 2002 04:03:03 -0000 @@ -57,6 +57,7 @@ * include/linux/major.h for now */ #define MAJOR_NR RAMDISK_MAJOR +#define DEVICE_NR(device) (minor(device)) #include <linux/blk.h> #include <linux/blkpg.h> @@ -144,6 +145,7 @@ static int rd_blkdev_pagecache_IO(int rw { struct address_space * mapping; unsigned long index; + unsigned int vec_offset; int offset, size, err; err = 0; @@ -152,6 +154,7 @@ static int rd_blkdev_pagecache_IO(int rw index = sector >> (PAGE_CACHE_SHIFT - 9); offset = (sector << 9) & ~PAGE_CACHE_MASK; size = vec->bv_len; + vec_offset = vec->bv_offset; do { int count; @@ -186,13 +189,14 @@ static int rd_blkdev_pagecache_IO(int rw if (rw == READ) { src = kmap(page); src += offset; - dst = kmap(vec->bv_page) + vec->bv_offset; + dst = kmap(vec->bv_page) + vec_offset; } else { dst = kmap(page); dst += offset; - src = kmap(vec->bv_page) + vec->bv_offset; + src = kmap(vec->bv_page) + vec_offset; } offset = 0; + vec_offset += count; memcpy(dst, src, count); @@ -354,7 +358,7 @@ static struct file_operations initrd_fop static int rd_open(struct inode * inode, struct file * filp) { - int unit = DEVICE_NR(inode->i_rdev); + int unit = minor(inode->i_rdev); #ifdef CONFIG_BLK_DEV_INITRD if (unit == INITRD_MINOR) { Index: drivers/char/Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/char/Makefile,v retrieving revision 1.11 diff -u -3 -p -r1.11 Makefile --- drivers/char/Makefile 18 Jun 2002 03:36:24 -0000 1.11 +++ drivers/char/Makefile 18 Jun 2002 04:03:03 -0000 @@ -17,8 +17,6 @@ export-objs := busmouse.o console.o sonypi.o tty_io.o tty_ioctl.o generic_serial.o rtc.o \ ip2main.o -mod-subdirs := ftape drm pcmcia - KEYMAP =defkeymap.o KEYBD =pc_keyb.o CONSOLE =console.o @@ -217,17 +215,12 @@ obj-$(CONFIG_AGP) += agp/ obj-$(CONFIG_DRM) += drm/ obj-$(CONFIG_PCMCIA) += pcmcia/ -include $(TOPDIR)/Rules.make - -fastdep: +host-progs := conmakehash -conmakehash: conmakehash.c - $(HOSTCC) $(HOSTCFLAGS) -o conmakehash conmakehash.c +include $(TOPDIR)/Rules.make consolemap_deftbl.c: $(FONTMAPFILE) conmakehash - ./conmakehash $(FONTMAPFILE) > consolemap_deftbl.c - -consolemap_deftbl.o: consolemap_deftbl.c $(TOPDIR)/include/linux/types.h + ./conmakehash $< > $@ .DELETE_ON_ERROR: Index: drivers/pci/pci.ids =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/pci/pci.ids,v retrieving revision 1.13 diff -u -3 -p -r1.13 pci.ids --- drivers/pci/pci.ids 18 Jun 2002 02:17:19 -0000 1.13 +++ drivers/pci/pci.ids 18 Jun 2002 04:03:04 -0000 @@ -2040,6 +2040,7 @@ 8e2e 7000 KF-230TX 8e2e 7100 KF-230TX/2 a0a0 0007 ALN-325C + 8169 RTL-8169 10ed Ascii Corporation 7310 V7310 10ee Xilinx, Inc. Index: fs/nfs/inode.c =================================================================== RCS file: /cvsroot/linuxsh/linux/fs/nfs/inode.c,v retrieving revision 1.8 diff -u -3 -p -r1.8 inode.c --- fs/nfs/inode.c 18 Jun 2002 03:36:24 -0000 1.8 +++ fs/nfs/inode.c 18 Jun 2002 04:03:04 -0000 @@ -247,7 +247,7 @@ int nfs_fill_super(struct super_block *s int tcp, version, maxlen; /* We probably want something more informative here */ - snprintf(sb->s_id, sizeof(sb->s_id), "%x:%x", major(sb->s_dev), minor(sb->s_dev)); + snprintf(sb->s_id, sizeof(sb->s_id), "%x:%x", MAJOR(sb->s_dev), MINOR(sb->s_dev)); sb->s_magic = NFS_SUPER_MAGIC; sb->s_op = &nfs_sops; @@ -695,6 +695,7 @@ __nfs_fhget(struct super_block *sb, stru inode->i_atime = new_atime; NFS_CACHE_MTIME(inode) = new_mtime; inode->i_mtime = nfs_time_to_secs(new_mtime); + NFS_MTIME_UPDATE(inode) = jiffies; NFS_CACHE_ISIZE(inode) = new_size; inode->i_size = new_isize; inode->i_mode = fattr->mode; @@ -1060,7 +1061,8 @@ __nfs_refresh_inode(struct inode *inode, inode->i_atime = new_atime; if (NFS_CACHE_MTIME(inode) != new_mtime) { - NFS_MTIME_UPDATE(inode) = jiffies; + if (invalid) + NFS_MTIME_UPDATE(inode) = jiffies; NFS_CACHE_MTIME(inode) = new_mtime; inode->i_mtime = nfs_time_to_secs(new_mtime); } Index: include/asm-sh/system.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/system.h,v retrieving revision 1.4 diff -u -3 -p -r1.4 system.h --- include/asm-sh/system.h 26 Mar 2002 01:56:39 -0000 1.4 +++ include/asm-sh/system.h 18 Jun 2002 04:03:04 -0000 @@ -15,8 +15,12 @@ #ifdef CONFIG_SMP #error no SMP SuperH #else -#define prepare_to_switch() do { } while(0) -#define switch_to(prev, next) do { \ +#define prepare_arch_schedule(prev) do { } while(0) +#define finish_arch_schedule(prev) do { } while(0) +#define prepare_arch_switch(rq) do { } while(0) +#define finish_arch_switch(rq) do { } while(0) + +#define switch_to(prev, next, last) do { \ register unsigned long __dummy; \ register unsigned long *__ts1 __asm__ ("r1") = &prev->thread.sp; \ register unsigned long *__ts2 __asm__ ("r2") = &prev->thread.pc; \ Index: init/do_mounts.c =================================================================== RCS file: /cvsroot/linuxsh/linux/init/do_mounts.c,v retrieving revision 1.8 diff -u -3 -p -r1.8 do_mounts.c --- init/do_mounts.c 18 Jun 2002 03:36:24 -0000 1.8 +++ init/do_mounts.c 18 Jun 2002 04:03:04 -0000 @@ -11,6 +11,7 @@ #include <linux/tty.h> #include <linux/init.h> #include <linux/suspend.h> +#include <linux/root_dev.h> #include <linux/nfs_fs.h> #include <linux/nfs_fs_sb.h> @@ -55,7 +56,7 @@ int root_mountflags = MS_RDONLY | MS_VER static char root_device_name[64]; /* this is initialized in init/main.c */ -kdev_t ROOT_DEV; +dev_t ROOT_DEV; static int do_devfs = 0; @@ -240,7 +241,7 @@ static int __init root_dev_setup(char *l int i; char ch; - ROOT_DEV = name_to_kdev_t(line); + ROOT_DEV = kdev_t_to_nr(name_to_kdev_t(line)); memset (root_device_name, 0, sizeof root_device_name); if (strncmp (line, "/dev/", 5) == 0) line += 5; for (i = 0; i < sizeof root_device_name - 1; ++i) @@ -320,12 +321,12 @@ retry: * and bad superblock on root device. */ printk ("VFS: Cannot open root device \"%s\" or %s\n", - root_device_name, kdevname (ROOT_DEV)); + root_device_name, kdevname (to_kdev_t(ROOT_DEV))); printk ("Please append a correct \"root=\" boot option\n"); panic("VFS: Unable to mount root fs on %s", - kdevname(ROOT_DEV)); + kdevname(to_kdev_t(ROOT_DEV))); } - panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV)); + panic("VFS: Unable to mount root fs on %s", kdevname(to_kdev_t(ROOT_DEV))); out: putname(fs_names); sys_chdir("/root"); @@ -346,7 +347,7 @@ static int __init mount_nfs_root(void) } #endif -static int __init create_dev(char *name, kdev_t dev, char *devfs_name) +static int __init create_dev(char *name, dev_t dev, char *devfs_name) { void *handle; char path[64]; @@ -354,10 +355,10 @@ static int __init create_dev(char *name, sys_unlink(name); if (!do_devfs) - return sys_mknod(name, S_IFBLK|0600, kdev_t_to_nr(dev)); + return sys_mknod(name, S_IFBLK|0600, dev); - handle = devfs_find_handle(NULL, kdev_none(dev) ? devfs_name : NULL, - major(dev), minor(dev), DEVFS_SPECIAL_BLK, 1); + handle = devfs_find_handle(NULL, !dev ? devfs_name : NULL, + MAJOR(dev), MINOR(dev), DEVFS_SPECIAL_BLK, 1); if (!handle) return -1; n = devfs_generate_path(handle, path + 5, sizeof (path) - 5); @@ -635,7 +636,7 @@ static int __init rd_load_disk(int n) #ifdef CONFIG_BLK_DEV_RAM if (rd_prompt) change_floppy("root floppy disk to be loaded into RAM disk"); - create_dev("/dev/ram", mk_kdev(RAMDISK_MAJOR, n), NULL); + create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, n), NULL); #endif return rd_load_image("/dev/root"); } @@ -700,7 +701,7 @@ static void __init devfs_make_root(char static void __init mount_root(void) { #ifdef CONFIG_ROOT_NFS - if (major(ROOT_DEV) == UNNAMED_MAJOR) { + if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) { if (mount_nfs_root()) { sys_chdir("/root"); ROOT_DEV = current->fs->pwdmnt->mnt_sb->s_dev; @@ -708,17 +709,17 @@ static void __init mount_root(void) return; } printk(KERN_ERR "VFS: Unable to mount root fs via NFS, trying floppy.\n"); - ROOT_DEV = mk_kdev(FLOPPY_MAJOR, 0); + ROOT_DEV = Root_FD0; } #endif devfs_make_root(root_device_name); create_dev("/dev/root", ROOT_DEV, root_device_name); #ifdef CONFIG_BLK_DEV_FD - if (major(ROOT_DEV) == FLOPPY_MAJOR) { + if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) { /* rd_doload is 2 for a dual initrd/ramload setup */ if (rd_doload==2) { if (rd_load_disk(1)) { - ROOT_DEV = mk_kdev(RAMDISK_MAJOR, 1); + ROOT_DEV = Root_RAM1; create_dev("/dev/root", ROOT_DEV, NULL); } } else @@ -753,11 +754,10 @@ static int do_linuxrc(void * shell) static void __init handle_initrd(void) { #ifdef CONFIG_BLK_DEV_INITRD - kdev_t ram0 = mk_kdev(RAMDISK_MAJOR,0); int error; int i, pid; - create_dev("/dev/root.old", ram0, NULL); + create_dev("/dev/root.old", Root_RAM0, NULL); mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY); sys_mkdir("/old", 0700); sys_chdir("/old"); @@ -771,12 +771,12 @@ static void __init handle_initrd(void) sys_mount("..", ".", NULL, MS_MOVE, NULL); sys_umount("/old/dev", 0); - if (real_root_dev == kdev_t_to_nr(ram0)) { + if (real_root_dev == Root_RAM0) { sys_chdir("/old"); return; } - ROOT_DEV = to_kdev_t(real_root_dev); + ROOT_DEV = real_root_dev; mount_root(); printk(KERN_NOTICE "Trying to move old root to /initrd ... "); @@ -803,8 +803,8 @@ static void __init handle_initrd(void) static int __init initrd_load(void) { #ifdef CONFIG_BLK_DEV_INITRD - create_dev("/dev/ram", mk_kdev(RAMDISK_MAJOR, 0), NULL); - create_dev("/dev/initrd", mk_kdev(RAMDISK_MAJOR, INITRD_MINOR), NULL); + create_dev("/dev/ram", MKDEV(RAMDISK_MAJOR, 0), NULL); + create_dev("/dev/initrd", MKDEV(RAMDISK_MAJOR, INITRD_MINOR), NULL); #endif return rd_load_image("/dev/initrd"); } @@ -814,11 +814,11 @@ static int __init initrd_load(void) */ void prepare_namespace(void) { - int is_floppy = major(ROOT_DEV) == FLOPPY_MAJOR; + int is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; #ifdef CONFIG_BLK_DEV_INITRD if (!initrd_start) mount_initrd = 0; - real_root_dev = kdev_t_to_nr(ROOT_DEV); + real_root_dev = ROOT_DEV; #endif sys_mkdir("/dev", 0700); sys_mkdir("/root", 0700); @@ -835,12 +835,12 @@ void prepare_namespace(void) software_resume(); if (mount_initrd) { - if (initrd_load() && !kdev_same(ROOT_DEV, mk_kdev(RAMDISK_MAJOR, 0))) { + if (initrd_load() && ROOT_DEV != Root_RAM0) { handle_initrd(); goto out; } } else if (is_floppy && rd_doload && rd_load_disk(0)) - ROOT_DEV = mk_kdev(RAMDISK_MAJOR, 0); + ROOT_DEV = Root_RAM0; mount_root(); out: sys_umount("/dev", 0); Index: mm/memory.c =================================================================== RCS file: /cvsroot/linuxsh/linux/mm/memory.c,v retrieving revision 1.18 diff -u -3 -p -r1.18 memory.c --- mm/memory.c 18 Jun 2002 03:36:24 -0000 1.18 +++ mm/memory.c 18 Jun 2002 04:03:04 -0000 @@ -310,17 +310,6 @@ nomem: return -ENOMEM; } -/* - * Return indicates whether a page was freed so caller can adjust rss - */ -static inline void forget_pte(pte_t page) -{ - if (!pte_none(page)) { - printk("forget_pte: old mapping existed!\n"); - BUG(); - } -} - static void zap_pte_range(mmu_gather_t *tlb, pmd_t * pmd, unsigned long address, unsigned long size) { unsigned long offset; @@ -427,7 +416,7 @@ void zap_page_range(struct vm_area_struc spin_lock(&mm->page_table_lock); flush_cache_range(vma, address, end); - tlb = tlb_gather_mmu(mm); + tlb = tlb_gather_mmu(mm, 0); unmap_page_range(tlb, vma, address, end); tlb_finish_mmu(tlb, start, end); spin_unlock(&mm->page_table_lock); @@ -777,9 +766,8 @@ static inline void zeromap_pte_range(pte end = PMD_SIZE; do { pte_t zero_pte = pte_wrprotect(mk_pte(ZERO_PAGE(address), prot)); - pte_t oldpage = ptep_get_and_clear(pte); + BUG_ON(!pte_none(*pte)); set_pte(pte, zero_pte); - forget_pte(oldpage); address += PAGE_SIZE; pte++; } while (address && (address < end)); @@ -853,11 +841,9 @@ static inline void remap_pte_range(pte_t end = PMD_SIZE; pfn = phys_addr >> PAGE_SHIFT; do { - pte_t oldpage = ptep_get_and_clear(pte); - + BUG_ON(!pte_none(*pte)); if (!pfn_valid(pfn) || PageReserved(pfn_to_page(pfn))) set_pte(pte, pfn_pte(pfn, prot)); - forget_pte(oldpage); address += PAGE_SIZE; pfn++; pte++; |
From: Paul M. <pau...@ti...> - 2002-06-18 13:32:59
|
Speaking of mainline .. what are the plans for pushing changes from HEAD to Linus / stable to marcelo? Looking at the ChangeLog's on kernel.org, it doesn't look like there's been a SuperH sync since 2.5.3-pre5. On Tue, 2002-06-18 at 00:03, NIIBE Yutaka wrote: > Changes from mainline included. Regards, --=20 Paul Mundt pau...@ti... TimeSys Corporation |
From: NIIBE Y. <gn...@m1...> - 2002-06-18 23:28:32
|
Paul Mundt wrote: > Speaking of mainline .. what are the plans for pushing changes from HEAD > to Linus / stable to marcelo? Looking at the ChangeLog's on kernel.org, > it doesn't look like there's been a SuperH sync since 2.5.3-pre5. For 2.5, I've sent the updates to Linus but it's not included. It was around 2.5.9 to 2.5.13. Perhaps, I should use BK, for better inclusion. If there's anyone with experience of BK, I'd like to know how it's better (or not). After 2.5.14, I didn't sent update, as it's not yet stable (obviously broken). For 2.4, I'm waiting some feedback/testing of gUSA, before sending update to Merceleo. IMNSHO, gUSA is great feature which should be included to mainline soon. I'm thinking of running lmbench and get the number. -- |