1. 06 Jun, 2002 4 commits
    • Kai Germaschewski's avatar
      kbuild: Enforce UTS limit, use LANG=C for date/time · 561e79b0
      Kai Germaschewski authored
      Patch by Keith Owens, ported to 2.5.
      
      If the length of $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
      exceeds 64 characters it silently corrupts the utsname data, resulting
      in garbage for uname -r and problems running the kernel and modules.
      Abort if KERNELRELEASE is too long.  Truncation is not good enough, it
      results in ambiguous /lib/modules/`uname -r` contents.
      
      Ensure that the date/time in uname are always in LANG=C.  Users with
      other languages report that 8 bit values cause the boot messages to go
      haywire.
      561e79b0
    • Christoph Hellwig's avatar
      kbuild: small toplevel makefile tidyup · 053cf0e6
      Christoph Hellwig authored
      - add comment about the vmlinux link components
      - get rid of DRIVERS-y - always linking in sound/sound.o doesn't harm
      - sort SUBDIRS in link order
      - always use := to assign
      - remove supeflous $(TOPDIR) for lib/lib.a
      053cf0e6
    • Kai Germaschewski's avatar
      Merge · b63a6d5a
      Kai Germaschewski authored
      b63a6d5a
    • Christoph Hellwig's avatar
      kbuild: remove CLEAN_DIRS from Makfile · 07ea2df8
      Christoph Hellwig authored
      07ea2df8
  2. 05 Jun, 2002 24 commits
    • Kai Germaschewski's avatar
      kbuild: Use -nostdinc with kernel sources · 8da46592
      Kai Germaschewski authored
      Kernel code should not include userspace headers. To avoid that
      happening by mistake, ask gcc not to look into the usual places
      when looking for headers. We still need to find gcc headers for
      vararg and similar, though - achieved by the "-iwithprefix include"
      which will look into <gcc-path>/include, as proposed by Russell
      King.
      
      A similar patch went into 2.4, so not much breakage expected.
      8da46592
    • Kai Germaschewski's avatar
      kbuild: Fix tolower() usage in scripts/fixdep.c · 4a485794
      Kai Germaschewski authored
      Not that it matters, since it's only used with 7bit chars, but
      anyway.
      4a485794
    • Kai Germaschewski's avatar
      kbuild: · 79b1bf14
      Kai Germaschewski authored
      Remove absolute path in output of drivers/scsi/script_asm.pl
      Extracted from Keith Owens' kbuild-2.5 by patch@luckynet.dynu.com.
      79b1bf14
    • Kai Germaschewski's avatar
      kbuild: Remove 2048 symbol limit from make xconfig · 891563ca
      Kai Germaschewski authored
      This patch was extracted from Keith Owens' kbuild-2.5 by
      patch@luckynet.dynu.com
      891563ca
    • Kai Germaschewski's avatar
      kbuild: Additional config targets for testing · 04fdcac1
      Kai Germaschewski authored
      This patch adds the following targets, which generate some configs
      useful for testing - which kind should be clear from the names:
      
      o allyesconfig
      o allmodconfig
      o allnoconfig
      o randconfig
      
      It also adds
      
      o defconfig
      
      which does the same as make oldconfig but uses the defaults for all
      new options without asking.
      
      The actual patch was done by Ghozlane Toumi, maintained in kbuild-2.5
      by Keith Owens, and extracted by Sam Ravnborg and patch@luckynet.dynu.com.
      04fdcac1
    • Kai Germaschewski's avatar
      kbuild: -DMODULE for assembler source · 660ada4f
      Kai Germaschewski authored
      For consistency, it makes a lot of sense to add -DMODULE (plus
      the other special switches with CONFIG_MODVERSIONS) to .S files
      which get assembled. It surely fixes an ugly workaround for
      sparc64, guess we'll see if it breaks something for other archs
      (I wouldn't think so, though)
      660ada4f
    • Kai Germaschewski's avatar
      kbuild: Use a standard "update-if-changed" · 1e5a8730
      Kai Germaschewski authored
      For some cases, we cannot decide if a target would change just by looking
      at its prequisites, i.e. it's quite likely that it remains the same
      even though a prequisite changed. The updated timestamp would cause
      a lot of unnecessary recompiles. In this case, we actually generate
      a temporary file, compare it to the old file and only the contents
      are different do overwrite the old file.
      
      The "update-if-changed" snippet remains always the same, so let's
      put it into a macro instead of duplicating it. After that change,
      scripts/mkversion_h is so small that we rather put the three remaining
      lines directly into the Makefile.
      1e5a8730
    • Kai Germaschewski's avatar
      Merge linux-isdn@linux-isdn.bkbits.net:linux-2.5.make · 4e30f812
      Kai Germaschewski authored
      into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make
      4e30f812
    • Kai Germaschewski's avatar
      kbuild: Build modules by default · 2cb900d0
      Kai Germaschewski authored
      So here we are: make vmlinux/bzImage/whatever will now also build
      modules as it goes. Other than that, everything works as usual.
      "make modules" builds only the modules (but you shouldn't need
      it anymore). If you don't want the modules built, you can
      do "make KBUILD_MODULES= vmlinux/whatever" to only compile built-in
      objects.
      
      If people want it, I can also allow for "make vmlinux/whatever nomodules"
      to do the same.
      
      Also, add '  ' in Rules.make to properly align output in quiet mode.
      2cb900d0
    • Kai Germaschewski's avatar
      kbuild: modversions improvements · 67b95633
      Kai Germaschewski authored
      If an object was changed to not export symbols anymore, the
      corresponding stale .ver file would have been left lying around
      and been picked up when generating modversions.h. 
      
      The obvious solution to remove include/linux/modules/* at the
      beginning of "make dep" is not really good, since that means
      that .ver files would be regenerated unconditionally, thus causing
      a lot of possibly unnecessary rebuilds.
      
      So, instead, we build a temporary shadow tree of all export-objs
      (as empty files) during the recursive "make fastdep" phase, and use 
      that to generate modversions.h.
      
      Ensure that we touch include/linux/modversions.h if any of the
      .ver files changes, that's our marker to rebuild all modversions
      affected files.
      67b95633
    • Kai Germaschewski's avatar
      kbuild: Really stick with verbose output by default · 9d0ac54b
      Kai Germaschewski authored
      If KBUILD_VERBOSE is not set in the environment, have it default
      to 1 (i.e. on)
      9d0ac54b
    • Kai Germaschewski's avatar
      kbuild: Clean up descending into subdirs · 78e9d59f
      Kai Germaschewski authored
      Rules.make now has three targets:
      o default (a.k.a first_rule): The actual build. Deciding whether
        to build built-in or modular or both is decided by
        $(KBUILD_MODULES) and $(KBUILD_BUILTIN) now, instead of using
        different targets
      o fastdep: doesn't actually dependencies anymore, only generates
        modversions
      o modules_install: Well, you guess what that does.
      
      Cleaned up descending, and no more differentiating between 
      $(subdir-y) and $(subdir-m). That means $(mod-subdirs) can
      go away now.
      78e9d59f
    • Kai Germaschewski's avatar
      kbuild: Use deep directory structure for include/linux/modules · 81e93fe6
      Kai Germaschewski authored
      We used to force the obvious deep structure of all objects which
      export symbols into a flat list in include/linux/modules. This
      initially caused the restriction the no two exporting objects could
      have the same name (Ever wondered why there's ksyms.c and
      i386_ksyms.c?)
      
      With the ALSA merge this restriction was mostly lifted by some hack,
      but some cases still don't work right (Hi XFS). As it's much cleaner
      to just use a normal tree under include/linux/modules, reflecting the
      source tree, we now do just that.
      81e93fe6
    • Kai Germaschewski's avatar
      kbuild: Make dependencies at compile time · 04bd7217
      Kai Germaschewski authored
      Making dependencies once up front is not ideal. For one, you don't need
      them initially, since when you don't have the .o file, you bet you have
      to build it no matter what the dependencies say - dependencies are about
      deciding when to *re*build.
      
      There's more reasons, like:
      o you don't even know which files you'll build, so you have to go over
        all files (even over drivers/{sbus,s390,...} on i386)
      o generated files don't exist yet, so you cannot pick up dependencies
        on them
      o even if dependencies are right initially, they change when you work on 
        your tree or patch it, and nobody will notice unless you run "make dep"
        explicitly again
      
      Anyway, gcc knows hows to emit a correct dependency list, so we just use
      that. Well, a little bit of hacking is necessary to remove the dependency
      on autoconf.h and put in individual CONFIG_WHAT_EVER dependencies instead,
      since otherwise changing one config option would cause everything to be
      rebuilt.
      
      I should add that I didn't come up with this all by myself, most work
      is actually done in gcc and there were discussions about using -MD on
      kbuild-devel way back, so I should mention Keith Owens and Michael
      Elizabeth Chastain, and probably others that I forgot, so I apologize
      just in case.
      04bd7217
    • Kai Germaschewski's avatar
      kbuild: Fix calling of scripts · d02c2b1f
      Kai Germaschewski authored
      We source some scripts, but still pass parameters to them, e.g.
      
      	. mk_version_h $@ $(KERNELRELEASE) $(VERSION) ...
      
      This does not work for all kinds of /bin/sh (it does for bash, that's
      why I did not notice).
      
      The fix is easy: Just mark the scripts executable and call instead of
      source them.
      
      Unfortunately, patch(1) doesn't understand about propagating chmod.
      bk does, so changing the tree isn't hard, and we introduce an explicit
      chmod a+x executed during the build for propagating this change into
      those trees which get "traditionally" patched up.
      d02c2b1f
    • Kai Germaschewski's avatar
      kbuild: Fix 'make some/dir/foo.lst' · 4a2fa6ce
      Kai Germaschewski authored
      Just use 'make some/dir/foo.lst' to produce mixed source code and
      assembly for debugging. (If the object gets linked in and you have
      a System.map, it'll relocate appropriately)
      
      Apart from the needed Makefile bits, also clean up the script
      "makelst".
      4a2fa6ce
    • Kai Germaschewski's avatar
      kbuild: Fix make -s (silent) and add a quiet mode · 00b454db
      Kai Germaschewski authored
      Suppress echoing of commands when using "make -s", so that make -s
      does indeed have the effect one would expect.
      
      Add a quiet mode, which will print not the entire command but only
      one line per rule. To turn it on, use
      
      	make KBUILD_VERBOSE=0 vmlinux/whatever
      
      or set KBUILD_VERBOSE=0 in your environment.
      
      For now, the verbose mode is default, which gives you the old behavior
      of printing all commands.
      
      The output in quiet mode is based on what Keith Owens' kbuild-2.5 does,
      I like, I did not want to invent yet another output format.
      00b454db
    • Kai Germaschewski's avatar
      kbuild: Split Makefile into needs / needs not .config · 77c83c75
      Kai Germaschewski authored
      The current top-level Makefile has a fundamental problem which
      makes "make oldconfig vmlinux" impossible:
      
      It includes .config, which is changed by "oldconfig". So after "oldconfig"
      .config has changed and the .config the Makefile had read is obsolete.
      make provides a mechanism to cope with this, it'll restart automatically 
      if any of the files it included changed, if you let it know that you
      changed it, just using a normal rule which has .config as its target.
      
      However, once you tell make that "make oldconfig" changes .config, you
      have another problem: oldconfig always uses .config to be remade, there's
      no mechanism to tell if it's up to date. So makes notices that .config
      has changed, restarts, makes oldconfig again, notices that .config has
      changed, restarts, ... you get the picture.
      
      The way to solve this is to do a proper two-stage approach: If you just
      say "make oldconfig", there's no need for the Makefile to even read the
      .config. If it does not, it won't restart and recurse infintely.
      So we divide the Makefile into two sections: One for targets which don't
      need the variables from .config, like *config, clean, mrproper and
      one section which does the actual build, which needs to know the
      CONFIG_ options.
      
      If one of the "noconfig" targets is given, we handle those, without
      reading .config. From there, we call make again, filtering out the already
      handled targets, to do the main work.
      
      The fact that this actually works correctly can be seen by trying
      "make vmlinux oldconfig" which will execute things in the right
      order - and this is not just nitpicking, it means that "-j" will
      get this case right, too.
      
      The $(CONFIGURATION) hack used to start "make config" automatically
      can go away now, too. Since we don't know which of make *config the
      user prefers, we'll just ask him call "make whatever-config" himself,
      instead of forcing "make config" on him.
      77c83c75
    • Tom Rini's avatar
      [PATCH] Cleanup i386 <linux/init.h> abuses · 50da7d0e
      Tom Rini authored
      The following patch cleans up the i386 usage of <linux/init.h>.
      This remove <linux/init.h> from <asm-i386/system.h> which did not need
      it, <asm-i386/highmem.h> which only had it due to an extern using
      __init, which is not needed.
      
      This adds <linux/init.h> to <asm-i386/bugs.h> which actually has
      numerous __init functions and adds <linux/init.h> to 9 files inside of
      arch/i386 which were indirectly including <linux/init.h> previously.
      50da7d0e
    • Russell King's avatar
      [PATCH] Allow mpage.c to build · ed913fe2
      Russell King authored
      When trying to build mpage.c for ARM, I get errors from bio.h since kdev_t
      isn't defined.  The following fixes this.
      
      (I fail to see how this can build for anyone as it currently stands; its
      probably something x86 specific buried in the asm-i386 includes.)
      ed913fe2
    • Stephen Rothwell's avatar
      [PATCH] fcntl_[sg]etlk() only need the file * · 167cd4df
      Stephen Rothwell authored
      Another simple part of a Matthew Wilcox patch.
      
      We do not need to pass the file descriptor to the fcntl_[sg]etlk
      functions, only the struct file * which we have already got
      from the file descriptor and verified.
      167cd4df
    • Stephen Rothwell's avatar
      [PATCH] fs/locks.c use list_del_init · 726efabd
      Stephen Rothwell authored
      Trivial part of a patch by Matthew Wilcox
      726efabd
    • Brian Gerst's avatar
      [PATCH] fs/inode.c list_del_init · b7a813cf
      Brian Gerst authored
      A few cases of list_del(x) + INIT_LIST_HEAD(x) crept in recently which
      can be replaced with list_del_init(x).
      b7a813cf
    • Martin Dalecki's avatar
      [PATCH] 2.5.20 IDE 85 · 856dd13d
      Martin Dalecki authored
       - Work a bit on the automatic CRC error recovery handling. System still hangs.
         But one thing for sure - we don't have to use any specialized irq handler for
         it.
      
       - Since ioctl don't any longer submit requests to the queue without
         rq->special set, we can safely remove args_error handling from
         start_request.
      
       - Make REQ_SPECIAL usage in ide-floppy obvious.
      
       - Use REQ_SPECIAL everywhere instead of REQ_DRIVE_ACB. This is actually a bit
         dangerous but should work as far as I can see.
      
       - Unfold the now not REQ_SPECIAL specific dequeing part of ide_end_drive_cmd().
         Turns out that we can thereafter remove the calls to ide_end_drice_cmd() at
         places where the request type isn't REQ_SPECIAL all any longer. (tcq.c)
      
      
       - After the above operation it turns out that there are just two places where
         ide_end_drive_cmd remains, namely: ata_error, task_no_data_intr
         drive_cmd_intr.
      
         We can avoid it by changing the logics in ata_error a slightly.
      
         So now just to cases remain where ide_end_drive_cmd remains used:
         drive_cmd_intr and task_no_data_intr.
      
       - Now looking  a bit closer we can realize that drive_cmd_intr and
         task_no_data_intr can be easly merged together, since the usage of
         task_no_data_intr implied taskfile.sector_number == 0.
      
       - Use one single ata_special_intr function for the handling of interrupts
         submitted through ide_raw_cmd.
      
       - Move the remaining artefacts of ide_end_drive_cmd directly to
         ata_special_intr. Oh we don't need to check for REQ_SPECIAL any longer there,
         since the context is already known.
      
       - Set the ata_special_intr handler and command type directly inside
         ide_raw_taskfile to save code.
      856dd13d
  3. 04 Jun, 2002 1 commit
  4. 05 Jun, 2002 4 commits
  5. 04 Jun, 2002 6 commits
    • Robert Love's avatar
      [PATCH] remove fsuser() · 5fb4864a
      Robert Love authored
      This patch removes fsuser().  Now both suser() and fsuser() are gone and
      all permission checks use an appropriate capable() call.
      5fb4864a
    • Robert Love's avatar
      [PATCH] remove suser() · 95c78cd5
      Robert Love authored
      Attached patch replaces the lone remaining suser() call with capable()
      and then removes suser() itself in a triumphant celebration of the glory
      of capable().  Or something. ;-)
      
      Small cleanup of capable() and some comments, too.
      95c78cd5
    • Martin Dalecki's avatar
      [PATCH] 2.5.20 IDE 84 · a73f75e2
      Martin Dalecki authored
       - Simplify ide_cmd_type_parse by removing the handling of commands which we
         never use.
      
       - Realize that pre_task_out_intr and pre_task_mulout_intr are semanticaly
         identical. Use only pre_task_out_intr(). This allowed us to
         eliminate the prehandler altogether.
      
       - Updated fix for misconfigured host chips by Vojtech Pavlik.
      
       - Be more permissive about ioctl handling to allow device type drivers to do
         they own checks.
      
       - ali14xx cleanups by Andrej Panin.
      
       - Unfold usage ide_cmd_type_parser in tcq.c code. This makes this operation
         local to ide-disk.c. Move it as well as the interrupt handlers used only for
         the handling of disk requests there too.
      
       - Guard against calling handler before the drive is ready for it in
         ata_taskfile()! Well this bug was there before, but right now we inform
         about it.
      
       - Unfold ide_cmd_type_praser in ide-disk.c. Merge the remaining bits of it with
         get_command. Well it's no more.
      
       - Move recal_intr to ide.c - the only place where it's used.
      
      This doesn't change the "mechanics" of the code but it makes it a lot more
      "obvious" what's going on.
      a73f75e2
    • Russell King's avatar
      [PATCH] fix 2.5.20 ramdisk · 0f65c90d
      Russell King authored
      2.5.20 seems to be incapable of executing binaries in a ramdisk-based
      root filesystem.  The ramdisk in question is an ext2fs, with a 1K
      block size loaded via the compressed ramdisk loader in do_mounts().
      
      It appears that, in the case of a 1K block sized filesystem, we attempt
      to read two 512-byte sectors into a BIO vector.  The first one is copied
      into the first 512 bytes.  The second sector, however, is copied over
      the first 512 bytes.  Obviously not what we really want.
      
      Rev. 2, slightly cleaned up:
      0f65c90d
    • Linus Torvalds's avatar
      Merge bk://ldm.bkbits.net/linux-2.5 · bee01166
      Linus Torvalds authored
      into home.transmeta.com:/home/torvalds/v2.5/linux
      bee01166
    • Linus Torvalds's avatar
      Fix extra parenthesis in the constant-address rwlock case. · 6c90d305
      Linus Torvalds authored
      Noted by Alexey Vyskubov
      6c90d305
  6. 03 Jun, 2002 1 commit
    • Patrick Mochel's avatar
      PCI driver mgmt: · 52d16b41
      Patrick Mochel authored
      - Make sure proper pci id is passed to probe()
      - make sure pci_dev->driver is set and reset on driver registration/unregistration
      - call remove_driver to force unload of driver on unregistration
      52d16b41