From 47dce1da8ff42a05bcea6674c4a01062aacf6f02 Mon Sep 17 00:00:00 2001 From: David Chinner Date: Wed, 13 Aug 2008 15:41:12 +1000 Subject: [PATCH] --- yaml --- r: 108297 b: refs/heads/master c: 79071eb0b2f142b9cc6531d04fa2915943938b5e h: refs/heads/master i: 108295: 287aaa5c1acf6c0b006f1b429e2876edab19b43a v: v3 --- [refs] | 2 +- trunk/Documentation/DocBook/Makefile | 7 - trunk/Documentation/DocBook/procfs_example.c | 4 +- trunk/Documentation/Makefile | 3 - trunk/Documentation/accounting/Makefile | 10 - trunk/Documentation/accounting/getdelays.c | 25 +- trunk/Documentation/auxdisplay/Makefile | 10 - trunk/Documentation/connector/Makefile | 11 - trunk/Documentation/cpu-hotplug.txt | 5 + .../feature-removal-schedule.txt | 9 + .../filesystems/configfs/Makefile | 3 - trunk/Documentation/filesystems/quota.txt | 22 +- trunk/Documentation/ia64/Makefile | 8 - trunk/Documentation/lguest/lguest.c | 23 +- trunk/Documentation/networking/Makefile | 8 - trunk/Documentation/networking/ifenslave.c | 2 +- trunk/Documentation/pcmcia/Makefile | 10 - trunk/Documentation/pcmcia/crc32hash.c | 2 +- trunk/Documentation/spi/Makefile | 11 - trunk/Documentation/video4linux/Makefile | 8 - trunk/Documentation/vm/Makefile | 8 - trunk/Documentation/watchdog/src/Makefile | 8 - trunk/MAINTAINERS | 4 +- trunk/Makefile | 7 +- trunk/arch/h8300/mm/init.c | 9 +- trunk/arch/ia64/include/asm/sal.h | 2 +- trunk/arch/ia64/kernel/head.S | 26 +- trunk/arch/ia64/kernel/setup.c | 18 +- trunk/arch/ia64/kernel/smpboot.c | 2 - trunk/arch/ia64/kernel/vmlinux.lds.S | 3 - trunk/arch/ia64/mm/contig.c | 10 +- trunk/arch/ia64/mm/discontig.c | 6 +- trunk/arch/powerpc/Kconfig | 3 + trunk/arch/x86/Kconfig | 1 + trunk/arch/x86/kernel/apic_32.c | 14 +- trunk/arch/x86/kernel/cpu/bugs.c | 6 +- trunk/arch/x86/kernel/io_apic_32.c | 6 +- trunk/arch/x86/kernel/io_apic_64.c | 25 +- trunk/arch/x86/kernel/mpparse.c | 11 +- trunk/arch/x86/kernel/pci-calgary_64.c | 2 +- trunk/arch/x86/kernel/setup.c | 22 +- trunk/arch/x86/kernel/smpboot.c | 22 +- trunk/arch/x86/kernel/vmi_32.c | 3 +- trunk/arch/x86/mm/Makefile | 3 +- trunk/arch/x86/mm/pgtable.c | 3 - trunk/drivers/char/agp/agp.h | 3 - trunk/drivers/char/agp/ali-agp.c | 10 +- trunk/drivers/char/agp/amd-k7-agp.c | 10 +- trunk/drivers/char/agp/amd64-agp.c | 51 +-- trunk/drivers/char/agp/ati-agp.c | 7 +- trunk/drivers/char/agp/backend.c | 28 +- trunk/drivers/char/agp/generic.c | 41 +- trunk/drivers/char/agp/intel-agp.c | 83 ++-- trunk/drivers/char/agp/isoch.c | 37 +- trunk/drivers/char/agp/sis-agp.c | 17 +- trunk/drivers/char/agp/sworks-agp.c | 25 +- trunk/drivers/char/agp/uninorth-agp.c | 32 +- trunk/drivers/char/hvc_console.c | 5 +- trunk/drivers/char/rtc.c | 1 + trunk/drivers/cpuidle/sysfs.c | 29 +- trunk/drivers/firmware/memmap.c | 61 +-- .../drivers/infiniband/hw/ehca/ehca_classes.h | 9 - trunk/drivers/infiniband/hw/ehca/ehca_qes.h | 1 - trunk/drivers/infiniband/hw/ehca/ehca_qp.c | 48 +-- trunk/drivers/infiniband/hw/ehca/ehca_reqs.c | 60 +-- trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c | 17 +- trunk/drivers/lguest/page_tables.c | 25 +- trunk/drivers/misc/sgi-gru/grutables.h | 2 +- trunk/drivers/rtc/rtc-dev.c | 12 +- trunk/drivers/rtc/rtc-isl1208.c | 2 +- .../scsi/device_handler/scsi_dh_alua.c | 2 +- .../drivers/scsi/device_handler/scsi_dh_emc.c | 2 +- .../scsi/device_handler/scsi_dh_hp_sw.c | 2 +- .../scsi/device_handler/scsi_dh_rdac.c | 2 +- trunk/drivers/usb/misc/isight_firmware.c | 4 +- trunk/drivers/video/atmel_lcdfb.c | 13 +- trunk/drivers/video/aty/radeon_accel.c | 8 - trunk/drivers/video/console/fbcon.c | 4 +- trunk/drivers/video/matrox/i2c-matroxfb.c | 21 +- trunk/drivers/video/matrox/matroxfb_maven.c | 97 +++-- trunk/drivers/watchdog/Kconfig | 5 +- trunk/fs/dlm/config.c | 203 +++++----- trunk/fs/dlm/user.c | 10 +- trunk/fs/eventpoll.c | 5 +- trunk/fs/jbd/transaction.c | 4 +- trunk/fs/jbd2/transaction.c | 4 +- trunk/fs/lockd/svc4proc.c | 4 +- trunk/fs/lockd/svcproc.c | 4 +- trunk/fs/nfsd/export.c | 6 +- trunk/fs/reiserfs/super.c | 1 + trunk/fs/seq_file.c | 14 - trunk/fs/xfs/xfs_bit.c | 103 ----- trunk/fs/xfs/xfs_bit.h | 34 +- trunk/fs/xfs/xfs_rtalloc.c | 19 +- trunk/include/asm-generic/ioctl.h | 4 - .../include/asm => include/asm-h8300}/Kbuild | 0 .../include/asm => include/asm-h8300}/a.out.h | 0 .../asm => include/asm-h8300}/atomic.h | 0 .../asm => include/asm-h8300}/auxvec.h | 0 .../asm => include/asm-h8300}/bitops.h | 0 .../asm => include/asm-h8300}/bootinfo.h | 0 .../include/asm => include/asm-h8300}/bug.h | 0 .../include/asm => include/asm-h8300}/bugs.h | 0 .../asm => include/asm-h8300}/byteorder.h | 0 .../include/asm => include/asm-h8300}/cache.h | 0 .../asm => include/asm-h8300}/cachectl.h | 0 .../asm => include/asm-h8300}/cacheflush.h | 0 .../asm => include/asm-h8300}/checksum.h | 0 .../asm => include/asm-h8300}/cputime.h | 0 .../asm => include/asm-h8300}/current.h | 0 .../include/asm => include/asm-h8300}/dbg.h | 0 .../include/asm => include/asm-h8300}/delay.h | 0 .../asm => include/asm-h8300}/device.h | 0 .../include/asm => include/asm-h8300}/div64.h | 0 .../include/asm => include/asm-h8300}/dma.h | 0 .../include/asm => include/asm-h8300}/elf.h | 0 .../asm-h8300}/emergency-restart.h | 0 .../include/asm => include/asm-h8300}/errno.h | 0 .../include/asm => include/asm-h8300}/fb.h | 0 .../include/asm => include/asm-h8300}/fcntl.h | 0 .../include/asm => include/asm-h8300}/flat.h | 0 .../include/asm => include/asm-h8300}/fpu.h | 0 .../include/asm => include/asm-h8300}/futex.h | 0 .../include/asm => include/asm-h8300}/gpio.h | 0 .../asm => include/asm-h8300}/hardirq.h | 0 .../asm => include/asm-h8300}/hw_irq.h | 0 .../include/asm => include/asm-h8300}/io.h | 0 .../include/asm => include/asm-h8300}/ioctl.h | 0 .../asm => include/asm-h8300}/ioctls.h | 0 .../asm => include/asm-h8300}/ipcbuf.h | 0 .../include/asm => include/asm-h8300}/irq.h | 0 .../asm => include/asm-h8300}/irq_regs.h | 0 .../asm => include/asm-h8300}/kdebug.h | 0 .../asm => include/asm-h8300}/kmap_types.h | 0 .../asm => include/asm-h8300}/linkage.h | 0 .../include/asm => include/asm-h8300}/local.h | 0 .../asm => include/asm-h8300}/mc146818rtc.h | 0 .../include/asm => include/asm-h8300}/md.h | 0 .../include/asm => include/asm-h8300}/mman.h | 0 .../include/asm => include/asm-h8300}/mmu.h | 0 .../asm => include/asm-h8300}/mmu_context.h | 0 .../asm => include/asm-h8300}/module.h | 0 .../asm => include/asm-h8300}/msgbuf.h | 0 .../include/asm => include/asm-h8300}/mutex.h | 0 .../include/asm => include/asm-h8300}/page.h | 0 .../asm => include/asm-h8300}/page_offset.h | 0 .../include/asm => include/asm-h8300}/param.h | 0 .../include/asm => include/asm-h8300}/pci.h | 0 .../asm => include/asm-h8300}/percpu.h | 0 .../asm => include/asm-h8300}/pgalloc.h | 0 .../asm => include/asm-h8300}/pgtable.h | 0 .../include/asm => include/asm-h8300}/poll.h | 0 .../asm => include/asm-h8300}/posix_types.h | 0 .../asm => include/asm-h8300}/processor.h | 0 .../asm => include/asm-h8300}/ptrace.h | 0 .../asm => include/asm-h8300}/regs267x.h | 0 .../asm => include/asm-h8300}/regs306x.h | 0 .../asm => include/asm-h8300}/resource.h | 0 .../asm => include/asm-h8300}/scatterlist.h | 0 .../asm => include/asm-h8300}/sections.h | 0 .../asm => include/asm-h8300}/segment.h | 0 .../asm => include/asm-h8300}/sembuf.h | 0 .../include/asm => include/asm-h8300}/setup.h | 0 .../asm => include/asm-h8300}/sh_bios.h | 0 .../include/asm => include/asm-h8300}/shm.h | 0 .../asm => include/asm-h8300}/shmbuf.h | 0 .../asm => include/asm-h8300}/shmparam.h | 0 .../asm => include/asm-h8300}/sigcontext.h | 0 .../asm => include/asm-h8300}/siginfo.h | 0 .../asm => include/asm-h8300}/signal.h | 0 .../include/asm => include/asm-h8300}/smp.h | 0 .../asm => include/asm-h8300}/socket.h | 0 .../asm => include/asm-h8300}/sockios.h | 0 .../asm => include/asm-h8300}/spinlock.h | 0 .../include/asm => include/asm-h8300}/stat.h | 0 .../asm => include/asm-h8300}/statfs.h | 0 .../asm => include/asm-h8300}/string.h | 0 .../asm => include/asm-h8300}/system.h | 0 .../asm => include/asm-h8300}/target_time.h | 0 .../asm => include/asm-h8300}/termbits.h | 0 .../asm => include/asm-h8300}/termios.h | 0 .../asm => include/asm-h8300}/thread_info.h | 0 .../include/asm => include/asm-h8300}/timex.h | 0 .../include/asm => include/asm-h8300}/tlb.h | 0 .../asm => include/asm-h8300}/tlbflush.h | 0 .../asm => include/asm-h8300}/topology.h | 0 .../include/asm => include/asm-h8300}/traps.h | 0 .../include/asm => include/asm-h8300}/types.h | 0 .../asm => include/asm-h8300}/uaccess.h | 0 .../asm => include/asm-h8300}/ucontext.h | 0 .../asm => include/asm-h8300}/unaligned.h | 0 .../asm => include/asm-h8300}/unistd.h | 0 .../include/asm => include/asm-h8300}/user.h | 0 .../asm => include/asm-h8300}/virtconvert.h | 0 trunk/include/asm-x86/efi.h | 2 +- trunk/include/asm-x86/hw_irq.h | 12 +- trunk/include/asm-x86/irq_vectors.h | 10 +- trunk/include/linux/Kbuild | 1 - trunk/include/linux/agp_backend.h | 5 - trunk/include/linux/bitmap.h | 1 - trunk/include/linux/bootmem.h | 4 - trunk/include/linux/byteorder.h | 372 ------------------ trunk/include/linux/firmware-map.h | 26 ++ trunk/include/linux/i2c-id.h | 2 + trunk/include/linux/init.h | 1 - trunk/include/linux/kernel.h | 14 +- trunk/include/linux/lockdep.h | 70 +--- trunk/include/linux/mm.h | 20 + trunk/include/linux/rcuclassic.h | 2 +- trunk/include/linux/sched.h | 31 +- trunk/include/linux/seq_file.h | 12 - trunk/include/linux/spinlock.h | 6 - trunk/include/linux/spinlock_api_smp.h | 2 - trunk/include/linux/swab.h | 309 --------------- trunk/include/video/atmel_lcdc.h | 1 - trunk/include/video/radeon.h | 4 - trunk/init/main.c | 6 +- trunk/kernel/Kconfig.hz | 2 +- trunk/kernel/cpu.c | 7 +- trunk/kernel/irq/proc.c | 96 +++-- trunk/kernel/lockdep.c | 295 +++----------- trunk/kernel/lockdep_internals.h | 6 +- trunk/kernel/lockdep_proc.c | 37 +- trunk/kernel/module.c | 2 +- trunk/kernel/posix-timers.c | 19 +- trunk/kernel/sched.c | 23 +- trunk/kernel/sched_clock.c | 178 ++++++--- trunk/kernel/sched_fair.c | 21 +- trunk/kernel/sched_rt.c | 8 +- trunk/kernel/signal.c | 1 - trunk/kernel/smp.c | 58 +-- trunk/kernel/spinlock.c | 11 - trunk/kernel/stop_machine.c | 1 + trunk/kernel/time/tick-sched.c | 2 + trunk/kernel/workqueue.c | 24 +- trunk/lib/Kconfig.debug | 9 - trunk/lib/bitmap.c | 11 - trunk/lib/debug_locks.c | 2 - trunk/lib/vsprintf.c | 2 +- trunk/mm/Kconfig | 3 + trunk/mm/hugetlb.c | 62 +-- trunk/mm/memcontrol.c | 2 - trunk/mm/mempolicy.c | 1 + trunk/mm/mmap.c | 20 +- trunk/mm/page_alloc.c | 2 +- trunk/mm/sparse.c | 1 + trunk/mm/util.c | 15 - trunk/sound/pci/hda/hda_intel.c | 4 - trunk/sound/soc/codecs/wm8750.c | 3 +- trunk/sound/soc/pxa/spitz.c | 2 +- 250 files changed, 1050 insertions(+), 2391 deletions(-) delete mode 100644 trunk/Documentation/Makefile delete mode 100644 trunk/Documentation/accounting/Makefile delete mode 100644 trunk/Documentation/auxdisplay/Makefile delete mode 100644 trunk/Documentation/connector/Makefile delete mode 100644 trunk/Documentation/filesystems/configfs/Makefile delete mode 100644 trunk/Documentation/ia64/Makefile delete mode 100644 trunk/Documentation/networking/Makefile delete mode 100644 trunk/Documentation/pcmcia/Makefile delete mode 100644 trunk/Documentation/spi/Makefile delete mode 100644 trunk/Documentation/video4linux/Makefile delete mode 100644 trunk/Documentation/vm/Makefile delete mode 100644 trunk/Documentation/watchdog/src/Makefile rename trunk/{arch/h8300/include/asm => include/asm-h8300}/Kbuild (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/a.out.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/atomic.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/auxvec.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/bitops.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/bootinfo.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/bug.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/bugs.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/byteorder.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/cache.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/cachectl.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/cacheflush.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/checksum.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/cputime.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/current.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/dbg.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/delay.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/device.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/div64.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/dma.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/elf.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/emergency-restart.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/errno.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/fb.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/fcntl.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/flat.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/fpu.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/futex.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/gpio.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/hardirq.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/hw_irq.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/io.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/ioctl.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/ioctls.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/ipcbuf.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/irq.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/irq_regs.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/kdebug.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/kmap_types.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/linkage.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/local.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/mc146818rtc.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/md.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/mman.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/mmu.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/mmu_context.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/module.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/msgbuf.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/mutex.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/page.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/page_offset.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/param.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/pci.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/percpu.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/pgalloc.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/pgtable.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/poll.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/posix_types.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/processor.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/ptrace.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/regs267x.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/regs306x.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/resource.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/scatterlist.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/sections.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/segment.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/sembuf.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/setup.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/sh_bios.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/shm.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/shmbuf.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/shmparam.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/sigcontext.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/siginfo.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/signal.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/smp.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/socket.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/sockios.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/spinlock.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/stat.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/statfs.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/string.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/system.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/target_time.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/termbits.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/termios.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/thread_info.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/timex.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/tlb.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/tlbflush.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/topology.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/traps.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/types.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/uaccess.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/ucontext.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/unaligned.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/unistd.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/user.h (100%) rename trunk/{arch/h8300/include/asm => include/asm-h8300}/virtconvert.h (100%) delete mode 100644 trunk/include/linux/byteorder.h delete mode 100644 trunk/include/linux/swab.h diff --git a/[refs] b/[refs] index 612ed4463c01..7caa29b81168 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3e11acd4306d558249c31cf6cac09f218f2de52e +refs/heads/master: 79071eb0b2f142b9cc6531d04fa2915943938b5e diff --git a/trunk/Documentation/DocBook/Makefile b/trunk/Documentation/DocBook/Makefile index 1615350b7b53..1d1b34500b69 100644 --- a/trunk/Documentation/DocBook/Makefile +++ b/trunk/Documentation/DocBook/Makefile @@ -102,13 +102,6 @@ C-procfs-example = procfs_example.xml C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example)) $(obj)/procfs-guide.xml: $(C-procfs-example2) -# List of programs to build -##oops, this is a kernel module::hostprogs-y := procfs_example -obj-m += procfs_example.o - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ exit 1 db2xtemplate = db2TYPE -o $(dir $@) $< diff --git a/trunk/Documentation/DocBook/procfs_example.c b/trunk/Documentation/DocBook/procfs_example.c index 2f3de0fb8365..7064084c1c5e 100644 --- a/trunk/Documentation/DocBook/procfs_example.c +++ b/trunk/Documentation/DocBook/procfs_example.c @@ -189,6 +189,8 @@ static int __init init_procfs_example(void) return 0; no_symlink: + remove_proc_entry("tty", example_dir); +no_tty: remove_proc_entry("bar", example_dir); no_bar: remove_proc_entry("foo", example_dir); @@ -204,6 +206,7 @@ static int __init init_procfs_example(void) static void __exit cleanup_procfs_example(void) { remove_proc_entry("jiffies_too", example_dir); + remove_proc_entry("tty", example_dir); remove_proc_entry("bar", example_dir); remove_proc_entry("foo", example_dir); remove_proc_entry("jiffies", example_dir); @@ -219,4 +222,3 @@ module_exit(cleanup_procfs_example); MODULE_AUTHOR("Erik Mouw"); MODULE_DESCRIPTION("procfs examples"); -MODULE_LICENSE("GPL"); diff --git a/trunk/Documentation/Makefile b/trunk/Documentation/Makefile deleted file mode 100644 index 94b945733534..000000000000 --- a/trunk/Documentation/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ - filesystems/configfs/ ia64/ networking/ \ - pcmcia/ spi/ video4linux/ vm/ watchdog/src/ diff --git a/trunk/Documentation/accounting/Makefile b/trunk/Documentation/accounting/Makefile deleted file mode 100644 index 31929eb875b1..000000000000 --- a/trunk/Documentation/accounting/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := getdelays - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_getdelays.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/accounting/getdelays.c b/trunk/Documentation/accounting/getdelays.c index cc49400b4af8..3f7755f3963f 100644 --- a/trunk/Documentation/accounting/getdelays.c +++ b/trunk/Documentation/accounting/getdelays.c @@ -201,19 +201,13 @@ void print_delayacct(struct taskstats *t) "RECLAIM %12s%15s\n" " %15llu%15llu\n", "count", "real total", "virtual total", "delay total", - (unsigned long long)t->cpu_count, - (unsigned long long)t->cpu_run_real_total, - (unsigned long long)t->cpu_run_virtual_total, - (unsigned long long)t->cpu_delay_total, + t->cpu_count, t->cpu_run_real_total, t->cpu_run_virtual_total, + t->cpu_delay_total, "count", "delay total", - (unsigned long long)t->blkio_count, - (unsigned long long)t->blkio_delay_total, + t->blkio_count, t->blkio_delay_total, + "count", "delay total", t->swapin_count, t->swapin_delay_total, "count", "delay total", - (unsigned long long)t->swapin_count, - (unsigned long long)t->swapin_delay_total, - "count", "delay total", - (unsigned long long)t->freepages_count, - (unsigned long long)t->freepages_delay_total); + t->freepages_count, t->freepages_delay_total); } void task_context_switch_counts(struct taskstats *t) @@ -221,17 +215,14 @@ void task_context_switch_counts(struct taskstats *t) printf("\n\nTask %15s%15s\n" " %15llu%15llu\n", "voluntary", "nonvoluntary", - (unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw); + t->nvcsw, t->nivcsw); } void print_cgroupstats(struct cgroupstats *c) { printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, " - "uninterruptible %llu\n", (unsigned long long)c->nr_sleeping, - (unsigned long long)c->nr_io_wait, - (unsigned long long)c->nr_running, - (unsigned long long)c->nr_stopped, - (unsigned long long)c->nr_uninterruptible); + "uninterruptible %llu\n", c->nr_sleeping, c->nr_io_wait, + c->nr_running, c->nr_stopped, c->nr_uninterruptible); } diff --git a/trunk/Documentation/auxdisplay/Makefile b/trunk/Documentation/auxdisplay/Makefile deleted file mode 100644 index 51fe23332c81..000000000000 --- a/trunk/Documentation/auxdisplay/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := cfag12864b-example - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_cfag12864b-example.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/connector/Makefile b/trunk/Documentation/connector/Makefile deleted file mode 100644 index 8df1a7285a06..000000000000 --- a/trunk/Documentation/connector/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -ifneq ($(CONFIG_CONNECTOR),) -obj-m += cn_test.o -endif - -# List of programs to build -hostprogs-y := ucon - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_ucon.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/cpu-hotplug.txt b/trunk/Documentation/cpu-hotplug.txt index 94bbc27ddd4f..ba0aacde94fb 100644 --- a/trunk/Documentation/cpu-hotplug.txt +++ b/trunk/Documentation/cpu-hotplug.txt @@ -59,10 +59,15 @@ apicid values in those tables for disabled apics. In the event BIOS doesn't mark such hot-pluggable cpus as disabled entries, one could use this parameter "additional_cpus=x" to represent those cpus in the cpu_possible_map. +s390 uses the number of cpus it detects at IPL time to also the number of bits +in cpu_possible_map. If it is desired to add additional cpus at a later time +the number should be specified using this option or the possible_cpus option. + possible_cpus=n [s390 only] use this to set hotpluggable cpus. This option sets possible_cpus bits in cpu_possible_map. Thus keeping the numbers of bits set constant even if the machine gets rebooted. + This option overrides additional_cpus. CPU maps and such ----------------- diff --git a/trunk/Documentation/feature-removal-schedule.txt b/trunk/Documentation/feature-removal-schedule.txt index eb1a47b97427..17cab3c74e8b 100644 --- a/trunk/Documentation/feature-removal-schedule.txt +++ b/trunk/Documentation/feature-removal-schedule.txt @@ -19,6 +19,15 @@ Who: Pavel Machek --------------------------- +What: old NCR53C9x driver +When: October 2007 +Why: Replaced by the much better esp_scsi driver. Actual low-level + driver can be ported over almost trivially. +Who: David Miller + Christoph Hellwig + +--------------------------- + What: Video4Linux API 1 ioctls and video_decoder.h from Video devices. When: December 2008 Files: include/linux/video_decoder.h include/linux/videodev.h diff --git a/trunk/Documentation/filesystems/configfs/Makefile b/trunk/Documentation/filesystems/configfs/Makefile deleted file mode 100644 index be7ec5e67dbc..000000000000 --- a/trunk/Documentation/filesystems/configfs/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifneq ($(CONFIG_CONFIGFS_FS),) -obj-m += configfs_example_explicit.o configfs_example_macros.o -endif diff --git a/trunk/Documentation/filesystems/quota.txt b/trunk/Documentation/filesystems/quota.txt index 5e8de25bf0f1..a590c4093eff 100644 --- a/trunk/Documentation/filesystems/quota.txt +++ b/trunk/Documentation/filesystems/quota.txt @@ -3,14 +3,14 @@ Quota subsystem =============== Quota subsystem allows system administrator to set limits on used space and -number of used inodes (inode is a filesystem structure which is associated with -each file or directory) for users and/or groups. For both used space and number -of used inodes there are actually two limits. The first one is called softlimit -and the second one hardlimit. An user can never exceed a hardlimit for any -resource (unless he has CAP_SYS_RESOURCE capability). User is allowed to exceed -softlimit but only for limited period of time. This period is called "grace -period" or "grace time". When grace time is over, user is not able to allocate -more space/inodes until he frees enough of them to get below softlimit. +number of used inodes (inode is a filesystem structure which is associated +with each file or directory) for users and/or groups. For both used space and +number of used inodes there are actually two limits. The first one is called +softlimit and the second one hardlimit. An user can never exceed a hardlimit +for any resource. User is allowed to exceed softlimit but only for limited +period of time. This period is called "grace period" or "grace time". When +grace time is over, user is not able to allocate more space/inodes until he +frees enough of them to get below softlimit. Quota limits (and amount of grace time) are set independently for each filesystem. @@ -53,12 +53,6 @@ in parentheses): QUOTA_NL_BSOFTLONGWARN - space (block) softlimit is exceeded longer than given grace period. QUOTA_NL_BSOFTWARN - space (block) softlimit - - four warnings are also defined for the event when user stops - exceeding some limit: - QUOTA_NL_IHARDBELOW - inode hardlimit - QUOTA_NL_ISOFTBELOW - inode softlimit - QUOTA_NL_BHARDBELOW - space (block) hardlimit - QUOTA_NL_BSOFTBELOW - space (block) softlimit QUOTA_NL_A_DEV_MAJOR (u32) - major number of a device with the affected filesystem QUOTA_NL_A_DEV_MINOR (u32) diff --git a/trunk/Documentation/ia64/Makefile b/trunk/Documentation/ia64/Makefile deleted file mode 100644 index b75db69ec483..000000000000 --- a/trunk/Documentation/ia64/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := aliasing-test - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Documentation/lguest/lguest.c b/trunk/Documentation/lguest/lguest.c index 655414821edc..b88b0ea54e90 100644 --- a/trunk/Documentation/lguest/lguest.c +++ b/trunk/Documentation/lguest/lguest.c @@ -1447,6 +1447,21 @@ static void configure_device(int fd, const char *tapif, u32 ipaddr) err(1, "Bringing interface %s up", tapif); } +static void get_mac(int fd, const char *tapif, unsigned char hwaddr[6]) +{ + struct ifreq ifr; + + memset(&ifr, 0, sizeof(ifr)); + strcpy(ifr.ifr_name, tapif); + + /* SIOC stands for Socket I/O Control. G means Get (vs S for Set + * above). IF means Interface, and HWADDR is hardware address. + * Simple! */ + if (ioctl(fd, SIOCGIFHWADDR, &ifr) != 0) + err(1, "getting hw address for %s", tapif); + memcpy(hwaddr, ifr.ifr_hwaddr.sa_data, 6); +} + static int get_tun_device(char tapif[IFNAMSIZ]) { struct ifreq ifr; @@ -1516,8 +1531,11 @@ static void setup_tun_net(char *arg) p = strchr(arg, ':'); if (p) { str2mac(p+1, conf.mac); - add_feature(dev, VIRTIO_NET_F_MAC); *p = '\0'; + } else { + p = arg + strlen(arg); + /* None supplied; query the randomly assigned mac. */ + get_mac(ipfd, tapif, conf.mac); } /* arg is now either an IP address or a bridge name */ @@ -1529,10 +1547,13 @@ static void setup_tun_net(char *arg) /* Set up the tun device. */ configure_device(ipfd, tapif, ip); + /* Tell Guest what MAC address to use. */ + add_feature(dev, VIRTIO_NET_F_MAC); add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); /* Expect Guest to handle everything except UFO */ add_feature(dev, VIRTIO_NET_F_CSUM); add_feature(dev, VIRTIO_NET_F_GUEST_CSUM); + add_feature(dev, VIRTIO_NET_F_MAC); add_feature(dev, VIRTIO_NET_F_GUEST_TSO4); add_feature(dev, VIRTIO_NET_F_GUEST_TSO6); add_feature(dev, VIRTIO_NET_F_GUEST_ECN); diff --git a/trunk/Documentation/networking/Makefile b/trunk/Documentation/networking/Makefile deleted file mode 100644 index 6d8af1ac56c4..000000000000 --- a/trunk/Documentation/networking/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := ifenslave - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Documentation/networking/ifenslave.c b/trunk/Documentation/networking/ifenslave.c index 1b96ccda3836..a12059886755 100644 --- a/trunk/Documentation/networking/ifenslave.c +++ b/trunk/Documentation/networking/ifenslave.c @@ -1081,7 +1081,7 @@ static int set_if_addr(char *master_ifname, char *slave_ifname) } - ipaddr = (unsigned char *)ifr.ifr_addr.sa_data; + ipaddr = ifr.ifr_addr.sa_data; v_print("Interface '%s': set IP %s to %d.%d.%d.%d\n", slave_ifname, ifra[i].desc, ipaddr[0], ipaddr[1], ipaddr[2], ipaddr[3]); diff --git a/trunk/Documentation/pcmcia/Makefile b/trunk/Documentation/pcmcia/Makefile deleted file mode 100644 index accde871ae77..000000000000 --- a/trunk/Documentation/pcmcia/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := crc32hash - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_crc32hash.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/pcmcia/crc32hash.c b/trunk/Documentation/pcmcia/crc32hash.c index 4210e5abab8a..cbc36d299af8 100644 --- a/trunk/Documentation/pcmcia/crc32hash.c +++ b/trunk/Documentation/pcmcia/crc32hash.c @@ -26,7 +26,7 @@ int main(int argc, char **argv) { printf("no string passed as argument\n"); return -1; } - result = crc32((unsigned char const *)argv[1], strlen(argv[1])); + result = crc32(argv[1], strlen(argv[1])); printf("0x%x\n", result); return 0; } diff --git a/trunk/Documentation/spi/Makefile b/trunk/Documentation/spi/Makefile deleted file mode 100644 index a5b03c88beae..000000000000 --- a/trunk/Documentation/spi/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := spidev_test spidev_fdx - -# Tell kbuild to always build the programs -always := $(hostprogs-y) - -HOSTCFLAGS_spidev_test.o += -I$(objtree)/usr/include -HOSTCFLAGS_spidev_fdx.o += -I$(objtree)/usr/include diff --git a/trunk/Documentation/video4linux/Makefile b/trunk/Documentation/video4linux/Makefile deleted file mode 100644 index 1ed0e98d057d..000000000000 --- a/trunk/Documentation/video4linux/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := v4lgrab - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Documentation/vm/Makefile b/trunk/Documentation/vm/Makefile deleted file mode 100644 index 6f562f778b28..000000000000 --- a/trunk/Documentation/vm/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := slabinfo - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/Documentation/watchdog/src/Makefile b/trunk/Documentation/watchdog/src/Makefile deleted file mode 100644 index 40e5f46e4740..000000000000 --- a/trunk/Documentation/watchdog/src/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -# kbuild trick to avoid linker error. Can be omitted if a module is built. -obj- := dummy.o - -# List of programs to build -hostprogs-y := watchdog-simple watchdog-test - -# Tell kbuild to always build the programs -always := $(hostprogs-y) diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index af6aa4e4b392..b343814a1ace 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2462,7 +2462,7 @@ L: kernel-janitors@vger.kernel.org W: http://www.kerneljanitors.org/ S: Maintained -KERNEL NFSD, SUNRPC, AND LOCKD SERVERS +KERNEL NFSD P: J. Bruce Fields M: bfields@fieldses.org P: Neil Brown @@ -3078,7 +3078,7 @@ M: ja@ssi.bg L: netdev@vger.kernel.org S: Maintained -NFS, SUNRPC, AND LOCKD CLIENTS +NFS CLIENT P: Trond Myklebust M: Trond.Myklebust@netapp.com L: linux-nfs@vger.kernel.org diff --git a/trunk/Makefile b/trunk/Makefile index 53bf6ec1af9d..f3e206509ee1 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 27 -EXTRAVERSION = -rc3 +EXTRAVERSION = -rc2 NAME = Rotary Wombat # *DOCUMENTATION* @@ -821,9 +821,6 @@ ifdef CONFIG_HEADERS_CHECK endif ifdef CONFIG_SAMPLES $(Q)$(MAKE) $(build)=samples -endif -ifdef CONFIG_BUILD_DOCSRC - $(Q)$(MAKE) $(build)=Documentation endif $(call vmlinux-modpost) $(call if_changed_rule,vmlinux__) @@ -1169,7 +1166,7 @@ MRPROPER_FILES += .config .config.old include/asm .version .old_version \ # clean: rm-dirs := $(CLEAN_DIRS) clean: rm-files := $(CLEAN_FILES) -clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs) Documentation) +clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) PHONY += $(clean-dirs) clean archclean $(clean-dirs): diff --git a/trunk/arch/h8300/mm/init.c b/trunk/arch/h8300/mm/init.c index 9942f24aff9e..a1d228f5e4e6 100644 --- a/trunk/arch/h8300/mm/init.c +++ b/trunk/arch/h8300/mm/init.c @@ -40,6 +40,9 @@ #undef DEBUG +extern void die_if_kernel(char *,struct pt_regs *,long); +extern void free_initmem(void); + /* * BAD_PAGE is the page that is used for page faults when linux * is out-of-memory. Older versions of linux just did a @@ -70,7 +73,7 @@ extern unsigned long memory_end; * The parameters are pointers to where to stick the starting and ending * addresses of available kernel virtual memory. */ -void __init paging_init(void) +void paging_init(void) { /* * Make sure start_mem is page aligned, otherwise bootmem and @@ -119,7 +122,7 @@ void __init paging_init(void) } } -void __init mem_init(void) +void mem_init(void) { int codek = 0, datak = 0, initk = 0; /* DAVIDM look at setup memory map generically with reserved area */ @@ -175,7 +178,7 @@ void free_initrd_mem(unsigned long start, unsigned long end) #endif void -free_initmem(void) +free_initmem() { #ifdef CONFIG_RAMKERNEL unsigned long addr; diff --git a/trunk/arch/ia64/include/asm/sal.h b/trunk/arch/ia64/include/asm/sal.h index ea310c0812aa..89594b442f83 100644 --- a/trunk/arch/ia64/include/asm/sal.h +++ b/trunk/arch/ia64/include/asm/sal.h @@ -236,7 +236,7 @@ extern struct ia64_sal_desc_ptc *ia64_ptc_domain_info; extern unsigned short sal_revision; /* supported SAL spec revision */ extern unsigned short sal_version; /* SAL version; OEM dependent */ -#define SAL_VERSION_CODE(major, minor) ((bin2bcd(major) << 8) | bin2bcd(minor)) +#define SAL_VERSION_CODE(major, minor) ((BIN2BCD(major) << 8) | BIN2BCD(minor)) extern const char *ia64_sal_strerror (long status); extern void ia64_sal_init (struct ia64_sal_systab *sal_systab); diff --git a/trunk/arch/ia64/kernel/head.S b/trunk/arch/ia64/kernel/head.S index 8bdea8eb62e3..41c712917ff7 100644 --- a/trunk/arch/ia64/kernel/head.S +++ b/trunk/arch/ia64/kernel/head.S @@ -359,31 +359,7 @@ start_ap: mov ar.rsc=0 // place RSE in enforced lazy mode ;; loadrs // clear the dirty partition - movl r19=__phys_per_cpu_start - mov r18=PERCPU_PAGE_SIZE - ;; -#ifndef CONFIG_SMP - add r19=r19,r18 - ;; -#else -(isAP) br.few 2f - mov r20=r19 - sub r19=r19,r18 - ;; - shr.u r18=r18,3 -1: - ld8 r21=[r20],8;; - st8[r19]=r21,8 - adds r18=-1,r18;; - cmp4.lt p7,p6=0,r18 -(p7) br.cond.dptk.few 1b -2: -#endif - tpa r19=r19 - ;; - .pred.rel.mutex isBP,isAP -(isBP) mov IA64_KR(PER_CPU_DATA)=r19 // per-CPU base for cpu0 -(isAP) mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base + mov IA64_KR(PER_CPU_DATA)=r0 // clear physical per-CPU base ;; mov ar.bspstore=r2 // establish the new RSE stack ;; diff --git a/trunk/arch/ia64/kernel/setup.c b/trunk/arch/ia64/kernel/setup.c index c27d5b2c182b..593279f33e96 100644 --- a/trunk/arch/ia64/kernel/setup.c +++ b/trunk/arch/ia64/kernel/setup.c @@ -927,19 +927,17 @@ cpu_init (void) if (smp_processor_id() == 0) { cpu_set(0, per_cpu(cpu_sibling_map, 0)); cpu_set(0, cpu_core_map[0]); - } else { - /* - * Set ar.k3 so that assembly code in MCA handler can compute - * physical addresses of per cpu variables with a simple: - * phys = ar.k3 + &per_cpu_var - * and the alt-dtlb-miss handler can set per-cpu mapping into - * the TLB when needed. head.S already did this for cpu0. - */ - ia64_set_kr(IA64_KR_PER_CPU_DATA, - ia64_tpa(cpu_data) - (long) __per_cpu_start); } #endif + /* + * We set ar.k3 so that assembly code in MCA handler can compute + * physical addresses of per cpu variables with a simple: + * phys = ar.k3 + &per_cpu_var + */ + ia64_set_kr(IA64_KR_PER_CPU_DATA, + ia64_tpa(cpu_data) - (long) __per_cpu_start); + get_max_cacheline_size(); /* diff --git a/trunk/arch/ia64/kernel/smpboot.c b/trunk/arch/ia64/kernel/smpboot.c index b39853a292d5..03f1a9908afc 100644 --- a/trunk/arch/ia64/kernel/smpboot.c +++ b/trunk/arch/ia64/kernel/smpboot.c @@ -467,9 +467,7 @@ start_secondary (void *unused) { /* Early console may use I/O ports */ ia64_set_kr(IA64_KR_IO_BASE, __pa(ia64_iobase)); -#ifndef CONFIG_PRINTK_TIME Dprintk("start_secondary: starting CPU 0x%x\n", hard_smp_processor_id()); -#endif efi_map_pal_code(); cpu_init(); preempt_disable(); diff --git a/trunk/arch/ia64/kernel/vmlinux.lds.S b/trunk/arch/ia64/kernel/vmlinux.lds.S index de71da811cd6..5a77206c2492 100644 --- a/trunk/arch/ia64/kernel/vmlinux.lds.S +++ b/trunk/arch/ia64/kernel/vmlinux.lds.S @@ -215,9 +215,6 @@ SECTIONS /* Per-cpu data: */ percpu : { } :percpu . = ALIGN(PERCPU_PAGE_SIZE); -#ifdef CONFIG_SMP - . = . + PERCPU_PAGE_SIZE; /* cpu0 per-cpu space */ -#endif __phys_per_cpu_start = .; .data.percpu PERCPU_ADDR : AT(__phys_per_cpu_start - LOAD_OFFSET) { diff --git a/trunk/arch/ia64/mm/contig.c b/trunk/arch/ia64/mm/contig.c index e566ff43884a..798bf9835a51 100644 --- a/trunk/arch/ia64/mm/contig.c +++ b/trunk/arch/ia64/mm/contig.c @@ -163,14 +163,8 @@ per_cpu_init (void) * get_zeroed_page(). */ if (first_time) { - void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE; - first_time=0; - - __per_cpu_offset[0] = (char *) cpu0_data - __per_cpu_start; - per_cpu(local_per_cpu_offset, 0) = __per_cpu_offset[0]; - - for (cpu = 1; cpu < NR_CPUS; cpu++) { + for (cpu = 0; cpu < NR_CPUS; cpu++) { memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start; cpu_data += PERCPU_PAGE_SIZE; @@ -183,7 +177,7 @@ per_cpu_init (void) static inline void alloc_per_cpu_data(void) { - cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS-1, + cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); } #else diff --git a/trunk/arch/ia64/mm/discontig.c b/trunk/arch/ia64/mm/discontig.c index 78026aabaa7f..d83125e1ed27 100644 --- a/trunk/arch/ia64/mm/discontig.c +++ b/trunk/arch/ia64/mm/discontig.c @@ -143,11 +143,7 @@ static void *per_cpu_node_setup(void *cpu_data, int node) int cpu; for_each_possible_early_cpu(cpu) { - if (cpu == 0) { - void *cpu0_data = __phys_per_cpu_start - PERCPU_PAGE_SIZE; - __per_cpu_offset[cpu] = (char*)cpu0_data - - __per_cpu_start; - } else if (node == node_cpuid[cpu].nid) { + if (node == node_cpuid[cpu].nid) { memcpy(__va(cpu_data), __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); __per_cpu_offset[cpu] = (char*)__va(cpu_data) - diff --git a/trunk/arch/powerpc/Kconfig b/trunk/arch/powerpc/Kconfig index 587da5e0990f..63c9cafda9c4 100644 --- a/trunk/arch/powerpc/Kconfig +++ b/trunk/arch/powerpc/Kconfig @@ -42,6 +42,9 @@ config GENERIC_HARDIRQS bool default y +config HAVE_GET_USER_PAGES_FAST + def_bool PPC64 + config HAVE_SETUP_PER_CPU_AREA def_bool PPC64 diff --git a/trunk/arch/x86/Kconfig b/trunk/arch/x86/Kconfig index ac2fb0641a04..3d0f2b6a5a16 100644 --- a/trunk/arch/x86/Kconfig +++ b/trunk/arch/x86/Kconfig @@ -22,6 +22,7 @@ config X86 select HAVE_IDE select HAVE_OPROFILE select HAVE_IOREMAP_PROT + select HAVE_GET_USER_PAGES_FAST select HAVE_KPROBES select ARCH_WANT_OPTIONAL_GPIOLIB select HAVE_KRETPROBES diff --git a/trunk/arch/x86/kernel/apic_32.c b/trunk/arch/x86/kernel/apic_32.c index 039a8d4aaf62..d6c898358371 100644 --- a/trunk/arch/x86/kernel/apic_32.c +++ b/trunk/arch/x86/kernel/apic_32.c @@ -1720,19 +1720,15 @@ static int __init parse_lapic_timer_c2_ok(char *arg) } early_param("lapic_timer_c2_ok", parse_lapic_timer_c2_ok); -static int __init apic_set_verbosity(char *arg) +static int __init apic_set_verbosity(char *str) { - if (!arg) - return -EINVAL; - - if (strcmp(arg, "debug") == 0) + if (strcmp("debug", str) == 0) apic_verbosity = APIC_DEBUG; - else if (strcmp(arg, "verbose") == 0) + else if (strcmp("verbose", str) == 0) apic_verbosity = APIC_VERBOSE; - - return 0; + return 1; } -early_param("apic", apic_set_verbosity); +__setup("apic=", apic_set_verbosity); static int __init lapic_insert_resource(void) { diff --git a/trunk/arch/x86/kernel/cpu/bugs.c b/trunk/arch/x86/kernel/cpu/bugs.c index c8e315f1aa83..c9b58a806e85 100644 --- a/trunk/arch/x86/kernel/cpu/bugs.c +++ b/trunk/arch/x86/kernel/cpu/bugs.c @@ -50,8 +50,6 @@ static double __initdata y = 3145727.0; */ static void __init check_fpu(void) { - s32 fdiv_bug; - if (!boot_cpu_data.hard_math) { #ifndef CONFIG_MATH_EMULATION printk(KERN_EMERG "No coprocessor found and no math emulation present.\n"); @@ -76,10 +74,8 @@ static void __init check_fpu(void) "fistpl %0\n\t" "fwait\n\t" "fninit" - : "=m" (*&fdiv_bug) + : "=m" (*&boot_cpu_data.fdiv_bug) : "m" (*&x), "m" (*&y)); - - boot_cpu_data.fdiv_bug = fdiv_bug; if (boot_cpu_data.fdiv_bug) printk("Hmm, FPU with FDIV bug.\n"); } diff --git a/trunk/arch/x86/kernel/io_apic_32.c b/trunk/arch/x86/kernel/io_apic_32.c index 09cddb57bec4..de9aa0e3a9c5 100644 --- a/trunk/arch/x86/kernel/io_apic_32.c +++ b/trunk/arch/x86/kernel/io_apic_32.c @@ -57,7 +57,7 @@ atomic_t irq_mis_count; static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; static DEFINE_SPINLOCK(ioapic_lock); -DEFINE_SPINLOCK(vector_lock); +static DEFINE_SPINLOCK(vector_lock); int timer_through_8259 __initdata; @@ -1209,6 +1209,10 @@ static int assign_irq_vector(int irq) return vector; } +void setup_vector_irq(int cpu) +{ +} + static struct irq_chip ioapic_chip; #define IOAPIC_AUTO -1 diff --git a/trunk/arch/x86/kernel/io_apic_64.c b/trunk/arch/x86/kernel/io_apic_64.c index 61a83b70c18f..8269434d1707 100644 --- a/trunk/arch/x86/kernel/io_apic_64.c +++ b/trunk/arch/x86/kernel/io_apic_64.c @@ -101,7 +101,7 @@ int timer_through_8259 __initdata; static struct { int pin, apic; } ioapic_i8259 = { -1, -1 }; static DEFINE_SPINLOCK(ioapic_lock); -static DEFINE_SPINLOCK(vector_lock); +DEFINE_SPINLOCK(vector_lock); /* * # of IRQ routing registers @@ -697,19 +697,6 @@ static int pin_2_irq(int idx, int apic, int pin) return irq; } -void lock_vector_lock(void) -{ - /* Used to the online set of cpus does not change - * during assign_irq_vector. - */ - spin_lock(&vector_lock); -} - -void unlock_vector_lock(void) -{ - spin_unlock(&vector_lock); -} - static int __assign_irq_vector(int irq, cpumask_t mask) { /* @@ -815,7 +802,7 @@ static void __clear_irq_vector(int irq) cpus_clear(cfg->domain); } -void __setup_vector_irq(int cpu) +static void __setup_vector_irq(int cpu) { /* Initialize vector_irq on a new cpu */ /* This function must be called with vector_lock held */ @@ -838,6 +825,14 @@ void __setup_vector_irq(int cpu) } } +void setup_vector_irq(int cpu) +{ + spin_lock(&vector_lock); + __setup_vector_irq(smp_processor_id()); + spin_unlock(&vector_lock); +} + + static struct irq_chip ioapic_chip; static void ioapic_register_intr(int irq, unsigned long trigger) diff --git a/trunk/arch/x86/kernel/mpparse.c b/trunk/arch/x86/kernel/mpparse.c index 678090508a62..6ae005ccaed8 100644 --- a/trunk/arch/x86/kernel/mpparse.c +++ b/trunk/arch/x86/kernel/mpparse.c @@ -83,7 +83,7 @@ static void __init MP_bus_info(struct mpc_config_bus *m) if (x86_quirks->mpc_oem_bus_info) x86_quirks->mpc_oem_bus_info(m, str); else - apic_printk(APIC_VERBOSE, "Bus #%d is %s\n", m->mpc_busid, str); + printk(KERN_INFO "Bus #%d is %s\n", m->mpc_busid, str); #if MAX_MP_BUSSES < 256 if (m->mpc_busid >= MAX_MP_BUSSES) { @@ -154,7 +154,7 @@ static void __init MP_ioapic_info(struct mpc_config_ioapic *m) static void print_MP_intsrc_info(struct mpc_config_intsrc *m) { - apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," + printk(KERN_CONT "Int: type %d, pol %d, trig %d, bus %02x," " IRQ %02x, APIC ID %x, APIC INT %02x\n", m->mpc_irqtype, m->mpc_irqflag & 3, (m->mpc_irqflag >> 2) & 3, m->mpc_srcbus, @@ -163,7 +163,7 @@ static void print_MP_intsrc_info(struct mpc_config_intsrc *m) static void __init print_mp_irq_info(struct mp_config_intsrc *mp_irq) { - apic_printk(APIC_VERBOSE, "Int: type %d, pol %d, trig %d, bus %02x," + printk(KERN_CONT "Int: type %d, pol %d, trig %d, bus %02x," " IRQ %02x, APIC ID %x, APIC INT %02x\n", mp_irq->mp_irqtype, mp_irq->mp_irqflag & 3, (mp_irq->mp_irqflag >> 2) & 3, mp_irq->mp_srcbus, @@ -235,7 +235,7 @@ static void __init MP_intsrc_info(struct mpc_config_intsrc *m) static void __init MP_lintsrc_info(struct mpc_config_lintsrc *m) { - apic_printk(APIC_VERBOSE, "Lint: type %d, pol %d, trig %d, bus %02x," + printk(KERN_INFO "Lint: type %d, pol %d, trig %d, bus %02x," " IRQ %02x, APIC ID %x, APIC LINT %02x\n", m->mpc_irqtype, m->mpc_irqflag & 3, (m->mpc_irqflag >> 2) & 3, m->mpc_srcbusid, @@ -695,8 +695,7 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, unsigned int *bp = phys_to_virt(base); struct intel_mp_floating *mpf; - apic_printk(APIC_VERBOSE, "Scan SMP from %p for %ld bytes.\n", - bp, length); + printk(KERN_DEBUG "Scan SMP from %p for %ld bytes.\n", bp, length); BUILD_BUG_ON(sizeof(*mpf) != 16); while (length > 0) { diff --git a/trunk/arch/x86/kernel/pci-calgary_64.c b/trunk/arch/x86/kernel/pci-calgary_64.c index 02d19328525d..b67a4b1d4eae 100644 --- a/trunk/arch/x86/kernel/pci-calgary_64.c +++ b/trunk/arch/x86/kernel/pci-calgary_64.c @@ -1350,7 +1350,7 @@ static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl) * Function for kdump case. Get the tce tables from first kernel * by reading the contents of the base adress register of calgary iommu */ -static void get_tce_space_from_tar(void) +static void get_tce_space_from_tar() { int bus; void __iomem *target; diff --git a/trunk/arch/x86/kernel/setup.c b/trunk/arch/x86/kernel/setup.c index 68b48e3fbcbd..2d888586385d 100644 --- a/trunk/arch/x86/kernel/setup.c +++ b/trunk/arch/x86/kernel/setup.c @@ -604,14 +604,6 @@ void __init setup_arch(char **cmdline_p) early_cpu_init(); early_ioremap_init(); -#if defined(CONFIG_VMI) && defined(CONFIG_X86_32) - /* - * Must be before kernel pagetables are setup - * or fixmap area is touched. - */ - vmi_init(); -#endif - ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); screen_info = boot_params.screen_info; edid_info = boot_params.edid_info; @@ -825,6 +817,14 @@ void __init setup_arch(char **cmdline_p) kvmclock_init(); #endif +#if defined(CONFIG_VMI) && defined(CONFIG_X86_32) + /* + * Must be after max_low_pfn is determined, and before kernel + * pagetables are setup. + */ + vmi_init(); +#endif + paravirt_pagetable_setup_start(swapper_pg_dir); paging_init(); paravirt_pagetable_setup_done(swapper_pg_dir); @@ -861,6 +861,12 @@ void __init setup_arch(char **cmdline_p) init_apic_mappings(); ioapic_init_mappings(); +#if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) && defined(CONFIG_X86_32) + if (def_to_bigsmp) + printk(KERN_WARNING "More than 8 CPUs detected and " + "CONFIG_X86_PC cannot handle it.\nUse " + "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n"); +#endif kvm_guest_init(); e820_reserve_resources(); diff --git a/trunk/arch/x86/kernel/smpboot.c b/trunk/arch/x86/kernel/smpboot.c index 91055d7fc1b0..332512767f4f 100644 --- a/trunk/arch/x86/kernel/smpboot.c +++ b/trunk/arch/x86/kernel/smpboot.c @@ -326,16 +326,12 @@ static void __cpuinit start_secondary(void *unused) * for which cpus receive the IPI. Holding this * lock helps us to not include this cpu in a currently in progress * smp_call_function(). - * - * We need to hold vector_lock so there the set of online cpus - * does not change while we are assigning vectors to cpus. Holding - * this lock ensures we don't half assign or remove an irq from a cpu. */ ipi_call_lock_irq(); - lock_vector_lock(); - __setup_vector_irq(smp_processor_id()); +#ifdef CONFIG_X86_IO_APIC + setup_vector_irq(smp_processor_id()); +#endif cpu_set(smp_processor_id(), cpu_online_map); - unlock_vector_lock(); ipi_call_unlock_irq(); per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; @@ -994,17 +990,7 @@ int __cpuinit native_cpu_up(unsigned int cpu) flush_tlb_all(); low_mappings = 1; -#ifdef CONFIG_X86_PC - if (def_to_bigsmp && apicid > 8) { - printk(KERN_WARNING - "More than 8 CPUs detected - skipping them.\n" - "Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n"); - err = -1; - } else - err = do_boot_cpu(apicid, cpu); -#else err = do_boot_cpu(apicid, cpu); -#endif zap_low_mappings(); low_mappings = 0; @@ -1350,9 +1336,7 @@ int __cpu_disable(void) remove_siblinginfo(cpu); /* It's now safe to remove this processor from the online map */ - lock_vector_lock(); remove_cpu_from_maps(cpu); - unlock_vector_lock(); fixup_irqs(cpu_online_map); return 0; } diff --git a/trunk/arch/x86/kernel/vmi_32.c b/trunk/arch/x86/kernel/vmi_32.c index 6ca515d6db54..0a1b1a9d922d 100644 --- a/trunk/arch/x86/kernel/vmi_32.c +++ b/trunk/arch/x86/kernel/vmi_32.c @@ -37,7 +37,6 @@ #include #include #include -#include /* Convenient for calling VMI functions indirectly in the ROM */ typedef u32 __attribute__((regparm(1))) (VROMFUNC)(void); @@ -684,7 +683,7 @@ void vmi_bringup(void) { /* We must establish the lowmem mapping for MMU ops to work */ if (vmi_ops.set_linear_mapping) - vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, MAXMEM_PFN, 0); + vmi_ops.set_linear_mapping(0, (void *)__PAGE_OFFSET, max_low_pfn, 0); } /* diff --git a/trunk/arch/x86/mm/Makefile b/trunk/arch/x86/mm/Makefile index dfb932dcf136..2977ea37791f 100644 --- a/trunk/arch/x86/mm/Makefile +++ b/trunk/arch/x86/mm/Makefile @@ -1,6 +1,7 @@ obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ - pat.o pgtable.o gup.o + pat.o pgtable.o +obj-$(CONFIG_HAVE_GET_USER_PAGES_FAST) += gup.o obj-$(CONFIG_X86_32) += pgtable_32.o obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o diff --git a/trunk/arch/x86/mm/pgtable.c b/trunk/arch/x86/mm/pgtable.c index d50302774fe2..557b2abceef8 100644 --- a/trunk/arch/x86/mm/pgtable.c +++ b/trunk/arch/x86/mm/pgtable.c @@ -207,9 +207,6 @@ static void pgd_prepopulate_pmd(struct mm_struct *mm, pgd_t *pgd, pmd_t *pmds[]) unsigned long addr; int i; - if (PREALLOCATED_PMDS == 0) /* Work around gcc-3.4.x bug */ - return; - pud = pud_offset(pgd, 0); for (addr = i = 0; i < PREALLOCATED_PMDS; diff --git a/trunk/drivers/char/agp/agp.h b/trunk/drivers/char/agp/agp.h index 4bada0e8b812..81e14bea54bd 100644 --- a/trunk/drivers/char/agp/agp.h +++ b/trunk/drivers/char/agp/agp.h @@ -148,9 +148,6 @@ struct agp_bridge_data { char minor_version; struct list_head list; u32 apbase_config; - /* list of agp_memory mapped to the aperture */ - struct list_head mapped_list; - spinlock_t mapped_lock; }; #define KB(x) ((x) * 1024) diff --git a/trunk/drivers/char/agp/ali-agp.c b/trunk/drivers/char/agp/ali-agp.c index 31dcd9142d54..1ffb381130c3 100644 --- a/trunk/drivers/char/agp/ali-agp.c +++ b/trunk/drivers/char/agp/ali-agp.c @@ -110,8 +110,7 @@ static int ali_configure(void) nlvm_addr+= agp_bridge->gart_bus_addr; nlvm_addr|=(agp_bridge->gart_bus_addr>>12); - dev_info(&agp_bridge->dev->dev, "nlvm top &base = %8x\n", - nlvm_addr); + printk(KERN_INFO PFX "nlvm top &base = %8x\n",nlvm_addr); } #endif @@ -316,8 +315,8 @@ static int __devinit agp_ali_probe(struct pci_dev *pdev, goto found; } - dev_err(&pdev->dev, "unsupported ALi chipset [%04x/%04x])\n", - pdev->vendor, pdev->device); + printk(KERN_ERR PFX "Unsupported ALi chipset (device id: %04x)\n", + pdev->device); return -ENODEV; @@ -362,7 +361,8 @@ static int __devinit agp_ali_probe(struct pci_dev *pdev, bridge->driver = &ali_generic_bridge; } - dev_info(&pdev->dev, "ALi %s chipset\n", devs[j].chipset_name); + printk(KERN_INFO PFX "Detected ALi %s chipset\n", + devs[j].chipset_name); /* Fill in the mode register */ pci_read_config_dword(pdev, diff --git a/trunk/drivers/char/agp/amd-k7-agp.c b/trunk/drivers/char/agp/amd-k7-agp.c index e280531843be..39a0718bc616 100644 --- a/trunk/drivers/char/agp/amd-k7-agp.c +++ b/trunk/drivers/char/agp/amd-k7-agp.c @@ -419,8 +419,8 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev, return -ENODEV; j = ent - agp_amdk7_pci_table; - dev_info(&pdev->dev, "AMD %s chipset\n", - amd_agp_device_ids[j].chipset_name); + printk(KERN_INFO PFX "Detected AMD %s chipset\n", + amd_agp_device_ids[j].chipset_name); bridge = agp_alloc_bridge(); if (!bridge) @@ -442,7 +442,7 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev, while (!cap_ptr) { gfxcard = pci_get_class(PCI_CLASS_DISPLAY_VGA<<8, gfxcard); if (!gfxcard) { - dev_info(&pdev->dev, "no AGP VGA controller\n"); + printk (KERN_INFO PFX "Couldn't find an AGP VGA controller.\n"); return -ENODEV; } cap_ptr = pci_find_capability(gfxcard, PCI_CAP_ID_AGP); @@ -453,7 +453,7 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev, (if necessary at all). */ if (gfxcard->vendor == PCI_VENDOR_ID_NVIDIA) { agp_bridge->flags |= AGP_ERRATA_1X; - dev_info(&pdev->dev, "AMD 751 chipset with NVidia GeForce; forcing 1X due to errata\n"); + printk (KERN_INFO PFX "AMD 751 chipset with NVidia GeForce detected. Forcing to 1X due to errata.\n"); } pci_dev_put(gfxcard); } @@ -469,7 +469,7 @@ static int __devinit agp_amdk7_probe(struct pci_dev *pdev, agp_bridge->flags = AGP_ERRATA_FASTWRITES; agp_bridge->flags |= AGP_ERRATA_SBA; agp_bridge->flags |= AGP_ERRATA_1X; - dev_info(&pdev->dev, "AMD 761 chipset with errata; disabling AGP fast writes & SBA and forcing to 1X\n"); + printk (KERN_INFO PFX "AMD 761 chipset with errata detected - disabling AGP fast writes & SBA and forcing to 1X.\n"); } } diff --git a/trunk/drivers/char/agp/amd64-agp.c b/trunk/drivers/char/agp/amd64-agp.c index 7495c522d8e4..481ffe87c716 100644 --- a/trunk/drivers/char/agp/amd64-agp.c +++ b/trunk/drivers/char/agp/amd64-agp.c @@ -34,7 +34,6 @@ static struct resource *aperture_resource; static int __initdata agp_try_unsupported = 1; -static int agp_bridges_found; static void amd64_tlbflush(struct agp_memory *temp) { @@ -294,13 +293,12 @@ static __devinit int fix_northbridge(struct pci_dev *nb, struct pci_dev *agp, * so let double check that order, and lets trust the AMD NB settings */ if (order >=0 && aper + (32ULL<<(20 + order)) > 0x100000000ULL) { - dev_info(&agp->dev, "aperture size %u MB is not right, using settings from NB\n", - 32 << order); + printk(KERN_INFO "Aperture size %u MB is not right, using settings from NB\n", + 32 << order); order = nb_order; } - dev_info(&agp->dev, "aperture from AGP @ %Lx size %u MB\n", - aper, 32 << order); + printk(KERN_INFO PFX "Aperture from AGP @ %Lx size %u MB\n", aper, 32 << order); if (order < 0 || !agp_aperture_valid(aper, (32*1024*1024)<dev, "no usable aperture found\n"); + printk(KERN_ERR PFX "No usable aperture found.\n"); #ifdef __x86_64__ /* should port this to i386 */ - dev_err(&dev->dev, "consider rebooting with iommu=memaper=2 to get a good aperture\n"); + printk(KERN_ERR PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n"); #endif return -1; } @@ -347,14 +345,14 @@ static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data default: revstring="??"; break; } - dev_info(&pdev->dev, "AMD 8151 AGP Bridge rev %s\n", revstring); + printk (KERN_INFO PFX "Detected AMD 8151 AGP Bridge rev %s\n", revstring); /* * Work around errata. * Chips before B2 stepping incorrectly reporting v3.5 */ if (pdev->revision < 0x13) { - dev_info(&pdev->dev, "correcting AGP revision (reports 3.5, is really 3.0)\n"); + printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n"); bridge->major_version = 3; bridge->minor_version = 0; } @@ -377,11 +375,11 @@ static int __devinit uli_agp_init(struct pci_dev *pdev) struct pci_dev *dev1; int i; unsigned size = amd64_fetch_size(); - - dev_info(&pdev->dev, "setting up ULi AGP\n"); + printk(KERN_INFO "Setting up ULi AGP.\n"); dev1 = pci_get_slot (pdev->bus,PCI_DEVFN(0,0)); if (dev1 == NULL) { - dev_info(&pdev->dev, "can't find ULi secondary device\n"); + printk(KERN_INFO PFX "Detected a ULi chipset, " + "but could not fine the secondary device.\n"); return -ENODEV; } @@ -390,7 +388,7 @@ static int __devinit uli_agp_init(struct pci_dev *pdev) break; if (i == ARRAY_SIZE(uli_sizes)) { - dev_info(&pdev->dev, "no ULi size found for %d\n", size); + printk(KERN_INFO PFX "No ULi size found for %d\n", size); return -ENODEV; } @@ -435,11 +433,13 @@ static int nforce3_agp_init(struct pci_dev *pdev) int i; unsigned size = amd64_fetch_size(); - dev_info(&pdev->dev, "setting up Nforce3 AGP\n"); + printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n"); dev1 = pci_get_slot(pdev->bus, PCI_DEVFN(11, 0)); if (dev1 == NULL) { - dev_info(&pdev->dev, "can't find Nforce3 secondary device\n"); + printk(KERN_INFO PFX "agpgart: Detected an NVIDIA " + "nForce3 chipset, but could not find " + "the secondary device.\n"); return -ENODEV; } @@ -448,7 +448,7 @@ static int nforce3_agp_init(struct pci_dev *pdev) break; if (i == ARRAY_SIZE(nforce3_sizes)) { - dev_info(&pdev->dev, "no NForce3 size found for %d\n", size); + printk(KERN_INFO PFX "No NForce3 size found for %d\n", size); return -ENODEV; } @@ -462,7 +462,7 @@ static int nforce3_agp_init(struct pci_dev *pdev) /* if x86-64 aperture base is beyond 4G, exit here */ if ( (apbase & 0x7fff) >> (32 - 25) ) { - dev_info(&pdev->dev, "aperture base > 4G\n"); + printk(KERN_INFO PFX "aperture base > 4G\n"); return -ENODEV; } @@ -489,7 +489,6 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev, { struct agp_bridge_data *bridge; u8 cap_ptr; - int err; cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP); if (!cap_ptr) @@ -505,8 +504,7 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev, pdev->device == PCI_DEVICE_ID_AMD_8151_0) { amd8151_init(pdev, bridge); } else { - dev_info(&pdev->dev, "AGP bridge [%04x/%04x]\n", - pdev->vendor, pdev->device); + printk(KERN_INFO PFX "Detected AGP bridge %x\n", pdev->devfn); } bridge->driver = &amd_8151_driver; @@ -538,12 +536,7 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev, } pci_set_drvdata(pdev, bridge); - err = agp_add_bridge(bridge); - if (err < 0) - return err; - - agp_bridges_found++; - return 0; + return agp_add_bridge(bridge); } static void __devexit agp_amd64_remove(struct pci_dev *pdev) @@ -720,11 +713,7 @@ int __init agp_amd64_init(void) if (agp_off) return -EINVAL; - err = pci_register_driver(&agp_amd64_pci_driver); - if (err < 0) - return err; - - if (agp_bridges_found == 0) { + if (pci_register_driver(&agp_amd64_pci_driver) < 0) { struct pci_dev *dev; if (!agp_try_unsupported && !agp_try_unsupported_boot) { printk(KERN_INFO PFX "No supported AGP bridge found.\n"); diff --git a/trunk/drivers/char/agp/ati-agp.c b/trunk/drivers/char/agp/ati-agp.c index 6ecbcafb34b1..3a4566c0d84f 100644 --- a/trunk/drivers/char/agp/ati-agp.c +++ b/trunk/drivers/char/agp/ati-agp.c @@ -486,8 +486,8 @@ static int __devinit agp_ati_probe(struct pci_dev *pdev, goto found; } - dev_err(&pdev->dev, "unsupported Ati chipset [%04x/%04x])\n", - pdev->vendor, pdev->device); + printk(KERN_ERR PFX + "Unsupported Ati chipset (device id: %04x)\n", pdev->device); return -ENODEV; found: @@ -500,7 +500,8 @@ static int __devinit agp_ati_probe(struct pci_dev *pdev, bridge->driver = &ati_generic_bridge; - dev_info(&pdev->dev, "Ati %s chipset\n", devs[j].chipset_name); + printk(KERN_INFO PFX "Detected Ati %s chipset\n", + devs[j].chipset_name); /* Fill in the mode register */ pci_read_config_dword(pdev, diff --git a/trunk/drivers/char/agp/backend.c b/trunk/drivers/char/agp/backend.c index 3a3cc03d401c..1ec87104e68c 100644 --- a/trunk/drivers/char/agp/backend.c +++ b/trunk/drivers/char/agp/backend.c @@ -144,8 +144,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) void *addr = bridge->driver->agp_alloc_page(bridge); if (!addr) { - dev_err(&bridge->dev->dev, - "can't get memory for scratch page\n"); + printk(KERN_ERR PFX "unable to get memory for scratch page.\n"); return -ENOMEM; } @@ -156,13 +155,13 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) size_value = bridge->driver->fetch_size(); if (size_value == 0) { - dev_err(&bridge->dev->dev, "can't determine aperture size\n"); + printk(KERN_ERR PFX "unable to determine aperture size.\n"); rc = -EINVAL; goto err_out; } if (bridge->driver->create_gatt_table(bridge)) { - dev_err(&bridge->dev->dev, - "can't get memory for graphics translation table\n"); + printk(KERN_ERR PFX + "unable to get memory for graphics translation table.\n"); rc = -ENOMEM; goto err_out; } @@ -170,8 +169,7 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) bridge->key_list = vmalloc(PAGE_SIZE * 4); if (bridge->key_list == NULL) { - dev_err(&bridge->dev->dev, - "can't allocate memory for key lists\n"); + printk(KERN_ERR PFX "error allocating memory for key lists.\n"); rc = -ENOMEM; goto err_out; } @@ -181,12 +179,10 @@ static int agp_backend_initialize(struct agp_bridge_data *bridge) memset(bridge->key_list, 0, PAGE_SIZE * 4); if (bridge->driver->configure()) { - dev_err(&bridge->dev->dev, "error configuring host chipset\n"); + printk(KERN_ERR PFX "error configuring host chipset.\n"); rc = -EINVAL; goto err_out; } - INIT_LIST_HEAD(&bridge->mapped_list); - spin_lock_init(&bridge->mapped_lock); return 0; @@ -273,27 +269,25 @@ int agp_add_bridge(struct agp_bridge_data *bridge) /* Grab reference on the chipset driver. */ if (!try_module_get(bridge->driver->owner)) { - dev_info(&bridge->dev->dev, "can't lock chipset driver\n"); + printk (KERN_INFO PFX "Couldn't lock chipset driver.\n"); return -EINVAL; } error = agp_backend_initialize(bridge); if (error) { - dev_info(&bridge->dev->dev, - "agp_backend_initialize() failed\n"); + printk (KERN_INFO PFX "agp_backend_initialize() failed.\n"); goto err_out; } if (list_empty(&agp_bridges)) { error = agp_frontend_initialize(); if (error) { - dev_info(&bridge->dev->dev, - "agp_frontend_initialize() failed\n"); + printk (KERN_INFO PFX "agp_frontend_initialize() failed.\n"); goto frontend_err; } - dev_info(&bridge->dev->dev, "AGP aperture is %dM @ 0x%lx\n", - bridge->driver->fetch_size(), bridge->gart_bus_addr); + printk(KERN_INFO PFX "AGP aperture is %dM @ 0x%lx\n", + bridge->driver->fetch_size(), bridge->gart_bus_addr); } diff --git a/trunk/drivers/char/agp/generic.c b/trunk/drivers/char/agp/generic.c index 118dbde25dc7..eaa1a355bb32 100644 --- a/trunk/drivers/char/agp/generic.c +++ b/trunk/drivers/char/agp/generic.c @@ -429,10 +429,6 @@ int agp_bind_memory(struct agp_memory *curr, off_t pg_start) curr->is_bound = true; curr->pg_start = pg_start; - spin_lock(&agp_bridge->mapped_lock); - list_add(&curr->mapped_list, &agp_bridge->mapped_list); - spin_unlock(&agp_bridge->mapped_lock); - return 0; } EXPORT_SYMBOL(agp_bind_memory); @@ -465,34 +461,10 @@ int agp_unbind_memory(struct agp_memory *curr) curr->is_bound = false; curr->pg_start = 0; - spin_lock(&curr->bridge->mapped_lock); - list_del(&curr->mapped_list); - spin_unlock(&curr->bridge->mapped_lock); return 0; } EXPORT_SYMBOL(agp_unbind_memory); -/** - * agp_rebind_emmory - Rewrite the entire GATT, useful on resume - */ -int agp_rebind_memory(void) -{ - struct agp_memory *curr; - int ret_val = 0; - - spin_lock(&agp_bridge->mapped_lock); - list_for_each_entry(curr, &agp_bridge->mapped_list, mapped_list) { - ret_val = curr->bridge->driver->insert_memory(curr, - curr->pg_start, - curr->type); - if (ret_val != 0) - break; - } - spin_unlock(&agp_bridge->mapped_lock); - return ret_val; -} -EXPORT_SYMBOL(agp_rebind_memory); - /* End - Routines for handling swapping of agp_memory into the GATT */ @@ -799,8 +771,8 @@ void agp_device_command(u32 bridge_agpstat, bool agp_v3) if (!agp) continue; - dev_info(&device->dev, "putting AGP V%d device into %dx mode\n", - agp_v3 ? 3 : 2, mode); + printk(KERN_INFO PFX "Putting AGP V%d device at %s into %dx mode\n", + agp_v3 ? 3 : 2, pci_name(device), mode); pci_write_config_dword(device, agp + PCI_AGP_COMMAND, bridge_agpstat); } } @@ -828,8 +800,10 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode) get_agp_version(agp_bridge); - dev_info(&agp_bridge->dev->dev, "AGP %d.%d bridge\n", - agp_bridge->major_version, agp_bridge->minor_version); + printk(KERN_INFO PFX "Found an AGP %d.%d compliant device at %s.\n", + agp_bridge->major_version, + agp_bridge->minor_version, + pci_name(agp_bridge->dev)); pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + PCI_AGP_STATUS, &bridge_agpstat); @@ -858,7 +832,8 @@ void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode) pci_write_config_dword(bridge->dev, bridge->capndx+AGPCTRL, temp); - dev_info(&bridge->dev->dev, "bridge is in legacy mode, falling back to 2.x\n"); + printk(KERN_INFO PFX "Device is in legacy mode," + " falling back to 2.x\n"); } } diff --git a/trunk/drivers/char/agp/intel-agp.c b/trunk/drivers/char/agp/intel-agp.c index 016fdf0623a4..df702642ab8f 100644 --- a/trunk/drivers/char/agp/intel-agp.c +++ b/trunk/drivers/char/agp/intel-agp.c @@ -32,8 +32,8 @@ #define PCI_DEVICE_ID_INTEL_Q35_IG 0x29B2 #define PCI_DEVICE_ID_INTEL_Q33_HB 0x29D0 #define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2 -#define PCI_DEVICE_ID_INTEL_GM45_HB 0x2A40 -#define PCI_DEVICE_ID_INTEL_GM45_IG 0x2A42 +#define PCI_DEVICE_ID_INTEL_IGD_HB 0x2A40 +#define PCI_DEVICE_ID_INTEL_IGD_IG 0x2A42 #define PCI_DEVICE_ID_INTEL_IGD_E_HB 0x2E00 #define PCI_DEVICE_ID_INTEL_IGD_E_IG 0x2E02 #define PCI_DEVICE_ID_INTEL_Q45_HB 0x2E10 @@ -55,7 +55,7 @@ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \ - agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB) + agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_HB) #define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \ @@ -161,7 +161,7 @@ static int intel_i810_fetch_size(void) values = A_SIZE_FIX(agp_bridge->driver->aperture_sizes); if ((smram_miscc & I810_GMS) == I810_GMS_DISABLE) { - dev_warn(&agp_bridge->dev->dev, "i810 is disabled\n"); + printk(KERN_WARNING PFX "i810 is disabled\n"); return 0; } if ((smram_miscc & I810_GFX_MEM_WIN_SIZE) == I810_GFX_MEM_WIN_32M) { @@ -193,8 +193,7 @@ static int intel_i810_configure(void) intel_private.registers = ioremap(temp, 128 * 4096); if (!intel_private.registers) { - dev_err(&intel_private.pcidev->dev, - "can't remap memory\n"); + printk(KERN_ERR PFX "Unable to remap memory.\n"); return -ENOMEM; } } @@ -202,8 +201,7 @@ static int intel_i810_configure(void) if ((readl(intel_private.registers+I810_DRAM_CTL) & I810_DRAM_ROW_0) == I810_DRAM_ROW_0_SDRAM) { /* This will need to be dynamically assigned */ - dev_info(&intel_private.pcidev->dev, - "detected 4MB dedicated video ram\n"); + printk(KERN_INFO PFX "detected 4MB dedicated video ram.\n"); intel_private.num_dcache_entries = 1024; } pci_read_config_dword(intel_private.pcidev, I810_GMADDR, &temp); @@ -502,8 +500,8 @@ static void intel_i830_init_gtt_entries(void) size = 1024 + 512; break; default: - dev_info(&intel_private.pcidev->dev, - "unknown page table size, assuming 512KB\n"); + printk(KERN_INFO PFX "Unknown page table size, " + "assuming 512KB\n"); size = 512; } size += 4; /* add in BIOS popup space */ @@ -517,8 +515,8 @@ static void intel_i830_init_gtt_entries(void) size = 2048; break; default: - dev_info(&agp_bridge->dev->dev, - "unknown page table size 0x%x, assuming 512KB\n", + printk(KERN_INFO PFX "Unknown page table size 0x%x, " + "assuming 512KB\n", (gmch_ctrl & G33_PGETBL_SIZE_MASK)); size = 512; } @@ -629,11 +627,11 @@ static void intel_i830_init_gtt_entries(void) } } if (gtt_entries > 0) - dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n", + printk(KERN_INFO PFX "Detected %dK %s memory.\n", gtt_entries / KB(1), local ? "local" : "stolen"); else - dev_info(&agp_bridge->dev->dev, - "no pre-allocated video memory detected\n"); + printk(KERN_INFO PFX + "No pre-allocated video memory detected.\n"); gtt_entries /= KB(4); intel_private.gtt_entries = gtt_entries; @@ -803,12 +801,10 @@ static int intel_i830_insert_entries(struct agp_memory *mem, off_t pg_start, num_entries = A_SIZE_FIX(temp)->num_entries; if (pg_start < intel_private.gtt_entries) { - dev_printk(KERN_DEBUG, &intel_private.pcidev->dev, - "pg_start == 0x%.8lx, intel_private.gtt_entries == 0x%.8x\n", - pg_start, intel_private.gtt_entries); + printk(KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_private.gtt_entries == 0x%.8x\n", + pg_start, intel_private.gtt_entries); - dev_info(&intel_private.pcidev->dev, - "trying to insert into local/stolen memory\n"); + printk(KERN_INFO PFX "Trying to insert into local/stolen memory\n"); goto out_err; } @@ -855,8 +851,7 @@ static int intel_i830_remove_entries(struct agp_memory *mem, off_t pg_start, return 0; if (pg_start < intel_private.gtt_entries) { - dev_info(&intel_private.pcidev->dev, - "trying to disable local/stolen memory\n"); + printk(KERN_INFO PFX "Trying to disable local/stolen memory\n"); return -EINVAL; } @@ -962,7 +957,7 @@ static void intel_i9xx_setup_flush(void) if (intel_private.ifp_resource.start) { intel_private.i9xx_flush_page = ioremap_nocache(intel_private.ifp_resource.start, PAGE_SIZE); if (!intel_private.i9xx_flush_page) - dev_info(&intel_private.pcidev->dev, "can't ioremap flush page - no chipset flushing"); + printk(KERN_INFO "unable to ioremap flush page - no chipset flushing"); } } @@ -1033,12 +1028,10 @@ static int intel_i915_insert_entries(struct agp_memory *mem, off_t pg_start, num_entries = A_SIZE_FIX(temp)->num_entries; if (pg_start < intel_private.gtt_entries) { - dev_printk(KERN_DEBUG, &intel_private.pcidev->dev, - "pg_start == 0x%.8lx, intel_private.gtt_entries == 0x%.8x\n", - pg_start, intel_private.gtt_entries); + printk(KERN_DEBUG PFX "pg_start == 0x%.8lx,intel_private.gtt_entries == 0x%.8x\n", + pg_start, intel_private.gtt_entries); - dev_info(&intel_private.pcidev->dev, - "trying to insert into local/stolen memory\n"); + printk(KERN_INFO PFX "Trying to insert into local/stolen memory\n"); goto out_err; } @@ -1085,8 +1078,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem, off_t pg_start, return 0; if (pg_start < intel_private.gtt_entries) { - dev_info(&intel_private.pcidev->dev, - "trying to disable local/stolen memory\n"); + printk(KERN_INFO PFX "Trying to disable local/stolen memory\n"); return -EINVAL; } @@ -1190,7 +1182,7 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge, static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) { switch (agp_bridge->dev->device) { - case PCI_DEVICE_ID_INTEL_GM45_HB: + case PCI_DEVICE_ID_INTEL_IGD_HB: case PCI_DEVICE_ID_INTEL_IGD_E_HB: case PCI_DEVICE_ID_INTEL_Q45_HB: case PCI_DEVICE_ID_INTEL_G45_HB: @@ -1387,7 +1379,7 @@ static int intel_815_configure(void) /* the Intel 815 chipset spec. says that bits 29-31 in the * ATTBASE register are reserved -> try not to write them */ if (agp_bridge->gatt_bus_addr & INTEL_815_ATTBASE_MASK) { - dev_emerg(&agp_bridge->dev->dev, "gatt bus addr too high"); + printk(KERN_EMERG PFX "gatt bus addr too high"); return -EINVAL; } @@ -2125,8 +2117,8 @@ static const struct intel_driver_description { NULL, &intel_g33_driver }, { PCI_DEVICE_ID_INTEL_Q33_HB, PCI_DEVICE_ID_INTEL_Q33_IG, 0, "Q33", NULL, &intel_g33_driver }, - { PCI_DEVICE_ID_INTEL_GM45_HB, PCI_DEVICE_ID_INTEL_GM45_IG, 0, - "Mobile Intel? GM45 Express", NULL, &intel_i965_driver }, + { PCI_DEVICE_ID_INTEL_IGD_HB, PCI_DEVICE_ID_INTEL_IGD_IG, 0, + "Intel Integrated Graphics Device", NULL, &intel_i965_driver }, { PCI_DEVICE_ID_INTEL_IGD_E_HB, PCI_DEVICE_ID_INTEL_IGD_E_IG, 0, "Intel Integrated Graphics Device", NULL, &intel_i965_driver }, { PCI_DEVICE_ID_INTEL_Q45_HB, PCI_DEVICE_ID_INTEL_Q45_IG, 0, @@ -2171,8 +2163,8 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, if (intel_agp_chipsets[i].name == NULL) { if (cap_ptr) - dev_warn(&pdev->dev, "unsupported Intel chipset [%04x/%04x]\n", - pdev->vendor, pdev->device); + printk(KERN_WARNING PFX "Unsupported Intel chipset" + "(device id: %04x)\n", pdev->device); agp_put_bridge(bridge); return -ENODEV; } @@ -2180,8 +2172,9 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, if (bridge->driver == NULL) { /* bridge has no AGP and no IGD detected */ if (cap_ptr) - dev_warn(&pdev->dev, "can't find bridge device (chip_id: %04x)\n", - intel_agp_chipsets[i].gmch_chip_id); + printk(KERN_WARNING PFX "Failed to find bridge device " + "(chip_id: %04x)\n", + intel_agp_chipsets[i].gmch_chip_id); agp_put_bridge(bridge); return -ENODEV; } @@ -2190,7 +2183,8 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, bridge->capndx = cap_ptr; bridge->dev_private_data = &intel_private; - dev_info(&pdev->dev, "Intel %s Chipset\n", intel_agp_chipsets[i].name); + printk(KERN_INFO PFX "Detected an Intel %s Chipset.\n", + intel_agp_chipsets[i].name); /* * The following fixes the case where the BIOS has "forgotten" to @@ -2200,7 +2194,7 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, r = &pdev->resource[0]; if (!r->start && r->end) { if (pci_assign_resource(pdev, 0)) { - dev_err(&pdev->dev, "can't assign resource 0\n"); + printk(KERN_ERR PFX "could not assign resource 0\n"); agp_put_bridge(bridge); return -ENODEV; } @@ -2212,7 +2206,7 @@ static int __devinit agp_intel_probe(struct pci_dev *pdev, * 20030610 - hamish@zot.org */ if (pci_enable_device(pdev)) { - dev_err(&pdev->dev, "can't enable PCI device\n"); + printk(KERN_ERR PFX "Unable to Enable PCI device\n"); agp_put_bridge(bridge); return -ENODEV; } @@ -2244,7 +2238,6 @@ static void __devexit agp_intel_remove(struct pci_dev *pdev) static int agp_intel_resume(struct pci_dev *pdev) { struct agp_bridge_data *bridge = pci_get_drvdata(pdev); - int ret_val; pci_restore_state(pdev); @@ -2272,10 +2265,6 @@ static int agp_intel_resume(struct pci_dev *pdev) else if (bridge->driver == &intel_i965_driver) intel_i915_configure(); - ret_val = agp_rebind_memory(); - if (ret_val != 0) - return ret_val; - return 0; } #endif @@ -2326,7 +2315,7 @@ static struct pci_device_id agp_intel_pci_table[] = { ID(PCI_DEVICE_ID_INTEL_G33_HB), ID(PCI_DEVICE_ID_INTEL_Q35_HB), ID(PCI_DEVICE_ID_INTEL_Q33_HB), - ID(PCI_DEVICE_ID_INTEL_GM45_HB), + ID(PCI_DEVICE_ID_INTEL_IGD_HB), ID(PCI_DEVICE_ID_INTEL_IGD_E_HB), ID(PCI_DEVICE_ID_INTEL_Q45_HB), ID(PCI_DEVICE_ID_INTEL_G45_HB), diff --git a/trunk/drivers/char/agp/isoch.c b/trunk/drivers/char/agp/isoch.c index c73385cc4b8a..3f9ccde62377 100644 --- a/trunk/drivers/char/agp/isoch.c +++ b/trunk/drivers/char/agp/isoch.c @@ -153,7 +153,7 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge, /* Check if this configuration has any chance of working */ if (tot_bw > target.maxbw) { - dev_err(&td->dev, "isochronous bandwidth required " + printk(KERN_ERR PFX "isochronous bandwidth required " "by AGP 3.0 devices exceeds that which is supported by " "the AGP 3.0 bridge!\n"); ret = -ENODEV; @@ -188,7 +188,7 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge, /* Exit if the minimal ISOCH_N allocation among the masters is more * than the target can handle. */ if (tot_n > target.n) { - dev_err(&td->dev, "number of isochronous " + printk(KERN_ERR PFX "number of isochronous " "transactions per period required by AGP 3.0 devices " "exceeds that which is supported by the AGP 3.0 " "bridge!\n"); @@ -229,7 +229,7 @@ static int agp_3_5_isochronous_node_enable(struct agp_bridge_data *bridge, /* Exit if the minimal RQ needs of the masters exceeds what the target * can provide. */ if (tot_rq > rq_isoch) { - dev_err(&td->dev, "number of request queue slots " + printk(KERN_ERR PFX "number of request queue slots " "required by the isochronous bandwidth requested by " "AGP 3.0 devices exceeds the number provided by the " "AGP 3.0 bridge!\n"); @@ -359,9 +359,8 @@ int agp_3_5_enable(struct agp_bridge_data *bridge) case 0x0001: /* Unclassified device */ /* Don't know what this is, but log it for investigation. */ if (mcapndx != 0) { - dev_info(&td->dev, "wacky, found unclassified AGP device %s [%04x/%04x]\n", - pci_name(dev), - dev->vendor, dev->device); + printk (KERN_INFO PFX "Wacky, found unclassified AGP device. %x:%x\n", + dev->vendor, dev->device); } continue; @@ -408,18 +407,17 @@ int agp_3_5_enable(struct agp_bridge_data *bridge) } if (mcapndx == 0) { - dev_err(&td->dev, "woah! Non-AGP device %s on " - "secondary bus of AGP 3.5 bridge!\n", - pci_name(dev)); + printk(KERN_ERR PFX "woah! Non-AGP device " + "found on the secondary bus of an AGP 3.5 bridge!\n"); ret = -ENODEV; goto free_and_exit; } mmajor = (ncapid >> AGP_MAJOR_VERSION_SHIFT) & 0xf; if (mmajor < 3) { - dev_err(&td->dev, "woah! AGP 2.0 device %s on " - "secondary bus of AGP 3.5 bridge operating " - "with AGP 3.0 electricals!\n", pci_name(dev)); + printk(KERN_ERR PFX "woah! AGP 2.0 device " + "found on the secondary bus of an AGP 3.5 " + "bridge operating with AGP 3.0 electricals!\n"); ret = -ENODEV; goto free_and_exit; } @@ -429,10 +427,10 @@ int agp_3_5_enable(struct agp_bridge_data *bridge) pci_read_config_dword(dev, cur->capndx+AGPSTAT, &mstatus); if (((mstatus >> 3) & 0x1) == 0) { - dev_err(&td->dev, "woah! AGP 3.x device %s not " - "operating in AGP 3.x mode on secondary bus " - "of AGP 3.5 bridge operating with AGP 3.0 " - "electricals!\n", pci_name(dev)); + printk(KERN_ERR PFX "woah! AGP 3.x device " + "not operating in AGP 3.x mode found on the " + "secondary bus of an AGP 3.5 bridge operating " + "with AGP 3.0 electricals!\n"); ret = -ENODEV; goto free_and_exit; } @@ -446,9 +444,9 @@ int agp_3_5_enable(struct agp_bridge_data *bridge) if (isoch) { ret = agp_3_5_isochronous_node_enable(bridge, dev_list, ndevs); if (ret) { - dev_info(&td->dev, "something bad happened setting " - "up isochronous xfers; falling back to " - "non-isochronous xfer mode\n"); + printk(KERN_INFO PFX "Something bad happened setting " + "up isochronous xfers. Falling back to " + "non-isochronous xfer mode.\n"); } else { goto free_and_exit; } @@ -468,3 +466,4 @@ int agp_3_5_enable(struct agp_bridge_data *bridge) get_out: return ret; } + diff --git a/trunk/drivers/char/agp/sis-agp.c b/trunk/drivers/char/agp/sis-agp.c index 2587ef96a960..b6791846809f 100644 --- a/trunk/drivers/char/agp/sis-agp.c +++ b/trunk/drivers/char/agp/sis-agp.c @@ -79,8 +79,10 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode) u32 command; int rate; - dev_info(&agp_bridge->dev->dev, "AGP %d.%d bridge\n", - agp_bridge->major_version, agp_bridge->minor_version); + printk(KERN_INFO PFX "Found an AGP %d.%d compliant device at %s.\n", + agp_bridge->major_version, + agp_bridge->minor_version, + pci_name(agp_bridge->dev)); pci_read_config_dword(agp_bridge->dev, agp_bridge->capndx + PCI_AGP_STATUS, &command); command = agp_collect_device_status(bridge, mode, command); @@ -92,8 +94,8 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode) if (!agp) continue; - dev_info(&agp_bridge->dev->dev, "putting AGP V3 device at %s into %dx mode\n", - pci_name(device), rate); + printk(KERN_INFO PFX "Putting AGP V3 device at %s into %dx mode\n", + pci_name(device), rate); pci_write_config_dword(device, agp + PCI_AGP_COMMAND, command); @@ -103,7 +105,7 @@ static void sis_delayed_enable(struct agp_bridge_data *bridge, u32 mode) * cannot be configured */ if (device->device == bridge->dev->device) { - dev_info(&agp_bridge->dev->dev, "SiS delay workaround: giving bridge time to recover\n"); + printk(KERN_INFO PFX "SiS delay workaround: giving bridge time to recover.\n"); msleep(10); } } @@ -188,8 +190,7 @@ static int __devinit agp_sis_probe(struct pci_dev *pdev, return -ENODEV; - dev_info(&pdev->dev, "SiS chipset [%04x/%04x]\n", - pdev->vendor, pdev->device); + printk(KERN_INFO PFX "Detected SiS chipset - id:%i\n", pdev->device); bridge = agp_alloc_bridge(); if (!bridge) return -ENOMEM; @@ -241,7 +242,7 @@ static struct pci_device_id agp_sis_pci_table[] = { .class = (PCI_CLASS_BRIDGE_HOST << 8), .class_mask = ~0, .vendor = PCI_VENDOR_ID_SI, - .device = PCI_DEVICE_ID_SI_5591, + .device = PCI_DEVICE_ID_SI_5591_AGP, .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, }, diff --git a/trunk/drivers/char/agp/sworks-agp.c b/trunk/drivers/char/agp/sworks-agp.c index 2fb27fe4c10c..0e054c134490 100644 --- a/trunk/drivers/char/agp/sworks-agp.c +++ b/trunk/drivers/char/agp/sworks-agp.c @@ -241,8 +241,7 @@ static void serverworks_tlbflush(struct agp_memory *temp) while (readb(serverworks_private.registers+SVWRKS_POSTFLUSH) == 1) { cpu_relax(); if (time_after(jiffies, timeout)) { - dev_err(&serverworks_private.svrwrks_dev->dev, - "TLB post flush took more than 3 seconds\n"); + printk(KERN_ERR PFX "TLB post flush took more than 3 seconds\n"); break; } } @@ -252,8 +251,7 @@ static void serverworks_tlbflush(struct agp_memory *temp) while (readl(serverworks_private.registers+SVWRKS_DIRFLUSH) == 1) { cpu_relax(); if (time_after(jiffies, timeout)) { - dev_err(&serverworks_private.svrwrks_dev->dev, - "TLB Dir flush took more than 3 seconds\n"); + printk(KERN_ERR PFX "TLB Dir flush took more than 3 seconds\n"); break; } } @@ -273,7 +271,7 @@ static int serverworks_configure(void) temp = (temp & PCI_BASE_ADDRESS_MEM_MASK); serverworks_private.registers = (volatile u8 __iomem *) ioremap(temp, 4096); if (!serverworks_private.registers) { - dev_err(&agp_bridge->dev->dev, "can't ioremap(%#x)\n", temp); + printk (KERN_ERR PFX "Unable to ioremap() memory.\n"); return -ENOMEM; } @@ -453,7 +451,7 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev, switch (pdev->device) { case 0x0006: - dev_err(&pdev->dev, "ServerWorks CNB20HE is unsupported due to lack of documentation\n"); + printk (KERN_ERR PFX "ServerWorks CNB20HE is unsupported due to lack of documentation.\n"); return -ENODEV; case PCI_DEVICE_ID_SERVERWORKS_HE: @@ -463,8 +461,8 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev, default: if (cap_ptr) - dev_err(&pdev->dev, "unsupported Serverworks chipset " - "[%04x/%04x]\n", pdev->vendor, pdev->device); + printk(KERN_ERR PFX "Unsupported Serverworks chipset " + "(device id: %04x)\n", pdev->device); return -ENODEV; } @@ -472,7 +470,8 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev, bridge_dev = pci_get_bus_and_slot((unsigned int)pdev->bus->number, PCI_DEVFN(0, 1)); if (!bridge_dev) { - dev_info(&pdev->dev, "can't find secondary device\n"); + printk(KERN_INFO PFX "Detected a Serverworks chipset " + "but could not find the secondary device.\n"); return -ENODEV; } @@ -483,8 +482,8 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev, if (temp & PCI_BASE_ADDRESS_MEM_TYPE_64) { pci_read_config_dword(pdev, SVWRKS_APSIZE + 4, &temp2); if (temp2 != 0) { - dev_info(&pdev->dev, "64 bit aperture address, " - "but top bits are not zero; disabling AGP\n"); + printk(KERN_INFO PFX "Detected 64 bit aperture address, " + "but top bits are not zero. Disabling agp\n"); return -ENODEV; } serverworks_private.mm_addr_ofs = 0x18; @@ -496,8 +495,8 @@ static int __devinit agp_serverworks_probe(struct pci_dev *pdev, pci_read_config_dword(pdev, serverworks_private.mm_addr_ofs + 4, &temp2); if (temp2 != 0) { - dev_info(&pdev->dev, "64 bit MMIO address, but top " - "bits are not zero; disabling AGP\n"); + printk(KERN_INFO PFX "Detected 64 bit MMIO address, " + "but top bits are not zero. Disabling agp\n"); return -ENODEV; } } diff --git a/trunk/drivers/char/agp/uninorth-agp.c b/trunk/drivers/char/agp/uninorth-agp.c index eef72709ec53..d2fa3cfca02a 100644 --- a/trunk/drivers/char/agp/uninorth-agp.c +++ b/trunk/drivers/char/agp/uninorth-agp.c @@ -46,8 +46,8 @@ static int uninorth_fetch_size(void) break; if (i == agp_bridge->driver->num_aperture_sizes) { - dev_err(&agp_bridge->dev->dev, "invalid aperture size, " - "using default\n"); + printk(KERN_ERR PFX "Invalid aperture size, using" + " default\n"); size = 0; aperture = NULL; } @@ -108,8 +108,8 @@ static int uninorth_configure(void) current_size = A_SIZE_32(agp_bridge->current_size); - dev_info(&agp_bridge->dev->dev, "configuring for size idx: %d\n", - current_size->size_value); + printk(KERN_INFO PFX "configuring for size idx: %d\n", + current_size->size_value); /* aperture size and gatt addr */ pci_write_config_dword(agp_bridge->dev, @@ -197,9 +197,8 @@ static int u3_insert_memory(struct agp_memory *mem, off_t pg_start, int type) gp = (u32 *) &agp_bridge->gatt_table[pg_start]; for (i = 0; i < mem->page_count; ++i) { if (gp[i]) { - dev_info(&agp_bridge->dev->dev, - "u3_insert_memory: entry 0x%x occupied (%x)\n", - i, gp[i]); + printk("u3_insert_memory: entry 0x%x occupied (%x)\n", + i, gp[i]); return -EBUSY; } } @@ -277,8 +276,8 @@ static void uninorth_agp_enable(struct agp_bridge_data *bridge, u32 mode) &scratch); } while ((scratch & PCI_AGP_COMMAND_AGP) == 0 && ++timeout < 1000); if ((scratch & PCI_AGP_COMMAND_AGP) == 0) - dev_err(&bridge->dev->dev, "can't write UniNorth AGP " - "command register\n"); + printk(KERN_ERR PFX "failed to write UniNorth AGP" + " command register\n"); if (uninorth_rev >= 0x30) { /* This is an AGP V3 */ @@ -331,8 +330,8 @@ static int agp_uninorth_suspend(struct pci_dev *pdev) pci_read_config_dword(device, agp + PCI_AGP_COMMAND, &cmd); if (!(cmd & PCI_AGP_COMMAND_AGP)) continue; - dev_info(&pdev->dev, "disabling AGP on device %s\n", - pci_name(device)); + printk("uninorth-agp: disabling AGP on device %s\n", + pci_name(device)); cmd &= ~PCI_AGP_COMMAND_AGP; pci_write_config_dword(device, agp + PCI_AGP_COMMAND, cmd); } @@ -342,7 +341,8 @@ static int agp_uninorth_suspend(struct pci_dev *pdev) pci_read_config_dword(pdev, agp + PCI_AGP_COMMAND, &cmd); bridge->dev_private_data = (void *)(long)cmd; if (cmd & PCI_AGP_COMMAND_AGP) { - dev_info(&pdev->dev, "disabling AGP on bridge\n"); + printk("uninorth-agp: disabling AGP on bridge %s\n", + pci_name(pdev)); cmd &= ~PCI_AGP_COMMAND_AGP; pci_write_config_dword(pdev, agp + PCI_AGP_COMMAND, cmd); } @@ -591,14 +591,14 @@ static int __devinit agp_uninorth_probe(struct pci_dev *pdev, /* probe for known chipsets */ for (j = 0; devs[j].chipset_name != NULL; ++j) { if (pdev->device == devs[j].device_id) { - dev_info(&pdev->dev, "Apple %s chipset\n", - devs[j].chipset_name); + printk(KERN_INFO PFX "Detected Apple %s chipset\n", + devs[j].chipset_name); goto found; } } - dev_err(&pdev->dev, "unsupported Apple chipset [%04x/%04x]\n", - pdev->vendor, pdev->device); + printk(KERN_ERR PFX "Unsupported Apple chipset (device id: %04x).\n", + pdev->device); return -ENODEV; found: diff --git a/trunk/drivers/char/hvc_console.c b/trunk/drivers/char/hvc_console.c index fd64137b1ab9..02aac104842d 100644 --- a/trunk/drivers/char/hvc_console.c +++ b/trunk/drivers/char/hvc_console.c @@ -322,11 +322,12 @@ static int hvc_open(struct tty_struct *tty, struct file * filp) hp->tty = tty; - spin_unlock_irqrestore(&hp->lock, flags); - if (hp->ops->notifier_add) rc = hp->ops->notifier_add(hp, hp->data); + spin_unlock_irqrestore(&hp->lock, flags); + + /* * If the notifier fails we return an error. The tty layer * will call hvc_close() after a failed open but we don't want to clean diff --git a/trunk/drivers/char/rtc.c b/trunk/drivers/char/rtc.c index f53d4d00faf0..d9799e2bcfbf 100644 --- a/trunk/drivers/char/rtc.c +++ b/trunk/drivers/char/rtc.c @@ -78,6 +78,7 @@ #include #include #include +#include #include #include diff --git a/trunk/drivers/cpuidle/sysfs.c b/trunk/drivers/cpuidle/sysfs.c index 97b003839fb6..31a0e0b455b6 100644 --- a/trunk/drivers/cpuidle/sysfs.c +++ b/trunk/drivers/cpuidle/sysfs.c @@ -21,8 +21,8 @@ static int __init cpuidle_sysfs_setup(char *unused) } __setup("cpuidle_sysfs_switch", cpuidle_sysfs_setup); -static ssize_t show_available_governors(struct sysdev_class *class, - char *buf) +static ssize_t show_available_governors(struct sys_device *dev, + struct sysdev_attribute *attr, char *buf) { ssize_t i = 0; struct cpuidle_governor *tmp; @@ -40,8 +40,8 @@ static ssize_t show_available_governors(struct sysdev_class *class, return i; } -static ssize_t show_current_driver(struct sysdev_class *class, - char *buf) +static ssize_t show_current_driver(struct sys_device *dev, + struct sysdev_attribute *attr, char *buf) { ssize_t ret; @@ -55,8 +55,8 @@ static ssize_t show_current_driver(struct sysdev_class *class, return ret; } -static ssize_t show_current_governor(struct sysdev_class *class, - char *buf) +static ssize_t show_current_governor(struct sys_device *dev, + struct sysdev_attribute *attr, char *buf) { ssize_t ret; @@ -70,8 +70,9 @@ static ssize_t show_current_governor(struct sysdev_class *class, return ret; } -static ssize_t store_current_governor(struct sysdev_class *class, - const char *buf, size_t count) +static ssize_t store_current_governor(struct sys_device *dev, + struct sysdev_attribute *attr, + const char *buf, size_t count) { char gov_name[CPUIDLE_NAME_LEN]; int ret = -EINVAL; @@ -103,9 +104,8 @@ static ssize_t store_current_governor(struct sysdev_class *class, return count; } -static SYSDEV_CLASS_ATTR(current_driver, 0444, show_current_driver, NULL); -static SYSDEV_CLASS_ATTR(current_governor_ro, 0444, show_current_governor, - NULL); +static SYSDEV_ATTR(current_driver, 0444, show_current_driver, NULL); +static SYSDEV_ATTR(current_governor_ro, 0444, show_current_governor, NULL); static struct attribute *cpuclass_default_attrs[] = { &attr_current_driver.attr, @@ -113,10 +113,9 @@ static struct attribute *cpuclass_default_attrs[] = { NULL }; -static SYSDEV_CLASS_ATTR(available_governors, 0444, show_available_governors, - NULL); -static SYSDEV_CLASS_ATTR(current_governor, 0644, show_current_governor, - store_current_governor); +static SYSDEV_ATTR(available_governors, 0444, show_available_governors, NULL); +static SYSDEV_ATTR(current_governor, 0644, show_current_governor, + store_current_governor); static struct attribute *cpuclass_switch_attrs[] = { &attr_available_governors.attr, diff --git a/trunk/drivers/firmware/memmap.c b/trunk/drivers/firmware/memmap.c index 3bf8ee120d42..001622eb86f9 100644 --- a/trunk/drivers/firmware/memmap.c +++ b/trunk/drivers/firmware/memmap.c @@ -84,23 +84,20 @@ static struct kobj_type memmap_ktype = { */ /* - * Firmware memory map entries. No locking is needed because the - * firmware_map_add() and firmware_map_add_early() functions are called - * in firmware initialisation code in one single thread of execution. + * Firmware memory map entries */ static LIST_HEAD(map_entries); /** - * firmware_map_add_entry() - Does the real work to add a firmware memmap entry. + * Common implementation of firmware_map_add() and firmware_map_add_early() + * which expects a pre-allocated struct firmware_map_entry. + * * @start: Start of the memory range. * @end: End of the memory range (inclusive). * @type: Type of the memory range. * @entry: Pre-allocated (either kmalloc() or bootmem allocator), uninitialised * entry. - * - * Common implementation of firmware_map_add() and firmware_map_add_early() - * which expects a pre-allocated struct firmware_map_entry. - **/ + */ static int firmware_map_add_entry(resource_size_t start, resource_size_t end, const char *type, struct firmware_map_entry *entry) @@ -118,52 +115,33 @@ static int firmware_map_add_entry(resource_size_t start, resource_size_t end, return 0; } -/** - * firmware_map_add() - Adds a firmware mapping entry. - * @start: Start of the memory range. - * @end: End of the memory range (inclusive). - * @type: Type of the memory range. - * - * This function uses kmalloc() for memory - * allocation. Use firmware_map_add_early() if you want to use the bootmem - * allocator. - * - * That function must be called before late_initcall. - * - * Returns 0 on success, or -ENOMEM if no memory could be allocated. - **/ +/* + * See for documentation. + */ int firmware_map_add(resource_size_t start, resource_size_t end, const char *type) { struct firmware_map_entry *entry; entry = kmalloc(sizeof(struct firmware_map_entry), GFP_ATOMIC); + WARN_ON(!entry); if (!entry) return -ENOMEM; return firmware_map_add_entry(start, end, type, entry); } -/** - * firmware_map_add_early() - Adds a firmware mapping entry. - * @start: Start of the memory range. - * @end: End of the memory range (inclusive). - * @type: Type of the memory range. - * - * Adds a firmware mapping entry. This function uses the bootmem allocator - * for memory allocation. Use firmware_map_add() if you want to use kmalloc(). - * - * That function must be called before late_initcall. - * - * Returns 0 on success, or -ENOMEM if no memory could be allocated. - **/ +/* + * See for documentation. + */ int __init firmware_map_add_early(resource_size_t start, resource_size_t end, const char *type) { struct firmware_map_entry *entry; entry = alloc_bootmem_low(sizeof(struct firmware_map_entry)); - if (WARN_ON(!entry)) + WARN_ON(!entry); + if (!entry) return -ENOMEM; return firmware_map_add_entry(start, end, type, entry); @@ -205,10 +183,7 @@ static ssize_t memmap_attr_show(struct kobject *kobj, /* * Initialises stuff and adds the entries in the map_entries list to * sysfs. Important is that firmware_map_add() and firmware_map_add_early() - * must be called before late_initcall. That's just because that function - * is called as late_initcall() function, which means that if you call - * firmware_map_add() or firmware_map_add_early() afterwards, the entries - * are not added to sysfs. + * must be called before late_initcall. */ static int __init memmap_init(void) { @@ -217,13 +192,13 @@ static int __init memmap_init(void) struct kset *memmap_kset; memmap_kset = kset_create_and_add("memmap", NULL, firmware_kobj); - if (WARN_ON(!memmap_kset)) + WARN_ON(!memmap_kset); + if (!memmap_kset) return -ENOMEM; list_for_each_entry(entry, &map_entries, list) { entry->kobj.kset = memmap_kset; - if (kobject_add(&entry->kobj, NULL, "%d", i++)) - kobject_put(&entry->kobj); + kobject_add(&entry->kobj, NULL, "%d", i++); } return 0; diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_classes.h b/trunk/drivers/infiniband/hw/ehca/ehca_classes.h index 1ab919f836a8..0b0618edd645 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_classes.h +++ b/trunk/drivers/infiniband/hw/ehca/ehca_classes.h @@ -156,14 +156,6 @@ struct ehca_mod_qp_parm { #define EHCA_MOD_QP_PARM_MAX 4 -#define QMAP_IDX_MASK 0xFFFFULL - -/* struct for tracking if cqes have been reported to the application */ -struct ehca_qmap_entry { - u16 app_wr_id; - u16 reported; -}; - struct ehca_qp { union { struct ib_qp ib_qp; @@ -173,7 +165,6 @@ struct ehca_qp { enum ehca_ext_qp_type ext_type; enum ib_qp_state state; struct ipz_queue ipz_squeue; - struct ehca_qmap_entry *sq_map; struct ipz_queue ipz_rqueue; struct h_galpas galpas; u32 qkey; diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_qes.h b/trunk/drivers/infiniband/hw/ehca/ehca_qes.h index 5d28e3e98a20..818803057ebf 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_qes.h +++ b/trunk/drivers/infiniband/hw/ehca/ehca_qes.h @@ -213,7 +213,6 @@ struct ehca_wqe { #define WC_STATUS_ERROR_BIT 0x80000000 #define WC_STATUS_REMOTE_ERROR_FLAGS 0x0000F800 #define WC_STATUS_PURGE_BIT 0x10 -#define WC_SEND_RECEIVE_BIT 0x80 struct ehca_cqe { u64 work_request_id; diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_qp.c b/trunk/drivers/infiniband/hw/ehca/ehca_qp.c index b6bcee036734..ea13efddf175 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_qp.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_qp.c @@ -412,7 +412,6 @@ static struct ehca_qp *internal_create_qp( struct ehca_shca *shca = container_of(pd->device, struct ehca_shca, ib_device); struct ib_ucontext *context = NULL; - u32 nr_qes; u64 h_ret; int is_llqp = 0, has_srq = 0; int qp_type, max_send_sge, max_recv_sge, ret; @@ -716,15 +715,6 @@ static struct ehca_qp *internal_create_qp( "and pages ret=%i", ret); goto create_qp_exit2; } - nr_qes = my_qp->ipz_squeue.queue_length / - my_qp->ipz_squeue.qe_size; - my_qp->sq_map = vmalloc(nr_qes * - sizeof(struct ehca_qmap_entry)); - if (!my_qp->sq_map) { - ehca_err(pd->device, "Couldn't allocate squeue " - "map ret=%i", ret); - goto create_qp_exit3; - } } if (HAS_RQ(my_qp)) { @@ -734,7 +724,7 @@ static struct ehca_qp *internal_create_qp( if (ret) { ehca_err(pd->device, "Couldn't initialize rqueue " "and pages ret=%i", ret); - goto create_qp_exit4; + goto create_qp_exit3; } } @@ -780,7 +770,7 @@ static struct ehca_qp *internal_create_qp( if (!my_qp->mod_qp_parm) { ehca_err(pd->device, "Could not alloc mod_qp_parm"); - goto create_qp_exit5; + goto create_qp_exit4; } } } @@ -790,7 +780,7 @@ static struct ehca_qp *internal_create_qp( h_ret = ehca_define_sqp(shca, my_qp, init_attr); if (h_ret != H_SUCCESS) { ret = ehca2ib_return_code(h_ret); - goto create_qp_exit6; + goto create_qp_exit5; } } @@ -799,7 +789,7 @@ static struct ehca_qp *internal_create_qp( if (ret) { ehca_err(pd->device, "Couldn't assign qp to send_cq ret=%i", ret); - goto create_qp_exit6; + goto create_qp_exit5; } } @@ -825,26 +815,22 @@ static struct ehca_qp *internal_create_qp( if (ib_copy_to_udata(udata, &resp, sizeof resp)) { ehca_err(pd->device, "Copy to udata failed"); ret = -EINVAL; - goto create_qp_exit7; + goto create_qp_exit6; } } return my_qp; -create_qp_exit7: +create_qp_exit6: ehca_cq_unassign_qp(my_qp->send_cq, my_qp->real_qp_num); -create_qp_exit6: +create_qp_exit5: kfree(my_qp->mod_qp_parm); -create_qp_exit5: +create_qp_exit4: if (HAS_RQ(my_qp)) ipz_queue_dtor(my_pd, &my_qp->ipz_rqueue); -create_qp_exit4: - if (HAS_SQ(my_qp)) - vfree(my_qp->sq_map); - create_qp_exit3: if (HAS_SQ(my_qp)) ipz_queue_dtor(my_pd, &my_qp->ipz_squeue); @@ -1548,6 +1534,8 @@ static int internal_modify_qp(struct ib_qp *ibqp, if (attr_mask & IB_QP_QKEY) my_qp->qkey = attr->qkey; + my_qp->state = qp_new_state; + modify_qp_exit2: if (squeue_locked) { /* this means: sqe -> rts */ spin_unlock_irqrestore(&my_qp->spinlock_s, flags); @@ -1563,8 +1551,6 @@ static int internal_modify_qp(struct ib_qp *ibqp, int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, struct ib_udata *udata) { - int ret = 0; - struct ehca_shca *shca = container_of(ibqp->device, struct ehca_shca, ib_device); struct ehca_qp *my_qp = container_of(ibqp, struct ehca_qp, ib_qp); @@ -1611,18 +1597,12 @@ int ehca_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, int attr_mask, attr->qp_state, my_qp->init_attr.port_num, ibqp->qp_type); spin_unlock_irqrestore(&sport->mod_sqp_lock, flags); - goto out; + return 0; } spin_unlock_irqrestore(&sport->mod_sqp_lock, flags); } - ret = internal_modify_qp(ibqp, attr, attr_mask, 0); - -out: - if ((ret == 0) && (attr_mask & IB_QP_STATE)) - my_qp->state = attr->qp_state; - - return ret; + return internal_modify_qp(ibqp, attr, attr_mask, 0); } void ehca_recover_sqp(struct ib_qp *sqp) @@ -1993,10 +1973,8 @@ static int internal_destroy_qp(struct ib_device *dev, struct ehca_qp *my_qp, if (HAS_RQ(my_qp)) ipz_queue_dtor(my_pd, &my_qp->ipz_rqueue); - if (HAS_SQ(my_qp)) { + if (HAS_SQ(my_qp)) ipz_queue_dtor(my_pd, &my_qp->ipz_squeue); - vfree(my_qp->sq_map); - } kmem_cache_free(qp_cache, my_qp); atomic_dec(&shca->num_qps); return 0; diff --git a/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c b/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c index 4426d82fe798..898c8b5c38dd 100644 --- a/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c +++ b/trunk/drivers/infiniband/hw/ehca/ehca_reqs.c @@ -139,7 +139,6 @@ static void trace_send_wr_ud(const struct ib_send_wr *send_wr) static inline int ehca_write_swqe(struct ehca_qp *qp, struct ehca_wqe *wqe_p, const struct ib_send_wr *send_wr, - u32 sq_map_idx, int hidden) { u32 idx; @@ -158,11 +157,7 @@ static inline int ehca_write_swqe(struct ehca_qp *qp, /* clear wqe header until sglist */ memset(wqe_p, 0, offsetof(struct ehca_wqe, u.ud_av.sg_list)); - wqe_p->work_request_id = send_wr->wr_id & ~QMAP_IDX_MASK; - wqe_p->work_request_id |= sq_map_idx & QMAP_IDX_MASK; - - qp->sq_map[sq_map_idx].app_wr_id = send_wr->wr_id & QMAP_IDX_MASK; - qp->sq_map[sq_map_idx].reported = 0; + wqe_p->work_request_id = send_wr->wr_id; switch (send_wr->opcode) { case IB_WR_SEND: @@ -386,7 +381,6 @@ static inline int post_one_send(struct ehca_qp *my_qp, { struct ehca_wqe *wqe_p; int ret; - u32 sq_map_idx; u64 start_offset = my_qp->ipz_squeue.current_q_offset; /* get pointer next to free WQE */ @@ -399,15 +393,8 @@ static inline int post_one_send(struct ehca_qp *my_qp, "qp_num=%x", my_qp->ib_qp.qp_num); return -ENOMEM; } - - /* - * Get the index of the WQE in the send queue. The same index is used - * for writing into the sq_map. - */ - sq_map_idx = start_offset / my_qp->ipz_squeue.qe_size; - /* write a SEND WQE into the QUEUE */ - ret = ehca_write_swqe(my_qp, wqe_p, cur_send_wr, sq_map_idx, hidden); + ret = ehca_write_swqe(my_qp, wqe_p, cur_send_wr, hidden); /* * if something failed, * reset the free entry pointer to the start value @@ -602,7 +589,7 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc) struct ehca_qp *my_qp; int cqe_count = 0, is_error; -repoll: +poll_cq_one_read_cqe: cqe = (struct ehca_cqe *) ipz_qeit_get_inc_valid(&my_cq->ipz_queue); if (!cqe) { @@ -630,7 +617,7 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc) ehca_dmp(cqe, 64, "cq_num=%x qp_num=%x", my_cq->cq_number, cqe->local_qp_number); /* ignore this purged cqe */ - goto repoll; + goto poll_cq_one_read_cqe; } spin_lock_irqsave(&qp->spinlock_s, flags); purgeflag = qp->sqerr_purgeflag; @@ -649,7 +636,7 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc) * that caused sqe and turn off purge flag */ qp->sqerr_purgeflag = 0; - goto repoll; + goto poll_cq_one_read_cqe; } } @@ -667,34 +654,8 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc) my_cq, my_cq->cq_number); } - read_lock(&ehca_qp_idr_lock); - my_qp = idr_find(&ehca_qp_idr, cqe->qp_token); - read_unlock(&ehca_qp_idr_lock); - if (!my_qp) - goto repoll; - wc->qp = &my_qp->ib_qp; - - if (!(cqe->w_completion_flags & WC_SEND_RECEIVE_BIT)) { - struct ehca_qmap_entry *qmap_entry; - /* - * We got a send completion and need to restore the original - * wr_id. - */ - qmap_entry = &my_qp->sq_map[cqe->work_request_id & - QMAP_IDX_MASK]; - - if (qmap_entry->reported) { - ehca_warn(cq->device, "Double cqe on qp_num=%#x", - my_qp->real_qp_num); - /* found a double cqe, discard it and read next one */ - goto repoll; - } - wc->wr_id = cqe->work_request_id & ~QMAP_IDX_MASK; - wc->wr_id |= qmap_entry->app_wr_id; - qmap_entry->reported = 1; - } else - /* We got a receive completion. */ - wc->wr_id = cqe->work_request_id; + /* we got a completion! */ + wc->wr_id = cqe->work_request_id; /* eval ib_wc_opcode */ wc->opcode = ib_wc_opcode[cqe->optype]-1; @@ -706,7 +667,7 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc) ehca_dmp(cqe, 64, "ehca_cq=%p cq_num=%x", my_cq, my_cq->cq_number); /* update also queue adder to throw away this entry!!! */ - goto repoll; + goto poll_cq_one_exit0; } /* eval ib_wc_status */ @@ -717,6 +678,11 @@ static inline int ehca_poll_cq_one(struct ib_cq *cq, struct ib_wc *wc) } else wc->status = IB_WC_SUCCESS; + read_lock(&ehca_qp_idr_lock); + my_qp = idr_find(&ehca_qp_idr, cqe->qp_token); + wc->qp = &my_qp->ib_qp; + read_unlock(&ehca_qp_idr_lock); + wc->byte_len = cqe->nr_bytes_transferred; wc->pkey_index = cqe->pkey_index; wc->slid = cqe->rlid; diff --git a/trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 341ffedafed6..7ebc400a4b3d 100644 --- a/trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/trunk/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -202,7 +202,7 @@ static void ipoib_cm_free_rx_ring(struct net_device *dev, dev_kfree_skb_any(rx_ring[i].skb); } - vfree(rx_ring); + kfree(rx_ring); } static void ipoib_cm_start_rx_drain(struct ipoib_dev_priv *priv) @@ -352,14 +352,9 @@ static int ipoib_cm_nonsrq_init_rx(struct net_device *dev, struct ib_cm_id *cm_i int ret; int i; - rx->rx_ring = vmalloc(ipoib_recvq_size * sizeof *rx->rx_ring); - if (!rx->rx_ring) { - printk(KERN_WARNING "%s: failed to allocate CM non-SRQ ring (%d entries)\n", - priv->ca->name, ipoib_recvq_size); + rx->rx_ring = kcalloc(ipoib_recvq_size, sizeof *rx->rx_ring, GFP_KERNEL); + if (!rx->rx_ring) return -ENOMEM; - } - - memset(rx->rx_ring, 0, ipoib_recvq_size * sizeof *rx->rx_ring); t = kmalloc(sizeof *t, GFP_KERNEL); if (!t) { @@ -1499,16 +1494,14 @@ static void ipoib_cm_create_srq(struct net_device *dev, int max_sge) return; } - priv->cm.srq_ring = vmalloc(ipoib_recvq_size * sizeof *priv->cm.srq_ring); + priv->cm.srq_ring = kzalloc(ipoib_recvq_size * sizeof *priv->cm.srq_ring, + GFP_KERNEL); if (!priv->cm.srq_ring) { printk(KERN_WARNING "%s: failed to allocate CM SRQ ring (%d entries)\n", priv->ca->name, ipoib_recvq_size); ib_destroy_srq(priv->cm.srq); priv->cm.srq = NULL; - return; } - - memset(priv->cm.srq_ring, 0, ipoib_recvq_size * sizeof *priv->cm.srq_ring); } int ipoib_cm_dev_init(struct net_device *dev) diff --git a/trunk/drivers/lguest/page_tables.c b/trunk/drivers/lguest/page_tables.c index 81d0c6053447..d93500f24fbb 100644 --- a/trunk/drivers/lguest/page_tables.c +++ b/trunk/drivers/lguest/page_tables.c @@ -108,8 +108,9 @@ static unsigned long gpte_addr(pgd_t gpgd, unsigned long vaddr) } /*:*/ -/*M:014 get_pfn is slow: we could probably try to grab batches of pages here as - * an optimization (ie. pre-faulting). :*/ +/*M:014 get_pfn is slow; it takes the mmap sem and calls get_user_pages. We + * could probably try to grab batches of pages here as an optimization + * (ie. pre-faulting). :*/ /*H:350 This routine takes a page number given by the Guest and converts it to * an actual, physical page number. It can fail for several reasons: the @@ -122,13 +123,19 @@ static unsigned long gpte_addr(pgd_t gpgd, unsigned long vaddr) static unsigned long get_pfn(unsigned long virtpfn, int write) { struct page *page; - - /* gup me one page at this address please! */ - if (get_user_pages_fast(virtpfn << PAGE_SHIFT, 1, write, &page) == 1) - return page_to_pfn(page); - /* This value indicates failure. */ - return -1UL; + unsigned long ret = -1UL; + + /* get_user_pages() is a complex interface: it gets the "struct + * vm_area_struct" and "struct page" assocated with a range of pages. + * It also needs the task's mmap_sem held, and is not very quick. + * It returns the number of pages it got. */ + down_read(¤t->mm->mmap_sem); + if (get_user_pages(current, current->mm, virtpfn << PAGE_SHIFT, + 1, write, 1, &page, NULL) == 1) + ret = page_to_pfn(page); + up_read(¤t->mm->mmap_sem); + return ret; } /*H:340 Converting a Guest page table entry to a shadow (ie. real) page table @@ -167,7 +174,7 @@ static pte_t gpte_to_spte(struct lg_cpu *cpu, pte_t gpte, int write) /*H:460 And to complete the chain, release_pte() looks like this: */ static void release_pte(pte_t pte) { - /* Remember that get_user_pages_fast() took a reference to the page, in + /* Remember that get_user_pages() took a reference to the page, in * get_pfn()? We have to put it back now. */ if (pte_flags(pte) & _PAGE_PRESENT) put_page(pfn_to_page(pte_pfn(pte))); diff --git a/trunk/drivers/misc/sgi-gru/grutables.h b/trunk/drivers/misc/sgi-gru/grutables.h index a78f70deeb59..4251018f70ff 100644 --- a/trunk/drivers/misc/sgi-gru/grutables.h +++ b/trunk/drivers/misc/sgi-gru/grutables.h @@ -279,7 +279,7 @@ struct gru_stats_s { #if defined CONFIG_IA64 #define VADDR_HI_BIT 64 #define GRUREGION(addr) ((addr) >> (VADDR_HI_BIT - 3) & 3) -#elif defined CONFIG_X86_64 +#elif defined __x86_64 #define VADDR_HI_BIT 48 #define GRUREGION(addr) (0) /* ZZZ could do better */ #else diff --git a/trunk/drivers/rtc/rtc-dev.c b/trunk/drivers/rtc/rtc-dev.c index 35dcc06eb3e2..856cc1af40df 100644 --- a/trunk/drivers/rtc/rtc-dev.c +++ b/trunk/drivers/rtc/rtc-dev.c @@ -13,6 +13,7 @@ #include #include +#include #include "rtc-core.h" static dev_t rtc_devt; @@ -26,8 +27,11 @@ static int rtc_dev_open(struct inode *inode, struct file *file) struct rtc_device, char_dev); const struct rtc_class_ops *ops = rtc->ops; - if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) - return -EBUSY; + lock_kernel(); + if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags)) { + err = -EBUSY; + goto out; + } file->private_data = rtc; @@ -37,11 +41,13 @@ static int rtc_dev_open(struct inode *inode, struct file *file) rtc->irq_data = 0; spin_unlock_irq(&rtc->irq_lock); - return 0; + goto out; } /* something has gone wrong */ clear_bit_unlock(RTC_DEV_BUSY, &rtc->flags); +out: + unlock_kernel(); return err; } diff --git a/trunk/drivers/rtc/rtc-isl1208.c b/trunk/drivers/rtc/rtc-isl1208.c index a81adab6e515..fbb90b1e4098 100644 --- a/trunk/drivers/rtc/rtc-isl1208.c +++ b/trunk/drivers/rtc/rtc-isl1208.c @@ -482,7 +482,7 @@ isl1208_sysfs_register(struct device *dev) static int isl1208_sysfs_unregister(struct device *dev) { - device_remove_file(dev, &dev_attr_dtrim); + device_remove_file(dev, &dev_attr_atrim); device_remove_file(dev, &dev_attr_atrim); device_remove_file(dev, &dev_attr_usr); diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_alua.c b/trunk/drivers/scsi/device_handler/scsi_dh_alua.c index 994da56fffed..fcdd73f25625 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_alua.c @@ -680,7 +680,7 @@ static int alua_prep_fn(struct scsi_device *sdev, struct request *req) } -static const struct scsi_dh_devlist alua_dev_list[] = { +const struct scsi_dh_devlist alua_dev_list[] = { {"HP", "MSA VOLUME" }, {"HP", "HSV101" }, {"HP", "HSV111" }, diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_emc.c b/trunk/drivers/scsi/device_handler/scsi_dh_emc.c index b9d23e9e9a44..aa46b131b20e 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_emc.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_emc.c @@ -562,7 +562,7 @@ static int clariion_activate(struct scsi_device *sdev) return result; } -static const struct scsi_dh_devlist clariion_dev_list[] = { +const struct scsi_dh_devlist clariion_dev_list[] = { {"DGC", "RAID"}, {"DGC", "DISK"}, {"DGC", "VRAID"}, diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c index a6a4ef3ad51c..9c7a1f8ebb72 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_hp_sw.c @@ -282,7 +282,7 @@ static int hp_sw_activate(struct scsi_device *sdev) return ret; } -static const struct scsi_dh_devlist hp_sw_dh_data_list[] = { +const struct scsi_dh_devlist hp_sw_dh_data_list[] = { {"COMPAQ", "MSA1000 VOLUME"}, {"COMPAQ", "HSV110"}, {"HP", "HSV100"}, diff --git a/trunk/drivers/scsi/device_handler/scsi_dh_rdac.c b/trunk/drivers/scsi/device_handler/scsi_dh_rdac.c index e7c7b4ebc1fe..b093a501f8ae 100644 --- a/trunk/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/trunk/drivers/scsi/device_handler/scsi_dh_rdac.c @@ -574,7 +574,7 @@ static int rdac_check_sense(struct scsi_device *sdev, return SCSI_RETURN_NOT_HANDLED; } -static const struct scsi_dh_devlist rdac_dev_list[] = { +const struct scsi_dh_devlist rdac_dev_list[] = { {"IBM", "1722"}, {"IBM", "1724"}, {"IBM", "1726"}, diff --git a/trunk/drivers/usb/misc/isight_firmware.c b/trunk/drivers/usb/misc/isight_firmware.c index b897f6554ecd..d94aa7387608 100644 --- a/trunk/drivers/usb/misc/isight_firmware.c +++ b/trunk/drivers/usb/misc/isight_firmware.c @@ -48,8 +48,7 @@ static int isight_firmware_load(struct usb_interface *intf, if (request_firmware(&firmware, "isight.fw", &dev->dev) != 0) { printk(KERN_ERR "Unable to load isight firmware\n"); - ret = -ENODEV; - goto out; + return -ENODEV; } ptr = firmware->data; @@ -92,6 +91,7 @@ static int isight_firmware_load(struct usb_interface *intf, buf, llen, 300) != llen) { printk(KERN_ERR "Failed to load isight firmware\n"); + kfree(buf); ret = -ENODEV; goto out; } diff --git a/trunk/drivers/video/atmel_lcdfb.c b/trunk/drivers/video/atmel_lcdfb.c index 9c5925927ece..e7018a2f56af 100644 --- a/trunk/drivers/video/atmel_lcdfb.c +++ b/trunk/drivers/video/atmel_lcdfb.c @@ -39,9 +39,7 @@ #endif #if defined(CONFIG_ARCH_AT91) -#define ATMEL_LCDFB_FBINFO_DEFAULT (FBINFO_DEFAULT \ - | FBINFO_PARTIAL_PAN_OK \ - | FBINFO_HWACCEL_YPAN) +#define ATMEL_LCDFB_FBINFO_DEFAULT FBINFO_DEFAULT static inline void atmel_lcdfb_update_dma2d(struct atmel_lcdfb_info *sinfo, struct fb_var_screeninfo *var) @@ -179,7 +177,7 @@ static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = { .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_TRUECOLOR, .xpanstep = 0, - .ypanstep = 1, + .ypanstep = 0, .ywrapstep = 0, .accel = FB_ACCEL_NONE, }; @@ -242,11 +240,9 @@ static int atmel_lcdfb_alloc_video_memory(struct atmel_lcdfb_info *sinfo) { struct fb_info *info = sinfo->info; struct fb_var_screeninfo *var = &info->var; - unsigned int smem_len; - smem_len = (var->xres_virtual * var->yres_virtual - * ((var->bits_per_pixel + 7) / 8)); - info->fix.smem_len = max(smem_len, sinfo->smem_len); + info->fix.smem_len = (var->xres_virtual * var->yres_virtual + * ((var->bits_per_pixel + 7) / 8)); info->screen_base = dma_alloc_writecombine(info->device, info->fix.smem_len, (dma_addr_t *)&info->fix.smem_start, GFP_KERNEL); @@ -798,7 +794,6 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) sinfo->default_monspecs = pdata_sinfo->default_monspecs; sinfo->atmel_lcdfb_power_control = pdata_sinfo->atmel_lcdfb_power_control; sinfo->guard_time = pdata_sinfo->guard_time; - sinfo->smem_len = pdata_sinfo->smem_len; sinfo->lcdcon_is_backlight = pdata_sinfo->lcdcon_is_backlight; sinfo->lcd_wiring_mode = pdata_sinfo->lcd_wiring_mode; } else { diff --git a/trunk/drivers/video/aty/radeon_accel.c b/trunk/drivers/video/aty/radeon_accel.c index aa95f8350242..4d13f68436e6 100644 --- a/trunk/drivers/video/aty/radeon_accel.c +++ b/trunk/drivers/video/aty/radeon_accel.c @@ -55,10 +55,6 @@ static void radeonfb_prim_fillrect(struct radeonfb_info *rinfo, OUTREG(DP_WRITE_MSK, 0xffffffff); OUTREG(DP_CNTL, (DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM)); - radeon_fifo_wait(2); - OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); - OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); - radeon_fifo_wait(2); OUTREG(DST_Y_X, (region->dy << 16) | region->dx); OUTREG(DST_WIDTH_HEIGHT, (region->width << 16) | region->height); @@ -120,10 +116,6 @@ static void radeonfb_prim_copyarea(struct radeonfb_info *rinfo, OUTREG(DP_CNTL, (xdir>=0 ? DST_X_LEFT_TO_RIGHT : 0) | (ydir>=0 ? DST_Y_TOP_TO_BOTTOM : 0)); - radeon_fifo_wait(2); - OUTREG(DSTCACHE_CTLSTAT, RB2D_DC_FLUSH_ALL); - OUTREG(WAIT_UNTIL, (WAIT_2D_IDLECLEAN | WAIT_DMA_GUI_IDLE)); - radeon_fifo_wait(3); OUTREG(SRC_Y_X, (sy << 16) | sx); OUTREG(DST_Y_X, (dy << 16) | dx); diff --git a/trunk/drivers/video/console/fbcon.c b/trunk/drivers/video/console/fbcon.c index c6299e8a041d..33859934a8e4 100644 --- a/trunk/drivers/video/console/fbcon.c +++ b/trunk/drivers/video/console/fbcon.c @@ -2518,7 +2518,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, c = vc->vc_video_erase_char; vc->vc_video_erase_char = ((c & 0xfe00) >> 1) | (c & 0xff); - c = vc->vc_scrl_erase_char; + c = vc->vc_def_color; vc->vc_scrl_erase_char = ((c & 0xFE00) >> 1) | (c & 0xFF); vc->vc_attr >>= 1; @@ -2551,7 +2551,7 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h, if (vc->vc_can_do_color) { vc->vc_video_erase_char = ((c & 0xff00) << 1) | (c & 0xff); - c = vc->vc_scrl_erase_char; + c = vc->vc_def_color; vc->vc_scrl_erase_char = ((c & 0xFF00) << 1) | (c & 0xFF); vc->vc_attr <<= 1; diff --git a/trunk/drivers/video/matrox/i2c-matroxfb.c b/trunk/drivers/video/matrox/i2c-matroxfb.c index c14e3e2212b3..75ee5a12e549 100644 --- a/trunk/drivers/video/matrox/i2c-matroxfb.c +++ b/trunk/drivers/video/matrox/i2c-matroxfb.c @@ -87,7 +87,13 @@ static int matroxfb_gpio_getscl(void* data) { return (matroxfb_read_gpio(b->minfo) & b->mask.clock) ? 1 : 0; } -static const struct i2c_algo_bit_data matrox_i2c_algo_template = +static struct i2c_adapter matrox_i2c_adapter_template = +{ + .owner = THIS_MODULE, + .id = I2C_HW_B_G400, +}; + +static struct i2c_algo_bit_data matrox_i2c_algo_template = { .setsda = matroxfb_gpio_setsda, .setscl = matroxfb_gpio_setscl, @@ -106,7 +112,7 @@ static int i2c_bus_reg(struct i2c_bit_adapter* b, struct matrox_fb_info* minfo, b->minfo = minfo; b->mask.data = data; b->mask.clock = clock; - b->adapter.owner = THIS_MODULE; + b->adapter = matrox_i2c_adapter_template; snprintf(b->adapter.name, sizeof(b->adapter.name), name, minfo->fbcon.node); i2c_set_adapdata(&b->adapter, b); @@ -181,17 +187,6 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) { MAT_DATA, MAT_CLK, "MAVEN:fb%u", 0); if (err) printk(KERN_INFO "i2c-matroxfb: Could not register Maven i2c bus. Continuing anyway.\n"); - else { - struct i2c_board_info maven_info = { - I2C_BOARD_INFO("maven", 0x1b), - }; - unsigned short const addr_list[2] = { - 0x1b, I2C_CLIENT_END - }; - - i2c_new_probed_device(&m2info->maven.adapter, - &maven_info, addr_list); - } } return m2info; fail_ddc1:; diff --git a/trunk/drivers/video/matrox/matroxfb_maven.c b/trunk/drivers/video/matrox/matroxfb_maven.c index 042408a8c631..89da27bd5c49 100644 --- a/trunk/drivers/video/matrox/matroxfb_maven.c +++ b/trunk/drivers/video/matrox/matroxfb_maven.c @@ -19,6 +19,8 @@ #include #include +#define MAVEN_I2CID (0x1B) + #define MGATVO_B 1 #define MGATVO_C 2 @@ -126,7 +128,7 @@ static int get_ctrl_id(__u32 v4l2_id) { struct maven_data { struct matrox_fb_info* primary_head; - struct i2c_client *client; + struct i2c_client client; int version; }; @@ -972,7 +974,7 @@ static inline int maven_compute_timming(struct maven_data* md, static int maven_program_timming(struct maven_data* md, const struct mavenregs* m) { - struct i2c_client *c = md->client; + struct i2c_client* c = &md->client; if (m->mode == MATROXFB_OUTPUT_MODE_MONITOR) { LR(0x80); @@ -1009,7 +1011,7 @@ static int maven_program_timming(struct maven_data* md, } static inline int maven_resync(struct maven_data* md) { - struct i2c_client *c = md->client; + struct i2c_client* c = &md->client; maven_set_reg(c, 0x95, 0x20); /* start whole thing */ return 0; } @@ -1067,48 +1069,48 @@ static int maven_set_control (struct maven_data* md, maven_compute_bwlevel(md, &blacklevel, &whitelevel); blacklevel = (blacklevel >> 2) | ((blacklevel & 3) << 8); whitelevel = (whitelevel >> 2) | ((whitelevel & 3) << 8); - maven_set_reg_pair(md->client, 0x0e, blacklevel); - maven_set_reg_pair(md->client, 0x1e, whitelevel); + maven_set_reg_pair(&md->client, 0x0e, blacklevel); + maven_set_reg_pair(&md->client, 0x1e, whitelevel); } break; case V4L2_CID_SATURATION: { - maven_set_reg(md->client, 0x20, p->value); - maven_set_reg(md->client, 0x22, p->value); + maven_set_reg(&md->client, 0x20, p->value); + maven_set_reg(&md->client, 0x22, p->value); } break; case V4L2_CID_HUE: { - maven_set_reg(md->client, 0x25, p->value); + maven_set_reg(&md->client, 0x25, p->value); } break; case V4L2_CID_GAMMA: { const struct maven_gamma* g; g = maven_compute_gamma(md); - maven_set_reg(md->client, 0x83, g->reg83); - maven_set_reg(md->client, 0x84, g->reg84); - maven_set_reg(md->client, 0x85, g->reg85); - maven_set_reg(md->client, 0x86, g->reg86); - maven_set_reg(md->client, 0x87, g->reg87); - maven_set_reg(md->client, 0x88, g->reg88); - maven_set_reg(md->client, 0x89, g->reg89); - maven_set_reg(md->client, 0x8a, g->reg8a); - maven_set_reg(md->client, 0x8b, g->reg8b); + maven_set_reg(&md->client, 0x83, g->reg83); + maven_set_reg(&md->client, 0x84, g->reg84); + maven_set_reg(&md->client, 0x85, g->reg85); + maven_set_reg(&md->client, 0x86, g->reg86); + maven_set_reg(&md->client, 0x87, g->reg87); + maven_set_reg(&md->client, 0x88, g->reg88); + maven_set_reg(&md->client, 0x89, g->reg89); + maven_set_reg(&md->client, 0x8a, g->reg8a); + maven_set_reg(&md->client, 0x8b, g->reg8b); } break; case MATROXFB_CID_TESTOUT: { unsigned char val - = maven_get_reg(md->client, 0x8d); + = maven_get_reg(&md->client,0x8d); if (p->value) val |= 0x10; else val &= ~0x10; - maven_set_reg(md->client, 0x8d, val); + maven_set_reg(&md->client, 0x8d, val); } break; case MATROXFB_CID_DEFLICKER: { - maven_set_reg(md->client, 0x93, maven_compute_deflicker(md)); + maven_set_reg(&md->client, 0x93, maven_compute_deflicker(md)); } break; } @@ -1187,7 +1189,6 @@ static int maven_init_client(struct i2c_client* clnt) { MINFO_FROM(container_of(clnt->adapter, struct i2c_bit_adapter, adapter)->minfo); md->primary_head = MINFO; - md->client = clnt; down_write(&ACCESS_FBINFO(altout.lock)); ACCESS_FBINFO(outputs[1]).output = &maven_altout; ACCESS_FBINFO(outputs[1]).src = ACCESS_FBINFO(outputs[1]).default_src; @@ -1231,11 +1232,14 @@ static int maven_shutdown_client(struct i2c_client* clnt) { return 0; } -static int maven_probe(struct i2c_client *client, - const struct i2c_device_id *id) -{ - struct i2c_adapter *adapter = client->adapter; - int err = -ENODEV; +static const unsigned short normal_i2c[] = { MAVEN_I2CID, I2C_CLIENT_END }; +I2C_CLIENT_INSMOD; + +static struct i2c_driver maven_driver; + +static int maven_detect_client(struct i2c_adapter* adapter, int address, int kind) { + int err = 0; + struct i2c_client* new_client; struct maven_data* data; if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WRITE_WORD_DATA | @@ -1246,37 +1250,50 @@ static int maven_probe(struct i2c_client *client, err = -ENOMEM; goto ERROR0; } - i2c_set_clientdata(client, data); - err = maven_init_client(client); + new_client = &data->client; + i2c_set_clientdata(new_client, data); + new_client->addr = address; + new_client->adapter = adapter; + new_client->driver = &maven_driver; + new_client->flags = 0; + strlcpy(new_client->name, "maven", I2C_NAME_SIZE); + if ((err = i2c_attach_client(new_client))) + goto ERROR3; + err = maven_init_client(new_client); if (err) goto ERROR4; return 0; ERROR4:; - kfree(data); + i2c_detach_client(new_client); +ERROR3:; + kfree(new_client); ERROR0:; return err; } -static int maven_remove(struct i2c_client *client) -{ +static int maven_attach_adapter(struct i2c_adapter* adapter) { + if (adapter->id == I2C_HW_B_G400) + return i2c_probe(adapter, &addr_data, &maven_detect_client); + return 0; +} + +static int maven_detach_client(struct i2c_client* client) { + int err; + + if ((err = i2c_detach_client(client))) + return err; maven_shutdown_client(client); kfree(i2c_get_clientdata(client)); return 0; } -static const struct i2c_device_id maven_id[] = { - { "maven", 0 }, - { } -}; -MODULE_DEVICE_TABLE(i2c, maven_id); - static struct i2c_driver maven_driver={ .driver = { .name = "maven", }, - .probe = maven_probe, - .remove = maven_remove, - .id_table = maven_id, + .id = I2C_DRIVERID_MGATVO, + .attach_adapter = maven_attach_adapter, + .detach_client = maven_detach_client, }; static int __init matroxfb_maven_init(void) diff --git a/trunk/drivers/watchdog/Kconfig b/trunk/drivers/watchdog/Kconfig index db20542796bf..32b9fe153641 100644 --- a/trunk/drivers/watchdog/Kconfig +++ b/trunk/drivers/watchdog/Kconfig @@ -285,11 +285,10 @@ config ALIM1535_WDT config ALIM7101_WDT tristate "ALi M7101 PMU Computer Watchdog" - depends on PCI + depends on X86 && PCI help This is the driver for the hardware watchdog on the ALi M7101 PMU - as used in the x86 Cobalt servers and also found in some - SPARC Netra servers too. + as used in the x86 Cobalt servers. To compile this driver as a module, choose M here: the module will be called alim7101_wdt. diff --git a/trunk/fs/dlm/config.c b/trunk/fs/dlm/config.c index 89d2fb7b991a..c4e7d721bd8d 100644 --- a/trunk/fs/dlm/config.c +++ b/trunk/fs/dlm/config.c @@ -2,7 +2,7 @@ ******************************************************************************* ** ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. -** Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. +** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. ** ** This copyrighted material is made available to anyone wishing to use, ** modify, copy, or redistribute it subject to the terms and conditions @@ -30,16 +30,16 @@ static struct config_group *space_list; static struct config_group *comm_list; -static struct dlm_comm *local_comm; +static struct comm *local_comm; -struct dlm_clusters; -struct dlm_cluster; -struct dlm_spaces; -struct dlm_space; -struct dlm_comms; -struct dlm_comm; -struct dlm_nodes; -struct dlm_node; +struct clusters; +struct cluster; +struct spaces; +struct space; +struct comms; +struct comm; +struct nodes; +struct node; static struct config_group *make_cluster(struct config_group *, const char *); static void drop_cluster(struct config_group *, struct config_item *); @@ -68,22 +68,17 @@ static ssize_t show_node(struct config_item *i, struct configfs_attribute *a, static ssize_t store_node(struct config_item *i, struct configfs_attribute *a, const char *buf, size_t len); -static ssize_t comm_nodeid_read(struct dlm_comm *cm, char *buf); -static ssize_t comm_nodeid_write(struct dlm_comm *cm, const char *buf, - size_t len); -static ssize_t comm_local_read(struct dlm_comm *cm, char *buf); -static ssize_t comm_local_write(struct dlm_comm *cm, const char *buf, - size_t len); -static ssize_t comm_addr_write(struct dlm_comm *cm, const char *buf, - size_t len); -static ssize_t node_nodeid_read(struct dlm_node *nd, char *buf); -static ssize_t node_nodeid_write(struct dlm_node *nd, const char *buf, - size_t len); -static ssize_t node_weight_read(struct dlm_node *nd, char *buf); -static ssize_t node_weight_write(struct dlm_node *nd, const char *buf, - size_t len); - -struct dlm_cluster { +static ssize_t comm_nodeid_read(struct comm *cm, char *buf); +static ssize_t comm_nodeid_write(struct comm *cm, const char *buf, size_t len); +static ssize_t comm_local_read(struct comm *cm, char *buf); +static ssize_t comm_local_write(struct comm *cm, const char *buf, size_t len); +static ssize_t comm_addr_write(struct comm *cm, const char *buf, size_t len); +static ssize_t node_nodeid_read(struct node *nd, char *buf); +static ssize_t node_nodeid_write(struct node *nd, const char *buf, size_t len); +static ssize_t node_weight_read(struct node *nd, char *buf); +static ssize_t node_weight_write(struct node *nd, const char *buf, size_t len); + +struct cluster { struct config_group group; unsigned int cl_tcp_port; unsigned int cl_buffer_size; @@ -114,11 +109,11 @@ enum { struct cluster_attribute { struct configfs_attribute attr; - ssize_t (*show)(struct dlm_cluster *, char *); - ssize_t (*store)(struct dlm_cluster *, const char *, size_t); + ssize_t (*show)(struct cluster *, char *); + ssize_t (*store)(struct cluster *, const char *, size_t); }; -static ssize_t cluster_set(struct dlm_cluster *cl, unsigned int *cl_field, +static ssize_t cluster_set(struct cluster *cl, unsigned int *cl_field, int *info_field, int check_zero, const char *buf, size_t len) { @@ -139,12 +134,12 @@ static ssize_t cluster_set(struct dlm_cluster *cl, unsigned int *cl_field, } #define CLUSTER_ATTR(name, check_zero) \ -static ssize_t name##_write(struct dlm_cluster *cl, const char *buf, size_t len) \ +static ssize_t name##_write(struct cluster *cl, const char *buf, size_t len) \ { \ return cluster_set(cl, &cl->cl_##name, &dlm_config.ci_##name, \ check_zero, buf, len); \ } \ -static ssize_t name##_read(struct dlm_cluster *cl, char *buf) \ +static ssize_t name##_read(struct cluster *cl, char *buf) \ { \ return snprintf(buf, PAGE_SIZE, "%u\n", cl->cl_##name); \ } \ @@ -186,8 +181,8 @@ enum { struct comm_attribute { struct configfs_attribute attr; - ssize_t (*show)(struct dlm_comm *, char *); - ssize_t (*store)(struct dlm_comm *, const char *, size_t); + ssize_t (*show)(struct comm *, char *); + ssize_t (*store)(struct comm *, const char *, size_t); }; static struct comm_attribute comm_attr_nodeid = { @@ -227,8 +222,8 @@ enum { struct node_attribute { struct configfs_attribute attr; - ssize_t (*show)(struct dlm_node *, char *); - ssize_t (*store)(struct dlm_node *, const char *, size_t); + ssize_t (*show)(struct node *, char *); + ssize_t (*store)(struct node *, const char *, size_t); }; static struct node_attribute node_attr_nodeid = { @@ -253,26 +248,26 @@ static struct configfs_attribute *node_attrs[] = { NULL, }; -struct dlm_clusters { +struct clusters { struct configfs_subsystem subsys; }; -struct dlm_spaces { +struct spaces { struct config_group ss_group; }; -struct dlm_space { +struct space { struct config_group group; struct list_head members; struct mutex members_lock; int members_count; }; -struct dlm_comms { +struct comms { struct config_group cs_group; }; -struct dlm_comm { +struct comm { struct config_item item; int nodeid; int local; @@ -280,11 +275,11 @@ struct dlm_comm { struct sockaddr_storage *addr[DLM_MAX_ADDR_COUNT]; }; -struct dlm_nodes { +struct nodes { struct config_group ns_group; }; -struct dlm_node { +struct node { struct config_item item; struct list_head list; /* space->members */ int nodeid; @@ -377,40 +372,38 @@ static struct config_item_type node_type = { .ct_owner = THIS_MODULE, }; -static struct dlm_cluster *to_cluster(struct config_item *i) +static struct cluster *to_cluster(struct config_item *i) { - return i ? container_of(to_config_group(i), struct dlm_cluster, group) : - NULL; + return i ? container_of(to_config_group(i), struct cluster, group):NULL; } -static struct dlm_space *to_space(struct config_item *i) +static struct space *to_space(struct config_item *i) { - return i ? container_of(to_config_group(i), struct dlm_space, group) : - NULL; + return i ? container_of(to_config_group(i), struct space, group) : NULL; } -static struct dlm_comm *to_comm(struct config_item *i) +static struct comm *to_comm(struct config_item *i) { - return i ? container_of(i, struct dlm_comm, item) : NULL; + return i ? container_of(i, struct comm, item) : NULL; } -static struct dlm_node *to_node(struct config_item *i) +static struct node *to_node(struct config_item *i) { - return i ? container_of(i, struct dlm_node, item) : NULL; + return i ? container_of(i, struct node, item) : NULL; } static struct config_group *make_cluster(struct config_group *g, const char *name) { - struct dlm_cluster *cl = NULL; - struct dlm_spaces *sps = NULL; - struct dlm_comms *cms = NULL; + struct cluster *cl = NULL; + struct spaces *sps = NULL; + struct comms *cms = NULL; void *gps = NULL; - cl = kzalloc(sizeof(struct dlm_cluster), GFP_KERNEL); + cl = kzalloc(sizeof(struct cluster), GFP_KERNEL); gps = kcalloc(3, sizeof(struct config_group *), GFP_KERNEL); - sps = kzalloc(sizeof(struct dlm_spaces), GFP_KERNEL); - cms = kzalloc(sizeof(struct dlm_comms), GFP_KERNEL); + sps = kzalloc(sizeof(struct spaces), GFP_KERNEL); + cms = kzalloc(sizeof(struct comms), GFP_KERNEL); if (!cl || !gps || !sps || !cms) goto fail; @@ -450,7 +443,7 @@ static struct config_group *make_cluster(struct config_group *g, static void drop_cluster(struct config_group *g, struct config_item *i) { - struct dlm_cluster *cl = to_cluster(i); + struct cluster *cl = to_cluster(i); struct config_item *tmp; int j; @@ -468,20 +461,20 @@ static void drop_cluster(struct config_group *g, struct config_item *i) static void release_cluster(struct config_item *i) { - struct dlm_cluster *cl = to_cluster(i); + struct cluster *cl = to_cluster(i); kfree(cl->group.default_groups); kfree(cl); } static struct config_group *make_space(struct config_group *g, const char *name) { - struct dlm_space *sp = NULL; - struct dlm_nodes *nds = NULL; + struct space *sp = NULL; + struct nodes *nds = NULL; void *gps = NULL; - sp = kzalloc(sizeof(struct dlm_space), GFP_KERNEL); + sp = kzalloc(sizeof(struct space), GFP_KERNEL); gps = kcalloc(2, sizeof(struct config_group *), GFP_KERNEL); - nds = kzalloc(sizeof(struct dlm_nodes), GFP_KERNEL); + nds = kzalloc(sizeof(struct nodes), GFP_KERNEL); if (!sp || !gps || !nds) goto fail; @@ -507,7 +500,7 @@ static struct config_group *make_space(struct config_group *g, const char *name) static void drop_space(struct config_group *g, struct config_item *i) { - struct dlm_space *sp = to_space(i); + struct space *sp = to_space(i); struct config_item *tmp; int j; @@ -524,16 +517,16 @@ static void drop_space(struct config_group *g, struct config_item *i) static void release_space(struct config_item *i) { - struct dlm_space *sp = to_space(i); + struct space *sp = to_space(i); kfree(sp->group.default_groups); kfree(sp); } static struct config_item *make_comm(struct config_group *g, const char *name) { - struct dlm_comm *cm; + struct comm *cm; - cm = kzalloc(sizeof(struct dlm_comm), GFP_KERNEL); + cm = kzalloc(sizeof(struct comm), GFP_KERNEL); if (!cm) return ERR_PTR(-ENOMEM); @@ -546,7 +539,7 @@ static struct config_item *make_comm(struct config_group *g, const char *name) static void drop_comm(struct config_group *g, struct config_item *i) { - struct dlm_comm *cm = to_comm(i); + struct comm *cm = to_comm(i); if (local_comm == cm) local_comm = NULL; dlm_lowcomms_close(cm->nodeid); @@ -557,16 +550,16 @@ static void drop_comm(struct config_group *g, struct config_item *i) static void release_comm(struct config_item *i) { - struct dlm_comm *cm = to_comm(i); + struct comm *cm = to_comm(i); kfree(cm); } static struct config_item *make_node(struct config_group *g, const char *name) { - struct dlm_space *sp = to_space(g->cg_item.ci_parent); - struct dlm_node *nd; + struct space *sp = to_space(g->cg_item.ci_parent); + struct node *nd; - nd = kzalloc(sizeof(struct dlm_node), GFP_KERNEL); + nd = kzalloc(sizeof(struct node), GFP_KERNEL); if (!nd) return ERR_PTR(-ENOMEM); @@ -585,8 +578,8 @@ static struct config_item *make_node(struct config_group *g, const char *name) static void drop_node(struct config_group *g, struct config_item *i) { - struct dlm_space *sp = to_space(g->cg_item.ci_parent); - struct dlm_node *nd = to_node(i); + struct space *sp = to_space(g->cg_item.ci_parent); + struct node *nd = to_node(i); mutex_lock(&sp->members_lock); list_del(&nd->list); @@ -598,11 +591,11 @@ static void drop_node(struct config_group *g, struct config_item *i) static void release_node(struct config_item *i) { - struct dlm_node *nd = to_node(i); + struct node *nd = to_node(i); kfree(nd); } -static struct dlm_clusters clusters_root = { +static struct clusters clusters_root = { .subsys = { .su_group = { .cg_item = { @@ -632,7 +625,7 @@ void dlm_config_exit(void) static ssize_t show_cluster(struct config_item *i, struct configfs_attribute *a, char *buf) { - struct dlm_cluster *cl = to_cluster(i); + struct cluster *cl = to_cluster(i); struct cluster_attribute *cla = container_of(a, struct cluster_attribute, attr); return cla->show ? cla->show(cl, buf) : 0; @@ -642,7 +635,7 @@ static ssize_t store_cluster(struct config_item *i, struct configfs_attribute *a, const char *buf, size_t len) { - struct dlm_cluster *cl = to_cluster(i); + struct cluster *cl = to_cluster(i); struct cluster_attribute *cla = container_of(a, struct cluster_attribute, attr); return cla->store ? cla->store(cl, buf, len) : -EINVAL; @@ -651,7 +644,7 @@ static ssize_t store_cluster(struct config_item *i, static ssize_t show_comm(struct config_item *i, struct configfs_attribute *a, char *buf) { - struct dlm_comm *cm = to_comm(i); + struct comm *cm = to_comm(i); struct comm_attribute *cma = container_of(a, struct comm_attribute, attr); return cma->show ? cma->show(cm, buf) : 0; @@ -660,31 +653,29 @@ static ssize_t show_comm(struct config_item *i, struct configfs_attribute *a, static ssize_t store_comm(struct config_item *i, struct configfs_attribute *a, const char *buf, size_t len) { - struct dlm_comm *cm = to_comm(i); + struct comm *cm = to_comm(i); struct comm_attribute *cma = container_of(a, struct comm_attribute, attr); return cma->store ? cma->store(cm, buf, len) : -EINVAL; } -static ssize_t comm_nodeid_read(struct dlm_comm *cm, char *buf) +static ssize_t comm_nodeid_read(struct comm *cm, char *buf) { return sprintf(buf, "%d\n", cm->nodeid); } -static ssize_t comm_nodeid_write(struct dlm_comm *cm, const char *buf, - size_t len) +static ssize_t comm_nodeid_write(struct comm *cm, const char *buf, size_t len) { cm->nodeid = simple_strtol(buf, NULL, 0); return len; } -static ssize_t comm_local_read(struct dlm_comm *cm, char *buf) +static ssize_t comm_local_read(struct comm *cm, char *buf) { return sprintf(buf, "%d\n", cm->local); } -static ssize_t comm_local_write(struct dlm_comm *cm, const char *buf, - size_t len) +static ssize_t comm_local_write(struct comm *cm, const char *buf, size_t len) { cm->local= simple_strtol(buf, NULL, 0); if (cm->local && !local_comm) @@ -692,7 +683,7 @@ static ssize_t comm_local_write(struct dlm_comm *cm, const char *buf, return len; } -static ssize_t comm_addr_write(struct dlm_comm *cm, const char *buf, size_t len) +static ssize_t comm_addr_write(struct comm *cm, const char *buf, size_t len) { struct sockaddr_storage *addr; @@ -714,7 +705,7 @@ static ssize_t comm_addr_write(struct dlm_comm *cm, const char *buf, size_t len) static ssize_t show_node(struct config_item *i, struct configfs_attribute *a, char *buf) { - struct dlm_node *nd = to_node(i); + struct node *nd = to_node(i); struct node_attribute *nda = container_of(a, struct node_attribute, attr); return nda->show ? nda->show(nd, buf) : 0; @@ -723,31 +714,29 @@ static ssize_t show_node(struct config_item *i, struct configfs_attribute *a, static ssize_t store_node(struct config_item *i, struct configfs_attribute *a, const char *buf, size_t len) { - struct dlm_node *nd = to_node(i); + struct node *nd = to_node(i); struct node_attribute *nda = container_of(a, struct node_attribute, attr); return nda->store ? nda->store(nd, buf, len) : -EINVAL; } -static ssize_t node_nodeid_read(struct dlm_node *nd, char *buf) +static ssize_t node_nodeid_read(struct node *nd, char *buf) { return sprintf(buf, "%d\n", nd->nodeid); } -static ssize_t node_nodeid_write(struct dlm_node *nd, const char *buf, - size_t len) +static ssize_t node_nodeid_write(struct node *nd, const char *buf, size_t len) { nd->nodeid = simple_strtol(buf, NULL, 0); return len; } -static ssize_t node_weight_read(struct dlm_node *nd, char *buf) +static ssize_t node_weight_read(struct node *nd, char *buf) { return sprintf(buf, "%d\n", nd->weight); } -static ssize_t node_weight_write(struct dlm_node *nd, const char *buf, - size_t len) +static ssize_t node_weight_write(struct node *nd, const char *buf, size_t len) { nd->weight = simple_strtol(buf, NULL, 0); return len; @@ -757,7 +746,7 @@ static ssize_t node_weight_write(struct dlm_node *nd, const char *buf, * Functions for the dlm to get the info that's been configured */ -static struct dlm_space *get_space(char *name) +static struct space *get_space(char *name) { struct config_item *i; @@ -771,15 +760,15 @@ static struct dlm_space *get_space(char *name) return to_space(i); } -static void put_space(struct dlm_space *sp) +static void put_space(struct space *sp) { config_item_put(&sp->group.cg_item); } -static struct dlm_comm *get_comm(int nodeid, struct sockaddr_storage *addr) +static struct comm *get_comm(int nodeid, struct sockaddr_storage *addr) { struct config_item *i; - struct dlm_comm *cm = NULL; + struct comm *cm = NULL; int found = 0; if (!comm_list) @@ -812,7 +801,7 @@ static struct dlm_comm *get_comm(int nodeid, struct sockaddr_storage *addr) return cm; } -static void put_comm(struct dlm_comm *cm) +static void put_comm(struct comm *cm) { config_item_put(&cm->item); } @@ -821,8 +810,8 @@ static void put_comm(struct dlm_comm *cm) int dlm_nodeid_list(char *lsname, int **ids_out, int *ids_count_out, int **new_out, int *new_count_out) { - struct dlm_space *sp; - struct dlm_node *nd; + struct space *sp; + struct node *nd; int i = 0, rv = 0, ids_count = 0, new_count = 0; int *ids, *new; @@ -885,8 +874,8 @@ int dlm_nodeid_list(char *lsname, int **ids_out, int *ids_count_out, int dlm_node_weight(char *lsname, int nodeid) { - struct dlm_space *sp; - struct dlm_node *nd; + struct space *sp; + struct node *nd; int w = -EEXIST; sp = get_space(lsname); @@ -908,7 +897,7 @@ int dlm_node_weight(char *lsname, int nodeid) int dlm_nodeid_to_addr(int nodeid, struct sockaddr_storage *addr) { - struct dlm_comm *cm = get_comm(nodeid, NULL); + struct comm *cm = get_comm(nodeid, NULL); if (!cm) return -EEXIST; if (!cm->addr_count) @@ -920,7 +909,7 @@ int dlm_nodeid_to_addr(int nodeid, struct sockaddr_storage *addr) int dlm_addr_to_nodeid(struct sockaddr_storage *addr, int *nodeid) { - struct dlm_comm *cm = get_comm(0, addr); + struct comm *cm = get_comm(0, addr); if (!cm) return -EEXIST; *nodeid = cm->nodeid; diff --git a/trunk/fs/dlm/user.c b/trunk/fs/dlm/user.c index 34f14a14fb4e..929e48ae7591 100644 --- a/trunk/fs/dlm/user.c +++ b/trunk/fs/dlm/user.c @@ -527,10 +527,8 @@ static ssize_t device_write(struct file *file, const char __user *buf, k32buf = (struct dlm_write_request32 *)kbuf; kbuf = kmalloc(count + 1 + (sizeof(struct dlm_write_request) - sizeof(struct dlm_write_request32)), GFP_KERNEL); - if (!kbuf) { - kfree(k32buf); + if (!kbuf) return -ENOMEM; - } if (proc) set_bit(DLM_PROC_FLAGS_COMPAT, &proc->flags); @@ -541,10 +539,8 @@ static ssize_t device_write(struct file *file, const char __user *buf, /* do we really need this? can a write happen after a close? */ if ((kbuf->cmd == DLM_USER_LOCK || kbuf->cmd == DLM_USER_UNLOCK) && - (proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) { - error = -EINVAL; - goto out_free; - } + (proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) + return -EINVAL; sigfillset(&allsigs); sigprocmask(SIG_BLOCK, &allsigs, &tmpsig); diff --git a/trunk/fs/eventpoll.c b/trunk/fs/eventpoll.c index 7cc0eb756b55..0c87474f7917 100644 --- a/trunk/fs/eventpoll.c +++ b/trunk/fs/eventpoll.c @@ -1041,7 +1041,10 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events, } /* - * Open an eventpoll file descriptor. + * It opens an eventpoll file descriptor. The "size" parameter is there + * for historical reasons, when epoll was using an hash instead of an + * RB tree. With the current implementation, the "size" parameter is ignored + * (besides sanity checks). */ asmlinkage long sys_epoll_create1(int flags) { diff --git a/trunk/fs/jbd/transaction.c b/trunk/fs/jbd/transaction.c index 0540ca27a446..8dee32007500 100644 --- a/trunk/fs/jbd/transaction.c +++ b/trunk/fs/jbd/transaction.c @@ -291,7 +291,7 @@ handle_t *journal_start(journal_t *journal, int nblocks) goto out; } - lock_map_acquire(&handle->h_lockdep_map); + lock_acquire(&handle->h_lockdep_map, 0, 0, 0, 2, _THIS_IP_); out: return handle; @@ -1448,7 +1448,7 @@ int journal_stop(handle_t *handle) spin_unlock(&journal->j_state_lock); } - lock_map_release(&handle->h_lockdep_map); + lock_release(&handle->h_lockdep_map, 1, _THIS_IP_); jbd_free_handle(handle); return err; diff --git a/trunk/fs/jbd2/transaction.c b/trunk/fs/jbd2/transaction.c index e5d540588fa9..4f7cadbb19fa 100644 --- a/trunk/fs/jbd2/transaction.c +++ b/trunk/fs/jbd2/transaction.c @@ -301,7 +301,7 @@ handle_t *jbd2_journal_start(journal_t *journal, int nblocks) goto out; } - lock_map_acquire(&handle->h_lockdep_map); + lock_acquire(&handle->h_lockdep_map, 0, 0, 0, 2, _THIS_IP_); out: return handle; } @@ -1279,7 +1279,7 @@ int jbd2_journal_stop(handle_t *handle) spin_unlock(&journal->j_state_lock); } - lock_map_release(&handle->h_lockdep_map); + lock_release(&handle->h_lockdep_map, 1, _THIS_IP_); jbd2_free_handle(handle); return err; diff --git a/trunk/fs/lockd/svc4proc.c b/trunk/fs/lockd/svc4proc.c index 4a714f64515b..399444639337 100644 --- a/trunk/fs/lockd/svc4proc.c +++ b/trunk/fs/lockd/svc4proc.c @@ -83,7 +83,7 @@ nlm4svc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp, { struct nlm_host *host; struct nlm_file *file; - __be32 rc = rpc_success; + int rc = rpc_success; dprintk("lockd: TEST4 called\n"); resp->cookie = argp->cookie; @@ -116,7 +116,7 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp, { struct nlm_host *host; struct nlm_file *file; - __be32 rc = rpc_success; + int rc = rpc_success; dprintk("lockd: LOCK called\n"); diff --git a/trunk/fs/lockd/svcproc.c b/trunk/fs/lockd/svcproc.c index 76262c1986f2..76019d2ff72d 100644 --- a/trunk/fs/lockd/svcproc.c +++ b/trunk/fs/lockd/svcproc.c @@ -112,7 +112,7 @@ nlmsvc_proc_test(struct svc_rqst *rqstp, struct nlm_args *argp, { struct nlm_host *host; struct nlm_file *file; - __be32 rc = rpc_success; + int rc = rpc_success; dprintk("lockd: TEST called\n"); resp->cookie = argp->cookie; @@ -146,7 +146,7 @@ nlmsvc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp, { struct nlm_host *host; struct nlm_file *file; - __be32 rc = rpc_success; + int rc = rpc_success; dprintk("lockd: LOCK called\n"); diff --git a/trunk/fs/nfsd/export.c b/trunk/fs/nfsd/export.c index 9dc036f18356..33bfcf09db46 100644 --- a/trunk/fs/nfsd/export.c +++ b/trunk/fs/nfsd/export.c @@ -1023,7 +1023,7 @@ exp_export(struct nfsctl_export *nxp) /* Look up the dentry */ err = path_lookup(nxp->ex_path, 0, &nd); if (err) - goto out_put_clp; + goto out_unlock; err = -EINVAL; exp = exp_get_by_name(clp, nd.path.mnt, nd.path.dentry, NULL); @@ -1090,9 +1090,9 @@ exp_export(struct nfsctl_export *nxp) exp_put(exp); if (fsid_key && !IS_ERR(fsid_key)) cache_put(&fsid_key->h, &svc_expkey_cache); + if (clp) + auth_domain_put(clp); path_put(&nd.path); -out_put_clp: - auth_domain_put(clp); out_unlock: exp_writeunlock(); out: diff --git a/trunk/fs/reiserfs/super.c b/trunk/fs/reiserfs/super.c index d318c7e663fa..282a13596c70 100644 --- a/trunk/fs/reiserfs/super.c +++ b/trunk/fs/reiserfs/super.c @@ -27,6 +27,7 @@ #include #include #include +#include struct file_system_type reiserfs_fs_type; diff --git a/trunk/fs/seq_file.c b/trunk/fs/seq_file.c index 5d54205e486b..3f54dbd6c49b 100644 --- a/trunk/fs/seq_file.c +++ b/trunk/fs/seq_file.c @@ -443,20 +443,6 @@ int seq_dentry(struct seq_file *m, struct dentry *dentry, char *esc) return -1; } -int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits) -{ - size_t len = bitmap_scnprintf_len(nr_bits); - - if (m->count + len < m->size) { - bitmap_scnprintf(m->buf + m->count, m->size - m->count, - bits, nr_bits); - m->count += len; - return 0; - } - m->count = m->size; - return -1; -} - static void *single_start(struct seq_file *p, loff_t *pos) { return NULL + (*pos == 0); diff --git a/trunk/fs/xfs/xfs_bit.c b/trunk/fs/xfs/xfs_bit.c index fab0b6d5a41b..48228848f5ae 100644 --- a/trunk/fs/xfs/xfs_bit.c +++ b/trunk/fs/xfs/xfs_bit.c @@ -25,109 +25,6 @@ * XFS bit manipulation routines, used in non-realtime code. */ -#ifndef HAVE_ARCH_HIGHBIT -/* - * Index of high bit number in byte, -1 for none set, 0..7 otherwise. - */ -static const char xfs_highbit[256] = { - -1, 0, 1, 1, 2, 2, 2, 2, /* 00 .. 07 */ - 3, 3, 3, 3, 3, 3, 3, 3, /* 08 .. 0f */ - 4, 4, 4, 4, 4, 4, 4, 4, /* 10 .. 17 */ - 4, 4, 4, 4, 4, 4, 4, 4, /* 18 .. 1f */ - 5, 5, 5, 5, 5, 5, 5, 5, /* 20 .. 27 */ - 5, 5, 5, 5, 5, 5, 5, 5, /* 28 .. 2f */ - 5, 5, 5, 5, 5, 5, 5, 5, /* 30 .. 37 */ - 5, 5, 5, 5, 5, 5, 5, 5, /* 38 .. 3f */ - 6, 6, 6, 6, 6, 6, 6, 6, /* 40 .. 47 */ - 6, 6, 6, 6, 6, 6, 6, 6, /* 48 .. 4f */ - 6, 6, 6, 6, 6, 6, 6, 6, /* 50 .. 57 */ - 6, 6, 6, 6, 6, 6, 6, 6, /* 58 .. 5f */ - 6, 6, 6, 6, 6, 6, 6, 6, /* 60 .. 67 */ - 6, 6, 6, 6, 6, 6, 6, 6, /* 68 .. 6f */ - 6, 6, 6, 6, 6, 6, 6, 6, /* 70 .. 77 */ - 6, 6, 6, 6, 6, 6, 6, 6, /* 78 .. 7f */ - 7, 7, 7, 7, 7, 7, 7, 7, /* 80 .. 87 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* 88 .. 8f */ - 7, 7, 7, 7, 7, 7, 7, 7, /* 90 .. 97 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* 98 .. 9f */ - 7, 7, 7, 7, 7, 7, 7, 7, /* a0 .. a7 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* a8 .. af */ - 7, 7, 7, 7, 7, 7, 7, 7, /* b0 .. b7 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* b8 .. bf */ - 7, 7, 7, 7, 7, 7, 7, 7, /* c0 .. c7 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* c8 .. cf */ - 7, 7, 7, 7, 7, 7, 7, 7, /* d0 .. d7 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* d8 .. df */ - 7, 7, 7, 7, 7, 7, 7, 7, /* e0 .. e7 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* e8 .. ef */ - 7, 7, 7, 7, 7, 7, 7, 7, /* f0 .. f7 */ - 7, 7, 7, 7, 7, 7, 7, 7, /* f8 .. ff */ -}; -#endif - -/* - * xfs_highbit32: get high bit set out of 32-bit argument, -1 if none set. - */ -inline int -xfs_highbit32( - __uint32_t v) -{ -#ifdef HAVE_ARCH_HIGHBIT - return highbit32(v); -#else - int i; - - if (v & 0xffff0000) - if (v & 0xff000000) - i = 24; - else - i = 16; - else if (v & 0x0000ffff) - if (v & 0x0000ff00) - i = 8; - else - i = 0; - else - return -1; - return i + xfs_highbit[(v >> i) & 0xff]; -#endif -} - -/* - * xfs_lowbit64: get low bit set out of 64-bit argument, -1 if none set. - */ -int -xfs_lowbit64( - __uint64_t v) -{ - __uint32_t w = (__uint32_t)v; - int n = 0; - - if (w) { /* lower bits */ - n = ffs(w); - } else { /* upper bits */ - w = (__uint32_t)(v >> 32); - if (w && (n = ffs(w))) - n += 32; - } - return n - 1; -} - -/* - * xfs_highbit64: get high bit set out of 64-bit argument, -1 if none set. - */ -int -xfs_highbit64( - __uint64_t v) -{ - __uint32_t h = (__uint32_t)(v >> 32); - - if (h) - return xfs_highbit32(h) + 32; - return xfs_highbit32((__uint32_t)v); -} - - /* * Return whether bitmap is empty. * Size is number of words in the bitmap, which is padded to word boundary diff --git a/trunk/fs/xfs/xfs_bit.h b/trunk/fs/xfs/xfs_bit.h index 082641a9782c..8e0e463dae2d 100644 --- a/trunk/fs/xfs/xfs_bit.h +++ b/trunk/fs/xfs/xfs_bit.h @@ -47,13 +47,39 @@ static inline __uint64_t xfs_mask64lo(int n) } /* Get high bit set out of 32-bit argument, -1 if none set */ -extern int xfs_highbit32(__uint32_t v); +static inline int xfs_highbit32(__uint32_t v) +{ + return fls(v) - 1; +} + +/* Get high bit set out of 64-bit argument, -1 if none set */ +static inline int xfs_highbit64(__uint64_t v) +{ + return fls64(v) - 1; +} + +/* Get low bit set out of 32-bit argument, -1 if none set */ +static inline int xfs_lowbit32(__uint32_t v) +{ + unsigned long t = v; + return (v) ? find_first_bit(&t, 32) : -1; +} /* Get low bit set out of 64-bit argument, -1 if none set */ -extern int xfs_lowbit64(__uint64_t v); +static inline int xfs_lowbit64(__uint64_t v) +{ + __uint32_t w = (__uint32_t)v; + int n = 0; -/* Get high bit set out of 64-bit argument, -1 if none set */ -extern int xfs_highbit64(__uint64_t); + if (w) { /* lower bits */ + n = ffs(w); + } else { /* upper bits */ + w = (__uint32_t)(v >> 32); + if (w && (n = ffs(w))) + n += 32; + } + return n - 1; +} /* Return whether bitmap is empty (1 == empty) */ extern int xfs_bitmap_empty(uint *map, uint size); diff --git a/trunk/fs/xfs/xfs_rtalloc.c b/trunk/fs/xfs/xfs_rtalloc.c index bf87a5913504..e2f68de16159 100644 --- a/trunk/fs/xfs/xfs_rtalloc.c +++ b/trunk/fs/xfs/xfs_rtalloc.c @@ -73,18 +73,6 @@ STATIC int xfs_rtmodify_summary(xfs_mount_t *, xfs_trans_t *, int, * Internal functions. */ -/* - * xfs_lowbit32: get low bit set out of 32-bit argument, -1 if none set. - */ -STATIC int -xfs_lowbit32( - __uint32_t v) -{ - if (v) - return ffs(v) - 1; - return -1; -} - /* * Allocate space to the bitmap or summary file, and zero it, for growfs. */ @@ -450,6 +438,7 @@ xfs_rtallocate_extent_near( } bbno = XFS_BITTOBLOCK(mp, bno); i = 0; + ASSERT(minlen != 0); log2len = xfs_highbit32(minlen); /* * Loop over all bitmap blocks (bbno + i is current block). @@ -618,6 +607,8 @@ xfs_rtallocate_extent_size( xfs_suminfo_t sum; /* summary information for extents */ ASSERT(minlen % prod == 0 && maxlen % prod == 0); + ASSERT(maxlen != 0); + /* * Loop over all the levels starting with maxlen. * At each level, look at all the bitmap blocks, to see if there @@ -675,6 +666,9 @@ xfs_rtallocate_extent_size( *rtblock = NULLRTBLOCK; return 0; } + ASSERT(minlen != 0); + ASSERT(maxlen != 0); + /* * Loop over sizes, from maxlen down to minlen. * This time, when we do the allocations, allow smaller ones @@ -1961,6 +1955,7 @@ xfs_growfs_rt( nsbp->sb_blocksize * nsbp->sb_rextsize); nsbp->sb_rextents = nsbp->sb_rblocks; do_div(nsbp->sb_rextents, nsbp->sb_rextsize); + ASSERT(nsbp->sb_rextents != 0); nsbp->sb_rextslog = xfs_highbit32(nsbp->sb_rextents); nrsumlevels = nmp->m_rsumlevels = nsbp->sb_rextslog + 1; nrsumsize = diff --git a/trunk/include/asm-generic/ioctl.h b/trunk/include/asm-generic/ioctl.h index 15828b2d663c..864181385579 100644 --- a/trunk/include/asm-generic/ioctl.h +++ b/trunk/include/asm-generic/ioctl.h @@ -68,16 +68,12 @@ ((nr) << _IOC_NRSHIFT) | \ ((size) << _IOC_SIZESHIFT)) -#ifdef __KERNEL__ /* provoke compile error for invalid uses of size argument */ extern unsigned int __invalid_size_argument_for_IOC; #define _IOC_TYPECHECK(t) \ ((sizeof(t) == sizeof(t[1]) && \ sizeof(t) < (1 << _IOC_SIZEBITS)) ? \ sizeof(t) : __invalid_size_argument_for_IOC) -#else -#define _IOC_TYPECHECK(t) (sizeof(t)) -#endif /* used to create numbers */ #define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) diff --git a/trunk/arch/h8300/include/asm/Kbuild b/trunk/include/asm-h8300/Kbuild similarity index 100% rename from trunk/arch/h8300/include/asm/Kbuild rename to trunk/include/asm-h8300/Kbuild diff --git a/trunk/arch/h8300/include/asm/a.out.h b/trunk/include/asm-h8300/a.out.h similarity index 100% rename from trunk/arch/h8300/include/asm/a.out.h rename to trunk/include/asm-h8300/a.out.h diff --git a/trunk/arch/h8300/include/asm/atomic.h b/trunk/include/asm-h8300/atomic.h similarity index 100% rename from trunk/arch/h8300/include/asm/atomic.h rename to trunk/include/asm-h8300/atomic.h diff --git a/trunk/arch/h8300/include/asm/auxvec.h b/trunk/include/asm-h8300/auxvec.h similarity index 100% rename from trunk/arch/h8300/include/asm/auxvec.h rename to trunk/include/asm-h8300/auxvec.h diff --git a/trunk/arch/h8300/include/asm/bitops.h b/trunk/include/asm-h8300/bitops.h similarity index 100% rename from trunk/arch/h8300/include/asm/bitops.h rename to trunk/include/asm-h8300/bitops.h diff --git a/trunk/arch/h8300/include/asm/bootinfo.h b/trunk/include/asm-h8300/bootinfo.h similarity index 100% rename from trunk/arch/h8300/include/asm/bootinfo.h rename to trunk/include/asm-h8300/bootinfo.h diff --git a/trunk/arch/h8300/include/asm/bug.h b/trunk/include/asm-h8300/bug.h similarity index 100% rename from trunk/arch/h8300/include/asm/bug.h rename to trunk/include/asm-h8300/bug.h diff --git a/trunk/arch/h8300/include/asm/bugs.h b/trunk/include/asm-h8300/bugs.h similarity index 100% rename from trunk/arch/h8300/include/asm/bugs.h rename to trunk/include/asm-h8300/bugs.h diff --git a/trunk/arch/h8300/include/asm/byteorder.h b/trunk/include/asm-h8300/byteorder.h similarity index 100% rename from trunk/arch/h8300/include/asm/byteorder.h rename to trunk/include/asm-h8300/byteorder.h diff --git a/trunk/arch/h8300/include/asm/cache.h b/trunk/include/asm-h8300/cache.h similarity index 100% rename from trunk/arch/h8300/include/asm/cache.h rename to trunk/include/asm-h8300/cache.h diff --git a/trunk/arch/h8300/include/asm/cachectl.h b/trunk/include/asm-h8300/cachectl.h similarity index 100% rename from trunk/arch/h8300/include/asm/cachectl.h rename to trunk/include/asm-h8300/cachectl.h diff --git a/trunk/arch/h8300/include/asm/cacheflush.h b/trunk/include/asm-h8300/cacheflush.h similarity index 100% rename from trunk/arch/h8300/include/asm/cacheflush.h rename to trunk/include/asm-h8300/cacheflush.h diff --git a/trunk/arch/h8300/include/asm/checksum.h b/trunk/include/asm-h8300/checksum.h similarity index 100% rename from trunk/arch/h8300/include/asm/checksum.h rename to trunk/include/asm-h8300/checksum.h diff --git a/trunk/arch/h8300/include/asm/cputime.h b/trunk/include/asm-h8300/cputime.h similarity index 100% rename from trunk/arch/h8300/include/asm/cputime.h rename to trunk/include/asm-h8300/cputime.h diff --git a/trunk/arch/h8300/include/asm/current.h b/trunk/include/asm-h8300/current.h similarity index 100% rename from trunk/arch/h8300/include/asm/current.h rename to trunk/include/asm-h8300/current.h diff --git a/trunk/arch/h8300/include/asm/dbg.h b/trunk/include/asm-h8300/dbg.h similarity index 100% rename from trunk/arch/h8300/include/asm/dbg.h rename to trunk/include/asm-h8300/dbg.h diff --git a/trunk/arch/h8300/include/asm/delay.h b/trunk/include/asm-h8300/delay.h similarity index 100% rename from trunk/arch/h8300/include/asm/delay.h rename to trunk/include/asm-h8300/delay.h diff --git a/trunk/arch/h8300/include/asm/device.h b/trunk/include/asm-h8300/device.h similarity index 100% rename from trunk/arch/h8300/include/asm/device.h rename to trunk/include/asm-h8300/device.h diff --git a/trunk/arch/h8300/include/asm/div64.h b/trunk/include/asm-h8300/div64.h similarity index 100% rename from trunk/arch/h8300/include/asm/div64.h rename to trunk/include/asm-h8300/div64.h diff --git a/trunk/arch/h8300/include/asm/dma.h b/trunk/include/asm-h8300/dma.h similarity index 100% rename from trunk/arch/h8300/include/asm/dma.h rename to trunk/include/asm-h8300/dma.h diff --git a/trunk/arch/h8300/include/asm/elf.h b/trunk/include/asm-h8300/elf.h similarity index 100% rename from trunk/arch/h8300/include/asm/elf.h rename to trunk/include/asm-h8300/elf.h diff --git a/trunk/arch/h8300/include/asm/emergency-restart.h b/trunk/include/asm-h8300/emergency-restart.h similarity index 100% rename from trunk/arch/h8300/include/asm/emergency-restart.h rename to trunk/include/asm-h8300/emergency-restart.h diff --git a/trunk/arch/h8300/include/asm/errno.h b/trunk/include/asm-h8300/errno.h similarity index 100% rename from trunk/arch/h8300/include/asm/errno.h rename to trunk/include/asm-h8300/errno.h diff --git a/trunk/arch/h8300/include/asm/fb.h b/trunk/include/asm-h8300/fb.h similarity index 100% rename from trunk/arch/h8300/include/asm/fb.h rename to trunk/include/asm-h8300/fb.h diff --git a/trunk/arch/h8300/include/asm/fcntl.h b/trunk/include/asm-h8300/fcntl.h similarity index 100% rename from trunk/arch/h8300/include/asm/fcntl.h rename to trunk/include/asm-h8300/fcntl.h diff --git a/trunk/arch/h8300/include/asm/flat.h b/trunk/include/asm-h8300/flat.h similarity index 100% rename from trunk/arch/h8300/include/asm/flat.h rename to trunk/include/asm-h8300/flat.h diff --git a/trunk/arch/h8300/include/asm/fpu.h b/trunk/include/asm-h8300/fpu.h similarity index 100% rename from trunk/arch/h8300/include/asm/fpu.h rename to trunk/include/asm-h8300/fpu.h diff --git a/trunk/arch/h8300/include/asm/futex.h b/trunk/include/asm-h8300/futex.h similarity index 100% rename from trunk/arch/h8300/include/asm/futex.h rename to trunk/include/asm-h8300/futex.h diff --git a/trunk/arch/h8300/include/asm/gpio.h b/trunk/include/asm-h8300/gpio.h similarity index 100% rename from trunk/arch/h8300/include/asm/gpio.h rename to trunk/include/asm-h8300/gpio.h diff --git a/trunk/arch/h8300/include/asm/hardirq.h b/trunk/include/asm-h8300/hardirq.h similarity index 100% rename from trunk/arch/h8300/include/asm/hardirq.h rename to trunk/include/asm-h8300/hardirq.h diff --git a/trunk/arch/h8300/include/asm/hw_irq.h b/trunk/include/asm-h8300/hw_irq.h similarity index 100% rename from trunk/arch/h8300/include/asm/hw_irq.h rename to trunk/include/asm-h8300/hw_irq.h diff --git a/trunk/arch/h8300/include/asm/io.h b/trunk/include/asm-h8300/io.h similarity index 100% rename from trunk/arch/h8300/include/asm/io.h rename to trunk/include/asm-h8300/io.h diff --git a/trunk/arch/h8300/include/asm/ioctl.h b/trunk/include/asm-h8300/ioctl.h similarity index 100% rename from trunk/arch/h8300/include/asm/ioctl.h rename to trunk/include/asm-h8300/ioctl.h diff --git a/trunk/arch/h8300/include/asm/ioctls.h b/trunk/include/asm-h8300/ioctls.h similarity index 100% rename from trunk/arch/h8300/include/asm/ioctls.h rename to trunk/include/asm-h8300/ioctls.h diff --git a/trunk/arch/h8300/include/asm/ipcbuf.h b/trunk/include/asm-h8300/ipcbuf.h similarity index 100% rename from trunk/arch/h8300/include/asm/ipcbuf.h rename to trunk/include/asm-h8300/ipcbuf.h diff --git a/trunk/arch/h8300/include/asm/irq.h b/trunk/include/asm-h8300/irq.h similarity index 100% rename from trunk/arch/h8300/include/asm/irq.h rename to trunk/include/asm-h8300/irq.h diff --git a/trunk/arch/h8300/include/asm/irq_regs.h b/trunk/include/asm-h8300/irq_regs.h similarity index 100% rename from trunk/arch/h8300/include/asm/irq_regs.h rename to trunk/include/asm-h8300/irq_regs.h diff --git a/trunk/arch/h8300/include/asm/kdebug.h b/trunk/include/asm-h8300/kdebug.h similarity index 100% rename from trunk/arch/h8300/include/asm/kdebug.h rename to trunk/include/asm-h8300/kdebug.h diff --git a/trunk/arch/h8300/include/asm/kmap_types.h b/trunk/include/asm-h8300/kmap_types.h similarity index 100% rename from trunk/arch/h8300/include/asm/kmap_types.h rename to trunk/include/asm-h8300/kmap_types.h diff --git a/trunk/arch/h8300/include/asm/linkage.h b/trunk/include/asm-h8300/linkage.h similarity index 100% rename from trunk/arch/h8300/include/asm/linkage.h rename to trunk/include/asm-h8300/linkage.h diff --git a/trunk/arch/h8300/include/asm/local.h b/trunk/include/asm-h8300/local.h similarity index 100% rename from trunk/arch/h8300/include/asm/local.h rename to trunk/include/asm-h8300/local.h diff --git a/trunk/arch/h8300/include/asm/mc146818rtc.h b/trunk/include/asm-h8300/mc146818rtc.h similarity index 100% rename from trunk/arch/h8300/include/asm/mc146818rtc.h rename to trunk/include/asm-h8300/mc146818rtc.h diff --git a/trunk/arch/h8300/include/asm/md.h b/trunk/include/asm-h8300/md.h similarity index 100% rename from trunk/arch/h8300/include/asm/md.h rename to trunk/include/asm-h8300/md.h diff --git a/trunk/arch/h8300/include/asm/mman.h b/trunk/include/asm-h8300/mman.h similarity index 100% rename from trunk/arch/h8300/include/asm/mman.h rename to trunk/include/asm-h8300/mman.h diff --git a/trunk/arch/h8300/include/asm/mmu.h b/trunk/include/asm-h8300/mmu.h similarity index 100% rename from trunk/arch/h8300/include/asm/mmu.h rename to trunk/include/asm-h8300/mmu.h diff --git a/trunk/arch/h8300/include/asm/mmu_context.h b/trunk/include/asm-h8300/mmu_context.h similarity index 100% rename from trunk/arch/h8300/include/asm/mmu_context.h rename to trunk/include/asm-h8300/mmu_context.h diff --git a/trunk/arch/h8300/include/asm/module.h b/trunk/include/asm-h8300/module.h similarity index 100% rename from trunk/arch/h8300/include/asm/module.h rename to trunk/include/asm-h8300/module.h diff --git a/trunk/arch/h8300/include/asm/msgbuf.h b/trunk/include/asm-h8300/msgbuf.h similarity index 100% rename from trunk/arch/h8300/include/asm/msgbuf.h rename to trunk/include/asm-h8300/msgbuf.h diff --git a/trunk/arch/h8300/include/asm/mutex.h b/trunk/include/asm-h8300/mutex.h similarity index 100% rename from trunk/arch/h8300/include/asm/mutex.h rename to trunk/include/asm-h8300/mutex.h diff --git a/trunk/arch/h8300/include/asm/page.h b/trunk/include/asm-h8300/page.h similarity index 100% rename from trunk/arch/h8300/include/asm/page.h rename to trunk/include/asm-h8300/page.h diff --git a/trunk/arch/h8300/include/asm/page_offset.h b/trunk/include/asm-h8300/page_offset.h similarity index 100% rename from trunk/arch/h8300/include/asm/page_offset.h rename to trunk/include/asm-h8300/page_offset.h diff --git a/trunk/arch/h8300/include/asm/param.h b/trunk/include/asm-h8300/param.h similarity index 100% rename from trunk/arch/h8300/include/asm/param.h rename to trunk/include/asm-h8300/param.h diff --git a/trunk/arch/h8300/include/asm/pci.h b/trunk/include/asm-h8300/pci.h similarity index 100% rename from trunk/arch/h8300/include/asm/pci.h rename to trunk/include/asm-h8300/pci.h diff --git a/trunk/arch/h8300/include/asm/percpu.h b/trunk/include/asm-h8300/percpu.h similarity index 100% rename from trunk/arch/h8300/include/asm/percpu.h rename to trunk/include/asm-h8300/percpu.h diff --git a/trunk/arch/h8300/include/asm/pgalloc.h b/trunk/include/asm-h8300/pgalloc.h similarity index 100% rename from trunk/arch/h8300/include/asm/pgalloc.h rename to trunk/include/asm-h8300/pgalloc.h diff --git a/trunk/arch/h8300/include/asm/pgtable.h b/trunk/include/asm-h8300/pgtable.h similarity index 100% rename from trunk/arch/h8300/include/asm/pgtable.h rename to trunk/include/asm-h8300/pgtable.h diff --git a/trunk/arch/h8300/include/asm/poll.h b/trunk/include/asm-h8300/poll.h similarity index 100% rename from trunk/arch/h8300/include/asm/poll.h rename to trunk/include/asm-h8300/poll.h diff --git a/trunk/arch/h8300/include/asm/posix_types.h b/trunk/include/asm-h8300/posix_types.h similarity index 100% rename from trunk/arch/h8300/include/asm/posix_types.h rename to trunk/include/asm-h8300/posix_types.h diff --git a/trunk/arch/h8300/include/asm/processor.h b/trunk/include/asm-h8300/processor.h similarity index 100% rename from trunk/arch/h8300/include/asm/processor.h rename to trunk/include/asm-h8300/processor.h diff --git a/trunk/arch/h8300/include/asm/ptrace.h b/trunk/include/asm-h8300/ptrace.h similarity index 100% rename from trunk/arch/h8300/include/asm/ptrace.h rename to trunk/include/asm-h8300/ptrace.h diff --git a/trunk/arch/h8300/include/asm/regs267x.h b/trunk/include/asm-h8300/regs267x.h similarity index 100% rename from trunk/arch/h8300/include/asm/regs267x.h rename to trunk/include/asm-h8300/regs267x.h diff --git a/trunk/arch/h8300/include/asm/regs306x.h b/trunk/include/asm-h8300/regs306x.h similarity index 100% rename from trunk/arch/h8300/include/asm/regs306x.h rename to trunk/include/asm-h8300/regs306x.h diff --git a/trunk/arch/h8300/include/asm/resource.h b/trunk/include/asm-h8300/resource.h similarity index 100% rename from trunk/arch/h8300/include/asm/resource.h rename to trunk/include/asm-h8300/resource.h diff --git a/trunk/arch/h8300/include/asm/scatterlist.h b/trunk/include/asm-h8300/scatterlist.h similarity index 100% rename from trunk/arch/h8300/include/asm/scatterlist.h rename to trunk/include/asm-h8300/scatterlist.h diff --git a/trunk/arch/h8300/include/asm/sections.h b/trunk/include/asm-h8300/sections.h similarity index 100% rename from trunk/arch/h8300/include/asm/sections.h rename to trunk/include/asm-h8300/sections.h diff --git a/trunk/arch/h8300/include/asm/segment.h b/trunk/include/asm-h8300/segment.h similarity index 100% rename from trunk/arch/h8300/include/asm/segment.h rename to trunk/include/asm-h8300/segment.h diff --git a/trunk/arch/h8300/include/asm/sembuf.h b/trunk/include/asm-h8300/sembuf.h similarity index 100% rename from trunk/arch/h8300/include/asm/sembuf.h rename to trunk/include/asm-h8300/sembuf.h diff --git a/trunk/arch/h8300/include/asm/setup.h b/trunk/include/asm-h8300/setup.h similarity index 100% rename from trunk/arch/h8300/include/asm/setup.h rename to trunk/include/asm-h8300/setup.h diff --git a/trunk/arch/h8300/include/asm/sh_bios.h b/trunk/include/asm-h8300/sh_bios.h similarity index 100% rename from trunk/arch/h8300/include/asm/sh_bios.h rename to trunk/include/asm-h8300/sh_bios.h diff --git a/trunk/arch/h8300/include/asm/shm.h b/trunk/include/asm-h8300/shm.h similarity index 100% rename from trunk/arch/h8300/include/asm/shm.h rename to trunk/include/asm-h8300/shm.h diff --git a/trunk/arch/h8300/include/asm/shmbuf.h b/trunk/include/asm-h8300/shmbuf.h similarity index 100% rename from trunk/arch/h8300/include/asm/shmbuf.h rename to trunk/include/asm-h8300/shmbuf.h diff --git a/trunk/arch/h8300/include/asm/shmparam.h b/trunk/include/asm-h8300/shmparam.h similarity index 100% rename from trunk/arch/h8300/include/asm/shmparam.h rename to trunk/include/asm-h8300/shmparam.h diff --git a/trunk/arch/h8300/include/asm/sigcontext.h b/trunk/include/asm-h8300/sigcontext.h similarity index 100% rename from trunk/arch/h8300/include/asm/sigcontext.h rename to trunk/include/asm-h8300/sigcontext.h diff --git a/trunk/arch/h8300/include/asm/siginfo.h b/trunk/include/asm-h8300/siginfo.h similarity index 100% rename from trunk/arch/h8300/include/asm/siginfo.h rename to trunk/include/asm-h8300/siginfo.h diff --git a/trunk/arch/h8300/include/asm/signal.h b/trunk/include/asm-h8300/signal.h similarity index 100% rename from trunk/arch/h8300/include/asm/signal.h rename to trunk/include/asm-h8300/signal.h diff --git a/trunk/arch/h8300/include/asm/smp.h b/trunk/include/asm-h8300/smp.h similarity index 100% rename from trunk/arch/h8300/include/asm/smp.h rename to trunk/include/asm-h8300/smp.h diff --git a/trunk/arch/h8300/include/asm/socket.h b/trunk/include/asm-h8300/socket.h similarity index 100% rename from trunk/arch/h8300/include/asm/socket.h rename to trunk/include/asm-h8300/socket.h diff --git a/trunk/arch/h8300/include/asm/sockios.h b/trunk/include/asm-h8300/sockios.h similarity index 100% rename from trunk/arch/h8300/include/asm/sockios.h rename to trunk/include/asm-h8300/sockios.h diff --git a/trunk/arch/h8300/include/asm/spinlock.h b/trunk/include/asm-h8300/spinlock.h similarity index 100% rename from trunk/arch/h8300/include/asm/spinlock.h rename to trunk/include/asm-h8300/spinlock.h diff --git a/trunk/arch/h8300/include/asm/stat.h b/trunk/include/asm-h8300/stat.h similarity index 100% rename from trunk/arch/h8300/include/asm/stat.h rename to trunk/include/asm-h8300/stat.h diff --git a/trunk/arch/h8300/include/asm/statfs.h b/trunk/include/asm-h8300/statfs.h similarity index 100% rename from trunk/arch/h8300/include/asm/statfs.h rename to trunk/include/asm-h8300/statfs.h diff --git a/trunk/arch/h8300/include/asm/string.h b/trunk/include/asm-h8300/string.h similarity index 100% rename from trunk/arch/h8300/include/asm/string.h rename to trunk/include/asm-h8300/string.h diff --git a/trunk/arch/h8300/include/asm/system.h b/trunk/include/asm-h8300/system.h similarity index 100% rename from trunk/arch/h8300/include/asm/system.h rename to trunk/include/asm-h8300/system.h diff --git a/trunk/arch/h8300/include/asm/target_time.h b/trunk/include/asm-h8300/target_time.h similarity index 100% rename from trunk/arch/h8300/include/asm/target_time.h rename to trunk/include/asm-h8300/target_time.h diff --git a/trunk/arch/h8300/include/asm/termbits.h b/trunk/include/asm-h8300/termbits.h similarity index 100% rename from trunk/arch/h8300/include/asm/termbits.h rename to trunk/include/asm-h8300/termbits.h diff --git a/trunk/arch/h8300/include/asm/termios.h b/trunk/include/asm-h8300/termios.h similarity index 100% rename from trunk/arch/h8300/include/asm/termios.h rename to trunk/include/asm-h8300/termios.h diff --git a/trunk/arch/h8300/include/asm/thread_info.h b/trunk/include/asm-h8300/thread_info.h similarity index 100% rename from trunk/arch/h8300/include/asm/thread_info.h rename to trunk/include/asm-h8300/thread_info.h diff --git a/trunk/arch/h8300/include/asm/timex.h b/trunk/include/asm-h8300/timex.h similarity index 100% rename from trunk/arch/h8300/include/asm/timex.h rename to trunk/include/asm-h8300/timex.h diff --git a/trunk/arch/h8300/include/asm/tlb.h b/trunk/include/asm-h8300/tlb.h similarity index 100% rename from trunk/arch/h8300/include/asm/tlb.h rename to trunk/include/asm-h8300/tlb.h diff --git a/trunk/arch/h8300/include/asm/tlbflush.h b/trunk/include/asm-h8300/tlbflush.h similarity index 100% rename from trunk/arch/h8300/include/asm/tlbflush.h rename to trunk/include/asm-h8300/tlbflush.h diff --git a/trunk/arch/h8300/include/asm/topology.h b/trunk/include/asm-h8300/topology.h similarity index 100% rename from trunk/arch/h8300/include/asm/topology.h rename to trunk/include/asm-h8300/topology.h diff --git a/trunk/arch/h8300/include/asm/traps.h b/trunk/include/asm-h8300/traps.h similarity index 100% rename from trunk/arch/h8300/include/asm/traps.h rename to trunk/include/asm-h8300/traps.h diff --git a/trunk/arch/h8300/include/asm/types.h b/trunk/include/asm-h8300/types.h similarity index 100% rename from trunk/arch/h8300/include/asm/types.h rename to trunk/include/asm-h8300/types.h diff --git a/trunk/arch/h8300/include/asm/uaccess.h b/trunk/include/asm-h8300/uaccess.h similarity index 100% rename from trunk/arch/h8300/include/asm/uaccess.h rename to trunk/include/asm-h8300/uaccess.h diff --git a/trunk/arch/h8300/include/asm/ucontext.h b/trunk/include/asm-h8300/ucontext.h similarity index 100% rename from trunk/arch/h8300/include/asm/ucontext.h rename to trunk/include/asm-h8300/ucontext.h diff --git a/trunk/arch/h8300/include/asm/unaligned.h b/trunk/include/asm-h8300/unaligned.h similarity index 100% rename from trunk/arch/h8300/include/asm/unaligned.h rename to trunk/include/asm-h8300/unaligned.h diff --git a/trunk/arch/h8300/include/asm/unistd.h b/trunk/include/asm-h8300/unistd.h similarity index 100% rename from trunk/arch/h8300/include/asm/unistd.h rename to trunk/include/asm-h8300/unistd.h diff --git a/trunk/arch/h8300/include/asm/user.h b/trunk/include/asm-h8300/user.h similarity index 100% rename from trunk/arch/h8300/include/asm/user.h rename to trunk/include/asm-h8300/user.h diff --git a/trunk/arch/h8300/include/asm/virtconvert.h b/trunk/include/asm-h8300/virtconvert.h similarity index 100% rename from trunk/arch/h8300/include/asm/virtconvert.h rename to trunk/include/asm-h8300/virtconvert.h diff --git a/trunk/include/asm-x86/efi.h b/trunk/include/asm-x86/efi.h index d4f2b0abe929..7ed2bd7a7f51 100644 --- a/trunk/include/asm-x86/efi.h +++ b/trunk/include/asm-x86/efi.h @@ -86,7 +86,7 @@ extern u64 efi_call6(void *fp, u64 arg1, u64 arg2, u64 arg3, efi_call6((void *)(efi.systab->runtime->f), (u64)(a1), (u64)(a2), \ (u64)(a3), (u64)(a4), (u64)(a5), (u64)(a6)) -extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size); +extern void *efi_ioremap(unsigned long addr, unsigned long size); #endif /* CONFIG_X86_32 */ diff --git a/trunk/include/asm-x86/hw_irq.h b/trunk/include/asm-x86/hw_irq.h index edd0b95f14d0..77ba51df5668 100644 --- a/trunk/include/asm-x86/hw_irq.h +++ b/trunk/include/asm-x86/hw_irq.h @@ -98,17 +98,9 @@ extern void (*const interrupt[NR_IRQS])(void); #else typedef int vector_irq_t[NR_VECTORS]; DECLARE_PER_CPU(vector_irq_t, vector_irq); +extern spinlock_t vector_lock; #endif - -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_X86_64) -extern void lock_vector_lock(void); -extern void unlock_vector_lock(void); -extern void __setup_vector_irq(int cpu); -#else -static inline void lock_vector_lock(void) {} -static inline void unlock_vector_lock(void) {} -static inline void __setup_vector_irq(int cpu) {} -#endif +extern void setup_vector_irq(int cpu); #endif /* !ASSEMBLY_ */ diff --git a/trunk/include/asm-x86/irq_vectors.h b/trunk/include/asm-x86/irq_vectors.h index b95d167b7fb2..90b1d1f12f08 100644 --- a/trunk/include/asm-x86/irq_vectors.h +++ b/trunk/include/asm-x86/irq_vectors.h @@ -109,15 +109,7 @@ #define LAST_VM86_IRQ 15 #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) -#ifdef CONFIG_X86_64 -# if NR_CPUS < MAX_IO_APICS -# define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) -# else -# define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) -# endif -# define NR_IRQ_VECTORS NR_IRQS - -#elif !defined(CONFIG_X86_VOYAGER) +#if !defined(CONFIG_X86_VOYAGER) # if defined(CONFIG_X86_IO_APIC) || defined(CONFIG_PARAVIRT) || defined(CONFIG_X86_VISWS) diff --git a/trunk/include/linux/Kbuild b/trunk/include/linux/Kbuild index 327f60658d94..a26f565e8189 100644 --- a/trunk/include/linux/Kbuild +++ b/trunk/include/linux/Kbuild @@ -356,7 +356,6 @@ unifdef-y += virtio_balloon.h unifdef-y += virtio_console.h unifdef-y += virtio_pci.h unifdef-y += virtio_ring.h -unifdef-y += virtio_rng.h unifdef-y += vt.h unifdef-y += wait.h unifdef-y += wanrouter.h diff --git a/trunk/include/linux/agp_backend.h b/trunk/include/linux/agp_backend.h index 2b8df8b420fd..972b12bcfb36 100644 --- a/trunk/include/linux/agp_backend.h +++ b/trunk/include/linux/agp_backend.h @@ -30,8 +30,6 @@ #ifndef _AGP_BACKEND_H #define _AGP_BACKEND_H 1 -#include - enum chipset_type { NOT_SUPPORTED, SUPPORTED, @@ -80,8 +78,6 @@ struct agp_memory { bool is_bound; bool is_flushed; bool vmalloc_flag; - /* list of agp_memory mapped to the aperture */ - struct list_head mapped_list; }; #define AGP_NORMAL_MEMORY 0 @@ -100,7 +96,6 @@ extern struct agp_memory *agp_allocate_memory(struct agp_bridge_data *, size_t, extern int agp_copy_info(struct agp_bridge_data *, struct agp_kern_info *); extern int agp_bind_memory(struct agp_memory *, off_t); extern int agp_unbind_memory(struct agp_memory *); -extern int agp_rebind_memory(void); extern void agp_enable(struct agp_bridge_data *, u32); extern struct agp_bridge_data *agp_backend_acquire(struct pci_dev *); extern void agp_backend_release(struct agp_bridge_data *); diff --git a/trunk/include/linux/bitmap.h b/trunk/include/linux/bitmap.h index 89781fd48859..1abfe664c444 100644 --- a/trunk/include/linux/bitmap.h +++ b/trunk/include/linux/bitmap.h @@ -110,7 +110,6 @@ extern int __bitmap_weight(const unsigned long *bitmap, int bits); extern int bitmap_scnprintf(char *buf, unsigned int len, const unsigned long *src, int nbits); -extern int bitmap_scnprintf_len(unsigned int nr_bits); extern int __bitmap_parse(const char *buf, unsigned int buflen, int is_user, unsigned long *dst, int nbits); extern int bitmap_parse_user(const char __user *ubuf, unsigned int ulen, diff --git a/trunk/include/linux/bootmem.h b/trunk/include/linux/bootmem.h index 95837bfb5256..652470b687c9 100644 --- a/trunk/include/linux/bootmem.h +++ b/trunk/include/linux/bootmem.h @@ -97,14 +97,10 @@ extern void *__alloc_bootmem_low_node(pg_data_t *pgdat, #ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE #define alloc_bootmem(x) \ __alloc_bootmem(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) -#define alloc_bootmem_nopanic(x) \ - __alloc_bootmem_nopanic(x, SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_low(x) \ __alloc_bootmem_low(x, SMP_CACHE_BYTES, 0) #define alloc_bootmem_pages(x) \ __alloc_bootmem(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) -#define alloc_bootmem_pages_nopanic(x) \ - __alloc_bootmem_nopanic(x, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) #define alloc_bootmem_low_pages(x) \ __alloc_bootmem_low(x, PAGE_SIZE, 0) #define alloc_bootmem_node(pgdat, x) \ diff --git a/trunk/include/linux/byteorder.h b/trunk/include/linux/byteorder.h deleted file mode 100644 index 29f002d73d98..000000000000 --- a/trunk/include/linux/byteorder.h +++ /dev/null @@ -1,372 +0,0 @@ -#ifndef _LINUX_BYTEORDER_H -#define _LINUX_BYTEORDER_H - -#include -#include - -#if defined(__LITTLE_ENDIAN) && defined(__BIG_ENDIAN) -# error Fix asm/byteorder.h to define one endianness -#endif - -#if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN) -# error Fix asm/byteorder.h to define arch endianness -#endif - -#ifdef __LITTLE_ENDIAN -# undef __LITTLE_ENDIAN -# define __LITTLE_ENDIAN 1234 -#endif - -#ifdef __BIG_ENDIAN -# undef __BIG_ENDIAN -# define __BIG_ENDIAN 4321 -#endif - -#if defined(__LITTLE_ENDIAN) && !defined(__LITTLE_ENDIAN_BITFIELD) -# define __LITTLE_ENDIAN_BITFIELD -#endif - -#if defined(__BIG_ENDIAN) && !defined(__BIG_ENDIAN_BITFIELD) -# define __BIG_ENDIAN_BITFIELD -#endif - -#ifdef __LITTLE_ENDIAN -# define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) -# define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) -# define __le64_to_cpu(x) ((__force __u64)(__le64)(x)) -# define __cpu_to_le16(x) ((__force __le16)(__u16)(x)) -# define __cpu_to_le32(x) ((__force __le32)(__u32)(x)) -# define __cpu_to_le64(x) ((__force __le64)(__u64)(x)) - -# define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x)) -# define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) -# define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x)) -# define __cpu_to_be16(x) ((__force __be16)__swab16(x)) -# define __cpu_to_be32(x) ((__force __be32)__swab32(x)) -# define __cpu_to_be64(x) ((__force __be64)__swab64(x)) -#endif - -#ifdef __BIG_ENDIAN -# define __be16_to_cpu(x) ((__force __u16)(__be16)(x)) -# define __be32_to_cpu(x) ((__force __u32)(__be32)(x)) -# define __be64_to_cpu(x) ((__force __u64)(__be64)(x)) -# define __cpu_to_be16(x) ((__force __be16)(__u16)(x)) -# define __cpu_to_be32(x) ((__force __be32)(__u32)(x)) -# define __cpu_to_be64(x) ((__force __be64)(__u64)(x)) - -# define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x)) -# define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x)) -# define __le64_to_cpu(x) __swab64((__force __u64)(__le64)(x)) -# define __cpu_to_le16(x) ((__force __le16)__swab16(x)) -# define __cpu_to_le32(x) ((__force __le32)__swab32(x)) -# define __cpu_to_le64(x) ((__force __le64)__swab64(x)) -#endif - -/* - * These helpers could be phased out over time as the base version - * handles constant folding. - */ -#define __constant_htonl(x) __cpu_to_be32(x) -#define __constant_ntohl(x) __be32_to_cpu(x) -#define __constant_htons(x) __cpu_to_be16(x) -#define __constant_ntohs(x) __be16_to_cpu(x) - -#define __constant_le16_to_cpu(x) __le16_to_cpu(x) -#define __constant_le32_to_cpu(x) __le32_to_cpu(x) -#define __constant_le64_to_cpu(x) __le64_to_cpu(x) -#define __constant_be16_to_cpu(x) __be16_to_cpu(x) -#define __constant_be32_to_cpu(x) __be32_to_cpu(x) -#define __constant_be64_to_cpu(x) __be64_to_cpu(x) - -#define __constant_cpu_to_le16(x) __cpu_to_le16(x) -#define __constant_cpu_to_le32(x) __cpu_to_le32(x) -#define __constant_cpu_to_le64(x) __cpu_to_le64(x) -#define __constant_cpu_to_be16(x) __cpu_to_be16(x) -#define __constant_cpu_to_be32(x) __cpu_to_be32(x) -#define __constant_cpu_to_be64(x) __cpu_to_be64(x) - -static inline void __le16_to_cpus(__u16 *p) -{ -#ifdef __BIG_ENDIAN - __swab16s(p); -#endif -} - -static inline void __cpu_to_le16s(__u16 *p) -{ -#ifdef __BIG_ENDIAN - __swab16s(p); -#endif -} - -static inline void __le32_to_cpus(__u32 *p) -{ -#ifdef __BIG_ENDIAN - __swab32s(p); -#endif -} - -static inline void __cpu_to_le32s(__u32 *p) -{ -#ifdef __BIG_ENDIAN - __swab32s(p); -#endif -} - -static inline void __le64_to_cpus(__u64 *p) -{ -#ifdef __BIG_ENDIAN - __swab64s(p); -#endif -} - -static inline void __cpu_to_le64s(__u64 *p) -{ -#ifdef __BIG_ENDIAN - __swab64s(p); -#endif -} - -static inline void __be16_to_cpus(__u16 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab16s(p); -#endif -} - -static inline void __cpu_to_be16s(__u16 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab16s(p); -#endif -} - -static inline void __be32_to_cpus(__u32 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab32s(p); -#endif -} - -static inline void __cpu_to_be32s(__u32 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab32s(p); -#endif -} - -static inline void __be64_to_cpus(__u64 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab64s(p); -#endif -} - -static inline void __cpu_to_be64s(__u64 *p) -{ -#ifdef __LITTLE_ENDIAN - __swab64s(p); -#endif -} - -static inline __u16 __le16_to_cpup(const __le16 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __u16)*p; -#else - return __swab16p((__force __u16 *)p); -#endif -} - -static inline __u32 __le32_to_cpup(const __le32 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __u32)*p; -#else - return __swab32p((__force __u32 *)p); -#endif -} - -static inline __u64 __le64_to_cpup(const __le64 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __u64)*p; -#else - return __swab64p((__force __u64 *)p); -#endif -} - -static inline __le16 __cpu_to_le16p(const __u16 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __le16)*p; -#else - return (__force __le16)__swab16p(p); -#endif -} - -static inline __le32 __cpu_to_le32p(const __u32 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __le32)*p; -#else - return (__force __le32)__swab32p(p); -#endif -} - -static inline __le64 __cpu_to_le64p(const __u64 *p) -{ -#ifdef __LITTLE_ENDIAN - return (__force __le64)*p; -#else - return (__force __le64)__swab64p(p); -#endif -} - -static inline __u16 __be16_to_cpup(const __be16 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __u16)*p; -#else - return __swab16p((__force __u16 *)p); -#endif -} - -static inline __u32 __be32_to_cpup(const __be32 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __u32)*p; -#else - return __swab32p((__force __u32 *)p); -#endif -} - -static inline __u64 __be64_to_cpup(const __be64 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __u64)*p; -#else - return __swab64p((__force __u64 *)p); -#endif -} - -static inline __be16 __cpu_to_be16p(const __u16 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __be16)*p; -#else - return (__force __be16)__swab16p(p); -#endif -} - -static inline __be32 __cpu_to_be32p(const __u32 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __be32)*p; -#else - return (__force __be32)__swab32p(p); -#endif -} - -static inline __be64 __cpu_to_be64p(const __u64 *p) -{ -#ifdef __BIG_ENDIAN - return (__force __be64)*p; -#else - return (__force __be64)__swab64p(p); -#endif -} - -#ifdef __KERNEL__ - -# define le16_to_cpu __le16_to_cpu -# define le32_to_cpu __le32_to_cpu -# define le64_to_cpu __le64_to_cpu -# define be16_to_cpu __be16_to_cpu -# define be32_to_cpu __be32_to_cpu -# define be64_to_cpu __be64_to_cpu -# define cpu_to_le16 __cpu_to_le16 -# define cpu_to_le32 __cpu_to_le32 -# define cpu_to_le64 __cpu_to_le64 -# define cpu_to_be16 __cpu_to_be16 -# define cpu_to_be32 __cpu_to_be32 -# define cpu_to_be64 __cpu_to_be64 - -# define le16_to_cpup __le16_to_cpup -# define le32_to_cpup __le32_to_cpup -# define le64_to_cpup __le64_to_cpup -# define be16_to_cpup __be16_to_cpup -# define be32_to_cpup __be32_to_cpup -# define be64_to_cpup __be64_to_cpup -# define cpu_to_le16p __cpu_to_le16p -# define cpu_to_le32p __cpu_to_le32p -# define cpu_to_le64p __cpu_to_le64p -# define cpu_to_be16p __cpu_to_be16p -# define cpu_to_be32p __cpu_to_be32p -# define cpu_to_be64p __cpu_to_be64p - -# define le16_to_cpus __le16_to_cpus -# define le32_to_cpus __le32_to_cpus -# define le64_to_cpus __le64_to_cpus -# define be16_to_cpus __be16_to_cpus -# define be32_to_cpus __be32_to_cpus -# define be64_to_cpus __be64_to_cpus -# define cpu_to_le16s __cpu_to_le16s -# define cpu_to_le32s __cpu_to_le32s -# define cpu_to_le64s __cpu_to_le64s -# define cpu_to_be16s __cpu_to_be16s -# define cpu_to_be32s __cpu_to_be32s -# define cpu_to_be64s __cpu_to_be64s - -/* - * They have to be macros in order to do the constant folding - * correctly - if the argument passed into a inline function - * it is no longer constant according to gcc.. - */ -# undef ntohl -# undef ntohs -# undef htonl -# undef htons - -# define ___htonl(x) __cpu_to_be32(x) -# define ___htons(x) __cpu_to_be16(x) -# define ___ntohl(x) __be32_to_cpu(x) -# define ___ntohs(x) __be16_to_cpu(x) - -# define htonl(x) ___htonl(x) -# define ntohl(x) ___ntohl(x) -# define htons(x) ___htons(x) -# define ntohs(x) ___ntohs(x) - -static inline void le16_add_cpu(__le16 *var, u16 val) -{ - *var = cpu_to_le16(le16_to_cpup(var) + val); -} - -static inline void le32_add_cpu(__le32 *var, u32 val) -{ - *var = cpu_to_le32(le32_to_cpup(var) + val); -} - -static inline void le64_add_cpu(__le64 *var, u64 val) -{ - *var = cpu_to_le64(le64_to_cpup(var) + val); -} - -static inline void be16_add_cpu(__be16 *var, u16 val) -{ - *var = cpu_to_be16(be16_to_cpup(var) + val); -} - -static inline void be32_add_cpu(__be32 *var, u32 val) -{ - *var = cpu_to_be32(be32_to_cpup(var) + val); -} - -static inline void be64_add_cpu(__be64 *var, u64 val) -{ - *var = cpu_to_be64(be64_to_cpup(var) + val); -} - -#endif /* __KERNEL__ */ -#endif /* _LINUX_BYTEORDER_H */ diff --git a/trunk/include/linux/firmware-map.h b/trunk/include/linux/firmware-map.h index 6e199c8dfacc..acbdbcc16051 100644 --- a/trunk/include/linux/firmware-map.h +++ b/trunk/include/linux/firmware-map.h @@ -24,8 +24,34 @@ */ #ifdef CONFIG_FIRMWARE_MEMMAP +/** + * Adds a firmware mapping entry. This function uses kmalloc() for memory + * allocation. Use firmware_map_add_early() if you want to use the bootmem + * allocator. + * + * That function must be called before late_initcall. + * + * @start: Start of the memory range. + * @end: End of the memory range (inclusive). + * @type: Type of the memory range. + * + * Returns 0 on success, or -ENOMEM if no memory could be allocated. + */ int firmware_map_add(resource_size_t start, resource_size_t end, const char *type); + +/** + * Adds a firmware mapping entry. This function uses the bootmem allocator + * for memory allocation. Use firmware_map_add() if you want to use kmalloc(). + * + * That function must be called before late_initcall. + * + * @start: Start of the memory range. + * @end: End of the memory range (inclusive). + * @type: Type of the memory range. + * + * Returns 0 on success, or -ENOMEM if no memory could be allocated. + */ int firmware_map_add_early(resource_size_t start, resource_size_t end, const char *type); diff --git a/trunk/include/linux/i2c-id.h b/trunk/include/linux/i2c-id.h index bf34c5f4c051..4862398e05bf 100644 --- a/trunk/include/linux/i2c-id.h +++ b/trunk/include/linux/i2c-id.h @@ -39,6 +39,7 @@ #define I2C_DRIVERID_SAA7111A 8 /* video input processor */ #define I2C_DRIVERID_SAA7185B 13 /* video encoder */ #define I2C_DRIVERID_SAA7110 22 /* video decoder */ +#define I2C_DRIVERID_MGATVO 23 /* Matrox TVOut */ #define I2C_DRIVERID_SAA5249 24 /* SAA5249 and compatibles */ #define I2C_DRIVERID_PCF8583 25 /* real time clock */ #define I2C_DRIVERID_SAB3036 26 /* SAB3036 tuner */ @@ -94,6 +95,7 @@ #define I2C_HW_B_BT848 0x010005 /* BT848 video boards */ #define I2C_HW_B_VIA 0x010007 /* Via vt82c586b */ #define I2C_HW_B_HYDRA 0x010008 /* Apple Hydra Mac I/O */ +#define I2C_HW_B_G400 0x010009 /* Matrox G400 */ #define I2C_HW_B_I810 0x01000a /* Intel I810 */ #define I2C_HW_B_VOO 0x01000b /* 3dfx Voodoo 3 / Banshee */ #define I2C_HW_B_SCX200 0x01000e /* Nat'l Semi SCx200 I2C */ diff --git a/trunk/include/linux/init.h b/trunk/include/linux/init.h index 93538b696e3d..11b84e106053 100644 --- a/trunk/include/linux/init.h +++ b/trunk/include/linux/init.h @@ -139,7 +139,6 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[]; extern initcall_t __security_initcall_start[], __security_initcall_end[]; /* Defined in init/main.c */ -extern int do_one_initcall(initcall_t fn); extern char __initdata boot_command_line[]; extern char *saved_command_line; extern unsigned int reset_devices; diff --git a/trunk/include/linux/kernel.h b/trunk/include/linux/kernel.h index 2651f805ba6d..aaa998f65c7a 100644 --- a/trunk/include/linux/kernel.h +++ b/trunk/include/linux/kernel.h @@ -108,13 +108,6 @@ struct completion; struct pt_regs; struct user; -#ifdef CONFIG_PREEMPT_VOLUNTARY -extern int _cond_resched(void); -# define might_resched() _cond_resched() -#else -# define might_resched() do { } while (0) -#endif - /** * might_sleep - annotation for functions that can sleep * @@ -125,6 +118,13 @@ extern int _cond_resched(void); * be bitten later when the calling function happens to sleep when it is not * supposed to. */ +#ifdef CONFIG_PREEMPT_VOLUNTARY +extern int _cond_resched(void); +# define might_resched() _cond_resched() +#else +# define might_resched() do { } while (0) +#endif + #ifdef CONFIG_DEBUG_SPINLOCK_SLEEP void __might_sleep(char *file, int line); # define might_sleep() \ diff --git a/trunk/include/linux/lockdep.h b/trunk/include/linux/lockdep.h index 331e5f1c2d8e..2486eb4edbf1 100644 --- a/trunk/include/linux/lockdep.h +++ b/trunk/include/linux/lockdep.h @@ -89,7 +89,6 @@ struct lock_class { struct lockdep_subclass_key *key; unsigned int subclass; - unsigned int dep_gen_id; /* * IRQ/softirq usage tracking bits: @@ -190,14 +189,6 @@ struct lock_chain { u64 chain_key; }; -#define MAX_LOCKDEP_KEYS_BITS 13 -/* - * Subtract one because we offset hlock->class_idx by 1 in order - * to make 0 mean no class. This avoids overflowing the class_idx - * bitfield and hitting the BUG in hlock_class(). - */ -#define MAX_LOCKDEP_KEYS ((1UL << MAX_LOCKDEP_KEYS_BITS) - 1) - struct held_lock { /* * One-way hash of the dependency chain up to this point. We @@ -214,14 +205,14 @@ struct held_lock { * with zero), here we store the previous hash value: */ u64 prev_chain_key; + struct lock_class *class; unsigned long acquire_ip; struct lockdep_map *instance; - struct lockdep_map *nest_lock; + #ifdef CONFIG_LOCK_STAT u64 waittime_stamp; u64 holdtime_stamp; #endif - unsigned int class_idx:MAX_LOCKDEP_KEYS_BITS; /* * The lock-stack is unified in that the lock chains of interrupt * contexts nest ontop of process context chains, but we 'separate' @@ -235,11 +226,11 @@ struct held_lock { * The following field is used to detect when we cross into an * interrupt context: */ - unsigned int irq_context:2; /* bit 0 - soft, bit 1 - hard */ - unsigned int trylock:1; - unsigned int read:2; /* see lock_acquire() comment */ - unsigned int check:2; /* see lock_acquire() comment */ - unsigned int hardirqs_off:1; + int irq_context; + int trylock; + int read; + int check; + int hardirqs_off; }; /* @@ -303,15 +294,11 @@ extern void lockdep_init_map(struct lockdep_map *lock, const char *name, * 2: full validation */ extern void lock_acquire(struct lockdep_map *lock, unsigned int subclass, - int trylock, int read, int check, - struct lockdep_map *nest_lock, unsigned long ip); + int trylock, int read, int check, unsigned long ip); extern void lock_release(struct lockdep_map *lock, int nested, unsigned long ip); -extern void lock_set_subclass(struct lockdep_map *lock, unsigned int subclass, - unsigned long ip); - # define INIT_LOCKDEP .lockdep_recursion = 0, #define lockdep_depth(tsk) (debug_locks ? (tsk)->lockdep_depth : 0) @@ -326,9 +313,8 @@ static inline void lockdep_on(void) { } -# define lock_acquire(l, s, t, r, c, n, i) do { } while (0) +# define lock_acquire(l, s, t, r, c, i) do { } while (0) # define lock_release(l, n, i) do { } while (0) -# define lock_set_subclass(l, s, i) do { } while (0) # define lockdep_init() do { } while (0) # define lockdep_info() do { } while (0) # define lockdep_init_map(lock, name, key, sub) do { (void)(key); } while (0) @@ -414,11 +400,9 @@ static inline void print_irqtrace_events(struct task_struct *curr) #ifdef CONFIG_DEBUG_LOCK_ALLOC # ifdef CONFIG_PROVE_LOCKING -# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) -# define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 2, n, i) +# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) # else -# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) -# define spin_acquire_nest(l, s, t, n, i) lock_acquire(l, s, t, 0, 1, NULL, i) +# define spin_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) # endif # define spin_release(l, n, i) lock_release(l, n, i) #else @@ -428,11 +412,11 @@ static inline void print_irqtrace_events(struct task_struct *curr) #ifdef CONFIG_DEBUG_LOCK_ALLOC # ifdef CONFIG_PROVE_LOCKING -# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) -# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, NULL, i) +# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) +# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 2, i) # else -# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) -# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, NULL, i) +# define rwlock_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) +# define rwlock_acquire_read(l, s, t, i) lock_acquire(l, s, t, 2, 1, i) # endif # define rwlock_release(l, n, i) lock_release(l, n, i) #else @@ -443,9 +427,9 @@ static inline void print_irqtrace_events(struct task_struct *curr) #ifdef CONFIG_DEBUG_LOCK_ALLOC # ifdef CONFIG_PROVE_LOCKING -# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) +# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) # else -# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) +# define mutex_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) # endif # define mutex_release(l, n, i) lock_release(l, n, i) #else @@ -455,11 +439,11 @@ static inline void print_irqtrace_events(struct task_struct *curr) #ifdef CONFIG_DEBUG_LOCK_ALLOC # ifdef CONFIG_PROVE_LOCKING -# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, NULL, i) -# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, NULL, i) +# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 2, i) +# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 2, i) # else -# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, NULL, i) -# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, NULL, i) +# define rwsem_acquire(l, s, t, i) lock_acquire(l, s, t, 0, 1, i) +# define rwsem_acquire_read(l, s, t, i) lock_acquire(l, s, t, 1, 1, i) # endif # define rwsem_release(l, n, i) lock_release(l, n, i) #else @@ -468,16 +452,4 @@ static inline void print_irqtrace_events(struct task_struct *curr) # define rwsem_release(l, n, i) do { } while (0) #endif -#ifdef CONFIG_DEBUG_LOCK_ALLOC -# ifdef CONFIG_PROVE_LOCKING -# define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 2, NULL, _THIS_IP_) -# else -# define lock_map_acquire(l) lock_acquire(l, 0, 0, 0, 1, NULL, _THIS_IP_) -# endif -# define lock_map_release(l) lock_release(l, 1, _THIS_IP_) -#else -# define lock_map_acquire(l) do { } while (0) -# define lock_map_release(l) do { } while (0) -#endif - #endif /* __LINUX_LOCKDEP_H */ diff --git a/trunk/include/linux/mm.h b/trunk/include/linux/mm.h index fa651609b65d..335288bff1b7 100644 --- a/trunk/include/linux/mm.h +++ b/trunk/include/linux/mm.h @@ -834,6 +834,7 @@ extern int mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, unsigned long start, unsigned long end, unsigned long newflags); +#ifdef CONFIG_HAVE_GET_USER_PAGES_FAST /* * get_user_pages_fast provides equivalent functionality to get_user_pages, * operating on current and current->mm (force=0 and doesn't return any vmas). @@ -847,6 +848,25 @@ extern int mprotect_fixup(struct vm_area_struct *vma, int get_user_pages_fast(unsigned long start, int nr_pages, int write, struct page **pages); +#else +/* + * Should probably be moved to asm-generic, and architectures can include it if + * they don't implement their own get_user_pages_fast. + */ +#define get_user_pages_fast(start, nr_pages, write, pages) \ +({ \ + struct mm_struct *mm = current->mm; \ + int ret; \ + \ + down_read(&mm->mmap_sem); \ + ret = get_user_pages(current, mm, start, nr_pages, \ + write, 0, pages, NULL); \ + up_read(&mm->mmap_sem); \ + \ + ret; \ +}) +#endif + /* * A callback you can register to apply pressure to ageable caches. * diff --git a/trunk/include/linux/rcuclassic.h b/trunk/include/linux/rcuclassic.h index 4ab843622727..8c774905dcfe 100644 --- a/trunk/include/linux/rcuclassic.h +++ b/trunk/include/linux/rcuclassic.h @@ -117,7 +117,7 @@ extern int rcu_needs_cpu(int cpu); #ifdef CONFIG_DEBUG_LOCK_ALLOC extern struct lockdep_map rcu_lock_map; # define rcu_read_acquire() \ - lock_acquire(&rcu_lock_map, 0, 0, 2, 1, NULL, _THIS_IP_) + lock_acquire(&rcu_lock_map, 0, 0, 2, 1, _THIS_IP_) # define rcu_read_release() lock_release(&rcu_lock_map, 1, _THIS_IP_) #else # define rcu_read_acquire() do { } while (0) diff --git a/trunk/include/linux/sched.h b/trunk/include/linux/sched.h index 5850bfb968a8..5270d449ff9d 100644 --- a/trunk/include/linux/sched.h +++ b/trunk/include/linux/sched.h @@ -1551,10 +1551,16 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask) extern unsigned long long sched_clock(void); -extern void sched_clock_init(void); -extern u64 sched_clock_cpu(int cpu); - #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK +static inline void sched_clock_init(void) +{ +} + +static inline u64 sched_clock_cpu(int cpu) +{ + return sched_clock(); +} + static inline void sched_clock_tick(void) { } @@ -1566,11 +1572,28 @@ static inline void sched_clock_idle_sleep_event(void) static inline void sched_clock_idle_wakeup_event(u64 delta_ns) { } -#else + +#ifdef CONFIG_NO_HZ +static inline void sched_clock_tick_stop(int cpu) +{ +} + +static inline void sched_clock_tick_start(int cpu) +{ +} +#endif + +#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ +extern void sched_clock_init(void); +extern u64 sched_clock_cpu(int cpu); extern void sched_clock_tick(void); extern void sched_clock_idle_sleep_event(void); extern void sched_clock_idle_wakeup_event(u64 delta_ns); +#ifdef CONFIG_NO_HZ +extern void sched_clock_tick_stop(int cpu); +extern void sched_clock_tick_start(int cpu); #endif +#endif /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ /* * For kernel-internal use: high-speed (but slightly incorrect) per-cpu diff --git a/trunk/include/linux/seq_file.h b/trunk/include/linux/seq_file.h index a1783b229ef4..a66304a09955 100644 --- a/trunk/include/linux/seq_file.h +++ b/trunk/include/linux/seq_file.h @@ -4,8 +4,6 @@ #include #include #include -#include -#include struct seq_operations; struct file; @@ -49,16 +47,6 @@ int seq_path(struct seq_file *, struct path *, char *); int seq_dentry(struct seq_file *, struct dentry *, char *); int seq_path_root(struct seq_file *m, struct path *path, struct path *root, char *esc); -int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits); -static inline int seq_cpumask(struct seq_file *m, cpumask_t *mask) -{ - return seq_bitmap(m, mask->bits, NR_CPUS); -} - -static inline int seq_nodemask(struct seq_file *m, nodemask_t *mask) -{ - return seq_bitmap(m, mask->bits, MAX_NUMNODES); -} int single_open(struct file *, int (*)(struct seq_file *, void *), void *); int single_release(struct inode *, struct file *); diff --git a/trunk/include/linux/spinlock.h b/trunk/include/linux/spinlock.h index e0c0fccced46..61e5610ad165 100644 --- a/trunk/include/linux/spinlock.h +++ b/trunk/include/linux/spinlock.h @@ -183,14 +183,8 @@ do { \ #ifdef CONFIG_DEBUG_LOCK_ALLOC # define spin_lock_nested(lock, subclass) _spin_lock_nested(lock, subclass) -# define spin_lock_nest_lock(lock, nest_lock) \ - do { \ - typecheck(struct lockdep_map *, &(nest_lock)->dep_map);\ - _spin_lock_nest_lock(lock, &(nest_lock)->dep_map); \ - } while (0) #else # define spin_lock_nested(lock, subclass) _spin_lock(lock) -# define spin_lock_nest_lock(lock, nest_lock) _spin_lock(lock) #endif #define write_lock(lock) _write_lock(lock) diff --git a/trunk/include/linux/spinlock_api_smp.h b/trunk/include/linux/spinlock_api_smp.h index d79845d034b5..8a2307ce7296 100644 --- a/trunk/include/linux/spinlock_api_smp.h +++ b/trunk/include/linux/spinlock_api_smp.h @@ -22,8 +22,6 @@ int in_lock_functions(unsigned long addr); void __lockfunc _spin_lock(spinlock_t *lock) __acquires(lock); void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) __acquires(lock); -void __lockfunc _spin_lock_nest_lock(spinlock_t *lock, struct lockdep_map *map) - __acquires(lock); void __lockfunc _read_lock(rwlock_t *lock) __acquires(lock); void __lockfunc _write_lock(rwlock_t *lock) __acquires(lock); void __lockfunc _spin_lock_bh(spinlock_t *lock) __acquires(lock); diff --git a/trunk/include/linux/swab.h b/trunk/include/linux/swab.h deleted file mode 100644 index 270d5c208a89..000000000000 --- a/trunk/include/linux/swab.h +++ /dev/null @@ -1,309 +0,0 @@ -#ifndef _LINUX_SWAB_H -#define _LINUX_SWAB_H - -#include -#include -#include - -/* - * casts are necessary for constants, because we never know how for sure - * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. - */ -#define __const_swab16(x) ((__u16)( \ - (((__u16)(x) & (__u16)0x00ffU) << 8) | \ - (((__u16)(x) & (__u16)0xff00U) >> 8))) - -#define __const_swab32(x) ((__u32)( \ - (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ - (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ - (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ - (((__u32)(x) & (__u32)0xff000000UL) >> 24))) - -#define __const_swab64(x) ((__u64)( \ - (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ - (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ - (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ - (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ - (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ - (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ - (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ - (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56))) - -#define __const_swahw32(x) ((__u32)( \ - (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \ - (((__u32)(x) & (__u32)0xffff0000UL) >> 16))) - -#define __const_swahb32(x) ((__u32)( \ - (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \ - (((__u32)(x) & (__u32)0xff00ff00UL) >> 8))) - -/* - * Implement the following as inlines, but define the interface using - * macros to allow constant folding when possible: - * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32 - */ - -static inline __attribute_const__ __u16 ___swab16(__u16 val) -{ -#ifdef __arch_swab16 - return __arch_swab16(val); -#elif defined(__arch_swab16p) - return __arch_swab16p(&val); -#else - return __const_swab16(val); -#endif -} - -static inline __attribute_const__ __u32 ___swab32(__u32 val) -{ -#ifdef __arch_swab32 - return __arch_swab32(val); -#elif defined(__arch_swab32p) - return __arch_swab32p(&val); -#else - return __const_swab32(val); -#endif -} - -static inline __attribute_const__ __u64 ___swab64(__u64 val) -{ -#ifdef __arch_swab64 - return __arch_swab64(val); -#elif defined(__arch_swab64p) - return __arch_swab64p(&val); -#elif defined(__SWAB_64_THRU_32__) - __u32 h = val >> 32; - __u32 l = val & ((1ULL << 32) - 1); - return (((__u64)___swab32(l)) << 32) | ((__u64)(___swab32(h))); -#else - return __const_swab64(val); -#endif -} - -static inline __attribute_const__ __u32 ___swahw32(__u32 val) -{ -#ifdef __arch_swahw32 - return __arch_swahw32(val); -#elif defined(__arch_swahw32p) - return __arch_swahw32p(&val); -#else - return __const_swahw32(val); -#endif -} - -static inline __attribute_const__ __u32 ___swahb32(__u32 val) -{ -#ifdef __arch_swahb32 - return __arch_swahb32(val); -#elif defined(__arch_swahb32p) - return __arch_swahb32p(&val); -#else - return __const_swahb32(val); -#endif -} - -/** - * __swab16 - return a byteswapped 16-bit value - * @x: value to byteswap - */ -#define __swab16(x) \ - (__builtin_constant_p((__u16)(x)) ? \ - __const_swab16((x)) : \ - ___swab16((x))) - -/** - * __swab32 - return a byteswapped 32-bit value - * @x: value to byteswap - */ -#define __swab32(x) \ - (__builtin_constant_p((__u32)(x)) ? \ - __const_swab32((x)) : \ - ___swab32((x))) - -/** - * __swab64 - return a byteswapped 64-bit value - * @x: value to byteswap - */ -#define __swab64(x) \ - (__builtin_constant_p((__u64)(x)) ? \ - __const_swab64((x)) : \ - ___swab64((x))) - -/** - * __swahw32 - return a word-swapped 32-bit value - * @x: value to wordswap - * - * __swahw32(0x12340000) is 0x00001234 - */ -#define __swahw32(x) \ - (__builtin_constant_p((__u32)(x)) ? \ - __const_swahw32((x)) : \ - ___swahw32((x))) - -/** - * __swahb32 - return a high and low byte-swapped 32-bit value - * @x: value to byteswap - * - * __swahb32(0x12345678) is 0x34127856 - */ -#define __swahb32(x) \ - (__builtin_constant_p((__u32)(x)) ? \ - __const_swahb32((x)) : \ - ___swahb32((x))) - -/** - * __swab16p - return a byteswapped 16-bit value from a pointer - * @p: pointer to a naturally-aligned 16-bit value - */ -static inline __u16 __swab16p(const __u16 *p) -{ -#ifdef __arch_swab16p - return __arch_swab16p(p); -#else - return __swab16(*p); -#endif -} - -/** - * __swab32p - return a byteswapped 32-bit value from a pointer - * @p: pointer to a naturally-aligned 32-bit value - */ -static inline __u32 __swab32p(const __u32 *p) -{ -#ifdef __arch_swab32p - return __arch_swab32p(p); -#else - return __swab32(*p); -#endif -} - -/** - * __swab64p - return a byteswapped 64-bit value from a pointer - * @p: pointer to a naturally-aligned 64-bit value - */ -static inline __u64 __swab64p(const __u64 *p) -{ -#ifdef __arch_swab64p - return __arch_swab64p(p); -#else - return __swab64(*p); -#endif -} - -/** - * __swahw32p - return a wordswapped 32-bit value from a pointer - * @p: pointer to a naturally-aligned 32-bit value - * - * See __swahw32() for details of wordswapping. - */ -static inline __u32 __swahw32p(const __u32 *p) -{ -#ifdef __arch_swahw32p - return __arch_swahw32p(p); -#else - return __swahw32(*p); -#endif -} - -/** - * __swahb32p - return a high and low byteswapped 32-bit value from a pointer - * @p: pointer to a naturally-aligned 32-bit value - * - * See __swahb32() for details of high/low byteswapping. - */ -static inline __u32 __swahb32p(const __u32 *p) -{ -#ifdef __arch_swahb32p - return __arch_swahb32p(p); -#else - return __swahb32(*p); -#endif -} - -/** - * __swab16s - byteswap a 16-bit value in-place - * @p: pointer to a naturally-aligned 16-bit value - */ -static inline void __swab16s(__u16 *p) -{ -#ifdef __arch_swab16s - __arch_swab16s(p); -#else - *p = __swab16p(p); -#endif -} -/** - * __swab32s - byteswap a 32-bit value in-place - * @p: pointer to a naturally-aligned 32-bit value - */ -static inline void __swab32s(__u32 *p) -{ -#ifdef __arch_swab32s - __arch_swab32s(p); -#else - *p = __swab32p(p); -#endif -} - -/** - * __swab64s - byteswap a 64-bit value in-place - * @p: pointer to a naturally-aligned 64-bit value - */ -static inline void __swab64s(__u64 *p) -{ -#ifdef __arch_swab64s - __arch_swab64s(p); -#else - *p = __swab64p(p); -#endif -} - -/** - * __swahw32s - wordswap a 32-bit value in-place - * @p: pointer to a naturally-aligned 32-bit value - * - * See __swahw32() for details of wordswapping - */ -static inline void __swahw32s(__u32 *p) -{ -#ifdef __arch_swahw32s - __arch_swahw32s(p); -#else - *p = __swahw32p(p); -#endif -} - -/** - * __swahb32s - high and low byteswap a 32-bit value in-place - * @p: pointer to a naturally-aligned 32-bit value - * - * See __swahb32() for details of high and low byte swapping - */ -static inline void __swahb32s(__u32 *p) -{ -#ifdef __arch_swahb32s - __arch_swahb32s(p); -#else - *p = __swahb32p(p); -#endif -} - -#ifdef __KERNEL__ -# define swab16 __swab16 -# define swab32 __swab32 -# define swab64 __swab64 -# define swahw32 __swahw32 -# define swahb32 __swahb32 -# define swab16p __swab16p -# define swab32p __swab32p -# define swab64p __swab64p -# define swahw32p __swahw32p -# define swahb32p __swahb32p -# define swab16s __swab16s -# define swab32s __swab32s -# define swab64s __swab64s -# define swahw32s __swahw32s -# define swahb32s __swahb32s -#endif /* __KERNEL__ */ - -#endif /* _LINUX_SWAB_H */ diff --git a/trunk/include/video/atmel_lcdc.h b/trunk/include/video/atmel_lcdc.h index 920c4e9cb93d..613173b5db69 100644 --- a/trunk/include/video/atmel_lcdc.h +++ b/trunk/include/video/atmel_lcdc.h @@ -41,7 +41,6 @@ struct atmel_lcdfb_info { struct work_struct task; unsigned int guard_time; - unsigned int smem_len; struct platform_device *pdev; struct clk *bus_clk; struct clk *lcdc_clk; diff --git a/trunk/include/video/radeon.h b/trunk/include/video/radeon.h index 099ffa5e5bee..95a1f2038b1d 100644 --- a/trunk/include/video/radeon.h +++ b/trunk/include/video/radeon.h @@ -742,10 +742,6 @@ #define SOFT_RESET_RB (1 << 6) #define SOFT_RESET_HDP (1 << 7) -/* WAIT_UNTIL bit constants */ -#define WAIT_DMA_GUI_IDLE (1 << 9) -#define WAIT_2D_IDLECLEAN (1 << 16) - /* SURFACE_CNTL bit consants */ #define SURF_TRANSLATION_DIS (1 << 8) #define NONSURF_AP0_SWP_16BPP (1 << 20) diff --git a/trunk/init/main.c b/trunk/init/main.c index f6f7042331dc..0bc7e167bf45 100644 --- a/trunk/init/main.c +++ b/trunk/init/main.c @@ -691,7 +691,7 @@ asmlinkage void __init start_kernel(void) rest_init(); } -static int initcall_debug; +static int __initdata initcall_debug; static int __init initcall_debug_setup(char *str) { @@ -700,7 +700,7 @@ static int __init initcall_debug_setup(char *str) } __setup("initcall_debug", initcall_debug_setup); -int do_one_initcall(initcall_t fn) +static void __init do_one_initcall(initcall_t fn) { int count = preempt_count(); ktime_t t0, t1, delta; @@ -740,8 +740,6 @@ int do_one_initcall(initcall_t fn) print_fn_descriptor_symbol(KERN_WARNING "initcall %s", fn); printk(" returned with %s\n", msgbuf); } - - return result; } diff --git a/trunk/kernel/Kconfig.hz b/trunk/kernel/Kconfig.hz index 94fabd534b03..382dd5a8b2d7 100644 --- a/trunk/kernel/Kconfig.hz +++ b/trunk/kernel/Kconfig.hz @@ -55,4 +55,4 @@ config HZ default 1000 if HZ_1000 config SCHED_HRTICK - def_bool HIGH_RES_TIMERS && (!SMP || USE_GENERIC_SMP_HELPERS) + def_bool HIGH_RES_TIMERS && USE_GENERIC_SMP_HELPERS diff --git a/trunk/kernel/cpu.c b/trunk/kernel/cpu.c index f17e9854c246..e202a68d1cc1 100644 --- a/trunk/kernel/cpu.c +++ b/trunk/kernel/cpu.c @@ -349,8 +349,6 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen) goto out_notify; BUG_ON(!cpu_online(cpu)); - cpu_set(cpu, cpu_active_map); - /* Now call notifier in preparation. */ raw_notifier_call_chain(&cpu_chain, CPU_ONLINE | mod, hcpu); @@ -369,7 +367,7 @@ int __cpuinit cpu_up(unsigned int cpu) if (!cpu_isset(cpu, cpu_possible_map)) { printk(KERN_ERR "can't online cpu %d because it is not " "configured as may-hotadd at boot time\n", cpu); -#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) +#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) || defined(CONFIG_S390) printk(KERN_ERR "please check additional_cpus= boot " "parameter\n"); #endif @@ -385,6 +383,9 @@ int __cpuinit cpu_up(unsigned int cpu) err = _cpu_up(cpu, 0); + if (cpu_online(cpu)) + cpu_set(cpu, cpu_active_map); + out: cpu_maps_update_done(); return err; diff --git a/trunk/kernel/irq/proc.c b/trunk/kernel/irq/proc.c index a09dd29c2fd7..6c6d35d68ee9 100644 --- a/trunk/kernel/irq/proc.c +++ b/trunk/kernel/irq/proc.c @@ -8,7 +8,6 @@ #include #include -#include #include #include "internals.h" @@ -17,18 +16,23 @@ static struct proc_dir_entry *root_irq_dir; #ifdef CONFIG_SMP -static int irq_affinity_proc_show(struct seq_file *m, void *v) +static int irq_affinity_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) { - struct irq_desc *desc = irq_desc + (long)m->private; + struct irq_desc *desc = irq_desc + (long)data; cpumask_t *mask = &desc->affinity; + int len; #ifdef CONFIG_GENERIC_PENDING_IRQ if (desc->status & IRQ_MOVE_PENDING) mask = &desc->pending_mask; #endif - seq_cpumask(m, mask); - seq_putc(m, '\n'); - return 0; + len = cpumask_scnprintf(page, count, *mask); + + if (count - len < 2) + return -EINVAL; + len += sprintf(page + len, "\n"); + return len; } #ifndef is_affinity_mask_valid @@ -36,12 +40,11 @@ static int irq_affinity_proc_show(struct seq_file *m, void *v) #endif int no_irq_affinity; -static ssize_t irq_affinity_proc_write(struct file *file, - const char __user *buffer, size_t count, loff_t *pos) +static int irq_affinity_write_proc(struct file *file, const char __user *buffer, + unsigned long count, void *data) { - unsigned int irq = (int)(long)PDE(file->f_path.dentry->d_inode)->data; + unsigned int irq = (int)(long)data, full_count = count, err; cpumask_t new_value; - int err; if (!irq_desc[irq].chip->set_affinity || no_irq_affinity || irq_balancing_disabled(irq)) @@ -62,38 +65,28 @@ static ssize_t irq_affinity_proc_write(struct file *file, if (!cpus_intersects(new_value, cpu_online_map)) /* Special case for empty set - allow the architecture code to set default SMP affinity. */ - return irq_select_affinity(irq) ? -EINVAL : count; + return irq_select_affinity(irq) ? -EINVAL : full_count; irq_set_affinity(irq, new_value); - return count; -} - -static int irq_affinity_proc_open(struct inode *inode, struct file *file) -{ - return single_open(file, irq_affinity_proc_show, PDE(inode)->data); + return full_count; } -static const struct file_operations irq_affinity_proc_fops = { - .open = irq_affinity_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = irq_affinity_proc_write, -}; - -static int default_affinity_show(struct seq_file *m, void *v) +static int default_affinity_read(char *page, char **start, off_t off, + int count, int *eof, void *data) { - seq_cpumask(m, &irq_default_affinity); - seq_putc(m, '\n'); - return 0; + int len = cpumask_scnprintf(page, count, irq_default_affinity); + if (count - len < 2) + return -EINVAL; + len += sprintf(page + len, "\n"); + return len; } -static ssize_t default_affinity_write(struct file *file, - const char __user *buffer, size_t count, loff_t *ppos) +static int default_affinity_write(struct file *file, const char __user *buffer, + unsigned long count, void *data) { + unsigned int full_count = count, err; cpumask_t new_value; - int err; err = cpumask_parse_user(buffer, count, new_value); if (err) @@ -112,21 +105,8 @@ static ssize_t default_affinity_write(struct file *file, irq_default_affinity = new_value; - return count; + return full_count; } - -static int default_affinity_open(struct inode *inode, struct file *file) -{ - return single_open(file, default_affinity_show, NULL); -} - -static const struct file_operations default_affinity_proc_fops = { - .open = default_affinity_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = default_affinity_write, -}; #endif static int irq_spurious_read(char *page, char **start, off_t off, @@ -198,9 +178,16 @@ void register_irq_proc(unsigned int irq) irq_desc[irq].dir = proc_mkdir(name, root_irq_dir); #ifdef CONFIG_SMP - /* create /proc/irq//smp_affinity */ - proc_create_data("smp_affinity", 0600, irq_desc[irq].dir, - &irq_affinity_proc_fops, (void *)(long)irq); + { + /* create /proc/irq//smp_affinity */ + entry = create_proc_entry("smp_affinity", 0600, irq_desc[irq].dir); + + if (entry) { + entry->data = (void *)(long)irq; + entry->read_proc = irq_affinity_read_proc; + entry->write_proc = irq_affinity_write_proc; + } + } #endif entry = create_proc_entry("spurious", 0444, irq_desc[irq].dir); @@ -221,8 +208,15 @@ void unregister_handler_proc(unsigned int irq, struct irqaction *action) void register_default_affinity_proc(void) { #ifdef CONFIG_SMP - proc_create("irq/default_smp_affinity", 0600, NULL, - &default_affinity_proc_fops); + struct proc_dir_entry *entry; + + /* create /proc/irq/default_smp_affinity */ + entry = create_proc_entry("default_smp_affinity", 0600, root_irq_dir); + if (entry) { + entry->data = NULL; + entry->read_proc = default_affinity_read; + entry->write_proc = default_affinity_write; + } #endif } diff --git a/trunk/kernel/lockdep.c b/trunk/kernel/lockdep.c index 1aa91fd6b06e..d38a64362973 100644 --- a/trunk/kernel/lockdep.c +++ b/trunk/kernel/lockdep.c @@ -124,15 +124,6 @@ static struct lock_list list_entries[MAX_LOCKDEP_ENTRIES]; unsigned long nr_lock_classes; static struct lock_class lock_classes[MAX_LOCKDEP_KEYS]; -static inline struct lock_class *hlock_class(struct held_lock *hlock) -{ - if (!hlock->class_idx) { - DEBUG_LOCKS_WARN_ON(1); - return NULL; - } - return lock_classes + hlock->class_idx - 1; -} - #ifdef CONFIG_LOCK_STAT static DEFINE_PER_CPU(struct lock_class_stats[MAX_LOCKDEP_KEYS], lock_stats); @@ -231,7 +222,7 @@ static void lock_release_holdtime(struct held_lock *hlock) holdtime = sched_clock() - hlock->holdtime_stamp; - stats = get_lock_stats(hlock_class(hlock)); + stats = get_lock_stats(hlock->class); if (hlock->read) lock_time_inc(&stats->read_holdtime, holdtime); else @@ -381,19 +372,6 @@ unsigned int nr_process_chains; unsigned int max_lockdep_depth; unsigned int max_recursion_depth; -static unsigned int lockdep_dependency_gen_id; - -static bool lockdep_dependency_visit(struct lock_class *source, - unsigned int depth) -{ - if (!depth) - lockdep_dependency_gen_id++; - if (source->dep_gen_id == lockdep_dependency_gen_id) - return true; - source->dep_gen_id = lockdep_dependency_gen_id; - return false; -} - #ifdef CONFIG_DEBUG_LOCKDEP /* * We cannot printk in early bootup code. Not even early_printk() @@ -527,7 +505,7 @@ static void print_lockdep_cache(struct lockdep_map *lock) static void print_lock(struct held_lock *hlock) { - print_lock_name(hlock_class(hlock)); + print_lock_name(hlock->class); printk(", at: "); print_ip_sym(hlock->acquire_ip); } @@ -580,9 +558,6 @@ static void print_lock_dependencies(struct lock_class *class, int depth) { struct lock_list *entry; - if (lockdep_dependency_visit(class, depth)) - return; - if (DEBUG_LOCKS_WARN_ON(depth >= 20)) return; @@ -957,7 +932,7 @@ static noinline int print_circular_bug_tail(void) if (debug_locks_silent) return 0; - this.class = hlock_class(check_source); + this.class = check_source->class; if (!save_trace(&this.trace)) return 0; @@ -984,67 +959,6 @@ static int noinline print_infinite_recursion_bug(void) return 0; } -unsigned long __lockdep_count_forward_deps(struct lock_class *class, - unsigned int depth) -{ - struct lock_list *entry; - unsigned long ret = 1; - - if (lockdep_dependency_visit(class, depth)) - return 0; - - /* - * Recurse this class's dependency list: - */ - list_for_each_entry(entry, &class->locks_after, entry) - ret += __lockdep_count_forward_deps(entry->class, depth + 1); - - return ret; -} - -unsigned long lockdep_count_forward_deps(struct lock_class *class) -{ - unsigned long ret, flags; - - local_irq_save(flags); - __raw_spin_lock(&lockdep_lock); - ret = __lockdep_count_forward_deps(class, 0); - __raw_spin_unlock(&lockdep_lock); - local_irq_restore(flags); - - return ret; -} - -unsigned long __lockdep_count_backward_deps(struct lock_class *class, - unsigned int depth) -{ - struct lock_list *entry; - unsigned long ret = 1; - - if (lockdep_dependency_visit(class, depth)) - return 0; - /* - * Recurse this class's dependency list: - */ - list_for_each_entry(entry, &class->locks_before, entry) - ret += __lockdep_count_backward_deps(entry->class, depth + 1); - - return ret; -} - -unsigned long lockdep_count_backward_deps(struct lock_class *class) -{ - unsigned long ret, flags; - - local_irq_save(flags); - __raw_spin_lock(&lockdep_lock); - ret = __lockdep_count_backward_deps(class, 0); - __raw_spin_unlock(&lockdep_lock); - local_irq_restore(flags); - - return ret; -} - /* * Prove that the dependency graph starting at can not * lead to . Print an error and return 0 if it does. @@ -1054,9 +968,6 @@ check_noncircular(struct lock_class *source, unsigned int depth) { struct lock_list *entry; - if (lockdep_dependency_visit(source, depth)) - return 1; - debug_atomic_inc(&nr_cyclic_check_recursions); if (depth > max_recursion_depth) max_recursion_depth = depth; @@ -1066,7 +977,7 @@ check_noncircular(struct lock_class *source, unsigned int depth) * Check this lock's dependency list: */ list_for_each_entry(entry, &source->locks_after, entry) { - if (entry->class == hlock_class(check_target)) + if (entry->class == check_target->class) return print_circular_bug_header(entry, depth+1); debug_atomic_inc(&nr_cyclic_checks); if (!check_noncircular(entry->class, depth+1)) @@ -1100,9 +1011,6 @@ find_usage_forwards(struct lock_class *source, unsigned int depth) struct lock_list *entry; int ret; - if (lockdep_dependency_visit(source, depth)) - return 1; - if (depth > max_recursion_depth) max_recursion_depth = depth; if (depth >= RECURSION_LIMIT) @@ -1142,9 +1050,6 @@ find_usage_backwards(struct lock_class *source, unsigned int depth) struct lock_list *entry; int ret; - if (lockdep_dependency_visit(source, depth)) - return 1; - if (!__raw_spin_is_locked(&lockdep_lock)) return DEBUG_LOCKS_WARN_ON(1); @@ -1159,11 +1064,6 @@ find_usage_backwards(struct lock_class *source, unsigned int depth) return 2; } - if (!source && debug_locks_off_graph_unlock()) { - WARN_ON(1); - return 0; - } - /* * Check this lock's dependency list: */ @@ -1203,9 +1103,9 @@ print_bad_irq_dependency(struct task_struct *curr, printk("\nand this task is already holding:\n"); print_lock(prev); printk("which would create a new lock dependency:\n"); - print_lock_name(hlock_class(prev)); + print_lock_name(prev->class); printk(" ->"); - print_lock_name(hlock_class(next)); + print_lock_name(next->class); printk("\n"); printk("\nbut this new dependency connects a %s-irq-safe lock:\n", @@ -1246,12 +1146,12 @@ check_usage(struct task_struct *curr, struct held_lock *prev, find_usage_bit = bit_backwards; /* fills in */ - ret = find_usage_backwards(hlock_class(prev), 0); + ret = find_usage_backwards(prev->class, 0); if (!ret || ret == 1) return ret; find_usage_bit = bit_forwards; - ret = find_usage_forwards(hlock_class(next), 0); + ret = find_usage_forwards(next->class, 0); if (!ret || ret == 1) return ret; /* ret == 2 */ @@ -1372,32 +1272,18 @@ check_deadlock(struct task_struct *curr, struct held_lock *next, struct lockdep_map *next_instance, int read) { struct held_lock *prev; - struct held_lock *nest = NULL; int i; for (i = 0; i < curr->lockdep_depth; i++) { prev = curr->held_locks + i; - - if (prev->instance == next->nest_lock) - nest = prev; - - if (hlock_class(prev) != hlock_class(next)) + if (prev->class != next->class) continue; - /* * Allow read-after-read recursion of the same * lock class (i.e. read_lock(lock)+read_lock(lock)): */ if ((read == 2) && prev->read) return 2; - - /* - * We're holding the nest_lock, which serializes this lock's - * nesting behaviour. - */ - if (nest) - return 2; - return print_deadlock_bug(curr, prev, next); } return 1; @@ -1443,7 +1329,7 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev, */ check_source = next; check_target = prev; - if (!(check_noncircular(hlock_class(next), 0))) + if (!(check_noncircular(next->class, 0))) return print_circular_bug_tail(); if (!check_prev_add_irq(curr, prev, next)) @@ -1467,8 +1353,8 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev, * chains - the second one will be new, but L1 already has * L2 added to its dependency list, due to the first chain.) */ - list_for_each_entry(entry, &hlock_class(prev)->locks_after, entry) { - if (entry->class == hlock_class(next)) { + list_for_each_entry(entry, &prev->class->locks_after, entry) { + if (entry->class == next->class) { if (distance == 1) entry->distance = 1; return 2; @@ -1479,28 +1365,26 @@ check_prev_add(struct task_struct *curr, struct held_lock *prev, * Ok, all validations passed, add the new lock * to the previous lock's dependency list: */ - ret = add_lock_to_list(hlock_class(prev), hlock_class(next), - &hlock_class(prev)->locks_after, - next->acquire_ip, distance); + ret = add_lock_to_list(prev->class, next->class, + &prev->class->locks_after, next->acquire_ip, distance); if (!ret) return 0; - ret = add_lock_to_list(hlock_class(next), hlock_class(prev), - &hlock_class(next)->locks_before, - next->acquire_ip, distance); + ret = add_lock_to_list(next->class, prev->class, + &next->class->locks_before, next->acquire_ip, distance); if (!ret) return 0; /* * Debugging printouts: */ - if (verbose(hlock_class(prev)) || verbose(hlock_class(next))) { + if (verbose(prev->class) || verbose(next->class)) { graph_unlock(); printk("\n new dependency: "); - print_lock_name(hlock_class(prev)); + print_lock_name(prev->class); printk(" => "); - print_lock_name(hlock_class(next)); + print_lock_name(next->class); printk("\n"); dump_stack(); return graph_lock(); @@ -1597,7 +1481,7 @@ static inline int lookup_chain_cache(struct task_struct *curr, struct held_lock *hlock, u64 chain_key) { - struct lock_class *class = hlock_class(hlock); + struct lock_class *class = hlock->class; struct list_head *hash_head = chainhashentry(chain_key); struct lock_chain *chain; struct held_lock *hlock_curr, *hlock_next; @@ -1670,7 +1554,7 @@ static inline int lookup_chain_cache(struct task_struct *curr, if (likely(cn + chain->depth <= MAX_LOCKDEP_CHAIN_HLOCKS)) { chain->base = cn; for (j = 0; j < chain->depth - 1; j++, i++) { - int lock_id = curr->held_locks[i].class_idx - 1; + int lock_id = curr->held_locks[i].class - lock_classes; chain_hlocks[chain->base + j] = lock_id; } chain_hlocks[chain->base + j] = class - lock_classes; @@ -1766,7 +1650,7 @@ static void check_chain_key(struct task_struct *curr) WARN_ON(1); return; } - id = hlock->class_idx - 1; + id = hlock->class - lock_classes; if (DEBUG_LOCKS_WARN_ON(id >= MAX_LOCKDEP_KEYS)) return; @@ -1811,7 +1695,7 @@ print_usage_bug(struct task_struct *curr, struct held_lock *this, print_lock(this); printk("{%s} state was registered at:\n", usage_str[prev_bit]); - print_stack_trace(hlock_class(this)->usage_traces + prev_bit, 1); + print_stack_trace(this->class->usage_traces + prev_bit, 1); print_irqtrace_events(curr); printk("\nother info that might help us debug this:\n"); @@ -1830,7 +1714,7 @@ static inline int valid_state(struct task_struct *curr, struct held_lock *this, enum lock_usage_bit new_bit, enum lock_usage_bit bad_bit) { - if (unlikely(hlock_class(this)->usage_mask & (1 << bad_bit))) + if (unlikely(this->class->usage_mask & (1 << bad_bit))) return print_usage_bug(curr, this, bad_bit, new_bit); return 1; } @@ -1869,7 +1753,7 @@ print_irq_inversion_bug(struct task_struct *curr, struct lock_class *other, lockdep_print_held_locks(curr); printk("\nthe first lock's dependencies:\n"); - print_lock_dependencies(hlock_class(this), 0); + print_lock_dependencies(this->class, 0); printk("\nthe second lock's dependencies:\n"); print_lock_dependencies(other, 0); @@ -1892,7 +1776,7 @@ check_usage_forwards(struct task_struct *curr, struct held_lock *this, find_usage_bit = bit; /* fills in */ - ret = find_usage_forwards(hlock_class(this), 0); + ret = find_usage_forwards(this->class, 0); if (!ret || ret == 1) return ret; @@ -1911,7 +1795,7 @@ check_usage_backwards(struct task_struct *curr, struct held_lock *this, find_usage_bit = bit; /* fills in */ - ret = find_usage_backwards(hlock_class(this), 0); + ret = find_usage_backwards(this->class, 0); if (!ret || ret == 1) return ret; @@ -1977,7 +1861,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this, LOCK_ENABLED_HARDIRQS_READ, "hard-read")) return 0; #endif - if (hardirq_verbose(hlock_class(this))) + if (hardirq_verbose(this->class)) ret = 2; break; case LOCK_USED_IN_SOFTIRQ: @@ -2002,7 +1886,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this, LOCK_ENABLED_SOFTIRQS_READ, "soft-read")) return 0; #endif - if (softirq_verbose(hlock_class(this))) + if (softirq_verbose(this->class)) ret = 2; break; case LOCK_USED_IN_HARDIRQ_READ: @@ -2015,7 +1899,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this, if (!check_usage_forwards(curr, this, LOCK_ENABLED_HARDIRQS, "hard")) return 0; - if (hardirq_verbose(hlock_class(this))) + if (hardirq_verbose(this->class)) ret = 2; break; case LOCK_USED_IN_SOFTIRQ_READ: @@ -2028,7 +1912,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this, if (!check_usage_forwards(curr, this, LOCK_ENABLED_SOFTIRQS, "soft")) return 0; - if (softirq_verbose(hlock_class(this))) + if (softirq_verbose(this->class)) ret = 2; break; case LOCK_ENABLED_HARDIRQS: @@ -2054,7 +1938,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this, LOCK_USED_IN_HARDIRQ_READ, "hard-read")) return 0; #endif - if (hardirq_verbose(hlock_class(this))) + if (hardirq_verbose(this->class)) ret = 2; break; case LOCK_ENABLED_SOFTIRQS: @@ -2080,7 +1964,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this, LOCK_USED_IN_SOFTIRQ_READ, "soft-read")) return 0; #endif - if (softirq_verbose(hlock_class(this))) + if (softirq_verbose(this->class)) ret = 2; break; case LOCK_ENABLED_HARDIRQS_READ: @@ -2095,7 +1979,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this, LOCK_USED_IN_HARDIRQ, "hard")) return 0; #endif - if (hardirq_verbose(hlock_class(this))) + if (hardirq_verbose(this->class)) ret = 2; break; case LOCK_ENABLED_SOFTIRQS_READ: @@ -2110,7 +1994,7 @@ static int mark_lock_irq(struct task_struct *curr, struct held_lock *this, LOCK_USED_IN_SOFTIRQ, "soft")) return 0; #endif - if (softirq_verbose(hlock_class(this))) + if (softirq_verbose(this->class)) ret = 2; break; default: @@ -2426,7 +2310,7 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, * If already set then do not dirty the cacheline, * nor do any checks: */ - if (likely(hlock_class(this)->usage_mask & new_mask)) + if (likely(this->class->usage_mask & new_mask)) return 1; if (!graph_lock()) @@ -2434,14 +2318,14 @@ static int mark_lock(struct task_struct *curr, struct held_lock *this, /* * Make sure we didnt race: */ - if (unlikely(hlock_class(this)->usage_mask & new_mask)) { + if (unlikely(this->class->usage_mask & new_mask)) { graph_unlock(); return 1; } - hlock_class(this)->usage_mask |= new_mask; + this->class->usage_mask |= new_mask; - if (!save_trace(hlock_class(this)->usage_traces + new_bit)) + if (!save_trace(this->class->usage_traces + new_bit)) return 0; switch (new_bit) { @@ -2521,7 +2405,7 @@ EXPORT_SYMBOL_GPL(lockdep_init_map); */ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, int trylock, int read, int check, int hardirqs_off, - struct lockdep_map *nest_lock, unsigned long ip) + unsigned long ip) { struct task_struct *curr = current; struct lock_class *class = NULL; @@ -2575,12 +2459,10 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, return 0; hlock = curr->held_locks + depth; - if (DEBUG_LOCKS_WARN_ON(!class)) - return 0; - hlock->class_idx = class - lock_classes + 1; + + hlock->class = class; hlock->acquire_ip = ip; hlock->instance = lock; - hlock->nest_lock = nest_lock; hlock->trylock = trylock; hlock->read = read; hlock->check = check; @@ -2692,55 +2574,6 @@ static int check_unlock(struct task_struct *curr, struct lockdep_map *lock, return 1; } -static int -__lock_set_subclass(struct lockdep_map *lock, - unsigned int subclass, unsigned long ip) -{ - struct task_struct *curr = current; - struct held_lock *hlock, *prev_hlock; - struct lock_class *class; - unsigned int depth; - int i; - - depth = curr->lockdep_depth; - if (DEBUG_LOCKS_WARN_ON(!depth)) - return 0; - - prev_hlock = NULL; - for (i = depth-1; i >= 0; i--) { - hlock = curr->held_locks + i; - /* - * We must not cross into another context: - */ - if (prev_hlock && prev_hlock->irq_context != hlock->irq_context) - break; - if (hlock->instance == lock) - goto found_it; - prev_hlock = hlock; - } - return print_unlock_inbalance_bug(curr, lock, ip); - -found_it: - class = register_lock_class(lock, subclass, 0); - hlock->class_idx = class - lock_classes + 1; - - curr->lockdep_depth = i; - curr->curr_chain_key = hlock->prev_chain_key; - - for (; i < depth; i++) { - hlock = curr->held_locks + i; - if (!__lock_acquire(hlock->instance, - hlock_class(hlock)->subclass, hlock->trylock, - hlock->read, hlock->check, hlock->hardirqs_off, - hlock->nest_lock, hlock->acquire_ip)) - return 0; - } - - if (DEBUG_LOCKS_WARN_ON(curr->lockdep_depth != depth)) - return 0; - return 1; -} - /* * Remove the lock to the list of currently held locks in a * potentially non-nested (out of order) manner. This is a @@ -2791,9 +2624,9 @@ lock_release_non_nested(struct task_struct *curr, for (i++; i < depth; i++) { hlock = curr->held_locks + i; if (!__lock_acquire(hlock->instance, - hlock_class(hlock)->subclass, hlock->trylock, + hlock->class->subclass, hlock->trylock, hlock->read, hlock->check, hlock->hardirqs_off, - hlock->nest_lock, hlock->acquire_ip)) + hlock->acquire_ip)) return 0; } @@ -2836,7 +2669,7 @@ static int lock_release_nested(struct task_struct *curr, #ifdef CONFIG_DEBUG_LOCKDEP hlock->prev_chain_key = 0; - hlock->class_idx = 0; + hlock->class = NULL; hlock->acquire_ip = 0; hlock->irq_context = 0; #endif @@ -2905,36 +2738,18 @@ static void check_flags(unsigned long flags) #endif } -void -lock_set_subclass(struct lockdep_map *lock, - unsigned int subclass, unsigned long ip) -{ - unsigned long flags; - - if (unlikely(current->lockdep_recursion)) - return; - - raw_local_irq_save(flags); - current->lockdep_recursion = 1; - check_flags(flags); - if (__lock_set_subclass(lock, subclass, ip)) - check_chain_key(current); - current->lockdep_recursion = 0; - raw_local_irq_restore(flags); -} - -EXPORT_SYMBOL_GPL(lock_set_subclass); - /* * We are not always called with irqs disabled - do that here, * and also avoid lockdep recursion: */ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, - int trylock, int read, int check, - struct lockdep_map *nest_lock, unsigned long ip) + int trylock, int read, int check, unsigned long ip) { unsigned long flags; + if (unlikely(!lock_stat && !prove_locking)) + return; + if (unlikely(current->lockdep_recursion)) return; @@ -2943,7 +2758,7 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, current->lockdep_recursion = 1; __lock_acquire(lock, subclass, trylock, read, check, - irqs_disabled_flags(flags), nest_lock, ip); + irqs_disabled_flags(flags), ip); current->lockdep_recursion = 0; raw_local_irq_restore(flags); } @@ -2955,6 +2770,9 @@ void lock_release(struct lockdep_map *lock, int nested, { unsigned long flags; + if (unlikely(!lock_stat && !prove_locking)) + return; + if (unlikely(current->lockdep_recursion)) return; @@ -3027,9 +2845,9 @@ __lock_contended(struct lockdep_map *lock, unsigned long ip) found_it: hlock->waittime_stamp = sched_clock(); - point = lock_contention_point(hlock_class(hlock), ip); + point = lock_contention_point(hlock->class, ip); - stats = get_lock_stats(hlock_class(hlock)); + stats = get_lock_stats(hlock->class); if (point < ARRAY_SIZE(stats->contention_point)) stats->contention_point[i]++; if (lock->cpu != smp_processor_id()) @@ -3075,7 +2893,7 @@ __lock_acquired(struct lockdep_map *lock) hlock->holdtime_stamp = now; } - stats = get_lock_stats(hlock_class(hlock)); + stats = get_lock_stats(hlock->class); if (waittime) { if (hlock->read) lock_time_inc(&stats->read_waittime, waittime); @@ -3170,7 +2988,6 @@ static void zap_class(struct lock_class *class) list_del_rcu(&class->hash_entry); list_del_rcu(&class->lock_entry); - class->key = NULL; } static inline int within(const void *addr, void *start, unsigned long size) diff --git a/trunk/kernel/lockdep_internals.h b/trunk/kernel/lockdep_internals.h index 55db193d366d..c3600a091a28 100644 --- a/trunk/kernel/lockdep_internals.h +++ b/trunk/kernel/lockdep_internals.h @@ -17,6 +17,9 @@ */ #define MAX_LOCKDEP_ENTRIES 8192UL +#define MAX_LOCKDEP_KEYS_BITS 11 +#define MAX_LOCKDEP_KEYS (1UL << MAX_LOCKDEP_KEYS_BITS) + #define MAX_LOCKDEP_CHAINS_BITS 14 #define MAX_LOCKDEP_CHAINS (1UL << MAX_LOCKDEP_CHAINS_BITS) @@ -50,9 +53,6 @@ extern unsigned int nr_process_chains; extern unsigned int max_lockdep_depth; extern unsigned int max_recursion_depth; -extern unsigned long lockdep_count_forward_deps(struct lock_class *); -extern unsigned long lockdep_count_backward_deps(struct lock_class *); - #ifdef CONFIG_DEBUG_LOCKDEP /* * Various lockdep statistics: diff --git a/trunk/kernel/lockdep_proc.c b/trunk/kernel/lockdep_proc.c index fa19aee604c2..9b0e940e2545 100644 --- a/trunk/kernel/lockdep_proc.c +++ b/trunk/kernel/lockdep_proc.c @@ -63,6 +63,34 @@ static void l_stop(struct seq_file *m, void *v) { } +static unsigned long count_forward_deps(struct lock_class *class) +{ + struct lock_list *entry; + unsigned long ret = 1; + + /* + * Recurse this class's dependency list: + */ + list_for_each_entry(entry, &class->locks_after, entry) + ret += count_forward_deps(entry->class); + + return ret; +} + +static unsigned long count_backward_deps(struct lock_class *class) +{ + struct lock_list *entry; + unsigned long ret = 1; + + /* + * Recurse this class's dependency list: + */ + list_for_each_entry(entry, &class->locks_before, entry) + ret += count_backward_deps(entry->class); + + return ret; +} + static void print_name(struct seq_file *m, struct lock_class *class) { char str[128]; @@ -96,10 +124,10 @@ static int l_show(struct seq_file *m, void *v) #ifdef CONFIG_DEBUG_LOCKDEP seq_printf(m, " OPS:%8ld", class->ops); #endif - nr_forward_deps = lockdep_count_forward_deps(class); + nr_forward_deps = count_forward_deps(class); seq_printf(m, " FD:%5ld", nr_forward_deps); - nr_backward_deps = lockdep_count_backward_deps(class); + nr_backward_deps = count_backward_deps(class); seq_printf(m, " BD:%5ld", nr_backward_deps); get_usage_chars(class, &c1, &c2, &c3, &c4); @@ -201,9 +229,6 @@ static int lc_show(struct seq_file *m, void *v) for (i = 0; i < chain->depth; i++) { class = lock_chain_get_class(chain, i); - if (!class->key) - continue; - seq_printf(m, "[%p] ", class->key); print_name(m, class); seq_puts(m, "\n"); @@ -325,7 +350,7 @@ static int lockdep_stats_show(struct seq_file *m, void *v) if (class->usage_mask & LOCKF_ENABLED_HARDIRQS_READ) nr_hardirq_read_unsafe++; - sum_forward_deps += lockdep_count_forward_deps(class); + sum_forward_deps += count_forward_deps(class); } #ifdef CONFIG_DEBUG_LOCKDEP DEBUG_LOCKS_WARN_ON(debug_atomic_read(&nr_unused_locks) != nr_unused); diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index 08864d257eb0..61d212120df4 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -2288,7 +2288,7 @@ sys_init_module(void __user *umod, /* Start the module */ if (mod->init != NULL) - ret = do_one_initcall(mod->init); + ret = mod->init(); if (ret < 0) { /* Init routine failed: abort. Try to protect us from buggy refcounters. */ diff --git a/trunk/kernel/posix-timers.c b/trunk/kernel/posix-timers.c index e36d5798cbff..9a21681aa80f 100644 --- a/trunk/kernel/posix-timers.c +++ b/trunk/kernel/posix-timers.c @@ -289,29 +289,21 @@ void do_schedule_next_timer(struct siginfo *info) else schedule_next_timer(timr); - info->si_overrun += timr->it_overrun_last; + info->si_overrun = timr->it_overrun_last; } if (timr) unlock_timer(timr, flags); } -int posix_timer_event(struct k_itimer *timr, int si_private) +int posix_timer_event(struct k_itimer *timr,int si_private) { - /* - * FIXME: if ->sigq is queued we can race with - * dequeue_signal()->do_schedule_next_timer(). - * - * If dequeue_signal() sees the "right" value of - * si_sys_private it calls do_schedule_next_timer(). - * We re-queue ->sigq and drop ->it_lock(). - * do_schedule_next_timer() locks the timer - * and re-schedules it while ->sigq is pending. - * Not really bad, but not that we want. - */ + memset(&timr->sigq->info, 0, sizeof(siginfo_t)); timr->sigq->info.si_sys_private = si_private; + /* Send signal to the process that owns this timer.*/ timr->sigq->info.si_signo = timr->it_sigev_signo; + timr->sigq->info.si_errno = 0; timr->sigq->info.si_code = SI_TIMER; timr->sigq->info.si_tid = timr->it_id; timr->sigq->info.si_value = timr->it_sigev_value; @@ -443,7 +435,6 @@ static struct k_itimer * alloc_posix_timer(void) kmem_cache_free(posix_timers_cache, tmr); tmr = NULL; } - memset(&tmr->sigq->info, 0, sizeof(siginfo_t)); return tmr; } diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index d601fb0406ca..04160d277e7a 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -600,6 +600,7 @@ struct rq { /* BKL stats */ unsigned int bkl_count; #endif + struct lock_class_key rq_lock_key; }; static DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); @@ -833,7 +834,7 @@ static inline u64 global_rt_period(void) static inline u64 global_rt_runtime(void) { - if (sysctl_sched_rt_runtime < 0) + if (sysctl_sched_rt_period < 0) return RUNTIME_INF; return (u64)sysctl_sched_rt_runtime * NSEC_PER_USEC; @@ -2758,10 +2759,10 @@ static void double_rq_lock(struct rq *rq1, struct rq *rq2) } else { if (rq1 < rq2) { spin_lock(&rq1->lock); - spin_lock_nested(&rq2->lock, SINGLE_DEPTH_NESTING); + spin_lock(&rq2->lock); } else { spin_lock(&rq2->lock); - spin_lock_nested(&rq1->lock, SINGLE_DEPTH_NESTING); + spin_lock(&rq1->lock); } } update_rq_clock(rq1); @@ -2804,21 +2805,14 @@ static int double_lock_balance(struct rq *this_rq, struct rq *busiest) if (busiest < this_rq) { spin_unlock(&this_rq->lock); spin_lock(&busiest->lock); - spin_lock_nested(&this_rq->lock, SINGLE_DEPTH_NESTING); + spin_lock(&this_rq->lock); ret = 1; } else - spin_lock_nested(&busiest->lock, SINGLE_DEPTH_NESTING); + spin_lock(&busiest->lock); } return ret; } -static void double_unlock_balance(struct rq *this_rq, struct rq *busiest) - __releases(busiest->lock) -{ - spin_unlock(&busiest->lock); - lock_set_subclass(&this_rq->lock.dep_map, 0, _RET_IP_); -} - /* * If dest_cpu is allowed for this process, migrate the task to it. * This is accomplished by forcing the cpu_allowed mask to only @@ -3643,7 +3637,7 @@ load_balance_newidle(int this_cpu, struct rq *this_rq, struct sched_domain *sd, ld_moved = move_tasks(this_rq, this_cpu, busiest, imbalance, sd, CPU_NEWLY_IDLE, &all_pinned); - double_unlock_balance(this_rq, busiest); + spin_unlock(&busiest->lock); if (unlikely(all_pinned)) { cpu_clear(cpu_of(busiest), *cpus); @@ -3758,7 +3752,7 @@ static void active_load_balance(struct rq *busiest_rq, int busiest_cpu) else schedstat_inc(sd, alb_failed); } - double_unlock_balance(busiest_rq, target_rq); + spin_unlock(&target_rq->lock); } #ifdef CONFIG_NO_HZ @@ -8006,6 +8000,7 @@ void __init sched_init(void) rq = cpu_rq(i); spin_lock_init(&rq->lock); + lockdep_set_class(&rq->lock, &rq->rq_lock_key); rq->nr_running = 0; init_cfs_rq(&rq->cfs, rq); init_rt_rq(&rq->rt, rq); diff --git a/trunk/kernel/sched_clock.c b/trunk/kernel/sched_clock.c index 204991a0bfa7..22ed55d1167f 100644 --- a/trunk/kernel/sched_clock.c +++ b/trunk/kernel/sched_clock.c @@ -32,20 +32,14 @@ #include #include -/* - * Scheduler clock - returns current time in nanosec units. - * This is default implementation. - * Architectures and sub-architectures can override this. - */ -unsigned long long __attribute__((weak)) sched_clock(void) -{ - return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); -} - -static __read_mostly int sched_clock_running; #ifdef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK +#define MULTI_SHIFT 15 +/* Max is double, Min is 1/2 */ +#define MAX_MULTI (2LL << MULTI_SHIFT) +#define MIN_MULTI (1LL << (MULTI_SHIFT-1)) + struct sched_clock_data { /* * Raw spinlock - this is a special case: this might be called @@ -55,9 +49,14 @@ struct sched_clock_data { raw_spinlock_t lock; unsigned long tick_jiffies; + u64 prev_raw; u64 tick_raw; u64 tick_gtod; u64 clock; + s64 multi; +#ifdef CONFIG_NO_HZ + int check_max; +#endif }; static DEFINE_PER_CPU_SHARED_ALIGNED(struct sched_clock_data, sched_clock_data); @@ -72,6 +71,8 @@ static inline struct sched_clock_data *cpu_sdc(int cpu) return &per_cpu(sched_clock_data, cpu); } +static __read_mostly int sched_clock_running; + void sched_clock_init(void) { u64 ktime_now = ktime_to_ns(ktime_get()); @@ -83,39 +84,90 @@ void sched_clock_init(void) scd->lock = (raw_spinlock_t)__RAW_SPIN_LOCK_UNLOCKED; scd->tick_jiffies = now_jiffies; + scd->prev_raw = 0; scd->tick_raw = 0; scd->tick_gtod = ktime_now; scd->clock = ktime_now; + scd->multi = 1 << MULTI_SHIFT; +#ifdef CONFIG_NO_HZ + scd->check_max = 1; +#endif } sched_clock_running = 1; } +#ifdef CONFIG_NO_HZ +/* + * The dynamic ticks makes the delta jiffies inaccurate. This + * prevents us from checking the maximum time update. + * Disable the maximum check during stopped ticks. + */ +void sched_clock_tick_stop(int cpu) +{ + struct sched_clock_data *scd = cpu_sdc(cpu); + + scd->check_max = 0; +} + +void sched_clock_tick_start(int cpu) +{ + struct sched_clock_data *scd = cpu_sdc(cpu); + + scd->check_max = 1; +} + +static int check_max(struct sched_clock_data *scd) +{ + return scd->check_max; +} +#else +static int check_max(struct sched_clock_data *scd) +{ + return 1; +} +#endif /* CONFIG_NO_HZ */ + /* * update the percpu scd from the raw @now value * * - filter out backward motion * - use jiffies to generate a min,max window to clip the raw values */ -static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now) +static void __update_sched_clock(struct sched_clock_data *scd, u64 now, u64 *time) { unsigned long now_jiffies = jiffies; long delta_jiffies = now_jiffies - scd->tick_jiffies; u64 clock = scd->clock; u64 min_clock, max_clock; - s64 delta = now - scd->tick_raw; + s64 delta = now - scd->prev_raw; WARN_ON_ONCE(!irqs_disabled()); - min_clock = scd->tick_gtod + delta_jiffies * TICK_NSEC; + + /* + * At schedule tick the clock can be just under the gtod. We don't + * want to push it too prematurely. + */ + min_clock = scd->tick_gtod + (delta_jiffies * TICK_NSEC); + if (min_clock > TICK_NSEC) + min_clock -= TICK_NSEC / 2; if (unlikely(delta < 0)) { clock++; goto out; } - max_clock = min_clock + TICK_NSEC; + /* + * The clock must stay within a jiffie of the gtod. + * But since we may be at the start of a jiffy or the end of one + * we add another jiffy buffer. + */ + max_clock = scd->tick_gtod + (2 + delta_jiffies) * TICK_NSEC; + + delta *= scd->multi; + delta >>= MULTI_SHIFT; - if (unlikely(clock + delta > max_clock)) { + if (unlikely(clock + delta > max_clock) && check_max(scd)) { if (clock < max_clock) clock = max_clock; else @@ -128,10 +180,12 @@ static u64 __update_sched_clock(struct sched_clock_data *scd, u64 now) if (unlikely(clock < min_clock)) clock = min_clock; - scd->tick_jiffies = now_jiffies; - scd->clock = clock; - - return clock; + if (time) + *time = clock; + else { + scd->prev_raw = now; + scd->clock = clock; + } } static void lock_double_clock(struct sched_clock_data *data1, @@ -149,7 +203,7 @@ static void lock_double_clock(struct sched_clock_data *data1, u64 sched_clock_cpu(int cpu) { struct sched_clock_data *scd = cpu_sdc(cpu); - u64 now, clock, this_clock, remote_clock; + u64 now, clock; if (unlikely(!sched_clock_running)) return 0ull; @@ -158,44 +212,43 @@ u64 sched_clock_cpu(int cpu) now = sched_clock(); if (cpu != raw_smp_processor_id()) { + /* + * in order to update a remote cpu's clock based on our + * unstable raw time rebase it against: + * tick_raw (offset between raw counters) + * tick_gotd (tick offset between cpus) + */ struct sched_clock_data *my_scd = this_scd(); lock_double_clock(scd, my_scd); - this_clock = __update_sched_clock(my_scd, now); - remote_clock = scd->clock; + now -= my_scd->tick_raw; + now += scd->tick_raw; - /* - * Use the opportunity that we have both locks - * taken to couple the two clocks: we take the - * larger time as the latest time for both - * runqueues. (this creates monotonic movement) - */ - if (likely(remote_clock < this_clock)) { - clock = this_clock; - scd->clock = clock; - } else { - /* - * Should be rare, but possible: - */ - clock = remote_clock; - my_scd->clock = remote_clock; - } + now += my_scd->tick_gtod; + now -= scd->tick_gtod; __raw_spin_unlock(&my_scd->lock); + + __update_sched_clock(scd, now, &clock); + + __raw_spin_unlock(&scd->lock); + } else { __raw_spin_lock(&scd->lock); - clock = __update_sched_clock(scd, now); + __update_sched_clock(scd, now, NULL); + clock = scd->clock; + __raw_spin_unlock(&scd->lock); } - __raw_spin_unlock(&scd->lock); - return clock; } void sched_clock_tick(void) { struct sched_clock_data *scd = this_scd(); + unsigned long now_jiffies = jiffies; + s64 mult, delta_gtod, delta_raw; u64 now, now_gtod; if (unlikely(!sched_clock_running)) @@ -207,14 +260,29 @@ void sched_clock_tick(void) now = sched_clock(); __raw_spin_lock(&scd->lock); - __update_sched_clock(scd, now); + __update_sched_clock(scd, now, NULL); /* * update tick_gtod after __update_sched_clock() because that will * already observe 1 new jiffy; adding a new tick_gtod to that would * increase the clock 2 jiffies. */ + delta_gtod = now_gtod - scd->tick_gtod; + delta_raw = now - scd->tick_raw; + + if ((long)delta_raw > 0) { + mult = delta_gtod << MULTI_SHIFT; + do_div(mult, delta_raw); + scd->multi = mult; + if (scd->multi > MAX_MULTI) + scd->multi = MAX_MULTI; + else if (scd->multi < MIN_MULTI) + scd->multi = MIN_MULTI; + } else + scd->multi = 1 << MULTI_SHIFT; + scd->tick_raw = now; scd->tick_gtod = now_gtod; + scd->tick_jiffies = now_jiffies; __raw_spin_unlock(&scd->lock); } @@ -233,6 +301,7 @@ EXPORT_SYMBOL_GPL(sched_clock_idle_sleep_event); void sched_clock_idle_wakeup_event(u64 delta_ns) { struct sched_clock_data *scd = this_scd(); + u64 now = sched_clock(); /* * Override the previous timestamp and ignore all @@ -241,30 +310,27 @@ void sched_clock_idle_wakeup_event(u64 delta_ns) * rq clock: */ __raw_spin_lock(&scd->lock); + scd->prev_raw = now; scd->clock += delta_ns; + scd->multi = 1 << MULTI_SHIFT; __raw_spin_unlock(&scd->lock); touch_softlockup_watchdog(); } EXPORT_SYMBOL_GPL(sched_clock_idle_wakeup_event); -#else /* CONFIG_HAVE_UNSTABLE_SCHED_CLOCK */ - -void sched_clock_init(void) -{ - sched_clock_running = 1; -} +#endif -u64 sched_clock_cpu(int cpu) +/* + * Scheduler clock - returns current time in nanosec units. + * This is default implementation. + * Architectures and sub-architectures can override this. + */ +unsigned long long __attribute__((weak)) sched_clock(void) { - if (unlikely(!sched_clock_running)) - return 0; - - return sched_clock(); + return (unsigned long long)jiffies * (NSEC_PER_SEC / HZ); } -#endif - unsigned long long cpu_clock(int cpu) { unsigned long long clock; diff --git a/trunk/kernel/sched_fair.c b/trunk/kernel/sched_fair.c index fb8994c6d4bb..cf2cd6ce4cb2 100644 --- a/trunk/kernel/sched_fair.c +++ b/trunk/kernel/sched_fair.c @@ -899,7 +899,7 @@ static void hrtick_start_fair(struct rq *rq, struct task_struct *p) * doesn't make sense. Rely on vruntime for fairness. */ if (rq->curr != p) - delta = max_t(s64, 10000LL, delta); + delta = max(10000LL, delta); hrtick_start(rq, delta); } @@ -1442,23 +1442,18 @@ __load_balance_iterator(struct cfs_rq *cfs_rq, struct list_head *next) struct task_struct *p = NULL; struct sched_entity *se; - if (next == &cfs_rq->tasks) - return NULL; - - /* Skip over entities that are not tasks */ - do { + while (next != &cfs_rq->tasks) { se = list_entry(next, struct sched_entity, group_node); next = next->next; - } while (next != &cfs_rq->tasks && !entity_is_task(se)); - if (next == &cfs_rq->tasks) - return NULL; + /* Skip over entities that are not tasks */ + if (entity_is_task(se)) { + p = task_of(se); + break; + } + } cfs_rq->balance_iterator = next; - - if (entity_is_task(se)) - p = task_of(se); - return p; } diff --git a/trunk/kernel/sched_rt.c b/trunk/kernel/sched_rt.c index 6163e4cf885b..908c04f9dad0 100644 --- a/trunk/kernel/sched_rt.c +++ b/trunk/kernel/sched_rt.c @@ -861,8 +861,6 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p) #define RT_MAX_TRIES 3 static int double_lock_balance(struct rq *this_rq, struct rq *busiest); -static void double_unlock_balance(struct rq *this_rq, struct rq *busiest); - static void deactivate_task(struct rq *rq, struct task_struct *p, int sleep); static int pick_rt_task(struct rq *rq, struct task_struct *p, int cpu) @@ -1024,7 +1022,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq) break; /* try again */ - double_unlock_balance(rq, lowest_rq); + spin_unlock(&lowest_rq->lock); lowest_rq = NULL; } @@ -1093,7 +1091,7 @@ static int push_rt_task(struct rq *rq) resched_task(lowest_rq->curr); - double_unlock_balance(rq, lowest_rq); + spin_unlock(&lowest_rq->lock); ret = 1; out: @@ -1199,7 +1197,7 @@ static int pull_rt_task(struct rq *this_rq) } skip: - double_unlock_balance(this_rq, src_rq); + spin_unlock(&src_rq->lock); } return ret; diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index c539f60c6f41..954f77d7e3bc 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -1304,7 +1304,6 @@ int send_sigqueue(struct sigqueue *q, struct task_struct *t, int group) q->info.si_overrun++; goto out; } - q->info.si_overrun = 0; signalfd_notify(t, sig); pending = group ? &t->signal->shared_pending : &t->pending; diff --git a/trunk/kernel/smp.c b/trunk/kernel/smp.c index 782e2b93e465..96fc7c0edc59 100644 --- a/trunk/kernel/smp.c +++ b/trunk/kernel/smp.c @@ -135,8 +135,7 @@ void generic_smp_call_function_interrupt(void) */ smp_wmb(); data->csd.flags &= ~CSD_FLAG_WAIT; - } - if (data->csd.flags & CSD_FLAG_ALLOC) + } else call_rcu(&data->rcu_head, rcu_free_call_data); } rcu_read_unlock(); @@ -261,42 +260,6 @@ void __smp_call_function_single(int cpu, struct call_single_data *data) generic_exec_single(cpu, data); } -/* Dummy function */ -static void quiesce_dummy(void *unused) -{ -} - -/* - * Ensure stack based data used in call function mask is safe to free. - * - * This is needed by smp_call_function_mask when using on-stack data, because - * a single call function queue is shared by all CPUs, and any CPU may pick up - * the data item on the queue at any time before it is deleted. So we need to - * ensure that all CPUs have transitioned through a quiescent state after - * this call. - * - * This is a very slow function, implemented by sending synchronous IPIs to - * all possible CPUs. For this reason, we have to alloc data rather than use - * stack based data even in the case of synchronous calls. The stack based - * data is then just used for deadlock/oom fallback which will be very rare. - * - * If a faster scheme can be made, we could go back to preferring stack based - * data -- the data allocation/free is non-zero cost. - */ -static void smp_call_function_mask_quiesce_stack(cpumask_t mask) -{ - struct call_single_data data; - int cpu; - - data.func = quiesce_dummy; - data.info = NULL; - - for_each_cpu_mask(cpu, mask) { - data.flags = CSD_FLAG_WAIT; - generic_exec_single(cpu, &data); - } -} - /** * smp_call_function_mask(): Run a function on a set of other CPUs. * @mask: The set of cpus to run on. @@ -322,7 +285,6 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, cpumask_t allbutself; unsigned long flags; int cpu, num_cpus; - int slowpath = 0; /* Can deadlock when called with interrupts disabled */ WARN_ON(irqs_disabled()); @@ -344,16 +306,15 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, return smp_call_function_single(cpu, func, info, wait); } - data = kmalloc(sizeof(*data), GFP_ATOMIC); - if (data) { - data->csd.flags = CSD_FLAG_ALLOC; - if (wait) - data->csd.flags |= CSD_FLAG_WAIT; - } else { + if (!wait) { + data = kmalloc(sizeof(*data), GFP_ATOMIC); + if (data) + data->csd.flags = CSD_FLAG_ALLOC; + } + if (!data) { data = &d; data->csd.flags = CSD_FLAG_WAIT; wait = 1; - slowpath = 1; } spin_lock_init(&data->lock); @@ -370,11 +331,8 @@ int smp_call_function_mask(cpumask_t mask, void (*func)(void *), void *info, arch_send_call_function_ipi(mask); /* optionally wait for the CPUs to complete */ - if (wait) { + if (wait) csd_flag_wait(&data->csd); - if (unlikely(slowpath)) - smp_call_function_mask_quiesce_stack(mask); - } return 0; } diff --git a/trunk/kernel/spinlock.c b/trunk/kernel/spinlock.c index 44baeea94ab9..a1fb54c93cdd 100644 --- a/trunk/kernel/spinlock.c +++ b/trunk/kernel/spinlock.c @@ -292,7 +292,6 @@ void __lockfunc _spin_lock_nested(spinlock_t *lock, int subclass) } EXPORT_SYMBOL(_spin_lock_nested); - unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclass) { unsigned long flags; @@ -315,16 +314,6 @@ unsigned long __lockfunc _spin_lock_irqsave_nested(spinlock_t *lock, int subclas EXPORT_SYMBOL(_spin_lock_irqsave_nested); -void __lockfunc _spin_lock_nest_lock(spinlock_t *lock, - struct lockdep_map *nest_lock) -{ - preempt_disable(); - spin_acquire_nest(&lock->dep_map, 0, 0, nest_lock, _RET_IP_); - LOCK_CONTENDED(lock, _raw_spin_trylock, _raw_spin_lock); -} - -EXPORT_SYMBOL(_spin_lock_nest_lock); - #endif void __lockfunc _spin_unlock(spinlock_t *lock) diff --git a/trunk/kernel/stop_machine.c b/trunk/kernel/stop_machine.c index af3c7cea258b..e446c7c7d6a9 100644 --- a/trunk/kernel/stop_machine.c +++ b/trunk/kernel/stop_machine.c @@ -65,6 +65,7 @@ static void ack_state(void) static int stop_cpu(struct stop_machine_data *smdata) { enum stopmachine_state curstate = STOPMACHINE_NONE; + int uninitialized_var(ret); /* Simple state machine */ do { diff --git a/trunk/kernel/time/tick-sched.c b/trunk/kernel/time/tick-sched.c index f5da526424a9..825b4c00fe44 100644 --- a/trunk/kernel/time/tick-sched.c +++ b/trunk/kernel/time/tick-sched.c @@ -289,6 +289,7 @@ void tick_nohz_stop_sched_tick(int inidle) ts->tick_stopped = 1; ts->idle_jiffies = last_jiffies; rcu_enter_nohz(); + sched_clock_tick_stop(cpu); } /* @@ -391,6 +392,7 @@ void tick_nohz_restart_sched_tick(void) select_nohz_load_balancer(0); now = ktime_get(); tick_do_update_jiffies64(now); + sched_clock_tick_start(cpu); cpu_clear(cpu, nohz_cpu_mask); /* diff --git a/trunk/kernel/workqueue.c b/trunk/kernel/workqueue.c index 4048e92aa04f..4a26a1382df0 100644 --- a/trunk/kernel/workqueue.c +++ b/trunk/kernel/workqueue.c @@ -290,11 +290,11 @@ static void run_workqueue(struct cpu_workqueue_struct *cwq) BUG_ON(get_wq_data(work) != cwq); work_clear_pending(work); - lock_map_acquire(&cwq->wq->lockdep_map); - lock_map_acquire(&lockdep_map); + lock_acquire(&cwq->wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_); + lock_acquire(&lockdep_map, 0, 0, 0, 2, _THIS_IP_); f(work); - lock_map_release(&lockdep_map); - lock_map_release(&cwq->wq->lockdep_map); + lock_release(&lockdep_map, 1, _THIS_IP_); + lock_release(&cwq->wq->lockdep_map, 1, _THIS_IP_); if (unlikely(in_atomic() || lockdep_depth(current) > 0)) { printk(KERN_ERR "BUG: workqueue leaked lock or atomic: " @@ -413,8 +413,8 @@ void flush_workqueue(struct workqueue_struct *wq) int cpu; might_sleep(); - lock_map_acquire(&wq->lockdep_map); - lock_map_release(&wq->lockdep_map); + lock_acquire(&wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_); + lock_release(&wq->lockdep_map, 1, _THIS_IP_); for_each_cpu_mask_nr(cpu, *cpu_map) flush_cpu_workqueue(per_cpu_ptr(wq->cpu_wq, cpu)); } @@ -441,8 +441,8 @@ int flush_work(struct work_struct *work) if (!cwq) return 0; - lock_map_acquire(&cwq->wq->lockdep_map); - lock_map_release(&cwq->wq->lockdep_map); + lock_acquire(&cwq->wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_); + lock_release(&cwq->wq->lockdep_map, 1, _THIS_IP_); prev = NULL; spin_lock_irq(&cwq->lock); @@ -536,8 +536,8 @@ static void wait_on_work(struct work_struct *work) might_sleep(); - lock_map_acquire(&work->lockdep_map); - lock_map_release(&work->lockdep_map); + lock_acquire(&work->lockdep_map, 0, 0, 0, 2, _THIS_IP_); + lock_release(&work->lockdep_map, 1, _THIS_IP_); cwq = get_wq_data(work); if (!cwq) @@ -872,8 +872,8 @@ static void cleanup_workqueue_thread(struct cpu_workqueue_struct *cwq) if (cwq->thread == NULL) return; - lock_map_acquire(&cwq->wq->lockdep_map); - lock_map_release(&cwq->wq->lockdep_map); + lock_acquire(&cwq->wq->lockdep_map, 0, 0, 0, 2, _THIS_IP_); + lock_release(&cwq->wq->lockdep_map, 1, _THIS_IP_); flush_cpu_workqueue(cwq); /* diff --git a/trunk/lib/Kconfig.debug b/trunk/lib/Kconfig.debug index 800ac8485544..e1d4764435ed 100644 --- a/trunk/lib/Kconfig.debug +++ b/trunk/lib/Kconfig.debug @@ -735,15 +735,6 @@ config FIREWIRE_OHCI_REMOTE_DMA If unsure, say N. -menuconfig BUILD_DOCSRC - bool "Build targets in Documentation/ tree" - depends on HEADERS_CHECK - help - This option attempts to build objects from the source files in the - kernel Documentation/ tree. - - Say N if you are unsure. - source "samples/Kconfig" source "lib/Kconfig.kgdb" diff --git a/trunk/lib/bitmap.c b/trunk/lib/bitmap.c index 06fb57c86de0..482df94ea21e 100644 --- a/trunk/lib/bitmap.c +++ b/trunk/lib/bitmap.c @@ -315,17 +315,6 @@ int bitmap_scnprintf(char *buf, unsigned int buflen, } EXPORT_SYMBOL(bitmap_scnprintf); -/** - * bitmap_scnprintf_len - return buffer length needed to convert - * bitmap to an ASCII hex string - * @nr_bits: number of bits to be converted - */ -int bitmap_scnprintf_len(unsigned int nr_bits) -{ - unsigned int nr_nibbles = ALIGN(nr_bits, 4) / 4; - return nr_nibbles + ALIGN(nr_nibbles, CHUNKSZ / 4) / (CHUNKSZ / 4) - 1; -} - /** * __bitmap_parse - convert an ASCII hex string into a bitmap. * @buf: pointer to buffer containing string. diff --git a/trunk/lib/debug_locks.c b/trunk/lib/debug_locks.c index 0218b4693dd8..0ef01d14727c 100644 --- a/trunk/lib/debug_locks.c +++ b/trunk/lib/debug_locks.c @@ -8,7 +8,6 @@ * * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar */ -#include #include #include #include @@ -38,7 +37,6 @@ int debug_locks_off(void) { if (xchg(&debug_locks, 0)) { if (!debug_locks_silent) { - oops_in_progress = 1; console_verbose(); return 1; } diff --git a/trunk/lib/vsprintf.c b/trunk/lib/vsprintf.c index d8d1d1142248..1dc2d1d18fa8 100644 --- a/trunk/lib/vsprintf.c +++ b/trunk/lib/vsprintf.c @@ -220,7 +220,7 @@ int strict_strtou##type(const char *cp, unsigned int base, valtype *res)\ if (len == 0) \ return -EINVAL; \ \ - val = simple_strtou##type(cp, &tail, base); \ + val = simple_strtoul(cp, &tail, base); \ if ((*tail == '\0') || \ ((len == (size_t)(tail - cp) + 1) && (*tail == '\n'))) {\ *res = val; \ diff --git a/trunk/mm/Kconfig b/trunk/mm/Kconfig index 0bd9c2dbb2a0..446c6588c753 100644 --- a/trunk/mm/Kconfig +++ b/trunk/mm/Kconfig @@ -77,6 +77,9 @@ config FLAT_NODE_MEM_MAP def_bool y depends on !SPARSEMEM +config HAVE_GET_USER_PAGES_FAST + bool + # # Both the NUMA code and DISCONTIGMEM use arrays of pg_data_t's # to represent different areas of memory. This variable allows diff --git a/trunk/mm/hugetlb.c b/trunk/mm/hugetlb.c index 67a71191136e..757ca983fd99 100644 --- a/trunk/mm/hugetlb.c +++ b/trunk/mm/hugetlb.c @@ -565,7 +565,7 @@ static struct page *alloc_fresh_huge_page_node(struct hstate *h, int nid) huge_page_order(h)); if (page) { if (arch_prepare_hugepage(page)) { - __free_pages(page, huge_page_order(h)); + __free_pages(page, HUGETLB_PAGE_ORDER); return NULL; } prep_new_huge_page(h, page, nid); @@ -665,11 +665,6 @@ static struct page *alloc_buddy_huge_page(struct hstate *h, __GFP_REPEAT|__GFP_NOWARN, huge_page_order(h)); - if (page && arch_prepare_hugepage(page)) { - __free_pages(page, huge_page_order(h)); - return NULL; - } - spin_lock(&hugetlb_lock); if (page) { /* @@ -1942,18 +1937,6 @@ static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma, lock_page(page); } - /* - * If we are going to COW a private mapping later, we examine the - * pending reservations for this page now. This will ensure that - * any allocations necessary to record that reservation occur outside - * the spinlock. - */ - if (write_access && !(vma->vm_flags & VM_SHARED)) - if (vma_needs_reservation(h, vma, address) < 0) { - ret = VM_FAULT_OOM; - goto backout_unlocked; - } - spin_lock(&mm->page_table_lock); size = i_size_read(mapping->host) >> huge_page_shift(h); if (idx >= size) @@ -1979,7 +1962,6 @@ static int hugetlb_no_page(struct mm_struct *mm, struct vm_area_struct *vma, backout: spin_unlock(&mm->page_table_lock); -backout_unlocked: unlock_page(page); put_page(page); goto out; @@ -1991,7 +1973,6 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, pte_t *ptep; pte_t entry; int ret; - struct page *pagecache_page = NULL; static DEFINE_MUTEX(hugetlb_instantiation_mutex); struct hstate *h = hstate_vma(vma); @@ -2008,44 +1989,25 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, entry = huge_ptep_get(ptep); if (huge_pte_none(entry)) { ret = hugetlb_no_page(mm, vma, address, ptep, write_access); - goto out_unlock; + mutex_unlock(&hugetlb_instantiation_mutex); + return ret; } ret = 0; - /* - * If we are going to COW the mapping later, we examine the pending - * reservations for this page now. This will ensure that any - * allocations necessary to record that reservation occur outside the - * spinlock. For private mappings, we also lookup the pagecache - * page now as it is used to determine if a reservation has been - * consumed. - */ - if (write_access && !pte_write(entry)) { - if (vma_needs_reservation(h, vma, address) < 0) { - ret = VM_FAULT_OOM; - goto out_unlock; - } - - if (!(vma->vm_flags & VM_SHARED)) - pagecache_page = hugetlbfs_pagecache_page(h, - vma, address); - } - spin_lock(&mm->page_table_lock); /* Check for a racing update before calling hugetlb_cow */ if (likely(pte_same(entry, huge_ptep_get(ptep)))) - if (write_access && !pte_write(entry)) - ret = hugetlb_cow(mm, vma, address, ptep, entry, - pagecache_page); + if (write_access && !pte_write(entry)) { + struct page *page; + page = hugetlbfs_pagecache_page(h, vma, address); + ret = hugetlb_cow(mm, vma, address, ptep, entry, page); + if (page) { + unlock_page(page); + put_page(page); + } + } spin_unlock(&mm->page_table_lock); - - if (pagecache_page) { - unlock_page(pagecache_page); - put_page(pagecache_page); - } - -out_unlock: mutex_unlock(&hugetlb_instantiation_mutex); return ret; diff --git a/trunk/mm/memcontrol.c b/trunk/mm/memcontrol.c index 0f1f7a7374ba..7056c3bdb478 100644 --- a/trunk/mm/memcontrol.c +++ b/trunk/mm/memcontrol.c @@ -796,8 +796,6 @@ int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask) if (mem_cgroup_subsys.disabled) return 0; - if (!mm) - return 0; rcu_read_lock(); mem = mem_cgroup_from_task(rcu_dereference(mm->owner)); diff --git a/trunk/mm/mempolicy.c b/trunk/mm/mempolicy.c index 83369058ec13..e550bec20582 100644 --- a/trunk/mm/mempolicy.c +++ b/trunk/mm/mempolicy.c @@ -803,6 +803,7 @@ static int migrate_to_node(struct mm_struct *mm, int source, int dest, int do_migrate_pages(struct mm_struct *mm, const nodemask_t *from_nodes, const nodemask_t *to_nodes, int flags) { + LIST_HEAD(pagelist); int busy = 0; int err = 0; nodemask_t tmp; diff --git a/trunk/mm/mmap.c b/trunk/mm/mmap.c index 339cf5c4d5d8..971d0eda754a 100644 --- a/trunk/mm/mmap.c +++ b/trunk/mm/mmap.c @@ -2273,14 +2273,14 @@ int install_special_mapping(struct mm_struct *mm, static DEFINE_MUTEX(mm_all_locks_mutex); -static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma) +static void vm_lock_anon_vma(struct anon_vma *anon_vma) { if (!test_bit(0, (unsigned long *) &anon_vma->head.next)) { /* * The LSB of head.next can't change from under us * because we hold the mm_all_locks_mutex. */ - spin_lock_nest_lock(&anon_vma->lock, &mm->mmap_sem); + spin_lock(&anon_vma->lock); /* * We can safely modify head.next after taking the * anon_vma->lock. If some other vma in this mm shares @@ -2296,7 +2296,7 @@ static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma) } } -static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping) +static void vm_lock_mapping(struct address_space *mapping) { if (!test_bit(AS_MM_ALL_LOCKS, &mapping->flags)) { /* @@ -2310,7 +2310,7 @@ static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping) */ if (test_and_set_bit(AS_MM_ALL_LOCKS, &mapping->flags)) BUG(); - spin_lock_nest_lock(&mapping->i_mmap_lock, &mm->mmap_sem); + spin_lock(&mapping->i_mmap_lock); } } @@ -2355,20 +2355,14 @@ int mm_take_all_locks(struct mm_struct *mm) mutex_lock(&mm_all_locks_mutex); - for (vma = mm->mmap; vma; vma = vma->vm_next) { - if (signal_pending(current)) - goto out_unlock; - if (vma->vm_file && vma->vm_file->f_mapping) - vm_lock_mapping(mm, vma->vm_file->f_mapping); - } - for (vma = mm->mmap; vma; vma = vma->vm_next) { if (signal_pending(current)) goto out_unlock; if (vma->anon_vma) - vm_lock_anon_vma(mm, vma->anon_vma); + vm_lock_anon_vma(vma->anon_vma); + if (vma->vm_file && vma->vm_file->f_mapping) + vm_lock_mapping(vma->vm_file->f_mapping); } - ret = 0; out_unlock: diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index af982f7cdb2a..401d104d2bb6 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -4437,7 +4437,7 @@ void *__init alloc_large_system_hash(const char *tablename, do { size = bucketsize << log2qty; if (flags & HASH_EARLY) - table = alloc_bootmem_nopanic(size); + table = alloc_bootmem(size); else if (hashdist) table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL); else { diff --git a/trunk/mm/sparse.c b/trunk/mm/sparse.c index 39db301b920d..5d9dbbb9d39e 100644 --- a/trunk/mm/sparse.c +++ b/trunk/mm/sparse.c @@ -12,6 +12,7 @@ #include #include #include +#include "internal.h" /* * Permanent SPARSEMEM data: diff --git a/trunk/mm/util.c b/trunk/mm/util.c index cb00b748ce47..9341ca77bd88 100644 --- a/trunk/mm/util.c +++ b/trunk/mm/util.c @@ -171,18 +171,3 @@ void arch_pick_mmap_layout(struct mm_struct *mm) mm->unmap_area = arch_unmap_area; } #endif - -int __attribute__((weak)) get_user_pages_fast(unsigned long start, - int nr_pages, int write, struct page **pages) -{ - struct mm_struct *mm = current->mm; - int ret; - - down_read(&mm->mmap_sem); - ret = get_user_pages(current, mm, start, nr_pages, - write, 0, pages, NULL); - up_read(&mm->mmap_sem); - - return ret; -} -EXPORT_SYMBOL_GPL(get_user_pages_fast); diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index a73d6ca0a906..ef9f072b47fc 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -101,7 +101,6 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6}," "{Intel, ICH8}," "{Intel, ICH9}," "{Intel, ICH10}," - "{Intel, PCH}," "{Intel, SCH}," "{ATI, SB450}," "{ATI, SB600}," @@ -2264,8 +2263,6 @@ static struct pci_device_id azx_ids[] = { { PCI_DEVICE(0x8086, 0x293f), .driver_data = AZX_DRIVER_ICH }, { PCI_DEVICE(0x8086, 0x3a3e), .driver_data = AZX_DRIVER_ICH }, { PCI_DEVICE(0x8086, 0x3a6e), .driver_data = AZX_DRIVER_ICH }, - /* PCH */ - { PCI_DEVICE(0x8086, 0x3b56), .driver_data = AZX_DRIVER_ICH }, /* SCH */ { PCI_DEVICE(0x8086, 0x811b), .driver_data = AZX_DRIVER_SCH }, /* ATI SB 450/600 */ @@ -2275,7 +2272,6 @@ static struct pci_device_id azx_ids[] = { { PCI_DEVICE(0x1002, 0x793b), .driver_data = AZX_DRIVER_ATIHDMI }, { PCI_DEVICE(0x1002, 0x7919), .driver_data = AZX_DRIVER_ATIHDMI }, { PCI_DEVICE(0x1002, 0x960f), .driver_data = AZX_DRIVER_ATIHDMI }, - { PCI_DEVICE(0x1002, 0x970f), .driver_data = AZX_DRIVER_ATIHDMI }, { PCI_DEVICE(0x1002, 0xaa00), .driver_data = AZX_DRIVER_ATIHDMI }, { PCI_DEVICE(0x1002, 0xaa08), .driver_data = AZX_DRIVER_ATIHDMI }, { PCI_DEVICE(0x1002, 0xaa10), .driver_data = AZX_DRIVER_ATIHDMI }, diff --git a/trunk/sound/soc/codecs/wm8750.c b/trunk/sound/soc/codecs/wm8750.c index c6a8edf302ad..e23cb09f0d14 100644 --- a/trunk/sound/soc/codecs/wm8750.c +++ b/trunk/sound/soc/codecs/wm8750.c @@ -348,9 +348,8 @@ static const struct snd_soc_dapm_widget wm8750_dapm_widgets[] = { SND_SOC_DAPM_OUTPUT("ROUT1"), SND_SOC_DAPM_OUTPUT("LOUT2"), SND_SOC_DAPM_OUTPUT("ROUT2"), - SND_SOC_DAPM_OUTPUT("MONO1"), + SND_SOC_DAPM_OUTPUT("MONO"), SND_SOC_DAPM_OUTPUT("OUT3"), - SND_SOC_DAPM_OUTPUT("VREF"), SND_SOC_DAPM_INPUT("LINPUT1"), SND_SOC_DAPM_INPUT("LINPUT2"), diff --git a/trunk/sound/soc/pxa/spitz.c b/trunk/sound/soc/pxa/spitz.c index 37cb768fc933..eefc25b83514 100644 --- a/trunk/sound/soc/pxa/spitz.c +++ b/trunk/sound/soc/pxa/spitz.c @@ -297,7 +297,7 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec) snd_soc_dapm_disable_pin(codec, "LINPUT3"); snd_soc_dapm_disable_pin(codec, "RINPUT3"); snd_soc_dapm_disable_pin(codec, "OUT3"); - snd_soc_dapm_disable_pin(codec, "MONO1"); + snd_soc_dapm_disable_pin(codec, "MONO"); /* Add spitz specific controls */ for (i = 0; i < ARRAY_SIZE(wm8750_spitz_controls); i++) {