From 11145f1b937fd184ab29c973ef82e7febce83d12 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 25 May 2011 09:21:56 -0700 Subject: [PATCH] --- yaml --- r: 251298 b: refs/heads/master c: 2a651c7f8d377cf88271374315cbb5fe82eac784 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/CREDITS | 4 + trunk/Documentation/ABI/testing/sysfs-block | 64 + trunk/Documentation/ABI/testing/sysfs-ptp | 98 + trunk/Documentation/IRQ-affinity.txt | 17 +- trunk/Documentation/blockdev/cciss.txt | 15 + trunk/Documentation/cachetlb.txt | 2 +- .../devicetree/bindings/net/fsl-tsec-phy.txt | 54 + trunk/Documentation/filesystems/proc.txt | 11 +- trunk/Documentation/kernel-parameters.txt | 3 - trunk/Documentation/lockstat.txt | 2 +- trunk/Documentation/ptp/ptp.txt | 89 + trunk/Documentation/ptp/testptp.c | 381 +++ trunk/Documentation/ptp/testptp.mk | 33 + .../virtual/uml/UserModeLinux-HOWTO.txt | 10 + trunk/Documentation/vm/locking | 2 +- trunk/MAINTAINERS | 4 +- trunk/arch/Kconfig | 3 + trunk/arch/alpha/Kconfig | 4 + trunk/arch/alpha/include/asm/gpio.h | 55 + trunk/arch/alpha/include/asm/smp.h | 2 - trunk/arch/alpha/kernel/process.c | 2 +- trunk/arch/alpha/kernel/setup.c | 2 +- trunk/arch/alpha/kernel/smp.c | 7 +- trunk/arch/alpha/kernel/sys_dp264.c | 2 +- trunk/arch/alpha/kernel/sys_titan.c | 13 +- trunk/arch/alpha/mm/init.c | 2 - trunk/arch/alpha/mm/numa.c | 1 + trunk/arch/arm/Kconfig.debug | 7 - trunk/arch/arm/include/asm/smp.h | 6 - trunk/arch/arm/include/asm/tlb.h | 53 +- .../arm/mach-ixp4xx/include/mach/ixp46x_ts.h | 78 + trunk/arch/arm/mach-omap2/board-3430sdp.c | 4 +- trunk/arch/arm/mach-omap2/board-4430sdp.c | 11 +- trunk/arch/arm/mach-omap2/board-am3517evm.c | 4 +- trunk/arch/arm/mach-omap2/board-cm-t35.c | 4 +- trunk/arch/arm/mach-omap2/board-devkit8000.c | 4 +- trunk/arch/arm/mach-omap2/board-igep0020.c | 4 +- trunk/arch/arm/mach-omap2/board-omap3beagle.c | 4 +- trunk/arch/arm/mach-omap2/board-omap3evm.c | 4 +- .../arch/arm/mach-omap2/board-omap3pandora.c | 2 +- .../arch/arm/mach-omap2/board-omap3stalker.c | 4 +- trunk/arch/arm/mach-omap2/board-omap4panda.c | 4 +- trunk/arch/arm/mach-omap2/board-overo.c | 4 +- trunk/arch/arm/mach-omap2/board-rx51-video.c | 2 +- .../arch/arm/mach-omap2/board-zoom-display.c | 2 +- trunk/arch/arm/mach-omap2/display.c | 77 +- .../arm/mach-omap2/include/mach/board-zoom.h | 2 +- trunk/arch/arm/mm/init.c | 2 +- trunk/arch/arm/mm/mmu.c | 2 - trunk/arch/avr32/mm/init.c | 2 - trunk/arch/blackfin/Kconfig.debug | 9 - trunk/arch/cris/arch-v32/kernel/irq.c | 4 +- trunk/arch/cris/arch-v32/kernel/smp.c | 33 +- trunk/arch/cris/mm/init.c | 2 - trunk/arch/frv/mm/init.c | 2 - trunk/arch/ia64/include/asm/tlb.h | 66 +- trunk/arch/ia64/mm/contig.c | 10 +- trunk/arch/ia64/mm/discontig.c | 10 +- trunk/arch/ia64/mm/init.c | 2 - trunk/arch/m32r/Kconfig.debug | 9 - trunk/arch/m32r/include/asm/smp.h | 2 - trunk/arch/m32r/mm/discontig.c | 1 + trunk/arch/m32r/mm/init.c | 2 - trunk/arch/m68k/mm/init_mm.c | 2 - trunk/arch/microblaze/mm/init.c | 2 - trunk/arch/mips/Kconfig.debug | 9 - trunk/arch/mips/mm/init.c | 2 - trunk/arch/mn10300/kernel/irq.c | 16 +- trunk/arch/mn10300/kernel/smp.c | 75 +- trunk/arch/mn10300/mm/cache-smp.c | 8 +- trunk/arch/mn10300/mm/init.c | 2 - trunk/arch/mn10300/mm/tlb-smp.c | 32 +- trunk/arch/parisc/include/asm/smp.h | 9 - trunk/arch/parisc/mm/init.c | 4 +- trunk/arch/powerpc/Kconfig | 1 + trunk/arch/powerpc/Kconfig.debug | 21 - trunk/arch/powerpc/boot/dts/mpc8313erdb.dts | 13 + trunk/arch/powerpc/boot/dts/mpc8572ds.dts | 13 + trunk/arch/powerpc/boot/dts/p2020ds.dts | 13 + trunk/arch/powerpc/boot/dts/p2020rdb.dts | 13 + trunk/arch/powerpc/include/asm/pgalloc.h | 21 +- trunk/arch/powerpc/include/asm/thread_info.h | 2 + trunk/arch/powerpc/kernel/process.c | 23 +- trunk/arch/powerpc/mm/pgtable.c | 104 - trunk/arch/powerpc/mm/tlb_hash32.c | 3 - trunk/arch/powerpc/mm/tlb_hash64.c | 5 +- trunk/arch/powerpc/mm/tlb_nohash.c | 3 - trunk/arch/s390/include/asm/tlb.h | 62 +- trunk/arch/s390/mm/pgtable.c | 1 - trunk/arch/score/Kconfig.debug | 9 - trunk/arch/score/mm/init.c | 2 - trunk/arch/sh/Kconfig.debug | 9 - trunk/arch/sh/include/asm/tlb.h | 28 +- trunk/arch/sh/mm/init.c | 1 - trunk/arch/sparc/Kconfig.debug | 9 - trunk/arch/sparc/include/asm/pgalloc_64.h | 3 + trunk/arch/sparc/include/asm/pgtable_64.h | 15 +- trunk/arch/sparc/include/asm/tlb_64.h | 91 +- trunk/arch/sparc/include/asm/tlbflush_64.h | 12 +- trunk/arch/sparc/kernel/setup_32.c | 2 +- trunk/arch/sparc/mm/init_32.c | 4 +- trunk/arch/sparc/mm/tlb.c | 43 +- trunk/arch/sparc/mm/tsb.c | 15 +- trunk/arch/tile/Kconfig.debug | 9 - trunk/arch/tile/mm/init.c | 2 - trunk/arch/um/Kconfig.debug | 16 +- trunk/arch/um/drivers/Makefile | 4 +- trunk/arch/um/drivers/mcast.h | 24 - trunk/arch/um/drivers/mcast_kern.c | 120 - trunk/arch/um/drivers/mcast_user.c | 165 -- trunk/arch/um/drivers/umcast.h | 27 + trunk/arch/um/drivers/umcast_kern.c | 188 ++ trunk/arch/um/drivers/umcast_user.c | 186 ++ trunk/arch/um/drivers/xterm.c | 2 +- trunk/arch/um/include/asm/processor-generic.h | 2 + trunk/arch/um/include/asm/smp.h | 1 - trunk/arch/um/include/asm/tlb.h | 29 +- trunk/arch/um/include/shared/os.h | 7 + trunk/arch/um/kernel/Makefile | 1 + trunk/arch/um/kernel/early_printk.c | 33 + trunk/arch/um/kernel/smp.c | 3 - trunk/arch/um/kernel/trap.c | 24 + trunk/arch/um/os-Linux/main.c | 3 +- trunk/arch/um/os-Linux/process.c | 1 + trunk/arch/um/os-Linux/util.c | 5 + trunk/arch/unicore32/Kconfig.debug | 7 - trunk/arch/unicore32/mm/init.c | 2 +- trunk/arch/unicore32/mm/mmu.c | 2 - trunk/arch/x86/Kconfig | 2 - trunk/arch/x86/Kconfig.debug | 20 - trunk/arch/x86/include/asm/io.h | 24 +- trunk/arch/x86/kernel/setup.c | 2 + trunk/arch/x86/kernel/tboot.c | 1 - trunk/arch/x86/kvm/mmu.c | 3 +- trunk/arch/x86/mm/fault.c | 12 +- trunk/arch/x86/mm/hugetlbpage.c | 4 +- trunk/arch/x86/mm/init.c | 2 - trunk/arch/xtensa/include/asm/page.h | 4 - trunk/arch/xtensa/mm/mmu.c | 2 - trunk/arch/xtensa/mm/pgtable.c | 72 - trunk/block/blk-cgroup.c | 200 +- trunk/block/blk-cgroup.h | 40 +- trunk/block/blk-core.c | 32 +- trunk/block/blk-exec.c | 2 +- trunk/block/blk-flush.c | 16 +- trunk/block/blk-ioc.c | 3 + trunk/block/blk-lib.c | 82 +- trunk/block/blk-settings.c | 9 +- trunk/block/blk-sysfs.c | 3 +- trunk/block/blk-throttle.c | 313 ++- trunk/block/blk.h | 23 +- trunk/block/cfq-iosched.c | 232 +- trunk/block/elevator.c | 11 +- trunk/drivers/Kconfig | 2 + trunk/drivers/Makefile | 3 +- trunk/drivers/acpi/apei/einj.c | 8 + trunk/drivers/acpi/atomicio.c | 4 + trunk/drivers/ata/libata-scsi.c | 13 +- trunk/drivers/base/node.c | 14 +- trunk/drivers/block/Kconfig | 21 + trunk/drivers/block/Makefile | 1 + trunk/drivers/block/cciss.c | 571 +++- trunk/drivers/block/cciss.h | 11 +- trunk/drivers/block/cciss_cmd.h | 11 + trunk/drivers/block/cciss_scsi.c | 41 +- trunk/drivers/block/cciss_scsi.h | 4 - trunk/drivers/block/drbd/drbd_actlog.c | 2 +- trunk/drivers/block/drbd/drbd_bitmap.c | 6 +- trunk/drivers/block/drbd/drbd_int.h | 19 +- trunk/drivers/block/drbd/drbd_main.c | 37 +- trunk/drivers/block/drbd/drbd_nl.c | 127 +- trunk/drivers/block/drbd/drbd_receiver.c | 68 +- trunk/drivers/block/drbd/drbd_req.c | 20 +- trunk/drivers/block/drbd/drbd_req.h | 5 +- trunk/drivers/block/drbd/drbd_worker.c | 98 +- trunk/drivers/block/loop.c | 11 +- trunk/drivers/block/paride/pcd.c | 2 + trunk/drivers/block/xen-blkback/Makefile | 3 + trunk/drivers/block/xen-blkback/blkback.c | 824 ++++++ trunk/drivers/block/xen-blkback/common.h | 233 ++ trunk/drivers/block/xen-blkback/xenbus.c | 768 ++++++ trunk/drivers/block/xen-blkfront.c | 51 +- trunk/drivers/cdrom/viocd.c | 4 +- trunk/drivers/edac/i3200_edac.c | 13 + trunk/drivers/gpio/ml_ioh_gpio.c | 3 + trunk/drivers/gpio/vx855_gpio.c | 1 + trunk/drivers/gpu/drm/i915/i915_gem.c | 9 +- trunk/drivers/gpu/drm/ttm/ttm_page_alloc.c | 4 +- trunk/drivers/ide/ide-cd.c | 3 +- trunk/drivers/leds/Kconfig | 24 +- trunk/drivers/leds/Makefile | 2 +- trunk/drivers/leds/led-class.c | 3 +- trunk/drivers/leds/leds-gpio-register.c | 42 + trunk/drivers/leds/leds-h1940.c | 170 -- trunk/drivers/leds/leds-lm3530.c | 73 +- trunk/drivers/leds/leds-pca9532.c | 191 +- trunk/drivers/leds/leds.h | 7 + trunk/drivers/leds/ledtrig-timer.c | 3 + trunk/drivers/media/video/omap/omap_vout.c | 2 +- trunk/drivers/media/video/omap/omap_voutdef.h | 2 +- trunk/drivers/net/Makefile | 1 + trunk/drivers/net/arm/ixp4xx_eth.c | 195 +- trunk/drivers/net/gianfar_ptp.c | 588 ++++ trunk/drivers/net/ioc3-eth.c | 2 +- trunk/drivers/net/phy/Makefile | 1 + trunk/drivers/net/phy/dp83640.c | 1100 ++++++++ trunk/drivers/net/phy/dp83640_reg.h | 267 ++ trunk/drivers/platform/x86/ibm_rtl.c | 13 + trunk/drivers/platform/x86/intel_ips.c | 13 + trunk/drivers/ptp/Kconfig | 75 + trunk/drivers/ptp/Makefile | 7 + trunk/drivers/ptp/ptp_chardev.c | 159 ++ trunk/drivers/ptp/ptp_clock.c | 343 +++ trunk/drivers/ptp/ptp_ixp46x.c | 332 +++ trunk/drivers/ptp/ptp_private.h | 92 + trunk/drivers/ptp/ptp_sysfs.c | 230 ++ trunk/drivers/scsi/qla4xxx/ql4_nx.c | 21 + trunk/drivers/scsi/sr.c | 2 +- trunk/drivers/staging/zcache/zcache.c | 5 +- trunk/drivers/tty/serial/68328serial.c | 2 +- trunk/drivers/tty/serial/pch_uart.c | 1 + trunk/drivers/video/Kconfig | 42 +- trunk/drivers/video/Makefile | 1 + trunk/drivers/video/amifb.c | 27 +- trunk/drivers/video/backlight/adp5520_bl.c | 6 +- trunk/drivers/video/da8xx-fb.c | 4 +- trunk/drivers/video/efifb.c | 4 +- trunk/drivers/video/mb862xx/Makefile | 5 +- trunk/drivers/video/mb862xx/mb862xx-i2c.c | 177 ++ trunk/drivers/video/mb862xx/mb862xx_reg.h | 58 +- trunk/drivers/video/mb862xx/mb862xxfb.h | 36 + .../mb862xx/{mb862xxfb.c => mb862xxfbdrv.c} | 152 +- trunk/drivers/video/omap/dispc.c | 4 +- trunk/drivers/video/omap/omapfb_main.c | 2 +- trunk/drivers/video/omap/rfbi.c | 2 +- trunk/drivers/video/omap2/Makefile | 4 +- trunk/drivers/video/omap2/displays/Kconfig | 9 +- .../video/omap2/displays/panel-acx565akm.c | 2 +- .../video/omap2/displays/panel-generic-dpi.c | 57 +- .../omap2/displays/panel-lgphilips-lb035q02.c | 2 +- .../omap2/displays/panel-nec-nl8048hl11-01b.c | 2 +- .../omap2/displays/panel-sharp-ls037v7dw01.c | 6 +- .../drivers/video/omap2/displays/panel-taal.c | 536 +++- .../omap2/displays/panel-tpo-td043mtea1.c | 10 +- trunk/drivers/video/omap2/dss/Kconfig | 33 +- trunk/drivers/video/omap2/dss/core.c | 15 +- trunk/drivers/video/omap2/dss/dispc.c | 1552 ++++++----- trunk/drivers/video/omap2/dss/dispc.h | 691 +++++ trunk/drivers/video/omap2/dss/display.c | 46 +- trunk/drivers/video/omap2/dss/dpi.c | 113 +- trunk/drivers/video/omap2/dss/dsi.c | 2367 +++++++++++------ trunk/drivers/video/omap2/dss/dss.c | 118 +- trunk/drivers/video/omap2/dss/dss.h | 98 +- trunk/drivers/video/omap2/dss/dss_features.c | 105 +- trunk/drivers/video/omap2/dss/dss_features.h | 39 +- trunk/drivers/video/omap2/dss/hdmi.c | 461 +++- trunk/drivers/video/omap2/dss/hdmi.h | 222 +- .../video/omap2/dss/hdmi_omap4_panel.c | 2 +- trunk/drivers/video/omap2/dss/manager.c | 14 +- trunk/drivers/video/omap2/dss/overlay.c | 43 +- trunk/drivers/video/omap2/dss/rfbi.c | 176 +- trunk/drivers/video/omap2/dss/sdi.c | 2 +- trunk/drivers/video/omap2/dss/venc.c | 23 +- .../drivers/video/omap2/omapfb/omapfb-ioctl.c | 14 +- .../drivers/video/omap2/omapfb/omapfb-main.c | 231 +- .../drivers/video/omap2/omapfb/omapfb-sysfs.c | 23 +- trunk/drivers/video/omap2/omapfb/omapfb.h | 8 +- trunk/drivers/video/s3c-fb.c | 121 +- trunk/drivers/video/s3c2410fb.c | 8 +- trunk/drivers/video/s3fb.c | 209 +- trunk/drivers/video/savage/savagefb-i2c.c | 2 + trunk/drivers/video/savage/savagefb.h | 8 +- trunk/drivers/video/savage/savagefb_driver.c | 15 +- trunk/drivers/video/sh7760fb.c | 6 +- trunk/drivers/video/sh_mobile_hdmi.c | 10 +- trunk/drivers/video/sh_mobile_lcdcfb.c | 126 +- trunk/drivers/video/sh_mobile_lcdcfb.h | 1 + trunk/drivers/video/sh_mobile_meram.c | 567 ++++ trunk/drivers/video/sh_mobile_meram.h | 41 + trunk/drivers/video/sm501fb.c | 24 +- trunk/drivers/video/udlfb.c | 20 +- trunk/fs/Kconfig | 18 +- trunk/fs/block_dev.c | 17 +- trunk/fs/dcache.c | 8 +- trunk/fs/drop_caches.c | 5 +- trunk/fs/exec.c | 12 +- trunk/fs/fscache/operation.c | 10 - trunk/fs/fscache/page.c | 13 - trunk/fs/gfs2/glock.c | 5 +- trunk/fs/gfs2/quota.c | 12 +- trunk/fs/gfs2/quota.h | 4 +- trunk/fs/hugetlbfs/inode.c | 4 +- trunk/fs/inode.c | 9 +- trunk/fs/mbcache.c | 10 +- trunk/fs/ncpfs/inode.c | 4 +- trunk/fs/nfs/dir.c | 5 +- trunk/fs/nfs/internal.h | 2 +- trunk/fs/partitions/check.c | 8 +- trunk/fs/proc/internal.h | 8 + trunk/fs/proc/task_mmu.c | 204 +- trunk/fs/quota/dquot.c | 5 +- trunk/fs/splice.c | 33 +- trunk/fs/xfs/linux-2.6/xfs_buf.c | 4 +- trunk/fs/xfs/linux-2.6/xfs_sync.c | 5 +- trunk/fs/xfs/quota/xfs_qm.c | 6 +- trunk/include/asm-generic/cacheflush.h | 5 +- trunk/include/asm-generic/resource.h | 2 +- trunk/include/asm-generic/tlb.h | 156 +- trunk/include/linux/Kbuild | 1 + trunk/include/linux/bitmap.h | 5 +- trunk/include/linux/blk_types.h | 2 - trunk/include/linux/blkdev.h | 15 +- trunk/include/linux/bootmem.h | 25 +- trunk/include/linux/c2port.h | 3 - trunk/include/linux/compiler-gcc.h | 4 + trunk/include/linux/compiler-gcc4.h | 2 +- trunk/include/linux/cpumask.h | 15 + trunk/include/linux/drbd.h | 10 +- trunk/include/linux/drbd_tag_magic.h | 2 +- trunk/include/linux/fs.h | 7 +- trunk/include/linux/fscache-cache.h | 12 - trunk/include/linux/genalloc.h | 25 +- trunk/include/linux/genhd.h | 2 +- trunk/include/linux/gfp.h | 9 +- trunk/include/linux/huge_mm.h | 8 +- trunk/include/linux/kernel.h | 39 + trunk/include/linux/leds-pca9532.h | 3 +- trunk/include/linux/leds.h | 2 + trunk/include/linux/lockdep.h | 3 + trunk/include/linux/lru_cache.h | 12 +- trunk/include/linux/memblock.h | 9 +- trunk/include/linux/mempolicy.h | 7 +- trunk/include/linux/mm.h | 121 +- trunk/include/linux/mm_types.h | 19 +- trunk/include/linux/mmu_notifier.h | 2 +- trunk/include/linux/mmzone.h | 9 +- trunk/include/linux/mutex.h | 9 + trunk/include/linux/oom.h | 2 + trunk/include/linux/pagemap.h | 15 + trunk/include/linux/percpu_counter.h | 6 +- trunk/include/linux/posix-timers.h | 1 + trunk/include/linux/printk.h | 7 + trunk/include/linux/proc_fs.h | 8 - trunk/include/linux/ptp_classify.h | 7 + trunk/include/linux/ptp_clock.h | 84 + trunk/include/linux/ptp_clock_kernel.h | 139 + trunk/include/linux/rmap.h | 29 +- trunk/include/linux/sched.h | 2 +- trunk/include/linux/shmem_fs.h | 8 +- trunk/include/linux/vmstat.h | 7 +- trunk/include/linux/xattr.h | 8 +- .../video/omap-panel-generic-dpi.h} | 8 +- .../video/omap-panel-nokia-dsi.h} | 14 +- .../display.h => include/video/omapdss.h} | 114 +- trunk/include/video/sh_mobile_lcdc.h | 3 + trunk/include/video/sh_mobile_meram.h | 68 + trunk/include/xen/interface/io/blkif.h | 13 + trunk/init/calibrate.c | 75 +- trunk/init/main.c | 3 + trunk/kernel/fork.c | 42 +- trunk/kernel/irq/proc.c | 54 +- trunk/kernel/mutex.c | 25 +- trunk/kernel/posix-timers.c | 25 +- trunk/kernel/printk.c | 87 +- trunk/lib/Kconfig.debug | 20 + trunk/lib/bitmap.c | 109 +- trunk/lib/genalloc.c | 45 +- trunk/lib/kstrtox.c | 26 + trunk/lib/lru_cache.c | 2 +- trunk/lib/show_mem.c | 2 +- trunk/lib/vsprintf.c | 2 +- trunk/mm/backing-dev.c | 4 +- trunk/mm/filemap.c | 71 +- trunk/mm/filemap_xip.c | 4 +- trunk/mm/fremap.c | 4 +- trunk/mm/huge_memory.c | 25 +- trunk/mm/hugetlb.c | 14 +- trunk/mm/init-mm.c | 1 - trunk/mm/internal.h | 4 + trunk/mm/ksm.c | 7 +- trunk/mm/memcontrol.c | 13 +- trunk/mm/memory-failure.c | 21 +- trunk/mm/memory.c | 440 +-- trunk/mm/memory_hotplug.c | 21 +- trunk/mm/mempolicy.c | 164 +- trunk/mm/migrate.c | 17 +- trunk/mm/mmap.c | 121 +- trunk/mm/mremap.c | 5 +- trunk/mm/nobootmem.c | 23 - trunk/mm/nommu.c | 108 +- trunk/mm/oom_kill.c | 36 +- trunk/mm/page_alloc.c | 121 +- trunk/mm/readahead.c | 2 +- trunk/mm/rmap.c | 172 +- trunk/mm/shmem.c | 320 ++- trunk/mm/slub.c | 3 +- trunk/mm/swap.c | 52 +- trunk/mm/swapfile.c | 6 +- trunk/mm/util.c | 24 + trunk/mm/vmalloc.c | 15 +- trunk/mm/vmscan.c | 80 +- trunk/mm/vmstat.c | 264 +- trunk/net/sunrpc/auth.c | 4 +- trunk/scripts/checkpatch.pl | 13 +- 405 files changed, 18374 insertions(+), 5507 deletions(-) create mode 100644 trunk/Documentation/ABI/testing/sysfs-ptp create mode 100644 trunk/Documentation/ptp/ptp.txt create mode 100644 trunk/Documentation/ptp/testptp.c create mode 100644 trunk/Documentation/ptp/testptp.mk create mode 100644 trunk/arch/alpha/include/asm/gpio.h create mode 100644 trunk/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h delete mode 100644 trunk/arch/um/drivers/mcast.h delete mode 100644 trunk/arch/um/drivers/mcast_kern.c delete mode 100644 trunk/arch/um/drivers/mcast_user.c create mode 100644 trunk/arch/um/drivers/umcast.h create mode 100644 trunk/arch/um/drivers/umcast_kern.c create mode 100644 trunk/arch/um/drivers/umcast_user.c create mode 100644 trunk/arch/um/kernel/early_printk.c delete mode 100644 trunk/arch/xtensa/mm/pgtable.c create mode 100644 trunk/drivers/block/xen-blkback/Makefile create mode 100644 trunk/drivers/block/xen-blkback/blkback.c create mode 100644 trunk/drivers/block/xen-blkback/common.h create mode 100644 trunk/drivers/block/xen-blkback/xenbus.c create mode 100644 trunk/drivers/leds/leds-gpio-register.c delete mode 100644 trunk/drivers/leds/leds-h1940.c create mode 100644 trunk/drivers/net/gianfar_ptp.c create mode 100644 trunk/drivers/net/phy/dp83640.c create mode 100644 trunk/drivers/net/phy/dp83640_reg.h create mode 100644 trunk/drivers/ptp/Kconfig create mode 100644 trunk/drivers/ptp/Makefile create mode 100644 trunk/drivers/ptp/ptp_chardev.c create mode 100644 trunk/drivers/ptp/ptp_clock.c create mode 100644 trunk/drivers/ptp/ptp_ixp46x.c create mode 100644 trunk/drivers/ptp/ptp_private.h create mode 100644 trunk/drivers/ptp/ptp_sysfs.c create mode 100644 trunk/drivers/video/mb862xx/mb862xx-i2c.c rename trunk/drivers/video/mb862xx/{mb862xxfb.c => mb862xxfbdrv.c} (86%) create mode 100644 trunk/drivers/video/omap2/dss/dispc.h create mode 100644 trunk/drivers/video/sh_mobile_meram.c create mode 100644 trunk/drivers/video/sh_mobile_meram.h create mode 100644 trunk/include/linux/ptp_clock.h create mode 100644 trunk/include/linux/ptp_clock_kernel.h rename trunk/{arch/arm/plat-omap/include/plat/panel-generic-dpi.h => include/video/omap-panel-generic-dpi.h} (86%) rename trunk/{arch/arm/plat-omap/include/plat/nokia-dsi-panel.h => include/video/omap-panel-nokia-dsi.h} (65%) rename trunk/{arch/arm/plat-omap/include/plat/display.h => include/video/omapdss.h} (85%) create mode 100644 trunk/include/video/sh_mobile_meram.h diff --git a/[refs] b/[refs] index 5963b71da5e0..1bc07047b640 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ee294bedb6d0658c9934ef5d96951a22003c8886 +refs/heads/master: 2a651c7f8d377cf88271374315cbb5fe82eac784 diff --git a/trunk/CREDITS b/trunk/CREDITS index 95c469c610bc..58d2a02add39 100644 --- a/trunk/CREDITS +++ b/trunk/CREDITS @@ -2943,6 +2943,10 @@ S: Kasarmikatu 11 A4 S: 70110 Kuopio S: Finland +N: Tobias Ringström +E: tori@unhappy.mine.nu +D: Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver + N: Luca Risolia E: luca.risolia@studio.unibo.it P: 1024D/FCE635A4 88E8 F32F 7244 68BA 3958 5D40 99DA 5D2A FCE6 35A4 diff --git a/trunk/Documentation/ABI/testing/sysfs-block b/trunk/Documentation/ABI/testing/sysfs-block index 4873c759d535..c1eb41cb9876 100644 --- a/trunk/Documentation/ABI/testing/sysfs-block +++ b/trunk/Documentation/ABI/testing/sysfs-block @@ -142,3 +142,67 @@ Description: with the previous I/O request are enabled. When set to 2, all merge tries are disabled. The default value is 0 - which enables all types of merge tries. + +What: /sys/block//discard_alignment +Date: May 2011 +Contact: Martin K. Petersen +Description: + Devices that support discard functionality may + internally allocate space in units that are bigger than + the exported logical block size. The discard_alignment + parameter indicates how many bytes the beginning of the + device is offset from the internal allocation unit's + natural alignment. + +What: /sys/block///discard_alignment +Date: May 2011 +Contact: Martin K. Petersen +Description: + Devices that support discard functionality may + internally allocate space in units that are bigger than + the exported logical block size. The discard_alignment + parameter indicates how many bytes the beginning of the + partition is offset from the internal allocation unit's + natural alignment. + +What: /sys/block//queue/discard_granularity +Date: May 2011 +Contact: Martin K. Petersen +Description: + Devices that support discard functionality may + internally allocate space using units that are bigger + than the logical block size. The discard_granularity + parameter indicates the size of the internal allocation + unit in bytes if reported by the device. Otherwise the + discard_granularity will be set to match the device's + physical block size. A discard_granularity of 0 means + that the device does not support discard functionality. + +What: /sys/block//queue/discard_max_bytes +Date: May 2011 +Contact: Martin K. Petersen +Description: + Devices that support discard functionality may have + internal limits on the number of bytes that can be + trimmed or unmapped in a single operation. Some storage + protocols also have inherent limits on the number of + blocks that can be described in a single command. The + discard_max_bytes parameter is set by the device driver + to the maximum number of bytes that can be discarded in + a single operation. Discard requests issued to the + device must not exceed this limit. A discard_max_bytes + value of 0 means that the device does not support + discard functionality. + +What: /sys/block//queue/discard_zeroes_data +Date: May 2011 +Contact: Martin K. Petersen +Description: + Devices that support discard functionality may return + stale or random data when a previously discarded block + is read back. This can cause problems if the filesystem + expects discarded blocks to be explicitly cleared. If a + device reports that it deterministically returns zeroes + when a discarded area is read the discard_zeroes_data + parameter will be set to one. Otherwise it will be 0 and + the result of reading a discarded area is undefined. diff --git a/trunk/Documentation/ABI/testing/sysfs-ptp b/trunk/Documentation/ABI/testing/sysfs-ptp new file mode 100644 index 000000000000..d40d2b550502 --- /dev/null +++ b/trunk/Documentation/ABI/testing/sysfs-ptp @@ -0,0 +1,98 @@ +What: /sys/class/ptp/ +Date: September 2010 +Contact: Richard Cochran +Description: + This directory contains files and directories + providing a standardized interface to the ancillary + features of PTP hardware clocks. + +What: /sys/class/ptp/ptpN/ +Date: September 2010 +Contact: Richard Cochran +Description: + This directory contains the attributes of the Nth PTP + hardware clock registered into the PTP class driver + subsystem. + +What: /sys/class/ptp/ptpN/clock_name +Date: September 2010 +Contact: Richard Cochran +Description: + This file contains the name of the PTP hardware clock + as a human readable string. + +What: /sys/class/ptp/ptpN/max_adjustment +Date: September 2010 +Contact: Richard Cochran +Description: + This file contains the PTP hardware clock's maximum + frequency adjustment value (a positive integer) in + parts per billion. + +What: /sys/class/ptp/ptpN/n_alarms +Date: September 2010 +Contact: Richard Cochran +Description: + This file contains the number of periodic or one shot + alarms offer by the PTP hardware clock. + +What: /sys/class/ptp/ptpN/n_external_timestamps +Date: September 2010 +Contact: Richard Cochran +Description: + This file contains the number of external timestamp + channels offered by the PTP hardware clock. + +What: /sys/class/ptp/ptpN/n_periodic_outputs +Date: September 2010 +Contact: Richard Cochran +Description: + This file contains the number of programmable periodic + output channels offered by the PTP hardware clock. + +What: /sys/class/ptp/ptpN/pps_avaiable +Date: September 2010 +Contact: Richard Cochran +Description: + This file indicates whether the PTP hardware clock + supports a Pulse Per Second to the host CPU. Reading + "1" means that the PPS is supported, while "0" means + not supported. + +What: /sys/class/ptp/ptpN/extts_enable +Date: September 2010 +Contact: Richard Cochran +Description: + This write-only file enables or disables external + timestamps. To enable external timestamps, write the + channel index followed by a "1" into the file. + To disable external timestamps, write the channel + index followed by a "0" into the file. + +What: /sys/class/ptp/ptpN/fifo +Date: September 2010 +Contact: Richard Cochran +Description: + This file provides timestamps on external events, in + the form of three integers: channel index, seconds, + and nanoseconds. + +What: /sys/class/ptp/ptpN/period +Date: September 2010 +Contact: Richard Cochran +Description: + This write-only file enables or disables periodic + outputs. To enable a periodic output, write five + integers into the file: channel index, start time + seconds, start time nanoseconds, period seconds, and + period nanoseconds. To disable a periodic output, set + all the seconds and nanoseconds values to zero. + +What: /sys/class/ptp/ptpN/pps_enable +Date: September 2010 +Contact: Richard Cochran +Description: + This write-only file enables or disables delivery of + PPS events to the Linux PPS subsystem. To enable PPS + events, write a "1" into the file. To disable events, + write a "0" into the file. diff --git a/trunk/Documentation/IRQ-affinity.txt b/trunk/Documentation/IRQ-affinity.txt index b4a615b78403..7890fae18529 100644 --- a/trunk/Documentation/IRQ-affinity.txt +++ b/trunk/Documentation/IRQ-affinity.txt @@ -4,10 +4,11 @@ ChangeLog: SMP IRQ affinity -/proc/irq/IRQ#/smp_affinity specifies which target CPUs are permitted -for a given IRQ source. It's a bitmask of allowed CPUs. It's not allowed -to turn off all CPUs, and if an IRQ controller does not support IRQ -affinity then the value will not change from the default 0xffffffff. +/proc/irq/IRQ#/smp_affinity and /proc/irq/IRQ#/smp_affinity_list specify +which target CPUs are permitted for a given IRQ source. It's a bitmask +(smp_affinity) or cpu list (smp_affinity_list) of allowed CPUs. It's not +allowed to turn off all CPUs, and if an IRQ controller does not support +IRQ affinity then the value will not change from the default of all cpus. /proc/irq/default_smp_affinity specifies default affinity mask that applies to all non-active IRQs. Once IRQ is allocated/activated its affinity bitmask @@ -54,3 +55,11 @@ round-trip min/avg/max = 0.1/0.5/585.4 ms This time around IRQ44 was delivered only to the last four processors. i.e counters for the CPU0-3 did not change. +Here is an example of limiting that same irq (44) to cpus 1024 to 1031: + +[root@moon 44]# echo 1024-1031 > smp_affinity +[root@moon 44]# cat smp_affinity +1024-1031 + +Note that to do this with a bitmask would require 32 bitmasks of zero +to follow the pertinent one. diff --git a/trunk/Documentation/blockdev/cciss.txt b/trunk/Documentation/blockdev/cciss.txt index 89698e8df7d4..c00c6a5ab21f 100644 --- a/trunk/Documentation/blockdev/cciss.txt +++ b/trunk/Documentation/blockdev/cciss.txt @@ -169,3 +169,18 @@ is issued which positions the tape to a known position. Typically you must rewind the tape (by issuing "mt -f /dev/st0 rewind" for example) before i/o can proceed again to a tape drive which was reset. +There is a cciss_tape_cmds module parameter which can be used to make cciss +allocate more commands for use by tape drives. Ordinarily only a few commands +(6) are allocated for tape drives because tape drives are slow and +infrequently used and the primary purpose of Smart Array controllers is to +act as a RAID controller for disk drives, so the vast majority of commands +are allocated for disk devices. However, if you have more than a few tape +drives attached to a smart array, the default number of commands may not be +enought (for example, if you have 8 tape drives, you could only rewind 6 +at one time with the default number of commands.) The cciss_tape_cmds module +parameter allows more commands (up to 16 more) to be allocated for use by +tape drives. For example: + + insmod cciss.ko cciss_tape_cmds=16 + +Or, as a kernel boot parameter passed in via grub: cciss.cciss_tape_cmds=8 diff --git a/trunk/Documentation/cachetlb.txt b/trunk/Documentation/cachetlb.txt index 9164ae3b83bc..9b728dc17535 100644 --- a/trunk/Documentation/cachetlb.txt +++ b/trunk/Documentation/cachetlb.txt @@ -16,7 +16,7 @@ on all processors in the system. Don't let this scare you into thinking SMP cache/tlb flushing must be so inefficient, this is in fact an area where many optimizations are possible. For example, if it can be proven that a user address space has never executed -on a cpu (see vma->cpu_vm_mask), one need not perform a flush +on a cpu (see mm_cpumask()), one need not perform a flush for this address space on that cpu. First, the TLB flushing interfaces, since they are the simplest. The diff --git a/trunk/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/trunk/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt index edb7ae19e868..2c6be0377f55 100644 --- a/trunk/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt +++ b/trunk/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt @@ -74,3 +74,57 @@ Example: interrupt-parent = <&mpic>; phy-handle = <&phy0> }; + +* Gianfar PTP clock nodes + +General Properties: + + - compatible Should be "fsl,etsec-ptp" + - reg Offset and length of the register set for the device + - interrupts There should be at least two interrupts. Some devices + have as many as four PTP related interrupts. + +Clock Properties: + + - fsl,tclk-period Timer reference clock period in nanoseconds. + - fsl,tmr-prsc Prescaler, divides the output clock. + - fsl,tmr-add Frequency compensation value. + - fsl,tmr-fiper1 Fixed interval period pulse generator. + - fsl,tmr-fiper2 Fixed interval period pulse generator. + - fsl,max-adj Maximum frequency adjustment in parts per billion. + + These properties set the operational parameters for the PTP + clock. You must choose these carefully for the clock to work right. + Here is how to figure good values: + + TimerOsc = system clock MHz + tclk_period = desired clock period nanoseconds + NominalFreq = 1000 / tclk_period MHz + FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0) + tmr_add = ceil(2^32 / FreqDivRatio) + OutputClock = NominalFreq / tmr_prsc MHz + PulseWidth = 1 / OutputClock microseconds + FiperFreq1 = desired frequency in Hz + FiperDiv1 = 1000000 * OutputClock / FiperFreq1 + tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period + max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1 + + The calculation for tmr_fiper2 is the same as for tmr_fiper1. The + driver expects that tmr_fiper1 will be correctly set to produce a 1 + Pulse Per Second (PPS) signal, since this will be offered to the PPS + subsystem to synchronize the Linux clock. + +Example: + + ptp_clock@24E00 { + compatible = "fsl,etsec-ptp"; + reg = <0x24E00 0xB0>; + interrupts = <12 0x8 13 0x8>; + interrupt-parent = < &ipic >; + fsl,tclk-period = <10>; + fsl,tmr-prsc = <100>; + fsl,tmr-add = <0x999999A4>; + fsl,tmr-fiper1 = <0x3B9AC9F6>; + fsl,tmr-fiper2 = <0x00018696>; + fsl,max-adj = <659999998>; + }; diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt index 60740e8ecb37..f48178024067 100644 --- a/trunk/Documentation/filesystems/proc.txt +++ b/trunk/Documentation/filesystems/proc.txt @@ -574,6 +574,12 @@ The contents of each smp_affinity file is the same by default: > cat /proc/irq/0/smp_affinity ffffffff +There is an alternate interface, smp_affinity_list which allows specifying +a cpu range instead of a bitmask: + + > cat /proc/irq/0/smp_affinity_list + 1024-1031 + The default_smp_affinity mask applies to all non-active IRQs, which are the IRQs which have not yet been allocated/activated, and hence which lack a /proc/irq/[0-9]* directory. @@ -583,12 +589,13 @@ reports itself as being attached. This hardware locality information does not include information about any possible driver locality preference. prof_cpu_mask specifies which CPUs are to be profiled by the system wide -profiler. Default value is ffffffff (all cpus). +profiler. Default value is ffffffff (all cpus if there are only 32 of them). The way IRQs are routed is handled by the IO-APIC, and it's Round Robin between all the CPUs which are allowed to handle it. As usual the kernel has more info than you and does a better job than you, so the defaults are the -best choice for almost everyone. +best choice for almost everyone. [Note this applies only to those IO-APIC's +that support "Round Robin" interrupt distribution.] There are three more important subdirectories in /proc: net, scsi, and sys. The general rule is that the contents, or even the existence of these diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 7c6624e7a5cb..5438a2d7907f 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -1777,9 +1777,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. nosoftlockup [KNL] Disable the soft-lockup detector. - noswapaccount [KNL] Disable accounting of swap in memory resource - controller. (See Documentation/cgroups/memory.txt) - nosync [HW,M68K] Disables sync negotiation for all devices. notsc [BUGS=X86-32] Disable Time Stamp Counter diff --git a/trunk/Documentation/lockstat.txt b/trunk/Documentation/lockstat.txt index 65f4c795015d..9c0a80d17a23 100644 --- a/trunk/Documentation/lockstat.txt +++ b/trunk/Documentation/lockstat.txt @@ -136,7 +136,7 @@ View the top contending locks: dcache_lock: 1037 1161 0.38 45.32 774.51 6611 243371 0.15 306.48 77387.24 &inode->i_mutex: 161 286 18446744073709 62882.54 1244614.55 3653 20598 18446744073709 62318.60 1693822.74 &zone->lru_lock: 94 94 0.53 7.33 92.10 4366 32690 0.29 59.81 16350.06 - &inode->i_data.i_mmap_lock: 79 79 0.40 3.77 53.03 11779 87755 0.28 116.93 29898.44 + &inode->i_data.i_mmap_mutex: 79 79 0.40 3.77 53.03 11779 87755 0.28 116.93 29898.44 &q->__queue_lock: 48 50 0.52 31.62 86.31 774 13131 0.17 113.08 12277.52 &rq->rq_lock_key: 43 47 0.74 68.50 170.63 3706 33929 0.22 107.99 17460.62 &rq->rq_lock_key#2: 39 46 0.75 6.68 49.03 2979 32292 0.17 125.17 17137.63 diff --git a/trunk/Documentation/ptp/ptp.txt b/trunk/Documentation/ptp/ptp.txt new file mode 100644 index 000000000000..ae8fef86b832 --- /dev/null +++ b/trunk/Documentation/ptp/ptp.txt @@ -0,0 +1,89 @@ + +* PTP hardware clock infrastructure for Linux + + This patch set introduces support for IEEE 1588 PTP clocks in + Linux. Together with the SO_TIMESTAMPING socket options, this + presents a standardized method for developing PTP user space + programs, synchronizing Linux with external clocks, and using the + ancillary features of PTP hardware clocks. + + A new class driver exports a kernel interface for specific clock + drivers and a user space interface. The infrastructure supports a + complete set of PTP hardware clock functionality. + + + Basic clock operations + - Set time + - Get time + - Shift the clock by a given offset atomically + - Adjust clock frequency + + + Ancillary clock features + - One short or periodic alarms, with signal delivery to user program + - Time stamp external events + - Period output signals configurable from user space + - Synchronization of the Linux system time via the PPS subsystem + +** PTP hardware clock kernel API + + A PTP clock driver registers itself with the class driver. The + class driver handles all of the dealings with user space. The + author of a clock driver need only implement the details of + programming the clock hardware. The clock driver notifies the class + driver of asynchronous events (alarms and external time stamps) via + a simple message passing interface. + + The class driver supports multiple PTP clock drivers. In normal use + cases, only one PTP clock is needed. However, for testing and + development, it can be useful to have more than one clock in a + single system, in order to allow performance comparisons. + +** PTP hardware clock user space API + + The class driver also creates a character device for each + registered clock. User space can use an open file descriptor from + the character device as a POSIX clock id and may call + clock_gettime, clock_settime, and clock_adjtime. These calls + implement the basic clock operations. + + User space programs may control the clock using standardized + ioctls. A program may query, enable, configure, and disable the + ancillary clock features. User space can receive time stamped + events via blocking read() and poll(). One shot and periodic + signals may be configured via the POSIX timer_settime() system + call. + +** Writing clock drivers + + Clock drivers include include/linux/ptp_clock_kernel.h and register + themselves by presenting a 'struct ptp_clock_info' to the + registration method. Clock drivers must implement all of the + functions in the interface. If a clock does not offer a particular + ancillary feature, then the driver should just return -EOPNOTSUPP + from those functions. + + Drivers must ensure that all of the methods in interface are + reentrant. Since most hardware implementations treat the time value + as a 64 bit integer accessed as two 32 bit registers, drivers + should use spin_lock_irqsave/spin_unlock_irqrestore to protect + against concurrent access. This locking cannot be accomplished in + class driver, since the lock may also be needed by the clock + driver's interrupt service routine. + +** Supported hardware + + + Freescale eTSEC gianfar + - 2 Time stamp external triggers, programmable polarity (opt. interrupt) + - 2 Alarm registers (optional interrupt) + - 3 Periodic signals (optional interrupt) + + + National DP83640 + - 6 GPIOs programmable as inputs or outputs + - 6 GPIOs with dedicated functions (LED/JTAG/clock) can also be + used as general inputs or outputs + - GPIO inputs can time stamp external triggers + - GPIO outputs can produce periodic signals + - 1 interrupt pin + + + Intel IXP465 + - Auxiliary Slave/Master Mode Snapshot (optional interrupt) + - Target Time (optional interrupt) diff --git a/trunk/Documentation/ptp/testptp.c b/trunk/Documentation/ptp/testptp.c new file mode 100644 index 000000000000..f59ded066108 --- /dev/null +++ b/trunk/Documentation/ptp/testptp.c @@ -0,0 +1,381 @@ +/* + * PTP 1588 clock support - User space test program + * + * Copyright (C) 2010 OMICRON electronics GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define DEVICE "/dev/ptp0" + +#ifndef ADJ_SETOFFSET +#define ADJ_SETOFFSET 0x0100 +#endif + +#ifndef CLOCK_INVALID +#define CLOCK_INVALID -1 +#endif + +/* When glibc offers the syscall, this will go away. */ +#include +static int clock_adjtime(clockid_t id, struct timex *tx) +{ + return syscall(__NR_clock_adjtime, id, tx); +} + +static clockid_t get_clockid(int fd) +{ +#define CLOCKFD 3 +#define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD) + + return FD_TO_CLOCKID(fd); +} + +static void handle_alarm(int s) +{ + printf("received signal %d\n", s); +} + +static int install_handler(int signum, void (*handler)(int)) +{ + struct sigaction action; + sigset_t mask; + + /* Unblock the signal. */ + sigemptyset(&mask); + sigaddset(&mask, signum); + sigprocmask(SIG_UNBLOCK, &mask, NULL); + + /* Install the signal handler. */ + action.sa_handler = handler; + action.sa_flags = 0; + sigemptyset(&action.sa_mask); + sigaction(signum, &action, NULL); + + return 0; +} + +static long ppb_to_scaled_ppm(int ppb) +{ + /* + * The 'freq' field in the 'struct timex' is in parts per + * million, but with a 16 bit binary fractional field. + * Instead of calculating either one of + * + * scaled_ppm = (ppb / 1000) << 16 [1] + * scaled_ppm = (ppb << 16) / 1000 [2] + * + * we simply use double precision math, in order to avoid the + * truncation in [1] and the possible overflow in [2]. + */ + return (long) (ppb * 65.536); +} + +static void usage(char *progname) +{ + fprintf(stderr, + "usage: %s [options]\n" + " -a val request a one-shot alarm after 'val' seconds\n" + " -A val request a periodic alarm every 'val' seconds\n" + " -c query the ptp clock's capabilities\n" + " -d name device to open\n" + " -e val read 'val' external time stamp events\n" + " -f val adjust the ptp clock frequency by 'val' ppb\n" + " -g get the ptp clock time\n" + " -h prints this message\n" + " -p val enable output with a period of 'val' nanoseconds\n" + " -P val enable or disable (val=1|0) the system clock PPS\n" + " -s set the ptp clock time from the system time\n" + " -S set the system time from the ptp clock time\n" + " -t val shift the ptp clock time by 'val' seconds\n", + progname); +} + +int main(int argc, char *argv[]) +{ + struct ptp_clock_caps caps; + struct ptp_extts_event event; + struct ptp_extts_request extts_request; + struct ptp_perout_request perout_request; + struct timespec ts; + struct timex tx; + + static timer_t timerid; + struct itimerspec timeout; + struct sigevent sigevent; + + char *progname; + int c, cnt, fd; + + char *device = DEVICE; + clockid_t clkid; + int adjfreq = 0x7fffffff; + int adjtime = 0; + int capabilities = 0; + int extts = 0; + int gettime = 0; + int oneshot = 0; + int periodic = 0; + int perout = -1; + int pps = -1; + int settime = 0; + + progname = strrchr(argv[0], '/'); + progname = progname ? 1+progname : argv[0]; + while (EOF != (c = getopt(argc, argv, "a:A:cd:e:f:ghp:P:sSt:v"))) { + switch (c) { + case 'a': + oneshot = atoi(optarg); + break; + case 'A': + periodic = atoi(optarg); + break; + case 'c': + capabilities = 1; + break; + case 'd': + device = optarg; + break; + case 'e': + extts = atoi(optarg); + break; + case 'f': + adjfreq = atoi(optarg); + break; + case 'g': + gettime = 1; + break; + case 'p': + perout = atoi(optarg); + break; + case 'P': + pps = atoi(optarg); + break; + case 's': + settime = 1; + break; + case 'S': + settime = 2; + break; + case 't': + adjtime = atoi(optarg); + break; + case 'h': + usage(progname); + return 0; + case '?': + default: + usage(progname); + return -1; + } + } + + fd = open(device, O_RDWR); + if (fd < 0) { + fprintf(stderr, "opening %s: %s\n", device, strerror(errno)); + return -1; + } + + clkid = get_clockid(fd); + if (CLOCK_INVALID == clkid) { + fprintf(stderr, "failed to read clock id\n"); + return -1; + } + + if (capabilities) { + if (ioctl(fd, PTP_CLOCK_GETCAPS, &caps)) { + perror("PTP_CLOCK_GETCAPS"); + } else { + printf("capabilities:\n" + " %d maximum frequency adjustment (ppb)\n" + " %d programmable alarms\n" + " %d external time stamp channels\n" + " %d programmable periodic signals\n" + " %d pulse per second\n", + caps.max_adj, + caps.n_alarm, + caps.n_ext_ts, + caps.n_per_out, + caps.pps); + } + } + + if (0x7fffffff != adjfreq) { + memset(&tx, 0, sizeof(tx)); + tx.modes = ADJ_FREQUENCY; + tx.freq = ppb_to_scaled_ppm(adjfreq); + if (clock_adjtime(clkid, &tx)) { + perror("clock_adjtime"); + } else { + puts("frequency adjustment okay"); + } + } + + if (adjtime) { + memset(&tx, 0, sizeof(tx)); + tx.modes = ADJ_SETOFFSET; + tx.time.tv_sec = adjtime; + tx.time.tv_usec = 0; + if (clock_adjtime(clkid, &tx) < 0) { + perror("clock_adjtime"); + } else { + puts("time shift okay"); + } + } + + if (gettime) { + if (clock_gettime(clkid, &ts)) { + perror("clock_gettime"); + } else { + printf("clock time: %ld.%09ld or %s", + ts.tv_sec, ts.tv_nsec, ctime(&ts.tv_sec)); + } + } + + if (settime == 1) { + clock_gettime(CLOCK_REALTIME, &ts); + if (clock_settime(clkid, &ts)) { + perror("clock_settime"); + } else { + puts("set time okay"); + } + } + + if (settime == 2) { + clock_gettime(clkid, &ts); + if (clock_settime(CLOCK_REALTIME, &ts)) { + perror("clock_settime"); + } else { + puts("set time okay"); + } + } + + if (extts) { + memset(&extts_request, 0, sizeof(extts_request)); + extts_request.index = 0; + extts_request.flags = PTP_ENABLE_FEATURE; + if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) { + perror("PTP_EXTTS_REQUEST"); + extts = 0; + } else { + puts("external time stamp request okay"); + } + for (; extts; extts--) { + cnt = read(fd, &event, sizeof(event)); + if (cnt != sizeof(event)) { + perror("read"); + break; + } + printf("event index %u at %lld.%09u\n", event.index, + event.t.sec, event.t.nsec); + fflush(stdout); + } + /* Disable the feature again. */ + extts_request.flags = 0; + if (ioctl(fd, PTP_EXTTS_REQUEST, &extts_request)) { + perror("PTP_EXTTS_REQUEST"); + } + } + + if (oneshot) { + install_handler(SIGALRM, handle_alarm); + /* Create a timer. */ + sigevent.sigev_notify = SIGEV_SIGNAL; + sigevent.sigev_signo = SIGALRM; + if (timer_create(clkid, &sigevent, &timerid)) { + perror("timer_create"); + return -1; + } + /* Start the timer. */ + memset(&timeout, 0, sizeof(timeout)); + timeout.it_value.tv_sec = oneshot; + if (timer_settime(timerid, 0, &timeout, NULL)) { + perror("timer_settime"); + return -1; + } + pause(); + timer_delete(timerid); + } + + if (periodic) { + install_handler(SIGALRM, handle_alarm); + /* Create a timer. */ + sigevent.sigev_notify = SIGEV_SIGNAL; + sigevent.sigev_signo = SIGALRM; + if (timer_create(clkid, &sigevent, &timerid)) { + perror("timer_create"); + return -1; + } + /* Start the timer. */ + memset(&timeout, 0, sizeof(timeout)); + timeout.it_interval.tv_sec = periodic; + timeout.it_value.tv_sec = periodic; + if (timer_settime(timerid, 0, &timeout, NULL)) { + perror("timer_settime"); + return -1; + } + while (1) { + pause(); + } + timer_delete(timerid); + } + + if (perout >= 0) { + if (clock_gettime(clkid, &ts)) { + perror("clock_gettime"); + return -1; + } + memset(&perout_request, 0, sizeof(perout_request)); + perout_request.index = 0; + perout_request.start.sec = ts.tv_sec + 2; + perout_request.start.nsec = 0; + perout_request.period.sec = 0; + perout_request.period.nsec = perout; + if (ioctl(fd, PTP_PEROUT_REQUEST, &perout_request)) { + perror("PTP_PEROUT_REQUEST"); + } else { + puts("periodic output request okay"); + } + } + + if (pps != -1) { + int enable = pps ? 1 : 0; + if (ioctl(fd, PTP_ENABLE_PPS, enable)) { + perror("PTP_ENABLE_PPS"); + } else { + puts("pps for system time request okay"); + } + } + + close(fd); + return 0; +} diff --git a/trunk/Documentation/ptp/testptp.mk b/trunk/Documentation/ptp/testptp.mk new file mode 100644 index 000000000000..4ef2d9755421 --- /dev/null +++ b/trunk/Documentation/ptp/testptp.mk @@ -0,0 +1,33 @@ +# PTP 1588 clock support - User space test program +# +# Copyright (C) 2010 OMICRON electronics GmbH +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +CC = $(CROSS_COMPILE)gcc +INC = -I$(KBUILD_OUTPUT)/usr/include +CFLAGS = -Wall $(INC) +LDLIBS = -lrt +PROGS = testptp + +all: $(PROGS) + +testptp: testptp.o + +clean: + rm -f testptp.o + +distclean: clean + rm -f $(PROGS) diff --git a/trunk/Documentation/virtual/uml/UserModeLinux-HOWTO.txt b/trunk/Documentation/virtual/uml/UserModeLinux-HOWTO.txt index 9b7e1904db1c..5d0fc8bfcdb9 100644 --- a/trunk/Documentation/virtual/uml/UserModeLinux-HOWTO.txt +++ b/trunk/Documentation/virtual/uml/UserModeLinux-HOWTO.txt @@ -1182,6 +1182,16 @@ forge.net/> and explains these in detail, as well as some other issues. + There is also a related point-to-point only "ucast" transport. + This is useful when your network does not support multicast, and + all network connections are simple point to point links. + + The full set of command line options for this transport are + + + ethn=ucast,ethernet address,remote address,listen port,remote port + + 66..66.. TTUUNN//TTAAPP wwiitthh tthhee uummll__nneett hheellppeerr diff --git a/trunk/Documentation/vm/locking b/trunk/Documentation/vm/locking index 25fadb448760..f61228bd6395 100644 --- a/trunk/Documentation/vm/locking +++ b/trunk/Documentation/vm/locking @@ -66,7 +66,7 @@ in some cases it is not really needed. Eg, vm_start is modified by expand_stack(), it is hard to come up with a destructive scenario without having the vmlist protection in this case. -The page_table_lock nests with the inode i_mmap_lock and the kmem cache +The page_table_lock nests with the inode i_mmap_mutex and the kmem cache c_spinlock spinlocks. This is okay, since the kmem code asks for pages after dropping c_spinlock. The page_table_lock also nests with pagecache_lock and pagemap_lru_lock spinlocks, and no code asks for memory with these locks diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 98c324b07a16..59cd2f5a1122 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2034,9 +2034,8 @@ F: net/ax25/ax25_timer.c F: net/ax25/sysctl_net_ax25.c DAVICOM FAST ETHERNET (DMFE) NETWORK DRIVER -M: Tobias Ringstrom L: netdev@vger.kernel.org -S: Maintained +S: Orphan F: Documentation/networking/dmfe.txt F: drivers/net/tulip/dmfe.c @@ -3898,7 +3897,6 @@ F: drivers/*/*/*pasemi* LINUX SECURITY MODULE (LSM) FRAMEWORK M: Chris Wright L: linux-security-module@vger.kernel.org -T: git git://git.kernel.org/pub/scm/linux/kernel/git/chrisw/lsm-2.6.git S: Supported LIS3LV02D ACCELEROMETER DRIVER diff --git a/trunk/arch/Kconfig b/trunk/arch/Kconfig index 8d24bacaa61e..26b0e2397a57 100644 --- a/trunk/arch/Kconfig +++ b/trunk/arch/Kconfig @@ -175,4 +175,7 @@ config HAVE_ARCH_JUMP_LABEL config HAVE_ARCH_MUTEX_CPU_RELAX bool +config HAVE_RCU_TABLE_FREE + bool + source "kernel/gcov/Kconfig" diff --git a/trunk/arch/alpha/Kconfig b/trunk/arch/alpha/Kconfig index 9808998cc073..e3a82775f9da 100644 --- a/trunk/arch/alpha/Kconfig +++ b/trunk/arch/alpha/Kconfig @@ -12,6 +12,7 @@ config ALPHA select GENERIC_IRQ_PROBE select AUTO_IRQ_AFFINITY if SMP select GENERIC_IRQ_SHOW + select ARCH_WANT_OPTIONAL_GPIOLIB help The Alpha is a 64-bit general-purpose processor designed and marketed by the Digital Equipment Corporation of blessed memory, @@ -51,6 +52,9 @@ config GENERIC_CALIBRATE_DELAY config GENERIC_CMOS_UPDATE def_bool y +config GENERIC_GPIO + def_bool y + config ZONE_DMA bool default y diff --git a/trunk/arch/alpha/include/asm/gpio.h b/trunk/arch/alpha/include/asm/gpio.h new file mode 100644 index 000000000000..7dc6a6343c06 --- /dev/null +++ b/trunk/arch/alpha/include/asm/gpio.h @@ -0,0 +1,55 @@ +/* + * Generic GPIO API implementation for Alpha. + * + * A stright copy of that for PowerPC which was: + * + * Copyright (c) 2007-2008 MontaVista Software, Inc. + * + * Author: Anton Vorontsov + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + */ + +#ifndef _ASM_ALPHA_GPIO_H +#define _ASM_ALPHA_GPIO_H + +#include +#include + +#ifdef CONFIG_GPIOLIB + +/* + * We don't (yet) implement inlined/rapid versions for on-chip gpios. + * Just call gpiolib. + */ +static inline int gpio_get_value(unsigned int gpio) +{ + return __gpio_get_value(gpio); +} + +static inline void gpio_set_value(unsigned int gpio, int value) +{ + __gpio_set_value(gpio, value); +} + +static inline int gpio_cansleep(unsigned int gpio) +{ + return __gpio_cansleep(gpio); +} + +static inline int gpio_to_irq(unsigned int gpio) +{ + return __gpio_to_irq(gpio); +} + +static inline int irq_to_gpio(unsigned int irq) +{ + return -EINVAL; +} + +#endif /* CONFIG_GPIOLIB */ + +#endif /* _ASM_ALPHA_GPIO_H */ diff --git a/trunk/arch/alpha/include/asm/smp.h b/trunk/arch/alpha/include/asm/smp.h index 3f390e8cc0b3..c46e714aa3e0 100644 --- a/trunk/arch/alpha/include/asm/smp.h +++ b/trunk/arch/alpha/include/asm/smp.h @@ -39,8 +39,6 @@ struct cpuinfo_alpha { extern struct cpuinfo_alpha cpu_data[NR_CPUS]; -#define PROC_CHANGE_PENALTY 20 - #define hard_smp_processor_id() __hard_smp_processor_id() #define raw_smp_processor_id() (current_thread_info()->cpu) diff --git a/trunk/arch/alpha/kernel/process.c b/trunk/arch/alpha/kernel/process.c index 3ec35066f1dc..838eac128409 100644 --- a/trunk/arch/alpha/kernel/process.c +++ b/trunk/arch/alpha/kernel/process.c @@ -121,7 +121,7 @@ common_shutdown_1(void *generic_ptr) /* Wait for the secondaries to halt. */ set_cpu_present(boot_cpuid, false); set_cpu_possible(boot_cpuid, false); - while (cpus_weight(cpu_present_map)) + while (cpumask_weight(cpu_present_mask)) barrier(); #endif diff --git a/trunk/arch/alpha/kernel/setup.c b/trunk/arch/alpha/kernel/setup.c index edbddcbd5bc6..cc0fd862cf26 100644 --- a/trunk/arch/alpha/kernel/setup.c +++ b/trunk/arch/alpha/kernel/setup.c @@ -1257,7 +1257,7 @@ show_cpuinfo(struct seq_file *f, void *slot) #ifdef CONFIG_SMP seq_printf(f, "cpus active\t\t: %u\n" "cpu active mask\t\t: %016lx\n", - num_online_cpus(), cpus_addr(cpu_possible_map)[0]); + num_online_cpus(), cpumask_bits(cpu_possible_mask)[0]); #endif show_cache_size (f, "L1 Icache", alpha_l1i_cacheshape); diff --git a/trunk/arch/alpha/kernel/smp.c b/trunk/arch/alpha/kernel/smp.c index 5a621c6d22ab..d739703608fc 100644 --- a/trunk/arch/alpha/kernel/smp.c +++ b/trunk/arch/alpha/kernel/smp.c @@ -451,7 +451,7 @@ setup_smp(void) } printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n", - smp_num_probed, cpu_present_map.bits[0]); + smp_num_probed, cpumask_bits(cpu_present_mask)[0]); } /* @@ -629,8 +629,9 @@ smp_send_reschedule(int cpu) void smp_send_stop(void) { - cpumask_t to_whom = cpu_possible_map; - cpu_clear(smp_processor_id(), to_whom); + cpumask_t to_whom; + cpumask_copy(&to_whom, cpu_possible_mask); + cpumask_clear_cpu(smp_processor_id(), &to_whom); #ifdef DEBUG_IPI_MSG if (hard_smp_processor_id() != boot_cpu_id) printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n"); diff --git a/trunk/arch/alpha/kernel/sys_dp264.c b/trunk/arch/alpha/kernel/sys_dp264.c index 5ac00fd4cd0c..f8856829c22a 100644 --- a/trunk/arch/alpha/kernel/sys_dp264.c +++ b/trunk/arch/alpha/kernel/sys_dp264.c @@ -140,7 +140,7 @@ cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) for (cpu = 0; cpu < 4; cpu++) { unsigned long aff = cpu_irq_affinity[cpu]; - if (cpu_isset(cpu, affinity)) + if (cpumask_test_cpu(cpu, &affinity)) aff |= 1UL << irq; else aff &= ~(1UL << irq); diff --git a/trunk/arch/alpha/kernel/sys_titan.c b/trunk/arch/alpha/kernel/sys_titan.c index fea0e4620994..6994407e242a 100644 --- a/trunk/arch/alpha/kernel/sys_titan.c +++ b/trunk/arch/alpha/kernel/sys_titan.c @@ -65,10 +65,11 @@ titan_update_irq_hw(unsigned long mask) register int bcpu = boot_cpuid; #ifdef CONFIG_SMP - cpumask_t cpm = cpu_present_map; + cpumask_t cpm; volatile unsigned long *dim0, *dim1, *dim2, *dim3; unsigned long mask0, mask1, mask2, mask3, dummy; + cpumask_copy(&cpm, cpu_present_mask); mask &= ~isa_enable; mask0 = mask & titan_cpu_irq_affinity[0]; mask1 = mask & titan_cpu_irq_affinity[1]; @@ -84,10 +85,10 @@ titan_update_irq_hw(unsigned long mask) dim1 = &cchip->dim1.csr; dim2 = &cchip->dim2.csr; dim3 = &cchip->dim3.csr; - if (!cpu_isset(0, cpm)) dim0 = &dummy; - if (!cpu_isset(1, cpm)) dim1 = &dummy; - if (!cpu_isset(2, cpm)) dim2 = &dummy; - if (!cpu_isset(3, cpm)) dim3 = &dummy; + if (!cpumask_test_cpu(0, &cpm)) dim0 = &dummy; + if (!cpumask_test_cpu(1, &cpm)) dim1 = &dummy; + if (!cpumask_test_cpu(2, &cpm)) dim2 = &dummy; + if (!cpumask_test_cpu(3, &cpm)) dim3 = &dummy; *dim0 = mask0; *dim1 = mask1; @@ -137,7 +138,7 @@ titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) int cpu; for (cpu = 0; cpu < 4; cpu++) { - if (cpu_isset(cpu, affinity)) + if (cpumask_test_cpu(cpu, &affinity)) titan_cpu_irq_affinity[cpu] |= 1UL << irq; else titan_cpu_irq_affinity[cpu] &= ~(1UL << irq); diff --git a/trunk/arch/alpha/mm/init.c b/trunk/arch/alpha/mm/init.c index 86425ab53bf5..69d0c5761e2f 100644 --- a/trunk/arch/alpha/mm/init.c +++ b/trunk/arch/alpha/mm/init.c @@ -32,8 +32,6 @@ #include #include -DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); - extern void die_if_kernel(char *,struct pt_regs *,long); static struct pcb_struct original_pcb; diff --git a/trunk/arch/alpha/mm/numa.c b/trunk/arch/alpha/mm/numa.c index 7b2c56d8f930..3973ae395772 100644 --- a/trunk/arch/alpha/mm/numa.c +++ b/trunk/arch/alpha/mm/numa.c @@ -313,6 +313,7 @@ void __init paging_init(void) zones_size[ZONE_DMA] = dma_local_pfn; zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn; } + node_set_state(nid, N_NORMAL_MEMORY); free_area_init_node(nid, zones_size, start_pfn, NULL); } diff --git a/trunk/arch/arm/Kconfig.debug b/trunk/arch/arm/Kconfig.debug index 03d01d783e3b..81cbe40c159c 100644 --- a/trunk/arch/arm/Kconfig.debug +++ b/trunk/arch/arm/Kconfig.debug @@ -63,13 +63,6 @@ config DEBUG_USER 8 - SIGSEGV faults 16 - SIGBUS faults -config DEBUG_STACK_USAGE - bool "Enable stack utilization instrumentation" - depends on DEBUG_KERNEL - help - Enables the display of the minimum amount of free stack which each - task has ever had available in the sysrq-T output. - # These options are only for real kernel hackers who want to get their hands dirty. config DEBUG_LL bool "Kernel low-level debugging functions" diff --git a/trunk/arch/arm/include/asm/smp.h b/trunk/arch/arm/include/asm/smp.h index a87664f54f93..d2b514fd76f4 100644 --- a/trunk/arch/arm/include/asm/smp.h +++ b/trunk/arch/arm/include/asm/smp.h @@ -20,12 +20,6 @@ #define raw_smp_processor_id() (current_thread_info()->cpu) -/* - * at the moment, there's not a big penalty for changing CPUs - * (the >big< penalty is running SMP in the first place) - */ -#define PROC_CHANGE_PENALTY 15 - struct seq_file; /* diff --git a/trunk/arch/arm/include/asm/tlb.h b/trunk/arch/arm/include/asm/tlb.h index 82dfe5d0c41e..265f908c4a6e 100644 --- a/trunk/arch/arm/include/asm/tlb.h +++ b/trunk/arch/arm/include/asm/tlb.h @@ -41,12 +41,12 @@ */ #if defined(CONFIG_SMP) || defined(CONFIG_CPU_32v7) #define tlb_fast_mode(tlb) 0 -#define FREE_PTE_NR 500 #else #define tlb_fast_mode(tlb) 1 -#define FREE_PTE_NR 0 #endif +#define MMU_GATHER_BUNDLE 8 + /* * TLB handling. This allows us to remove pages from the page * tables, and efficiently handle the TLB issues. @@ -58,7 +58,9 @@ struct mmu_gather { unsigned long range_start; unsigned long range_end; unsigned int nr; - struct page *pages[FREE_PTE_NR]; + unsigned int max; + struct page **pages; + struct page *local[MMU_GATHER_BUNDLE]; }; DECLARE_PER_CPU(struct mmu_gather, mmu_gathers); @@ -97,26 +99,37 @@ static inline void tlb_add_flush(struct mmu_gather *tlb, unsigned long addr) } } +static inline void __tlb_alloc_page(struct mmu_gather *tlb) +{ + unsigned long addr = __get_free_pages(GFP_NOWAIT | __GFP_NOWARN, 0); + + if (addr) { + tlb->pages = (void *)addr; + tlb->max = PAGE_SIZE / sizeof(struct page *); + } +} + static inline void tlb_flush_mmu(struct mmu_gather *tlb) { tlb_flush(tlb); if (!tlb_fast_mode(tlb)) { free_pages_and_swap_cache(tlb->pages, tlb->nr); tlb->nr = 0; + if (tlb->pages == tlb->local) + __tlb_alloc_page(tlb); } } -static inline struct mmu_gather * -tlb_gather_mmu(struct mm_struct *mm, unsigned int full_mm_flush) +static inline void +tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int fullmm) { - struct mmu_gather *tlb = &get_cpu_var(mmu_gathers); - tlb->mm = mm; - tlb->fullmm = full_mm_flush; + tlb->fullmm = fullmm; tlb->vma = NULL; + tlb->max = ARRAY_SIZE(tlb->local); + tlb->pages = tlb->local; tlb->nr = 0; - - return tlb; + __tlb_alloc_page(tlb); } static inline void @@ -127,7 +140,8 @@ tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) /* keep the page table cache within bounds */ check_pgt_cache(); - put_cpu_var(mmu_gathers); + if (tlb->pages != tlb->local) + free_pages((unsigned long)tlb->pages, 0); } /* @@ -162,15 +176,22 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) tlb_flush(tlb); } -static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) +static inline int __tlb_remove_page(struct mmu_gather *tlb, struct page *page) { if (tlb_fast_mode(tlb)) { free_page_and_swap_cache(page); - } else { - tlb->pages[tlb->nr++] = page; - if (tlb->nr >= FREE_PTE_NR) - tlb_flush_mmu(tlb); + return 1; /* avoid calling tlb_flush_mmu */ } + + tlb->pages[tlb->nr++] = page; + VM_BUG_ON(tlb->nr > tlb->max); + return tlb->max - tlb->nr; +} + +static inline void tlb_remove_page(struct mmu_gather *tlb, struct page *page) +{ + if (!__tlb_remove_page(tlb, page)) + tlb_flush_mmu(tlb); } static inline void __pte_free_tlb(struct mmu_gather *tlb, pgtable_t pte, diff --git a/trunk/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h b/trunk/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h new file mode 100644 index 000000000000..292d55ed2113 --- /dev/null +++ b/trunk/arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h @@ -0,0 +1,78 @@ +/* + * PTP 1588 clock using the IXP46X + * + * Copyright (C) 2010 OMICRON electronics GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef _IXP46X_TS_H_ +#define _IXP46X_TS_H_ + +#define DEFAULT_ADDEND 0xF0000029 +#define TICKS_NS_SHIFT 4 + +struct ixp46x_channel_ctl { + u32 ch_control; /* 0x40 Time Synchronization Channel Control */ + u32 ch_event; /* 0x44 Time Synchronization Channel Event */ + u32 tx_snap_lo; /* 0x48 Transmit Snapshot Low Register */ + u32 tx_snap_hi; /* 0x4C Transmit Snapshot High Register */ + u32 rx_snap_lo; /* 0x50 Receive Snapshot Low Register */ + u32 rx_snap_hi; /* 0x54 Receive Snapshot High Register */ + u32 src_uuid_lo; /* 0x58 Source UUID0 Low Register */ + u32 src_uuid_hi; /* 0x5C Sequence Identifier/Source UUID0 High */ +}; + +struct ixp46x_ts_regs { + u32 control; /* 0x00 Time Sync Control Register */ + u32 event; /* 0x04 Time Sync Event Register */ + u32 addend; /* 0x08 Time Sync Addend Register */ + u32 accum; /* 0x0C Time Sync Accumulator Register */ + u32 test; /* 0x10 Time Sync Test Register */ + u32 unused; /* 0x14 */ + u32 rsystime_lo; /* 0x18 RawSystemTime_Low Register */ + u32 rsystime_hi; /* 0x1C RawSystemTime_High Register */ + u32 systime_lo; /* 0x20 SystemTime_Low Register */ + u32 systime_hi; /* 0x24 SystemTime_High Register */ + u32 trgt_lo; /* 0x28 TargetTime_Low Register */ + u32 trgt_hi; /* 0x2C TargetTime_High Register */ + u32 asms_lo; /* 0x30 Auxiliary Slave Mode Snapshot Low */ + u32 asms_hi; /* 0x34 Auxiliary Slave Mode Snapshot High */ + u32 amms_lo; /* 0x38 Auxiliary Master Mode Snapshot Low */ + u32 amms_hi; /* 0x3C Auxiliary Master Mode Snapshot High */ + + struct ixp46x_channel_ctl channel[3]; +}; + +/* 0x00 Time Sync Control Register Bits */ +#define TSCR_AMM (1<<3) +#define TSCR_ASM (1<<2) +#define TSCR_TTM (1<<1) +#define TSCR_RST (1<<0) + +/* 0x04 Time Sync Event Register Bits */ +#define TSER_SNM (1<<3) +#define TSER_SNS (1<<2) +#define TTIPEND (1<<1) + +/* 0x40 Time Synchronization Channel Control Register Bits */ +#define MASTER_MODE (1<<0) +#define TIMESTAMP_ALL (1<<1) + +/* 0x44 Time Synchronization Channel Event Register Bits */ +#define TX_SNAPSHOT_LOCKED (1<<0) +#define RX_SNAPSHOT_LOCKED (1<<1) + +#endif diff --git a/trunk/arch/arm/mach-omap2/board-3430sdp.c b/trunk/arch/arm/mach-omap2/board-3430sdp.c index 9afd087cc29c..23244cd0a5b6 100644 --- a/trunk/arch/arm/mach-omap2/board-3430sdp.c +++ b/trunk/arch/arm/mach-omap2/board-3430sdp.c @@ -37,8 +37,8 @@ #include #include #include -#include -#include +#include