# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet v2.6.0 -> 1.1535 # drivers/net/8139too.c 1.75 -> 1.76 # arch/i386/kernel/process.c 1.57 -> 1.58 # arch/m68knommu/platform/68360/ints.c 1.5 -> 1.6 # include/asm-parisc/ioctl.h 1.2 -> 1.3 # arch/sparc/kernel/wuf.S 1.4 -> 1.5 # arch/sparc/kernel/sun4d_irq.c 1.15 -> 1.17 # arch/arm/kernel/irq.c 1.29 -> 1.30 # drivers/usb/media/Makefile 1.9 -> 1.10 # include/linux/proc_fs.h 1.27 -> 1.28 # arch/x86_64/kernel/pci-nommu.c 1.3 -> 1.4 # drivers/net/e100/e100_phy.c 1.15 -> 1.16 # include/linux/kernel.h 1.42 -> 1.43 # fs/nls/Kconfig 1.1 -> 1.2 # drivers/usb/media/Kconfig 1.5 -> 1.7 # drivers/scsi/libata-core.c 1.7.1.1 -> 1.13 # drivers/scsi/sata_sil.c 1.2 -> 1.3 # arch/i386/lib/usercopy.c 1.15 -> 1.16 # include/asm-parisc/unistd.h 1.9 -> 1.10 # arch/parisc/kernel/head64.S 1.2 -> 1.3 # include/asm-generic/cpumask_const_value.h 1.1 -> 1.2 # drivers/usb/storage/shuttle_usbat.c 1.19 -> 1.21 # drivers/usb/storage/protocol.c 1.12 -> 1.15 # arch/x86_64/kernel/traps.c 1.29 -> 1.30 # arch/x86_64/mm/fault.c 1.16 -> 1.18 # include/linux/pagemap.h 1.37 -> 1.38 # drivers/md/dm-ioctl-v4.c 1.10 -> 1.11 # drivers/char/watchdog/i810-tco.c 1.20 -> 1.21 # arch/sparc/kernel/setup.c 1.21 -> 1.22 # drivers/net/pci-skeleton.c 1.25.1.1 -> 1.27 # arch/parisc/kernel/ioctl32.c 1.15 -> 1.16 # include/linux/jiffies.h 1.8 -> 1.9 # drivers/input/serio/serio.c 1.20 -> 1.24 # include/linux/libata.h 1.4 -> 1.7 # drivers/usb/storage/jumpshot.c 1.20 -> 1.21 # arch/ia64/kernel/efi.c 1.27 -> 1.28 # arch/ia64/Makefile 1.61 -> 1.62 # include/asm-i386/processor.h 1.57 -> 1.58 # arch/sparc/kernel/irq.c 1.24 -> 1.25 # fs/file_table.c 1.28 -> 1.29 # include/linux/mm.h 1.133 -> 1.135 # arch/i386/kernel/cpu/common.c 1.25 -> 1.26 # drivers/parisc/dino.c 1.8 -> 1.9 # drivers/video/sis/init301.c 1.5 -> 1.6 # drivers/serial/8250.c 1.41 -> 1.42 # net/core/neighbour.c 1.20 -> 1.21 # arch/parisc/defconfig 1.7 -> 1.8 # lib/Makefile 1.29 -> 1.31 # drivers/scsi/hosts.c 1.95 -> 1.96 # arch/parisc/kernel/syscall_table.S 1.1 -> 1.2 # net/sched/sch_tbf.c 1.12 -> 1.13 # include/linux/i2c-id.h 1.14 -> 1.15 # include/asm-i386/ioctl.h 1.2 -> 1.3 # drivers/usb/serial/io_edgeport.c 1.51 -> 1.52 # drivers/ide/pci/piix.c 1.20 -> 1.21 # sound/oss/vidc.c 1.8 -> 1.9 # arch/i386/kernel/irq.c 1.45 -> 1.48 # arch/parisc/lib/lusercopy.S 1.2 -> 1.3 # mm/page_alloc.c 1.174 -> 1.176 # drivers/char/watchdog/pcwd.c 1.26 -> 1.27 # include/asm-ia64/spinlock.h 1.18 -> 1.19 # Documentation/watchdog/watchdog-api.txt 1.3 -> 1.4 # arch/parisc/kernel/inventory.c 1.4 -> 1.5 # arch/arm/mach-clps711x/time.c 1.3 -> 1.4 # drivers/usb/host/ohci-hcd.c 1.49 -> 1.50 # drivers/input/serio/i8042.c 1.32 -> 1.35 # arch/ia64/defconfig 1.20 -> 1.21 # arch/s390/kernel/setup.c 1.27 -> 1.28 # arch/parisc/kernel/firmware.c 1.2 -> 1.3 # arch/s390/kernel/syscalls.S 1.4 -> 1.5 # sound/oss/emu10k1/audio.c 1.19 -> 1.20 # kernel/fork.c 1.148 -> 1.149 # include/linux/sched.h 1.175 -> 1.176 # net/sched/sch_cbq.c 1.14 -> 1.15 # drivers/block/ll_rw_blk.c 1.221 -> 1.222 # arch/i386/kernel/vm86.c 1.27 -> 1.28 # kernel/sys.c 1.67 -> 1.68 # drivers/md/Kconfig 1.5 -> 1.6 # drivers/usb/core/hub.h 1.16 -> 1.17 # drivers/usb/storage/debug.c 1.11 -> 1.12 # drivers/base/platform.c 1.12 -> 1.13 # include/asm-ia64/mmu_context.h 1.15 -> 1.16 # include/asm-ia64/page.h 1.22 -> 1.23 # fs/dcache.c 1.63 -> 1.64 # include/linux/keyboard.h 1.4 -> 1.5 # include/asm-parisc/ucontext.h 1.1 -> 1.2 # arch/ia64/kernel/setup.c 1.63 -> 1.64 # mm/vmscan.c 1.173 -> 1.174 # arch/arm/boot/compressed/Makefile 1.15 -> 1.16 # arch/mips/kernel/irq.c 1.14 -> 1.16 # fs/proc/proc_misc.c 1.91 -> 1.92 # drivers/serial/sa1100.c 1.23 -> 1.24 # include/asm-x86_64/io_apic.h 1.8 -> 1.9 # arch/sparc/kernel/process.c 1.31 -> 1.33 # fs/proc/task_mmu.c 1.5 -> 1.6 # arch/sparc/Makefile 1.27 -> 1.28 # drivers/i2c/i2c-core.c 1.44 -> 1.45 # arch/i386/Kconfig 1.91 -> 1.93 # arch/h8300/Makefile 1.5 -> 1.6 # arch/ia64/kernel/ivt.S 1.23 -> 1.24 # drivers/base/node.c 1.15 -> 1.16 # net/ax25/ax25_in.c 1.12 -> 1.13 # net/sched/sch_dsmark.c 1.11 -> 1.12 # init/main.c 1.110 -> 1.113 # drivers/usb/storage/raw_bulk.h 1.3 -> (deleted) # drivers/scsi/sata_via.c 1.2 -> 1.3 # drivers/parisc/ccio-dma.c 1.13 -> 1.14 # arch/i386/kernel/Makefile 1.52 -> 1.53 # fs/stat.c 1.26 -> 1.27 # arch/arm/mm/cache-v4wt.S 1.2 -> 1.3 # drivers/usb/class/usblp.c 1.60 -> 1.64 # net/bluetooth/af_bluetooth.c 1.24 -> 1.25 # scripts/modpost.c 1.15 -> 1.16 # drivers/char/watchdog/machzwd.c 1.22 -> 1.23 # drivers/ide/pci/Makefile 1.9 -> 1.10 # arch/parisc/kernel/pacache.S 1.1 -> 1.2 # drivers/scsi/libata.h 1.3 -> 1.4 # drivers/usb/serial/io_fw_boot2.h 1.3 -> 1.4 # drivers/md/raid5.c 1.79 -> 1.80 # drivers/serial/sunsu.c 1.39 -> 1.40 # fs/ncpfs/Kconfig 1.1 -> 1.2 # drivers/pci/remove.c 1.1 -> 1.2 # include/asm-ia64/mca.h 1.10 -> 1.12 # arch/parisc/kernel/entry.S 1.12 -> 1.13 # arch/parisc/kernel/signal32.c 1.4 -> 1.5 # drivers/input/mouse/psmouse-base.c 1.36 -> 1.42 # net/sched/cls_api.c 1.6 -> 1.7 # drivers/serial/serial_core.c 1.74 -> 1.75 # drivers/net/pcmcia/3c574_cs.c 1.25 -> 1.26 # drivers/usb/core/message.c 1.38 -> 1.39 # include/asm-parisc/uaccess.h 1.4 -> 1.5 # arch/ia64/kernel/smpboot.c 1.40 -> 1.41 # drivers/usb/serial/io_fw_down2.h 1.3 -> 1.4 # include/asm-i386/mach-default/irq_vectors.h 1.7 -> 1.8 # arch/parisc/kernel/pdc_cons.c 1.7 -> 1.8 # include/linux/i2c-dev.h 1.9 -> 1.10 # drivers/usb/storage/usb.c 1.78 -> 1.80 # drivers/net/wireless/atmel.c 1.6 -> 1.7 # kernel/futex.c 1.36 -> 1.37 # include/linux/fs.h 1.274 -> 1.276 # include/asm-i386/timer.h 1.11 -> 1.12 # include/asm-generic/cpumask_up.h 1.3 -> 1.4 # drivers/char/watchdog/mixcomwd.c 1.17 -> 1.18 # drivers/net/tokenring/Kconfig 1.11 -> 1.12 # drivers/usb/image/scanner.c 1.71 -> 1.72 # drivers/net/pcnet32.c 1.43.1.1 -> 1.45 # arch/h8300/platform/h8300h/ints.c 1.6 -> 1.7 # drivers/ide/ide.c 1.104 -> 1.105 # sound/oss/via82cxxx_audio.c 1.35 -> 1.37 # arch/x86_64/ia32/Makefile 1.18 -> 1.19 # arch/i386/kernel/reboot.c 1.13 -> 1.14 # include/asm-ia64/pgtable.h 1.33 -> 1.35 # drivers/parisc/led.c 1.11 -> 1.12 # drivers/usb/serial/visor.c 1.73 -> 1.74 # arch/m68knommu/platform/5307/ints.c 1.3 -> 1.4 # arch/sparc64/kernel/ebus.c 1.17 -> 1.18 # arch/i386/kernel/mpparse.c 1.58 -> 1.59 # include/asm-ia64/uaccess.h 1.13 -> 1.14 # arch/parisc/kernel/unaligned.c 1.4 -> 1.5 # arch/parisc/kernel/Makefile 1.14 -> 1.15 # arch/m68knommu/platform/68328/ints.c 1.5 -> 1.6 # arch/x86_64/kernel/mpparse.c 1.14 -> 1.15 # drivers/ide/ide-tape.c 1.31 -> 1.32 # arch/i386/kernel/io_apic.c 1.82 -> 1.83 # arch/sparc64/defconfig 1.105 -> 1.106 # sound/core/pcm_native.c 1.42 -> 1.43 # drivers/net/e100/e100_config.c 1.13 -> 1.14 # arch/parisc/kernel/sys_parisc32.c 1.21 -> 1.22 # drivers/usb/storage/sddr55.c 1.9 -> 1.11 # mm/filemap.c 1.212 -> 1.213 # drivers/input/mouse/synaptics.c 1.9 -> 1.14 # arch/sparc64/kernel/setup.c 1.46 -> 1.47 # include/asm-ppc64/ioctl.h 1.2 -> 1.3 # arch/sparc/mm/fault.c 1.10 -> 1.12 # arch/arm/kernel/armksyms.c 1.23 -> 1.24 # include/asm-ia64/numa.h 1.11 -> 1.12 # drivers/isdn/i4l/isdn_ppp_ccp.c 1.13 -> 1.14 # arch/sh/kernel/irq.c 1.14 -> 1.15 # Documentation/DocBook/kernel-locking.tmpl 1.9 -> 1.10 # arch/arm/mm/cache-v4.S 1.2 -> 1.3 # include/linux/cpumask.h 1.1 -> 1.4 # arch/arm/Makefile 1.53 -> 1.54 # ipc/sem.c 1.24 -> 1.25 # fs/proc/proc_tty.c 1.8 -> 1.9 # include/linux/ide.h 1.76 -> 1.77 # arch/h8300/platform/h8s/ints.c 1.6 -> 1.7 # fs/exec.c 1.99 -> 1.101 # init/do_mounts.c 1.59 -> 1.61 # fs/binfmt_som.c 1.3 -> 1.4 # include/asm-parisc/dma-mapping.h 1.4 -> 1.5 # drivers/usb/storage/transport.c 1.85 -> 1.86 # drivers/usb/media/pwc-misc.c 1.6 -> 1.7 # mm/swap.c 1.54 -> 1.55 # arch/parisc/kernel/irq.c 1.19 -> 1.20 # arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c 1.4 -> 1.5 # drivers/scsi/libata-scsi.c 1.1 -> 1.5 # drivers/usb/image/scanner.h 1.40 -> 1.41 # drivers/char/keyboard.c 1.37 -> 1.38 # arch/parisc/kernel/time.c 1.13 -> 1.14 # net/sched/sch_prio.c 1.10 -> 1.11 # drivers/ide/setup-pci.c 1.19 -> 1.20 # include/asm-sparc/winmacro.h 1.2 -> 1.3 # include/linux/pci_ids.h 1.126 -> 1.128 # include/asm-x86_64/io.h 1.9 -> 1.10 # include/asm-ia64/system.h 1.42 -> 1.43 # drivers/md/linear.c 1.38 -> 1.39 # include/linux/console.h 1.9 -> 1.10 # arch/parisc/kernel/hardware.c 1.4 -> 1.5 # mm/shmem.c 1.141 -> 1.142 # arch/ia64/mm/init.c 1.53 -> 1.54 # drivers/usb/input/hiddev.c 1.40 -> 1.41 # drivers/char/watchdog/softdog.c 1.19 -> 1.20 # drivers/usb/gadget/zero.c 1.7 -> 1.8 # arch/sparc64/kernel/systbls.S 1.49.1.1 -> 1.51 # arch/x86_64/kernel/irq.c 1.18 -> 1.20 # arch/x86_64/ia32/sys_ia32.c 1.45 -> 1.46 # Documentation/networking/ip-sysctl.txt 1.17 -> 1.18 # include/asm-x86_64/a.out.h 1.1 -> 1.2 # arch/x86_64/kernel/pci-gart.c 1.23 -> 1.24 # drivers/net/sis900.c 1.47 -> 1.48 # arch/ppc64/kernel/irq.c 1.36 -> 1.38 # arch/parisc/kernel/cache.c 1.6 -> 1.7 # include/linux/usb.h 1.91 -> 1.92 # include/linux/usb_gadget.h 1.6 -> 1.7 # arch/sparc/mm/init.c 1.22 -> 1.25 # include/linux/input.h 1.39 -> 1.40 # drivers/usb/storage/protocol.h 1.7 -> 1.9 # drivers/ide/ide-cd.c 1.62 -> 1.63 # arch/x86_64/ia32/ia32entry.S 1.24 -> 1.26 # arch/ia64/pci/pci.c 1.37 -> 1.39 # fs/binfmt_elf.c 1.60 -> 1.63 # lib/parser.c 1.2 -> 1.3 # drivers/acpi/pci_irq.c 1.22 -> 1.23 # include/asm-ppc/ioctl.h 1.4 -> 1.5 # mm/memory.c 1.141 -> 1.142 # drivers/md/multipath.c 1.57 -> 1.58 # include/asm-arm/div64.h 1.2 -> 1.3 # drivers/scsi/sg.c 1.72 -> 1.74 # arch/ia64/kernel/ia64_ksyms.c 1.34 -> 1.35 # net/sched/sch_atm.c 1.14 -> 1.15 # drivers/usb/serial/pl2303.c 1.48 -> 1.50 # drivers/usb/media/pwc-ioctl.h 1.8 -> 1.9 # include/asm-arm/arch-pxa/time.h 1.5 -> 1.7 # include/linux/usb_ch9.h 1.3 -> 1.4 # fs/compat.c 1.17.1.1 -> 1.19 # arch/sparc/kernel/entry.S 1.17 -> 1.18 # drivers/md/dm.h 1.9 -> 1.10 # drivers/usb/core/hub.c 1.82 -> 1.83 # drivers/ide/Kconfig 1.32 -> 1.33 # include/linux/compat.h 1.14 -> 1.16 # arch/ia64/kernel/mca.c 1.45 -> 1.50 # drivers/net/e100/e100_main.c 1.86 -> 1.87 # include/linux/pci.h 1.108 -> 1.109 # drivers/input/mouse/synaptics.h 1.3 -> 1.4 # arch/ia64/kernel/iosapic.c 1.32 -> 1.33 # arch/i386/kernel/setup.c 1.102 -> 1.103 # arch/m68k/kernel/ints.c 1.6 -> 1.7 # drivers/char/watchdog/sa1100_wdt.c 1.3 -> 1.4 # include/asm-generic/cpumask_array.h 1.2 -> 1.3 # drivers/scsi/ata_piix.c 1.2 -> 1.3 # include/asm-sparc64/statfs.h 1.4 -> 1.5 # arch/parisc/kernel/pdc_chassis.c 1.2 -> 1.3 # drivers/isdn/eicon/Kconfig 1.1 -> 1.2 # arch/ia64/kernel/acpi.c 1.55 -> 1.57 # include/asm-arm/unaligned.h 1.2 -> 1.3 # arch/i386/kernel/time.c 1.43 -> 1.46 # drivers/media/video/video-buf.c 1.12 -> 1.13 # drivers/usb/storage/isd200.c 1.33 -> 1.34 # drivers/input/joydev.c 1.19 -> 1.20 # drivers/usb/storage/scsiglue.c 1.52 -> 1.53 # net/netrom/af_netrom.c 1.40 -> 1.42 # net/rose/af_rose.c 1.33 -> 1.36 # arch/parisc/kernel/real2.S 1.3 -> 1.4 # drivers/ide/arm/icside.c 1.10 -> 1.11 # drivers/ide/ide-dma.c 1.22 -> 1.24 # kernel/compat.c 1.22 -> 1.24 # drivers/usb/core/usb.c 1.143.1.2 -> 1.147 # arch/ppc64/mm/hugetlbpage.c 1.3 -> 1.4 # drivers/net/r8169.c 1.16.1.1 -> 1.18 # drivers/char/watchdog/wdt.c 1.22 -> 1.23 # drivers/ieee1394/dma.c 1.5 -> 1.6 # arch/ia64/mm/hugetlbpage.c 1.15 -> 1.17 # arch/sparc/kernel/traps.c 1.6 -> 1.8 # include/asm-generic/statfs.h 1.1 -> 1.2 # arch/i386/kernel/timers/timer_none.c 1.4 -> 1.5 # arch/sparc/kernel/windows.c 1.4 -> 1.5 # sound/oss/cmpci.c 1.27 -> 1.28 # mm/oom_kill.c 1.24 -> 1.25 # include/asm-ia64/statfs.h 1.3 -> 1.4 # drivers/md/raid1.c 1.73 -> 1.74 # drivers/usb/net/usbnet.c 1.76.1.1 -> 1.79 # fs/pipe.c 1.29 -> 1.30 # include/asm-ia64/intrinsics.h 1.9 -> 1.10 # arch/arm/mm/cache-v4wb.S 1.3 -> 1.4 # include/linux/percpu_counter.h 1.2 -> 1.3 # drivers/usb/serial/pl2303.h 1.9 -> 1.10 # drivers/md/raid0.c 1.39 -> 1.41 # drivers/input/input.c 1.40 -> 1.41 # drivers/usb/misc/Makefile 1.13 -> 1.14 # include/linux/sysctl.h 1.53 -> 1.54 # include/linux/list.h 1.39 -> 1.40 # include/linux/mmzone.h 1.45 -> 1.47 # fs/Kconfig 1.39 -> 1.40 # net/sched/sch_csz.c 1.11 -> 1.12 # fs/direct-io.c 1.35 -> 1.36 # drivers/pci/proc.c 1.36 -> 1.37 # drivers/usb/core/hcd.c 1.74 -> 1.75 # drivers/usb/input/hid-core.c 1.65 -> 1.67 # include/linux/serio.h 1.18 -> 1.21 # drivers/net/wan/cycx_drv.c 1.9 -> 1.10 # include/asm-arm/arch-shark/time.h 1.8 -> 1.9 # net/ipv6/ndisc.c 1.58 -> 1.60 # drivers/scsi/sata_svw.c 1.4 -> 1.5 # MAINTAINERS 1.174.1.5 -> 1.182 # arch/parisc/Kconfig 1.25 -> 1.26 # usr/gen_init_cpio.c 1.6 -> 1.7 # drivers/usb/class/usb-midi.h 1.4 -> 1.5 # arch/ia64/ia32/sys_ia32.c 1.83 -> 1.84 # drivers/usb/media/pwc.h 1.17 -> 1.18 # fs/proc/base.c 1.60 -> 1.63 # fs/nls/nls_base.c 1.12 -> 1.13 # sound/usb/usbaudio.h 1.17 -> 1.18 # arch/arm/boot/compressed/head-integrator.S 1.2 -> (deleted) # mm/highmem.c 1.46 -> 1.47 # net/sched/sch_htb.c 1.17 -> 1.18 # drivers/net/typhoon.c 1.8 -> 1.12 # drivers/net/pppoe.c 1.36 -> 1.38 # drivers/usb/class/cdc-acm.c 1.51 -> 1.52 # drivers/input/mouse/logips2pp.c 1.2 -> 1.4 # drivers/parisc/Kconfig 1.6 -> 1.7 # arch/sparc/kernel/asm-offsets.c 1.2 -> 1.3 # drivers/usb/class/audio.h 1.2 -> 1.3 # include/asm-mips/statfs.h 1.3 -> 1.4 # fs/udf/super.c 1.37 -> 1.38 # drivers/char/agp/alpha-agp.c 1.9 -> 1.10 # include/asm-i386/setup.h 1.6 -> 1.7 # drivers/char/watchdog/Kconfig 1.13 -> 1.15 # include/net/ax25.h 1.14 -> 1.15 # Makefile 1.440 -> 1.441 # include/asm-ia64/pal.h 1.8 -> 1.9 # drivers/parisc/superio.c 1.7 -> 1.8 # arch/arm/configs/shark_defconfig 1.15 -> 1.16 # include/asm-i386/irq.h 1.9 -> 1.10 # arch/sparc64/mm/hugetlbpage.c 1.9 -> 1.10 # arch/ia64/kernel/head.S 1.15 -> 1.16 # drivers/usb/serial/mct_u232.c 1.40 -> 1.41 # include/asm-i386/io_apic.h 1.14 -> 1.15 # drivers/usb/storage/Makefile 1.13 -> 1.14 # net/packet/af_packet.c 1.35 -> 1.36 # arch/i386/kernel/timers/timer_tsc.c 1.30 -> 1.31 # include/asm-ppc64/statfs.h 1.2 -> 1.3 # fs/dquot.c 1.68 -> 1.70 # sound/core/sound.c 1.33 -> 1.34 # arch/i386/kernel/timers/timer_cyclone.c 1.12 -> 1.13 # arch/x86_64/defconfig 1.28 -> 1.29 # net/bluetooth/bnep/core.c 1.22 -> 1.23 # include/asm-generic/cpumask_arith.h 1.2 -> 1.3 # include/asm-x86_64/statfs.h 1.2 -> 1.3 # fs/ncpfs/mmap.c 1.7 -> 1.8 # arch/x86_64/kernel/signal.c 1.18 -> 1.19 # include/linux/page-flags.h 1.42 -> 1.43 # arch/sparc/kernel/signal.c 1.24 -> 1.25 # drivers/char/vt_ioctl.c 1.31 -> 1.32 # arch/sparc/kernel/wof.S 1.4 -> 1.5 # drivers/scsi/sata_promise.c 1.13 -> 1.18 # CREDITS 1.101 -> 1.102 # drivers/pci/probe.c 1.49 -> 1.50 # drivers/input/mouse/logips2pp.h 1.2 -> 1.3 # drivers/char/watchdog/Makefile 1.8 -> 1.9 # arch/ia64/kernel/salinfo.c 1.4 -> 1.6 # include/linux/quota.h 1.24 -> 1.25 # include/net/pkt_cls.h 1.2 -> 1.3 # drivers/usb/net/Kconfig 1.12 -> 1.14 # drivers/char/drm/drmP.h 1.29 -> 1.30 # arch/x86_64/kernel/Makefile 1.26 -> 1.27 # drivers/usb/storage/raw_bulk.c 1.8 -> (deleted) # arch/i386/mm/init.c 1.54 -> 1.56 # arch/arm/mm/cache-v3.S 1.2 -> 1.3 # include/asm-parisc/statfs.h 1.2 -> 1.3 # arch/sparc/mm/sun4c.c 1.33 -> 1.34 # drivers/block/DAC960.c 1.70 -> 1.71 # drivers/block/DAC960.h 1.26 -> 1.27 # drivers/usb/media/pwc-if.c 1.39 -> 1.40 # drivers/usb/storage/unusual_devs.h 1.58 -> 1.69 # drivers/i2c/i2c-dev.c 1.38 -> 1.40 # arch/v850/kernel/irq.c 1.10 -> 1.11 # mm/slab.c 1.110 -> 1.112 # arch/h8300/Kconfig 1.10 -> 1.11 # arch/alpha/kernel/irq.c 1.25 -> 1.27 # drivers/md/dm.c 1.30 -> 1.31 # net/sched/sch_ingress.c 1.15 -> 1.16 # drivers/usb/serial/ftdi_sio.c 1.54 -> 1.55 # arch/x86_64/Kconfig 1.34 -> 1.36 # kernel/sched.c 1.225 -> 1.227 # drivers/input/keyboard/atkbd.c 1.39 -> 1.42 # crypto/tcrypt.c 1.28 -> 1.30 # arch/i386/kernel/timers/timer_hpet.c 1.3 -> 1.4 # init/Kconfig 1.28 -> 1.29 # drivers/usb/storage/sddr09.c 1.27 -> 1.32 # drivers/acpi/osl.c 1.42 -> 1.43 # arch/parisc/kernel/head.S 1.3 -> 1.4 # arch/ia64/kernel/gate.S 1.19 -> 1.20 # arch/um/kernel/irq.c 1.11 -> 1.12 # arch/ppc/kernel/irq.c 1.33 -> 1.35 # sound/oss/Kconfig 1.16 -> 1.17 # drivers/input/mouse/Kconfig 1.11 -> 1.12 # drivers/usb/serial/visor.h 1.22 -> 1.23 # arch/arm/mach-integrator/integrator_ap.c 1.18 -> 1.19 # arch/ia64/kernel/vmlinux.lds.S 1.38 -> 1.39 # arch/i386/kernel/timers/timer_pit.c 1.12 -> 1.13 # drivers/net/hamradio/scc.c 1.25 -> 1.26 # drivers/usb/serial/ftdi_sio.h 1.12 -> 1.13 # arch/ia64/mm/discontig.c 1.9 -> 1.10 # drivers/usb/host/ohci-dbg.c 1.23 -> 1.24 # arch/i386/kernel/acpi/boot.c 1.34 -> 1.35 # arch/parisc/kernel/sys_parisc.c 1.10 -> 1.11 # arch/sparc64/Kconfig 1.39 -> 1.40 # arch/ia64/kernel/mca_asm.S 1.12 -> 1.14 # arch/sparc/kernel/rtrap.S 1.9 -> 1.10 # kernel/exit.c 1.120 -> 1.121 # arch/ia64/kernel/irq.c 1.31 -> 1.33 # include/asm-ia64/acpi.h 1.11 -> 1.12 # fs/jbd/commit.c 1.41 -> 1.43 # arch/parisc/kernel/drivers.c 1.8 -> 1.9 # drivers/input/mouse/psmouse.h 1.3 -> 1.4 # Documentation/filesystems/Locking 1.45 -> 1.46 # drivers/video/fbmon.c 1.9 -> 1.10 # drivers/usb/host/uhci-hcd.c 1.47 -> 1.48 # drivers/pcmcia/i82365.c 1.46 -> 1.47 # arch/arm26/kernel/irq.c 1.4 -> 1.5 # fs/ext3/super.c 1.79 -> 1.81 # arch/arm/boot/compressed/head.S 1.19 -> 1.20 # include/linux/device.h 1.110 -> 1.111 # drivers/pci/Makefile 1.35 -> 1.36 # drivers/usb/serial/cyberjack.c 1.31 -> 1.32 # arch/arm/common/sa1111.c 1.32 -> 1.33 # drivers/char/watchdog/ib700wdt.c 1.18 -> 1.19 # crypto/tcrypt.h 1.15 -> 1.17 # net/ax25/af_ax25.c 1.33 -> 1.34 # arch/sparc/boot/Makefile 1.16 -> 1.17 # net/netrom/nr_dev.c 1.10 -> 1.11 # include/asm-x86_64/stat.h 1.2 -> 1.3 # include/asm-arm/kmap_types.h 1.1 -> 1.2 # arch/i386/mm/hugetlbpage.c 1.39 -> 1.40 # include/linux/nbd.h 1.20 -> 1.21 # arch/ia64/ia32/binfmt_elf32.c 1.18 -> 1.19 # arch/ia64/kernel/asm-offsets.c 1.2 -> 1.3 # arch/i386/kernel/i8259.c 1.25 -> 1.26 # drivers/net/bonding/bond_main.c 1.49 -> 1.50 # arch/sparc64/kernel/irq.c 1.35 -> 1.38 # arch/ia64/kernel/perfmon.c 1.67 -> 1.68 # drivers/usb/host/ohci-q.c 1.44 -> 1.45 # fs/Kconfig.binfmt 1.6 -> 1.7 # fs/locks.c 1.46 -> 1.47 # include/asm-arm/unistd.h 1.18 -> 1.19 # include/linux/efi.h 1.3 -> 1.4 # drivers/char/watchdog/indydog.c 1.8 -> 1.9 # drivers/usb/Makefile 1.48 -> 1.49 # drivers/usb/serial/mct_u232.h 1.3 -> 1.4 # arch/ia64/Kconfig 1.48 -> 1.52 # fs/compat_ioctl.c 1.11 -> 1.13 # arch/ia64/lib/Makefile 1.22 -> 1.23 # include/asm-ia64/sal.h 1.19 -> 1.21 # include/asm-sparc/thread_info.h 1.5 -> 1.6 # drivers/usb/misc/Kconfig 1.10 -> 1.11 # include/linux/compat_ioctl.h 1.10 -> 1.11 # fs/isofs/inode.c 1.36 -> 1.37 # drivers/usb/media/pwc-ctrl.c 1.15 -> 1.16 # net/bridge/br_netfilter.c 1.17 -> 1.18 # drivers/media/common/saa7146_i2c.c 1.8 -> 1.9 # include/asm-x86_64/hw_irq.h 1.7 -> 1.8 # sound/sound_core.c 1.20 -> 1.21 # drivers/usb/gadget/ether.c 1.9 -> 1.10 # arch/x86_64/ia32/ia32_signal.c 1.15 -> 1.17 # drivers/usb/serial/io_fw_down.h 1.3 -> 1.4 # arch/sparc64/kernel/pci_sabre.c 1.28 -> 1.29 # arch/parisc/kernel/processor.c 1.5 -> 1.6 # arch/arm/lib/div64.S 1.2.1.1 -> 1.5 # arch/parisc/kernel/signal.c 1.12 -> 1.13 # drivers/usb/net/pegasus.h 1.26 -> 1.27 # drivers/md/dm-table.c 1.25 -> 1.28 # drivers/md/dm-ioctl-v1.c 1.4 -> 1.5 # arch/parisc/kernel/smp.c 1.8 -> 1.9 # include/asm-s390/statfs.h 1.3 -> 1.4 # drivers/usb/storage/datafab.c 1.18 -> 1.19 # arch/cris/kernel/irq.c 1.12 -> 1.13 # include/asm-i386/hw_irq.h 1.25 -> 1.26 # drivers/serial/sunzilog.c 1.34 -> 1.38 # arch/parisc/kernel/process.c 1.12 -> 1.13 # drivers/usb/serial/io_fw_boot.h 1.3 -> 1.4 # arch/ia64/kernel/Makefile 1.26 -> 1.27 # arch/sparc/kernel/ptrace.c 1.15 -> 1.16 # include/asm-sparc/processor.h 1.15 -> 1.16 # arch/i386/pci/irq.c 1.31 -> 1.34 # drivers/acpi/Kconfig 1.26 -> 1.27 # fs/proc/generic.c 1.24 -> 1.25 # include/asm-i386/string.h 1.9 -> 1.11 # kernel/printk.c 1.28 -> 1.29 # drivers/usb/host/ohci.h 1.17 -> 1.18 # arch/parisc/kernel/parisc_ksyms.c 1.13 -> 1.14 # include/asm-i386/mach-default/mach_apic.h 1.28 -> 1.29 # drivers/char/drm/drm_vm.h 1.25 -> 1.26 # arch/sparc/kernel/etrap.S 1.4 -> 1.5 # drivers/acorn/char/i2c.c 1.8 -> 1.9 # arch/s390/kernel/compat_wrapper.S 1.3 -> 1.4 # include/asm-ia64/numnodes.h 1.3 -> 1.4 # include/asm-arm/arch-sa1100/time.h 1.8 -> 1.10 # arch/arm/kernel/calls.S 1.12 -> 1.13 # drivers/net/sis190.c 1.15.1.1 -> 1.17 # arch/parisc/kernel/traps.c 1.13 -> 1.14 # include/linux/parser.h 1.1 -> 1.2 # Documentation/kernel-parameters.txt 1.31 -> 1.33 # include/asm-arm/arch-ebsa285/time.h 1.8 -> 1.9 # drivers/usb/storage/debug.h 1.7 -> 1.8 # include/linux/videodev.h 1.20 -> 1.21 # (new) -> 1.1 include/asm-cris/cpumask.h # (new) -> 1.1 Documentation/MSI-HOWTO.txt # (new) -> 1.1 arch/ia64/configs/sn2_defconfig # (new) -> 1.1 drivers/usb/media/w9968cf.h # (new) -> 1.1 include/asm-i386/cpumask.h # (new) -> 1.1 arch/arm/configs/netwinder_defconfig # (new) -> 1.1 include/asm-ppc/cpumask.h # (new) -> 1.1 arch/parisc/kernel/signal32.h # (new) -> 1.1 drivers/usb/media/w9968cf_externaldef.h # (new) -> 1.1 include/asm-v850/cpumask.h # (new) -> 1.1 include/asm-arm/cpumask.h # (new) -> 1.1 drivers/usb/media/w9968cf_decoder.h # (new) -> 1.1 include/asm-m68k/cpumask.h # (new) -> 1.1 include/asm-sparc64/cpumask.h # (new) -> 1.4 drivers/usb/misc/legousbtower.c # (new) -> 1.1 include/asm-sh/cpumask.h # (new) -> 1.1 drivers/ide/pci/sgiioc4.c # (new) -> 1.1 lib/mask.c # (new) -> 1.1 include/asm-ppc64/cpumask.h # (new) -> 1.1 lib/int_sqrt.c # (new) -> 1.1 drivers/char/watchdog/w83627hf_wdt.c # (new) -> 1.1 include/asm-parisc/cpumask.h # (new) -> 1.1 include/asm-mips/cpumask.h # (new) -> 1.1 include/linux/pci_msi.h # (new) -> 1.1 Documentation/usb/w9968cf.txt # (new) -> 1.1 arch/i386/kernel/efi.c # (new) -> 1.1 drivers/usb/media/w9968cf.c # (new) -> 1.1 include/asm-x86_64/cpumask.h # (new) -> 1.1 include/asm-ia64/cpumask.h # (new) -> 1.1 arch/i386/kernel/efi_stub.S # (new) -> 1.1 arch/ia64/lib/dec_and_lock.c # (new) -> 1.1 include/asm-s390/cpumask.h # (new) -> 1.1 include/asm-h8300/cpumask.h # (new) -> 1.1 include/asm-alpha/cpumask.h # (new) -> 1.1 include/asm-sparc/cpumask.h # (new) -> 1.1 drivers/pci/msi.c # (new) -> 1.1 arch/parisc/configs/712_defconfig # (new) -> 1.1 include/asm-um/cpumask.h # (new) -> 1.1 arch/x86_64/ia32/ia32_aout.c # (new) -> 1.1 include/asm-generic/cpumask.h # (new) -> 1.1 include/asm-m68knommu/cpumask.h # (new) -> 1.1 include/asm-arm26/cpumask.h # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/12/17 torvalds@home.osdl.org 1.1496.7.29 # Linux 2.6.0 # -------------------------------------------- # 03/12/18 jgarzik@redhat.com 1.1496.3.8 # Merge redhat.com:/spare/repo/linux-2.5 # into redhat.com:/spare/repo/libata-2.5 # -------------------------------------------- # 03/12/17 davidm@tiger.hpl.hp.com 1.1508 # Merge tiger.hpl.hp.com:/data1/bk/vanilla/linux-2.5 # into tiger.hpl.hp.com:/data1/bk/lia64/to-linus-2.5 # -------------------------------------------- # 03/12/17 davem@nuts.ninka.net 1.1496.1.10 # [SPARC64]: On Sabre, only access PCI controller config space specially. # -------------------------------------------- # 03/12/18 rmk@flint.arm.linux.org.uk 1.1496.7.30 # Merge flint.arm.linux.org.uk:/usr/src/bk/linux-2.6 # into flint.arm.linux.org.uk:/usr/src/bk/linux-2.6-serial # -------------------------------------------- # 03/12/18 davem@nuts.ninka.net 1.1496.1.11 # Merge nuts.ninka.net:/disk1/davem/BK/sparcwork-2.5 # into nuts.ninka.net:/disk1/davem/BK/sparc-2.5 # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.1 # [PATCH] serio: rename serio_[un]register_slave_port to __serio_[un]register_port # # Input: rename serio_{register|unregister}_slave_port to # __serio_{register|unregister}_port to better follow # locked/lockless naming convention # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.2 # [PATCH] serio: possible race between port removal and kseriod # # Input: There is a possibility that serio might get deleted while there # are outstanding events involving that serio waiting for kseriod # to process them. Invalidate them so kseriod thread will just # drop dead events. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.3 # [PATCH] Add black list to handler<->device matching # # Input: Introduce an optional blacklist field in input_handler structure. # When loading a new device or a new handler try to match device # against handler's black list before doing match on required # attributes. # This allows to get rid of "surprises" in connect functions, IMO # connect should only fail when it physically can not connect, not # because it decides it does not like device. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.4 # [PATCH] Synaptics: code cleanup # # Input: Synaptics code cleanup and credit update. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.5 # [PATCH] serio: reconnect facility # # Input: serio_reconnect added. Similar to serio_rescan but gives driver # a chance to re-initialize keeping the same input device. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.6 # [PATCH] Synaptics: use serio_reconnect # # Input/Synaptics: # 1. Support for pass-through port moved from Synaptics driver to psmouse # itself, it is cleaner and should allow using it in other drivers if # needed. # 2. The driver makes use of new reconnect functionality in serio. It will # try to keep the same input device after resume or when it resets itself. # 3. If mouse is disconnected or other mouse plugged in while sleeping the # driver should correctly recognize that and create a new serio/input # device. # -------------------------------------------- # 03/12/18 petero2@telia.com 1.1496.17.7 # [PATCH] synaptics powerpro fix # # Made the packet checking code less strict, so that the driver works also for # touchpads that don't strictly follow the synaptics absolute protocol. # Problem reported by Anders Kaseorg using a PowerPro C 3:16 laptop. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.8 # [PATCH] Input: unregister i8042 port when writing to control register fails # # I think that if we can't write to the control register it's not less critical # than not having a free IRQ so we better unregister port in this case as well. # # Also logging moved a bit. # -------------------------------------------- # 03/12/18 arief_m_utama@telkomsel.co.id 1.1496.17.9 # [PATCH] psmouse pm resume fix # # I just want to share a little change that I've did to psmouse_pm_callback() # which without this, my synaptics touchpad would prevent my laptop (IBM # Thinkpad T30) from suspending. # -------------------------------------------- # 03/12/18 vojtech@suse.cz 1.1496.17.10 # [PATCH] Fixes for keyboard 2.4 compatibility # # I have two patches I'd like to get tested by a wider audience before # sending them to Linus for the 2.6 tree. # # The first one fixes an issue in current 2.6-test with AT keyboard repeat # rate setting, the second one makes setkeycodes/getkeycodes work the same # as 2.4, so that people can keep their setups. It also fixes japanese and # korean key handling. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.11 # [PATCH] input: fix atkbd_softrepeat # # Fix atkbd_softrepeat kernel command line parameter. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.12 # [PATCH] Input: add psmouse_proto parameter # # New parameter psmouse_proto to replace psmouse_noext. Allows to specify # highest PS/2 protocol extension that kernel has permission to negotiate # (bare|imps|exps). psmouse_noext marked as deprecated and emits a warning # when used. parameter parsing converted to the new scheme. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.13 # [PATCH] Input: implement resume methods # # - Implement resume methods using serio_reconnect facility # - Register i8042 with sysfs # - Register i8042 with older PM scheme to restore keyboard # and mouse for APM users # - Convert parameter handling to the new style # - Unregister port not only when there is no free IRQ but # also if the port fails to activate. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.14 # [PATCH] Input: add atkbd reconnect method # # Add reconnect method to atkbd to restore keyboard state after suspend (to # be called from i8042 resume function) # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.15 # [PATCH] Input: psmouse fixes # # - Remove psmouse_pm_callback since i8042 now has its own resume # handler which will issue reconnect request # - Do not close/open serio port in psmouse_reconnect since i8042 # should restore ports to the proper state before calling reconnect # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.16 # [PATCH] Input: add serio_[un]register_port_delayed to fix deadlock # # Add serio_[un]register_port_delayed to allow delayed execution of # register/unregister code (via kseriod) when it is not clear whether # serio_sem has been taken or not. Use in i8042.c to avoid deadlock # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.17 # [PATCH] Input: remove synaptics config option # # Remove Synaptics config option. Since mousedev was fixed with regard to # touchpads generating absolute events there should no troubles for users # migrating from older kernel or different hardware so we can have it always # compiled in. # -------------------------------------------- # 03/12/18 dtor_core@ameritech.net 1.1496.17.18 # [PATCH] Input: synaptics protocol discovery # # If Synaptics fails to activate or if disabled by psmouse_proto option try # other extended protocols as some touchpads may support them. # -------------------------------------------- # 03/12/19 marr@flex.com 1.1496.16.2 # [PATCH] Status Query On My MCT-U232 Patch # # Brief Patch Description: # # Fix a problem in the 'mct_u232' driver whereby output data gets held up in the # USB/RS-232 adapter for RS-232 devices which don't assert the 'CTS' signal. # # Background: # # The Belkin F5U109 is a 9-pin USB/RS-232 adapter that is supported by the # existing 'mct_u232' kernel module.  Recently, I've been testing it under the # 2.4.22 (Slackware 9.1) kernel and the 2.6.0-test9 kernel. # # I've connected a Garmin 'GPS35 TracPak' GPS receiver (RS-232 interface) and an # ordinary RS-232 external modem to my PC's USB port via the Belkin F5U109 # adapter. # # Problem: # # Although _reads_ from either of the RS-232 devices mentioned above work fine # via the Belkin adapter, _writes_ to the GPS receiver are not being seen by # the GPS.  Writes to the modem, however, work perfectly. # # Aside: The 'Linux USB Users' archives show that at least one other person # (circa May 2002) had the exact same problem I'm having, but it sounds like no # solution was ever determined because the person in question just bought a # different USB/RS-232 adapter. # # Investigation: # # Using the 'seyon' terminal emulator in Linux and a crude hardware RS-232 # "breakout box" that I hacked together, I've determined that the problem is # related to the RTS/CTS RS-232 hardware handshaking. # # After further investigation, I've concluded that RS-232 devices which do not # assert the 'Clear To Send' ('CTS') signal prevent the Belkin F5U109 adapter # from transmitting data to the RS-232 device when the current (version 1.1) # 'mct_u232' module is used. The data gets "queued up" (up to a point -- 16 # bytes, I think) in the adapter but never transmitted. # # Since this GPS receiver works perfectly (reads and writes) when connected to a # PC running W98se using the same Belkin adapter and the Belkin-supplied # Windows driver, the Linux driver became suspect. # # After some testing with SniffUSB, I found that the Windows driver sends a # couple of unique undocumented USB 'device requests' that the Linux driver # does not. As it turns out, the second of those 2 requests is critical in # making the adapter transmit data to a device which doesn't assert 'CTS'. # # For completeness, the Windows driver in use was determined from the 'Device # Manager', 'Driver File Details' page: # #    U2SPORT.VXD #    Provider: Magic Control Technology #    File version: 1.21P.0104 for Win98/Me # # Solution: # # My patch adds the 2 missing USB 'device request' commands right after a # baud-change command. This mimics the operation of the W98 driver. # # Unfortunately, after much testing, I found no other operation (besides a # baud-change request) under Windows that triggers either of these 2 'device # request' commands. This makes it impossible to fully document the behavior of # these requests, but I've made entries for them alongside the others in the # 'mct_u232.h' file. # # Purely for clarity, the patch also modifies various comments in 'mct_u232.h', # mostly to reflect proper sizes of the various 'USB Device Request' fields per # the USB 1.1 specification. # # The patch also updates the version number of the driver, corrects a minor # typographical error, and documents a difference in the length of the data in # a 'baud rate change' command for certain adapters which use a coded baud-rate # rather than the conventional RS-232 baud rate divisor. # # I've provided (tested) patches for both the 2.4.22 and the 2.6.0-test9 # kernels. # # Please note that the changes to 'mct_u232.h' apply to both 2.4.22 and # 2.6.0-test9 since that file has not changed between those kernel releases. # Nevertheless, I've included that (same) portion of the patch in both # attachments for simplicity. # # Bill Marr # -------------------------------------------- # 03/12/19 peterc@gelato.unsw.edu.au 1.1509 # [PATCH] ia64: enable out-of-tree compilation for IA64 # # -------------------------------------------- # 03/12/19 steiner@sgi.com 1.1510 # [PATCH] ia64: prevent buffer-overrun in acpi_numa_memory_affinity_init() # # The code in acpi_numa_memory_affinity_init that sorts the node_memblk # can overrun the array & clobber the memory that follows the end of the # array. The error will be seen only on systems that fill the # node_memblk array and only if SAL doesnt sort the entries in the SRAT. # -------------------------------------------- # 03/12/19 jbarnes@sgi.com 1.1511 # [PATCH] ia64: make cpu_to_node_map unsigned # # This small fix is needed for machines with more than 128 nodes. # -------------------------------------------- # 03/12/19 jbarnes@sgi.com 1.1512 # [PATCH] ia64: update sn2 MAINTAINERS file entry # # -------------------------------------------- # 03/12/19 jbarnes@sgi.com 1.1513 # [PATCH] ia64: make NODES_SHIFT a little biggger # # Make NODES_SHIFT larger to accomodate 256 node machines. # -------------------------------------------- # 03/12/19 bjorn.helgaas@hp.com 1.1514 # [PATCH] ia64: Fix PCI root bridge resources to handle prior allocations. # # (alloc_resources): Use insert_resource(), not request_resource(), to # allocate PCI root bridge windows. This fixes the problem # where root bridge window allocation fails because an early # driver (like VGA) has already allocated things. # -------------------------------------------- # 03/12/19 bjorn.helgaas@hp.com 1.1515 # [PATCH] ia64: Remove extraneous printks (we get the same information from ACPI). # # (iosapic_init): Remove extraneous printk. # (pci_acpi_scan_root): Remove extraneous printk. # -------------------------------------------- # 03/12/19 bjorn.helgaas@hp.com 1.1516 # [PATCH] ia64: Remove unused ACPI functions. # # Remove unused functions: # acpi_get_prt() # acpi_get_interrupt_model() # acpi_get_addr_space() # -------------------------------------------- # 03/12/19 bjorn.helgaas@hp.com 1.1517 # [PATCH] ia64: Force generic and hp kernels to use 16MB granules # # This forces the granule size to 16MB for HP zx1 and generic # kernels. HP sx1000 machines require this. # -------------------------------------------- # 03/12/19 bjorn.helgaas@hp.com 1.1518 # [PATCH] ia64: Prevent SAL calls from being preempted # # (SAL_CALL_REENTRANT): Disable preemption around the SAL call to # make sure we don't get rescheduled on a different CPU. # -------------------------------------------- # 03/12/19 jbarnes@sgi.com 1.1519 # [PATCH] ia64: initialize bootmem maps in reverse order # # The arch-independent bootmem code now requires that arches initialize # their bootmem maps in reverse order (in particular, from high to low # addesses), otherwise alloc_bootmem_pages_low() won't work. This change # makes the ia64 code do just that, so that machines without an IOMMU can # allocate their bounce buffers in low memory at early boot. It also adds # a sanity check to the early init code to make sure that each node has a # local data area, because if they don't, many things will break later on # and may be hard to track down. # -------------------------------------------- # 03/12/19 jbarnes@sgi.com 1.1520 # [PATCH] ia64: sn2 defconfig file # # As promised, here's a patch to add an sn2 defconfig file to get people # started with 2.6 kernels. I even turned on CONFIG_IA64_SGI_SIM support # to make Jack happy :) # -------------------------------------------- # 03/12/19 kaos@sgi.com 1.1521 # [PATCH] ia64: sync pal/sal/salinfo/mca with 2.4 code # # Forward port the recent changes to pal.h, sal.h, mca.h, salinfo.c and # mca.c from 2.4.23-rc2 to 2.6.0-test9. # # This converts 2.6 to use salinfo instead of printing CMC/CPE/MCA/INIT # records in the kernel. It makes the two kernel versions as close # together as possible. # -------------------------------------------- # 03/12/19 kaos@sgi.com 1.1522 # [PATCH] ia64: fix deadlock in ia64_mca_cmc_int_caller() # # smp_call_function() must not be called from interrupt context (can # deadlock on tasklist_lock). Use keventd to call smp_call_function(). # -------------------------------------------- # 03/12/19 tony.luck@intel.com 1.1523 # [PATCH] ia64: enable recovery from TLB errors # # Here's the updated version of the MCA TLB recovery patch. # -------------------------------------------- # 03/12/19 jgarzik@redhat.com 1.1496.3.9 # [libata] some cleanups suggested by Christoph # # * s/Scsi_Cmnd/struct scsi_cmnd/ # * remove incorrect FIXME comments related to checking return values # of certain SCSI mid layer functions. # -------------------------------------------- # 03/12/20 kaos@sgi.com 1.1524 # [PATCH] ia64: Convert cmc deadlock avoidance patch from 2.4 to 2.6 # # -------------------------------------------- # 03/12/20 bunk@fs.tum.de 1.1496.2.9 # [PATCH] fix some dependencies for TMS380TR=m # # Hi Jeff, # # similar to the 2.4 patch (originally by Rik) I sent, the trivial # patch below fixes some dependencies for TMS380TR=m . # # Please apply # Adrian # -------------------------------------------- # 03/12/21 rmk@flint.arm.linux.org.uk 1.1337.29.6 # [ARM] Ensure that /proc/uptime returns sensible figures. # # When we set xtime at boot from the RTC, we weren't setting the # monotonic time offset. This had the effect of making the uptime # rather large. # # We get around this problem by using the do_settimeofday() to set # the current time. do_settimeofday() knows about this issue, and # will apply the appropriate correction to the monotonic time offset # for us. # -------------------------------------------- # 03/12/21 dhylands@com.rmk.(none) 1.1337.29.7 # [ARM] Fix minor bug in bitwise expression. # # Patch from Dave Hylands. # # The integrator code should have tested bits in INTEGRATOR_SC_VALID_INT # but instead it performed a logical AND. # -------------------------------------------- # 03/12/21 rmk@flint.arm.linux.org.uk 1.1496.18.1 # [ARM] Merge current 2.6 into experimental tree. # -------------------------------------------- # 03/12/21 wesolows@foobazco.org 1.1496.1.12 # [sparc] Fix display errors on HIGHMEM and Zilog addresses. # -------------------------------------------- # 03/12/22 shemminger@osdl.org 1.1496.12.8 # [IPV6]: Build fix and dst entry leak in neighbour discovery. # - NPRINTK2 will not compile if ND_DEBUG set to 3 # - Missing dst_release in ndisc_send_rs if skb allocation fails. # -------------------------------------------- # 03/12/22 rmk@flint.arm.linux.org.uk 1.1496.18.2 # [ARM] Add new timer/clock/statfs/tgkill/utimes/fadvise syscalls. # -------------------------------------------- # 03/12/22 dsaxena@com.rmk.(none) 1.1496.18.3 # [ARM PATCH] 1732/1: Fix put_unaligned type in BE mode # # Patch from Deepak Saxena # # put_unaligned is defined as __put_unaligned_be() but we're missing the "__" at the beggining. # -------------------------------------------- # 03/12/22 nico@org.rmk.(none) 1.1496.18.4 # [ARM PATCH] 1729/1: workaround for PXA timer delay problem # # Patch from Nicolas Pitre # # ... as discussed on linux-arm-kernel. # -------------------------------------------- # 03/12/22 ch@com.rmk.(none) 1.1496.18.5 # [ARM PATCH] 1726/1: Add additional constants to km_type enum to match other platforms. # # Patch from Christopher Hoover # # Add additional constants to km_type enum to match other platforms. # # # # (I've forgotten what doesn't compile w/o this.) # # -------------------------------------------- # 03/12/23 wesolows@foobazco.org 1.1496.1.13 # [SPARC32]: Add myself as maintainer. # -------------------------------------------- # 03/12/24 woody@org.rmk.(none) 1.1496.18.6 # [ARM PATCH] 1736/1: Here is a working config file: the hard disk, ethernet, serial and sound are working OK, no modules. # # Patch from Woody Suwalski # # Here is a working config file: the hard disk, ethernet, serial and sound are working OK, no modules support, no initrd support. # -------------------------------------------- # 03/12/24 woody@org.rmk.(none) 1.1496.18.7 # [ARM PATCH] 1737/1: GNU assembler 2.12.90.0.1 on Debian aborts on "'" character # # Patch from Woody Suwalski # # GNU assembler 2.12.90.0.1 on Debian aborts on "'" character in the arch/arm/lib/div64.S file (in comments). # # # # Hence I have converted them into accepted English format ;-) # # # # Woody # # -------------------------------------------- # 03/12/24 ch@com.rmk.(none) 1.1496.7.31 # [ARM PATCH] 1724/1: Fix name of ttySA0 and ttySA1 under devfs # # Patch from Christopher Hoover # # ttySA[01] show up as [01] under devfs. # # # # this makes init/getty et al very unhappy. # # -------------------------------------------- # 03/12/24 mail@de.rmk.(none) 1.1496.18.8 # [ARM PATCH] 1718/1: vidc.c: remove vidc_mksound, add external reference clock # # Patch from Peter Teichmann # # vidc_mksound causes the kernel to crash badly when executed. As it does not do anything useful I did not take the time to find out why, but removed it. # # The vidc does have an external reference clock that is used to generate 44100/20050/10025kHz sample rates. The code is changed in a way that it uses that reference clock that can better approximate the desired clock. # # If we can approximate the desired rate to more than 1/256 accuracy, we return the desired rate instead of the real rate. This is to assist using some programs that for instance believe they need exacly 8kHz which we can not have, but we can have 8.018kHz which is pretty close so that nobody would notice the difference. # -------------------------------------------- # 03/12/24 ch@com.rmk.(none) 1.1496.18.9 # [ARM PATCH] 1720/1: SA-1111 IRQ fix (for OHCI USB HC) # # Patch from Christopher Hoover # # dev->irq and dev->skpcr_mask aren't initialized. this makes the sa-1111 bus glue for the ohci driver fail. # -------------------------------------------- # 03/12/24 rmk@flint.arm.linux.org.uk 1.1496.18.10 # [ARM] Fix a small typo in SA1100 time.h # -------------------------------------------- # 03/12/24 shemminger@osdl.org 1.1496.12.9 # [AF_PACKET]: Drop SKB route of packets queued to userspace. # -------------------------------------------- # 03/12/24 kaber@trash.net 1.1496.12.10 # [PKT_SCHED]: Fix module refcount and mem leaks in classful qdiscs. # # Create common routine, tcf_destroy(), that does all the work properly # in one centralized place. # -------------------------------------------- # 03/12/24 kaber@trash.net 1.1496.12.11 # [PKT_SCHED]: Remove backlog accounting from TBF, pass limit to default inner bfifo qdisc only. # -------------------------------------------- # 03/12/24 yoshfuji@linux-ipv6.org 1.1496.12.12 # [NET]: Fix mis-spellings in net/core/neighbour.c # -------------------------------------------- # 03/12/24 davem@nuts.ninka.net 1.1496.1.14 # Cset exclude: wesolows@foobazco.org|ChangeSet|20031222074047|57357 # -------------------------------------------- # 03/12/24 bdschuym@pandora.be 1.1496.12.13 # [BRIDGE]: Add 4 sysctl entries for bridge netfilter behavioral control: # bridge-nf-call-arptables - pass or don't pass bridged ARP traffic to # arptables' FORWARD chain. # bridge-nf-call-iptables - pass or don't pass bridged IPv4 traffic to # iptables' chains. # bridge-nf-filter-vlan-tagged - pass or don't pass bridged vlan-tagged # ARP/IP traffic to arptables/iptables. # -------------------------------------------- # 03/12/24 pe1rxq@amsat.org 1.1496.12.14 # [NET]: AX25, netrom, and rose bug fixes for 2.6.0 # # - Fix socket locking in ax25 # - Fix waitqueue handling bug in ax25 # - Use sock_orphan in ax25 # - Fix waitqueue handling bug in netrom and rose too # - Fix raw socket behavior in ax25 # -------------------------------------------- # 03/12/24 kartik_me@hotmail.com 1.1496.12.15 # [CRYPTO]: Clean up tcrypt module, part 1 # -------------------------------------------- # 03/12/24 erlend-a@ux.his.no 1.1496.12.16 # [CRYPTO]: Clean up tcrypt module, part 2 # -------------------------------------------- # 03/12/24 jmorris@redhat.com 1.1496.12.17 # [CRYPTO]: Allow tcrypt module to be unloaded. # -------------------------------------------- # 03/12/24 yoshfuji@linux-ipv6.org 1.1496.12.18 # [IPV6]: Do not update MTU by invalid value in RA message. # # Noticed by HIroaki Kago # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.17.19 # Add support for checking before-the-fact whether an IRQ is # already registered or not. The x86 PCI layer wants this for # its availability testing. # # Doing a request_irq()/free_irq() pair to check this condition # like we used to do can lock the machine if the irq happens to # be screaming. # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.17.20 # Release the mmap semaphore in the legacy 80386 "verify_area()" # if an error happens. # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.17.21 # Turn off UHCI interrupts at initialization. # # The BIOS may have left the USB controller in some strange # state, and we want to fully initialize it before we are # ready to handle interrupts. # -------------------------------------------- # 03/12/29 mingo@elte.hu 1.1496.17.22 # [PATCH] Fix context switch accounting # # Noted by Nick Piggin, fix based on a patch by Linus. # # I've done some additional cleanups: fixed a compilation warning on UP # and cleaned up the goto pick_next_task code. Moved the 'unlikely' to # the test as a whole. # # I've tested this patch and the context-switch stats look OK. # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.17.23 # Don't print out I/O error warnings for non-filesystem requests. # # The errors will be reported by the code that started the request, # and printing out "sector numbers" for special requests makes no # sense. # -------------------------------------------- # 03/12/29 jgarzik@redhat.com 1.1496.3.10 # Merge redhat.com:/spare/repo/linux-2.5 # into redhat.com:/spare/repo/libata-2.5 # -------------------------------------------- # 03/12/29 jgarzik@redhat.com 1.1496.2.10 # Merge redhat.com:/spare/repo/linux-2.5 # into redhat.com:/spare/repo/net-drivers-2.5 # -------------------------------------------- # 03/12/29 greg@kroah.com 1.1496.19.1 # Merge kroah.com:/home/linux/BK/bleed-2.5 # into kroah.com:/home/linux/BK/usb-new_drivers-2.6 # -------------------------------------------- # 03/12/29 wim@iguana.be 1.1496.17.24 # [PATCH] Watchdog update # # Kconfig: # Reflect new watchdog Documentation directory. # # [USB] hid blacklist addition: # Add the Berkshire Products USB PC Watchdog to the hid blacklist. # This to avoid problems with USB-Disconnects when the card feels it # should reboot... # -------------------------------------------- # 03/12/29 davidm@tiger.hpl.hp.com 1.1525 # ia64: hugepage_free_pgtables() bug-fix # # When there are two huge page mappings, like the two in the example # below, first one at the end of PGDIR_SIZE, and second one starts at # next PGDIR_SIZE (64GB with 16K page size): # # 8000000ff0000000-8000001000000000 rw-s # 8000001000000000-8000001010000000 rw-s # # Unmapping the first vma would trick free_pgtable to think it # can remove one set of pgd indexed at 0x400, and it went ahead # purge the entire pmd/pte that are still in use by the second # mapping. Now any subsequent access to pmd/pte for the second # active mapping will trigger the bug. We've seen hard kernel # hang on some platform, some other platform will generate MCA, # plus all kinds of unpleasant result. # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.2.11 # Merge bk://gkernel.bkbits.net/net-drivers-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.2.12 # Merge bk://gkernel.bkbits.net/libata-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/29 akropel1@rochester.rr.com 1.1496.19.2 # [PATCH] USB: Stop hiddev generating empty events # # hiddev is mistakenly returning empty hiddev_event structures for report # events. According to Documentation/usb/hiddev.txt, report events are # only sent when HIDDEV_FLAG_REPORT and HIDDEV_FLAG_UREF are both set. # Currently, report events from hid cause hiddev to generate empty # hiddev_event events when HIDDEV_FLAG_UREF is not set. # -------------------------------------------- # 03/12/29 steiner@sgi.com 1.1526 # [PATCH] ia64: fix ia64_ctx.lock deadlock # # I hit a deadlock involving the ia64_ctx.lock. The lock # may be taken in interrupt context to process an IPI from smp_flush_tlb_mm. # -------------------------------------------- # 03/12/29 arun.sharma@intel.com 1.1527 # [PATCH] ia64: ia32 sigaltstack() fix # # The attached patch fixes a bug introduced by the earlier patch to # handle the differences between ia32 and ia64 in the definition of # MINSIGSTKSZ. # -------------------------------------------- # 03/12/29 david-b@pacbell.net 1.1496.19.3 # [PATCH] USB: doc updates # # As more people have been using this API, the need for some # clarifications has (no surprise!) came up. # # Most significant is the halt processing, needed to make # Alan's "File Storage Gadget" (mass storage class, talks # to usb-storage and Windows) handle fault cases cleanly. # Gadget drivers can't halt IN endpoints until the FIFO is # emptied by the host ... virtually no hardware tries to # sequence the DATA and STALL packets by itself. # -------------------------------------------- # 03/12/29 david-b@pacbell.net 1.1496.19.4 # [PATCH] USB: gadget zero updates # # Small updates: # # - support TC86c001 (goku_udc) controller # - simplify the per-controller configuration # - add two vendor requests to test control-OUT # - some minor fixes # -------------------------------------------- # 03/12/29 david-b@pacbell.net 1.1496.19.5 # [PATCH] USB: ethernet gadget supports goku_udc # # This patch just adds TC86c001 (goku) UDC support to # the "ether.c" gadget driver. This hardware supports # a full speed CDC Ethernet interface. # -------------------------------------------- # 03/12/29 kaos@sgi.com 1.1528 # [PATCH] ia64: Avoid double clear of CMC/CPE records # # Credit to Ben Woodard . # -------------------------------------------- # 03/12/29 david-b@pacbell.net 1.1496.19.6 # [PATCH] USB: let USB_{PEGASUS,USBNET} depend on NET_ETHERNET # # Adrian Bunk wrote: # > I observed the following small problem in 2.6: # > # > - MII depends on NET_ETHERNET # > - USB_PEGASUS and USB_USBNET select MII, but they depend only on NET # > # > The patch below lets USB_PEGASUS and USB_USBNET depend on NET_ETHERNET # > instead of NET to fix this issue. # # Actually how about this one instead? The PEGASUS bit is the same. # The difference is that MII (and CRC32) are only attributed to the # driver code that needs those ... AX8817X needs both, ZAURUS just # needs CRC32. The core (which should eventually become a separate # module) shouldn't depend on those modules at all. # # Also both CDCETHER and AX8817X are marked as non-experimental; # I recall Dave Hollis submitted a patch to do that for AX8817X, # and CDCETHER now seems to have gotten enough success reports too. # -------------------------------------------- # 03/12/29 arnaud.quette@mgeups.com 1.1496.19.7 # [PATCH] USB: disable hiddev support for MGE UPS # # following my recent posts on libusb-devel and hidups, here's # a patch to disable hiddev support for MGE UPSs. It only # declares VID/PID as QUIRK_IGNORE in hid-core's blacklist. # This simply prevent hiddev to be loaded when plugging # an MGE UPS. # -------------------------------------------- # 03/12/29 tony.luck@intel.com 1.1529 # [PATCH] ia64: clean up MCA TLB error recovery code # # While backporting to 2.4 I noticed a few bits # of fluff that I'd introduced into 2.6. Clean # up the mess. # -------------------------------------------- # 03/12/29 davem@nuts.ninka.net 1.1496.1.15 # Merge nuts.ninka.net:/disk1/davem/BK/sparcwork-2.5 # into nuts.ninka.net:/disk1/davem/BK/sparc-2.5 # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.2.13 # Fix ATA 64-bit divides with CONFIG_LBD. # # Use "sector_div()" to do the division, that's what it # exists for. # -------------------------------------------- # 03/12/29 zaitcev@redhat.com 1.1496.1.16 # [SPARC]: Get sun4c functional again in 2.6.0 # # Move some elements of task_struct into thread_info so that # these elements are locked into the TLB in the trap handlers # and thus will not cause a watchdog reset. # -------------------------------------------- # 03/12/29 davem@kernel.bkbits.net 1.1496.1.17 # Merge davem@nuts.ninka.net:/disk1/davem/BK/sparc-2.5 # into kernel.bkbits.net:/home/davem/sparc-2.5 # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.2.14 # Merge bk://linuxusb.bkbits.net/usb-devel-2.6 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/29 davem@nuts.ninka.net 1.1496.20.1 # Merge nuts.ninka.net:/disk1/davem/BK/network-2.6 # into nuts.ninka.net:/disk1/davem/BK/net-2.6 # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.1.18 # Merge bk://kernel.bkbits.net/davem/sparc-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.1.19 # Merge bk://bk.arm.linux.org.uk/linux-2.6-exp # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/29 davem@kernel.bkbits.net 1.1496.21.1 # Merge davem@nuts.ninka.net:/disk1/davem/BK/compat-aio-2.5 # into kernel.bkbits.net:/home/davem/compat-aio-2.5 # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.1.20 # Merge bk://kernel.bkbits.net/davem/compat-aio-2.6 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/29 wesolows@foobazco.org 1.1496.22.1 # [SPARC32]: Enable KALLSYMS. # -------------------------------------------- # 03/12/29 wesolows@foobazco.org 1.1496.22.2 # [SPARC]: Fix serial console selection. # # Add a generic add_preferred_console() to printk.c so that other # platforms, such as MIPS for example, can sanely fix this problem # as well. # -------------------------------------------- # 03/12/29 webvenza@libero.it 1.1496.1.21 # [netdrvr sis900] add suspend/resume support # # The attached patch adds support for suspend/resume to the sis900 driver. # With this patch on resume the NIC is fully configured and operational, # before a module reload was needed because of the complete lack of # suspend/resume callbacks. # # I added two functions, sis900_suspend and sis900_resume, with their # pointers in struct pci_driver. A vector of 16 u32 was then needed to the # to keep PCI data during suspend. I added it in struct sis900_private. # I updated the revision number to reflect my changes. # Looking at the code I also killed three typos. # # The patch doesn't touch any other code. # # Since I don't know anything on ethernet drivers the rule 'works for me' # is fully valid. # # # # # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.1.22 # [netdrvr 8139too] Don't hold the lock across pci_set_power_state() - it can sleep # -------------------------------------------- # 03/12/30 jgarzik@redhat.com 1.1496.1.23 # [netdrvr e100] remove __devinit markers, fixing oops # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.1 # [PATCH] unshare_files # # From: Chris Wright # # Introduce unshare_files as a helper for use during execve to eliminate # potential leak of the execve'd binary's fd. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.2 # [PATCH] use new unshare_files helper # # From: Chris Wright # # Use unshare_files during binary loading to eliminate potential leak of # the binary's fd installed during execve(). As is, this breaks # binfmt_som.c # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.3 # [PATCH] add steal_locks helper # # From: Chris Wright # # Add steal_locks helper for use in conjunction with unshare_files to make # sure POSIX file lock semantics aren't broken due to unshare_files. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.4 # [PATCH] use new steal_locks helper # # From: Chris Wright # # Use the new steal_locks helper to steal the locks from the old files struct # left from unshare_files() when the new unshared struct files gets used. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.5 # [PATCH] fix unsigned issue with env_end - env_start # # From: Chris Wright # # Fix for CAN-2003-0462: A race condition in the way env_start and # env_end pointers are initialized in the execve system call and used in # fs/proc/base.c on Linux 2.4 allows local users to cause a denial of # service (crash). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.6 # [PATCH] fix suid leak in /proc # # From: Chris Wright # # Fix for CAN-2003-0501: The /proc filesystem in Linux allows local users to # obtain sensitive information by opening various entries in /proc/self # before executing a setuid program, which causes the program to fail to # change the ownership and permissions of those entries. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.7 # [PATCH] make /proc/tty/driver/ S_IRUSR | S_IXUSR for root only # # From: Chris Wright # # Fix for CAN-2003-0461: /proc/tty/driver/serial in Linux 2.4.x reveals the # exact number of characters used in serial links, which could allow local # users to obtain potentially sensitive information such as the length of # passwords. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.8 # [PATCH] futex uninlining # # text data bss dec hex filename # Before: 4674 1040 4100 9814 2656 kernel/futex.o # After: 4098 1176 4100 9374 249e kernel/futex.o # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.9 # [PATCH] ia32 Message Signalled Interrupt support # # From: long # # # Add support for Message Signalled Interrupt delivery on ia32. # # With a fix from Zwane Mwaikambo # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.10 # [PATCH] EFI support for ia32 # # From: Matt Tolentino # # Attached is a patch that enables EFI boot-up support in ia32 kernels. # # In order to continue to determine whether the kernel should initialize using # EFI tables, I've temporarily added a check on the LOADER_TYPE boot parameter. # Although I haven't requested that elilo be assigned an id for this yet, I've # used this to determine whether the kernel should use the EFI initialization # path as well as a check to see if the EFI_SYSTAB boot parameter contains # anything. If someone has a better suggestion for determining this, I'm # open... # # This patch also uses the existing ioremapping functions to map the efi tables # into kernel virtual address space. I've added an option such that I could # use Dave Hansen's boot_ioremap() before paging_init(). After paging_init, I # then remap the efi memmap using bt_ioremap for use later. This has # eliminated the need for several functions...thanks for the suggestions and # thanks for your help Dave. Still this could use a look-see. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.11 # [PATCH] compat_ioctl for i2c # # From: Benjamin Herrenschmidt # # I needed those for the G5 on ppc64, so here they are, I was only # able to test the SMBUS stuff though. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.12 # [PATCH] sqrt() fixes # # It turns out that the int_sqrt() function in oom_kill.c gets it wrong. # # But fb_sqrt() in fbmon.c gets its math right. Move that function into # lib/int_sqrt.c, and consolidate. # # (oom_kill.c fix from Thomas Schlichter ) # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.13 # [PATCH] scale the initial value of min_free_kbytes # # This tunable refers to the amount of free memory which the VM will attempt to # sustain. It is mainly needed for atomic allocations (eg, networking # receive). # # It is currently hardwired to 1024k, which is far too large for small machines # and too small for large machines. # # Rework it to be 128k on tiny machines and 16M on huge machines. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.14 # [PATCH] Use __GFP_REPEAT for cdrom buffer # # The cdrom driver does an order-4 allocation and the open will fail if that # allocation does not succeed. This happened to me on an unstressed 900MB # machine. # # So add the __GFP_REPEAT flag in there - this will cause the page allocator to # keep on freeing pages until the allocation succeeds. # # It can in theory livelock but in practice I expect it is OK: the user should # just stop running dbench or whatever it is which is gobbling all the memory # and the mount/open will then succeed. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.15 # [PATCH] make name_to_dev_t __init # # It calls __init functions anyway. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.16 # [PATCH] ext3 scheduling latency fix # # Sometimes kjournald has to refile a huge number of buffers, because someone # else wrote them out beforehand - they are all clean. # # This happens under a lock and scheduling latencies of 88 milliseconds on a # 2.7GHx CPU were observed. # # The patch forward-ports a little bit of the 2.4 low-latency patch to fix this # problem. # # Worst-case on ext3 is now sub-half-millisecond, except for when the RCU # dentry reaping softirq cuts in :( # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.17 # [PATCH] cmpci.c: remove pointless set_fs() # # It is doing a set_fs(KERNEL_DS) for no obvious reason. # # Spotted by margitsw@t-online.de (Margit Schubert-While) # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.18 # [PATCH] Fix dcache and icache bloat with deep directories # # This fixes the recently-reported "fsstress memory leak" problem. It has been # there since November 2002. # # shrink_dcache() has a heuristic to prevent the dcache (and hence icache) from # getting shrunk too far: it refuses to allow the dcache to shrink below # 2*nr_used. # # Problem is, _all_ non-leaf dentries (directories) count as used. So when you # have really deep directory hierarchies (fsstress creates these), nr_used is # really high, and there is no upper bound to the amount of pinned dcache. # # The patch just rips out the heuristic. This means that dcache (and hence # icache (and hence pagecache)) will be shrunk more aggressively. This could # be a problem, and tons of testing is needed - a new heuristic may be needed. # # However I am not able to reproduce the problem which cause me to add this # heuristic in the first place: # # Simple testcase: run a huge `dd' while running a concurrent `watch -n1 # cat /proc/meminfo'. The program text for `cat' gets loaded from disk once # per second. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.19 # [PATCH] NSL config fixes # # From: OGAWA Hirofumi # # - use "select" instead of "depend" # # - remove the unused SMB_NLS # # - remove unneeded "default y" of CONFIG_NLS # # - revert to postion of nls menu (middle of filessytem menus is strange) # # - fix "#ifdef CONFIG_NLS" on UDF (should this add new one to Kconfig?) # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.20 # [PATCH] Fix init_i82365 sysfs ordering oops # # From: Russell King # # This oops has been caused by the need to register the class before # registering any objects against it. Unfortunately, the class needs # to be registered asynchronously in a separate thread to avoid driver # model deadlock with yenta with cardbus cards inserted or standard # PCMCIA cards not being detected correctly due to a race. # # I think the only real solution is to remove the class_device_create_file # calls from all socket drivers. This is just a simple commenting out of # the calls, and should be suitable for the remainder of the -test kernels. # # Due to the number of cases that we're encountering with PCMCIA, I'm # beginning to wonder if the driver model could be fixed to be more kind # to PCMCIA by avoiding some of these ordering dependencies. None of this # would be a problem if the driver model would allow PCI device drivers to # register PCI devices while their probe or remove functions were executing. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.21 # [PATCH] Fix proc_pid_lookup vs exit race # # From: Manfred Spraul # # Fixes a race between proc_pid_lookup and sys_exit. # # - The inodes and dentries for /proc//whatever are cached in the dentry # cache. d_revalidate is used to protect against stale data: d_revalidate # returns invalid if the task exited. # # Additionally, sys_exit flushes the dentries for the task that died - # otherwise the dentries would stay around until they arrive at the end of # the LRU, which could take some time. But there is one race: # # - proc_pid_lookup finds a task and prepares new dentries for it. It must # drop all locks for that operation. # - the process exits, and the /proc/ dentries are flushed. Nothing # happens, because they are not yet in the hash tables. # - proc_pid_lookup adds the task to the dentry cache. # # Result: dentry of a dead task in the hash tables. # # The patch fixes that problem by flushing again if proc_pid_lookup notices # that the thread exited while it created the dentry. The patch should go # in, but it's not critical. # # # - task->proc_dentry must be the dentry of /proc/. That way sys_exit # can flush the whole subtree at exit time. proc_task_lookup is a direct # copy of proc_pid_lookup and handles /proc/<>/task/. It contains the # lines that set task->proc_dentry. This is bogus, and must be removed. # # This hunk is much more critical, because creates a de-facto dentry leak # (they are recovered after flushing real dentries from the cache). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.22 # [PATCH] Add `gcc -Os' config option # # From: Adrian Bunk # # Allow the kernel to be built with `-Os'. # # It requires CONFIG_EMBEDDED. This is to make it "hard to get at" because # one gcc version (3.2.x I think) from RH9 generates crashy kernels with this # option set. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.23 # [PATCH] Fix sysenter disabling in vm86 mode # # From: Brian Gerst # # The current code disables sysenter when first entering vm86 mode, but does # not disable it again when coming back to a vm86 task after a task switch. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.24 # [PATCH] serial console registration bugfix # # From: Bjorn Helgaas # # uart_set_options() can dereference a null pointer. This happens if you # specify a console that hasn't previously been setup by early_serial_setup(). # # For example, on ia64, the HCDP typically tells us about line 0, so we calls # early_serial_setup() for it. If the user specifies "console=ttyS3", we # machine-check when trying to follow the uninitialized port->ops pointer. # # It's not entirely clear to me whether we should return 0 or -ENODEV or # something. The advantage of returning zero is that if the user specifies # "console=ttyS0" and we just lack the HCDP, the console doesn't work as early # as usual, but it does start working after the serial driver detects the port # (though the baud/parity/etc from the command line are lost). Returning # -ENODEV seems to prevent it from ever working. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.25 # [PATCH] vmscan: reset refill_counter after refilling the inactive list # # zone->refill_counter is only there to provide decent levels of work batching: # don't call refill_inactive_zone() just for a couple of pages. # # But the logic in there allows it to build up to huge values and it can # overflow (go negative) which will disable refilling altogether until it wraps # positive again. # # Just reset it to zero whenever we decide to do some refilling. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.26 # [PATCH] Be verbose about the ia32 time source # # From: john stultz # # The patch arranges for each timesource type to have a name, and uses that to # tell the user which timesource is in use at bootup time. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.27 # [PATCH] Get modpost to work properly with vmlinux in a different directory # # From: "Bryan O'Sullivan" # # The current version of modpost breaks if invoked from outside the build # tree. This patch fixes that, and simplifies the code a bit while it's at # it. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.28 # [PATCH] Restore /proc/pid/maps formatting # # The seq_file conversion of /proc/pid/maps caused altered behaviour with # respect to 2.4.22. Before the conversion, spaces and tabs in filenames were # displayed verbatim. After the conversion they are escaped as \040, etc. # # Also, if the mmapped file has been unlinked the output appears as # # 40017000-40018000 rw-p 00000000 03:02 1425800 /home/akpm/foo\040(deleted) # # instead of # # 40017000-40018000 rw-p 00000000 03:02 1425800 /home/akpm/foo (deleted) # # This could break applications which parse /proc/pid/maps (one person has # reported this). # # The patch restores the 2.4.20 behaviour. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.29 # [PATCH] ia32 WP test cleanup # # From: Zwane Mwaikambo # # Make the test unconditional - we can always run it now we have fixmap # support. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.30 # [PATCH] Fix for more than 256 CPUs # # From: Paul Jackson # # The patch is needed to build NR_CPUS > 256. # # Without this fix, you get compile errors: # include/linux/cpumask.h: In function `next_online_cpu': # include/linux/cpumask.h:56: structure has no member named `val' # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.31 # [PATCH] Use NODES_SHIFT to calculate ZONE_SHIFT # # From: jbarnes@sgi.com (Jesse Barnes) # # Now that we have a proper NODES_SHIFT value, we need to use it to define # ZONE_SHIFT otherwise we'll spill over 8 bits if we have more than 85 nodes. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.32 # [PATCH] optimize ia32 memmove # # From: Manfred Spraul # # The memmove implementation of i386 is not optimized: it uses movsb, which is # far slower than movsd. The optimization is trivial: if dest is less than # source, then call memcpy(). markw tried it on a 4xXeon with dbt2, it saved # around 300 million cpu ticks in cache_flusharray(): # # oprofile, GLOBAL_POWER_EVENTS, count 100k # Before: # c0144ed1 : /* cache_flusharray total: 21823 0.0165 */ # 6 4.5e-06 :c0144f8e: cmp %esi,%ebx # 11 8.3e-06 :c0144f90: jae c0144f9e # 3 2.3e-06 :c0144f92: mov %ebx,%edi # 7305 0.0055 :c0144f94: repz movsb %ds:(%esi),%es:(%edi) # 201 1.5e-04 :c0144f96: add $0x10,%esp # # After: # c0144f1d : /* cache_flusharray total: 17959 0.0136 */ # 1270 9.6e-04 :c0144f1d: push %ebp # [snip] # 6 4.6e-06 :c0144fdc: cmp %esi,%ebx # 13 9.9e-06 :c0144fde: jae c0145000 # 2 1.5e-06 :c0144fe0: mov %edx,%eax # 1 7.6e-07 :c0144fe2: mov %ebx,%edi # 11 8.4e-06 :c0144fe4: shr $0x2,%eax # 1 7.6e-07 :c0144fe7: mov %eax,%ecx # 4129 0.0031 :c0144fe9: repz movsl %ds:(%esi),%es:(%edi) # 261 2.0e-04 :c0144feb: test $0x2,%dl # 27 2.1e-05 :c0144fee: je c0144ff2 # :c0144ff0: movsw %ds:(%esi),%es:(%edi) # 95 7.2e-05 :c0144ff2: test $0x1,%dl # 96 7.3e-05 :c0144ff5: je c0144ff8 # :c0144ff7: movsb %ds:(%esi),%es:(%edi) # 121 9.2e-05 :c0144ff8: add $0x1c,%esp # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.33 # [PATCH] Fix writev atomicity on pipe/fifo # # From: OGAWA Hirofumi # # Current writev() of pipe/fifo can be interleaved with data from other # processes doing writes even when the requests size is <= PIPE_BUF. These # writes should in fact be atomic. # # The readv() side is also supported for same behavior with read(). And it # is faster. # # readv/writev version of bw_pipe in LMbench # # 2.6.0-test9-bk12 # hirofumi@devron (i686-pc-linux-gnu)[1010]$ ./bw_pipe -m 4096 -M 5 # Pipe bandwidth: 45.53 MB/sec # hirofumi@devron (i686-pc-linux-gnu)[1009]$ ./bw_pipe -m 1024 -M 5 # Pipe bandwidth: 20.08 MB/sec # # 2.6.0-test9-bk12 + patch # hirofumi@devron (i686-pc-linux-gnu)[1001]$ ./bw_pipe -m 4096 -M 5 # Pipe bandwidth: 65.98 MB/sec # hirofumi@devron (i686-pc-linux-gnu)[1002]$ ./bw_pipe -m 1024 -M 5 # Pipe bandwidth: 32.19 MB/sec # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.34 # [PATCH] lockless semop # # From: Manfred Spraul # # attached is the lockless semop patch. I did another test run with # idle=poll on an pentium III, and it remained unchanged: 99.9% direct # fast path, 0.1% race with wakeup against writing the final result code: # # http://khack.osdl.org/stp/282936/environment/proc/slabinfo # # That means there is no immediate need to add the two-stage # implementation to finish_wait. # # It reduces the spinlock operations on the semaphore array spinlock by 1/3. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.35 # [PATCH] use alloc_percpu in percpu_counters # # From: Martin Hicks # # Once NR_CPUS exceeds about 300 ext2 and ext3 will not compile, because the # percpu counters in the superblocks are so huge that they cannot be kmalloced. # # Fix this by converting the percpu_counter mechanism to use alloc_percpu() # rather than an NR_CPUS-sized array. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.36 # [PATCH] find_busiest_queue() commentary fix # # From: Ingo Molnar # # Clarify a comment in the CPU scheduler. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.37 # [PATCH] fix SOUND_CMPCI Configure help entry # # From: Adrian Bunk # # the issue below is only a minor documentation fix, but it has confused # me when configuring a kernel for such a card. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.38 # [PATCH] eicon/ and hardware/eicon/ drivers using the same symbols # # From: Adrian Bunk # # The legacy eicon driver in drivers/isdn/eicon is the old one and will be # removed as soon as all features went to the new driver. Anyway this old # driver was never meant to be non-module. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.39 # [PATCH] seq_file version of /proc/interrupts # # From: corbet@lwn.net (Jonathan Corbet) # # This converts all architectures' /proc/interrupts implementation over to # seq_file. We need this for SMP machines with ridiculous numbers of CPUs and # if you convert one arch, you have to convert them all... # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.40 # [PATCH] Intel 440gx PCI IDs # # - Add missing PCI ID # # - Forward-port IRQ routing workaround from 2.4. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.41 # [PATCH] support centrino 1GHz # # From: Jeremy Fitzhardinge # # I've been getting quite a lot of people mailing me about this CPU. It # seems Toshiba has released a machine with it. It would be nice if this # patch gets into a kernel soonish. It's very low-impact. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.42 # [PATCH] document elevator= parameter # # From: Valdis.Kletnieks@vt.edu # # Nick wrote a nice as-iosched.txt file, but apparently nobody updated the # kernel-parameters.txt file... # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.43 # [PATCH] missing padding in cpio_mkfile in usr/gen_init_cpio.c # # From: Olaf Hering # # We need to update `offset' here so that the subsequent push_pad() (which # uses `offset') will do the right thing. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.44 # [PATCH] watchdog write() return value fixes # # From: gleb@nbase.co.il (Gleb Natapov) # # There is inconsistency in fops->write() implementation in different # watchdog drivers. Some of them return number of bytes written while others # return 1. # # I think the correct implementation should always return number of bytes # written (we examine all the buffer after all) otherwise "echo V > # /dev/watchdog" doesn't work as expected (it doesn't stop watchdog). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.45 # [PATCH] Minor bug fixes to the compat layer # # From: Arun Sharma # # - Several instances where we were using pid_t instead of uid_t # # - If the caller passed a NULL `oldact' pointer into sys_sigprocmask then # don't try to write the old sigmask there. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.46 # [PATCH] ide-tape update # # From: Bartlomiej Zolnierkiewicz , # Stuart Hayes # # - Check drive's write protect bit, try to return appropriate # errors when attempting to write a write-protected tape. # # - Moved "idetape_read_position" call in idetape_chrdev_open # after the "wait_ready" call. # # - Added IDETAPE_MEDIUM_PRESENT flag so driver would know # not to rewind tape after ejecting it. # # - Fixed bug with ide_abort_pipeline (it was deleting stages # from tape->next_stage to end, instead of from # new_last_stage->next (tape->next_stage was set to NULL # by idetape_discard_read_pipeline before calling!). # # - Made improvements to idetape_wait_ready. # # - Added a few comments here and there. # # - Made MTOFFL unlock tape drive door before attempting to eject. # # - Added fixes to get Seagate STT3401A Travan working: # Handle drives that don't support 0-length reads/writes increased timeout # (retension takes ~10 minutes before irq is returned). # Fixed request mode page packet command byte 3. # # Also remove code depending on NO_LONGER_REQUIRED to match 2.4.x (me). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.47 # [PATCH] PIIX5 Doesn't work on IA64 # # From: Peter Chubb # # The PIIX5 IDE controller on I2000 IA64 boxen using the 460GX chipset will # hang on startup if an ordinary harddrive is plugged into it (it seems to # workj for the LSI120 and the CDROM drives). # # This is because the 460GX chipset contains a PCI expanssion bridge that # works like the 450NX PXB, and has the same PCI ID (but a later revision). # The PIIX driver, to work around interactions between PIIX4 and the 450NX # PXB, tries to disable DMA. # # Unfortunately, the way it tries to disable DMA doesn't work, and the higher # layers think that DMA is still on, and so timeout waiting for DMA, and then # hang on bootup. # # A simple workaround is to tighten the check for the buggy chipset, as in # the attached patch. However, someone with more time (and who actually # *understands* the IDE subsystem) needs to fix the real bug as well. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.48 # [PATCH] Can't disable IDE DMA # # From: Peter Chubb # # If you try to disable IDE DMA from Kconfig, you'll end up with an undefined # symbol, ide_hwif_setup_dma(). # # The attached rather ugly patch fixes the problem by defining a dummy # function. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.49 # [PATCH] IDE MMIO fix # # From: Alan Cox # # IDE core code had the mmio==2 (ioremap) mode supported but two small changes # had been missed for ide-dma.c. Without this fix mmio IDE controllers bomb if # you have plenty of memory as it uses request_mem_region on an ioremap return. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.50 # [PATCH] IDE capability elevation fix # # From: Alan Cox # # Capability elevation bug in 2.6.0 IDE. Long fixed in 2.4.x, trivial to cure # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.51 # [PATCH] Add lib/parser.c kernel-doc # # From: Will Dyson # # Add documentation and comments to lib/parser.c and include/linux/parser.h # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.52 # [PATCH] cpumask.h reorg # # From: Paul Jackson # # Push the cpumask implementation from linux/cpumask.h into asm/cpumask.h, so # that ia64 can do special things without breaking sparc64. # # 1) Each arch has its own include/asm-/cpumask.h file # # 2) That arch-specific header file can include , # if it wants to make use of the generic cpumask implementation. # # 3) Using code should continue to include linux/cpumask.h, which # in turn includes asm/cpumask.h. Some common implementation # independent cpumask related items, such as the cpu_online_map, # are declared directly in linux/cpumask.h. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.53 # [PATCH] new /proc/irq cpumask format; consolidate cpumask display and input code # # From: Paul Jackson # # This patch is a followup to one from Bill Irwin. On Nov # 17, he had consolidated the half-dozen chunks of code # that displayed cpumasks in /proc/irq/prof_cpu_mask and # /proc/irq//smp_affinity into a single routine, which he # called format_cpumask(). # # I believe that Andrew Morton has accepted Bill's patch into # his 2.6.0-test10-mm1 patch set as the "format_cpumask" patch. # I hope that the following patch will replace Bill's patch. # I look forward to Bill's feedback on this patch. # # The following patch carries Bill's work further: # # 1) It also consolidates the input side (write syscalls). # 2) It adapts a new format, same on input and output. # 3) The core routines work for any multi-word bitmask, # not just cpumasks. # 4) The core routines avoid overrunning their output # buffers. # # Note esp. for David Mosberger: # # The small patch I sent you and the linux-ia64 list # yesterday entitled: "check user access ok writing # /proc/irq//smp_affinity" for arch ia64 only is # _separate_ from the following patch. Neither presumes the # other. However, they do collide on one line. Last one in # is a Monkey's Uncle and will need an updated patch from me # (or otherwise need to resolve the one obvious collision). # # Details of the following patch: # # Both the display and input of cpumasks on 9 arch's are # consolidated into a single pair of routines, which use the # same format for input and output, as recommended by Tony # Luck. The two common routines work on any multi-word bitmask # (array of unsigned longs). A pair of trivial inline wrappers # cpumask_snprintf() and cpumask_parse() hide this generality # for the common case of cpumask input and output. # # My real motivation for consolidating this code will become # visible later - when I seek to add a nodemask_t that resembles # cpumask_t (just a different length). These common underlying # routines will be used there as well, following up on a suggestion # of Christoph Hellwig that I investigate implementing nodemask_t # as an ADT sharing infrastructure with cpumask_t. However, I # believe that this patch stands on its own merit, consolidating # a couple hundred lines of duplicated code, and making the # cpumask display format usable on very large systems. # # There are two exceptions to the consolidation - the alpha and # sparc64 arch's manipulate bare unsigned longs, not cpumask_t's, # on input (write syscall), and do stuff that was more funky than # I could make sense of. So the input side of these two arch's # was left as-is. I'd welcome someone with access to either of # these systems to provide additional patches. # # The new format consists of multiple 32 bit words, separated by # commas, displayed and input in hex. The following comment from # this patch describes this format further: # # * The ascii representation of multi-word bit masks displays each # * 32bit word in hex (not zero filled), and for masks longer than # * one word, uses a comma separator between words. Words are # * displayed in big-endian order most significant first. And hex # * digits within a word are also in big-endian order, of course. # * # * Examples: # * A mask with just bit 0 set displays as "1". # * A mask with just bit 127 set displays as "80000000,0,0,0". # * A mask with just bit 64 set displays as "1,0,0". # * A mask with bits 0, 1, 2, 4, 8, 16, 32 and 64 set displays # * as "1,1,10117". The first "1" is for bit 64, the second # * for bit 32, the third for bit 16, and so forth, to the # * "7", which is for bits 2, 1 and 0. # * A mask with bits 32 through 39 set displays as "ff,0". # # The essential reason for adding the comma breaks was to make # the long masks from our (SGI's) big 512 CPU systems parsable by # humans. An unbroken string of 128 hex digits is pretty difficult # to read. For those who are compiling systems with CONFIG_NR_CPUS # of 32 or less, there should be no visible change in format. # # There are of course a thousand possible output formats that # meet similar criteria. If someone wants to lobby for and seek # consensus behind another such format, that's fine. Now that # the format is consolidated into a single pair of routines, # it should be easy to adapt whatever we choose. # # Internally, the display routine uses snprintf to track the # remaining space in its output buffer, to avoid the risk of # overrunning it. # # A new file, lib/mask.c, is added to the lib directory, to # hold the two common routines. I anticipate adding a few more # common routines for generic support of multi-word bit masks to # lib/mask.c, in subsequent patches that will add a nodemask_t # type as an ADT sharing implementation with cpumask_t. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.54 # [PATCH] Add support for SGI's IOC4 chipset # # From: Aniket Malatpure # # Adds support for the IOC4 IDE part. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.55 # [PATCH] Remove CLONE_FILES from init kernel thread creation # # From: James Morris # # The patch below removes the CLONE_FILES flag from the kernel_thread() call # which starts init. # # This is to prevent other kernel threads from sharing file descriptors # opened by init (try 'lsof /dev/initctl' on a 2.6 system :-). # # The reason this patch is being proposed is so that usermode helper apps # launched via kernel threads (e.g. modprobe, hotplug) do not then inherit # any such file descriptors. This is not a problem in itself so far (other # than being messy), but it is a problem for SELinux, which will otherwise # need to grant access to /dev/initctl by modprobe and hotplug, a somewhat # undesirable scenario. # # As far as I can tell, there is no reason why init needs to be spawned with # CLONE_FILES. Please let me know if there are any objections to the # change, which I would like to propose for 2.6.0+ as a cleanup. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.56 # [PATCH] pagefault accounting fix # # From: William Lee Irwin III # # Our accounting of minor faults versus major faults is currently quite wrong. # # To fix it up we need to propagate the actual fault type back to the # higher-level code. Repurpose the currently-unused third arg to ->nopage # for this. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.57 # [PATCH] fix oops in proc_kill_inodes() # # proc_kill_inodes() walks the s_files list, playing with ->f_dentry. # # But there is a window in which __fput() will leave a file on that list with a # null f_dentry and f_vfsmnt. # # I'm not sure it was ever confirmed that this fixed the reported oops, but it # seems much better to set those fields to null _after_ removing the filp from # the list. # # (Actually, there's no need to null those pointers out at all. But whatever; # it caught a bug). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.58 # [PATCH] remove lock_kernel() from proc_bus_pci_lseek() # # Remove pointless lock_kernel(), replace with the standard-but-still-odd # i_sem-based lseek locking. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.59 # [PATCH] remove include recursion from linux/pagemap.h # # From: Arnaldo Carvalho de Melo # # pagemap.h, do not include thyself. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.60 # [PATCH] ext3: bd_claim for journal device # # From: Neil Brown # # Change ext3 to run bd_claim() against external journal devices. It is # significant only for those who have ext3 journals on a separate device, and # gets exclusive access to that device. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.61 # [PATCH] dm and bounce buffer panic fix # # From: Mark Haverkamp # # About three weeks ago markw at osdl posted a mail about a panic that he # was seeing: # # http://marc.theaimsgroup.com/?l=linux-kernel&m=106737176716474&w=2 # # I believe what is happening, is that the dm __clone_and_map function is # generating bio structures with the bi_idx field non-zero. When # __blk_queue_bounce creates a new bio with bounce pages, it sets the bi_idx # field to 0 rather than the bi_idx of the original. This causes trouble since # bv_page pointers will be dereferenced later that are zero. The following # uses the original bio structure's bi_idx in the new bio structure and in # copy_to_high_bio_irq and bounce_end_io. # # This has cleared up the panic when using the volume. # # (acked by Joe Thornber) # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.62 # [PATCH] statfs64 fix # # From: Andi Kleen # # It fixes the statfs64 emulation on x86-64. The problem is that x86-64 # needs an __attribute__((aligned)) on the compat_statfs64 structure. The # conclusion last time this was discussed was that the structure should be # duplicated. # # Essentially it is the old shared structure copied to every user and x86-64 # uses __attribute__((packed)). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.63 # [PATCH] Add a.out support for x86-64 # # From: Andi Kleen # # Add 32bit a.out support for x86-64. # # Not exactly an important bug fix, but maybe it will help someone. This # should increase the current 98% compatibility to i386 to perhaps 98.1% @) # # I tested an old a.out SuSE 4.2 installation in chroot and it worked. It # also ran some very old linux binaries from '92 found on ftp.funet.fi. The # only program that didn't was the SuSE a.out GNU emacs, but I was too lazy # to track that down. Core dumps are not supported. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.64 # [PATCH] Critical x86-64 IOMMU fixes for 2.6.0 # # From: Andi Kleen # # Please consider applying this patch, I would consider it critical for x86-64. # # The 2.6.0 x86-64 IOMMU code unfortunately had a few problems, leading # to non booting systems and in a few cases to data corruption. # # It fixes a two serious bugs in handling special kinds of scatter gather # lists in pci_map_sg. # # AGP was completely broken with IOMMU because of a wrong #ifdef. # Fix that. # # One TLB flush optimization I did a long time ago seems to break on # some 3ware boards (who require IOMMU because they don't support 64bit # addresses). The breakage lead to data corruption. This patch diables # the optimization for now and fixes a potential SMP race in the flush # code too. The TLB flush is done in a slower, but more reliable way # now too. # # This patch fixes them. Please consider applying, because some of these # problems hit quite many people. # # This also disables the IOMMU_DEBUG in the defconfig. A lot of people # were using the IOMMU when they didn't need to, which multiplied the # problems. # # IOMMU merge is disabled for now. This was an experimental optimization # which helped with some block devices, but for production it seems to # be better to disable it for now because there are some questionable # corner cases when the IOMMU aperture fragments. The same is done # for IOMMU SAC force, which was related to that. # # i386 has quite broken semantics for pci_alloc_consistent(). It uses # the standard device DMA mask instead of the consistent mask. Make us # bug-to-bug compatible here. This fixes problems with some sound # drivers that don't support full 32bit addressing. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.65 # [PATCH] Fix CPUID compilation on x86-64 # # From: Andi Kleen # # A lot of people have run into this: the x86-64 cpuid driver didn't # compile as module. # # Using a kludge suggested by Sam Ravnsborg. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.66 # [PATCH] Fix sysrq-t on x86-64 # # From: Andi Kleen # # From Badari Pulavarty # # Without this sysrq-t shows the same backtrace for all processes on x86-64 # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.67 # [PATCH] Fix 32bit truncate on x86-64 # # From: Andi Kleen # # Another potential data corruption fix. # # The 32bit truncate64 on x86-64 did silently truncate # offsets >32bit. That broke mysql for example. Fix that. # # From Chris Wilson # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.68 # [PATCH] Add more paranoid checking in x86-64 prefetch checker # # From: Andi Kleen # # Make sure we never access anything in kernel mapping while # doing the prefetch workaround checks on x86-64. # # Originally suggested by Jamie Lockier. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.69 # [PATCH] Merge i386 fix for page fault to x86-64 # # From: Andi Kleen # # Merge the i386 fix for the page fault from Linus to x86-64 # (I'm not actually sure what it fixes, but if it's good for 32bit # it is likely good for 64bit too) # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.70 # [PATCH] Signal fixes for x86-64 # # From: Andi Kleen # # Merge signal race fixes from i386 to x86-64. # # Fix a bug in system call restart, noted by John Blackwood. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.71 # [PATCH] Don't panic in mpparse on x86-64 # # From: Andi Kleen # # Merge i386 fix. Don't panic in MP table parsing when the table is bad. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.72 # [PATCH] Fix 32bit siginfo problems on x86-64 # # From: Andi Kleen # # 32bit siginfo would sometimes get passed incorrectly on x86-64. This # change fixes the conversion function to be a bit dumber, but more # correct. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.73 # [PATCH] remove mm->swap_address # # From: William Lee Irwin III # # This field is 100% unused. This patch removes it. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.74 # [PATCH] sis comparison / assignment operator fix # # From: Geoffrey Lee # # This fixes what seems to be an obvious = vs == bug in the init301.c sis # file. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.75 # [PATCH] Fix possible oops in vfs_quota_sync() # # From: Jan Kara # # I'm sending you a fix of possible Oops in vfs_quota_sync(). Actually # nobody has run into that I found it when I was looking through the code. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.76 # [PATCH] Ext3+quota deadlock fix # # From: Jan Kara # # here's patch which should fix deadlock with quotas+ext3 reported in 2.4 # (the same problem existed in 2.6 but nobody found it). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.77 # [PATCH] BINFMT_ELF=m is not an option # # From: glee@gnupilgrims.org # # I think Adrian had forgotten to update the help text. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.78 # [PATCH] md: Limit max_sectors on md when merge_bvec_fn defined on underlying device. # # From: NeilBrown # # As no md personalities honour the merge_bvec_fn of underlying devices, # we must make sure never to submit a bio larger than 1 page when a # merge_bvec_fn is defined. # # raid5 already does this (it never submits bios larger than one page). # With this patch, all other raid personalities limit their # max_sectors when a merge_bvec_fn is present. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.79 # [PATCH] md: set ra_pages for raid0/raid5 devices properly. # # From: NeilBrown # # stripe to be effective. This patch sets ra_pages # appropriately. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.80 # [PATCH] Erronous use of tick_usec in do_gettimeofday # # From: Joe Korty # # do_gettimeofday() is using tick_usec which is defined in terms of USER_HZ # not HZ. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.81 # [PATCH] fix ELF exec with huge bss # # From: Roland McGrath # # The following test program will crash every time if dynamically linked. # I think this bites all 32-bit platforms, including 32-bit executables on # 64-bit platforms that support them (and could in theory bite 64-bit # platforms with bss sizes beyond the bounds of comprehension). # # volatile char hugebss[1080000000]; # main() { printf("%p..%p\n", &hugebss[0], &hugebss[sizeof hugebss]); # system("cat /proc/$PPID/maps"); # hugebss[sizeof hugebss - 1] = 1; # return 23; # } # # The problem is that the kernel maps ld.so at 0x40000000 or some such place, # before it maps the bss. Here the bss is so large that it overlaps and # clobbers that mapping. I've changed it to map the bss before it loads the # interpreter, so that part of the address space is reserved before ld.so's # mapping (which doesn't really care where it goes) is done. # # This patch also adds error checking to the bss setup (and interpreter's bss # setup). With the aforementioned change but no error checking, "ulimit -v # 65536; ./hugebss" will crash in the store after the `system' call, because # the kernel will have failed to allocate the bss and ignored the error, so # the program runs without those pages being mapped at all. With this change # it dies with a SIGKILL as for a failure to set up stack pages. It might be # even better to try to detect the case earlier so that execve can return an # error before it has wiped out the address space. But that seems like it # would always be fragile and miss some corner cases, so I did not try to add # such complexity. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.82 # [PATCH] O_DIRECT memory leak fix # # From: Badari Pulavarty # # I found the problem with O_DIRECT memory leak. # # The problem is, when we are doing DIO read and crossed the end of file - we # don't release referencess on all the pages we got from get_user_pages(). # (since it is a success case). # # The fix is to call dio_cleanup() even for sucess cases. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.83 # [PATCH] JBD: b_committed_data locking fix # # The locking rules say that b_committed_data is covered by # jbd_lock_bh_state(), so implement that during the start of commit, while # throwing away unused shadow buffers. # # I don't expect that there is really a race here, but them's the rules. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.84 # [PATCH] dvb i2c timeout fix # # From: Gerd Knorr # # Below is a ObviouslyCorrect[tm] patch which fixes the i2c bus timeout # handling in the saa7146 driver. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.85 # [PATCH] more correct get_compat_timespec interface # # From: Joe Korty # # The API for get_compat_timespec / put_compat_timespec is incorrect, it # forces a caller with const args to (incorrectly) cast. The posix message # queue patch is one such caller. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.86 # [PATCH] MAINTAINERS vger.rutgers.edu # # From: Geert Uytterhoeven # # Mailing lists at vger.rutgers.edu are obsolete, use vger.kernel.org # instead. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.87 # [PATCH] list_empty_careful() documentation. # # From: Ingo Molnar # # I'd also suggest the following patch below, to clarify the use of # unsynchronized list_empty(). list_empty_careful() can only be safe in the # very specific case of "one-shot" list entries which might be removed by # another CPU. (but nothing else can happen to them and this is their only # final state.) list_empty_careful() is otherwise completely unsynchronized # on both the compiler and CPU level and is not 'SMP safe' in any way. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.88 # [PATCH] Clear dirty bits etc on compound frees # # From: "Martin J. Bligh" , # Guillaume Morin # # We need to clear the software dirty bit on the tail pages of a compound page # when freeing it up. # # The tail pages can become dirtied by mmap'ing /dev/mem, and writing into # any clustered page group (that a driver might have created or whatever). # # Plus it's better to run all these pages through the free_pages_check checks # anyway. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.89 # [PATCH] Allow unimap change on non fg console # # From: Kurt Garloff # # The comment in front of vt_ioctl() reads # /* # * We handle the console-specific ioctl's here. We allow the # * capability to modify any console, not just the fg_console.=20 # */ # # Unfortunately, this does not apply to PIO_UNIMAPCLR, nor # GIO_/PIO_UNIMAP. They always operate on the current foreground # console, which is inconsistent at least. For most ioctls, the # comment is applicable. # # It also causes problems, as setfont can't do the full job on # the non-fg consoles. (OK, our setfont is slightly changed to # even try it ... as you know.) # # The attached patch does fix this. # # I have a similar patch for 2.4, but it never got merged :-( # because not many people seem to care and I submitted in the middle # of the 2.4 series ... # It has been in UnitedLinux/SUSE kernels for ages, though. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.90 # [PATCH] fix outdated comment in jiffies.h # # From: Tim Schmielau # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.91 # [PATCH] slab reclaim accounting fix # # From: Manfred Spraul # # slab_reclaim_pages is increased even if get_free_pages fails. The attached # patch moves the update to the correct position. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.92 # [PATCH] struct_cpy compilation warning # # From: Ingo Molnar # # i've attached a minor fix for the 2.6.1 timeframe - we clearly meant # __struct_cpy_bug(). Newest versions of gcc warn about this. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.93 # [PATCH] More MODULE_ALIASes # # From: Rusty Russell # Steve Youngs, Stephen Hemminger # # Three more MODULE_ALIASes. Trivial, but useful if people want things # to "just work" in 2.6.0. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.94 # [PATCH] nr_slab accounting fix # # From: Manfred Spraul # # if alloc_slabmgmt fails, then kmem_freepages() calls sub_page_state(), # altough nr_slab was not yet increased. The attached patch fixes that by # moving the inc_page_state into kmem_getpages(). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.95 # [PATCH] isdn_ppp_ccp.c uses uninitialized spinlock # # From: Tonnerre Anklin # # This spinlock was used uninitialized. Gave me a lot of warnings. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.96 # [PATCH] fix userspace compiles with nbd.h # # From: Paul Clements # # A previous "cleanup" on the nbd.h header file broke userspace compiles. # I've added an #ifdef __KERNEL__ so that userspace doesn't need to worry # about the nbd_device structure, which is only used in-kernel. The patch # allows me to compile my nbd tools with the 2.6 nbd.h. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.97 # [PATCH] DAC960 request queue per disk # # From: Dave Olien # # Here's a patch that changes the DAC960 driver from having one request # queue for ALL disks on the controller, to having a request queue for # each logical disk. This turns out to make little difference for deadline # scheduler, nor for AS scheduler under light IO load. But under AS # scheduler with heavy IO, it makes about a 40% difference on dbt2 # workload. Here are the measured numbers: # # The 2.6.0-test11-D kernel version includes this mutli-queue patch to the # DAC960 driver. # # For non-cached dbt2 workload (heavy IO load) # # Scheduler kernel/driver NOTPM(bigger is better) # AS 2.6.0-test11-D 1598 # AS 2.6.0-test11 973 # deadline 2.6.0-test11 1640 # deadline 2.6.0-test11-D 1645 # # For cached dbt2 workload (lighter IO load) # # AS 2.6.0-test11-D 4993 # AS 2.6.-test6-mm4 4976, 4890, 4972 # deadline 2.6.0-test11-D 4998 # # Can this be included in 2.6.0? I know it's not a "critical patch" # in the sense that something won't work without it. On the other hand, # the change is isolated to a driver. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.98 # [PATCH] synchronize use of mm->core_waiters # # From: Roland McGrath # # I believe I have identified a failure mode that Linus saw a couple weeks # back when tracking down some other fork/exit sorts of races. We saw this # come up on rare occasions with the RHEL3 kernel's backport of the new code # (while trying to track down other race failure modes we have yet to fix, sigh). # # I am talking about the following scenario: # # > Btw, even with the fix, doing a "while : ; ./crash t 10 ; done" will # > eventually result in a stuck process: # > # > 1415 tty1 D 0:00 ./crash # > # > This is some kind of deadlock: most of the fifty threads are in "D" # > state, with a trace something like # > # > [] schedule+0x360/0x7f8 # > [] wait_for_completion+0xd4/0x1c3 # > [] do_exit+0x627/0x6a4 # > [] do_group_exit+0x3d/0x177 # > [] dequeue_signal+0x2d/0x84 # > [] get_signal_to_deliver+0x390/0x575 # > [] do_signal+0x6c/0xf1 # > [] default_wake_function+0x0/0x12 # > [] default_wake_function+0x0/0x12 # > [] do_futex+0x6d/0x7d # > [] sys_futex+0x116/0x12f # > [] do_notify_resume+0x3b/0x3d # > [] work_notifysig+0x13/0x15 # > # > except for one that is trying to core-dump: # > # > [] wait_for_completion+0xd4/0x1c3 # > [] default_wake_function+0x0/0x12 # > [] default_wake_function+0x0/0x12 # > [] rwsem_wake+0x86/0x12d # > [] coredump_wait+0xa8/0xaa # > [] do_coredump+0x175/0x26c # > # > and three that are just doing a regular "exit()" system call: # > # > [] schedule+0x360/0x7f8 # > [] recalc_task_prio+0x90/0x1aa # > [] wait_for_completion+0xd4/0x1c3 # > [] default_wake_function+0x0/0x12 # > [] default_wake_function+0x0/0x12 # > [] rwsem_wake+0xe3/0x12d # > [] do_exit+0x627/0x6a4 # > [] next_thread+0x0/0x53 # > [] syscall_call+0x7/0xb # > # > However, the rest of the system is totally unaffected by this deadlock: # > it's only deadlocked withing the thread group itself, nobody else cares. # # What happens here is a race between an exiting thread checking # mm->core_waiters in __exit_mm, and the thread taking the core-dump signal # (in coredump_wait) examining the first thread's ->mm pointer and # incrementing mm->core_waiters to account for it. There is no # synchronization at all in __exit_mm's use of mm->core_waiters. If the # coredump_wait thread reads tsk->mm when tsk is in __exit_mm between # checking mm->core_waiters and clearing tsk->mm, then it will increment # mm->core_waiters and the total count will later exceed the number of # threads that will ever decrement it and synchronize. Hence it blocks forever. # # The following patch fixes the problem by using mm->mmap_sem in __exit_mm. # The read lock must be held around checking mm->core_waiters and clearing # tsk->mm so that coredump_wait (which gets the write lock) cannot come in # between and do bogus bookkeeping. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.99 # [PATCH] Rename legacy_bus to platform_bus # # From: Jeff Garzik # # I've seen this patch floating around. Not sure the origin, but it's # surfaced on lkml and also when I was poking around handhelds.org CVS for # iPAQ patches: on non-PCs, particularly system-on-chip devices but not # just there, you have a custom "platform bus" that is the root of pretty # much all other devices and buses. # # It's something I wanted to make sure people didn't forget; to make sure # the legacy_bus didn't get "legacied out of existence." ;-) # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.100 # [PATCH] Fix ioctl related warnings in userspace # # From: Johannes Stezenbach # # the patch below removes warnings like: # # warning: signed and unsigned type in conditional expression # # when compiling userspace applications against a glibc built with 2.6 kernel # headers (like on Debian unstable). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.101 # [PATCH] Winbond w83627hf driver # # From: Pádraig Brady # # Watchdog driver for the Winbond w83627hf which is on the last 3 motherboards # I got here for test (tyan, advantech, force). # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.102 # [PATCH] update sn2 MAINTAINERS file entry # # From: jbarnes@sgi.com (Jesse Barnes) # # Just a quick patch to fix MAINTAINERS for sn2. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.103 # [PATCH] SCC warning fix # # From: Alan Cox # # Just a warning fix and behaviour tidy. Changing the kiss.mintime variable isn't # going to work as its exposed to user space # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.104 # [PATCH] cycx_drv warning fix # # From: Alan Cox # # Type errors, just fixes a warning # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.105 # [PATCH] VIA audio fixes # # From: Alan Cox # # VIA audio had a fix from 2.4 missing so any user could spam the system log. Also # include a fix for a bug which is pending 2.4 fixing too and causes a bogus # warning to be displayed on close of audio file handle. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.106 # [PATCH] Kernel Locking Documentation update # # From: Rusty Russell # # Entirely revised, and largely rewritten. Has a continuing example now, which # I think makes things clearer. Also covers Read Copy Update. This version # further deprecates rwlock_t, shuffles sections for better organization. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.107 # [PATCH] name_to_dev_t() fix # # From: viro@parcelfarce.linux.theplanet.co.uk # # When we register disks, we mangle the disk names that contain slashes (e.g. # cciss/c0d0) replacing them with '!' in corresponding sysfs names. So # name_to_dev_t() should mangle the name in the same way before looking for it # in /sys/block. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.108 # [PATCH] dm: fix block device resizing # # From: Joe Thornber # # When setting the size of a Device-Mapper device in the gendisk entry, also # try to set the size of the corresponding block_device entry's inode. This is # necessary to allow online device/filesystem resizing to work correctly. # [Kevin Corry] # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.109 # [PATCH] dm: remove dynamic table resizing # # From: Joe Thornber # # The dm table size is always known in advance, so we can specify it in # dm_table_create(), rather than relying on dynamic resizing. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.110 # [PATCH] dm: make v4 of the ioctl interface the default # # From: Joe Thornber # # Make the version-4 ioctl interface the default kernel configuration option. # If you have out of date tools you will need to use the v1 interface. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.111 # [PATCH] dm: set io restriction defaults # # From: Joe Thornber # # Make sure that a target has a sensible set of default io restrictions. # -------------------------------------------- # 03/12/29 akpm@osdl.org 1.1496.23.112 # [PATCH] dm: dm_table_event() sleep on spinlock bug # # From: Joe Thornber # # You can no longer call dm_table_event() from interrupt context. # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.23.113 # Merge bk://kernel.bkbits.net/davem/net-2.6 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1496.23.114 # Merge bk://bk.arm.linux.org.uk/linux-2.6-serial # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1530 # Merge ia64 conflicts # -------------------------------------------- # 03/12/29 torvalds@home.osdl.org 1.1531 # Merge bk://gkernel.bkbits.net/net-drivers-2.5 # into home.osdl.org:/home/torvalds/v2.5/linux # -------------------------------------------- # 03/12/30 davem@nuts.ninka.net 1.1532 # Merge nuts.ninka.net:/disk1/davem/BK/sparcwork-2.6 # into nuts.ninka.net:/disk1/davem/BK/sparc-2.6 # -------------------------------------------- # 03/12/30 davem@nuts.ninka.net 1.1533 # [SPARC64]: Fix build after show_interrupts() changes. # -------------------------------------------- # 03/12/30 davem@nuts.ninka.net 1.1534 # [SPARC32]: Fix build after show_interrupts() changes. # -------------------------------------------- # 03/12/30 willy@debian.org 1.1535 # [PATCH] PA-RISC update for 2.6.0 # # Highlights: # # - Switch to generic ioctl32 handling # - Use the new *_defconfig mechanism # - Use drivers/Kconfig # - Big signal cleanups and support for restartable syscalls # -------------------------------------------- # diff -Nru a/CREDITS b/CREDITS --- a/CREDITS Tue Dec 30 13:48:29 2003 +++ b/CREDITS Tue Dec 30 13:48:29 2003 @@ -2669,6 +2669,13 @@ S: 70110 Kuopio S: Finland +N: Luca Risolia +E: luca_ing@libero.it +D: V4L driver for W996[87]CF JPEG USB Dual Mode Camera Chip +S: Via Libertà 41/a +S: Osio Sotto, 24046, Bergamo +S: Italy + N: William E. Roadcap E: roadcapw@cfw.com W: http://www.cfw.com/~roadcapw @@ -3569,4 +3576,4 @@ # alphabetically. Leonard used to be very proud of being the # last entry, and he'll get positively pissed if he can't even # be second-to-last. (and this file really _is_ supposed to be -# in alphabetic order) +# in alphabetic order) diff -Nru a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl --- a/Documentation/DocBook/kernel-locking.tmpl Tue Dec 30 13:48:29 2003 +++ b/Documentation/DocBook/kernel-locking.tmpl Tue Dec 30 13:48:29 2003 @@ -6,8 +6,7 @@ - Paul - Rusty + Rusty Russell
@@ -18,8 +17,8 @@ - 2000 - Paul Russell + 2003 + Rusty Russell @@ -58,16 +57,17 @@ Welcome, to Rusty's Remarkably Unreliable Guide to Kernel Locking issues. This document describes the locking systems in - the Linux Kernel as we approach 2.4. + the Linux Kernel in 2.6. - It looks like SMP - is here to stay; so everyone hacking on the kernel - these days needs to know the fundamentals of concurrency and locking - for SMP. + With the wide availability of HyperThreading, and preemption in the Linux + Kernel, everyone hacking on the kernel needs to know the + fundamentals of concurrency and locking for + SMP. - + The Problem With Concurrency (Skip this if you know what a Race Condition is). @@ -169,15 +169,23 @@ + + Race Conditions and Critical Regions - This overlap, where what actually happens depends on the - relative timing of multiple tasks, is called a race condition. + This overlap, where the result depends on the + relative timing of multiple tasks, is called a race condition. The piece of code containing the concurrency issue is called a - critical region. And especially since Linux starting running + critical region. And especially since Linux starting running on SMP machines, they became one of the major issues in kernel design and implementation. + Preemption can have the same effect, even if there is only one + CPU: by preempting one task during the critical region, we have + exactly the same race condition. In this case the thread which + preempts might run the critical region itself. + + The solution is to recognize when these simultaneous accesses occur, and use locks to make sure that only one instance can enter the critical region at any time. There are many @@ -185,10 +193,28 @@ And then there are the unfriendly primitives, but I'll pretend they don't exist. - + Locking in the Linux Kernel + + + If I could give you one piece of advice: never sleep with anyone + crazier than yourself. But if I had to give you advice on + locking: keep it simple. + + + + Be reluctant to introduce new locks. + + + + Strangely enough, this last one is the exact reverse of my advice when + you have slept with someone crazier than yourself. + And you should think about getting a big dog. + + + Two Main Types of Kernel Locks: Spinlocks and Semaphores @@ -213,23 +239,32 @@ Neither type of lock is recursive: see - . + . + Locks and Uniprocessor Kernels - For kernels compiled without CONFIG_SMP, spinlocks - do not exist at all. This is an excellent design decision: when - no-one else can run at the same time, there is no reason to - have a lock at all. + For kernels compiled without CONFIG_SMP, and + without CONFIG_PREEMPT spinlocks do not exist at + all. This is an excellent design decision: when no-one else can + run at the same time, there is no reason to have a lock. + + + + If the kernel is compiled without CONFIG_SMP, + but CONFIG_PREEMPT is set, then spinlocks + simply disable preemption, which is sufficient to prevent any + races. For most purposes, we can think of preemption as + equivalent to SMP, and not worry about it separately. You should always test your locking code with CONFIG_SMP - enabled, even if you don't have an SMP test box, because it - will still catch some (simple) kinds of deadlock. + and CONFIG_PREEMPT enabled, even if you don't have an SMP test box, because it + will still catch some kinds of locking bugs. @@ -239,25 +274,6 @@ - - Read/Write Lock Variants - - - Both spinlocks and semaphores have read/write variants: - rwlock_t and struct rw_semaphore. - These divide users into two classes: the readers and the writers. If - you are only reading the data, you can get a read lock, but to write to - the data you need the write lock. Many people can hold a read lock, - but a writer must be sole holder. - - - - This means much smoother locking if your code divides up - neatly along reader/writer lines. All the discussions below - also apply to read/write variants. - - - Locking Only In User Context @@ -289,17 +305,26 @@ - Locking Between User Context and BHs + Locking Between User Context and Softirqs - If a bottom half shares + If a softirq shares data with user context, you have two problems. Firstly, the current - user context can be interrupted by a bottom half, and secondly, the + user context can be interrupted by a softirq, and secondly, the critical region could be entered from another CPU. This is where spin_lock_bh() (include/linux/spinlock.h) is - used. It disables bottom halves on that CPU, then grabs the lock. - spin_unlock_bh() does the reverse. + used. It disables softirqs on that CPU, then grabs the lock. + spin_unlock_bh() does the reverse. (The + '_bh' suffix is a historical reference to "Bottom Halves", the + old name for software interrupts. It should really be + called spin_lock_softirq()' in a perfect world). + + + + Note that you can also use spin_lock_irq() + or spin_lock_irqsave() here, which stop + hardware interrupts as well: see . @@ -307,70 +332,41 @@ as well: the spin lock vanishes, and this macro simply becomes local_bh_disable() (include/linux/interrupt.h), which - protects you from the bottom half being run. + protects you from the softirq being run. - Locking Between User Context and Tasklets/Soft IRQs + Locking Between User Context and Tasklets - This is exactly the same as above, because - local_bh_disable() actually disables all - softirqs and tasklets - on that CPU as well. It should really be - called `local_softirq_disable()', but the name has been preserved - for historical reasons. Similarly, - spin_lock_bh() would now be called - spin_lock_softirq() in a perfect world. + This is exactly the same as above, because tasklets are actually run + from a softirq. - - Locking Between Bottom Halves + + Locking Between User Context and Timers - Sometimes a bottom half might want to share data with - another bottom half (especially remember that timers are run - off a bottom half). + This, too, is exactly the same as above, because timers are actually run from + a softirq. From a locking point of view, tasklets and timers + are identical. - - - The Same BH - - - Since a bottom half is never run on two CPUs at once, you - don't need to worry about your bottom half being run twice - at once, even on SMP. - - - - - Different BHs - - - Since only one bottom half ever runs at a time once, you - don't need to worry about race conditions with other bottom - halves. Beware that things might change under you, however, - if someone changes your bottom half to a tasklet. If you - want to make your code future-proof, pretend you're already - running from a tasklet (see below), and doing the extra - locking. Of course, if it's five years before that happens, - you're gonna look like a damn fool. - - - Locking Between Tasklets + Locking Between Tasklets/Timers - Sometimes a tasklet might want to share data with another - tasklet, or a bottom half. + Sometimes a tasklet or timer might want to share data with + another tasklet or timer. - The Same Tasklet + The Same Tasklet/Timer Since a tasklet is never run on two CPUs at once, you don't need to worry about your tasklet being reentrant (running @@ -379,10 +375,10 @@ - Different Tasklets + Different Tasklets/Timers - If another tasklet (or bottom half, such as a timer) wants - to share data with your tasklet, you will both need to use + If another tasklet/timer wants + to share data with your tasklet or timer , you will both need to use spin_lock() and spin_unlock() calls. spin_lock_bh() is @@ -396,8 +392,8 @@ Locking Between Softirqs - Often a softirq might - want to share data with itself, a tasklet, or a bottom half. + Often a softirq might + want to share data with itself or a tasklet/timer. @@ -421,10 +417,10 @@ Different Softirqs - You'll need to use spin_lock() and - spin_unlock() for shared data, whether it - be a timer (which can be running on a different CPU), bottom half, - tasklet or the same or another softirq. + You'll need to use spin_lock() and + spin_unlock() for shared data, whether it + be a timer, tasklet, different softirq or the same or another + softirq: any of them could be running on a different CPU. @@ -434,13 +430,13 @@ Hard IRQ Context - Hardware interrupts usually communicate with a bottom half, + Hardware interrupts usually communicate with a tasklet or softirq. Frequently this involves putting work in a - queue, which the BH/softirq will take out. + queue, which the softirq will take out. - Locking Between Hard IRQ and Softirqs/Tasklets/BHs + Locking Between Hard IRQ and Softirqs/Tasklets If a hardware irq handler shares data with a softirq, you have @@ -453,6 +449,16 @@ + The irq handler does not to use + spin_lock_irq(), because the softirq cannot + run while the irq handler is running: it can use + spin_lock(), which is slightly faster. The + only exception would be if a different hardware irq handler uses + the same lock: spin_lock_irq() will stop + that from interrupting us. + + + This works perfectly for UP as well: the spin lock vanishes, and this macro simply becomes local_irq_disable() (include/asm/smp.h), which @@ -468,60 +474,766 @@ interrupts are already off) and in softirqs (where the irq disabling is required). + + + Note that softirqs (and hence tasklets and timers) are run on + return from hardware interrupts, so + spin_lock_irq() also stops these. In that + sense, spin_lock_irqsave() is the most + general and powerful locking function. + + + + + Locking Between Two Hard IRQ Handlers + + It is rare to have to share data between two IRQ handlers, but + if you do, spin_lock_irqsave() should be + used: it is architecture-specific whether all interrupts are + disabled inside irq handlers themselves. + - - - Common Techniques + + + Cheat Sheet For Locking - This section lists some common dilemmas and the standard - solutions used in the Linux kernel code. If you use these, - people will find your code simpler to understand. + Pete Zaitcev gives the following summary: + + + + If you are in a process context (any syscall) and want to + lock other process out, use a semaphore. You can take a semaphore + and sleep (copy_from_user*( or + kmalloc(x,GFP_KERNEL)). + + + + + Otherwise (== data can be touched in an interrupt), use + spin_lock_irqsave() and + spin_unlock_irqrestore(). + + + + + Avoid holding spinlock for more than 5 lines of code and + across any function call (except accessors like + readb). + + + - - If I could give you one piece of advice: never sleep with anyone - crazier than yourself. But if I had to give you advice on - locking: keep it simple. - + + Table of Minimum Requirements - - Lock data, not code. + The following table lists the minimum + locking requirements between various contexts. In some cases, + the same context can only be running on one CPU at a time, so + no locking is required for that context (eg. a particular + thread can only run on one CPU at a time, but if it needs + shares data with another thread, locking is required). - - Be reluctant to introduce new locks. + Remember the advice above: you can always use + spin_lock_irqsave(), which is a superset + of all other spinlock primitives. + +Table of Locking Requirements + + + + +IRQ Handler A +IRQ Handler B +Softirq A +Softirq B +Tasklet A +Tasklet B +Timer A +Timer B +User Context A +User Context B + + + +IRQ Handler A +None + + + +IRQ Handler B +spin_lock_irqsave +None + + + +Softirq A +spin_lock_irq +spin_lock_irq +spin_lock + + + +Softirq B +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock + + + +Tasklet A +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock +None + + + +Tasklet B +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock +spin_lock +None + + + +Timer A +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock +spin_lock +spin_lock +None + + + +Timer B +spin_lock_irq +spin_lock_irq +spin_lock +spin_lock +spin_lock +spin_lock +spin_lock +None + + + +User Context A +spin_lock_irq +spin_lock_irq +spin_lock_bh +spin_lock_bh +spin_lock_bh +spin_lock_bh +spin_lock_bh +spin_lock_bh +None + + + +User Context B +spin_lock_irq +spin_lock_irq +spin_lock_bh +spin_lock_bh +spin_lock_bh +spin_lock_bh +spin_lock_bh +spin_lock_bh +down_interruptible +None + + + + +
+
+ + + Common Examples + +Let's step through a simple example: a cache of number to name +mappings. The cache keeps a count of how often each of the objects is +used, and when it gets full, throws out the least used one. + + + + + All In User Context + +For our first example, we assume that all operations are in user +context (ie. from system calls), so we can sleep. This means we can +use a semaphore to protect the cache and all the objects within +it. Here's the code: + - - Strangely enough, this is the exact reverse of my advice when - you have slept with someone crazier than yourself. - + +#include <linux/list.h> +#include <linux/slab.h> +#include <linux/string.h> +#include <asm/semaphore.h> +#include <asm/errno.h> + +struct object +{ + struct list_head list; + int id; + char name[32]; + int popularity; +}; + +/* Protects the cache, cache_num, and the objects within it */ +static DECLARE_MUTEX(cache_lock); +static LIST_HEAD(cache); +static unsigned int cache_num = 0; +#define MAX_CACHE_SIZE 10 + +/* Must be holding cache_lock */ +static struct object *__cache_find(int id) +{ + struct object *i; + + list_for_each_entry(i, &cache, list) + if (i->id == id) { + i->popularity++; + return i; + } + return NULL; +} - - No Writers in Interrupt Context +/* Must be holding cache_lock */ +static void __cache_delete(struct object *obj) +{ + BUG_ON(!obj); + list_del(&obj->list); + kfree(obj); + cache_num--; +} + +/* Must be holding cache_lock */ +static void __cache_add(struct object *obj) +{ + list_add(&obj->list, &cache); + if (++cache_num > MAX_CACHE_SIZE) { + struct object *i, *outcast = NULL; + list_for_each_entry(i, &cache, list) { + if (!outcast || i->popularity < outcast->popularity) + outcast = i; + } + __cache_delete(outcast); + } +} - - There is a fairly common case where an interrupt handler needs - access to a critical region, but does not need write access. - In this case, you do not need to use - read_lock_irq(), but only - read_lock() everywhere (since if an interrupt - occurs, the irq handler will only try to grab a read lock, which - won't deadlock). You will still need to use - write_lock_irq(). +int cache_add(int id, const char *name) +{ + struct object *obj; + + if ((obj = kmalloc(sizeof(*obj), GFP_KERNEL)) == NULL) + return -ENOMEM; + + strlcpy(obj->name, name, sizeof(obj->name)); + obj->id = id; + obj->popularity = 0; + + down(&cache_lock); + __cache_add(obj); + up(&cache_lock); + return 0; +} + +void cache_delete(int id) +{ + down(&cache_lock); + __cache_delete(__cache_find(id)); + up(&cache_lock); +} + +int cache_find(int id, char *name) +{ + struct object *obj; + int ret = -ENOENT; + + down(&cache_lock); + obj = __cache_find(id); + if (obj) { + ret = 0; + strcpy(name, obj->name); + } + up(&cache_lock); + return ret; +} + + + +Note that we always make sure we have the cache_lock when we add, +delete, or look up the cache: both the cache infrastructure itself and +the contents of the objects are protected by the lock. In this case +it's easy, since we copy the data for the user, and never let them +access the objects directly. + + +There is a slight (and common) optimization here: in +cache_add we set up the fields of the object +before grabbing the lock. This is safe, as no-one else can access it +until we put it in cache. + + + + + Accessing From Interrupt Context + +Now consider the case where cache_find can be +called from interrupt context: either a hardware interrupt or a +softirq. An example would be a timer which deletes object from the +cache. + + +The change is shown below, in standard patch format: the +- are lines which are taken away, and the ++ are lines which are added. + + +--- cache.c.usercontext 2003-12-09 13:58:54.000000000 +1100 ++++ cache.c.interrupt 2003-12-09 14:07:49.000000000 +1100 +@@ -12,7 +12,7 @@ + int popularity; + }; + +-static DECLARE_MUTEX(cache_lock); ++static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; + static LIST_HEAD(cache); + static unsigned int cache_num = 0; + #define MAX_CACHE_SIZE 10 +@@ -55,6 +55,7 @@ + int cache_add(int id, const char *name) + { + struct object *obj; ++ unsigned long flags; + + if ((obj = kmalloc(sizeof(*obj), GFP_KERNEL)) == NULL) + return -ENOMEM; +@@ -63,30 +64,33 @@ + obj->id = id; + obj->popularity = 0; + +- down(&cache_lock); ++ spin_lock_irqsave(&cache_lock, flags); + __cache_add(obj); +- up(&cache_lock); ++ spin_unlock_irqrestore(&cache_lock, flags); + return 0; + } + + void cache_delete(int id) + { +- down(&cache_lock); ++ unsigned long flags; ++ ++ spin_lock_irqsave(&cache_lock, flags); + __cache_delete(__cache_find(id)); +- up(&cache_lock); ++ spin_unlock_irqrestore(&cache_lock, flags); + } + + int cache_find(int id, char *name) + { + struct object *obj; + int ret = -ENOENT; ++ unsigned long flags; + +- down(&cache_lock); ++ spin_lock_irqsave(&cache_lock, flags); + obj = __cache_find(id); + if (obj) { + ret = 0; + strcpy(name, obj->name); + } +- up(&cache_lock); ++ spin_unlock_irqrestore(&cache_lock, flags); + return ret; + } + + + +Note that the spin_lock_irqsave will turn off +interrupts if they are on, otherwise does nothing (if we are already +in an interrupt handler), hence these functions are safe to call from +any context. + + +Unfortunately, cache_add calls +kmalloc with the GFP_KERNEL +flag, which is only legal in user context. I have assumed that +cache_add is still only called in user context, +otherwise this should become a parameter to +cache_add. + + + + Exposing Objects Outside This File + +If our objects contained more information, it might not be sufficient +to copy the information in and out: other parts of the code might want +to keep pointers to these objects, for example, rather than looking up +the id every time. This produces two problems. + + +The first problem is that we use the cache_lock to +protect objects: we'd need to make this non-static so the rest of the +code can use it. This makes locking trickier, as it is no longer all +in one place. + + +The second problem is the lifetime problem: if another structure keeps +a pointer to an object, it presumably expects that pointer to remain +valid. Unfortunately, this is only guaranteed while you hold the +lock, otherwise someone might call cache_delete +and even worse, add another object, re-using the same address. + + +As there is only one lock, you can't hold it forever: no-one else would +get any work done. + + +The solution to this problem is to use a reference count: everyone who +has a pointer to the object increases it when they first get the +object, and drops the reference count when they're finished with it. +Whoever drops it to zero knows it is unused, and can actually delete it. + + +Here is the code: + + + +--- cache.c.interrupt 2003-12-09 14:25:43.000000000 +1100 ++++ cache.c.refcnt 2003-12-09 14:33:05.000000000 +1100 +@@ -7,6 +7,7 @@ + struct object + { + struct list_head list; ++ unsigned int refcnt; + int id; + char name[32]; + int popularity; +@@ -17,6 +18,35 @@ + static unsigned int cache_num = 0; + #define MAX_CACHE_SIZE 10 + ++static void __object_put(struct object *obj) ++{ ++ if (--obj->refcnt == 0) ++ kfree(obj); ++} ++ ++static void __object_get(struct object *obj) ++{ ++ obj->refcnt++; ++} ++ ++void object_put(struct object *obj) ++{ ++ unsigned long flags; ++ ++ spin_lock_irqsave(&cache_lock, flags); ++ __object_put(obj); ++ spin_unlock_irqrestore(&cache_lock, flags); ++} ++ ++void object_get(struct object *obj) ++{ ++ unsigned long flags; ++ ++ spin_lock_irqsave(&cache_lock, flags); ++ __object_get(obj); ++ spin_unlock_irqrestore(&cache_lock, flags); ++} ++ + /* Must be holding cache_lock */ + static struct object *__cache_find(int id) + { +@@ -35,6 +65,7 @@ + { + BUG_ON(!obj); + list_del(&obj->list); ++ __object_put(obj); + cache_num--; + } + +@@ -63,6 +94,7 @@ + strlcpy(obj->name, name, sizeof(obj->name)); + obj->id = id; + obj->popularity = 0; ++ obj->refcnt = 1; /* The cache holds a reference */ + + spin_lock_irqsave(&cache_lock, flags); + __cache_add(obj); +@@ -79,18 +111,15 @@ + spin_unlock_irqrestore(&cache_lock, flags); + } + +-int cache_find(int id, char *name) ++struct object *cache_find(int id) + { + struct object *obj; +- int ret = -ENOENT; + unsigned long flags; + + spin_lock_irqsave(&cache_lock, flags); + obj = __cache_find(id); +- if (obj) { +- ret = 0; +- strcpy(name, obj->name); +- } ++ if (obj) ++ __object_get(obj); + spin_unlock_irqrestore(&cache_lock, flags); +- return ret; ++ return obj; + } + + + +We encapsulate the reference counting in the standard 'get' and 'put' +functions. Now we can return the object itself from +cache_find which has the advantage that the user +can now sleep holding the object (eg. to +copy_to_user to name to userspace). + + +The other point to note is that I said a reference should be held for +every pointer to the object: thus the reference count is 1 when first +inserted into the cache. In some versions the framework does not hold +a reference count, but they are more complicated. + + + + Using Atomic Operations For The Reference Count + +In practice, atomic_t would usually be used for +refcnt. There are a number of atomic +operations defined in + +include/asm/atomic.h: these are +guaranteed to be seen atomically from all CPUs in the system, so no +lock is required. In this case, it is simpler than using spinlocks, +although for anything non-trivial using spinlocks is clearer. The +atomic_inc and +atomic_dec_and_test are used instead of the +standard increment and decrement operators, and the lock is no longer +used to protect the reference count itself. + + + +--- cache.c.refcnt 2003-12-09 15:00:35.000000000 +1100 ++++ cache.c.refcnt-atomic 2003-12-11 15:49:42.000000000 +1100 +@@ -7,7 +7,7 @@ + struct object + { + struct list_head list; +- unsigned int refcnt; ++ atomic_t refcnt; + int id; + char name[32]; + int popularity; +@@ -18,33 +18,15 @@ + static unsigned int cache_num = 0; + #define MAX_CACHE_SIZE 10 + +-static void __object_put(struct object *obj) +-{ +- if (--obj->refcnt == 0) +- kfree(obj); +-} +- +-static void __object_get(struct object *obj) +-{ +- obj->refcnt++; +-} +- + void object_put(struct object *obj) + { +- unsigned long flags; +- +- spin_lock_irqsave(&cache_lock, flags); +- __object_put(obj); +- spin_unlock_irqrestore(&cache_lock, flags); ++ if (atomic_dec_and_test(&obj->refcnt)) ++ kfree(obj); + } + + void object_get(struct object *obj) + { +- unsigned long flags; +- +- spin_lock_irqsave(&cache_lock, flags); +- __object_get(obj); +- spin_unlock_irqrestore(&cache_lock, flags); ++ atomic_inc(&obj->refcnt); + } + + /* Must be holding cache_lock */ +@@ -65,7 +47,7 @@ + { + BUG_ON(!obj); + list_del(&obj->list); +- __object_put(obj); ++ object_put(obj); + cache_num--; + } + +@@ -94,7 +76,7 @@ + strlcpy(obj->name, name, sizeof(obj->name)); + obj->id = id; + obj->popularity = 0; +- obj->refcnt = 1; /* The cache holds a reference */ ++ atomic_set(&obj->refcnt, 1); /* The cache holds a reference */ + + spin_lock_irqsave(&cache_lock, flags); + __cache_add(obj); +@@ -119,7 +101,7 @@ + spin_lock_irqsave(&cache_lock, flags); + obj = __cache_find(id); + if (obj) +- __object_get(obj); ++ object_get(obj); + spin_unlock_irqrestore(&cache_lock, flags); + return obj; + } + + + + + Protecting The Objects Themselves + +In these examples, we assumed that the objects (except the reference +counts) never changed once they are created. If we wanted to allow +the name to change, there are three possibilities: + + + +You can make cache_lock non-static, and tell people +to grab that lock before changing the name in any object. + + + + +You can provide a cache_obj_rename which grabs +this lock and changes the name for the caller, and tell everyone to +use that function. + + + + +You can make the cache_lock protect only the cache +itself, and use another lock to protect the name. + + + - - Similar logic applies to locking between softirqs/tasklets/BHs - which never need a write lock, and user context: - read_lock() and - write_lock_bh(). - - + +Theoretically, you can make the locks as fine-grained as one lock for +every field, for every object. In practice, the most common variants +are: + + + + +One lock which protects the infrastructure (the cache +list in this example) and all the objects. This is what we have done +so far. + + + + +One lock which protects the infrastructure (including the list +pointers inside the objects), and one lock inside the object which +protects the rest of that object. + + + + +Multiple locks to protect the infrastructure (eg. one lock per hash +chain), possibly with a separate per-object lock. + + + - + +Here is the "lock-per-object" implementation: + + +--- cache.c.refcnt-atomic 2003-12-11 15:50:54.000000000 +1100 ++++ cache.c.perobjectlock 2003-12-11 17:15:03.000000000 +1100 +@@ -6,11 +6,17 @@ + + struct object + { ++ /* These two protected by cache_lock. */ + struct list_head list; ++ int popularity; ++ + atomic_t refcnt; ++ ++ /* Doesn't change once created. */ + int id; ++ ++ spinlock_t lock; /* Protects the name */ + char name[32]; +- int popularity; + }; + + static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED; +@@ -77,6 +84,7 @@ + obj->id = id; + obj->popularity = 0; + atomic_set(&obj->refcnt, 1); /* The cache holds a reference */ ++ spin_lock_init(&obj->lock); + + spin_lock_irqsave(&cache_lock, flags); + __cache_add(obj); + + + +Note that I decide that the popularity +count should be protected by the cache_lock rather +than the per-object lock: this is because it (like the +struct list_head inside the object) is +logically part of the infrastructure. This way, I don't need to grab +the lock of every object in __cache_add when +seeking the least popular. + + + +I also decided that the id member is +unchangeable, so I don't need to grab each object lock in +__cache_find() to examine the +id: the object lock is only used by a +caller who wants to read or write the name +field. + + + +Note also that I added a comment describing what data was protected by +which locks. This is extremely important, as it describes the runtime +behavior of the code, and can be hard to gain from just reading. And +as Alan Cox says, Lock data, not code. + + + + + Common Problems + Deadlock: Simple and Advanced @@ -535,10 +1247,10 @@ For a slightly more complex case, imagine you have a region - shared by a bottom half and user context. If you use a + shared by a softirq and user context. If you use a spin_lock() call to protect it, it is - possible that the user context will be interrupted by the bottom - half while it holds the lock, and the bottom half will then spin + possible that the user context will be interrupted by the softirq + while it holds the lock, and the softirq will then spin forever trying to get the same lock. @@ -558,7 +1270,7 @@ - A more complex problem is the so-called `deadly embrace', + A more complex problem is the so-called 'deadly embrace', involving two or more locks. Say you have a hash table: each entry in the table is a spinlock, and a chain of hashed objects. Inside a softirq handler, you sometimes want to @@ -606,7 +1318,7 @@ their lock. It will look, smell, and feel like a crash. - + Preventing Deadlock @@ -634,7 +1346,6 @@ will do?). Remember, the other programmers are out to get you, so don't do this. - Overzealous Prevention Of Deadlocks @@ -650,266 +1361,481 @@ If you don't see why, please stay the fuck away from my code. - +
- - Per-CPU Data - - - A great technique for avoiding locking which is used fairly - widely is to duplicate information for each CPU. For example, - if you wanted to keep a count of a common condition, you could - use a spin lock and a single counter. Nice and simple. - + + Racing Timers: A Kernel Pastime - If that was too slow [it's probably not], you could instead - use a counter for each CPU [don't], then none of them need an - exclusive lock [you're wasting your time here]. To make sure - the CPUs don't have to synchronize caches all the time, align - the counters to cache boundaries by appending - `__cacheline_aligned' to the declaration - (include/linux/cache.h). - [Can't you think of anything better to do?] + Timers can produce their own special problems with races. + Consider a collection of objects (list, hash, etc) where each + object has a timer which is due to destroy it. - They will need a read lock to access their own counters, - however. That way you can use a write lock to grant exclusive - access to all of them at once, to tally them up. + If you want to destroy the entire collection (say on module + removal), you might do the following: - - - Big Reader Locks + + /* THIS CODE BAD BAD BAD BAD: IF IT WAS ANY WORSE IT WOULD USE + HUNGARIAN NOTATION */ + spin_lock_bh(&list_lock); - - A classic example of per-CPU information is Ingo's `big - reader' locks - (linux/include/brlock.h). These - use the Per-CPU Data techniques described above to create a lock which - is very fast to get a read lock, but agonizingly slow for a write - lock. - + while (list) { + struct foo *next = list->next; + del_timer(&list->timer); + kfree(list); + list = next; + } + + spin_unlock_bh(&list_lock); + - Fortunately, there are a limited number of these locks - available: you have to go through a strict interview process - to get one. + Sooner or later, this will crash on SMP, because a timer can + have just gone off before the spin_lock_bh(), + and it will only get the lock after we + spin_unlock_bh(), and then try to free + the element (which has already been freed!). - - - - Avoiding Locks: Read And Write Ordering - Sometimes it is possible to avoid locking. Consider the - following case from the 2.2 firewall code, which inserted an - element into a single linked list in user context: + This can be avoided by checking the result of + del_timer(): if it returns + 1, the timer has been deleted. + If 0, it means (in this + case) that it is currently running, so we can do: - new->next = i->next; - i->next = new; - + retry: + spin_lock_bh(&list_lock); - - Here the author (Alan Cox, who knows what he's doing) assumes - that the pointer assignments are atomic. This is important, - because networking packets would traverse this list on bottom - halves without a lock. Depending on their exact timing, they - would either see the new element in the list with a valid - next pointer, or it would not be in the - list yet. A lock is still required against other CPUs inserting - or deleting from the list, of course. - + while (list) { + struct foo *next = list->next; + if (!del_timer(&list->timer)) { + /* Give timer a chance to delete this */ + spin_unlock_bh(&list_lock); + goto retry; + } + kfree(list); + list = next; + } - - Of course, the writes must be in this - order, otherwise the new element appears in the list with an - invalid next pointer, and any other - CPU iterating at the wrong time will jump through it into garbage. - Because modern CPUs reorder, Alan's code actually read as follows: - - - - new->next = i->next; - wmb(); - i->next = new; + spin_unlock_bh(&list_lock); - The wmb() is a write memory barrier - (include/asm/system.h): neither - the compiler nor the CPU will allow any writes to memory after the - wmb() to be visible to other hardware - before any of the writes before the wmb(). + Another common problem is deleting timers which restart + themselves (by calling add_timer() at the end + of their timer function). Because this is a fairly common case + which is prone to races, you should use del_timer_sync() + (include/linux/timer.h) + to handle this case. It returns the number of times the timer + had to be deleted before we finally stopped it from adding itself back + in. + - - As i386 does not do write reordering, this bug would never - show up on that platform. On other SMP platforms, however, it - will. - + + The Fucked Up Sparc - There is also rmb() for read ordering: to ensure - any previous variable reads occur before following reads. The simple - mb() macro combines both - rmb() and wmb(). + Alan Cox says the irq disable/enable is in the register + window on a sparc. Andi Kleen says when you do + restore_flags in a different function you mess up all the + register windows. - Some atomic operations are defined to act as a memory barrier - (ie. as per the mb() macro, but if in - doubt, be explicit. - - Also, - spinlock operations act as partial barriers: operations after - gaining a spinlock will never be moved to precede the - spin_lock() call, and operations before - releasing a spinlock will never be moved after the - spin_unlock() call. - + So never pass the flags word set by + spin_lock_irqsave() and brethren to another + function (unless it's declared inline). Usually no-one + does this, but now you've been warned. Dave Miller can never do + anything in a straightforward manner (I can say that, because I have + pictures of him and a certain PowerPC maintainer in a compromising + position). - - Avoiding Locks: Atomic Operations + + + + Locking Speed - There are a number of atomic operations defined in - include/asm/atomic.h: these - are guaranteed to be seen atomically from all CPUs in the system, thus - avoiding races. If your shared data consists of a single counter, say, - these operations might be simpler than using spinlocks (although for - anything non-trivial using spinlocks is clearer). +There are three main things to worry about when considering speed of +some code which does locking. First is concurrency: how many things +are going to be waiting while someone else is holding a lock. Second +is the time taken to actually acquire and release an uncontended lock. +Third is using fewer, or smarter locks. I'm assuming that the lock is +used fairly often: otherwise, you wouldn't be concerned about +efficiency. + + +Concurrency depends on how long the lock is usually held: you should +hold the lock for as long as needed, but no longer. In the cache +example, we always create the object without the lock held, and then +grab the lock only when we are ready to insert it in the list. + + +Acquisition times depend on how much damage the lock operations do to +the pipeline (pipeline stalls) and how likely it is that this CPU was +the last one to grab the lock (ie. is the lock cache-hot for this +CPU): on a machine with more CPUs, this likelihood drops fast. +Consider a 700MHz Intel Pentium III: an instruction takes about 0.7ns, +an atomic increment takes about 58ns, a lock which is cache-hot on +this CPU takes 160ns, and a cacheline transfer from another CPU takes +an additional 170 to 360ns. (These figures from Paul McKenney's + Linux +Journal RCU article). + + +These two aims conflict: holding a lock for a short time might be done +by splitting locks into parts (such as in our final per-object-lock +example), but this increases the number of lock acquisitions, and the +results are often slower than having a single lock. This is another +reason to advocate locking simplicity. + + +The third concern is addressed below: there are some methods to reduce +the amount of locking which needs to be done. + + + + Read/Write Lock Variants + + + Both spinlocks and semaphores have read/write variants: + rwlock_t and struct rw_semaphore. + These divide users into two classes: the readers and the writers. If + you are only reading the data, you can get a read lock, but to write to + the data you need the write lock. Many people can hold a read lock, + but a writer must be sole holder. - - Note that the atomic operations do in general not act as memory - barriers. Instead you can insert a memory barrier before or - after atomic_inc() or - atomic_dec() by inserting - smp_mb__before_atomic_inc(), - smp_mb__after_atomic_inc(), - smp_mb__before_atomic_dec() or - smp_mb__after_atomic_dec() - respectively. The advantage of using those macros instead of - smp_mb() is, that they are cheaper on some - platforms. - + + If your code divides neatly along reader/writer lines (as our + cache code does), and the lock is held by readers for + significant lengths of time, using these locks can help. They + are slightly slower than the normal locks though, so in practice + rwlock_t is not usually worthwhile. - - Protecting A Collection of Objects: Reference Counts + + Avoiding Locks: Read Copy Update - Locking a collection of objects is fairly easy: you get a - single spinlock, and you make sure you grab it before - searching, adding or deleting an object. + There is a special method of read/write locking called Read Copy + Update. Using RCU, the readers can avoid taking a lock + altogether: as we expect our cache to be read more often than + updated (otherwise the cache is a waste of time), it is a + candidate for this optimization. - The purpose of this lock is not to protect the individual - objects: you might have a separate lock inside each one for - that. It is to protect the data structure - containing the objects from race conditions. Often - the same lock is used to protect the contents of all the - objects as well, for simplicity, but they are inherently - orthogonal (and many other big words designed to confuse). + How do we get rid of read locks? Getting rid of read locks + means that writers may be changing the list underneath the + readers. That is actually quite simple: we can read a linked + list while an element is being added if the writer adds the + element very carefully. For example, adding + new to a single linked list called + list: + + new->next = list->next; + wmb(); + list->next = new; + + - Changing this to a read-write lock will often help markedly if - reads are far more common that writes. If not, there is - another approach you can use to reduce the time the lock is - held: reference counts. + The wmb() is a write memory barrier. It + ensures that the first operation (setting the new element's + next pointer) is complete and will be seen by + all CPUs, before the second operation is (putting the new + element into the list). This is important, since modern + compilers and modern CPUs can both reorder instructions unless + told otherwise: we want a reader to either not see the new + element at all, or see the new element with the + next pointer correctly pointing at the rest of + the list. + + + Fortunately, there is a function to do this for standard + struct list_head lists: + list_add_rcu() + (include/linux/list.h). + + + Removing an element from the list is even simpler: we replace + the pointer to the old element with a pointer to its successor, + and readers will either see it, or skip over it. + + list->next = old->next; + + + There is list_del_rcu() + (include/linux/list.h) which does this (the + normal version poisons the old object, which we don't want). + + + The reader must also be careful: some CPUs can look through the + next pointer to start reading the contents of + the next element early, but don't realize that the pre-fetched + contents is wrong when the next pointer changes + underneath them. Once again, there is a + list_for_each_entry_rcu() + (include/linux/list.h) to help you. Of + course, writers can just use + list_for_each_entry(), since there cannot + be two simultaneous writers. + + + Our final dilemma is this: when can we actually destroy the + removed element? Remember, a reader might be stepping through + this element in the list right now: it we free this element and + the next pointer changes, the reader will jump + off into garbage and crash. We need to wait until we know that + all the readers who were traversing the list when we deleted the + element are finished. We use call_rcu() to + register a callback which will actually destroy the object once + the readers are finished. + + + But how does Read Copy Update know when the readers are + finished? The method is this: firstly, the readers always + traverse the list inside + rcu_read_lock()/rcu_read_unlock() + pairs: these simply disable preemption so the reader won't go to + sleep while reading the list. + + + RCU then waits until every other CPU has slept at least once: + since readers cannot sleep, we know that any readers which were + traversing the list during the deletion are finished, and the + callback is triggered. The real Read Copy Update code is a + little more optimized than this, but this is the fundamental + idea. + + + +--- cache.c.perobjectlock 2003-12-11 17:15:03.000000000 +1100 ++++ cache.c.rcupdate 2003-12-11 17:55:14.000000000 +1100 +@@ -1,15 +1,18 @@ + #include <linux/list.h> + #include <linux/slab.h> + #include <linux/string.h> ++#include <linux/rcupdate.h> + #include <asm/semaphore.h> + #include <asm/errno.h> + + struct object + { +- /* These two protected by cache_lock. */ ++ /* This is protected by RCU */ + struct list_head list; + int popularity; + ++ struct rcu_head rcu; ++ + atomic_t refcnt; + + /* Doesn't change once created. */ +@@ -40,7 +43,7 @@ + { + struct object *i; + +- list_for_each_entry(i, &cache, list) { ++ list_for_each_entry_rcu(i, &cache, list) { + if (i->id == id) { + i->popularity++; + return i; +@@ -49,19 +52,25 @@ + return NULL; + } + ++/* Final discard done once we know no readers are looking. */ ++static void cache_delete_rcu(void *arg) ++{ ++ object_put(arg); ++} ++ + /* Must be holding cache_lock */ + static void __cache_delete(struct object *obj) + { + BUG_ON(!obj); +- list_del(&obj->list); +- object_put(obj); ++ list_del_rcu(&obj->list); + cache_num--; ++ call_rcu(&obj->rcu, cache_delete_rcu, obj); + } + + /* Must be holding cache_lock */ + static void __cache_add(struct object *obj) + { +- list_add(&obj->list, &cache); ++ list_add_rcu(&obj->list, &cache); + if (++cache_num > MAX_CACHE_SIZE) { + struct object *i, *outcast = NULL; + list_for_each_entry(i, &cache, list) { +@@ -85,6 +94,7 @@ + obj->popularity = 0; + atomic_set(&obj->refcnt, 1); /* The cache holds a reference */ + spin_lock_init(&obj->lock); ++ INIT_RCU_HEAD(&obj->rcu); + + spin_lock_irqsave(&cache_lock, flags); + __cache_add(obj); +@@ -104,12 +114,11 @@ + struct object *cache_find(int id) + { + struct object *obj; +- unsigned long flags; + +- spin_lock_irqsave(&cache_lock, flags); ++ rcu_read_lock(); + obj = __cache_find(id); + if (obj) + object_get(obj); +- spin_unlock_irqrestore(&cache_lock, flags); ++ rcu_read_unlock(); + return obj; + } + + + +Note that the reader will alter the +popularity member in +__cache_find(), and now it doesn't hold a lock. +One solution would be to make it an atomic_t, but for +this usage, we don't really care about races: an approximate result is +good enough, so I didn't change it. + + + +The result is that cache_find() requires no +synchronization with any other functions, so is almost as fast on SMP +as it would be on UP. + + + +There is a furthur optimization possible here: remember our original +cache code, where there were no reference counts and the caller simply +held the lock whenever using the object? This is still possible: if +you hold the lock, noone can delete the object, so you don't need to +get and put the reference count. + + + +Now, because the 'read lock' in RCU is simply disabling preemption, a +caller which always has preemption disabled between calling +cache_find() and +object_put() does not need to actually get and +put the reference count: we could expose +__cache_find() by making it non-static, and +such callers could simply call that. + + +The benefit here is that the reference count is not written to: the +object is not altered in any way, which is much faster on SMP +machines due to caching. + + + + + Per-CPU Data - In this approach, an object has an owner, who sets the - reference count to one. Whenever you get a pointer to the - object, you increment the reference count (a `get' operation). - Whenever you relinquish a pointer, you decrement the reference - count (a `put' operation). When the owner wants to destroy - it, they mark it dead, and do a put. + Another technique for avoiding locking which is used fairly + widely is to duplicate information for each CPU. For example, + if you wanted to keep a count of a common condition, you could + use a spin lock and a single counter. Nice and simple. - Whoever drops the reference count to zero (usually implemented - with atomic_dec_and_test()) actually cleans - up and frees the object. + If that was too slow (it's usually not, but if you've got a + really big machine to test on and can show that it is), you + could instead use a counter for each CPU, then none of them need + an exclusive lock. See DEFINE_PER_CPU(), + get_cpu_var() and + put_cpu_var() + (include/linux/percpu.h). - This means that you are guaranteed that the object won't - vanish underneath you, even though you no longer have a lock - for the collection. + Of particular use for simple per-cpu counters is the + local_t type, and the + cpu_local_inc() and related functions, + which are more efficient than simple code on some architectures + (include/asm/local.h). - Here's some skeleton code: + Note that there is no simple, reliable way of getting an exact + value of such a counter, without introducing more locks. This + is not a problem for some uses. + - - void create_foo(struct foo *x) - { - atomic_set(&x->use, 1); - spin_lock_bh(&list_lock); - ... insert in list ... - spin_unlock_bh(&list_lock); - } - - struct foo *get_foo(int desc) - { - struct foo *ret; - - spin_lock_bh(&list_lock); - ... find in list ... - if (ret) atomic_inc(&ret->use); - spin_unlock_bh(&list_lock); - - return ret; - } + + Data Which Mostly Used By An IRQ Handler - void put_foo(struct foo *x) - { - if (atomic_dec_and_test(&x->use)) - kfree(foo); - } + + If data is always accessed from within the same IRQ handler, you + don't need a lock at all: the kernel already guarantees that the + irq handler will not run simultaneously on multiple CPUs. + + + Manfred Spraul points out that you can still do this, even if + the data is very occasionally accessed in user context or + softirqs/tasklets. The irq handler doesn't use a lock, and + all other accesses are done as so: + + + + spin_lock(&lock); + disable_irq(irq); + ... + enable_irq(irq); + spin_unlock(&lock); + + + The disable_irq() prevents the irq handler + from running (and waits for it to finish if it's currently + running on other CPUs). The spinlock prevents any other + accesses happening at the same time. Naturally, this is slower + than just a spin_lock_irq() call, so it + only makes sense if this type of access happens extremely + rarely. + + + - void destroy_foo(struct foo *x) - { - spin_lock_bh(&list_lock); - ... remove from list ... - spin_unlock_bh(&list_lock); + + What Functions Are Safe To Call From Interrupts? - put_foo(x); - } - + + Many functions in the kernel sleep (ie. call schedule()) + directly or indirectly: you can never call them while holding a + spinlock, or with preemption disabled. This also means you need + to be in user context: calling them from an interrupt is illegal. + - - Macros To Help You - - There are a set of debugging macros tucked inside - include/linux/netfilter_ipv4/lockhelp.h - and listhelp.h: these are very - useful for ensuring that locks are held in the right places to protect - infrastructure. - - - - - - Things Which Sleep + + Some Functions Which Sleep - You can never call the following routines while holding a - spinlock, as they may sleep. This also means you need to be in - user context. + The most common ones are listed below, but you usually have to + read the code to find out if other calls are safe. If everyone + else who calls it can sleep, you probably need to be able to + sleep, too. In particular, registration and deregistration + functions usually expect to be called from user context, and can + sleep. @@ -961,106 +1887,31 @@ - - printk() can be called in - any context, interestingly enough. - - - - - The Fucked Up Sparc + + Some Functions Which Don't Sleep - Alan Cox says the irq disable/enable is in the register - window on a sparc. Andi Kleen says when you do - restore_flags in a different function you mess up all the - register windows. - - - - So never pass the flags word set by - spin_lock_irqsave() and brethren to another - function (unless it's declared inline. Usually no-one - does this, but now you've been warned. Dave Miller can never do - anything in a straightforward manner (I can say that, because I have - pictures of him and a certain PowerPC maintainer in a compromising - position). - - - - - Racing Timers: A Kernel Pastime - - - Timers can produce their own special problems with races. - Consider a collection of objects (list, hash, etc) where each - object has a timer which is due to destroy it. + Some functions are safe to call from any context, or holding + almost any lock. - - If you want to destroy the entire collection (say on module - removal), you might do the following: - - - - /* THIS CODE BAD BAD BAD BAD: IF IT WAS ANY WORSE IT WOULD USE - HUNGARIAN NOTATION */ - spin_lock_bh(&list_lock); - - while (list) { - struct foo *next = list->next; - del_timer(&list->timer); - kfree(list); - list = next; - } - - spin_unlock_bh(&list_lock); - - - - Sooner or later, this will crash on SMP, because a timer can - have just gone off before the spin_lock_bh(), - and it will only get the lock after we - spin_unlock_bh(), and then try to free - the element (which has already been freed!). - - - - This can be avoided by checking the result of - del_timer(): if it returns - 1, the timer has been deleted. - If 0, it means (in this - case) that it is currently running, so we can do: - - - - retry: - spin_lock_bh(&list_lock); - - while (list) { - struct foo *next = list->next; - if (!del_timer(&list->timer)) { - /* Give timer a chance to delete this */ - spin_unlock_bh(&list_lock); - goto retry; - } - kfree(list); - list = next; - } - - spin_unlock_bh(&list_lock); - - - - Another common problem is deleting timers which restart - themselves (by calling add_timer() at the end - of their timer function). Because this is a fairly common case - which is prone to races, you should use del_timer_sync() - (include/linux/timer.h) - to handle this case. It returns the number of times the timer - had to be deleted before we finally stopped it from adding itself back - in. - + + + + printk() + + + + + kfree() + + + + + add_timer() and del_timer() + + + @@ -1101,8 +1952,9 @@ Thanks to Martin Pool, Philipp Rumpf, Stephen Rothwell, Paul - Mackerras, Ruedi Aschwanden, Alan Cox, Manfred Spraul and Tim - Waugh for proofreading, correcting, flaming, commenting. + Mackerras, Ruedi Aschwanden, Alan Cox, Manfred Spraul, Tim + Waugh, Pete Zaitcev, James Morris, Robert Love, Paul McKenney, + John Ashby for proofreading, correcting, flaming, commenting. @@ -1113,12 +1965,27 @@ Glossary + + preemption + + + Prior to 2.5, or when CONFIG_PREEMPT is + unset, processes in user context inside the kernel would not + preempt each other (ie. you had that CPU until you have it up, + except for interrupts). With the addition of + CONFIG_PREEMPT in 2.5.4, this changed: when + in user context, higher priority tasks can "cut in": spinlocks + were changed to disable preemption, even on UP. + + + + bh Bottom Half: for historical reasons, functions with - `_bh' in them often now refer to any software interrupt, e.g. + '_bh' in them often now refer to any software interrupt, e.g. spin_lock_bh() blocks any software interrupt on the current CPU. Bottom halves are deprecated, and will eventually be replaced by tasklets. Only one bottom half will be @@ -1132,8 +1999,7 @@ Hardware interrupt request. in_irq() returns - true in a hardware interrupt handler (it - also returns true when interrupts are blocked). + true in a hardware interrupt handler. @@ -1144,8 +2010,7 @@ Not user context: processing a hardware irq or software irq. Indicated by the in_interrupt() macro - returning true (although it also - returns true when interrupts or BHs are blocked). + returning true. @@ -1161,35 +2026,40 @@ - softirq + Software Interrupt / softirq - Strictly speaking, one of up to 32 enumerated software + Software interrupt handler. in_irq() returns + false; in_softirq() + returns true. Tasklets and softirqs + both fall into the category of 'software interrupts'. + + + Strictly speaking a softirq is one of up to 32 enumerated software interrupts which can run on multiple CPUs at once. - Sometimes used to refer to tasklets and bottom halves as + Sometimes used to refer to tasklets as well (ie. all software interrupts). - - Software Interrupt / Software IRQ + + tasklet - Software interrupt handler. in_irq() returns - false; in_softirq() - returns true. Tasklets, softirqs and - bottom halves all fall into the category of `software interrupts'. + A dynamically-registrable software interrupt, + which is guaranteed to only run on one CPU at a time. - - tasklet + + timer - A dynamically-registrable software interrupt, - which is guaranteed to only run on one CPU at a time. + A dynamically-registrable software interrupt, which is run at + (or close to) a given time. When running, it is just like a + tasklet (in fact, they are called from the TIMER_SOFTIRQ). @@ -1207,10 +2077,11 @@ User Context - The kernel executing on behalf of a particular - process or kernel thread (given by the current() - macro.) Not to be confused with userspace. Can be interrupted by - software or hardware interrupts. + The kernel executing on behalf of a particular process (ie. a + system call or trap) or kernel thread. You can tell which + process with the current macro.) Not to + be confused with userspace. Can be interrupted by software or + hardware interrupts. diff -Nru a/Documentation/MSI-HOWTO.txt b/Documentation/MSI-HOWTO.txt --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/MSI-HOWTO.txt Tue Dec 30 13:48:30 2003 @@ -0,0 +1,321 @@ + The MSI Driver Guide HOWTO + Tom L Nguyen tom.l.nguyen@intel.com + 10/03/2003 + +1. About this guide + +This guide describes the basics of Message Signaled Interrupts(MSI), the +advantages of using MSI over traditional interrupt mechanisms, and how +to enable your driver to use MSI or MSI-X. Also included is a Frequently +Asked Questions. + +2. Copyright 2003 Intel Corporation + +3. What is MSI/MSI-X? + +Message Signaled Interrupt (MSI), as described in the PCI Local Bus +Specification Revision 2.3 or latest, is an optional feature, and a +required feature for PCI Express devices. MSI enables a device function +to request service by sending an Inbound Memory Write on its PCI bus to +the FSB as a Message Signal Interrupt transaction. Because MSI is +generated in the form of a Memory Write, all transaction conditions, +such as a Retry, Master-Abort, Target-Abort or normal completion, are +supported. + +A PCI device that supports MSI must also support pin IRQ assertion +interrupt mechanism to provide backward compatibility for systems that +do not support MSI. In Systems, which support MSI, the bus driver is +responsible for initializing the message address and message data of +the device function's MSI/MSI-X capability structure during device +initial configuration. + +An MSI capable device function indicates MSI support by implementing +the MSI/MSI-X capability structure in its PCI capability list. The +device function may implement both the MSI capability structure and +the MSI-X capability structure; however, the bus driver should not +enable both, but instead enable only the MSI-X capability structure. + +The MSI capability structure contains Message Control register, +Message Address register and Message Data register. These registers +provide the bus driver control over MSI. The Message Control register +indicates the MSI capability supported by the device. The Message +Address register specifies the target address and the Message Data +register specifies the characteristics of the message. To request +service, the device function writes the content of the Message Data +register to the target address. The device and its software driver +are prohibited from writing to these registers. + +The MSI-X capability structure is an optional extension to MSI. It +uses an independent and separate capability structure. There are +some key advantages to implementing the MSI-X capability structure +over the MSI capability structure as described below. + + - Support a larger maximum number of vectors per function. + + - Provide the ability for system software to configure + each vector with an independent message address and message + data, specified by a table that resides in Memory Space. + + - MSI and MSI-X both support per-vector masking. Per-vector + masking is an optional extension of MSI but a required + feature for MSI-X. Per-vector masking provides the kernel + the ability to mask/unmask MSI when servicing its software + interrupt service routing handler. If per-vector masking is + not supported, then the device driver should provide the + hardware/software synchronization to ensure that the device + generates MSI when the driver wants it to do so. + +4. Why use MSI? + +As a benefit the simplification of board design, MSI allows board +designers to remove out of band interrupt routing. MSI is another +step towards a legacy-free environment. + +Due to increasing pressure on chipset and processor packages to +reduce pin count, the need for interrupt pins is expected to +diminish over time. Devices, due to pin constraints, may implement +messages to increase performance. + +PCI Express endpoints uses INTx emulation (in-band messages) instead +of IRQ pin assertion. Using INTx emulation requires interrupt +sharing among devices connected to the same node (PCI bridge) while +MSI is unique (non-shared) and does not require BIOS configuration +support. As a result, the PCI Express technology requires MSI +support for better interrupt performance. + +Using MSI enables the device functions to support two or more +vectors, which can be configure to target different CPU's to +increase scalability. + +5. Configuring a driver to use MSI/MSI-X + +By default, the kernel will not enable MSI/MSI-X on all devices that +support this capability once the patch is installed. A kernel +configuration option must be selected to enable MSI/MSI-X support. + +5.1 Including MSI support into the kernel + +To include MSI support into the kernel requires users to patch the +VECTOR-base patch first and then the MSI patch because the MSI +support needs VECTOR based scheme. Once these patches are installed, +setting CONFIG_PCI_USE_VECTOR enables the VECTOR based scheme and +the option for MSI-capable device drivers to selectively enable MSI +(using pci_enable_msi as desribed below). + +Since the target of the inbound message is the local APIC, providing +CONFIG_PCI_USE_VECTOR is dependent on whether CONFIG_X86_LOCAL_APIC +is enabled or not. + +int pci_enable_msi(struct pci_dev *) + +With this new API, any existing device driver, which like to have +MSI enabled on its device function, must call this explicitly. A +successful call will initialize the MSI/MSI-X capability structure +with ONE vector, regardless of whether the device function is +capable of supporting multiple messages. This vector replaces the +pre-assigned dev->irq with a new MSI vector. To avoid the conflict +of new assigned vector with existing pre-assigned vector requires +the device driver to call this API before calling request_irq(...). + +The below diagram shows the events, which switches the interrupt +mode on the MSI-capable device function between MSI mode and +PIN-IRQ assertion mode. + + ------------ pci_enable_msi ------------------------ + | | <=============== | | + | MSI MODE | | PIN-IRQ ASSERTION MODE | + | | ===============> | | + ------------ free_irq ------------------------ + +5.2 Configuring for MSI support + +Due to the non-contiguous fashion in vector assignment of the +existing Linux kernel, this patch does not support multiple +messages regardless of the device function is capable of supporting +more than one vector. The bus driver initializes only entry 0 of +this capability if pci_enable_msi(...) is called successfully by +the device driver. + +5.3 Configuring for MSI-X support + +Both the MSI capability structure and the MSI-X capability structure +share the same above semantics; however, due to the ability of the +system software to configure each vector of the MSI-X capability +structure with an independent message address and message data, the +non-contiguous fashion in vector assignment of the existing Linux +kernel has no impact on supporting multiple messages on an MSI-X +capable device functions. By default, as mentioned above, ONE vector +should be always allocated to the MSI-X capability structure at +entry 0. The bus driver does not initialize other entries of the +MSI-X table. + +Note that the PCI subsystem should have full control of a MSI-X +table that resides in Memory Space. The software device driver +should not access this table. + +To request for additional vectors, the device software driver should +call function msi_alloc_vectors(). It is recommended that the +software driver should call this function once during the +initialization phase of the device driver. + +The function msi_alloc_vectors(), once invoked, enables either +all or nothing, depending on the current availability of vector +resources. If no vector resources are available, the device function +still works with ONE vector. If the vector resources are available +for the number of vectors requested by the driver, this function +will reconfigure the MSI-X capability structure of the device with +additional messages, starting from entry 1. To emphasize this +reason, for example, the device may be capable for supporting the +maximum of 32 vectors while its software driver usually may request +4 vectors. + +For each vector, after this successful call, the device driver is +responsible to call other functions like request_irq(), enable_irq(), +etc. to enable this vector with its corresponding interrupt service +handler. It is the device driver's choice to have all vectors shared +the same interrupt service handler or each vector with a unique +interrupt service handler. + +In addition to the function msi_alloc_vectors(), another function +msi_free_vectors() is provided to allow the software driver to +release a number of vectors back to the vector resources. Once +invoked, the PCI subsystem disables (masks) each vector released. +These vectors are no longer valid for the hardware device and its +software driver to use. Like free_irq, it recommends that the +device driver should also call msi_free_vectors to release all +additional vectors previously requested. + +int msi_alloc_vectors(struct pci_dev *dev, int *vector, int nvec) + +This API enables the software driver to request the PCI subsystem +for additional messages. Depending on the number of vectors +available, the PCI subsystem enables either all or nothing. + +Argument dev points to the device (pci_dev) structure. +Argument vector is a pointer of integer type. The number of +elements is indicated in argument nvec. +Argument nvec is an integer indicating the number of messages +requested. +A return of zero indicates that the number of allocated vector is +successfully allocated. Otherwise, indicate resources not +available. + +int msi_free_vectors(struct pci_dev* dev, int *vector, int nvec) + +This API enables the software driver to inform the PCI subsystem +that it is willing to release a number of vectors back to the +MSI resource pool. Once invoked, the PCI subsystem disables each +MSI-X entry associated with each vector stored in the argument 2. +These vectors are no longer valid for the hardware device and +its software driver to use. + +Argument dev points to the device (pci_dev) structure. +Argument vector is a pointer of integer type. The number of +elements is indicated in argument nvec. +Argument nvec is an integer indicating the number of messages +released. +A return of zero indicates that the number of allocated vectors +is successfully released. Otherwise, indicates a failure. + +5.4 Hardware requirements for MSI support +MSI support requires support from both system hardware and +individual hardware device functions. + +5.4.1 System hardware support +Since the target of MSI address is the local APIC CPU, enabling +MSI support in Linux kernel is dependent on whether existing +system hardware supports local APIC. Users should verify their +system whether it runs when CONFIG_X86_LOCAL_APIC=y. + +In SMP environment, CONFIG_X86_LOCAL_APIC is automatically set; +however, in UP environment, users must manually set +CONFIG_X86_LOCAL_APIC. Once CONFIG_X86_LOCAL_APIC=y, setting +CONFIG_PCI_USE_VECTOR enables the VECTOR based scheme and +the option for MSI-capable device drivers to selectively enable +MSI (using pci_enable_msi as desribed below). + +Note that CONFIG_X86_IO_APIC setting is irrelevant because MSI +vector is allocated new during runtime and MSI support does not +depend on BIOS support. This key independency enables MSI support +on future IOxAPIC free platform. + +5.4.2 Device hardware support +The hardware device function supports MSI by indicating the +MSI/MSI-X capability structure on its PCI capability list. By +default, this capability structure will not be initialized by +the kernel to enable MSI during the system boot. In other words, +the device function is running on its default pin assertion mode. +Note that in many cases the hardware supporting MSI have bugs, +which may result in system hang. The software driver of specific +MSI-capable hardware is responsible for whether calling +pci_enable_msi or not. A return of zero indicates the kernel +successfully initializes the MSI/MSI-X capability structure of the +device funtion. The device function is now running on MSI mode. + +5.5 How to tell whether MSI is enabled on device function + +At the driver level, a return of zero from pci_enable_msi(...) +indicates to the device driver that its device function is +initialized successfully and ready to run in MSI mode. + +At the user level, users can use command 'cat /proc/interrupts' +to display the vector allocated for the device and its interrupt +mode, as shown below. + + CPU0 CPU1 + 0: 324639 0 IO-APIC-edge timer + 1: 1186 0 IO-APIC-edge i8042 + 2: 0 0 XT-PIC cascade + 12: 2797 0 IO-APIC-edge i8042 + 14: 6543 0 IO-APIC-edge ide0 + 15: 1 0 IO-APIC-edge ide1 +169: 0 0 IO-APIC-level uhci-hcd +185: 0 0 IO-APIC-level uhci-hcd +193: 138 10 PCI MSI aic79xx +201: 30 0 PCI MSI aic79xx +225: 30 0 IO-APIC-level aic7xxx +233: 30 0 IO-APIC-level aic7xxx +NMI: 0 0 +LOC: 324553 325068 +ERR: 0 +MIS: 0 + +6. FAQ + +Q1. Are there any limitations on using the MSI? + +A1. If the PCI device supports MSI and conforms to the +specification and the platform supports the APIC local bus, +then using MSI should work. + +Q2. Will it work on all the Pentium processors (P3, P4, Xeon, +AMD processors)? In P3 IPI's are transmitted on the APIC local +bus and in P4 and Xeon they are transmitted on the system +bus. Are there any implications with this? + +A2. MSI support enables a PCI device sending an inbound +memory write (0xfeexxxxx as target address) on its PCI bus +directly to the FSB. Since the message address has a +redirection hint bit cleared, it should work. + +Q3. The target address 0xfeexxxxx will be translated by the +Host Bridge into an interrupt message. Are there any +limitations on the chipsets such as Intel 8xx, Intel e7xxx, +or VIA? + +A3. If these chipsets support an inbound memory write with +target address set as 0xfeexxxxx, as conformed to PCI +specification 2.3 or latest, then it should work. + +Q4. From the driver point of view, if the MSI is lost because +of the errors occur during inbound memory write, then it may +wait for ever. Is there a mechanism for it to recover? + +A4. Since the target of the transaction is an inbound memory +write, all transaction termination conditions (Retry, +Master-Abort, Target-Abort, or normal completion) are +supported. A device sending an MSI must abide by all the PCI +rules and conditions regarding that inbound memory write. So, +if a retry is signaled it must retry, etc... We believe that +the recommendation for Abort is also a retry (refer to PCI +specification 2.3 or latest). diff -Nru a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking --- a/Documentation/filesystems/Locking Tue Dec 30 13:48:29 2003 +++ b/Documentation/filesystems/Locking Tue Dec 30 13:48:29 2003 @@ -420,7 +420,7 @@ prototypes: void (*open)(struct vm_area_struct*); void (*close)(struct vm_area_struct*); - struct page *(*nopage)(struct vm_area_struct*, unsigned long, int); + struct page *(*nopage)(struct vm_area_struct*, unsigned long, int *); locking rules: BKL mmap_sem diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt --- a/Documentation/kernel-parameters.txt Tue Dec 30 13:48:30 2003 +++ b/Documentation/kernel-parameters.txt Tue Dec 30 13:48:30 2003 @@ -24,6 +24,7 @@ HW Appropriate hardware is enabled. IA-32 IA-32 aka i386 architecture is enabled. IA-64 IA-64 architecture is enabled. + IOSCHED More than one I/O scheduler is enabled. IP_PNP IP DCHP, BOOTP, or RARP is enabled. ISAPNP ISA PnP code is enabled. ISDN Appropriate ISDN support is enabled. @@ -303,6 +304,10 @@ See comment before function elanfreq_setup() in arch/i386/kernel/cpu/cpufreq/elanfreq.c. + elevator= [IOSCHED] + Format: {"as"|"cfq"|"deadline"|"noop"} + See Documentation/as-iosched.txt for details + es1370= [HW,OSS] Format: [,] See also header of sound/oss/es1370.c. @@ -790,7 +795,8 @@ before loading. See Documentation/ramdisk.txt. - psmouse_noext [HW,MOUSE] Disable probing for PS2 mouse protocol extensions + psmouse_proto= [HW,MOUSE] Highest PS2 mouse protocol extension to + probe for (bare|imps|exps). psmouse_resetafter= [HW,MOUSE] Try to reset Synaptics Touchpad after so many diff -Nru a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt --- a/Documentation/networking/ip-sysctl.txt Tue Dec 30 13:48:29 2003 +++ b/Documentation/networking/ip-sysctl.txt Tue Dec 30 13:48:29 2003 @@ -678,4 +678,23 @@ Pekka Savola YOSHIFUJI Hideaki / USAGI Project + +/proc/sys/net/bridge/* Variables: + +bridge-nf-call-arptables - BOOLEAN + 1 : pass bridged ARP traffic to arptables' FORWARD chain. + 0 : disable this. + Default: 1 + +bridge-nf-call-iptables - BOOLEAN + 1 : pass bridged IPv4 traffic to iptables' chains. + 0 : disable this. + Default: 1 + +bridge-nf-filter-vlan-tagged - BOOLEAN + 1 : pass bridged vlan-tagged ARP/IP traffic to arptables/iptables. + 0 : disable this. + Default: 1 + + $Id: ip-sysctl.txt,v 1.20 2001/12/13 09:00:18 davem Exp $ diff -Nru a/Documentation/usb/w9968cf.txt b/Documentation/usb/w9968cf.txt --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/Documentation/usb/w9968cf.txt Tue Dec 30 13:48:30 2003 @@ -0,0 +1,463 @@ + + W996[87]CF JPEG USB Dual Mode Camera Chip driver for Linux 2.6 + ============================================================== + + - Documentation - + + +Index +===== +1. Copyright +2. License +3. Overview +4. Supported devices +5. Kernel configuration and third-part module compilation +6. Module loading +7. Module paramaters +8. Credits + + +1. Copyright +============ +Copyright (C) 2002 2003 by Luca Risolia + + +2. License +========== +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + +3. Overview +=========== +This driver supports the video streaming capabilities of the devices mounting +Winbond W9967CF and Winbond W9968CF JPEG USB Dual Mode Camera Chips, when they +are being commanded by USB. + +The driver relies on the Video4Linux, USB and I2C core modules of the Linux +kernel, version 2.6.0 or greater, and is not compatible in any way with +previous versions. It has been designed to run properly on SMP systems +as well. At the moment, an additional module, "ovcamchip", is mandatory; it +provides support for some OmniVision CMOS sensors connected to the W996[87]CF +chips. + +The driver is split into two modules: the basic one, "w9968cf", is needed for +the supported devices to work; the second one, "w9968cf-vpp", is an optional +module, which provides some useful video post-processing functions like video +decoding, up-scaling and colour conversions. These routines can't be included +into official kernels for performance purposes. Once the driver is installed, +every time an application tries to open a recognized device, "w9968cf" checks +the presence of the "w9968cf-vpp" module and loads it automatically by default. + +Up to 32 cameras can be handled at the same time. They can be connected and +disconnected from the host many times without turning off the computer, if +your system supports the hotplug facility. + +To change the default settings for each camera, many paramaters can be passed +through command line when the module is loaded into memory. + +The latest and full featured version of the W996[87]CF driver can be found at: +http://go.lamarinapunto.com/ + +The "ovcamchip" module is part of the OV511 driver, version 2.25, which can be +downloaded from internet: +http://alpha.dyndns.org/ov511/ +To know how to patch, compile and load it, read the paragraphs below. + + +4. Supported devices +==================== +At the moment, known W996[87]CF based devices are: +- Aroma Digi Pen ADG-5000 Refurbished +- AVerTV USB +- Creative Labs Video Blaster WebCam Go +- Creative Labs Video Blaster WebCam Go Plus +- Die Lebon LDC-D35A Digital Kamera +- Ezonics EZ-802 EZMega Cam +- OPCOM Digi Pen VGA Dual Mode Pen Camera + +If you know any other W996[87]CF based cameras, please contact me. + +The list above does NOT imply that all those devices work with this driver: up +until now only webcams that have a CMOS sensor supported by the "ovcamchip" +module work. +For a list of supported CMOS sensors, please visit the module author homepage: +http://alpha.dyndns.org/ov511/ + +Possible external microcontrollers of those webcams are not supported: this +means that still images can't be downloaded from the device memory. + +Furthermore, it's worth to note that I was only able to run tests on my +"Creative Labs Video Blaster WebCam Go". Donations of other models, for +additional testing and full support, would be much appreciated. + + +5. Kernel configuration and third-part module compilation +========================================================= +As noted above, kernel 2.6.0 is the minimum for this driver; for it to work +properly, the driver needs kernel support for Video4Linux, USB and I2C, and a +third-part module for the CMOS sensor. + +The following options of the kernel configuration file must be enabled and +corresponding modules must be compiled: + + # Multimedia devices + # + CONFIG_VIDEO_DEV=m + + # I2C support + # + CONFIG_I2C=m + +The I2C core module can be compiled statically in the kernel as well. + + # USB support + # + CONFIG_USB=m + +In addition, depending on the hardware being used, just one of the modules +below is necessary: + + # USB Host Controller Drivers + # + CONFIG_USB_EHCI_HCD=m + CONFIG_USB_UHCI_HCD=m + CONFIG_USB_OHCI_HCD=m + +Also, make sure "Enforce bandwidth allocation" is NOT enabled. + + # USB Multimedia devices + # + CONFIG_USB_W9968CF=m + +The last module we need is "ovcamchip.o". To obtain it, you have to download +the OV511 driver, version 2.25 - don't use other versions - which is available +at http://alpha.dyndns.org/ov511/ . Then you have to download the latest +version of the full featured W996[87]CF driver, which contains a patch for the +"ovcamchip" module; it is available at http://go.lamarinapunto.com . +Once you have obtained the packages, decompress, patch and compile the +"ovcamchip" module. In other words: + + [user@localhost home]$ tar xvzf w9968cf-x.x.tar.gz + [user@localhost home]$ tar xvjf ov511-2.25.tar.bz2 + [user@localhost home]$ cd ov511-2.25 + [user@localhost ov511-2.25]$ patch -p1 < \ + /path/to/w9968cf-x.x/ov511-2.25.patch + [user@localhost ov511-2.25]$ make + +It's worth to note that the full featured version of the W996[87]CF driver +can also be installed overwriting the one in the kernel; in this case, read the +documentation included in the package. + +If everything went well, the W996[87]CF driver can be immediatly used (see next +paragraph). + + +6. Module loading +================= +To use the driver, it is necessary to load the "w9968cf" module into memory +after every other module required. + +For example, loading can be done this way, as root: + + [root@localhost home]# modprobe usbcore + [root@localhost home]# modprobe i2c-core + [root@localhost ov511-x.xx]# insmod ./ovcamchip.ko + [root@localhost home]# modprobe w9968cf + +At this point the devices should be recognized: "dmesg" can be used to analyze +kernel messages: + + [user@localhost home]$ dmesg + +There are a lot of parameters the module can use to change the default +settings for each device. To list every possible parameter with a brief +explanation about them and which syntax to use, it is recommended to run the +"modinfo" command: + + [root@locahost home]# modinfo w9968cf + + +7. Module paramaters +==================== + +Module paramaters are listed below: +------------------------------------------------------------------------------- +Name: vppmod_load +Type: int +Syntax: <0|1> +Description: Automatic 'w9968cf-vpp' module loading: 0 disabled, 1 enabled. + If enabled, every time an application attempts to open a + camera, 'insmod' searches for the video post-processing module + in the system and loads it automatically (if present). + The 'w9968cf-vpp' module adds extra image manipulation + capabilities to the 'w9968cf' module,like software up-scaling, + colour conversions and video decoding. +Default: 1 +------------------------------------------------------------------------------- +Name: simcams +Type: int +Syntax: +Description: Number of cameras allowed to stream simultaneously. + n may vary from 0 to 32. +Default: 32 +------------------------------------------------------------------------------- +Name: video_nr +Type: int array (min = 0, max = 32) +Syntax: <-1|n[,...]> +Description: Specify V4L minor mode number. + -1 = use next available + n = use minor number n + You can specify 32 cameras this way. + For example: + video_nr=-1,2,-1 would assign minor number 2 to the second + recognized camera and use auto for the first one and for every + other camera. +Default: -1 +------------------------------------------------------------------------------- +Name: packet_size +Type: int array (min = 0, max = 32) +Syntax: +Description: Specify the maximum data payload size in bytes for alternate + settings, for each device. n is scaled between 63 and 1023. +Default: 1023 +------------------------------------------------------------------------------- +Name: max_buffers +Type: int array (min = 0, max = 32) +Syntax: +Description: Only for advanced users. + Specify the maximum number of video frame buffers to allocate + for each device, from 2 to 32. +Default: 2 +------------------------------------------------------------------------------- +Name: double_buffer +Type: int array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: Hardware double buffering: 0 disabled, 1 enabled. + It should be enabled if you want smooth video output: if you + obtain out of sync. video, disable it at all, or try to + decrease the 'clockdiv' module paramater value. +Default: 1 for every device. +------------------------------------------------------------------------------- +Name: clamping +Type: int array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: Video data clamping: 0 disabled, 1 enabled. +Default: 0 for every device. +------------------------------------------------------------------------------- +Name: filter_type +Type: int array (min = 0, max = 32) +Syntax: <0|1|2[,...]> +Description: Video filter type. + 0 none, 1 (1-2-1) 3-tap filter, 2 (2-3-6-3-2) 5-tap filter. + The filter is used to reduce noise and aliasing artifacts + produced by the CCD or CMOS sensor. +Default: 0 for every device. +------------------------------------------------------------------------------- +Name: largeview +Type: int array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: Large view: 0 disabled, 1 enabled. +Default: 1 for every device. +------------------------------------------------------------------------------- +Name: upscaling +Type: int array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: Software scaling (for non-compressed video only): + 0 disabled, 1 enabled. + Disable it if you have a slow CPU or you don't have enough + memory. +Default: 0 for every device. +Note: If 'w9968cf-vpp' is not loaded, this paramater is set to 0. +------------------------------------------------------------------------------- +Name: decompression +Type: int array (min = 0, max = 32) +Syntax: <0|1|2[,...]> +Description: Software video decompression: + 0 = disables decompression + (doesn't allow formats needing decompression). + 1 = forces decompression + (allows formats needing decompression only). + 2 = allows any permitted formats. + Formats supporting (de)compressed video are YUV422P and + YUV420P/YUV420 in any resolutions where width and height are + multiples of 16. +Default: 2 for every device. +Note: If 'w9968cf-vpp' is not loaded, forcing decompression is not + allowed; in this case this paramater is set to 2. +------------------------------------------------------------------------------- +Name: force_palette +Type: int array (min = 0, max = 32) +Syntax: <0|9|10|13|15|8|7|1|6|3|4|5[,...]> +Description: Force picture palette. + In order: + 0 = Off - allows any of the following formats: + 9 = UYVY 16 bpp - Original video, compression disabled + 10 = YUV420 12 bpp - Original video, compression enabled + 13 = YUV422P 16 bpp - Original video, compression enabled + 15 = YUV420P 12 bpp - Original video, compression enabled + 8 = YUVY 16 bpp - Software conversion from UYVY + 7 = YUV422 16 bpp - Software conversion from UYVY + 1 = GREY 8 bpp - Software conversion from UYVY + 6 = RGB555 16 bpp - Software conversion from UYVY + 3 = RGB565 16 bpp - Software conversion from UYVY + 4 = RGB24 24 bpp - Software conversion from UYVY + 5 = RGB32 32 bpp - Software conversion from UYVY + When not 0, this paramater will override 'decompression'. +Default: 0 for every device. Initial palette is 9 (UYVY). +Note: If 'w9968cf-vpp' is not loaded, this paramater is set to 9. +------------------------------------------------------------------------------- +Name: force_rgb +Type: int array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: Read RGB video data instead of BGR: + 1 = use RGB component ordering. + 0 = use BGR component ordering. + This parameter has effect when using RGBX palettes only. +Default: 0 for every device. +------------------------------------------------------------------------------- +Name: autobright +Type: long array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: CMOS sensor automatically changes brightness: + 0 = no, 1 = yes +Default: 0 for every device. +------------------------------------------------------------------------------- +Name: autoexp +Type: long array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: CMOS sensor automatically changes exposure: + 0 = no, 1 = yes +Default: 1 for every device. +------------------------------------------------------------------------------- +Name: lightfreq +Type: long array (min = 0, max = 32) +Syntax: <50|60[,...]> +Description: Light frequency in Hz: + 50 for European and Asian lighting, 60 for American lighting. +Default: 50 for every device. +------------------------------------------------------------------------------- +Name: bandingfilter +Type: long array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: Banding filter to reduce effects of fluorescent + lighting: + 0 disabled, 1 enabled. + This filter tries to reduce the pattern of horizontal + light/dark bands caused by some (usually fluorescent) lighting. +Default: 0 for every device. +------------------------------------------------------------------------------- +Name: clockdiv +Type: long array (min = 0, max = 32) +Syntax: <-1|n[,...]> +Description: Force pixel clock divisor to a specific value (for experts): + n may vary from 0 to 127. + -1 for automatic value. + See also the 'double_buffer' module paramater. +Default: -1 for every device. +------------------------------------------------------------------------------- +Name: backlight +Type: long array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: Objects are lit from behind: + 0 = no, 1 = yes +Default: 0 for every device. +------------------------------------------------------------------------------- +Name: mirror +Type: long array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: Reverse image horizontally: + 0 = no, 1 = yes +Default: 0 for every device. +------------------------------------------------------------------------------- +Name: sensor_mono +Type: long array (min = 0, max = 32) +Syntax: <0|1[,...]> +Description: The CMOS sensor is monochrome: + 0 = no, 1 = yes +Default: 0 for every device. +------------------------------------------------------------------------------- +Name: brightness +Type: long array (min = 0, max = 32) +Syntax: +Description: Set picture brightness (0-65535). + This parameter has no effect if 'autobright' is enabled. +Default: 31000 for every device. +------------------------------------------------------------------------------- +Name: hue +Type: long array (min = 0, max = 32) +Syntax: +Description: Set picture hue (0-65535). +Default: 32768 for every device. +------------------------------------------------------------------------------- +Name: colour +Type: long array (min = 0, max = 32) +Syntax: +Description: Set picture saturation (0-65535). +Default: 32768 for every device. +------------------------------------------------------------------------------- +Name: contrast +Type: long array (min = 0, max = 32) +Syntax: +Description: Set picture contrast (0-65535). +Default: 50000 for every device. +------------------------------------------------------------------------------- +Name: whiteness +Type: long array (min = 0, max = 32) +Syntax: +Description: Set picture whiteness (0-65535). +Default: 32768 for every device. +------------------------------------------------------------------------------- +Name: debug +Type: int +Syntax: +Description: Debugging information level, from 0 to 6: + 0 = none (be cautious) + 1 = critical errors + 2 = significant informations + 3 = configuration or general messages + 4 = warnings + 5 = called functions + 6 = function internals + Level 5 and 6 are useful for testing only, when just one + device is used. +Default: 2 +------------------------------------------------------------------------------- +Name: specific_debug +Type: int +Syntax: <0|1> +Description: Enable or disable specific debugging messages: + 0 = print messages concerning every level <= 'debug' level. + 1 = print messages concerning the level indicated by 'debug'. +Default: 0 +------------------------------------------------------------------------------- + + +8. Credits +========== +The development would not have proceed much further without having looked at +the source code of other drivers and without the help of several persons; in +particular: + +- the I2C interface to kernel and high-level CMOS sensor control routines have + been taken from the OV511 driver by Mark McClelland; + +- memory management code has been copied from the bttv driver by Ralph Metzler, + Marcus Metzler and Gerd Knorr; + +- the low-level I2C read function has been written by Frédéric Jouault, who + also gave me commented logs about sniffed USB traffic taken from another + driver for another system; + +- the low-level I2C fast write function has been written by Piotr Czerczak; diff -Nru a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt --- a/Documentation/watchdog/watchdog-api.txt Tue Dec 30 13:48:28 2003 +++ b/Documentation/watchdog/watchdog-api.txt Tue Dec 30 13:48:28 2003 @@ -358,6 +358,15 @@ No bits set in GETSUPPORT +w83627hf_wdt.c -- w83627hf watchdog + + Timeout that defaults to 60 seconds, supports SETTIMEOUT. + + Supports CONFIG_WATCHDOG_NOWAYOUT + + GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT. + The GETSTATUS call returns if the device is open or not. + wdt.c -- ICS WDT500/501 ISA and wdt_pci.c -- ICS WDT500/501 PCI diff -Nru a/MAINTAINERS b/MAINTAINERS --- a/MAINTAINERS Tue Dec 30 13:48:29 2003 +++ b/MAINTAINERS Tue Dec 30 13:48:29 2003 @@ -73,7 +73,7 @@ 3C359 NETWORK DRIVER P: Mike Phillips M: mikep@linuxtr.net -L: linux-net@vger.rutgers.edu +L: linux-net@vger.kernel.org L: linux-tr@linuxtr.net W: http://www.linuxtr.net S: Maintained @@ -929,8 +929,9 @@ S: Maintained SN-IA64 (Itanium) SUB-PLATFORM -P: John Hesterberg -M: jh@sgi.com +P: Jesse Barnes +M: jbarnes@sgi.com +L: linux-altix@sgi.com L: linux-ia64@linuxia64.org W: http://www.sgi.com/altix S: Maintained @@ -1468,7 +1469,7 @@ P: Willem Riede M: osst@riede.org L: osst@linux1.onstream.nl -L: linux-scsi@vger.rutgers.edu +L: linux-scsi@vger.kernel.org S: Maintained OPL3-SA2, SA3, and SAx DRIVER @@ -1852,8 +1853,10 @@ S: Maintained SPARC (sparc32): +P: Keith M. Wesolowski +M: wesolows@foobazco.org L: sparclinux@vger.kernel.org -S: Unmaintained - please send patches to mailing list +S: Maintained SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER P: Roger Wolff @@ -2216,6 +2219,13 @@ P: David Brownell M: dbrownell@users.sourceforge.net L: linux-usb-devel@lists.sourceforge.net +S: Maintained + +USB W996[87]CF DRIVER +P: Luca Risolia +M: luca_ing@libero.it +L: linux-usb-devel@lists.sourceforge.net +W: http://go.lamarinapunto.com S: Maintained USER-MODE LINUX diff -Nru a/Makefile b/Makefile --- a/Makefile Tue Dec 30 13:48:29 2003 +++ b/Makefile Tue Dec 30 13:48:29 2003 @@ -275,7 +275,7 @@ CPPFLAGS := -D__KERNEL__ -Iinclude \ $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) -CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ +CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ -fno-strict-aliasing -fno-common AFLAGS := -D__ASSEMBLY__ @@ -430,6 +430,12 @@ # Here goes the main Makefile # --------------------------------------------------------------------------- + +ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE +CFLAGS += -Os +else +CFLAGS += -O2 +endif ifndef CONFIG_FRAME_POINTER CFLAGS += -fomit-frame-pointer diff -Nru a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c --- a/arch/alpha/kernel/irq.c Tue Dec 30 13:48:29 2003 +++ b/arch/alpha/kernel/irq.c Tue Dec 30 13:48:29 2003 @@ -252,9 +252,11 @@ irq_affinity_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data) { - if (count < HEX_DIGITS+1) + int len = cpumask_snprintf(page, count, irq_affinity[(long)data]); + if (count - len < 2) return -EINVAL; - return sprintf (page, "%016lx\n", irq_affinity[(long)data]); + len += sprintf(page + len, "\n"); + return len; } static unsigned int @@ -331,10 +333,11 @@ prof_cpu_mask_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { - unsigned long *mask = (unsigned long *) data; - if (count < HEX_DIGITS+1) + int len = cpumask_snprintf(page, count, *(cpumask_t *)data); + if (count - len < 2) return -EINVAL; - return sprintf (page, "%016lx\n", *mask); + len += sprintf(page + len, "\n"); + return len; } static int @@ -529,19 +532,21 @@ #ifdef CONFIG_SMP int j; #endif - int i; + int i = *(loff_t *) v; struct irqaction * action; unsigned long flags; #ifdef CONFIG_SMP - seq_puts(p, " "); - for (i = 0; i < NR_CPUS; i++) - if (cpu_online(i)) - seq_printf(p, "CPU%d ", i); - seq_putc(p, '\n'); + if (i == 0) { + seq_puts(p, " "); + for (i = 0; i < NR_CPUS; i++) + if (cpu_online(i)) + seq_printf(p, "CPU%d ", i); + seq_putc(p, '\n'); + } #endif - for (i = 0; i < ACTUAL_NR_IRQS; i++) { + if (i < ACTUAL_NR_IRQS) { spin_lock_irqsave(&irq_desc[i].lock, flags); action = irq_desc[i].action; if (!action) @@ -568,15 +573,16 @@ seq_putc(p, '\n'); unlock: spin_unlock_irqrestore(&irq_desc[i].lock, flags); - } + } else if (i == ACTUAL_NR_IRQS) { #ifdef CONFIG_SMP - seq_puts(p, "IPI: "); - for (i = 0; i < NR_CPUS; i++) - if (cpu_online(i)) - seq_printf(p, "%10lu ", cpu_data[i].ipi_count); - seq_putc(p, '\n'); + seq_puts(p, "IPI: "); + for (i = 0; i < NR_CPUS; i++) + if (cpu_online(i)) + seq_printf(p, "%10lu ", cpu_data[i].ipi_count); + seq_putc(p, '\n'); #endif - seq_printf(p, "ERR: %10lu\n", irq_err_count); + seq_printf(p, "ERR: %10lu\n", irq_err_count); + } return 0; } diff -Nru a/arch/arm/Makefile b/arch/arm/Makefile --- a/arch/arm/Makefile Tue Dec 30 13:48:29 2003 +++ b/arch/arm/Makefile Tue Dec 30 13:48:29 2003 @@ -14,8 +14,6 @@ GZFLAGS :=-9 #CFLAGS +=-pipe -CFLAGS :=$(CFLAGS:-O2=-Os) - ifeq ($(CONFIG_FRAME_POINTER),y) CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog endif diff -Nru a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile --- a/arch/arm/boot/compressed/Makefile Tue Dec 30 13:48:28 2003 +++ b/arch/arm/boot/compressed/Makefile Tue Dec 30 13:48:28 2003 @@ -23,10 +23,6 @@ OBJS += head-shark.o ofw-shark.o endif -ifeq ($(CONFIG_ARCH_INTEGRATOR),y) -OBJS += head-integrator.o -endif - ifeq ($(CONFIG_ARCH_CAMELOT),y) OBJS += head-epxa10db.o endif diff -Nru a/arch/arm/boot/compressed/head-integrator.S b/arch/arm/boot/compressed/head-integrator.S --- a/arch/arm/boot/compressed/head-integrator.S Tue Dec 30 13:48:29 2003 +++ /dev/null Wed Dec 31 16:00:00 1969 @@ -1,4 +0,0 @@ -#include - - .section ".start", "ax" - mov r7, #MACH_TYPE_INTEGRATOR diff -Nru a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S --- a/arch/arm/boot/compressed/head.S Tue Dec 30 13:48:29 2003 +++ b/arch/arm/boot/compressed/head.S Tue Dec 30 13:48:29 2003 @@ -503,12 +503,6 @@ @ Everything from here on will be the new ID system. - .word 0x41129200 @ ARM920T - .word 0xff00fff0 - b __armv4_cache_on - b __armv4_cache_off - b __armv4_cache_flush - .word 0x4401a100 @ sa110 / sa1100 .word 0xffffffe0 b __armv4_cache_on @@ -522,6 +516,12 @@ b __armv4_cache_flush @ These match on the architecture ID + + .word 0x00020000 @ ARMv4T + .word 0x000f0000 + b __armv4_cache_on + b __armv4_cache_off + b __armv4_cache_flush .word 0x00050000 @ ARMv5TE .word 0x000f0000 diff -Nru a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c --- a/arch/arm/common/sa1111.c Tue Dec 30 13:48:29 2003 +++ b/arch/arm/common/sa1111.c Tue Dec 30 13:48:29 2003 @@ -34,6 +34,8 @@ #include +extern void __init sa1110_mb_enable(void); + /* * We keep the following data for the overall SA1111. Note that the * struct device and struct resource are "fake"; they should be supplied @@ -561,6 +563,8 @@ dev->res.name = dev->dev.bus_id; dev->res.flags = IORESOURCE_MEM; dev->mapbase = sachip->base + info->offset; + dev->skpcr_mask = info->skpcr_mask; + memmove(dev->irq, info->irq, sizeof(dev->irq)); ret = request_resource(parent, &dev->res); if (ret) { diff -Nru a/arch/arm/configs/netwinder_defconfig b/arch/arm/configs/netwinder_defconfig --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/arm/configs/netwinder_defconfig Tue Dec 30 13:48:30 2003 @@ -0,0 +1,968 @@ +# +# Automatically generated make config: don't edit +# +CONFIG_ARM=y +CONFIG_MMU=y +CONFIG_UID16=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y + +# +# Code maturity level options +# +CONFIG_EXPERIMENTAL=y +CONFIG_CLEAN_COMPILE=y +CONFIG_STANDALONE=y +CONFIG_BROKEN_ON_SMP=y + +# +# General setup +# +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_SYSCTL=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y + +# +# Loadable module support +# +# CONFIG_MODULES is not set + +# +# System Type +# +# CONFIG_ARCH_ADIFCC is not set +# CONFIG_ARCH_ANAKIN is not set +# CONFIG_ARCH_CLPS7500 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CO285 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_CAMELOT is not set +CONFIG_ARCH_FOOTBRIDGE=y +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_IOP3XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_SHARK is not set + +# +# CLPS711X/EP721X Implementations +# + +# +# Epxa10db +# + +# +# Footbridge Implementations +# +# CONFIG_ARCH_CATS is not set +# CONFIG_ARCH_PERSONAL_SERVER is not set +# CONFIG_ARCH_EBSA285_ADDIN is not set +# CONFIG_ARCH_EBSA285_HOST is not set +CONFIG_ARCH_NETWINDER=y + +# +# IOP3xx Implementation Options +# +# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP321 is not set + +# +# IOP3xx Chipset Features +# + +# +# Intel PXA250/210 Implementations +# + +# +# SA11x0 Implementations +# +CONFIG_FOOTBRIDGE=y +CONFIG_FOOTBRIDGE_HOST=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_SA110=y +CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_TLB_V4WB=y + +# +# Processor Features +# + +# +# General setup +# +CONFIG_PCI=y +CONFIG_ISA=y +CONFIG_ISA_DMA=y +# CONFIG_ZBOOT_ROM is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_PCI_LEGACY_PROC=y +CONFIG_PCI_NAMES=y +# CONFIG_HOTPLUG is not set + +# +# At least one math emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_AOUT=y +# CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# +# CONFIG_PM is not set +# CONFIG_PREEMPT is not set +# CONFIG_ARTHUR is not set +CONFIG_CMDLINE="root=0x301" +CONFIG_LEDS=y +# CONFIG_LEDS_TIMER is not set +CONFIG_LEDS_CPU=y +CONFIG_ALIGNMENT_TRAP=y + +# +# Parallel port support +# +CONFIG_PARPORT=y +CONFIG_PARPORT_PC=y +CONFIG_PARPORT_PC_CML1=y +# CONFIG_PARPORT_SERIAL is not set +# CONFIG_PARPORT_PC_FIFO is not set +CONFIG_PARPORT_PC_SUPERIO=y +# CONFIG_PARPORT_ARC is not set +# CONFIG_PARPORT_OTHER is not set +# CONFIG_PARPORT_1284 is not set + +# +# Memory Technology Devices (MTD) +# +# CONFIG_MTD is not set + +# +# Plug and Play support +# +# CONFIG_PNP is not set + +# +# Block devices +# +# CONFIG_BLK_DEV_FD is not set +# CONFIG_BLK_DEV_XD is not set +# CONFIG_PARIDE is not set +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_BLK_DEV_INITRD is not set + +# +# Multi-device support (RAID and LVM) +# +# CONFIG_MD is not set + +# +# Networking support +# +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_NETLINK_DEV=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_INET_ECN is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set + +# +# IP: Virtual Server Configuration +# +# CONFIG_IP_VS is not set +# CONFIG_IPV6 is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set + +# +# IP: Netfilter Configuration +# +CONFIG_IP_NF_CONNTRACK=y +CONFIG_IP_NF_FTP=y +# CONFIG_IP_NF_IRC is not set +# CONFIG_IP_NF_TFTP is not set +# CONFIG_IP_NF_AMANDA is not set +CONFIG_IP_NF_QUEUE=y +CONFIG_IP_NF_IPTABLES=y +# CONFIG_IP_NF_MATCH_LIMIT is not set +# CONFIG_IP_NF_MATCH_IPRANGE is not set +# CONFIG_IP_NF_MATCH_MAC is not set +# CONFIG_IP_NF_MATCH_PKTTYPE is not set +# CONFIG_IP_NF_MATCH_MARK is not set +# CONFIG_IP_NF_MATCH_MULTIPORT is not set +# CONFIG_IP_NF_MATCH_TOS is not set +# CONFIG_IP_NF_MATCH_RECENT is not set +# CONFIG_IP_NF_MATCH_ECN is not set +# CONFIG_IP_NF_MATCH_DSCP is not set +# CONFIG_IP_NF_MATCH_AH_ESP is not set +# CONFIG_IP_NF_MATCH_LENGTH is not set +# CONFIG_IP_NF_MATCH_TTL is not set +# CONFIG_IP_NF_MATCH_TCPMSS is not set +# CONFIG_IP_NF_MATCH_HELPER is not set +# CONFIG_IP_NF_MATCH_STATE is not set +# CONFIG_IP_NF_MATCH_CONNTRACK is not set +# CONFIG_IP_NF_MATCH_OWNER is not set +# CONFIG_IP_NF_FILTER is not set +# CONFIG_IP_NF_NAT is not set +# CONFIG_IP_NF_MANGLE is not set +# CONFIG_IP_NF_TARGET_LOG is not set +# CONFIG_IP_NF_TARGET_ULOG is not set +# CONFIG_IP_NF_TARGET_TCPMSS is not set +# CONFIG_IP_NF_ARPTABLES is not set + +# +# SCTP Configuration (EXPERIMENTAL) +# +CONFIG_IPV6_SCTP__=y +# CONFIG_IP_SCTP is not set +# CONFIG_ATM is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_NET_DIVERT is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_NET_FASTROUTE is not set +# CONFIG_NET_HW_FLOWCONTROL is not set + +# +# QoS and/or fair queueing +# +# CONFIG_NET_SCHED is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +CONFIG_NETDEVICES=y + +# +# ARCnet devices +# +# CONFIG_ARCNET is not set +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_ETHERTAP is not set + +# +# Ethernet (10 or 100Mbit) +# +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_SMC91X is not set +# CONFIG_HAPPYMEAL is not set +# CONFIG_SUNGEM is not set +# CONFIG_NET_VENDOR_3COM is not set +# CONFIG_LANCE is not set +# CONFIG_NET_VENDOR_SMC is not set +# CONFIG_NET_VENDOR_RACAL is not set + +# +# Tulip family network device support +# +CONFIG_NET_TULIP=y +# CONFIG_DE2104X is not set +CONFIG_TULIP=y +# CONFIG_TULIP_MWI is not set +CONFIG_TULIP_MMIO=y +# CONFIG_DE4X5 is not set +# CONFIG_WINBOND_840 is not set +# CONFIG_DM9102 is not set +# CONFIG_AT1700 is not set +# CONFIG_DEPCA is not set +# CONFIG_HP100 is not set +# CONFIG_NET_ISA is not set +CONFIG_NET_PCI=y +# CONFIG_PCNET32 is not set +# CONFIG_AMD8111_ETH is not set +# CONFIG_ADAPTEC_STARFIRE is not set +# CONFIG_AC3200 is not set +# CONFIG_APRICOT is not set +# CONFIG_B44 is not set +# CONFIG_CS89x0 is not set +# CONFIG_DGRS is not set +# CONFIG_EEPRO100 is not set +# CONFIG_E100 is not set +# CONFIG_FEALNX is not set +# CONFIG_NATSEMI is not set +CONFIG_NE2K_PCI=y +# CONFIG_8139CP is not set +# CONFIG_8139TOO is not set +# CONFIG_SIS900 is not set +# CONFIG_EPIC100 is not set +# CONFIG_SUNDANCE is not set +# CONFIG_TLAN is not set +# CONFIG_VIA_RHINE is not set +# CONFIG_NET_POCKET is not set + +# +# Ethernet (1000 Mbit) +# +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +# CONFIG_E1000 is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SK98LIN is not set +# CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PLIP is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set + +# +# Wireless LAN (non-hamradio) +# +# CONFIG_NET_RADIO is not set +# CONFIG_HOSTAP is not set + +# +# Token Ring devices +# +# CONFIG_TR is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set + +# +# Wan interfaces +# +# CONFIG_WAN is not set + +# +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# +# IrDA (infrared) support +# +# CONFIG_IRDA is not set + +# +# Bluetooth support +# +# CONFIG_BT is not set + +# +# ATA/ATAPI/MFM/RLL support +# +CONFIG_IDE=y +CONFIG_BLK_DEV_IDE=y + +# +# Please see Documentation/ide.txt for help/info on IDE drives +# +CONFIG_BLK_DEV_IDEDISK=y +CONFIG_IDEDISK_MULTI_MODE=y +# CONFIG_IDEDISK_STROKE is not set +# CONFIG_BLK_DEV_IDECD is not set +# CONFIG_BLK_DEV_IDETAPE is not set +# CONFIG_BLK_DEV_IDEFLOPPY is not set +# CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set + +# +# IDE chipset support/bugfixes +# +CONFIG_BLK_DEV_IDEPCI=y +# CONFIG_IDEPCI_SHARE_IRQ is not set +# CONFIG_BLK_DEV_OFFBOARD is not set +# CONFIG_BLK_DEV_GENERIC is not set +# CONFIG_BLK_DEV_OPTI621 is not set +CONFIG_BLK_DEV_SL82C105=y +CONFIG_BLK_DEV_IDEDMA_PCI=y +# CONFIG_BLK_DEV_IDEDMA_FORCED is not set +CONFIG_IDEDMA_PCI_AUTO=y +# CONFIG_IDEDMA_ONLYDISK is not set +# CONFIG_IDEDMA_PCI_WIP is not set +CONFIG_BLK_DEV_ADMA=y +# CONFIG_BLK_DEV_AEC62XX is not set +# CONFIG_BLK_DEV_ALI15X3 is not set +# CONFIG_BLK_DEV_AMD74XX is not set +# CONFIG_BLK_DEV_CMD64X is not set +# CONFIG_BLK_DEV_TRIFLEX is not set +# CONFIG_BLK_DEV_CY82C693 is not set +# CONFIG_BLK_DEV_CS5520 is not set +# CONFIG_BLK_DEV_CS5530 is not set +# CONFIG_BLK_DEV_HPT34X is not set +# CONFIG_BLK_DEV_HPT366 is not set +# CONFIG_BLK_DEV_SC1200 is not set +# CONFIG_BLK_DEV_PIIX is not set +# CONFIG_BLK_DEV_NS87415 is not set +# CONFIG_BLK_DEV_PDC202XX_OLD is not set +# CONFIG_BLK_DEV_PDC202XX_NEW is not set +# CONFIG_BLK_DEV_SVWKS is not set +# CONFIG_BLK_DEV_SIIMAGE is not set +# CONFIG_BLK_DEV_SLC90E66 is not set +# CONFIG_BLK_DEV_TRM290 is not set +# CONFIG_BLK_DEV_VIA82CXXX is not set +# CONFIG_IDE_CHIPSETS is not set +CONFIG_BLK_DEV_IDEDMA=y +# CONFIG_IDEDMA_IVB is not set +CONFIG_IDEDMA_AUTO=y +# CONFIG_DMA_NONPCI is not set +# CONFIG_BLK_DEV_HD is not set + +# +# SCSI device support +# +# CONFIG_SCSI is not set + +# +# IEEE 1394 (FireWire) support (EXPERIMENTAL) +# +# CONFIG_IEEE1394 is not set + +# +# I2O device support +# +# CONFIG_I2O is not set + +# +# ISDN subsystem +# +# CONFIG_ISDN_BOOL is not set + +# +# Input device support +# +CONFIG_INPUT=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_TSDEV is not set +# CONFIG_INPUT_TSLIBDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input I/O drivers +# +# CONFIG_GAMEPORT is not set +CONFIG_SOUND_GAMEPORT=y +CONFIG_SERIO=y +CONFIG_SERIO_I8042=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_PCIPS2 is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_NEWTON is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_PS2_SYNAPTICS is not set +CONFIG_MOUSE_SERIAL=y +# CONFIG_MOUSE_INPORT is not set +# CONFIG_MOUSE_LOGIBM is not set +# CONFIG_MOUSE_PC110PAD is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_PCSPKR is not set +CONFIG_INPUT_UINPUT=y + +# +# Character devices +# +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_DZ is not set +# CONFIG_SERIAL_21285 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +CONFIG_UNIX98_PTY_COUNT=256 +CONFIG_PRINTER=y +# CONFIG_LP_CONSOLE is not set +# CONFIG_PPDEV is not set +# CONFIG_TIPAR is not set + +# +# I2C support +# +# CONFIG_I2C is not set + +# +# I2C Algorithms +# + +# +# I2C Hardware Bus support +# + +# +# I2C Hardware Sensors Chip support +# +# CONFIG_I2C_SENSOR is not set + +# +# L3 serial bus support +# +# CONFIG_L3 is not set + +# +# Mice +# +CONFIG_BUSMOUSE=y +# CONFIG_QIC02_TAPE is not set + +# +# IPMI +# +# CONFIG_IPMI_HANDLER is not set + +# +# Watchdog Cards +# +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_WDT is not set +# CONFIG_WDTPCI is not set +# CONFIG_PCWATCHDOG is not set +# CONFIG_ACQUIRE_WDT is not set +# CONFIG_ADVANTECH_WDT is not set +# CONFIG_21285_WATCHDOG is not set +CONFIG_977_WATCHDOG=y +# CONFIG_EUROTECH_WDT is not set +# CONFIG_IB700_WDT is not set +# CONFIG_I810_TCO is not set +# CONFIG_MIXCOMWD is not set +# CONFIG_SCx200_WDT is not set +# CONFIG_60XX_WDT is not set +# CONFIG_W83877F_WDT is not set +# CONFIG_MACHZ_WDT is not set +# CONFIG_SC520_WDT is not set +# CONFIG_AMD7XX_TCO is not set +# CONFIG_ALIM7101_WDT is not set +# CONFIG_ALIM1535_WDT is not set +# CONFIG_SC1200_WDT is not set +# CONFIG_WAFER_WDT is not set +# CONFIG_CPU5_WDT is not set +CONFIG_DS1620=y +CONFIG_NWBUTTON=y +CONFIG_NWBUTTON_REBOOT=y +CONFIG_NWFLASH=y +# CONFIG_NVRAM is not set +CONFIG_RTC=y +# CONFIG_DTLK is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set + +# +# Ftape, the floppy tape device driver +# +# CONFIG_FTAPE is not set +# CONFIG_AGP is not set +# CONFIG_DRM is not set +# CONFIG_RAW_DRIVER is not set + +# +# Multimedia devices +# +# CONFIG_VIDEO_DEV is not set + +# +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT3_FS is not set +# CONFIG_JBD is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_QUOTA is not set +CONFIG_AUTOFS_FS=y +# CONFIG_AUTOFS4_FS is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +# CONFIG_FAT_FS is not set +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_DEVFS_FS is not set +CONFIG_DEVPTS_FS=y +# CONFIG_DEVPTS_FS_XATTR is not set +CONFIG_TMPFS=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_RAMFS=y + +# +# Miscellaneous filesystems +# +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_CRAMFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set + +# +# Network File Systems +# +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V4=y +# CONFIG_NFS_DIRECTIO is not set +CONFIG_NFSD=y +CONFIG_NFSD_V3=y +# CONFIG_NFSD_V4 is not set +# CONFIG_NFSD_TCP is not set +CONFIG_ROOT_NFS=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_EXPORTFS=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_SMB_FS=y +# CONFIG_SMB_NLS_DEFAULT is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_INTERMEZZO_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_NEC98_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +CONFIG_SMB_NLS=y +CONFIG_NLS=y + +# +# Native Language Support +# +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_CODEPAGE_852=y +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=y +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=y +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y + +# +# Graphics support +# +CONFIG_FB=y +CONFIG_FB_CYBER2000=y +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_VIRTUAL is not set + +# +# Console display driver support +# +CONFIG_VGA_CONSOLE=y +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_PCI_CONSOLE=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set + +# +# Logo configuration +# +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y + +# +# Sound +# +CONFIG_SOUND=y + +# +# Advanced Linux Sound Architecture +# +# CONFIG_SND is not set + +# +# Open Sound System +# +CONFIG_SOUND_PRIME=y +# CONFIG_SOUND_BT878 is not set +# CONFIG_SOUND_CMPCI is not set +# CONFIG_SOUND_EMU10K1 is not set +# CONFIG_SOUND_FUSION is not set +# CONFIG_SOUND_CS4281 is not set +# CONFIG_SOUND_ES1370 is not set +# CONFIG_SOUND_ES1371 is not set +# CONFIG_SOUND_ESSSOLO1 is not set +# CONFIG_SOUND_MAESTRO is not set +# CONFIG_SOUND_MAESTRO3 is not set +# CONFIG_SOUND_ICH is not set +# CONFIG_SOUND_SONICVIBES is not set +# CONFIG_SOUND_TRIDENT is not set +# CONFIG_SOUND_VIA82CXXX is not set +CONFIG_SOUND_OSS=y +CONFIG_SOUND_TRACEINIT=y +CONFIG_SOUND_DMAP=y +# CONFIG_SOUND_AD1816 is not set +# CONFIG_SOUND_AD1889 is not set +# CONFIG_SOUND_SGALAXY is not set +# CONFIG_SOUND_ADLIB is not set +# CONFIG_SOUND_ACI_MIXER is not set +# CONFIG_SOUND_CS4232 is not set +# CONFIG_SOUND_SSCAPE is not set +# CONFIG_SOUND_GUS is not set +# CONFIG_SOUND_VMIDI is not set +# CONFIG_SOUND_TRIX is not set +# CONFIG_SOUND_MSS is not set +# CONFIG_SOUND_MPU401 is not set +# CONFIG_SOUND_NM256 is not set +# CONFIG_SOUND_MAD16 is not set +# CONFIG_SOUND_PAS is not set +# CONFIG_SOUND_PSS is not set +# CONFIG_SOUND_SB is not set +# CONFIG_SOUND_AWE32_SYNTH is not set +# CONFIG_SOUND_MAUI is not set +CONFIG_SOUND_YM3812=y +# CONFIG_SOUND_OPL3SA1 is not set +# CONFIG_SOUND_OPL3SA2 is not set +# CONFIG_SOUND_YMFPCI is not set +# CONFIG_SOUND_UART6850 is not set +# CONFIG_SOUND_AEDSP16 is not set +CONFIG_SOUND_WAVEARTIST=y +# CONFIG_SOUND_ALI5455 is not set +# CONFIG_SOUND_FORTE is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_AD1980 is not set + +# +# Misc devices +# + +# +# Multimedia Capabilities Port drivers +# +# CONFIG_MCP is not set + +# +# Console Switches +# +# CONFIG_SWITCHES is not set + +# +# USB support +# +# CONFIG_USB is not set +# CONFIG_USB_GADGET is not set + +# +# Kernel hacking +# +CONFIG_FRAME_POINTER=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_INFO is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SLAB is not set +CONFIG_MAGIC_SYSRQ=y +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_WAITQ is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_LL is not set + +# +# Security options +# +# CONFIG_SECURITY is not set + +# +# Cryptographic options +# +# CONFIG_CRYPTO is not set + +# +# Library routines +# +CONFIG_CRC32=y diff -Nru a/arch/arm/configs/shark_defconfig b/arch/arm/configs/shark_defconfig --- a/arch/arm/configs/shark_defconfig Tue Dec 30 13:48:29 2003 +++ b/arch/arm/configs/shark_defconfig Tue Dec 30 13:48:29 2003 @@ -10,6 +10,10 @@ # Code maturity level options # CONFIG_EXPERIMENTAL=y +# CONFIG_CLEAN_COMPILE is not set +# CONFIG_STANDALONE is not set +CONFIG_BROKEN=y +CONFIG_BROKEN_ON_SMP=y # # General setup @@ -19,6 +23,14 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_IKCONFIG is not set +# CONFIG_EMBEDDED is not set +CONFIG_KALLSYMS=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_AS=y +CONFIG_IOSCHED_DEADLINE=y # # Loadable module support @@ -35,7 +47,6 @@ # # CONFIG_ARCH_ADIFCC is not set # CONFIG_ARCH_ANAKIN is not set -# CONFIG_ARCH_ARCA5K is not set # CONFIG_ARCH_CLPS7500 is not set # CONFIG_ARCH_CLPS711X is not set # CONFIG_ARCH_CO285 is not set @@ -44,21 +55,13 @@ # CONFIG_ARCH_CAMELOT is not set # CONFIG_ARCH_FOOTBRIDGE is not set # CONFIG_ARCH_INTEGRATOR is not set -# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP3XX is not set # CONFIG_ARCH_L7200 is not set # CONFIG_ARCH_RPC is not set # CONFIG_ARCH_SA1100 is not set CONFIG_ARCH_SHARK=y # -# Archimedes/A5000 Implementations -# - -# -# Archimedes/A5000 Implementations (select only ONE) -# - -# # CLPS711X/EP721X Implementations # @@ -71,11 +74,13 @@ # # -# IOP310 Implementation Options +# IOP3xx Implementation Options # +# CONFIG_ARCH_IOP310 is not set +# CONFIG_ARCH_IOP321 is not set # -# IOP310 Chipset Features +# IOP3xx Chipset Features # # @@ -92,6 +97,10 @@ CONFIG_CPU_32=y CONFIG_CPU_SA110=y CONFIG_CPU_32v4=y +CONFIG_CPU_ABRT_EV4=y +CONFIG_CPU_CACHE_V4WB=y +CONFIG_CPU_COPY_V4WB=y +CONFIG_CPU_TLB_V4WB=y # # Processor Features @@ -116,11 +125,13 @@ # # CONFIG_FPE_NWFPE is not set CONFIG_FPE_FASTFPE=y -CONFIG_KCORE_ELF=y -# CONFIG_KCORE_AOUT is not set -# CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y +# CONFIG_BINFMT_AOUT is not set # CONFIG_BINFMT_MISC is not set + +# +# Generic Driver Options +# # CONFIG_PM is not set # CONFIG_PREEMPT is not set # CONFIG_ARTHUR is not set @@ -164,6 +175,7 @@ # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_UMEM is not set CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 @@ -185,7 +197,6 @@ CONFIG_PACKET=y # CONFIG_PACKET_MMAP is not set # CONFIG_NETLINK_DEV is not set -# CONFIG_NETFILTER is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -199,8 +210,11 @@ # CONFIG_SYN_COOKIES is not set # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set # CONFIG_IPV6 is not set -# CONFIG_XFRM_USER is not set +# CONFIG_DECNET is not set +# CONFIG_BRIDGE is not set +# CONFIG_NETFILTER is not set # # SCTP Configuration (EXPERIMENTAL) @@ -209,9 +223,9 @@ # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set # CONFIG_VLAN_8021Q is not set -# CONFIG_LLC is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set # CONFIG_X25 is not set # CONFIG_LAPB is not set # CONFIG_NET_DIVERT is not set @@ -239,13 +253,13 @@ # CONFIG_BONDING is not set # CONFIG_EQUALIZER is not set # CONFIG_TUN is not set -# CONFIG_ETHERTAP is not set # # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y # CONFIG_MII is not set +# CONFIG_SMC91X is not set # CONFIG_HAPPYMEAL is not set # CONFIG_SUNGEM is not set # CONFIG_NET_VENDOR_3COM is not set @@ -294,8 +308,14 @@ # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set +# CONFIG_SIS190 is not set # CONFIG_SK98LIN is not set # CONFIG_TIGON3 is not set + +# +# Ethernet (10000 Mbit) +# +# CONFIG_IXGB is not set # CONFIG_FDDI is not set # CONFIG_HIPPI is not set # CONFIG_PLIP is not set @@ -306,10 +326,12 @@ # Wireless LAN (non-hamradio) # # CONFIG_NET_RADIO is not set +# CONFIG_HOSTAP is not set # -# Token Ring devices (depends on LLC=y) +# Token Ring devices # +# CONFIG_TR is not set # CONFIG_NET_FC is not set # CONFIG_RCPCI is not set # CONFIG_SHAPER is not set @@ -320,47 +342,54 @@ # CONFIG_WAN is not set # +# Amateur Radio support +# +# CONFIG_HAMRADIO is not set + +# # IrDA (infrared) support # # CONFIG_IRDA is not set # -# Amateur Radio support +# Bluetooth support # -# CONFIG_HAMRADIO is not set +# CONFIG_BT is not set # # ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# CONFIG_BLK_DEV_IDE=y # # Please see Documentation/ide.txt for help/info on IDE drives # -# CONFIG_BLK_DEV_HD is not set CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_IDEDISK_STROKE is not set CONFIG_BLK_DEV_IDECD=y +# CONFIG_BLK_DEV_IDETAPE is not set CONFIG_BLK_DEV_IDEFLOPPY=y # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set +# CONFIG_IDE_TASKFILE_IO is not set # # IDE chipset support/bugfixes # # CONFIG_BLK_DEV_IDEPCI is not set # CONFIG_IDE_CHIPSETS is not set +# CONFIG_BLK_DEV_IDEDMA is not set +# CONFIG_IDEDMA_AUTO is not set +# CONFIG_DMA_NONPCI is not set +# CONFIG_BLK_DEV_HD is not set # -# SCSI support +# SCSI device support # CONFIG_SCSI=m +CONFIG_SCSI_PROC_FS=y # # SCSI support type (disk, tape, CD-ROM) @@ -395,7 +424,6 @@ # CONFIG_SCSI_DPT_I2O is not set # CONFIG_SCSI_ADVANSYS is not set # CONFIG_SCSI_IN2000 is not set -# CONFIG_SCSI_AM53C974 is not set # CONFIG_SCSI_MEGARAID is not set # CONFIG_SCSI_BUSLOGIC is not set # CONFIG_SCSI_CPQFCTS is not set @@ -407,15 +435,13 @@ # CONFIG_SCSI_GDTH is not set # CONFIG_SCSI_GENERIC_NCR5380 is not set # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set +# CONFIG_SCSI_IPS is not set # CONFIG_SCSI_INITIO is not set # CONFIG_SCSI_INIA100 is not set # CONFIG_SCSI_PPA is not set # CONFIG_SCSI_IMM is not set # CONFIG_SCSI_NCR53C406A is not set -# CONFIG_SCSI_NCR53C7xx is not set # CONFIG_SCSI_SYM53C8XX_2 is not set -# CONFIG_SCSI_NCR53C8XX is not set -# CONFIG_SCSI_SYM53C8XX is not set # CONFIG_SCSI_PAS16 is not set # CONFIG_SCSI_PCI2000 is not set # CONFIG_SCSI_PCI2220I is not set @@ -425,6 +451,7 @@ # CONFIG_SCSI_QLOGIC_FC is not set # CONFIG_SCSI_QLOGIC_1280 is not set # CONFIG_SCSI_SYM53C416 is not set +# CONFIG_SCSI_DC395x is not set # CONFIG_SCSI_DC390T is not set # CONFIG_SCSI_T128 is not set # CONFIG_SCSI_U14_34F is not set @@ -486,6 +513,7 @@ # CONFIG_KEYBOARD_NEWTON is not set CONFIG_INPUT_MOUSE=y CONFIG_MOUSE_PS2=y +# CONFIG_MOUSE_PS2_SYNAPTICS is not set # CONFIG_MOUSE_SERIAL is not set # CONFIG_MOUSE_INPORT is not set # CONFIG_MOUSE_LOGIBM is not set @@ -497,7 +525,9 @@ # # Character devices # -# CONFIG_VT is not set +CONFIG_VT=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y # CONFIG_SERIAL_NONSTANDARD is not set # @@ -505,6 +535,7 @@ # CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=4 # CONFIG_SERIAL_8250_EXTENDED is not set # @@ -526,12 +557,17 @@ # CONFIG_I2C is not set # -# I2C Hardware Sensors Mainboard support +# I2C Algorithms +# + +# +# I2C Hardware Bus support # # # I2C Hardware Sensors Chip support # +# CONFIG_I2C_SENSOR is not set # # L3 serial bus support @@ -566,7 +602,6 @@ # CONFIG_AGP is not set # CONFIG_DRM is not set # CONFIG_RAW_DRIVER is not set -# CONFIG_HANGCHECK_TIMER is not set # # Multimedia devices @@ -574,6 +609,16 @@ # CONFIG_VIDEO_DEV is not set # +# Digital Video Broadcasting Devices +# +# CONFIG_DVB is not set + +# +# MMC/SD Card support +# +# CONFIG_MMC is not set + +# # File systems # CONFIG_EXT2_FS=y @@ -581,6 +626,7 @@ CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y # CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y @@ -618,6 +664,8 @@ # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS is not set # CONFIG_TMPFS is not set +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set CONFIG_RAMFS=y # @@ -642,6 +690,7 @@ CONFIG_NFS_FS=y # CONFIG_NFS_V3 is not set # CONFIG_NFS_V4 is not set +# CONFIG_NFS_DIRECTIO is not set # CONFIG_NFSD is not set CONFIG_LOCKD=y # CONFIG_EXPORTFS is not set @@ -740,9 +789,24 @@ # CONFIG_FB_VIRTUAL is not set # +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +# CONFIG_MDA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_PCI_CONSOLE=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y + +# # Logo configuration # -# CONFIG_LOGO is not set +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y # # Sound @@ -769,7 +833,6 @@ # CONFIG_SOUND_MAESTRO is not set # CONFIG_SOUND_MAESTRO3 is not set # CONFIG_SOUND_ICH is not set -# CONFIG_SOUND_RME96XX is not set # CONFIG_SOUND_SONICVIBES is not set # CONFIG_SOUND_TRIDENT is not set # CONFIG_SOUND_MSNDCLAS is not set @@ -779,6 +842,7 @@ # CONFIG_SOUND_TRACEINIT is not set # CONFIG_SOUND_DMAP is not set # CONFIG_SOUND_AD1816 is not set +# CONFIG_SOUND_AD1889 is not set # CONFIG_SOUND_SGALAXY is not set CONFIG_SOUND_ADLIB=m # CONFIG_SOUND_ACI_MIXER is not set @@ -803,6 +867,11 @@ # CONFIG_SOUND_YMFPCI is not set # CONFIG_SOUND_UART6850 is not set # CONFIG_SOUND_AEDSP16 is not set +# CONFIG_SOUND_KAHLUA is not set +# CONFIG_SOUND_ALI5455 is not set +# CONFIG_SOUND_FORTE is not set +# CONFIG_SOUND_RME96XX is not set +# CONFIG_SOUND_AD1980 is not set # # Misc devices @@ -822,11 +891,7 @@ # USB support # # CONFIG_USB is not set - -# -# Bluetooth support -# -# CONFIG_BT is not set +# CONFIG_USB_GADGET is not set # # Kernel hacking diff -Nru a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c --- a/arch/arm/kernel/armksyms.c Tue Dec 30 13:48:29 2003 +++ b/arch/arm/kernel/armksyms.c Tue Dec 30 13:48:29 2003 @@ -68,8 +68,8 @@ extern void __udivmoddi4(void); extern void __udivsi3(void); extern void __umodsi3(void); +extern void __do_div64(void); extern void abort(void); -extern void do_div64(void); extern void ret_from_exception(void); extern void fpundefinstr(void); @@ -223,7 +223,7 @@ EXPORT_SYMBOL_NOVERS(__udivmoddi4); EXPORT_SYMBOL_NOVERS(__udivsi3); EXPORT_SYMBOL_NOVERS(__umodsi3); -EXPORT_SYMBOL_NOVERS(do_div64); +EXPORT_SYMBOL_NOVERS(__do_div64); /* bitops */ EXPORT_SYMBOL(_set_bit_le); diff -Nru a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S --- a/arch/arm/kernel/calls.S Tue Dec 30 13:48:30 2003 +++ b/arch/arm/kernel/calls.S Tue Dec 30 13:48:30 2003 @@ -271,6 +271,20 @@ .long sys_ni_syscall /* sys_set_thread_area */ /* 255 */ .long sys_ni_syscall /* sys_get_thread_area */ .long sys_ni_syscall /* sys_set_tid_address */ + .long sys_timer_create + .long sys_timer_settime + .long sys_timer_gettime +/* 260 */ .long sys_timer_getoverrun + .long sys_timer_delete + .long sys_clock_settime + .long sys_clock_gettime + .long sys_clock_getres +/* 265 */ .long sys_clock_nanosleep + .long sys_statfs64 + .long sys_fstatfs64 + .long sys_tgkill + .long sys_utimes +/* 270 */ .long sys_fadvise64_64 __syscall_end: .rept NR_syscalls - (__syscall_end - __syscall_start) / 4 diff -Nru a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c --- a/arch/arm/kernel/irq.c Tue Dec 30 13:48:28 2003 +++ b/arch/arm/kernel/irq.c Tue Dec 30 13:48:28 2003 @@ -169,11 +169,11 @@ int show_interrupts(struct seq_file *p, void *v) { - int i; + int i = *(loff_t *) v; struct irqaction * action; unsigned long flags; - for (i = 0 ; i < NR_IRQS ; i++) { + if (i < NR_IRQS) { spin_lock_irqsave(&irq_controller_lock, flags); action = irq_desc[i].action; if (!action) @@ -187,12 +187,12 @@ seq_putc(p, '\n'); unlock: spin_unlock_irqrestore(&irq_controller_lock, flags); - } - + } else if (i == NR_IRQS) { #ifdef CONFIG_ARCH_ACORN - show_fiq_list(p, v); + show_fiq_list(p, v); #endif - seq_printf(p, "Err: %10lu\n", irq_err_count); + seq_printf(p, "Err: %10lu\n", irq_err_count); + } return 0; } diff -Nru a/arch/arm/lib/div64.S b/arch/arm/lib/div64.S --- a/arch/arm/lib/div64.S Tue Dec 30 13:48:30 2003 +++ b/arch/arm/lib/div64.S Tue Dec 30 13:48:30 2003 @@ -1,59 +1,200 @@ +/* + * linux/arch/arm/lib/div64.S + * + * Optimized computation of 64-bit dividend / 32-bit divisor + * + * Author: Nicolas Pitre + * Created: Oct 5, 2003 + * Copyright: Monta Vista Software, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + #include -#ifndef __ARMEB__ -ql .req r0 @ quotient low -qh .req r1 @ quotient high -onl .req r0 @ original dividend low -onh .req r1 @ original dividend high -nl .req r4 @ dividend low -nh .req r5 @ dividend high -res .req r4 @ result +#ifdef __ARMEB__ +#define xh r0 +#define xl r1 +#define yh r2 +#define yl r3 +#else +#define xl r0 +#define xh r1 +#define yl r2 +#define yh r3 +#endif + +/* + * __do_div64: perform a division with 64-bit dividend and 32-bit divisor. + * + * Note: Calling convention is totally non standard for optimal code. + * This is meant to be used by do_div() from include/asm/div64.h only. + * + * Input parameters: + * xh-xl = dividend (clobbered) + * r4 = divisor (preserved) + * + * Output values: + * yh-yl = result + * xh = remainder + * + * Clobbered regs: xl, ip + */ + +ENTRY(__do_div64) + + @ Test for easy paths first. + subs ip, r4, #1 + bls 9f @ divisor is 0 or 1 + tst ip, r4 + beq 8f @ divisor is power of 2 + + @ See if we need to handle upper 32-bit result. + cmp xh, r4 + mov yh, #0 + blo 3f + + @ Align divisor with upper part of dividend. + @ The aligned divisor is stored in yl preserving the original. + @ The bit position is stored in ip. + +#if __LINUX_ARM_ARCH__ >= 5 + + clz yl, r4 + clz ip, xh + sub yl, yl, ip + mov ip, #1 + mov ip, ip, lsl yl + mov yl, r4, lsl yl + +#else + + mov yl, r4 + mov ip, #1 +1: cmp yl, #0x80000000 + cmpcc yl, xh + movcc yl, yl, lsl #1 + movcc ip, ip, lsl #1 + bcc 1b + +#endif + + @ The division loop for needed upper bit positions. + @ Break out early if dividend reaches 0. +2: cmp xh, yl + orrcs yh, yh, ip + subcss xh, xh, yl + movnes ip, ip, lsr #1 + mov yl, yl, lsr #1 + bne 2b + + @ See if we need to handle lower 32-bit result. +3: cmp xh, #0 + mov yl, #0 + cmpeq xl, r4 + movlo xh, xl + movlo pc, lr + + @ The division loop for lower bit positions. + @ Here we shift remainer bits leftwards rather than moving the + @ divisor for comparisons, considering the carry-out bit as well. + mov ip, #0x80000000 +4: movs xl, xl, lsl #1 + adcs xh, xh, xh + beq 6f + cmpcc xh, r4 +5: orrcs yl, yl, ip + subcs xh, xh, r4 + movs ip, ip, lsr #1 + bne 4b + mov pc, lr + + @ The top part of remainder became zero. If carry is set + @ (the 33th bit) this is a false positive so resume the loop. + @ Otherwise, if lower part is also null then we are done. +6: bcs 5b + cmp xl, #0 + moveq pc, lr + + @ We still have remainer bits in the low part. Bring them up. + +#if __LINUX_ARM_ARCH__ >= 5 + + clz xh, xl @ we know xh is zero here so... + add xh, xh, #1 + mov xl, xl, lsl xh + mov ip, ip, lsr xh + #else -ql .req r1 -qh .req r0 -onl .req r1 -onh .req r0 -nl .req r5 -nh .req r4 -res .req r5 + +7: movs xl, xl, lsl #1 + mov ip, ip, lsr #1 + bcc 7b + #endif -dl .req r3 @ divisor low -dh .req r2 @ divsor high + @ Current remainder is now 1. It is worthless to compare with + @ divisor at this point since divisor can not be smaller than 3 here. + @ If possible, branch for another shift in the division loop. + @ If no bit position left then we are done. + movs ip, ip, lsr #1 + mov xh, #1 + bne 4b + mov pc, lr + +8: @ Division by a power of 2: determine what that divisor order is + @ then simply shift values around + +#if __LINUX_ARM_ARCH__ >= 5 + clz ip, r4 + rsb ip, ip, #31 + +#else + + mov yl, r4 + cmp r4, #(1 << 16) + mov ip, #0 + movhs yl, yl, lsr #16 + movhs ip, #16 + + cmp yl, #(1 << 8) + movhs yl, yl, lsr #8 + addhs ip, ip, #8 + + cmp yl, #(1 << 4) + movhs yl, yl, lsr #4 + addhs ip, ip, #4 + + cmp yl, #(1 << 2) + addhi ip, ip, #3 + addls ip, ip, yl, lsr #1 + +#endif -ENTRY(do_div64) - stmfd sp!, {r4, r5, lr} - mov nl, onl - movs nh, onh @ if high bits are zero - movne lr, #33 - moveq lr, #1 @ only divide low bits - moveq nh, onl - - tst dh, #0x80000000 - bne 2f -1: cmp nh, dh - bls 2f - add lr, lr, #1 - movs dh, dh, lsl #1 @ left justify disor - bpl 1b - -2: movs nh, onh - moveq dl, dh - moveq dh, #0 - movne dl, #0 - mov ql, #0 - mov qh, #0 -3: subs ip, nl, dl @ trial subtraction - sbcs ip, nh, dh - movcs nh, ip @ only update if successful - subcs nl, nl, dl @ (repeat the subtraction) - adcs ql, ql, ql @ C=1 if successful, shift into - adc qh, qh, qh @ quotient - movs dh, dh, lsr #1 @ shift base high part right - mov dl, dl, rrx @ shift base low part right - subs lr, lr, #1 - bne 3b + mov yh, xh, lsr ip + mov yl, xl, lsr ip + rsb ip, ip, #32 + orr yl, yl, xh, lsl ip + mov xh, xl, lsl ip + mov xh, xh, lsr ip + mov pc, lr + + @ eq -> division by 1: obvious enough... +9: moveq yl, xl + moveq yh, xh + moveq xh, #0 + moveq pc, lr + + @ Division by 0: + str lr, [sp, #-4]! + bl __div0 + + @ as wrong as it could be... + mov yl, #0 + mov yh, #0 + mov xh, #0 + ldr pc, [sp], #4 - mov r2, res - ldmfd sp!, {r4, r5, pc} diff -Nru a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c --- a/arch/arm/mach-clps711x/time.c Tue Dec 30 13:48:28 2003 +++ b/arch/arm/mach-clps711x/time.c Tue Dec 30 13:48:28 2003 @@ -40,6 +40,7 @@ void __init clps711x_setup_timer(void) { + struct timespec tv; unsigned int syscon; gettimeoffset = clps711x_gettimeoffset; @@ -50,5 +51,7 @@ clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */ - xtime.tv_sec = clps_readl(RTCDR); + tv.tv_nsec = 0; + tv.tv_sec = clps_readl(RTCDR); + do_settimeofday(&tv); } diff -Nru a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c --- a/arch/arm/mach-integrator/integrator_ap.c Tue Dec 30 13:48:29 2003 +++ b/arch/arm/mach-integrator/integrator_ap.c Tue Dec 30 13:48:29 2003 @@ -126,7 +126,7 @@ writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR); for (i = 0; i < NR_IRQS; i++) { - if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0) { + if (((1 << i) & INTEGRATOR_SC_VALID_INT) != 0) { set_irq_chip(i, &sc_chip); set_irq_handler(i, do_level_IRQ); set_irq_flags(i, IRQF_VALID | IRQF_PROBE); diff -Nru a/arch/arm/mm/cache-v3.S b/arch/arm/mm/cache-v3.S --- a/arch/arm/mm/cache-v3.S Tue Dec 30 13:48:29 2003 +++ b/arch/arm/mm/cache-v3.S Tue Dec 30 13:48:29 2003 @@ -32,14 +32,14 @@ /* FALLTHROUGH */ /* - * flush_user_cache_range(start, end, vm_flags) + * flush_user_cache_range(start, end, flags) * * Invalidate a range of cache entries in the specified * address space. * * - start - start address (may not be aligned) * - end - end address (exclusive, may not be aligned) - * - vma - vma_area_struct describing address space + * - flags - vma_area_struct flags describing address space */ ENTRY(v3_flush_user_cache_range) mov ip, #0 diff -Nru a/arch/arm/mm/cache-v4.S b/arch/arm/mm/cache-v4.S --- a/arch/arm/mm/cache-v4.S Tue Dec 30 13:48:29 2003 +++ b/arch/arm/mm/cache-v4.S Tue Dec 30 13:48:29 2003 @@ -34,14 +34,14 @@ mov pc, lr /* - * flush_user_cache_range(start, end, vma) + * flush_user_cache_range(start, end, flags) * * Invalidate a range of cache entries in the specified * address space. * * - start - start address (may not be aligned) * - end - end address (exclusive, may not be aligned) - * - vma - vma_area_struct describing address space + * - flags - vma_area_struct flags describing address space */ ENTRY(v4_flush_user_cache_range) mov ip, #0 diff -Nru a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S --- a/arch/arm/mm/cache-v4wb.S Tue Dec 30 13:48:29 2003 +++ b/arch/arm/mm/cache-v4wb.S Tue Dec 30 13:48:29 2003 @@ -72,14 +72,14 @@ mov pc, lr /* - * flush_user_cache_range(start, end, vm_flags) + * flush_user_cache_range(start, end, flags) * * Invalidate a range of cache entries in the specified * address space. * * - start - start address (inclusive, page aligned) * - end - end address (exclusive, page aligned) - * - vma - vma_area_struct describing address space + * - flags - vma_area_struct flags describing address space */ ENTRY(v4wb_flush_user_cache_range) sub r3, r1, r0 @ calculate total size diff -Nru a/arch/arm/mm/cache-v4wt.S b/arch/arm/mm/cache-v4wt.S --- a/arch/arm/mm/cache-v4wt.S Tue Dec 30 13:48:28 2003 +++ b/arch/arm/mm/cache-v4wt.S Tue Dec 30 13:48:28 2003 @@ -64,14 +64,14 @@ mov pc, lr /* - * flush_user_cache_range(start, end, vm_flags) + * flush_user_cache_range(start, end, flags) * * Clean and invalidate a range of cache entries in the specified * address space. * * - start - start address (inclusive, page aligned) * - end - end address (exclusive, page aligned) - * - vma - vma_area_struct describing address space + * - flags - vma_area_struct flags describing address space */ ENTRY(v4wt_flush_user_cache_range) sub r3, r1, r0 @ calculate total size diff -Nru a/arch/arm26/kernel/irq.c b/arch/arm26/kernel/irq.c --- a/arch/arm26/kernel/irq.c Tue Dec 30 13:48:29 2003 +++ b/arch/arm26/kernel/irq.c Tue Dec 30 13:48:29 2003 @@ -135,10 +135,10 @@ int show_interrupts(struct seq_file *p, void *v) { - int i; + int i = *(loff_t *) v; struct irqaction * action; - for (i = 0 ; i < NR_IRQS ; i++) { + if (i < NR_IRQS) { action = irq_desc[i].action; if (!action) continue; @@ -148,10 +148,10 @@ seq_printf(p, ", %s", action->name); } seq_putc(p, '\n'); + } else if (i == NR_IRQS) { + show_fiq_list(p, v); + seq_printf(p, "Err: %10lu\n", irq_err_count); } - - show_fiq_list(p, v); - seq_printf(p, "Err: %10lu\n", irq_err_count); return 0; } diff -Nru a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c --- a/arch/cris/kernel/irq.c Tue Dec 30 13:48:30 2003 +++ b/arch/cris/kernel/irq.c Tue Dec 30 13:48:30 2003 @@ -89,11 +89,11 @@ int show_interrupts(struct seq_file *p, void *v) { - int i; + int i = *(loff_t *) v; struct irqaction * action; unsigned long flags; - for (i = 0; i < NR_IRQS; i++) { + if (i < NR_IRQS) { local_irq_save(flags); action = irq_action[i]; if (!action) diff -Nru a/arch/h8300/Kconfig b/arch/h8300/Kconfig --- a/arch/h8300/Kconfig Tue Dec 30 13:48:29 2003 +++ b/arch/h8300/Kconfig Tue Dec 30 13:48:29 2003 @@ -5,6 +5,10 @@ mainmenu "uClinux/h8300 (w/o MMU) Kernel Configuration" +config H8300 + bool + default y + config MMU bool default n diff -Nru a/arch/h8300/Makefile b/arch/h8300/Makefile --- a/arch/h8300/Makefile Tue Dec 30 13:48:28 2003 +++ b/arch/h8300/Makefile Tue Dec 30 13:48:28 2003 @@ -34,7 +34,7 @@ ldflags-$(CONFIG_CPU_H8S) := -mh8300self CFLAGS += $(cflags-y) -CFLAGS += -mint32 -fno-builtin -Os +CFLAGS += -mint32 -fno-builtin CFLAGS += -g CFLAGS += -D__linux__ CFLAGS += -DUTS_SYSNAME=\"uClinux\" diff -Nru a/arch/h8300/platform/h8300h/ints.c b/arch/h8300/platform/h8300h/ints.c --- a/arch/h8300/platform/h8300h/ints.c Tue Dec 30 13:48:28 2003 +++ b/arch/h8300/platform/h8300h/ints.c Tue Dec 30 13:48:28 2003 @@ -228,9 +228,9 @@ int show_interrupts(struct seq_file *p, void *v) { - int i; + int i = *(loff_t *) v; - for (i = 0; i < NR_IRQS; i++) { + if (i < NR_IRQS) { if (irq_list[i]) { seq_printf(p, "%3d: %10u ",i,irq_list[i]->count); seq_printf(p, "%s\n", irq_list[i]->devname); diff -Nru a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c --- a/arch/h8300/platform/h8s/ints.c Tue Dec 30 13:48:29 2003 +++ b/arch/h8300/platform/h8s/ints.c Tue Dec 30 13:48:29 2003 @@ -280,9 +280,9 @@ int show_interrupts(struct seq_file *p, void *v) { - int i; + int i = *(loff_t *) v; - for (i = 0; i < NR_IRQS; i++) { + if (i < NR_IRQS) { if (irq_list[i]) { seq_printf(p, "%3d: %10u ",i,irq_list[i]->count); seq_printf(p, "%s\n", irq_list[i]->devname); diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig --- a/arch/i386/Kconfig Tue Dec 30 13:48:28 2003 +++ b/arch/i386/Kconfig Tue Dec 30 13:48:28 2003 @@ -784,6 +784,25 @@ See for more information. +config EFI + bool "Boot from EFI support (EXPERIMENTAL)" + depends on ACPI + default n + ---help--- + + This enables the the kernel to boot on EFI platforms using + system configuration information passed to it from the firmware. + This also enables the kernel to use any EFI runtime services that are + available (such as the EFI variable services). + + This option is only useful on systems that have EFI firmware + and will result in a kernel image that is ~8k larger. In addition, + you must use the latest ELILO loader available at + ftp.hpl.hp.com/pub/linux-ia64/ in order to take advantage of kernel + initialization using EFI information (neither GRUB nor LILO know + anything about EFI). However, even with this option, the resultant + kernel should continue to boot on existing non-EFI platforms. + config HAVE_DEC_LOCK bool depends on (SMP || PREEMPT) && X86_CMPXCHG @@ -793,7 +812,7 @@ # Summit needs it only when NUMA is on config BOOT_IOREMAP bool - depends on ((X86_SUMMIT || X86_GENERICARCH) && NUMA) + depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI)) default y endmenu @@ -1029,6 +1048,25 @@ bool depends on PCI && ((PCI_GODIRECT || PCI_GOANY) || X86_VISWS) default y + +config PCI_USE_VECTOR + bool "Vector-based interrupt indexing" + depends on X86_LOCAL_APIC + default n + help + This replaces the current existing IRQ-based index interrupt scheme + with the vector-base index scheme. The advantages of vector base + over IRQ base are listed below: + 1) Support MSI implementation. + 2) Support future IOxAPIC hotplug + + Note that this enables MSI, Message Signaled Interrupt, on all + MSI capable device functions detected if users also install the + MSI patch. Message Signal Interrupt enables an MSI-capable + hardware device to send an inbound Memory Write on its PCI bus + instead of asserting IRQ signal on device IRQ pin. + + If you don't know what to do here, say N. source "drivers/pci/Kconfig" diff -Nru a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile --- a/arch/i386/kernel/Makefile Tue Dec 30 13:48:28 2003 +++ b/arch/i386/kernel/Makefile Tue Dec 30 13:48:28 2003 @@ -30,6 +30,7 @@ obj-y += sysenter.o vsyscall.o obj-$(CONFIG_ACPI_SRAT) += srat.o obj-$(CONFIG_HPET_TIMER) += time_hpet.o +obj-$(CONFIG_EFI) += efi.o efi_stub.o EXTRA_AFLAGS := -traditional diff -Nru a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c --- a/arch/i386/kernel/acpi/boot.c Tue Dec 30 13:48:29 2003 +++ b/arch/i386/kernel/acpi/boot.c Tue Dec 30 13:48:29 2003 @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -331,6 +332,12 @@ { unsigned long rsdp_phys = 0; + if (efi_enabled) { + if (efi.acpi20) + return __pa(efi.acpi20); + else if (efi.acpi) + return __pa(efi.acpi); + } /* * Scan memory looking for the RSDP signature. First search EBDA (low * memory) paragraphs and then search upper memory (E0000-FFFFF). diff -Nru a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c --- a/arch/i386/kernel/cpu/common.c Tue Dec 30 13:48:28 2003 +++ b/arch/i386/kernel/cpu/common.c Tue Dec 30 13:48:28 2003 @@ -510,7 +510,7 @@ BUG(); enter_lazy_tlb(&init_mm, current); - load_esp0(t, thread->esp0); + load_esp0(t, thread); set_tss_desc(cpu,t); cpu_gdt_table[cpu][GDT_ENTRY_TSS].b &= 0xfffffdff; load_TR_desc(); diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c Tue Dec 30 13:48:29 2003 +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c Tue Dec 30 13:48:29 2003 @@ -73,6 +73,16 @@ { .frequency = CPUFREQ_TABLE_END } }; +/* Ultra Low Voltage Intel Pentium M processor 1000MHz */ +static struct cpufreq_frequency_table op_1000[] = + { + OP(600, 844), + OP(800, 972), + OP(900, 988), + OP(1000, 1004), + { .frequency = CPUFREQ_TABLE_END } + }; + /* Low Voltage Intel Pentium M processor 1.10GHz */ static struct cpufreq_frequency_table op_1100[] = { @@ -165,6 +175,7 @@ static const struct cpu_model models[] = { _CPU( 900, " 900"), + CPU(1000), CPU(1100), CPU(1200), CPU(1300), diff -Nru a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/kernel/efi.c Tue Dec 30 13:48:30 2003 @@ -0,0 +1,645 @@ +/* + * Extensible Firmware Interface + * + * Based on Extensible Firmware Interface Specification version 1.0 + * + * Copyright (C) 1999 VA Linux Systems + * Copyright (C) 1999 Walt Drummond + * Copyright (C) 1999-2002 Hewlett-Packard Co. + * David Mosberger-Tang + * Stephane Eranian + * + * All EFI Runtime Services are not implemented yet as EFI only + * supports physical mode addressing on SoftSDV. This is to be fixed + * in a future version. --drummond 1999-07-20 + * + * Implemented EFI runtime services and virtual mode calls. --davidm + * + * Goutham Rao: + * Skip non-WB memory and ignore empty memory ranges. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#define EFI_DEBUG 0 +#define PFX "EFI: " + +extern efi_status_t asmlinkage efi_call_phys(void *, ...); + +struct efi efi; +struct efi efi_phys __initdata; +struct efi_memory_map memmap __initdata; + +/* + * We require an early boot_ioremap mapping mechanism initially + */ +extern void * boot_ioremap(unsigned long, unsigned long); + +/* + * efi_dir is allocated here, but the directory isn't created + * here, as proc_mkdir() doesn't work this early in the bootup + * process. Therefore, each module, like efivars, must test for + * if (!efi_dir) efi_dir = proc_mkdir("efi", NULL); + * prior to creating their own entries under /proc/efi. + */ +#ifdef CONFIG_PROC_FS +struct proc_dir_entry *efi_dir; +#endif + + +/* + * To make EFI call EFI runtime service in physical addressing mode we need + * prelog/epilog before/after the invocation to disable interrupt, to + * claim EFI runtime service handler exclusively and to duplicate a memory in + * low memory space say 0 - 3G. + */ + +static unsigned long efi_rt_eflags; +static spinlock_t efi_rt_lock = SPIN_LOCK_UNLOCKED; +static pgd_t efi_bak_pg_dir_pointer[2]; + +static void efi_call_phys_prelog(void) +{ + unsigned long cr4; + unsigned long temp; + + spin_lock(&efi_rt_lock); + local_irq_save(efi_rt_eflags); + + /* + * If I don't have PSE, I should just duplicate two entries in page + * directory. If I have PSE, I just need to duplicate one entry in + * page directory. + */ + __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4)); + + if (cr4 & X86_CR4_PSE) { + efi_bak_pg_dir_pointer[0].pgd = + swapper_pg_dir[pgd_index(0)].pgd; + swapper_pg_dir[0].pgd = + swapper_pg_dir[pgd_index(PAGE_OFFSET)].pgd; + } else { + efi_bak_pg_dir_pointer[0].pgd = + swapper_pg_dir[pgd_index(0)].pgd; + efi_bak_pg_dir_pointer[1].pgd = + swapper_pg_dir[pgd_index(0x400000)].pgd; + swapper_pg_dir[pgd_index(0)].pgd = + swapper_pg_dir[pgd_index(PAGE_OFFSET)].pgd; + temp = PAGE_OFFSET + 0x400000; + swapper_pg_dir[pgd_index(0x400000)].pgd = + swapper_pg_dir[pgd_index(temp)].pgd; + } + + /* + * After the lock is released, the original page table is restored. + */ + local_flush_tlb(); + + cpu_gdt_descr[0].address = __pa(cpu_gdt_descr[0].address); + __asm__ __volatile__("lgdt %0":"=m" + (*(struct Xgt_desc_struct *) __pa(&cpu_gdt_descr[0]))); +} + +static void efi_call_phys_epilog(void) +{ + unsigned long cr4; + + cpu_gdt_descr[0].address = + (unsigned long) __va(cpu_gdt_descr[0].address); + __asm__ __volatile__("lgdt %0":"=m"(cpu_gdt_descr)); + __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4)); + + if (cr4 & X86_CR4_PSE) { + swapper_pg_dir[pgd_index(0)].pgd = + efi_bak_pg_dir_pointer[0].pgd; + } else { + swapper_pg_dir[pgd_index(0)].pgd = + efi_bak_pg_dir_pointer[0].pgd; + swapper_pg_dir[pgd_index(0x400000)].pgd = + efi_bak_pg_dir_pointer[1].pgd; + } + + /* + * After the lock is released, the original page table is restored. + */ + local_flush_tlb(); + + local_irq_restore(efi_rt_eflags); + spin_unlock(&efi_rt_lock); +} + +static efi_status_t +phys_efi_set_virtual_address_map(unsigned long memory_map_size, + unsigned long descriptor_size, + u32 descriptor_version, + efi_memory_desc_t *virtual_map) +{ + efi_status_t status; + + efi_call_phys_prelog(); + status = efi_call_phys(efi_phys.set_virtual_address_map, + memory_map_size, descriptor_size, + descriptor_version, virtual_map); + efi_call_phys_epilog(); + return status; +} + +efi_status_t +phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc) +{ + efi_status_t status; + + efi_call_phys_prelog(); + status = efi_call_phys(efi_phys.get_time, tm, tc); + efi_call_phys_epilog(); + return status; +} + +int inline efi_set_rtc_mmss(unsigned long nowtime) +{ + int real_seconds, real_minutes; + efi_status_t status; + efi_time_t eft; + efi_time_cap_t cap; + + spin_lock(&efi_rt_lock); + status = efi.get_time(&eft, &cap); + spin_unlock(&efi_rt_lock); + if (status != EFI_SUCCESS) + panic("Ooops, efitime: can't read time!\n"); + real_seconds = nowtime % 60; + real_minutes = nowtime / 60; + + if (((abs(real_minutes - eft.minute) + 15)/30) & 1) + real_minutes += 30; + real_minutes %= 60; + + eft.minute = real_minutes; + eft.second = real_seconds; + + if (status != EFI_SUCCESS) { + printk("Ooops: efitime: can't read time!\n"); + return -1; + } + return 0; +} +/* + * This should only be used during kernel init and before runtime + * services have been remapped, therefore, we'll need to call in physical + * mode. Note, this call isn't used later, so mark it __init. + */ +unsigned long inline __init efi_get_time(void) +{ + efi_status_t status; + efi_time_t eft; + efi_time_cap_t cap; + + status = phys_efi_get_time(&eft, &cap); + if (status != EFI_SUCCESS) + printk("Oops: efitime: can't read time status: 0x%lx\n",status); + + return mktime(eft.year, eft.month, eft.day, eft.hour, + eft.minute, eft.second); +} + +int is_available_memory(efi_memory_desc_t * md) +{ + if (!(md->attribute & EFI_MEMORY_WB)) + return 0; + + switch (md->type) { + case EFI_LOADER_CODE: + case EFI_LOADER_DATA: + case EFI_BOOT_SERVICES_CODE: + case EFI_BOOT_SERVICES_DATA: + case EFI_CONVENTIONAL_MEMORY: + return 1; + } + return 0; +} + +/* + * We need to map the EFI memory map again after paging_init(). + */ +void __init efi_map_memmap(void) +{ + memmap.map = NULL; + + memmap.map = (efi_memory_desc_t *) + bt_ioremap((unsigned long) memmap.phys_map, + (memmap.nr_map * sizeof(efi_memory_desc_t))); + + if (memmap.map == NULL) + printk(KERN_ERR PFX "Could not remap the EFI memmap!\n"); +} + +void __init print_efi_memmap(void) +{ + efi_memory_desc_t *md; + int i; + + for (i = 0; i < memmap.nr_map; i++) { + md = &memmap.map[i]; + printk(KERN_INFO "mem%02u: type=%u, attr=0x%llx, " + "range=[0x%016llx-0x%016llx) (%lluMB)\n", + i, md->type, md->attribute, md->phys_addr, + md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT), + (md->num_pages >> (20 - EFI_PAGE_SHIFT))); + } +} + +/* + * Walks the EFI memory map and calls CALLBACK once for each EFI + * memory descriptor that has memory that is available for kernel use. + */ +void efi_memmap_walk(efi_freemem_callback_t callback, void *arg) +{ + int prev_valid = 0; + struct range { + unsigned long start; + unsigned long end; + } prev, curr; + efi_memory_desc_t *md; + unsigned long start, end; + int i; + + for (i = 0; i < memmap.nr_map; i++) { + md = &memmap.map[i]; + + if ((md->num_pages == 0) || (!is_available_memory(md))) + continue; + + curr.start = md->phys_addr; + curr.end = curr.start + (md->num_pages << EFI_PAGE_SHIFT); + + if (!prev_valid) { + prev = curr; + prev_valid = 1; + } else { + if (curr.start < prev.start) + printk(KERN_INFO PFX "Unordered memory map\n"); + if (prev.end == curr.start) + prev.end = curr.end; + else { + start = + (unsigned long) (PAGE_ALIGN(prev.start)); + end = (unsigned long) (prev.end & PAGE_MASK); + if ((end > start) + && (*callback) (start, end, arg) < 0) + return; + prev = curr; + } + } + } + if (prev_valid) { + start = (unsigned long) PAGE_ALIGN(prev.start); + end = (unsigned long) (prev.end & PAGE_MASK); + if (end > start) + (*callback) (start, end, arg); + } +} + +void __init efi_init(void) +{ + efi_config_table_t *config_tables; + efi_runtime_services_t *runtime; + efi_char16_t *c16; + char vendor[100] = "unknown"; + unsigned long num_config_tables; + int i = 0; + + memset(&efi, 0, sizeof(efi) ); + memset(&efi_phys, 0, sizeof(efi_phys)); + + efi_phys.systab = EFI_SYSTAB; + memmap.phys_map = EFI_MEMMAP; + memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE; + memmap.desc_version = EFI_MEMDESC_VERSION; + + efi.systab = (efi_system_table_t *) + boot_ioremap((unsigned long) efi_phys.systab, + sizeof(efi_system_table_t)); + /* + * Verify the EFI Table + */ + if (efi.systab == NULL) + printk(KERN_ERR PFX "Woah! Couldn't map the EFI system table.\n"); + if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) + printk(KERN_ERR PFX "Woah! EFI system table signature incorrect\n"); + if ((efi.systab->hdr.revision ^ EFI_SYSTEM_TABLE_REVISION) >> 16 != 0) + printk(KERN_ERR PFX + "Warning: EFI system table major version mismatch: " + "got %d.%02d, expected %d.%02d\n", + efi.systab->hdr.revision >> 16, + efi.systab->hdr.revision & 0xffff, + EFI_SYSTEM_TABLE_REVISION >> 16, + EFI_SYSTEM_TABLE_REVISION & 0xffff); + /* + * Grab some details from the system table + */ + num_config_tables = efi.systab->nr_tables; + config_tables = (efi_config_table_t *)efi.systab->tables; + runtime = efi.systab->runtime; + + /* + * Show what we know for posterity + */ + c16 = (efi_char16_t *) boot_ioremap(efi.systab->fw_vendor, 2); + if (c16) { + for (i = 0; i < sizeof(vendor) && *c16; ++i) + vendor[i] = *c16++; + vendor[i] = '\0'; + } else + printk(KERN_ERR PFX "Could not map the firmware vendor!\n"); + + printk(KERN_INFO PFX "EFI v%u.%.02u by %s \n", + efi.systab->hdr.revision >> 16, + efi.systab->hdr.revision & 0xffff, vendor); + + /* + * Let's see what config tables the firmware passed to us. + */ + config_tables = (efi_config_table_t *) + boot_ioremap((unsigned long) config_tables, + num_config_tables * sizeof(efi_config_table_t)); + + if (config_tables == NULL) + printk(KERN_ERR PFX "Could not map EFI Configuration Table!\n"); + + for (i = 0; i < num_config_tables; i++) { + if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) { + efi.mps = (void *)config_tables[i].table; + printk(KERN_INFO " MPS=0x%lx ", config_tables[i].table); + } else + if (efi_guidcmp(config_tables[i].guid, ACPI_20_TABLE_GUID) == 0) { + efi.acpi20 = __va(config_tables[i].table); + printk(KERN_INFO " ACPI 2.0=0x%lx ", config_tables[i].table); + } else + if (efi_guidcmp(config_tables[i].guid, ACPI_TABLE_GUID) == 0) { + efi.acpi = __va(config_tables[i].table); + printk(KERN_INFO " ACPI=0x%lx ", config_tables[i].table); + } else + if (efi_guidcmp(config_tables[i].guid, SMBIOS_TABLE_GUID) == 0) { + efi.smbios = (void *) config_tables[i].table; + printk(KERN_INFO " SMBIOS=0x%lx ", config_tables[i].table); + } else + if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) { + efi.hcdp = (void *)config_tables[i].table; + printk(KERN_INFO " HCDP=0x%lx ", config_tables[i].table); + } else + if (efi_guidcmp(config_tables[i].guid, UGA_IO_PROTOCOL_GUID) == 0) { + efi.uga = (void *)config_tables[i].table; + printk(KERN_INFO " UGA=0x%lx ", config_tables[i].table); + } + } + printk("\n"); + + /* + * Check out the runtime services table. We need to map + * the runtime services table so that we can grab the physical + * address of several of the EFI runtime functions, needed to + * set the firmware into virtual mode. + */ + + runtime = (efi_runtime_services_t *) boot_ioremap((unsigned long) + runtime, + sizeof(efi_runtime_services_t)); + if (runtime != NULL) { + /* + * We will only need *early* access to the following + * two EFI runtime services before set_virtual_address_map + * is invoked. + */ + efi_phys.get_time = (efi_get_time_t *) runtime->get_time; + efi_phys.set_virtual_address_map = + (efi_set_virtual_address_map_t *) + runtime->set_virtual_address_map; + } else + printk(KERN_ERR PFX "Could not map the runtime service table!\n"); + + /* Map the EFI memory map for use until paging_init() */ + + memmap.map = (efi_memory_desc_t *) + boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE); + + if (memmap.map == NULL) + printk(KERN_ERR PFX "Could not map the EFI memory map!\n"); + + if (EFI_MEMDESC_SIZE != sizeof(efi_memory_desc_t)) { + printk(KERN_WARNING PFX "Warning! Kernel-defined memdesc doesn't " + "match the one from EFI!\n"); + } +#if EFI_DEBUG + print_efi_memmap(); +#endif +} + +/* + * This function will switch the EFI runtime services to virtual mode. + * Essentially, look through the EFI memmap and map every region that + * has the runtime attribute bit set in its memory descriptor and update + * that memory descriptor with the virtual address obtained from ioremap(). + * This enables the runtime services to be called without having to + * thunk back into physical mode for every invocation. + */ + +void __init efi_enter_virtual_mode(void) +{ + efi_memory_desc_t *md; + efi_status_t status; + int i; + + efi.systab = NULL; + + for (i = 0; i < memmap.nr_map; i++) { + md = &memmap.map[i]; + + if (md->attribute & EFI_MEMORY_RUNTIME) { + md->virt_addr = + (unsigned long)ioremap(md->phys_addr, + md->num_pages << EFI_PAGE_SHIFT); + if (!(unsigned long)md->virt_addr) { + printk(KERN_ERR PFX "ioremap of 0x%lX failed\n", + (unsigned long)md->phys_addr); + } + + if (((unsigned long)md->phys_addr <= + (unsigned long)efi_phys.systab) && + ((unsigned long)efi_phys.systab < + md->phys_addr + + ((unsigned long)md->num_pages << + EFI_PAGE_SHIFT))) { + unsigned long addr; + + addr = md->virt_addr - md->phys_addr + + (unsigned long)efi_phys.systab; + efi.systab = (efi_system_table_t *)addr; + } + } + } + + if (!efi.systab) + BUG(); + + status = phys_efi_set_virtual_address_map( + sizeof(efi_memory_desc_t) * memmap.nr_map, + sizeof(efi_memory_desc_t), + memmap.desc_version, + memmap.phys_map); + + if (status != EFI_SUCCESS) { + printk (KERN_ALERT "You are screwed! " + "Unable to switch EFI into virtual mode " + "(status=%lx)\n", status); + panic("EFI call to SetVirtualAddressMap() failed!"); + } + + /* + * Now that EFI is in virtual mode, update the function + * pointers in the runtime service table to the new virtual addresses. + */ + + efi.get_time = (efi_get_time_t *) efi.systab->runtime->get_time; + efi.set_time = (efi_set_time_t *) efi.systab->runtime->set_time; + efi.get_wakeup_time = (efi_get_wakeup_time_t *) + efi.systab->runtime->get_wakeup_time; + efi.set_wakeup_time = (efi_set_wakeup_time_t *) + efi.systab->runtime->set_wakeup_time; + efi.get_variable = (efi_get_variable_t *) + efi.systab->runtime->get_variable; + efi.get_next_variable = (efi_get_next_variable_t *) + efi.systab->runtime->get_next_variable; + efi.set_variable = (efi_set_variable_t *) + efi.systab->runtime->set_variable; + efi.get_next_high_mono_count = (efi_get_next_high_mono_count_t *) + efi.systab->runtime->get_next_high_mono_count; + efi.reset_system = (efi_reset_system_t *) + efi.systab->runtime->reset_system; +} + +void __init +efi_initialize_iomem_resources(struct resource *code_resource, + struct resource *data_resource) +{ + struct resource *res; + efi_memory_desc_t *md; + int i; + + for (i = 0; i < memmap.nr_map; i++) { + md = &memmap.map[i]; + + if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) > + 0x100000000ULL) + continue; + res = alloc_bootmem_low(sizeof(struct resource)); + switch (md->type) { + case EFI_RESERVED_TYPE: + res->name = "Reserved Memory"; + break; + case EFI_LOADER_CODE: + res->name = "Loader Code"; + break; + case EFI_LOADER_DATA: + res->name = "Loader Data"; + break; + case EFI_BOOT_SERVICES_DATA: + res->name = "BootServices Data"; + break; + case EFI_BOOT_SERVICES_CODE: + res->name = "BootServices Code"; + break; + case EFI_RUNTIME_SERVICES_CODE: + res->name = "Runtime Service Code"; + break; + case EFI_RUNTIME_SERVICES_DATA: + res->name = "Runtime Service Data"; + break; + case EFI_CONVENTIONAL_MEMORY: + res->name = "Conventional Memory"; + break; + case EFI_UNUSABLE_MEMORY: + res->name = "Unusable Memory"; + break; + case EFI_ACPI_RECLAIM_MEMORY: + res->name = "ACPI Reclaim"; + break; + case EFI_ACPI_MEMORY_NVS: + res->name = "ACPI NVS"; + break; + case EFI_MEMORY_MAPPED_IO: + res->name = "Memory Mapped IO"; + break; + case EFI_MEMORY_MAPPED_IO_PORT_SPACE: + res->name = "Memory Mapped IO Port Space"; + break; + default: + res->name = "Reserved"; + break; + } + res->start = md->phys_addr; + res->end = res->start + ((md->num_pages << EFI_PAGE_SHIFT) - 1); + res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; + if (request_resource(&iomem_resource, res) < 0) + printk(KERN_ERR PFX "Failed to allocate res %s : 0x%lx-0x%lx\n", + res->name, res->start, res->end); + /* + * We don't know which region contains kernel data so we try + * it repeatedly and let the resource manager test it. + */ + if (md->type == EFI_CONVENTIONAL_MEMORY) { + request_resource(res, code_resource); + request_resource(res, data_resource); + } + } +} + +/* + * Convenience functions to obtain memory types and attributes + */ + +u32 efi_mem_type(unsigned long phys_addr) +{ + efi_memory_desc_t *md; + int i; + + for (i = 0; i < memmap.nr_map; i++) { + md = &memmap.map[i]; + if ((md->phys_addr <= phys_addr) && (phys_addr < + (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) )) + return md->type; + } + return 0; +} + +u64 efi_mem_attributes(unsigned long phys_addr) +{ + efi_memory_desc_t *md; + int i; + + for (i = 0; i < memmap.nr_map; i++) { + md = &memmap.map[i]; + if ((md->phys_addr <= phys_addr) && (phys_addr < + (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) )) + return md->attribute; + } + return 0; +} diff -Nru a/arch/i386/kernel/efi_stub.S b/arch/i386/kernel/efi_stub.S --- /dev/null Wed Dec 31 16:00:00 1969 +++ b/arch/i386/kernel/efi_stub.S Tue Dec 30 13:48:30 2003 @@ -0,0 +1,124 @@ +/* + * EFI call stub for IA32. + * + * This stub allows us to make EFI calls in physical mode with interrupts + * turned off. + */ + +#include +#include +#include +#include + +/* + * efi_call_phys(void *, ...) is a function with variable parameters. + * All the callers of this function assure that all the parameters are 4-bytes. + */ + +/* + * In gcc calling convention, EBX, ESP, EBP, ESI and EDI are all callee save. + * So we'd better save all of them at the beginning of this function and restore + * at the end no matter how many we use, because we can not assure EFI runtime + * service functions will comply with gcc calling convention, too. + */ + +.text +ENTRY(efi_call_phys) + /* + * 0. The function can only be called in Linux kernel. So CS has been + * set to 0x0010, DS and SS have been set to 0x0018. In EFI, I found + * the values of these registers are the same. And, the corresponding + * GDT entries are identical. So I will do nothing about segment reg + * and GDT, but change GDT base register in prelog and epilog. + */ + + /* + * 1. Now I am running with EIP = + PAGE_OFFSET. + * But to make it smoothly switch from virtual mode to flat mode. + * The mapping of lower virtual memory has been created in prelog and + * epilog. + */ + movl $1f, %edx + subl $__PAGE_OFFSET, %edx + jmp *%edx +1: + + /* + * 2. Now on the top of stack is the return + * address in the caller of efi_call_phys(), then parameter 1, + * parameter 2, ..., param n. To make things easy, we save the return + * address of efi_call_phys in a global variable. + */ + popl %edx + movl %edx, saved_return_addr + /* get the function pointer into ECX*/ + popl %ecx + movl %ecx, efi_rt_function_ptr + movl $2f, %edx + subl $__PAGE_OFFSET, %edx + pushl %edx + + /* + * 3. Clear PG bit in %CR0. + */ + movl %cr0, %edx + andl $0x7fffffff, %edx + movl %edx, %cr0 + jmp 1f +1: + + /* + * 4. Adjust stack pointer. + */ + subl $__PAGE_OFFSET, %esp + + /* + * 5. Call the physical function. + */ + jmp *%ecx + +2: + /* + * 6. After EFI runtime service returns, control will return to + * following instruction. We'd better readjust stack pointer first. + */ + addl $__PAGE_OFFSET, %esp + + /* + * 7. Restore PG bit + */ + movl %cr0, %edx + orl $0x80000000, %edx + movl %edx, %cr0 + jmp 1f +1: + /* + * 8. Now restore the virtual mode from flat mode by + * adding EIP with PAGE_OFFSET. + */ + movl $1f, %edx + jmp *%edx +1: + + /* + * 9. Balance the stack. And because EAX contain the return value, + * we'd better not clobber it. + */ + leal efi_rt_function_ptr, %edx + movl (%edx), %ecx + pushl %ecx + + /* + * 10. Push the saved return address onto the stack and return. + */ + leal saved_return_addr, %edx + movl (%edx), %ecx + pushl %ecx + ret +.previous + +.data +saved_return_addr: + .long 0 +efi_rt_function_ptr: + .long 0 diff -Nru a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c --- a/arch/i386/kernel/i8259.c Tue Dec 30 13:48:29 2003 +++ b/arch/i386/kernel/i8259.c Tue Dec 30 13:48:29 2003 @@ -419,8 +419,10 @@ * us. (some of these will be overridden and become * 'special' SMP interrupts) */ - for (i = 0; i < NR_IRQS; i++) { + for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) { int vector = FIRST_EXTERNAL_VECTOR + i; + if (i >= NR_IRQS) + break; if (vector != SYSCALL_VECTOR) set_intr_gate(vector, interrupt[i]); } diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c --- a/arch/i386/kernel/io_apic.c Tue Dec 30 13:48:29 2003 +++ b/arch/i386/kernel/io_apic.c Tue Dec 30 13:48:29 2003 @@ -76,6 +76,14 @@ int apic, pin, next; } irq_2_pin[PIN_MAP_SIZE]; +#ifdef CONFIG_PCI_USE_VECTOR +int vector_irq[NR_IRQS] = { [0 ... NR_IRQS -1] = -1}; +#define vector_to_irq(vector) \ + (platform_legacy_irq(vector) ? vector : vector_irq[vector]) +#else +#define vector_to_irq(vector) (vector) +#endif + /* * The common case is 1:1 IRQ<->pin mappings. Sometimes there are * shared ISA-space IRQs, so we have to support them. We are super @@ -249,7 +257,7 @@ clear_IO_APIC_pin(apic, pin); } -static void set_ioapic_affinity(unsigned int irq, cpumask_t cpumask) +static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask) { unsigned long flags; int pin; @@ -288,7 +296,7 @@ extern cpumask_t irq_affinity[NR_IRQS]; -static cpumask_t __cacheline_aligned pending_irq_balance_cpumask[NR_IRQS]; +cpumask_t __cacheline_aligned pending_irq_balance_cpumask[NR_IRQS]; #define IRQBALANCE_CHECK_ARCH -999 static int irqbalance_disabled = IRQBALANCE_CHECK_ARCH; @@ -670,13 +678,11 @@ __setup("noirqbalance", irqbalance_disable); -static void set_ioapic_affinity(unsigned int irq, cpumask_t mask); - static inline void move_irq(int irq) { /* note - we hold the desc->lock */ if (unlikely(!cpus_empty(pending_irq_balance_cpumask[irq]))) { - set_ioapic_affinity(irq, pending_irq_balance_cpumask[irq]); + set_ioapic_affinity_irq(irq, pending_irq_balance_cpumask[irq]); cpus_clear(pending_irq_balance_cpumask[irq]); } } @@ -853,7 +859,7 @@ if (irq_entry == -1) continue; irq = pin_2_irq(irq_entry, ioapic, pin); - set_ioapic_affinity(irq, mask); + set_ioapic_affinity_irq(irq, mask); } } @@ -1141,7 +1147,8 @@ /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */ u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 }; -static int __init assign_irq_vector(int irq) +#ifndef CONFIG_PCI_USE_VECTOR +int __init assign_irq_vector(int irq) { static int current_vector = FIRST_DEVICE_VECTOR, offset = 0; BUG_ON(irq >= NR_IRQ_VECTORS); @@ -1158,11 +1165,36 @@ } IO_APIC_VECTOR(irq) = current_vector; + return current_vector; } +#endif -static struct hw_interrupt_type ioapic_level_irq_type; -static struct hw_interrupt_type ioapic_edge_irq_type; +static struct hw_interrupt_type ioapic_level_type; +static struct hw_interrupt_type ioapic_edge_type; + +#define IOAPIC_AUTO -1 +#define IOAPIC_EDGE 0 +#define IOAPIC_LEVEL 1 + +static inline void ioapic_register_intr(int irq, int vector, unsigned long trigger) +{ + if (use_pci_vector() && !platform_legacy_irq(irq)) { + if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || + trigger == IOAPIC_LEVEL) + irq_desc[vector].handler = &ioapic_level_type; + else + irq_desc[vector].handler = &ioapic_edge_type; + set_intr_gate(vector, interrupt[vector]); + } else { + if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) || + trigger == IOAPIC_LEVEL) + irq_desc[irq].handler = &ioapic_level_type; + else + irq_desc[irq].handler = &ioapic_edge_type; + set_intr_gate(vector, interrupt[irq]); + } +} void __init setup_IO_APIC_irqs(void) { @@ -1220,13 +1252,7 @@ if (IO_APIC_IRQ(irq)) { vector = assign_irq_vector(irq); entry.vector = vector; - - if (IO_APIC_irq_trigger(irq)) - irq_desc[irq].handler = &ioapic_level_irq_type; - else - irq_desc[irq].handler = &ioapic_edge_irq_type; - - set_intr_gate(vector, interrupt[irq]); + ioapic_register_intr(irq, vector, IOAPIC_AUTO); if (!apic && (irq < 16)) disable_8259A_irq(irq); @@ -1273,7 +1299,7 @@ * The timer IRQ doesn't have to know that behind the * scene we have a 8259A-master in AEOI mode ... */ - irq_desc[0].handler = &ioapic_edge_irq_type; + irq_desc[0].handler = &ioapic_edge_type; /* * Add it to the IO-APIC irq-routing table: @@ -1763,9 +1789,6 @@ * that was delayed but this is now handled in the device * independent code. */ -#define enable_edge_ioapic_irq unmask_IO_APIC_irq - -static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ } /* * Starting up a edge-triggered IO-APIC interrupt is @@ -1776,7 +1799,6 @@ * This is not complete - we should be able to fake * an edge even if it isn't on the 8259A... */ - static unsigned int startup_edge_ioapic_irq(unsigned int irq) { int was_pending = 0; @@ -1794,8 +1816,6 @@ return was_pending; } -#define shutdown_edge_ioapic_irq disable_edge_ioapic_irq - /* * Once we have recorded IRQ_PENDING already, we can mask the * interrupt for real. This prevents IRQ storms from unhandled @@ -1810,9 +1830,6 @@ ack_APIC_irq(); } -static void end_edge_ioapic_irq (unsigned int i) { /* nothing */ } - - /* * Level triggered interrupts can just be masked, * and shutting down and starting up the interrupt @@ -1834,10 +1851,6 @@ return 0; /* don't check for pending */ } -#define shutdown_level_ioapic_irq mask_IO_APIC_irq -#define enable_level_ioapic_irq unmask_IO_APIC_irq -#define disable_level_ioapic_irq mask_IO_APIC_irq - static void end_level_ioapic_irq (unsigned int irq) { unsigned long v; @@ -1864,6 +1877,7 @@ * The idea is from Manfred Spraul. --macro */ i = IO_APIC_VECTOR(irq); + v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1)); ack_APIC_irq(); @@ -1898,7 +1912,57 @@ } } -static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ } +#ifdef CONFIG_PCI_USE_VECTOR +static unsigned int startup_edge_ioapic_vector(unsigned int vector) +{ + int irq = vector_to_irq(vector); + + return startup_edge_ioapic_irq(irq); +} + +static void ack_edge_ioapic_vector(unsigned int vector) +{ + int irq = vector_to_irq(vector); + + ack_edge_ioapic_irq(irq); +} + +static unsigned int startup_level_ioapic_vector (unsigned int vector) +{ + int irq = vector_to_irq(vector); + + return startup_level_ioapic_irq (irq); +} + +static void end_level_ioapic_vector (unsigned int vector) +{ + int irq = vector_to_irq(vector); + + end_level_ioapic_irq(irq); +} + +static void mask_IO_APIC_vector (unsigned int vector) +{ + int irq = vector_to_irq(vector); + + mask_IO_APIC_irq(irq); +} + +static void unmask_IO_APIC_vector (unsigned int vector) +{ + int irq = vector_to_irq(vector); + + unmask_IO_APIC_irq(irq); +} + +static void set_ioapic_affinity_vector (unsigned int vector, + cpumask_t cpu_mask) +{ + int irq = vector_to_irq(vector); + + set_ioapic_affinity_irq(irq, cpu_mask); +} +#endif /* * Level and edge triggered IO-APIC interrupts need different handling, @@ -1908,26 +1972,25 @@ * edge-triggered handler, without risking IRQ storms and other ugly * races. */ - -static struct hw_interrupt_type ioapic_edge_irq_type = { +static struct hw_interrupt_type ioapic_edge_type = { .typename = "IO-APIC-edge", - .startup = startup_edge_ioapic_irq, - .shutdown = shutdown_edge_ioapic_irq, - .enable = enable_edge_ioapic_irq, - .disable = disable_edge_ioapic_irq, - .ack = ack_edge_ioapic_irq, - .end = end_edge_ioapic_irq, + .startup = startup_edge_ioapic, + .shutdown = shutdown_edge_ioapic, + .enable = enable_edge_ioapic, + .disable = disable_edge_ioapic, + .ack = ack_edge_ioapic, + .end = end_edge_ioapic, .set_affinity = set_ioapic_affinity, }; -static struct hw_interrupt_type ioapic_level_irq_type = { +static struct hw_interrupt_type ioapic_level_type = { .typename = "IO-APIC-level", - .startup = startup_level_ioapic_irq, - .shutdown = shutdown_level_ioapic_irq, - .enable = enable_level_ioapic_irq, - .disable = disable_level_ioapic_irq, - .ack = mask_and_ack_level_ioapic_irq, - .end = end_level_ioapic_irq, + .startup = startup_level_ioapic, + .shutdown = shutdown_level_ioapic, + .enable = enable_level_ioapic, + .disable = disable_level_ioapic, + .ack = mask_and_ack_level_ioapic, + .end = end_level_ioapic, .set_affinity = set_ioapic_affinity, }; @@ -1947,7 +2010,13 @@ * 0x80, because int 0x80 is hm, kind of importantish. ;) */ for (irq = 0; irq < NR_IRQS ; irq++) { - if (IO_APIC_IRQ(irq) && !IO_APIC_VECTOR(irq)) { + int tmp = irq; + if (use_pci_vector()) { + if (!platform_legacy_irq(tmp)) + if ((tmp = vector_to_irq(tmp)) == -1) + continue; + } + if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) { /* * Hmm.. We don't have an entry for this, * so default to an old-fashioned 8259 @@ -2379,10 +2448,12 @@ "IRQ %d Mode:%i Active:%i)\n", ioapic, mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low); + if (use_pci_vector() && !platform_legacy_irq(irq)) + irq = IO_APIC_VECTOR(irq); if (edge_level) { - irq_desc[irq].handler = &ioapic_level_irq_type; + irq_desc[irq].handler = &ioapic_level_type; } else { - irq_desc[irq].handler = &ioapic_edge_irq_type; + irq_desc[irq].handler = &ioapic_edge_type; } set_intr_gate(entry.vector, interrupt[irq]); diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c --- a/arch/i386/kernel/irq.c Tue Dec 30 13:48:28 2003 +++ b/arch/i386/kernel/irq.c Tue Dec 30 13:48:28 2003 @@ -138,17 +138,19 @@ int show_interrupts(struct seq_file *p, void *v) { - int i, j; + int i = *(loff_t *) v, j; struct irqaction * action; unsigned long flags; - seq_printf(p, " "); - for (j=0; j= NR_IRQS) + return 0; + action = irq_desc[irq].action; + if (action) { + if (irqflags & action->flags & SA_SHIRQ) + action = NULL; + } + return !action; +} + /** * request_irq - allocate an interrupt line * @irq: Interrupt line to allocate @@ -898,48 +918,6 @@ static struct proc_dir_entry * root_irq_dir; static struct proc_dir_entry * irq_dir [NR_IRQS]; -#define HEX_DIGITS (2*sizeof(cpumask_t)) - -static unsigned int parse_hex_value(const char __user *buffer, - unsigned long count, cpumask_t *ret) -{ - unsigned char hexnum[HEX_DIGITS]; - cpumask_t value = CPU_MASK_NONE; - int i; - - if (!count) - return -EINVAL; - if (count > HEX_DIGITS) - count = HEX_DIGITS; - if (copy_from_user(hexnum, buffer, count)) - return -EFAULT; - - /* - * Parse the first HEX_DIGITS characters as a hex string, any non-hex char - * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same. - */ - - for (i = 0; i < count; i++) { - unsigned int c = hexnum[i]; - int k; - - switch (c) { - case '0' ... '9': c -= '0'; break; - case 'a' ... 'f': c -= 'a'-10; break; - case 'A' ... 'F': c -= 'A'-10; break; - default: - goto out; - } - cpus_shift_left(value, value, 4); - for (k = 0; k < 4; ++k) - if (test_bit(k, (unsigned long *)&c)) - cpu_set(k, value); - } -out: - *ret = value; - return 0; -} - #ifdef CONFIG_SMP static struct proc_dir_entry *smp_affinity_entry[NR_IRQS]; @@ -949,20 +927,10 @@ static int irq_affinity_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { - int k, len; - cpumask_t tmp = irq_affinity[(long)data]; - - if (count < HEX_DIGITS+1) + int len = cpumask_snprintf(page, count, irq_affinity[(long)data]); + if (count - len < 2) return -EINVAL; - - len = 0; - for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) { - int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp)); - len += j; - page += j; - cpus_shift_right(tmp, tmp, 16); - } - len += sprintf(page, "\n"); + len += sprintf(page + len, "\n"); return len; } @@ -975,7 +943,7 @@ if (!irq_desc[irq].handler->set_affinity) return -EIO; - err = parse_hex_value(buffer, count, &new_value); + err = cpumask_parse(buffer, count, new_value); if (err) return err; @@ -1000,10 +968,11 @@ static int prof_cpu_mask_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data) { - unsigned long *mask = (unsigned long *) data; - if (count < HEX_DIGITS+1) + int len = cpumask_snprintf(page, count, *(cpumask_t *)data); + if (count - len < 2) return -EINVAL; - return sprintf (page, "%08lx\n", *mask); + len += sprintf(page + len, "\n"); + return len; } static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer, @@ -1013,7 +982,7 @@ unsigned long full_count = count, err; cpumask_t new_value; - err = parse_hex_value(buffer, count, &new_value); + err = cpumask_parse(buffer, count, new_value); if (err) return err; diff -Nru a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c --- a/arch/i386/kernel/mpparse.c Tue Dec 30 13:48:28 2003 +++ b/arch/i386/kernel/mpparse.c Tue Dec 30 13:48:28 2003 @@ -1147,15 +1147,19 @@ if ((1<irq = irq; + if (use_pci_vector() && !platform_legacy_irq(irq)) + irq = IO_APIC_VECTOR(irq); + entry->irq = irq; continue; } mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<irq = irq; - + if (!io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low)) { + if (use_pci_vector() && !platform_legacy_irq(irq)) + irq = IO_APIC_VECTOR(irq); + entry->irq = irq; + } printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d -> IRQ %d\n", entry->id.segment, entry->id.bus, entry->id.device, ('A' + entry->pin), diff -Nru a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c --- a/arch/i386/kernel/process.c Tue Dec 30 13:48:28 2003 +++ b/arch/i386/kernel/process.c Tue Dec 30 13:48:28 2003 @@ -507,7 +507,7 @@ /* * Reload esp0, LDT and the page table pointer: */ - load_esp0(tss, next->esp0); + load_esp0(tss, next); /* * Load the per-thread Thread-Local Storage descriptor. diff -Nru a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c --- a/arch/i386/kernel/reboot.c Tue Dec 30 13:48:28 2003 +++ b/arch/i386/kernel/reboot.c Tue Dec 30 13:48:28 2003 @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include "mach_reboot.h" @@ -263,7 +264,12 @@ disable_IO_APIC(); #endif - if(!reboot_thru_bios) { + if (!reboot_thru_bios) { + if (efi_enabled) { + efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, 0); + __asm__ __volatile__("lidt %0": :"m" (no_idt)); + __asm__ __volatile__("int3"); + } /* rebooting needs to touch the page at absolute addr 0 */ *((unsigned short *)__va(0x472)) = reboot_mode; for (;;) { @@ -273,6 +279,8 @@ __asm__ __volatile__("int3"); } } + if (efi_enabled) + efi.reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, 0); machine_real_restart(jump_to_bios, sizeof(jump_to_bios)); } @@ -287,6 +295,8 @@ void machine_power_off(void) { + if (efi_enabled) + efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, 0); if (pm_power_off) pm_power_off(); } diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c --- a/arch/i386/kernel/setup.c Tue Dec 30 13:48:29 2003 +++ b/arch/i386/kernel/setup.c Tue Dec 30 13:48:29 2003 @@ -36,6 +36,8 @@ #include #include #include +#include +#include #include