From: NIIBE Y. <gn...@m1...> - 2002-05-23 01:58:10
|
Changes from mainline. We need to implement TLB handling. 2002-05-23 NIIBE Yutaka <gn...@m1...> * include/asm-sh/tlb.h (tlb_start_vma, tlb_end_vma, tlb_remove_tlb_entry, tlb_flush): To be implemented. * AGAINST-2.5.17: New file. * AGAINST-2.5.16: Removed. * Makefile: Version 2.5.17. * drivers/block/rd.c, fs/nfs/inode.c, include/asm-sh/ioctls.h, mm/memory.c: Incorporate changes in 2.5.17. Index: Makefile =================================================================== RCS file: /cvsroot/linuxsh/linux/Makefile,v retrieving revision 1.23 diff -u -3 -p -r1.23 Makefile --- Makefile 23 May 2002 01:51:12 -0000 1.23 +++ Makefile 23 May 2002 01:56:15 -0000 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 16 +SUBLEVEL = 17 EXTRAVERSION =-sh KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) @@ -11,7 +11,7 @@ KERNELPATH=kernel-$(shell echo $(KERNELR CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ else echo sh; fi ; fi) -TOPDIR := $(shell /bin/pwd) +TOPDIR := $(CURDIR) HPATH = $(TOPDIR)/include FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net @@ -39,6 +39,7 @@ GENKSYMS = /sbin/genksyms DEPMOD = /sbin/depmod MODFLAGS = -DMODULE CFLAGS_KERNEL = +AFLAGS_KERNEL = PERL = perl export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ @@ -54,9 +55,8 @@ all: do-it-all ifeq (.config,$(wildcard .config)) include .config -ifeq (.depend,$(wildcard .depend)) -include .depend -do-it-all: Version vmlinux +ifeq (.hdepend,$(wildcard .hdepend)) +do-it-all: vmlinux else CONFIGURATION = depend do-it-all: depend @@ -92,37 +92,12 @@ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-pro -fomit-frame-pointer -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) -# -# ROOT_DEV specifies the default root-device when making the image. -# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case -# the default of FLOPPY is used by 'build'. -# This is i386 specific. -# - -export ROOT_DEV = CURRENT - -# -# If you want to preset the SVGA mode, uncomment the next line and -# set SVGA_MODE to whatever number you want. -# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode. -# The number is the same as you would ordinarily press at bootup. -# This is i386 specific. -# - -export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA - -# -# If you want the RAM disk device, define this to be the size in blocks. -# This is i386 specific. -# - -#export RAMDISK = -DRAMDISK=512 - +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 =kernel lib drivers mm fs net ipc sound +SUBDIRS =init kernel lib drivers mm fs net ipc sound DRIVERS-n := DRIVERS-y := @@ -179,77 +154,20 @@ DRIVERS-$(CONFIG_MAPLE) += drivers/maple DRIVERS := $(DRIVERS-y) -# files removed with 'make clean' -CLEAN_FILES = \ - kernel/ksyms.lst 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 \ - drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \ - drivers/zorro/devlist.h drivers/zorro/gen-devlist \ - sound/oss/bin2hex sound/oss/hex2hex \ - drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \ - drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \ - drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \ - drivers/scsi/aic7xxx/aicasm/y.tab.h \ - drivers/scsi/aic7xxx/aicasm/aicasm \ - drivers/scsi/53c700_d.h \ - net/khttpd/make_times_h \ - 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 \ - drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \ - drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \ - drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \ - drivers/net/hamradio/soundmodem/gentbl \ - sound/oss/*_boot.h sound/oss/.*.boot \ - sound/oss/msndinit.c \ - sound/oss/msndperm.c \ - sound/oss/pndsperm.c \ - sound/oss/pndspini.c \ - drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \ - .version .config* config.in config.old \ - scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \ - 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 - -# directories removed with 'make mrproper' -MRPROPER_DIRS = \ - include/config \ - $(TOPDIR)/include/linux/modules - - include arch/$(ARCH)/Makefile export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS -.S.s: - $(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $< -.S.o: - $(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $< - -Version: dummy - @rm -f include/linux/compile.h +# Build vmlinux / boot target +# --------------------------------------------------------------------------- boot: vmlinux - @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot + @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C arch/$(ARCH)/boot -vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o init/do_mounts.o linuxsubdirs - $(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o init/do_mounts.o \ +vmlinux: include/linux/version.h $(CONFIGURATION) linuxsubdirs + $(LD) $(LINKFLAGS) $(HEAD) $(INIT) \ --start-group \ $(CORE_FILES) \ $(LIBS) \ @@ -259,94 +177,76 @@ vmlinux: include/linux/version.h $(CONFI -o vmlinux $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map -symlinks: - rm -f include/asm - ( cd include ; ln -sf asm-$(ARCH) asm) - @if [ ! -d include/linux/modules ]; then \ - mkdir include/linux/modules; \ - fi +# Handle descending into subdirectories listed in $(SUBDIRS) + +linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS)) + +$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER + @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@) + +# Configuration +# --------------------------------------------------------------------------- oldconfig: symlinks $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in xconfig: symlinks - $(MAKE) -C scripts kconfig.tk + @$(MAKE) -C scripts kconfig.tk wish -f scripts/kconfig.tk menuconfig: include/linux/version.h symlinks - $(MAKE) -C scripts/lxdialog all + @$(MAKE) -C scripts/lxdialog all $(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in config: symlinks $(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in -include/config/MARKER: scripts/split-include include/linux/autoconf.h - scripts/split-include include/linux/autoconf.h include/config - @ touch include/config/MARKER - -linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS)) +# make asm->asm-$(ARCH) symlink -$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER - $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@) +symlinks: + rm -f include/asm + ( cd include ; ln -sf asm-$(ARCH) asm) + @if [ ! -d include/linux/modules ]; then \ + mkdir include/linux/modules; \ + fi -$(TOPDIR)/include/linux/version.h: include/linux/version.h -$(TOPDIR)/include/linux/compile.h: include/linux/compile.h +# split autoconf.h into include/linux/config/* -newversion: +include/config/MARKER: scripts/split-include include/linux/autoconf.h + scripts/split-include include/linux/autoconf.h include/config + @ touch include/config/MARKER . scripts/mkversion > .tmpversion @mv -f .tmpversion .version -include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion - @echo -n \#define UTS_VERSION \"\#`cat .version` > .ver - @if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver; fi - @if [ -f .name ]; then echo -n \-`cat .name` >> .ver; fi - @echo ' '`date`'"' >> .ver - @echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver - @echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver - @echo \#define LINUX_COMPILE_HOST \"`hostname`\" >> .ver - @if [ -x /bin/dnsdomainname ]; then \ - echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname`\"; \ - elif [ -x /bin/domainname ]; then \ - echo \#define LINUX_COMPILE_DOMAIN \"`domainname`\"; \ - else \ - echo \#define LINUX_COMPILE_DOMAIN ; \ - fi >> .ver - @echo \#define LINUX_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver - @mv -f .ver $@ +# Generate some files + +$(TOPDIR)/include/linux/version.h: include/linux/version.h include/linux/version.h: ./Makefile - @echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver - @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver - @echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver - @mv -f .ver $@ + @echo Generating $@ + @. scripts/mkversion_h $@ $(KERNELRELEASE) $(VERSION) $(PATCHLEVEL) $(SUBLEVEL) comma := , -init/version.o: init/version.c include/linux/compile.h include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c +# --------------------------------------------------------------------------- +# Generate dependencies -init/main.o: init/main.c include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $< +depend dep: dep-files -init/do_mounts.o: init/do_mounts.c include/config/MARKER - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $< +dep-files: scripts/mkdep archdep include/linux/version.h + scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend + $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" +ifdef CONFIG_MODVERSIONS + $(MAKE) update-modverfile +endif -fs lib mm ipc kernel drivers net sound: dummy - $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@) +# --------------------------------------------------------------------------- +# Modules -TAGS: dummy - { 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 - +ifdef CONFIG_MODULES -# Exuberant ctags works better with -I -tags: dummy - 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 +# Build modules -ifdef CONFIG_MODULES ifdef CONFIG_MODVERSIONS MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h endif @@ -356,7 +256,9 @@ modules: $(patsubst %, _mod_%, $(SUBDIRS .PHONY: $(patsubst %, _mod_%, $(SUBDIRS)) $(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER - $(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules + @$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules + +# Install modules .PHONY: modules_install modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post @@ -384,11 +286,13 @@ _modinst_post: .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS)) $(patsubst %, _modinst_%, $(SUBDIRS)) : - $(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install + @$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install -# modules disabled.... +else # CONFIG_MODULES + +# --------------------------------------------------------------------------- +# Modules not configured -else modules modules_install: dummy @echo @echo "The present kernel configuration has modules disabled." @@ -396,20 +300,90 @@ modules modules_install: dummy @echo "Then build a kernel with module support enabled." @echo @exit 1 -endif + +endif # CONFIG_MODULES + +# --------------------------------------------------------------------------- + +include Rules.make + +# Build helpers in scripts/ +# FIXME: do that in scripts/Makefile? + +scripts/mkdep: scripts/mkdep.c + $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c + +scripts/split-include: scripts/split-include.c + $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c + +# Cleaning up +# --------------------------------------------------------------------------- + +# files removed with 'make clean' +CLEAN_FILES += \ + kernel/ksyms.lst 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 \ + drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \ + drivers/zorro/devlist.h drivers/zorro/gen-devlist \ + sound/oss/bin2hex sound/oss/hex2hex \ + drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \ + drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \ + drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \ + drivers/scsi/aic7xxx/aicasm/y.tab.h \ + drivers/scsi/aic7xxx/aicasm/aicasm \ + drivers/scsi/53c700_d.h \ + net/khttpd/make_times_h \ + 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 \ + drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \ + drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \ + drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \ + drivers/net/hamradio/soundmodem/gentbl \ + sound/oss/*_boot.h sound/oss/.*.boot \ + sound/oss/msndinit.c \ + sound/oss/msndperm.c \ + sound/oss/pndsperm.c \ + sound/oss/pndspini.c \ + drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \ + .version .config* config.in config.old \ + scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \ + 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 + +# directories removed with 'make mrproper' +MRPROPER_DIRS += \ + include/config \ + $(TOPDIR)/include/linux/modules + clean: archclean - find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \ + find . \( -name '*.[oas]' -o -name core -o -name '.*.cmd' \) -type f -print \ | grep -v lxdialog/ | xargs rm -f rm -f $(CLEAN_FILES) rm -rf $(CLEAN_DIRS) - $(MAKE) -C Documentation/DocBook clean + @$(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) - $(MAKE) -C Documentation/DocBook mrproper + @$(MAKE) -C Documentation/DocBook mrproper distclean: mrproper rm -f core `find . \( -not -type d \) -and \ @@ -417,101 +391,28 @@ distclean: mrproper -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags -backup: mrproper - cd .. && tar cf - linux/ | gzip -9 > backup.gz - sync - -sgmldocs: - chmod 755 $(TOPDIR)/scripts/docgen - chmod 755 $(TOPDIR)/scripts/gen-all-syms - chmod 755 $(TOPDIR)/scripts/kernel-doc - $(MAKE) -C $(TOPDIR)/Documentation/DocBook books - -psdocs: sgmldocs - $(MAKE) -C Documentation/DocBook ps - -pdfdocs: sgmldocs - $(MAKE) -C Documentation/DocBook pdf - -htmldocs: sgmldocs - $(MAKE) -C Documentation/DocBook html - -sums: - find . -type f -print | sort | xargs sum > .SUMS - -dep-files: scripts/mkdep archdep include/linux/version.h - scripts/mkdep -- init/*.c > .depend - scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend - $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" -ifdef CONFIG_MODVERSIONS - $(MAKE) update-modverfile -endif - -ifdef CONFIG_MODVERSIONS -MODVERFILE := $(TOPDIR)/include/linux/modversions.h -else -MODVERFILE := -endif -export MODVERFILE - -depend dep: dep-files - -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 - -ifdef CONFIGURATION -..$(CONFIGURATION): - @echo - @echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'" - @echo - $(MAKE) $(CONFIGURATION) - @echo - @echo "Successful. Try re-making (ignore the error that follows)" - @echo - exit 1 - -#dummy: ..$(CONFIGURATION) -dummy: - -else - -dummy: - -endif +# Assorted miscellaneous targets +# --------------------------------------------------------------------------- -include Rules.make - -# -# This generates dependencies for the .h files. -# +# Documentation targets -scripts/mkdep: scripts/mkdep.c - $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c +sgmldocs psdocs pdfdocs htmldocs: + @$(MAKE) -C Documentation/DocBook $@ -scripts/split-include: scripts/split-include.c - $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c -# # RPM target # # If you do a make spec before packing the tarball you can rpm -ta it -# + spec: . scripts/mkspec >kernel.spec -# # Build a tar ball, generate an rpm from it and pack the result # There arw two bits of magic here # 1) The use of /. to avoid tar packing just the symlink # 2) Removing the .dep files as they have source paths in them that # will become invalid -# + rpm: clean spec find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f set -e; \ @@ -523,3 +424,48 @@ rpm: clean spec . scripts/mkversion > .version ; \ rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \ rm $(TOPDIR)/../$(KERNELPATH).tar.gz + +# 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: dummy + { 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: dummy + 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 + +# Targets which will only descend into one subdir, not trying +# to link vmlinux afterwards +# FIXME: anybody still using this? + +fs lib mm ipc kernel drivers net sound: dummy + $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" AFLAGS="$(AFLAGS) $(AFLAGS_KERNEL)" $(subst $@, _dir_$@, $@) + +# Make a backup +# FIXME anybody still using this? + +backup: mrproper + cd .. && tar cf - linux/ | gzip -9 > backup.gz + sync + +# Make checksums +# FIXME anybody still using this? + +sums: + find . -type f -print | sort | xargs sum > .SUMS Index: drivers/block/rd.c =================================================================== RCS file: /cvsroot/linuxsh/linux/drivers/block/rd.c,v retrieving revision 1.11 diff -u -3 -p -r1.11 rd.c --- drivers/block/rd.c 6 May 2002 00:50:01 -0000 1.11 +++ drivers/block/rd.c 23 May 2002 01:56:15 -0000 @@ -318,7 +318,8 @@ static ssize_t initrd_read(struct file * left = initrd_end - initrd_start - *ppos; if (count > left) count = left; if (count == 0) return 0; - copy_to_user(buf, (char *)initrd_start + *ppos, count); + if (copy_to_user(buf, (char *)initrd_start + *ppos, count)) + return -EFAULT; *ppos += count; return count; } Index: fs/nfs/inode.c =================================================================== RCS file: /cvsroot/linuxsh/linux/fs/nfs/inode.c,v retrieving revision 1.5 diff -u -3 -p -r1.5 inode.c --- fs/nfs/inode.c 1 May 2002 06:18:01 -0000 1.5 +++ fs/nfs/inode.c 23 May 2002 01:56:15 -0000 @@ -23,7 +23,6 @@ #include <linux/string.h> #include <linux/stat.h> #include <linux/errno.h> -#include <linux/locks.h> #include <linux/unistd.h> #include <linux/sunrpc/clnt.h> #include <linux/sunrpc/stats.h> @@ -47,7 +46,6 @@ static void nfs_invalidate_inode(struct static struct inode *nfs_alloc_inode(struct super_block *sb); static void nfs_destroy_inode(struct inode *); -static void nfs_read_inode(struct inode *); static void nfs_write_inode(struct inode *,int); static void nfs_delete_inode(struct inode *); static void nfs_put_super(struct super_block *); @@ -59,7 +57,6 @@ static int nfs_show_options(struct seq_ static struct super_operations nfs_sops = { alloc_inode: nfs_alloc_inode, destroy_inode: nfs_destroy_inode, - read_inode: nfs_read_inode, write_inode: nfs_write_inode, delete_inode: nfs_delete_inode, put_super: nfs_put_super, @@ -98,15 +95,6 @@ nfs_fattr_to_ino_t(struct nfs_fattr *fat return nfs_fileid_to_ino_t(fattr->fileid); } -/* - * The "read_inode" function doesn't actually do anything: - * the real data is filled in later in nfs_fhget. - */ -static void -nfs_read_inode(struct inode * inode) -{ -} - static void nfs_write_inode(struct inode *inode, int sync) { @@ -592,7 +580,7 @@ struct nfs_find_desc { * i_ino. */ static int -nfs_find_actor(struct inode *inode, unsigned long ino, void *opaque) +nfs_find_actor(struct inode *inode, void *opaque) { struct nfs_find_desc *desc = (struct nfs_find_desc *)opaque; struct nfs_fh *fh = desc->fh; @@ -612,6 +600,18 @@ nfs_find_actor(struct inode *inode, unsi return 1; } +static int +nfs_init_locked(struct inode *inode, void *opaque) +{ + struct nfs_find_desc *desc = (struct nfs_find_desc *)opaque; + struct nfs_fh *fh = desc->fh; + struct nfs_fattr *fattr = desc->fattr; + + NFS_FILEID(inode) = fattr->fileid; + memcpy(NFS_FH(inode), fh, sizeof(struct nfs_fh)); + return 0; +} + /* * This is our own version of iget that looks up inodes by file handle * instead of inode number. We use this technique instead of using @@ -642,7 +642,7 @@ __nfs_fhget(struct super_block *sb, stru fattr: fattr }; struct inode *inode = NULL; - unsigned long ino; + unsigned long hash; if ((fattr->valid & NFS_ATTR_FATTR) == 0) goto out_no_inode; @@ -652,20 +652,21 @@ __nfs_fhget(struct super_block *sb, stru goto out_no_inode; } - ino = nfs_fattr_to_ino_t(fattr); + hash = nfs_fattr_to_ino_t(fattr); - if (!(inode = iget4(sb, ino, nfs_find_actor, &desc))) + if (!(inode = iget5_locked(sb, hash, nfs_find_actor, nfs_init_locked, &desc))) goto out_no_inode; - if (NFS_NEW(inode)) { + if (inode->i_state & I_NEW) { __u64 new_size, new_mtime; loff_t new_isize; time_t new_atime; + /* We set i_ino for the few things that still rely on it, + * such as stat(2) */ + inode->i_ino = hash; + /* We can't support UPDATE_ATIME(), since the server will reset it */ - NFS_FLAGS(inode) &= ~NFS_INO_NEW; - NFS_FILEID(inode) = fattr->fileid; - memcpy(NFS_FH(inode), fh, sizeof(struct nfs_fh)); inode->i_flags |= S_NOATIME; inode->i_mode = fattr->mode; /* Why so? Because we want revalidate for devices/FIFOs, and @@ -713,6 +714,8 @@ __nfs_fhget(struct super_block *sb, stru NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode); NFS_ATTRTIMEO_UPDATE(inode) = jiffies; memset(NFS_COOKIEVERF(inode), 0, sizeof(NFS_COOKIEVERF(inode))); + + unlock_new_inode(inode); } else nfs_refresh_inode(inode, fattr); dprintk("NFS: __nfs_fhget(%s/%Ld ct=%d)\n", @@ -1233,7 +1236,7 @@ static struct inode *nfs_alloc_inode(str nfsi = (struct nfs_inode *)kmem_cache_alloc(nfs_inode_cachep, SLAB_KERNEL); if (!nfsi) return NULL; - nfsi->flags = NFS_INO_NEW; + nfsi->flags = 0; nfsi->mm_cred = NULL; return &nfsi->vfs_inode; } Index: include/asm-sh/ioctls.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/ioctls.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 ioctls.h --- include/asm-sh/ioctls.h 15 Oct 2001 20:45:09 -0000 1.1.1.1 +++ include/asm-sh/ioctls.h 23 May 2002 01:56:15 -0000 @@ -9,6 +9,7 @@ #define FIONBIO _IOW('f', 126, int) #define FIONREAD _IOR('f', 127, int) #define TIOCINQ FIONREAD +#define FIOQSIZE _IOR('f', 128, loff_t) #define TCGETS 0x5401 #define TCSETS 0x5402 Index: include/asm-sh/tlb.h =================================================================== RCS file: /cvsroot/linuxsh/linux/include/asm-sh/tlb.h,v retrieving revision 1.1.1.1 diff -u -3 -p -r1.1.1.1 tlb.h --- include/asm-sh/tlb.h 15 Oct 2001 20:45:11 -0000 1.1.1.1 +++ include/asm-sh/tlb.h 23 May 2002 01:56:15 -0000 @@ -1 +1,13 @@ +#ifndef __ASM_SH_TLB_H +#define __ASM_SH_TLB_H + +/* + * XXX: We should implement those... + */ +#define tlb_start_vma(tlb, vma) do { } while (0) +#define tlb_end_vma(tlb, vma) do { } while (0) +#define tlb_remove_tlb_entry(tlb, pte, address) do { } while (0) +#define tlb_flush(tlb) flush_tlb_mm((tlb)->mm) + #include <asm-generic/tlb.h> +#endif Index: mm/memory.c =================================================================== RCS file: /cvsroot/linuxsh/linux/mm/memory.c,v retrieving revision 1.14 diff -u -3 -p -r1.14 memory.c --- mm/memory.c 23 May 2002 01:51:13 -0000 1.14 +++ mm/memory.c 23 May 2002 01:56:15 -0000 @@ -348,11 +348,13 @@ static void zap_pte_range(mmu_gather_t * pte_clear(ptep); pfn = pte_pfn(pte); + tlb_remove_tlb_entry(tlb, pte, address+offset); if (pfn_valid(pfn)) { struct page *page = pfn_to_page(pfn); if (!PageReserved(page)) { if (pte_dirty(pte)) set_page_dirty(page); + tlb->freed++; tlb_remove_page(tlb, page); } } |