Merge branch 'akpm'
Linus Torvalds [Wed, 17 Jun 2009 02:50:13 +0000 (19:50 -0700)]
* akpm: (182 commits)
  fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset
  fbdev: *bfin*: fix __dev{init,exit} markings
  fbdev: *bfin*: drop unnecessary calls to memset
  fbdev: bfin-t350mcqb-fb: drop unused local variables
  fbdev: blackfin has __raw I/O accessors, so use them in fb.h
  fbdev: s1d13xxxfb: add accelerated bitblt functions
  tcx: use standard fields for framebuffer physical address and length
  fbdev: add support for handoff from firmware to hw framebuffers
  intelfb: fix a bug when changing video timing
  fbdev: use framebuffer_release() for freeing fb_info structures
  radeon: P2G2CLK_ALWAYS_ONb tested twice, should 2nd be P2G2CLK_DAC_ALWAYS_ONb?
  s3c-fb: CPUFREQ frequency scaling support
  s3c-fb: fix resource releasing on error during probing
  carminefb: fix possible access beyond end of carmine_modedb[]
  acornfb: remove fb_mmap function
  mb862xxfb: use CONFIG_OF instead of CONFIG_PPC_OF
  mb862xxfb: restrict compliation of platform driver to PPC
  Samsung SoC Framebuffer driver: add Alpha Channel support
  atmel-lcdc: fix pixclock upper bound detection
  offb: use framebuffer_alloc() to allocate fb_info struct
  ...

Manually fix up conflicts due to kmemcheck in mm/slab.c

247 files changed:
Documentation/accounting/getdelays.c
Documentation/atomic_ops.txt
Documentation/fb/vesafb.txt
Documentation/filesystems/proc.txt
Documentation/kernel-parameters.txt
Documentation/sysctl/vm.txt
Documentation/vm/Makefile
Documentation/vm/balance
Documentation/vm/page-types.c [new file with mode: 0644]
Documentation/vm/pagemap.txt
MAINTAINERS
arch/alpha/include/asm/8253pit.h
arch/alpha/include/asm/kmap_types.h
arch/alpha/kernel/init_task.c
arch/alpha/kernel/irq_alpha.c
arch/alpha/kernel/irq_i8259.c
arch/alpha/kernel/irq_impl.h
arch/alpha/kernel/irq_pyxis.c
arch/alpha/kernel/irq_srm.c
arch/alpha/kernel/setup.c
arch/alpha/kernel/sys_alcor.c
arch/alpha/kernel/sys_cabriolet.c
arch/alpha/kernel/sys_dp264.c
arch/alpha/kernel/sys_eb64p.c
arch/alpha/kernel/sys_eiger.c
arch/alpha/kernel/sys_jensen.c
arch/alpha/kernel/sys_marvel.c
arch/alpha/kernel/sys_mikasa.c
arch/alpha/kernel/sys_noritake.c
arch/alpha/kernel/sys_rawhide.c
arch/alpha/kernel/sys_ruffian.c
arch/alpha/kernel/sys_rx164.c
arch/alpha/kernel/sys_sable.c
arch/alpha/kernel/sys_takara.c
arch/alpha/kernel/sys_titan.c
arch/alpha/kernel/sys_wildfire.c
arch/alpha/mm/numa.c
arch/arm/kernel/init_task.c
arch/avr32/kernel/init_task.c
arch/blackfin/include/asm/kmap_types.h
arch/blackfin/kernel/init_task.c
arch/cris/include/asm/kmap_types.h
arch/cris/kernel/process.c
arch/frv/kernel/init_task.c
arch/h8300/include/asm/kmap_types.h
arch/h8300/kernel/init_task.c
arch/ia64/hp/common/sba_iommu.c
arch/ia64/include/asm/kmap_types.h
arch/ia64/kernel/init_task.c
arch/ia64/kernel/mca.c
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/uncached.c
arch/ia64/sn/pci/pci_dma.c
arch/m32r/include/asm/kmap_types.h
arch/m32r/kernel/init_task.c
arch/m32r/mm/discontig.c
arch/m32r/platforms/m32104ut/setup.c
arch/m32r/platforms/m32700ut/setup.c
arch/m32r/platforms/mappi/setup.c
arch/m32r/platforms/mappi2/setup.c
arch/m32r/platforms/mappi3/setup.c
arch/m32r/platforms/oaks32r/setup.c
arch/m32r/platforms/opsput/setup.c
arch/m32r/platforms/usrv/setup.c
arch/m68k/include/asm/kmap_types.h
arch/m68k/kernel/process.c
arch/m68knommu/kernel/init_task.c
arch/microblaze/include/asm/kmap_types.h
arch/mips/include/asm/i8253.h
arch/mips/include/asm/kmap_types.h
arch/mips/kernel/init_task.c
arch/mn10300/include/asm/kmap_types.h
arch/mn10300/kernel/init_task.c
arch/parisc/include/asm/kmap_types.h
arch/parisc/kernel/init_task.c
arch/powerpc/include/asm/8253pit.h
arch/powerpc/kernel/init_task.c
arch/powerpc/kernel/prom_init.c
arch/powerpc/platforms/cell/ras.c
arch/powerpc/platforms/cell/spu_base.c
arch/s390/include/asm/kmap_types.h
arch/s390/kernel/init_task.c
arch/sh/include/asm/kmap_types.h
arch/sh/kernel/init_task.c
arch/sparc/include/asm/kmap_types.h
arch/sparc/kernel/init_task.c
arch/um/include/shared/init.h
arch/um/include/shared/net_user.h
arch/um/kernel/init_task.c
arch/um/kernel/irq.c
arch/um/sys-i386/stub.S
arch/um/sys-x86_64/asm/elf.h
arch/um/sys-x86_64/stub.S
arch/x86/include/asm/kmap_types.h
arch/x86/include/asm/timex.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/i8253.c
arch/x86/kernel/init_task.c
arch/x86/kernel/tsc.c
arch/x86/kvm/vmx.c
arch/xtensa/include/asm/kmap_types.h
arch/xtensa/kernel/init_task.c
drivers/Kconfig
drivers/Makefile
drivers/base/node.c
drivers/char/vt.c
drivers/clocksource/acpi_pm.c
drivers/eisa/eisa.ids
drivers/firmware/memmap.c
drivers/gpu/drm/i915/intel_fb.c
drivers/hwmon/Kconfig
drivers/hwmon/hp_accel.c
drivers/hwmon/lis3lv02d.c
drivers/hwmon/lis3lv02d.h
drivers/hwmon/lis3lv02d_spi.c
drivers/input/joystick/analog.c
drivers/input/misc/pcspkr.c
drivers/media/video/videobuf-dma-contig.c
drivers/misc/sgi-gru/grufile.c
drivers/misc/sgi-xp/xpc_uv.c
drivers/pcmcia/pcmcia_ioctl.c
drivers/spi/spi_mpc83xx.c
drivers/video/Kconfig
drivers/video/acornfb.c
drivers/video/atmel_lcdfb.c
drivers/video/aty/radeon_pm.c
drivers/video/bf54x-lq043fb.c
drivers/video/bfin-t350mcqb-fb.c
drivers/video/carminefb.c
drivers/video/chipsfb.c
drivers/video/efifb.c
drivers/video/fbmem.c
drivers/video/igafb.c
drivers/video/intelfb/intelfbdrv.c
drivers/video/logo/Makefile
drivers/video/logo/logo.c
drivers/video/mb862xx/mb862xxfb.c
drivers/video/modedb.c
drivers/video/offb.c
drivers/video/pm2fb.c
drivers/video/s1d13xxxfb.c
drivers/video/s3c-fb.c
drivers/video/s3c2410fb.c
drivers/video/s3c2410fb.h
drivers/video/sis/sis_main.c
drivers/video/stifb.c
drivers/video/tcx.c
drivers/video/vesafb.c
drivers/vlynq/Kconfig [new file with mode: 0644]
drivers/vlynq/Makefile [new file with mode: 0644]
drivers/vlynq/vlynq.c [new file with mode: 0644]
fs/Kconfig
fs/drop_caches.c
fs/fs-writeback.c
fs/nfs/iostat.h
fs/ntfs/inode.c
fs/ntfs/logfile.c
fs/proc/base.c
fs/proc/meminfo.c
fs/proc/page.c
fs/select.c
include/asm-generic/kmap_types.h
include/linux/bug.h
include/linux/cpuset.h
include/linux/fb.h
include/linux/firmware-map.h
include/linux/fs.h
include/linux/gfp.h
include/linux/highmem.h
include/linux/hugetlb.h
include/linux/init.h
include/linux/init_task.h
include/linux/linux_logo.h
include/linux/lis3lv02d.h [new file with mode: 0644]
include/linux/major.h
include/linux/memcontrol.h
include/linux/mm.h
include/linux/mm_types.h
include/linux/mmzone.h
include/linux/module.h
include/linux/nodemask.h
include/linux/page-flags.h
include/linux/pagemap.h
include/linux/poll.h
include/linux/radix-tree.h
include/linux/rmap.h
include/linux/sched.h
include/linux/smp.h
include/linux/swap.h
include/linux/syscalls.h
include/linux/timex.h
include/linux/utsname.h
include/linux/vlynq.h [new file with mode: 0644]
include/linux/vmstat.h
include/video/s1d13xxxfb.h
init/main.c
kernel/Makefile
kernel/cpuset.c
kernel/groups.c [new file with mode: 0644]
kernel/kfifo.c
kernel/kthread.c
kernel/power/process.c
kernel/profile.c
kernel/slow-work.c
kernel/sys.c
kernel/sysctl.c
lib/dec_and_lock.c
lib/genalloc.c
lib/hexdump.c
lib/radix-tree.c
lib/rbtree.c
mm/Kconfig
mm/Makefile
mm/fadvise.c
mm/filemap.c
mm/hugetlb.c
mm/init-mm.c [new file with mode: 0644]
mm/internal.h
mm/madvise.c
mm/memcontrol.c
mm/memory.c
mm/memory_hotplug.c
mm/mempolicy.c
mm/migrate.c
mm/mlock.c
mm/oom_kill.c
mm/page-writeback.c
mm/page_alloc.c
mm/page_io.c
mm/readahead.c
mm/rmap.c
mm/shmem.c
mm/slab.c
mm/slob.c
mm/slub.c
mm/swap_state.c
mm/swapfile.c
mm/truncate.c
mm/util.c
mm/vmscan.c
mm/vmstat.c
net/sunrpc/svc.c
scripts/get_maintainer.pl
scripts/gfp-translate [new file with mode: 0644]
scripts/pnmtologo.c
sound/drivers/pcsp/pcsp.h
sound/oss/pas2_pcm.c

index 7ea2311..aa73e72 100644 (file)
@@ -246,7 +246,8 @@ void print_ioacct(struct taskstats *t)
 
 int main(int argc, char *argv[])
 {
-       int c, rc, rep_len, aggr_len, len2, cmd_type;
+       int c, rc, rep_len, aggr_len, len2;
+       int cmd_type = TASKSTATS_CMD_ATTR_UNSPEC;
        __u16 id;
        __u32 mypid;
 
index 4ef2450..396bec3 100644 (file)
@@ -229,10 +229,10 @@ kernel.  It is the use of atomic counters to implement reference
 counting, and it works such that once the counter falls to zero it can
 be guaranteed that no other entity can be accessing the object:
 
-static void obj_list_add(struct obj *obj)
+static void obj_list_add(struct obj *obj, struct list_head *head)
 {
        obj->active = 1;
-       list_add(&obj->list);
+       list_add(&obj->list, head);
 }
 
 static void obj_list_del(struct obj *obj)
index ee277dd..950d5a6 100644 (file)
@@ -95,7 +95,7 @@ There is no way to change the vesafb video mode and/or timings after
 booting linux.  If you are not happy with the 60 Hz refresh rate, you
 have these options:
 
- * configure and load the DOS-Tools for your the graphics board (if
+ * configure and load the DOS-Tools for the graphics board (if
    available) and boot linux with loadlin.
  * use a native driver (matroxfb/atyfb) instead if vesafb.  If none
    is available, write a new one!
index cd8717a..ebff3c1 100644 (file)
@@ -1003,11 +1003,13 @@ CHAPTER 3: PER-PROCESS PARAMETERS
 3.1 /proc/<pid>/oom_adj - Adjust the oom-killer score
 ------------------------------------------------------
 
-This file can be used to adjust the score used to select which processes
-should be killed in an  out-of-memory  situation.  Giving it a high score will
-increase the likelihood of this process being killed by the oom-killer.  Valid
-values are in the range -16 to +15, plus the special value -17, which disables
-oom-killing altogether for this process.
+This file can be used to adjust the score used to select which processes should
+be killed in an out-of-memory situation.  The oom_adj value is a characteristic
+of the task's mm, so all threads that share an mm with pid will have the same
+oom_adj value.  A high value will increase the likelihood of this process being
+killed by the oom-killer.  Valid values are in the range -16 to +15 as
+explained below and a special value of -17, which disables oom-killing
+altogether for threads sharing pid's mm.
 
 The process to be killed in an out-of-memory situation is selected among all others
 based on its badness score. This value equals the original memory size of the process
@@ -1021,6 +1023,9 @@ the parent's score if they do not share the same memory. Thus forking servers
 are the prime candidates to be killed. Having only one 'hungry' child will make
 parent less preferable than the child.
 
+/proc/<pid>/oom_adj cannot be changed for kthreads since they are immune from
+oom-killing already.
+
 /proc/<pid>/oom_score shows process' current badness score.
 
 The following heuristics are then applied:
index ad38006..5578248 100644 (file)
@@ -546,6 +546,10 @@ and is between 256 and 4096 characters. It is defined in the file
                        console=brl,ttyS0
                For now, only VisioBraille is supported.
 
+       consoleblank=   [KNL] The console blank (screen saver) timeout in
+                       seconds. Defaults to 10*60 = 10mins. A value of 0
+                       disables the blank timer.
+
        coredump_filter=
                        [KNL] Change the default value for
                        /proc/<pid>/coredump_filter.
index 6fab2dc..c4de635 100644 (file)
@@ -233,8 +233,8 @@ These protections are added to score to judge whether this zone should be used
 for page allocation or should be reclaimed.
 
 In this example, if normal pages (index=2) are required to this DMA zone and
-pages_high is used for watermark, the kernel judges this zone should not be
-used because pages_free(1355) is smaller than watermark + protection[2]
+watermark[WMARK_HIGH] is used for watermark, the kernel judges this zone should
+not be used because pages_free(1355) is smaller than watermark + protection[2]
 (4 + 2004 = 2008). If this protection value is 0, this zone would be used for
 normal page requirement. If requirement is DMA zone(index=0), protection[0]
 (=0) is used.
@@ -280,9 +280,10 @@ The default value is 65536.
 min_free_kbytes:
 
 This is used to force the Linux VM to keep a minimum number
-of kilobytes free.  The VM uses this number to compute a pages_min
-value for each lowmem zone in the system.  Each lowmem zone gets
-a number of reserved free pages based proportionally on its size.
+of kilobytes free.  The VM uses this number to compute a
+watermark[WMARK_MIN] value for each lowmem zone in the system.
+Each lowmem zone gets a number of reserved free pages based
+proportionally on its size.
 
 Some minimal amount of memory is needed to satisfy PF_MEMALLOC
 allocations; if you set this to lower than 1024KB, your system will
@@ -314,10 +315,14 @@ min_unmapped_ratio:
 
 This is available only on NUMA kernels.
 
-A percentage of the total pages in each zone.  Zone reclaim will only
-occur if more than this percentage of pages are file backed and unmapped.
-This is to insure that a minimal amount of local pages is still available for
-file I/O even if the node is overallocated.
+This is a percentage of the total pages in each zone. Zone reclaim will
+only occur if more than this percentage of pages are in a state that
+zone_reclaim_mode allows to be reclaimed.
+
+If zone_reclaim_mode has the value 4 OR'd, then the percentage is compared
+against all file-backed unmapped pages including swapcache pages and tmpfs
+files. Otherwise, only unmapped pages backed by normal files but not tmpfs
+files and similar are considered.
 
 The default is 1 percent.
 
index 6f562f7..27479d4 100644 (file)
@@ -2,7 +2,7 @@
 obj- := dummy.o
 
 # List of programs to build
-hostprogs-y := slabinfo
+hostprogs-y := slabinfo slqbinfo page-types
 
 # Tell kbuild to always build the programs
 always := $(hostprogs-y)
index bd3d31b..c46e68c 100644 (file)
@@ -75,15 +75,15 @@ Page stealing from process memory and shm is done if stealing the page would
 alleviate memory pressure on any zone in the page's node that has fallen below
 its watermark.
 
-pages_min/pages_low/pages_high/low_on_memory/zone_wake_kswapd: These are 
-per-zone fields, used to determine when a zone needs to be balanced. When
-the number of pages falls below pages_min, the hysteric field low_on_memory
-gets set. This stays set till the number of free pages becomes pages_high.
-When low_on_memory is set, page allocation requests will try to free some
-pages in the zone (providing GFP_WAIT is set in the request). Orthogonal
-to this, is the decision to poke kswapd to free some zone pages. That
-decision is not hysteresis based, and is done when the number of free
-pages is below pages_low; in which case zone_wake_kswapd is also set.
+watemark[WMARK_MIN/WMARK_LOW/WMARK_HIGH]/low_on_memory/zone_wake_kswapd: These
+are per-zone fields, used to determine when a zone needs to be balanced. When
+the number of pages falls below watermark[WMARK_MIN], the hysteric field
+low_on_memory gets set. This stays set till the number of free pages becomes
+watermark[WMARK_HIGH]. When low_on_memory is set, page allocation requests will
+try to free some pages in the zone (providing GFP_WAIT is set in the request).
+Orthogonal to this, is the decision to poke kswapd to free some zone pages.
+That decision is not hysteresis based, and is done when the number of free
+pages is below watermark[WMARK_LOW]; in which case zone_wake_kswapd is also set.
 
 
 (Good) Ideas that I have heard:
diff --git a/Documentation/vm/page-types.c b/Documentation/vm/page-types.c
new file mode 100644 (file)
index 0000000..0833f44
--- /dev/null
@@ -0,0 +1,698 @@
+/*
+ * page-types: Tool for querying page flags
+ *
+ * Copyright (C) 2009 Intel corporation
+ * Copyright (C) 2009 Wu Fengguang <fengguang.wu@intel.com>
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdint.h>
+#include <stdarg.h>
+#include <string.h>
+#include <getopt.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <sys/errno.h>
+#include <sys/fcntl.h>
+
+
+/*
+ * kernel page flags
+ */
+
+#define KPF_BYTES              8
+#define PROC_KPAGEFLAGS                "/proc/kpageflags"
+
+/* copied from kpageflags_read() */
+#define KPF_LOCKED             0
+#define KPF_ERROR              1
+#define KPF_REFERENCED         2
+#define KPF_UPTODATE           3
+#define KPF_DIRTY              4
+#define KPF_LRU                        5
+#define KPF_ACTIVE             6
+#define KPF_SLAB               7
+#define KPF_WRITEBACK          8
+#define KPF_RECLAIM            9
+#define KPF_BUDDY              10
+
+/* [11-20] new additions in 2.6.31 */
+#define KPF_MMAP               11
+#define KPF_ANON               12
+#define KPF_SWAPCACHE          13
+#define KPF_SWAPBACKED         14
+#define KPF_COMPOUND_HEAD      15
+#define KPF_COMPOUND_TAIL      16
+#define KPF_HUGE               17
+#define KPF_UNEVICTABLE                18
+#define KPF_NOPAGE             20
+
+/* [32-] kernel hacking assistances */
+#define KPF_RESERVED           32
+#define KPF_MLOCKED            33
+#define KPF_MAPPEDTODISK       34
+#define KPF_PRIVATE            35
+#define KPF_PRIVATE_2          36
+#define KPF_OWNER_PRIVATE      37
+#define KPF_ARCH               38
+#define KPF_UNCACHED           39
+
+/* [48-] take some arbitrary free slots for expanding overloaded flags
+ * not part of kernel API
+ */
+#define KPF_READAHEAD          48
+#define KPF_SLOB_FREE          49
+#define KPF_SLUB_FROZEN                50
+#define KPF_SLUB_DEBUG         51
+
+#define KPF_ALL_BITS           ((uint64_t)~0ULL)
+#define KPF_HACKERS_BITS       (0xffffULL << 32)
+#define KPF_OVERLOADED_BITS    (0xffffULL << 48)
+#define BIT(name)              (1ULL << KPF_##name)
+#define BITS_COMPOUND          (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL))
+
+static char *page_flag_names[] = {
+       [KPF_LOCKED]            = "L:locked",
+       [KPF_ERROR]             = "E:error",
+       [KPF_REFERENCED]        = "R:referenced",
+       [KPF_UPTODATE]          = "U:uptodate",
+       [KPF_DIRTY]             = "D:dirty",
+       [KPF_LRU]               = "l:lru",
+       [KPF_ACTIVE]            = "A:active",
+       [KPF_SLAB]              = "S:slab",
+       [KPF_WRITEBACK]         = "W:writeback",
+       [KPF_RECLAIM]           = "I:reclaim",
+       [KPF_BUDDY]             = "B:buddy",
+
+       [KPF_MMAP]              = "M:mmap",
+       [KPF_ANON]              = "a:anonymous",
+       [KPF_SWAPCACHE]         = "s:swapcache",
+       [KPF_SWAPBACKED]        = "b:swapbacked",
+       [KPF_COMPOUND_HEAD]     = "H:compound_head",
+       [KPF_COMPOUND_TAIL]     = "T:compound_tail",
+       [KPF_HUGE]              = "G:huge",
+       [KPF_UNEVICTABLE]       = "u:unevictable",
+       [KPF_NOPAGE]            = "n:nopage",
+
+       [KPF_RESERVED]          = "r:reserved",
+       [KPF_MLOCKED]           = "m:mlocked",
+       [KPF_MAPPEDTODISK]      = "d:mappedtodisk",
+       [KPF_PRIVATE]           = "P:private",
+       [KPF_PRIVATE_2]         = "p:private_2",
+       [KPF_OWNER_PRIVATE]     = "O:owner_private",
+       [KPF_ARCH]              = "h:arch",
+       [KPF_UNCACHED]          = "c:uncached",
+
+       [KPF_READAHEAD]         = "I:readahead",
+       [KPF_SLOB_FREE]         = "P:slob_free",
+       [KPF_SLUB_FROZEN]       = "A:slub_frozen",
+       [KPF_SLUB_DEBUG]        = "E:slub_debug",
+};
+
+
+/*
+ * data structures
+ */
+
+static int             opt_raw;        /* for kernel developers */
+static int             opt_list;       /* list pages (in ranges) */
+static int             opt_no_summary; /* don't show summary */
+static pid_t           opt_pid;        /* process to walk */
+
+#define MAX_ADDR_RANGES        1024
+static int             nr_addr_ranges;
+static unsigned long   opt_offset[MAX_ADDR_RANGES];
+static unsigned long   opt_size[MAX_ADDR_RANGES];
+
+#define MAX_BIT_FILTERS        64
+static int             nr_bit_filters;
+static uint64_t                opt_mask[MAX_BIT_FILTERS];
+static uint64_t                opt_bits[MAX_BIT_FILTERS];
+
+static int             page_size;
+
+#define PAGES_BATCH    (64 << 10)      /* 64k pages */
+static int             kpageflags_fd;
+static uint64_t                kpageflags_buf[KPF_BYTES * PAGES_BATCH];
+
+#define HASH_SHIFT     13
+#define HASH_SIZE      (1 << HASH_SHIFT)
+#define HASH_MASK      (HASH_SIZE - 1)
+#define HASH_KEY(flags)        (flags & HASH_MASK)
+
+static unsigned long   total_pages;
+static unsigned long   nr_pages[HASH_SIZE];
+static uint64_t        page_flags[HASH_SIZE];
+
+
+/*
+ * helper functions
+ */
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+#define min_t(type, x, y) ({                   \
+       type __min1 = (x);                      \
+       type __min2 = (y);                      \
+       __min1 < __min2 ? __min1 : __min2; })
+
+unsigned long pages2mb(unsigned long pages)
+{
+       return (pages * page_size) >> 20;
+}
+
+void fatal(const char *x, ...)
+{
+       va_list ap;
+
+       va_start(ap, x);
+       vfprintf(stderr, x, ap);
+       va_end(ap);
+       exit(EXIT_FAILURE);
+}
+
+
+/*
+ * page flag names
+ */
+
+char *page_flag_name(uint64_t flags)
+{
+       static char buf[65];
+       int present;
+       int i, j;
+
+       for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) {
+               present = (flags >> i) & 1;
+               if (!page_flag_names[i]) {
+                       if (present)
+                               fatal("unkown flag bit %d\n", i);
+                       continue;
+               }
+               buf[j++] = present ? page_flag_names[i][0] : '_';
+       }
+
+       return buf;
+}
+
+char *page_flag_longname(uint64_t flags)
+{
+       static char buf[1024];
+       int i, n;
+
+       for (i = 0, n = 0; i < ARRAY_SIZE(page_flag_names); i++) {
+               if (!page_flag_names[i])
+                       continue;
+               if ((flags >> i) & 1)
+                       n += snprintf(buf + n, sizeof(buf) - n, "%s,",
+                                       page_flag_names[i] + 2);
+       }
+       if (n)
+               n--;
+       buf[n] = '\0';
+
+       return buf;
+}
+
+
+/*
+ * page list and summary
+ */
+
+void show_page_range(unsigned long offset, uint64_t flags)
+{
+       static uint64_t      flags0;
+       static unsigned long index;
+       static unsigned long count;
+
+       if (flags == flags0 && offset == index + count) {
+               count++;
+               return;
+       }
+
+       if (count)
+               printf("%lu\t%lu\t%s\n",
+                               index, count, page_flag_name(flags0));
+
+       flags0 = flags;
+       index  = offset;
+       count  = 1;
+}
+
+void show_page(unsigned long offset, uint64_t flags)
+{
+       printf("%lu\t%s\n", offset, page_flag_name(flags));
+}
+
+void show_summary(void)
+{
+       int i;
+
+       printf("             flags\tpage-count       MB"
+               "  symbolic-flags\t\t\tlong-symbolic-flags\n");
+
+       for (i = 0; i < ARRAY_SIZE(nr_pages); i++) {
+               if (nr_pages[i])
+                       printf("0x%016llx\t%10lu %8lu  %s\t%s\n",
+                               (unsigned long long)page_flags[i],
+                               nr_pages[i],
+                               pages2mb(nr_pages[i]),
+                               page_flag_name(page_flags[i]),
+                               page_flag_longname(page_flags[i]));
+       }
+
+       printf("             total\t%10lu %8lu\n",
+                       total_pages, pages2mb(total_pages));
+}
+
+
+/*
+ * page flag filters
+ */
+
+int bit_mask_ok(uint64_t flags)
+{
+       int i;
+
+       for (i = 0; i < nr_bit_filters; i++) {
+               if (opt_bits[i] == KPF_ALL_BITS) {
+                       if ((flags & opt_mask[i]) == 0)
+                               return 0;
+               } else {
+                       if ((flags & opt_mask[i]) != opt_bits[i])
+                               return 0;
+               }
+       }
+
+       return 1;
+}
+
+uint64_t expand_overloaded_flags(uint64_t flags)
+{
+       /* SLOB/SLUB overload several page flags */
+       if (flags & BIT(SLAB)) {
+               if (flags & BIT(PRIVATE))
+                       flags ^= BIT(PRIVATE) | BIT(SLOB_FREE);
+               if (flags & BIT(ACTIVE))
+                       flags ^= BIT(ACTIVE) | BIT(SLUB_FROZEN);
+               if (flags & BIT(ERROR))
+                       flags ^= BIT(ERROR) | BIT(SLUB_DEBUG);
+       }
+
+       /* PG_reclaim is overloaded as PG_readahead in the read path */
+       if ((flags & (BIT(RECLAIM) | BIT(WRITEBACK))) == BIT(RECLAIM))
+               flags ^= BIT(RECLAIM) | BIT(READAHEAD);
+
+       return flags;
+}
+
+uint64_t well_known_flags(uint64_t flags)
+{
+       /* hide flags intended only for kernel hacker */
+       flags &= ~KPF_HACKERS_BITS;
+
+       /* hide non-hugeTLB compound pages */
+       if ((flags & BITS_COMPOUND) && !(flags & BIT(HUGE)))
+               flags &= ~BITS_COMPOUND;
+
+       return flags;
+}
+
+
+/*
+ * page frame walker
+ */
+
+int hash_slot(uint64_t flags)
+{
+       int k = HASH_KEY(flags);
+       int i;
+
+       /* Explicitly reserve slot 0 for flags 0: the following logic
+        * cannot distinguish an unoccupied slot from slot (flags==0).
+        */
+       if (flags == 0)
+               return 0;
+
+       /* search through the remaining (HASH_SIZE-1) slots */
+       for (i = 1; i < ARRAY_SIZE(page_flags); i++, k++) {
+               if (!k || k >= ARRAY_SIZE(page_flags))
+                       k = 1;
+               if (page_flags[k] == 0) {
+                       page_flags[k] = flags;
+                       return k;
+               }
+               if (page_flags[k] == flags)
+                       return k;
+       }
+
+       fatal("hash table full: bump up HASH_SHIFT?\n");
+       exit(EXIT_FAILURE);
+}
+
+void add_page(unsigned long offset, uint64_t flags)
+{
+       flags = expand_overloaded_flags(flags);
+
+       if (!opt_raw)
+               flags = well_known_flags(flags);
+
+       if (!bit_mask_ok(flags))
+               return;
+
+       if (opt_list == 1)
+               show_page_range(offset, flags);
+       else if (opt_list == 2)
+               show_page(offset, flags);
+
+       nr_pages[hash_slot(flags)]++;
+       total_pages++;
+}
+
+void walk_pfn(unsigned long index, unsigned long count)
+{
+       unsigned long batch;
+       unsigned long n;
+       unsigned long i;
+
+       if (index > ULONG_MAX / KPF_BYTES)
+               fatal("index overflow: %lu\n", index);
+
+       lseek(kpageflags_fd, index * KPF_BYTES, SEEK_SET);
+
+       while (count) {
+               batch = min_t(unsigned long, count, PAGES_BATCH);
+               n = read(kpageflags_fd, kpageflags_buf, batch * KPF_BYTES);
+               if (n == 0)
+                       break;
+               if (n < 0) {
+                       perror(PROC_KPAGEFLAGS);
+                       exit(EXIT_FAILURE);
+               }
+
+               if (n % KPF_BYTES != 0)
+                       fatal("partial read: %lu bytes\n", n);
+               n = n / KPF_BYTES;
+
+               for (i = 0; i < n; i++)
+                       add_page(index + i, kpageflags_buf[i]);
+
+               index += batch;
+               count -= batch;
+       }
+}
+
+void walk_addr_ranges(void)
+{
+       int i;
+
+       kpageflags_fd = open(PROC_KPAGEFLAGS, O_RDONLY);
+       if (kpageflags_fd < 0) {
+               perror(PROC_KPAGEFLAGS);
+               exit(EXIT_FAILURE);
+       }
+
+       if (!nr_addr_ranges)
+               walk_pfn(0, ULONG_MAX);
+
+       for (i = 0; i < nr_addr_ranges; i++)
+               walk_pfn(opt_offset[i], opt_size[i]);
+
+       close(kpageflags_fd);
+}
+
+
+/*
+ * user interface
+ */
+
+const char *page_flag_type(uint64_t flag)
+{
+       if (flag & KPF_HACKERS_BITS)
+               return "(r)";
+       if (flag & KPF_OVERLOADED_BITS)
+               return "(o)";
+       return "   ";
+}
+
+void usage(void)
+{
+       int i, j;
+
+       printf(
+"page-types [options]\n"
+"            -r|--raw                  Raw mode, for kernel developers\n"
+"            -a|--addr    addr-spec    Walk a range of pages\n"
+"            -b|--bits    bits-spec    Walk pages with specified bits\n"
+#if 0 /* planned features */
+"            -p|--pid     pid          Walk process address space\n"
+"            -f|--file    filename     Walk file address space\n"
+#endif
+"            -l|--list                 Show page details in ranges\n"
+"            -L|--list-each            Show page details one by one\n"
+"            -N|--no-summary           Don't show summay info\n"
+"            -h|--help                 Show this usage message\n"
+"addr-spec:\n"
+"            N                         one page at offset N (unit: pages)\n"
+"            N+M                       pages range from N to N+M-1\n"
+"            N,M                       pages range from N to M-1\n"
+"            N,                        pages range from N to end\n"
+"            ,M                        pages range from 0 to M\n"
+"bits-spec:\n"
+"            bit1,bit2                 (flags & (bit1|bit2)) != 0\n"
+"            bit1,bit2=bit1            (flags & (bit1|bit2)) == bit1\n"
+"            bit1,~bit2                (flags & (bit1|bit2)) == bit1\n"
+"            =bit1,bit2                flags == (bit1|bit2)\n"
+"bit-names:\n"
+       );
+
+       for (i = 0, j = 0; i < ARRAY_SIZE(page_flag_names); i++) {
+               if (!page_flag_names[i])
+                       continue;
+               printf("%16s%s", page_flag_names[i] + 2,
+                                page_flag_type(1ULL << i));
+               if (++j > 3) {
+                       j = 0;
+                       putchar('\n');
+               }
+       }
+       printf("\n                                   "
+               "(r) raw mode bits  (o) overloaded bits\n");
+}
+
+unsigned long long parse_number(const char *str)
+{
+       unsigned long long n;
+
+       n = strtoll(str, NULL, 0);
+
+       if (n == 0 && str[0] != '0')
+               fatal("invalid name or number: %s\n", str);
+
+       return n;
+}
+
+void parse_pid(const char *str)
+{
+       opt_pid = parse_number(str);
+}
+
+void parse_file(const char *name)
+{
+}
+
+void add_addr_range(unsigned long offset, unsigned long size)
+{
+       if (nr_addr_ranges >= MAX_ADDR_RANGES)
+               fatal("too much addr ranges\n");
+
+       opt_offset[nr_addr_ranges] = offset;
+       opt_size[nr_addr_ranges] = size;
+       nr_addr_ranges++;
+}
+
+void parse_addr_range(const char *optarg)
+{
+       unsigned long offset;
+       unsigned long size;
+       char *p;
+
+       p = strchr(optarg, ',');
+       if (!p)
+               p = strchr(optarg, '+');
+
+       if (p == optarg) {
+               offset = 0;
+               size   = parse_number(p + 1);
+       } else if (p) {
+               offset = parse_number(optarg);
+               if (p[1] == '\0')
+                       size = ULONG_MAX;
+               else {
+                       size = parse_number(p + 1);
+                       if (*p == ',') {
+                               if (size < offset)
+                                       fatal("invalid range: %lu,%lu\n",
+                                                       offset, size);
+                               size -= offset;
+                       }
+               }
+       } else {
+               offset = parse_number(optarg);
+               size   = 1;
+       }
+
+       add_addr_range(offset, size);
+}
+
+void add_bits_filter(uint64_t mask, uint64_t bits)
+{
+       if (nr_bit_filters >= MAX_BIT_FILTERS)
+               fatal("too much bit filters\n");
+
+       opt_mask[nr_bit_filters] = mask;
+       opt_bits[nr_bit_filters] = bits;
+       nr_bit_filters++;
+}
+
+uint64_t parse_flag_name(const char *str, int len)
+{
+       int i;
+
+       if (!*str || !len)
+               return 0;
+
+       if (len <= 8 && !strncmp(str, "compound", len))
+               return BITS_COMPOUND;
+
+       for (i = 0; i < ARRAY_SIZE(page_flag_names); i++) {
+               if (!page_flag_names[i])
+                       continue;
+               if (!strncmp(str, page_flag_names[i] + 2, len))
+                       return 1ULL << i;
+       }
+
+       return parse_number(str);
+}
+
+uint64_t parse_flag_names(const char *str, int all)
+{
+       const char *p    = str;
+       uint64_t   flags = 0;
+
+       while (1) {
+               if (*p == ',' || *p == '=' || *p == '\0') {
+                       if ((*str != '~') || (*str == '~' && all && *++str))
+                               flags |= parse_flag_name(str, p - str);
+                       if (*p != ',')
+                               break;
+                       str = p + 1;
+               }
+               p++;
+       }
+
+       return flags;
+}
+
+void parse_bits_mask(const char *optarg)
+{
+       uint64_t mask;
+       uint64_t bits;
+       const char *p;
+
+       p = strchr(optarg, '=');
+       if (p == optarg) {
+               mask = KPF_ALL_BITS;
+               bits = parse_flag_names(p + 1, 0);
+       } else if (p) {
+               mask = parse_flag_names(optarg, 0);
+               bits = parse_flag_names(p + 1, 0);
+       } else if (strchr(optarg, '~')) {
+               mask = parse_flag_names(optarg, 1);
+               bits = parse_flag_names(optarg, 0);
+       } else {
+               mask = parse_flag_names(optarg, 0);
+               bits = KPF_ALL_BITS;
+       }
+
+       add_bits_filter(mask, bits);
+}
+
+
+struct option opts[] = {
+       { "raw"       , 0, NULL, 'r' },
+       { "pid"       , 1, NULL, 'p' },
+       { "file"      , 1, NULL, 'f' },
+       { "addr"      , 1, NULL, 'a' },
+       { "bits"      , 1, NULL, 'b' },
+       { "list"      , 0, NULL, 'l' },
+       { "list-each" , 0, NULL, 'L' },
+       { "no-summary", 0, NULL, 'N' },
+       { "help"      , 0, NULL, 'h' },
+       { NULL        , 0, NULL, 0 }
+};
+
+int main(int argc, char *argv[])
+{
+       int c;
+
+       page_size = getpagesize();
+
+       while ((c = getopt_long(argc, argv,
+                               "rp:f:a:b:lLNh", opts, NULL)) != -1) {
+               switch (c) {
+               case 'r':
+                       opt_raw = 1;
+                       break;
+               case 'p':
+                       parse_pid(optarg);
+                       break;
+               case 'f':
+                       parse_file(optarg);
+                       break;
+               case 'a':
+                       parse_addr_range(optarg);
+                       break;
+               case 'b':
+                       parse_bits_mask(optarg);
+                       break;
+               case 'l':
+                       opt_list = 1;
+                       break;
+               case 'L':
+                       opt_list = 2;
+                       break;
+               case 'N':
+                       opt_no_summary = 1;
+                       break;
+               case 'h':
+                       usage();
+                       exit(0);
+               default:
+                       usage();
+                       exit(1);
+               }
+       }
+
+       if (opt_list == 1)
+               printf("offset\tcount\tflags\n");
+       if (opt_list == 2)
+               printf("offset\tflags\n");
+
+       walk_addr_ranges();
+
+       if (opt_list == 1)
+               show_page_range(0, 0);  /* drain the buffer */
+
+       if (opt_no_summary)
+               return 0;
+
+       if (opt_list)
+               printf("\n\n");
+
+       show_summary();
+
+       return 0;
+}
index ce72c0f..600a304 100644 (file)
@@ -12,9 +12,9 @@ There are three components to pagemap:
    value for each virtual page, containing the following data (from
    fs/proc/task_mmu.c, above pagemap_read):
 
-    * Bits 0-55  page frame number (PFN) if present
+    * Bits 0-54  page frame number (PFN) if present
     * Bits 0-4   swap type if swapped
-    * Bits 5-55  swap offset if swapped
+    * Bits 5-54  swap offset if swapped
     * Bits 55-60 page shift (page size = 1<<page shift)
     * Bit  61    reserved for future use
     * Bit  62    page swapped
@@ -36,7 +36,7 @@ There are three components to pagemap:
  * /proc/kpageflags.  This file contains a 64-bit set of flags for each
    page, indexed by PFN.
 
-   The flags are (from fs/proc/proc_misc, above kpageflags_read):
+   The flags are (from fs/proc/page.c, above kpageflags_read):
 
      0. LOCKED
      1. ERROR
@@ -49,6 +49,68 @@ There are three components to pagemap:
      8. WRITEBACK
      9. RECLAIM
     10. BUDDY
+    11. MMAP
+    12. ANON
+    13. SWAPCACHE
+    14. SWAPBACKED
+    15. COMPOUND_HEAD
+    16. COMPOUND_TAIL
+    16. HUGE
+    18. UNEVICTABLE
+    20. NOPAGE
+
+Short descriptions to the page flags:
+
+ 0. LOCKED
+    page is being locked for exclusive access, eg. by undergoing read/write IO
+
+ 7. SLAB
+    page is managed by the SLAB/SLOB/SLUB/SLQB kernel memory allocator
+    When compound page is used, SLUB/SLQB will only set this flag on the head
+    page; SLOB will not flag it at all.
+
+10. BUDDY
+    a free memory block managed by the buddy system allocator
+    The buddy system organizes free memory in blocks of various orders.
+    An order N block has 2^N physically contiguous pages, with the BUDDY flag
+    set for and _only_ for the first page.
+
+15. COMPOUND_HEAD
+16. COMPOUND_TAIL
+    A compound page with order N consists of 2^N physically contiguous pages.
+    A compound page with order 2 takes the form of "HTTT", where H donates its
+    head page and T donates its tail page(s).  The major consumers of compound
+    pages are hugeTLB pages (Documentation/vm/hugetlbpage.txt), the SLUB etc.
+    memory allocators and various device drivers. However in this interface,
+    only huge/giga pages are made visible to end users.
+17. HUGE
+    this is an integral part of a HugeTLB page
+
+20. NOPAGE
+    no page frame exists at the requested address
+
+    [IO related page flags]
+ 1. ERROR     IO error occurred
+ 3. UPTODATE  page has up-to-date data
+              ie. for file backed page: (in-memory data revision >= on-disk one)
+ 4. DIRTY     page has been written to, hence contains new data
+              ie. for file backed page: (in-memory data revision >  on-disk one)
+ 8. WRITEBACK page is being synced to disk
+
+    [LRU related page flags]
+ 5. LRU         page is in one of the LRU lists
+ 6. ACTIVE      page is in the active LRU list
+18. UNEVICTABLE page is in the unevictable (non-)LRU list
+                It is somehow pinned and not a candidate for LRU page reclaims,
+               eg. ramfs pages, shmctl(SHM_LOCK) and mlock() memory segments
+ 2. REFERENCED  page has been referenced since last LRU list enqueue/requeue
+ 9. RECLAIM     page will be reclaimed soon after its pageout IO completed
+11. MMAP        a memory mapped page
+12. ANON        a memory mapped page that is not part of a file
+13. SWAPCACHE   page is mapped to swap space, ie. has an associated swap entry
+14. SWAPBACKED  page is backed by swap/RAM
+
+The page-types tool in this directory can be used to query the above flags.
 
 Using pagemap to do something useful:
 
index af8ef65..fb94add 100644 (file)
@@ -36,6 +36,12 @@ trivial patch so apply some common sense.
        (scripts/checkpatch.pl) to catch trival style violations.
        See Documentation/CodingStyle for guidance here.
 
+       PLEASE CC: the maintainers and mailing lists that are generated
+       by scripts/get_maintainer.pl.  The results returned by the
+       script will be best if you have git installed and are making
+       your changes in a branch derived from Linus' latest git tree.
+       See Documentation/SubmittingPatches for details.
+
        PLEASE try to include any credit lines you want added with the
        patch. It avoids people being missed off by mistake and makes
        it easier to know who wants adding and who doesn't.
@@ -489,7 +495,7 @@ AOA (Apple Onboard Audio) ALSA DRIVER
 P:     Johannes Berg
 M:     johannes@sipsolutions.net
 L:     linuxppc-dev@ozlabs.org
-L:     alsa-devel@alsa-project.org (subscribers-only)
+L:     alsa-devel@alsa-project.org (moderated for non-subscribers)
 S:     Maintained
 F:     sound/aoa/
 
@@ -912,7 +918,6 @@ P:  Dan Williams
 M:     dan.j.williams@intel.com
 P:     Maciej Sosnowski
 M:     maciej.sosnowski@intel.com
-L:     linux-kernel@vger.kernel.org
 W:     http://sourceforge.net/projects/xscaleiop
 S:     Supported
 F:     Documentation/crypto/async-tx-api.txt
@@ -1008,7 +1013,6 @@ F:        drivers/mmc/host/at91_mci.c
 ATMEL AT91 / AT32 SERIAL DRIVER
 P:     Haavard Skinnemoen
 M:     hskinnemoen@atmel.com
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     drivers/serial/atmel_serial.c
 
@@ -1064,7 +1068,6 @@ F:        kernel/audit*
 AUXILIARY DISPLAY DRIVERS
 P:     Miguel Ojeda Sandonis
 M:     miguel.ojeda.sandonis@gmail.com
-L:     linux-kernel@vger.kernel.org
 W:     http://miguelojeda.es/auxdisplay.htm
 W:     http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
 S:     Maintained
@@ -1134,7 +1137,6 @@ F:        drivers/net/hamradio/baycom*
 BEFS FILE SYSTEM
 P:     Sergey S. Kostyliov
 M:     rathamahata@php4.ru
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/filesystems/befs.txt
 F:     fs/befs/
@@ -1142,7 +1144,6 @@ F:        fs/befs/
 BFS FILE SYSTEM
 P:     Tigran A. Aivazian
 M:     tigran@aivazian.fsnet.co.uk
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/filesystems/bfs.txt
 F:     fs/bfs/
@@ -1199,7 +1200,6 @@ F:        drivers/i2c/busses/i2c-bfin-twi.c
 BLOCK LAYER
 P:     Jens Axboe
 M:     axboe@kernel.dk
-L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git
 S:     Maintained
 F:     block/
@@ -1326,7 +1326,6 @@ P:        Muli Ben-Yehuda
 M:     muli@il.ibm.com
 P:     Jon D. Mason
 M:     jdmason@kudzu.us
-L:     linux-kernel@vger.kernel.org
 L:     discuss@x86-64.org
 S:     Maintained
 F:     arch/x86/kernel/pci-calgary_64.c
@@ -1378,7 +1377,6 @@ F:        include/linux/usb/wusb*
 CFAG12864B LCD DRIVER
 P:     Miguel Ojeda Sandonis
 M:     miguel.ojeda.sandonis@gmail.com
-L:     linux-kernel@vger.kernel.org
 W:     http://miguelojeda.es/auxdisplay.htm
 W:     http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
 S:     Maintained
@@ -1388,7 +1386,6 @@ F:        include/linux/cfag12864b.h
 CFAG12864BFB LCD FRAMEBUFFER DRIVER
 P:     Miguel Ojeda Sandonis
 M:     miguel.ojeda.sandonis@gmail.com
-L:     linux-kernel@vger.kernel.org
 W:     http://miguelojeda.es/auxdisplay.htm
 W:     http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
 S:     Maintained
@@ -1408,7 +1405,6 @@ X:        net/wireless/wext*
 CHECKPATCH
 P:     Andy Whitcroft
 M:     apw@canonical.com
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     scripts/checkpatch.pl
 
@@ -1437,7 +1433,7 @@ F:        drivers/usb/host/ohci-ep93xx.c
 CIRRUS LOGIC CS4270 SOUND DRIVER
 P:     Timur Tabi
 M:     timur@freescale.com
-L:     alsa-devel@alsa-project.org
+L:     alsa-devel@alsa-project.org (moderated for non-subscribers)
 S:     Supported
 F:     sound/soc/codecs/cs4270*
 
@@ -1462,6 +1458,7 @@ P:        Joe Eykholt
 M:     jeykholt@cisco.com
 L:     linux-scsi@vger.kernel.org
 S:     Supported
+F:     drivers/scsi/fnic/
 
 CODA FILE SYSTEM
 P:     Jan Harkes
@@ -1534,7 +1531,6 @@ F:        drivers/usb/atm/cxacru.c
 CONFIGFS
 P:     Joel Becker
 M:     joel.becker@oracle.com
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     fs/configfs/
 F:     include/linux/configfs.h
@@ -1592,7 +1588,6 @@ F:        arch/x86/kernel/msr.c
 CPUSETS
 P:     Paul Menage
 M:     menage@google.com
-L:     linux-kernel@vger.kernel.org
 W:     http://www.bullopensource.org/cpuset/
 W:     http://oss.sgi.com/projects/cpusets/
 S:     Supported
@@ -1799,7 +1794,6 @@ DEVICE NUMBER REGISTRY
 P:     Torben Mathiasen
 M:     device@lanana.org
 W:     http://lanana.org/docs/device-list/index.html
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
 DEVICE-MAPPER  (LVM)
@@ -1825,7 +1819,6 @@ F:        drivers/char/digi*
 DIRECTORY NOTIFICATION (DNOTIFY)
 P:     Eric Paris
 M:     eparis@parisplace.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/filesystems/dnotify.txt
 F:     fs/notify/dnotify/
@@ -1842,7 +1835,6 @@ S:        Maintained
 DISKQUOTA
 P:     Jan Kara
 M:     jack@suse.cz
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/filesystems/quota.txt
 F:     fs/quota/
@@ -1864,7 +1856,6 @@ P:        Maciej Sosnowski
 M:     maciej.sosnowski@intel.com
 P:     Dan Williams
 M:     dan.j.williams@intel.com
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     drivers/dma/
 F:     include/linux/dma*
@@ -1916,7 +1907,6 @@ F:        drivers/scsi/dpt/
 DRIVER CORE, KOBJECTS, AND SYSFS
 P:     Greg Kroah-Hartman
 M:     gregkh@suse.de
-L:     linux-kernel@vger.kernel.org
 T:     quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
 S:     Supported
 F:     Documentation/kobject.txt
@@ -1982,8 +1972,8 @@ F:        net/bridge/netfilter/ebt*.c
 ECRYPT FILE SYSTEM
 P:     Tyler Hicks
 M:     tyhicks@linux.vnet.ibm.com
-M:     Dustin Kirkland
-P:     kirkland@canonical.com
+P:     Dustin Kirkland
+M:     kirkland@canonical.com
 L:     ecryptfs-devel@lists.launchpad.net
 W:     https://launchpad.net/ecryptfs
 S:     Supported
@@ -2263,7 +2253,6 @@ F:        drivers/firewire/
 F:     include/linux/firewire*.h
 
 FIRMWARE LOADER (request_firmware)
-L:     linux-kernel@vger.kernel.org
 S:     Orphan
 F:     Documentation/firmware_class/
 F:     drivers/base/firmware*.c
@@ -2300,7 +2289,6 @@ M:        leoli@freescale.com
 P:     Zhang Wei
 M:     zw@zh-kernel.org
 L:     linuxppc-dev@ozlabs.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     drivers/dma/fsldma.*
 
@@ -2366,7 +2354,7 @@ F:        drivers/serial/ucc_uart.c
 FREESCALE SOC SOUND DRIVERS
 P:     Timur Tabi
 M:     timur@freescale.com
-L:     alsa-devel@alsa-project.org
+L:     alsa-devel@alsa-project.org (moderated for non-subscribers)
 L:     linuxppc-dev@ozlabs.org
 S:     Supported
 F:     sound/soc/fsl/fsl*
@@ -2500,7 +2488,6 @@ F:        drivers/hwmon/hdaps.c
 
 HYPERVISOR VIRTUAL CONSOLE DRIVER
 L:     linuxppc-dev@ozlabs.org
-L:     linux-kernel@vger.kernel.org
 S:     Odd Fixes
 F:     drivers/char/hvc_*
 
@@ -2567,7 +2554,6 @@ F:        sound/parisc/harmony.*
 HAYES ESP SERIAL DRIVER
 P:     Andrew J. Robinson
 M:     arobinso@nyx.net
-L:     linux-kernel@vger.kernel.org
 W:     http://www.nyx.net/~arobinso
 S:     Maintained
 F:     Documentation/serial/hayes-esp.txt
@@ -2593,7 +2579,6 @@ F:        include/linux/cciss_ioctl.h
 HFS FILESYSTEM
 P:     Roman Zippel
 M:     zippel@linux-m68k.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/filesystems/hfs.txt
 F:     fs/hfs/
@@ -2633,7 +2618,6 @@ F:        include/linux/hid*
 HIGH-RESOLUTION TIMERS, CLOCKEVENTS, DYNTICKS
 P:     Thomas Gleixner
 M:     tglx@linutronix.de
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/timers/
 F:     kernel/hrtimer.c
@@ -2772,7 +2756,6 @@ F:        drivers/i2c/busses/i2c-tiny-usb.c
 i386 BOOT CODE
 P:     H. Peter Anvin
 M:     hpa@zytor.com
-L:     Linux-Kernel@vger.kernel.org
 S:     Maintained
 F:     arch/x86/boot/
 
@@ -2902,7 +2885,6 @@ P:        Robert Love
 M:     rlove@rlove.org
 P:     Eric Paris
 M:     eparis@parisplace.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/filesystems/inotify.txt
 F:     fs/notify/inotify/
@@ -2950,7 +2932,6 @@ F:        arch/x86/kernel/microcode_intel.c
 INTEL I/OAT DMA DRIVER
 P:     Maciej Sosnowski
 M:     maciej.sosnowski@intel.com
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     drivers/dma/ioat*
 
@@ -2966,7 +2947,6 @@ F:        include/linux/intel-iommu.h
 INTEL IOP-ADMA DMA DRIVER
 P:     Dan Williams
 M:     dan.j.williams@intel.com
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     drivers/dma/iop-adma.c
 
@@ -3279,7 +3259,6 @@ M:        vgoyal@redhat.com
 P:     Haren Myneni
 M:     hbabu@us.ibm.com
 L:     kexec@lists.infradead.org
-L:     linux-kernel@vger.kernel.org
 W:     http://lse.sourceforge.net/kdump/
 S:     Maintained
 F:     Documentation/kdump/
@@ -3389,7 +3368,6 @@ KEXEC
 P:     Eric Biederman
 M:     ebiederm@xmission.com
 W:     http://ftp.kernel.org/pub/linux/kernel/people/horms/kexec-tools/
-L:     linux-kernel@vger.kernel.org
 L:     kexec@lists.infradead.org
 S:     Maintained
 F:     include/linux/kexec.h
@@ -3427,7 +3405,6 @@ F:        mm/kmemleak-test.c
 KMEMTRACE
 P:     Eduard - Gabriel Munteanu
 M:     eduard.munteanu@linux360.ro
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/trace/kmemtrace.txt
 F:     include/trace/kmemtrace.h
@@ -3442,7 +3419,6 @@ P:        David S. Miller
 M:     davem@davemloft.net
 P:     Masami Hiramatsu
 M:     mhiramat@redhat.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/kprobes.txt
 F:     include/linux/kprobes.h
@@ -3451,7 +3427,6 @@ F:        kernel/kprobes.c
 KS0108 LCD CONTROLLER DRIVER
 P:     Miguel Ojeda Sandonis
 M:     miguel.ojeda.sandonis@gmail.com
-L:     linux-kernel@vger.kernel.org
 W:     http://miguelojeda.es/auxdisplay.htm
 W:     http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
 S:     Maintained
@@ -3615,7 +3590,6 @@ P:        Peter Zijlstra
 M:     peterz@infradead.org
 P:     Ingo Molnar
 M:     mingo@redhat.com
-L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/peterz/linux-2.6-lockdep.git
 S:     Maintained
 F:     Documentation/lockdep*.txt
@@ -3667,7 +3641,6 @@ L:        linux-m32r-ja@ml.linux-m32r.org (in Japanese)
 W:     http://www.linux-m32r.org/
 S:     Maintained
 F:     arch/m32r/
-F:     include/asm-m32r/
 
 M68K ARCHITECTURE
 P:     Geert Uytterhoeven
@@ -3751,7 +3724,6 @@ F:        include/linux/mv643xx.h
 MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
 P:     Nicolas Pitre
 M:     nico@cam.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
 MARVELL YUKON / SYSKONNECT DRIVER
@@ -3805,7 +3777,6 @@ F:        drivers/scsi/megaraid/
 
 MEMORY MANAGEMENT
 L:     linux-mm@kvack.org
-L:     linux-kernel@vger.kernel.org
 W:     http://www.linux-mm.org
 S:     Maintained
 F:     include/linux/mm.h
@@ -3819,7 +3790,6 @@ M:        xemul@openvz.org
 P:     KAMEZAWA Hiroyuki
 M:     kamezawa.hiroyu@jp.fujitsu.com
 L:     linux-mm@kvack.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     mm/memcontrol.c
 
@@ -3862,7 +3832,6 @@ F:        arch/mips/
 MISCELLANEOUS MCA-SUPPORT
 P:     James Bottomley
 M:     James.Bottomley@HansenPartnership.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/ia64/mca.txt
 F:     Documentation/mca.txt
@@ -3872,7 +3841,6 @@ F:        include/linux/mca*
 MODULE SUPPORT
 P:     Rusty Russell
 M:     rusty@rustcorp.com.au
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     include/linux/module.h
 F:     kernel/module.c
@@ -3896,7 +3864,6 @@ F:        drivers/mmc/host/imxmmc.*
 MOUSE AND MISC DEVICES [GENERAL]
 P:     Alessandro Rubini
 M:     rubini@ipvvis.unipv.it
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     drivers/input/mouse/
 F:     include/linux/gpio_mouse.h
@@ -3904,7 +3871,6 @@ F:        include/linux/gpio_mouse.h
 MOXA SMARTIO/INDUSTIO/INTELLIO SERIAL CARD
 P:     Jiri Slaby
 M:     jirislaby@gmail.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/serial/moxa-smartio
 F:     drivers/char/mxser.*
@@ -3920,7 +3886,6 @@ F:        drivers/platform/x86/msi-laptop.c
 MULTIFUNCTION DEVICES (MFD)
 P:     Samuel Ortiz
 M:     sameo@linux.intel.com
-L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6.git
 S:     Supported
 F:     drivers/mfd/
@@ -3928,7 +3893,6 @@ F:        drivers/mfd/
 MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
 P:     Pierre Ossman
 M:     pierre@ossman.eu
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     drivers/mmc/
 F:     include/linux/mmc/
@@ -3936,7 +3900,6 @@ F:        include/linux/mmc/
 MULTIMEDIA CARD (MMC) ETC. OVER SPI
 P:     David Brownell
 M:     dbrownell@users.sourceforge.net
-L:     linux-kernel@vger.kernel.org
 S:     Odd Fixes
 F:     drivers/mmc/host/mmc_spi.c
 F:     include/linux/spi/mmc_spi.h
@@ -3951,7 +3914,6 @@ F:        sound/oss/msnd*
 MULTITECH MULTIPORT CARD (ISICOM)
 P:     Jiri Slaby
 M:     jirislaby@gmail.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     drivers/char/isicom.c
 F:     include/linux/isicom.h
@@ -4195,7 +4157,6 @@ NTFS FILESYSTEM
 P:     Anton Altaparmakov
 M:     aia21@cantab.net
 L:     linux-ntfs-dev@lists.sourceforge.net
-L:     linux-kernel@vger.kernel.org
 W:     http://www.linux-ntfs.org/
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs-2.6.git
 S:     Maintained
@@ -4429,7 +4390,6 @@ M:        akataria@vmware.com
 P:     Rusty Russell
 M:     rusty@rustcorp.com.au
 L:     virtualization@lists.osdl.org
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     Documentation/ia64/paravirt_ops.txt
 F:     arch/*/kernel/paravirt*
@@ -4480,7 +4440,6 @@ F:        include/linux/leds-pca9532.h
 PCI ERROR RECOVERY
 P:     Linas Vepstas
 M:     linas@austin.ibm.com
-L:     linux-kernel@vger.kernel.org
 L:     linux-pci@vger.kernel.org
 S:     Supported
 F:     Documentation/PCI/pci-error-recovery.txt
@@ -4489,7 +4448,6 @@ F:        Documentation/powerpc/eeh-pci-error-recovery.txt
 PCI SUBSYSTEM
 P:     Jesse Barnes
 M:     jbarnes@virtuousgeek.org
-L:     linux-kernel@vger.kernel.org
 L:     linux-pci@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6.git
 S:     Supported
@@ -4524,7 +4482,6 @@ F:        drivers/net/pcnet32.c
 PER-TASK DELAY ACCOUNTING
 P:     Balbir Singh
 M:     balbir@linux.vnet.ibm.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     include/linux/delayacct.h
 F:     kernel/delayacct.c
@@ -4556,7 +4513,6 @@ F:        drivers/mtd/devices/phram.c
 PKTCDVD DRIVER
 P:     Peter Osterlund
 M:     petero2@telia.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     drivers/block/pktcdvd.c
 F:     include/linux/pktcdvd.h
@@ -4564,7 +4520,6 @@ F:        include/linux/pktcdvd.h
 POSIX CLOCKS and TIMERS
 P:     Thomas Gleixner
 M:     tglx@linutronix.de
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     fs/timerfd.c
 F:     include/linux/timer*
@@ -4575,7 +4530,6 @@ P:        Anton Vorontsov
 M:     cbou@mail.ru
 P:     David Woodhouse
 M:     dwmw2@infradead.org
-L:     linux-kernel@vger.kernel.org
 T:     git git://git.infradead.org/battery-2.6.git
 S:     Maintained
 F:     include/linux/power_supply.h
@@ -4627,7 +4581,6 @@ F:        include/linux/if_pppol2tp.h
 PREEMPTIBLE KERNEL
 P:     Robert Love
 M:     rml@tech9.net
-L:     linux-kernel@vger.kernel.org
 L:     kpreempt-tech@lists.sourceforge.net
 W:     ftp://ftp.kernel.org/pub/linux/kernel/people/rml/preempt-kernel
 S:     Supported
@@ -4690,7 +4643,6 @@ P:        Roland McGrath
 M:     roland@redhat.com
 P:     Oleg Nesterov
 M:     oleg@redhat.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     include/asm-generic/syscall.h
 F:     include/linux/ptrace.h
@@ -4776,7 +4728,6 @@ F:        drivers/net/qlge/
 QNX4 FILESYSTEM
 P:     Anders Larsen
 M:     al@alarsen.net
-L:     linux-kernel@vger.kernel.org
 W:     http://www.alarsen.net/linux/qnx4fs/
 S:     Maintained
 F:     fs/qnx4/
@@ -4823,7 +4774,6 @@ F:        drivers/char/random.c
 RAPIDIO SUBSYSTEM
 P:     Matt Porter
 M:     mporter@kernel.crashing.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     drivers/rapidio/
 
@@ -4837,7 +4787,8 @@ F:        drivers/net/wireless/ray*
 RCUTORTURE MODULE
 P:     Josh Triplett
 M:     josh@freedesktop.org
-L:     linux-kernel@vger.kernel.org
+P:     Paul E. McKenney
+M:     paulmck@linux.vnet.ibm.com
 S:     Maintained
 F:     Documentation/RCU/torture.txt
 F:     kernel/rcutorture.c
@@ -4845,7 +4796,6 @@ F:        kernel/rcutorture.c
 RDC R-321X SoC
 P:     Florian Fainelli
 M:     florian@openwrt.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 
 RDC R6040 FAST ETHERNET DRIVER
@@ -4865,8 +4815,9 @@ F:        net/rds/
 READ-COPY UPDATE (RCU)
 P:     Dipankar Sarma
 M:     dipankar@in.ibm.com
+P:     Paul E. McKenney
+M:     paulmck@linux.vnet.ibm.com
 W:     http://www.rdrop.com/users/paulmck/rclock/
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     Documentation/RCU/rcu.txt
 F:     Documentation/RCU/rcuref.txt
@@ -4877,7 +4828,6 @@ F:        kernel/rcupdate.c
 REAL TIME CLOCK DRIVER
 P:     Paul Gortmaker
 M:     p_gortmaker@yahoo.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/rtc.txt
 F:     drivers/rtc/
@@ -5015,7 +4965,6 @@ S3C24XX SD/MMC Driver
 P:     Ben Dooks
 M:     ben-linux@fluff.org
 L:     linux-arm-kernel@lists.arm.linux.org.uk (subscribers-only)
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     drivers/mmc/host/s3cmci.*
 
@@ -5041,7 +4990,6 @@ P:        Ingo Molnar
 M:     mingo@elte.hu
 P:     Peter Zijlstra
 M:     peterz@infradead.org
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     kernel/sched*
 F:     include/linux/sched.h
@@ -5143,7 +5091,6 @@ F:        drivers/mmc/host/sdhci.*
 SECURITY SUBSYSTEM
 P:     James Morris
 M:     jmorris@namei.org
-L:     linux-kernel@vger.kernel.org
 L:     linux-security-module@vger.kernel.org (suggested Cc:)
 T:     git git://www.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git
 W:     http://security.wiki.kernel.org/
@@ -5162,7 +5109,6 @@ P:        James Morris
 M:     jmorris@namei.org
 P:     Eric Paris
 M:     eparis@parisplace.org
-L:     linux-kernel@vger.kernel.org (kernel issues)
 L:     selinux@tycho.nsa.gov (subscribers-only, general discussion)
 W:     http://selinuxproject.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6.git
@@ -5425,7 +5371,6 @@ F:        include/linux/sony-laptop.h
 SONY MEMORYSTICK CARD SUPPORT
 P:     Alex Dubov
 M:     oakad@yahoo.com
-L:     linux-kernel@vger.kernel.org
 W:     http://tifmxx.berlios.de/
 S:     Maintained
 F:     drivers/memstick/host/tifm_ms.c
@@ -5435,7 +5380,7 @@ P:        Jaroslav Kysela
 M:     perex@perex.cz
 P:     Takashi Iwai
 M:     tiwai@suse.de
-L:     alsa-devel@alsa-project.org (subscribers-only)
+L:     alsa-devel@alsa-project.org (moderated for non-subscribers)
 W:     http://www.alsa-project.org/
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
 T:     git git://git.alsa-project.org/alsa-kernel.git
@@ -5450,7 +5395,7 @@ M:        lrg@slimlogic.co.uk
 P:     Mark Brown
 M:     broonie@opensource.wolfsonmicro.com
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git
-L:     alsa-devel@alsa-project.org (subscribers-only)
+L:     alsa-devel@alsa-project.org (moderated for non-subscribers)
 W:     http://alsa-project.org/main/index.php/ASoC
 S:     Supported
 F:     sound/soc/
@@ -5468,7 +5413,6 @@ F:        arch/sparc/
 SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
 P:     Roger Wolff
 M:     R.E.Wolff@BitWizard.nl
-L:     linux-kernel@vger.kernel.org
 S:     Supported
 F:     Documentation/serial/specialix.txt
 F:     drivers/char/specialix*
@@ -5514,7 +5458,6 @@ F:        fs/squashfs/
 SRM (Alpha) environment access
 P:     Jan-Benedict Glaw
 M:     jbglaw@lug-owl.de
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     arch/alpha/kernel/srm_env.c
 
@@ -5529,7 +5472,6 @@ S:        Maintained
 STAGING SUBSYSTEM
 P:     Greg Kroah-Hartman
 M:     gregkh@suse.de
-L:     linux-kernel@vger.kernel.org
 T:     quilt kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/
 S:     Maintained
 F:     drivers/staging/
@@ -5609,7 +5551,6 @@ F:        include/linux/sysv_fs.h
 TASKSTATS STATISTICS INTERFACE
 P:     Balbir Singh
 M:     balbir@linux.vnet.ibm.com
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/accounting/taskstats*
 F:     include/linux/taskstats*
@@ -5702,7 +5643,6 @@ P:        Kentaro Takeda
 M:     takedakn@nttdata.co.jp
 P:     Tetsuo Handa
 M:     penguin-kernel@I-love.SAKURA.ne.jp
-L:     linux-kernel@vger.kernel.org (kernel issues)
 L:     tomoyo-users-en@lists.sourceforge.jp (subscribers-only, for developers and users in English)
 L:     tomoyo-dev@lists.sourceforge.jp (subscribers-only, for developers in Japanese)
 L:     tomoyo-users@lists.sourceforge.jp (subscribers-only, for users in Japanese)
@@ -5754,14 +5694,17 @@ F:      drivers/char/tpm/
 TRIVIAL PATCHES
 P:     Jiri Kosina
 M:     trivial@kernel.org
-L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial.git
 S:     Maintained
+F:     drivers/char/tty_*
+F:     drivers/serial/serial_core.c
+F:     include/linux/serial_core.h
+F:     include/linux/serial.h
+F:     include/linux/tty.h
 
 TTY LAYER
 P:     Alan Cox
 M:     alan@lxorguk.ukuu.org.uk
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 T:     stgit http://zeniv.linux.org.uk/~alan/ttydev/
 
@@ -5834,7 +5777,6 @@ F:        fs/udf/
 UFS FILESYSTEM
 P:     Evgeniy Dushistov
 M:     dushistov@mail.ru
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/filesystems/ufs.txt
 F:     fs/ufs/
@@ -5851,7 +5793,6 @@ F:        include/linux/uwb/
 UNIFORM CDROM DRIVER
 P:     Jens Axboe
 M:     axboe@kernel.dk
-L:     linux-kernel@vger.kernel.org
 W:     http://www.kernel.dk
 S:     Maintained
 F:     Documentation/cdrom/
@@ -5880,7 +5821,6 @@ F:        drivers/usb/class/cdc-acm.*
 USB BLOCK DRIVER (UB ub)
 P:     Pete Zaitcev
 M:     zaitcev@redhat.com
-L:     linux-kernel@vger.kernel.org
 L:     linux-usb@vger.kernel.org
 S:     Supported
 F:     drivers/block/ub.c
@@ -6226,7 +6166,6 @@ P:        Hans J. Koch
 M:     hjk@linutronix.de
 P:     Greg Kroah-Hartman
 M:     gregkh@suse.de
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/DocBook/uio-howto.tmpl
 F:     drivers/uio/
@@ -6252,7 +6191,6 @@ F:        drivers/video/uvesafb.*
 VFAT/FAT/MSDOS FILESYSTEM
 P:     OGAWA Hirofumi
 M:     hirofumi@mail.parknet.co.jp
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     Documentation/filesystems/vfat.txt
 F:     fs/fat/
@@ -6296,6 +6234,14 @@ F:       drivers/net/macvlan.c
 F:     include/linux/if_*vlan.h
 F:     net/8021q/
 
+VLYNQ BUS
+P:     Florian Fainelli
+M:     florian@openwrt.org
+L:     openwrt-devel@lists.openwrt.org
+S:     Maintained
+F:     drivers/vlynq/vlynq.c
+F:     include/linux/vlynq.h
+
 VOLTAGE AND CURRENT REGULATOR FRAMEWORK
 P:     Liam Girdwood
 M:     lrg@slimlogic.co.uk
@@ -6349,7 +6295,6 @@ F:        drivers/hwmon/w83793.c
 W83L51xD SD/MMC CARD INTERFACE DRIVER
 P:     Pierre Ossman
 M:     pierre@ossman.eu
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     drivers/mmc/host/wbsd.*
 
@@ -6436,7 +6381,6 @@ M:        mingo@redhat.com
 P:     H. Peter Anvin
 M:     hpa@zytor.com
 M:     x86@kernel.org
-L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git
 S:     Maintained
 F:     Documentation/x86/
@@ -6472,7 +6416,6 @@ XILINX SYSTEMACE DRIVER
 P:     Grant Likely
 M:     grant.likely@secretlab.ca
 W:     http://www.secretlab.ca/
-L:     linux-kernel@vger.kernel.org
 S:     Maintained
 F:     drivers/block/xsysace.c
 
@@ -6537,5 +6480,9 @@ F:        drivers/serial/zs.*
 
 THE REST
 P:     Linus Torvalds
+M:     torvalds@linux-foundation.org
+L:     linux-kernel@vger.kernel.org
 T:     git git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
 S:     Buried alive in reporters
+F:     *
+F:     */
index fef5c14..a71c9c1 100644 (file)
@@ -1,10 +1,3 @@
 /*
  * 8253/8254 Programmable Interval Timer
  */
-
-#ifndef _8253PIT_H
-#define _8253PIT_H
-
-#define PIT_TICK_RATE  1193180UL
-
-#endif
index 3e6735a..a8d4ec8 100644 (file)
@@ -3,30 +3,12 @@
 
 /* Dummy header just to define km_type. */
 
-
 #ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
+#define  __WITH_KM_FENCE
 #endif
 
-enum km_type {
-D(0)   KM_BOUNCE_READ,
-D(1)   KM_SKB_SUNRPC_DATA,
-D(2)   KM_SKB_DATA_SOFTIRQ,
-D(3)   KM_USER0,
-D(4)   KM_USER1,
-D(5)   KM_BIO_SRC_IRQ,
-D(6)   KM_BIO_DST_IRQ,
-D(7)   KM_PTE0,
-D(8)   KM_PTE1,
-D(9)   KM_IRQ0,
-D(10)  KM_IRQ1,
-D(11)  KM_SOFTIRQ0,
-D(12)  KM_SOFTIRQ1,
-D(13)  KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
-#undef D
+#undef __WITH_KM_FENCE
 
 #endif
index c2938e5..19b8632 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
 struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_mm);
 EXPORT_SYMBOL(init_task);
 
 union thread_union init_thread_union
index 67c19f8..38c805d 100644 (file)
@@ -227,7 +227,7 @@ struct irqaction timer_irqaction = {
        .name           = "timer",
 };
 
-static struct hw_interrupt_type rtc_irq_type = {
+static struct irq_chip rtc_irq_type = {
        .typename       = "RTC",
        .startup        = rtc_startup,
        .shutdown       = rtc_enable_disable,
index 9405bee..50bfec9 100644 (file)
@@ -83,7 +83,7 @@ i8259a_end_irq(unsigned int irq)
                i8259a_enable_irq(irq);
 }
 
-struct hw_interrupt_type i8259a_irq_type = {
+struct irq_chip i8259a_irq_type = {
        .typename       = "XT-PIC",
        .startup        = i8259a_startup_irq,
        .shutdown       = i8259a_disable_irq,
index cc9a8a7..b63ccd7 100644 (file)
@@ -36,7 +36,7 @@ extern void i8259a_disable_irq(unsigned int);
 extern void i8259a_mask_and_ack_irq(unsigned int);
 extern unsigned int i8259a_startup_irq(unsigned int);
 extern void i8259a_end_irq(unsigned int);
-extern struct hw_interrupt_type i8259a_irq_type;
+extern struct irq_chip i8259a_irq_type;
 extern void init_i8259a_irqs(void);
 
 extern void handle_irq(int irq);
index d53edbc..69199a7 100644 (file)
@@ -70,7 +70,7 @@ pyxis_mask_and_ack_irq(unsigned int irq)
        *(vulp)PYXIS_INT_MASK;
 }
 
-static struct hw_interrupt_type pyxis_irq_type = {
+static struct irq_chip pyxis_irq_type = {
        .typename       = "PYXIS",
        .startup        = pyxis_startup_irq,
        .shutdown       = pyxis_disable_irq,
index a03fbca..8522936 100644 (file)
@@ -48,7 +48,7 @@ srm_end_irq(unsigned int irq)
 }
 
 /* Handle interrupts from the SRM, assuming no additional weirdness.  */
-static struct hw_interrupt_type srm_irq_type = {
+static struct irq_chip srm_irq_type = {
        .typename       = "SRM",
        .startup        = srm_startup_irq,
        .shutdown       = srm_disable_irq,
index 80df86c..d2634e4 100644 (file)
@@ -252,9 +252,9 @@ reserve_std_resources(void)
 }
 
 #define PFN_MAX                PFN_DOWN(0x80000000)
-#define for_each_mem_cluster(memdesc, cluster, i)              \
-       for ((cluster) = (memdesc)->cluster, (i) = 0;           \
-            (i) < (memdesc)->numclusters; (i)++, (cluster)++)
+#define for_each_mem_cluster(memdesc, _cluster, i)             \
+       for ((_cluster) = (memdesc)->cluster, (i) = 0;          \
+            (i) < (memdesc)->numclusters; (i)++, (_cluster)++)
 
 static unsigned long __init
 get_mem_size_limit(char *s)
index e53a1e1..382035e 100644 (file)
@@ -89,7 +89,7 @@ alcor_end_irq(unsigned int irq)
                alcor_enable_irq(irq);
 }
 
-static struct hw_interrupt_type alcor_irq_type = {
+static struct irq_chip alcor_irq_type = {
        .typename       = "ALCOR",
        .startup        = alcor_startup_irq,
        .shutdown       = alcor_disable_irq,
index ace475c..ed34943 100644 (file)
@@ -71,7 +71,7 @@ cabriolet_end_irq(unsigned int irq)
                cabriolet_enable_irq(irq);
 }
 
-static struct hw_interrupt_type cabriolet_irq_type = {
+static struct irq_chip cabriolet_irq_type = {
        .typename       = "CABRIOLET",
        .startup        = cabriolet_startup_irq,
        .shutdown       = cabriolet_disable_irq,
index 5bd5259..46e70ec 100644 (file)
@@ -198,7 +198,7 @@ clipper_set_affinity(unsigned int irq, const struct cpumask *affinity)
        return 0;
 }
 
-static struct hw_interrupt_type dp264_irq_type = {
+static struct irq_chip dp264_irq_type = {
        .typename       = "DP264",
        .startup        = dp264_startup_irq,
        .shutdown       = dp264_disable_irq,
@@ -209,7 +209,7 @@ static struct hw_interrupt_type dp264_irq_type = {
        .set_affinity   = dp264_set_affinity,
 };
 
-static struct hw_interrupt_type clipper_irq_type = {
+static struct irq_chip clipper_irq_type = {
        .typename       = "CLIPPER",
        .startup        = clipper_startup_irq,
        .shutdown       = clipper_disable_irq,
@@ -298,7 +298,7 @@ clipper_srm_device_interrupt(unsigned long vector)
 }
 
 static void __init
-init_tsunami_irqs(struct hw_interrupt_type * ops, int imin, int imax)
+init_tsunami_irqs(struct irq_chip * ops, int imin, int imax)
 {
        long i;
        for (i = imin; i <= imax; ++i) {
index 9c5a306..660c23e 100644 (file)
@@ -69,7 +69,7 @@ eb64p_end_irq(unsigned int irq)
                eb64p_enable_irq(irq);
 }
 
-static struct hw_interrupt_type eb64p_irq_type = {
+static struct irq_chip eb64p_irq_type = {
        .typename       = "EB64P",
        .startup        = eb64p_startup_irq,
        .shutdown       = eb64p_disable_irq,
index baf60f3..b99ea48 100644 (file)
@@ -80,7 +80,7 @@ eiger_end_irq(unsigned int irq)
                eiger_enable_irq(irq);
 }
 
-static struct hw_interrupt_type eiger_irq_type = {
+static struct irq_chip eiger_irq_type = {
        .typename       = "EIGER",
        .startup        = eiger_startup_irq,
        .shutdown       = eiger_disable_irq,
index 2b5caf3..ef0b83a 100644 (file)
@@ -118,7 +118,7 @@ jensen_local_end(unsigned int irq)
                i8259a_end_irq(1);
 }
 
-static struct hw_interrupt_type jensen_local_irq_type = {
+static struct irq_chip jensen_local_irq_type = {
        .typename       = "LOCAL",
        .startup        = jensen_local_startup,
        .shutdown       = jensen_local_shutdown,
index c5a1a24..bbfc4f2 100644 (file)
@@ -169,7 +169,7 @@ marvel_irq_noop_return(unsigned int irq)
        return 0; 
 }
 
-static struct hw_interrupt_type marvel_legacy_irq_type = {
+static struct irq_chip marvel_legacy_irq_type = {
        .typename       = "LEGACY",
        .startup        = marvel_irq_noop_return,
        .shutdown       = marvel_irq_noop,
@@ -179,7 +179,7 @@ static struct hw_interrupt_type marvel_legacy_irq_type = {
        .end            = marvel_irq_noop,
 };
 
-static struct hw_interrupt_type io7_lsi_irq_type = {
+static struct irq_chip io7_lsi_irq_type = {
        .typename       = "LSI",
        .startup        = io7_startup_irq,
        .shutdown       = io7_disable_irq,
@@ -189,7 +189,7 @@ static struct hw_interrupt_type io7_lsi_irq_type = {
        .end            = io7_end_irq,
 };
 
-static struct hw_interrupt_type io7_msi_irq_type = {
+static struct irq_chip io7_msi_irq_type = {
        .typename       = "MSI",
        .startup        = io7_startup_irq,
        .shutdown       = io7_disable_irq,
@@ -273,8 +273,8 @@ init_one_io7_msi(struct io7 *io7, unsigned int which, unsigned int where)
 
 static void __init
 init_io7_irqs(struct io7 *io7, 
-             struct hw_interrupt_type *lsi_ops,
-             struct hw_interrupt_type *msi_ops)
+             struct irq_chip *lsi_ops,
+             struct irq_chip *msi_ops)
 {
        long base = (io7->pe << MARVEL_IRQ_VEC_PE_SHIFT) + 16;
        long i;
index 8d3e942..4e36664 100644 (file)
@@ -68,7 +68,7 @@ mikasa_end_irq(unsigned int irq)
                mikasa_enable_irq(irq);
 }
 
-static struct hw_interrupt_type mikasa_irq_type = {
+static struct irq_chip mikasa_irq_type = {
        .typename       = "MIKASA",
        .startup        = mikasa_startup_irq,
        .shutdown       = mikasa_disable_irq,
index 538876b..35753a1 100644 (file)
@@ -73,7 +73,7 @@ noritake_end_irq(unsigned int irq)
                 noritake_enable_irq(irq);
 }
 
-static struct hw_interrupt_type noritake_irq_type = {
+static struct irq_chip noritake_irq_type = {
        .typename       = "NORITAKE",
        .startup        = noritake_startup_irq,
        .shutdown       = noritake_disable_irq,
index 672cb2d..f3aec7e 100644 (file)
@@ -135,7 +135,7 @@ rawhide_end_irq(unsigned int irq)
                rawhide_enable_irq(irq);
 }
 
-static struct hw_interrupt_type rawhide_irq_type = {
+static struct irq_chip rawhide_irq_type = {
        .typename       = "RAWHIDE",
        .startup        = rawhide_startup_irq,
        .shutdown       = rawhide_disable_irq,
index f15a329..d9f9cfe 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/ioport.h>
+#include <linux/timex.h>
 #include <linux/init.h>
 
 #include <asm/ptrace.h>
index ce1faa6..fc92463 100644 (file)
@@ -72,7 +72,7 @@ rx164_end_irq(unsigned int irq)
                rx164_enable_irq(irq);
 }
 
-static struct hw_interrupt_type rx164_irq_type = {
+static struct irq_chip rx164_irq_type = {
        .typename       = "RX164",
        .startup        = rx164_startup_irq,
        .shutdown       = rx164_disable_irq,
index 9e26325..426eb69 100644 (file)
@@ -501,7 +501,7 @@ sable_lynx_mask_and_ack_irq(unsigned int irq)
        spin_unlock(&sable_lynx_irq_lock);
 }
 
-static struct hw_interrupt_type sable_lynx_irq_type = {
+static struct irq_chip sable_lynx_irq_type = {
        .typename       = "SABLE/LYNX",
        .startup        = sable_lynx_startup_irq,
        .shutdown       = sable_lynx_disable_irq,
index 9bd9a31..830318c 100644 (file)
@@ -74,7 +74,7 @@ takara_end_irq(unsigned int irq)
                takara_enable_irq(irq);
 }
 
-static struct hw_interrupt_type takara_irq_type = {
+static struct irq_chip takara_irq_type = {
        .typename       = "TAKARA",
        .startup        = takara_startup_irq,
        .shutdown       = takara_disable_irq,
index 8dd239e..88978fc 100644 (file)
@@ -185,7 +185,7 @@ titan_srm_device_interrupt(unsigned long vector)
 
 
 static void __init
-init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax)
+init_titan_irqs(struct irq_chip * ops, int imin, int imax)
 {
        long i;
        for (i = imin; i <= imax; ++i) {
@@ -194,7 +194,7 @@ init_titan_irqs(struct hw_interrupt_type * ops, int imin, int imax)
        }
 }
 
-static struct hw_interrupt_type titan_irq_type = {
+static struct irq_chip titan_irq_type = {
        .typename       = "TITAN",
        .startup        = titan_startup_irq,
        .shutdown       = titan_disable_irq,
index 42c3eed..e91b4c3 100644 (file)
@@ -157,7 +157,7 @@ wildfire_end_irq(unsigned int irq)
                wildfire_enable_irq(irq);
 }
 
-static struct hw_interrupt_type wildfire_irq_type = {
+static struct irq_chip wildfire_irq_type = {
        .typename       = "WILDFIRE",
        .startup        = wildfire_startup_irq,
        .shutdown       = wildfire_disable_irq,
index a13de49..0eab557 100644 (file)
@@ -28,9 +28,9 @@ EXPORT_SYMBOL(node_data);
 #define DBGDCONT(args...)
 #endif
 
-#define for_each_mem_cluster(memdesc, cluster, i)              \
-       for ((cluster) = (memdesc)->cluster, (i) = 0;           \
-            (i) < (memdesc)->numclusters; (i)++, (cluster)++)
+#define for_each_mem_cluster(memdesc, _cluster, i)             \
+       for ((_cluster) = (memdesc)->cluster, (i) = 0;          \
+            (i) < (memdesc)->numclusters; (i)++, (_cluster)++)
 
 static void __init show_mem_layout(void)
 {
index e859af3..3f47086 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 993d56e..57ec9f2 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure. Must be aligned on an 8192-byte boundary.
  */
index e215f71..0a88622 100644 (file)
@@ -1,21 +1,6 @@
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
 #endif
index 2c228c0..c26c34d 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-
-struct mm_struct init_mm = INIT_MM(init_mm);
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial task structure.
  *
index 492988c..d2d643c 100644 (file)
@@ -5,21 +5,6 @@
  * is actually used on cris. 
  */
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
 #endif
index 4df0b32..51dcd04 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 29429a8..1d3df1d 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 1ec8a34..be12a71 100644 (file)
@@ -1,21 +1,6 @@
 #ifndef _ASM_H8300_KMAP_TYPES_H
 #define _ASM_H8300_KMAP_TYPES_H
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
 #endif
index cb5dc55..089c65e 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial task structure.
  *
index 56ceb68..fe63b2d 100644 (file)
@@ -1131,7 +1131,7 @@ sba_alloc_coherent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp
 #ifdef CONFIG_NUMA
        {
                struct page *page;
-               page = alloc_pages_node(ioc->node == MAX_NUMNODES ?
+               page = alloc_pages_exact_node(ioc->node == MAX_NUMNODES ?
                                        numa_node_id() : ioc->node, flags,
                                        get_order(size));
 
index 5d1658a..05d5f99 100644 (file)
@@ -1,30 +1,12 @@
 #ifndef _ASM_IA64_KMAP_TYPES_H
 #define _ASM_IA64_KMAP_TYPES_H
 
-
 #ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
+#define  __WITH_KM_FENCE
 #endif
 
-enum km_type {
-D(0)   KM_BOUNCE_READ,
-D(1)   KM_SKB_SUNRPC_DATA,
-D(2)   KM_SKB_DATA_SOFTIRQ,
-D(3)   KM_USER0,
-D(4)   KM_USER1,
-D(5)   KM_BIO_SRC_IRQ,
-D(6)   KM_BIO_DST_IRQ,
-D(7)   KM_PTE0,
-D(8)   KM_PTE1,
-D(9)   KM_IRQ0,
-D(10)  KM_IRQ1,
-D(11)  KM_SOFTIRQ0,
-D(12)  KM_SOFTIRQ1,
-D(13)  KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
-#undef D
+#undef __WITH_KM_FENCE
 
 #endif /* _ASM_IA64_KMAP_TYPES_H */
index 5b0e830..c475fc2 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial task structure.
  *
index 8f33a88..5b17bd4 100644 (file)
@@ -1829,8 +1829,7 @@ ia64_mca_cpu_init(void *cpu_data)
                        data = mca_bootmem();
                        first_time = 0;
                } else
-                       data = page_address(alloc_pages_node(numa_node_id(),
-                                       GFP_KERNEL, get_order(sz)));
+                       data = __get_free_pages(GFP_KERNEL, get_order(sz));
                if (!data)
                        panic("Could not allocate MCA memory for cpu %d\n",
                                        cpu);
index 8a06dc4..bdc176c 100644 (file)
@@ -5595,7 +5595,7 @@ pfm_interrupt_handler(int irq, void *arg)
                (*pfm_alt_intr_handler->handler)(irq, arg, regs);
        }
 
-       put_cpu_no_resched();
+       put_cpu();
        return IRQ_HANDLED;
 }
 
index 8eff8c1..6ba72ab 100644 (file)
@@ -98,7 +98,8 @@ static int uncached_add_chunk(struct uncached_pool *uc_pool, int nid)
 
        /* attempt to allocate a granule's worth of cached memory pages */
 
-       page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
+       page = alloc_pages_exact_node(nid,
+                               GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
                                IA64_GRANULE_SHIFT-PAGE_SHIFT);
        if (!page) {
                mutex_unlock(&uc_pool->add_chunk_mutex);
index d876423..98b6849 100644 (file)
@@ -90,7 +90,8 @@ static void *sn_dma_alloc_coherent(struct device *dev, size_t size,
         */
        node = pcibus_to_node(pdev->bus);
        if (likely(node >=0)) {
-               struct page *p = alloc_pages_node(node, flags, get_order(size));
+               struct page *p = alloc_pages_exact_node(node,
+                                               flags, get_order(size));
 
                if (likely(p))
                        cpuaddr = page_address(p);
index fa94dc6..4cdb5e3 100644 (file)
@@ -2,28 +2,11 @@
 #define __M32R_KMAP_TYPES_H
 
 #ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
+#define  __WITH_KM_FENCE
 #endif
 
-enum km_type {
-D(0)   KM_BOUNCE_READ,
-D(1)   KM_SKB_SUNRPC_DATA,
-D(2)   KM_SKB_DATA_SOFTIRQ,
-D(3)   KM_USER0,
-D(4)   KM_USER1,
-D(5)   KM_BIO_SRC_IRQ,
-D(6)   KM_BIO_DST_IRQ,
-D(7)   KM_PTE0,
-D(8)   KM_PTE1,
-D(9)   KM_IRQ0,
-D(10)  KM_IRQ1,
-D(11)  KM_SOFTIRQ0,
-D(12)  KM_SOFTIRQ1,
-D(13)  KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
-#undef D
+#undef __WITH_KM_FENCE
 
 #endif /* __M32R_KMAP_TYPES_H */
index 016885c..fce57e5 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 7daf897..b7a78ad 100644 (file)
@@ -154,9 +154,9 @@ unsigned long __init zone_sizes_init(void)
         *  Use all area of internal RAM.
         *  see __alloc_pages()
         */
-       NODE_DATA(1)->node_zones->pages_min = 0;
-       NODE_DATA(1)->node_zones->pages_low = 0;
-       NODE_DATA(1)->node_zones->pages_high = 0;
+       NODE_DATA(1)->node_zones->watermark[WMARK_MIN] = 0;
+       NODE_DATA(1)->node_zones->watermark[WMARK_LOW] = 0;
+       NODE_DATA(1)->node_zones->watermark[WMARK_HIGH] = 0;
 
        return holes;
 }
index 98138b4..922fdfd 100644 (file)
@@ -63,7 +63,7 @@ static void shutdown_m32104ut_irq(unsigned int irq)
        outl(M32R_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type m32104ut_irq_type =
+static struct irq_chip m32104ut_irq_type =
 {
        .typename = "M32104UT-IRQ",
        .startup = startup_m32104ut_irq,
index 77b0ae9..9c1bc74 100644 (file)
@@ -69,7 +69,7 @@ static void shutdown_m32700ut_irq(unsigned int irq)
        outl(M32R_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type m32700ut_irq_type =
+static struct irq_chip m32700ut_irq_type =
 {
        .typename = "M32700UT-IRQ",
        .startup = startup_m32700ut_irq,
@@ -146,7 +146,7 @@ static void shutdown_m32700ut_pld_irq(unsigned int irq)
        outw(PLD_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type m32700ut_pld_irq_type =
+static struct irq_chip m32700ut_pld_irq_type =
 {
        .typename = "M32700UT-PLD-IRQ",
        .startup = startup_m32700ut_pld_irq,
@@ -215,7 +215,7 @@ static void shutdown_m32700ut_lanpld_irq(unsigned int irq)
        outw(PLD_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type m32700ut_lanpld_irq_type =
+static struct irq_chip m32700ut_lanpld_irq_type =
 {
        .typename = "M32700UT-PLD-LAN-IRQ",
        .startup = startup_m32700ut_lanpld_irq,
@@ -284,7 +284,7 @@ static void shutdown_m32700ut_lcdpld_irq(unsigned int irq)
        outw(PLD_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type m32700ut_lcdpld_irq_type =
+static struct irq_chip m32700ut_lcdpld_irq_type =
 {
        .typename = "M32700UT-PLD-LCD-IRQ",
        .startup = startup_m32700ut_lcdpld_irq,
index 3ec087f..fb4b177 100644 (file)
@@ -63,7 +63,7 @@ static void shutdown_mappi_irq(unsigned int irq)
        outl(M32R_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type mappi_irq_type =
+static struct irq_chip mappi_irq_type =
 {
        .typename = "MAPPI-IRQ",
        .startup = startup_mappi_irq,
index d87969c..6a65eda 100644 (file)
@@ -70,7 +70,7 @@ static void shutdown_mappi2_irq(unsigned int irq)
        outl(M32R_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type mappi2_irq_type =
+static struct irq_chip mappi2_irq_type =
 {
        .typename = "MAPPI2-IRQ",
        .startup = startup_mappi2_irq,
index 785b4bd..9c337ae 100644 (file)
@@ -70,7 +70,7 @@ static void shutdown_mappi3_irq(unsigned int irq)
        outl(M32R_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type mappi3_irq_type =
+static struct irq_chip mappi3_irq_type =
 {
        .typename = "MAPPI3-IRQ",
        .startup = startup_mappi3_irq,
index 6faa5db..ed86574 100644 (file)
@@ -61,7 +61,7 @@ static void shutdown_oaks32r_irq(unsigned int irq)
        outl(M32R_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type oaks32r_irq_type =
+static struct irq_chip oaks32r_irq_type =
 {
        .typename = "OAKS32R-IRQ",
        .startup = startup_oaks32r_irq,
index fab13fd..80d6806 100644 (file)
@@ -70,7 +70,7 @@ static void shutdown_opsput_irq(unsigned int irq)
        outl(M32R_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type opsput_irq_type =
+static struct irq_chip opsput_irq_type =
 {
        .typename = "OPSPUT-IRQ",
        .startup = startup_opsput_irq,
@@ -147,7 +147,7 @@ static void shutdown_opsput_pld_irq(unsigned int irq)
        outw(PLD_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type opsput_pld_irq_type =
+static struct irq_chip opsput_pld_irq_type =
 {
        .typename = "OPSPUT-PLD-IRQ",
        .startup = startup_opsput_pld_irq,
@@ -216,7 +216,7 @@ static void shutdown_opsput_lanpld_irq(unsigned int irq)
        outw(PLD_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type opsput_lanpld_irq_type =
+static struct irq_chip opsput_lanpld_irq_type =
 {
        .typename = "OPSPUT-PLD-LAN-IRQ",
        .startup = startup_opsput_lanpld_irq,
@@ -285,7 +285,7 @@ static void shutdown_opsput_lcdpld_irq(unsigned int irq)
        outw(PLD_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type opsput_lcdpld_irq_type =
+static struct irq_chip opsput_lcdpld_irq_type =
 {
        "OPSPUT-PLD-LCD-IRQ",
        startup_opsput_lcdpld_irq,
index 89588d6..7573026 100644 (file)
@@ -61,7 +61,7 @@ static void shutdown_mappi_irq(unsigned int irq)
        outl(M32R_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type mappi_irq_type =
+static struct irq_chip mappi_irq_type =
 {
        .typename = "M32700-IRQ",
        .startup = startup_mappi_irq,
@@ -134,7 +134,7 @@ static void shutdown_m32700ut_pld_irq(unsigned int irq)
        outw(PLD_ICUCR_ILEVEL7, port);
 }
 
-static struct hw_interrupt_type m32700ut_pld_irq_type =
+static struct irq_chip m32700ut_pld_irq_type =
 {
        .typename = "USRV-PLD-IRQ",
        .startup = startup_m32700ut_pld_irq,
index c843c63..3413cc1 100644 (file)
@@ -1,21 +1,6 @@
 #ifndef __ASM_M68K_KMAP_TYPES_H
 #define __ASM_M68K_KMAP_TYPES_H
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
 #endif /* __ASM_M68K_KMAP_TYPES_H */
index ec37fb5..72bad65 100644 (file)
  */
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 union thread_union init_thread_union
 __attribute__((section(".data.init_task"), aligned(THREAD_SIZE)))
        = { INIT_THREAD_INFO(init_task) };
index fe282de..45e97a2 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial task structure.
  *
index 4d7e222..2597525 100644 (file)
@@ -1,29 +1,6 @@
-/*
- * Copyright (C) 2006 Atmark Techno, Inc.
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file "COPYING" in the main directory of this archive
- * for more details.
- */
-
 #ifndef _ASM_MICROBLAZE_KMAP_TYPES_H
 #define _ASM_MICROBLAZE_KMAP_TYPES_H
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR,
-};
+#include <asm-generic/kmap_types.h>
 
 #endif /* _ASM_MICROBLAZE_KMAP_TYPES_H */
index 5dabc87..032ca73 100644 (file)
@@ -12,8 +12,6 @@
 #define PIT_CH0                        0x40
 #define PIT_CH2                        0x42
 
-#define PIT_TICK_RATE          1193182UL
-
 extern spinlock_t i8253_lock;
 
 extern void setup_pit_timer(void);
index 806aae3..58e91ed 100644 (file)
@@ -1,30 +1,12 @@
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
-
 #ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
+#define  __WITH_KM_FENCE
 #endif
 
-enum km_type {
-D(0)   KM_BOUNCE_READ,
-D(1)   KM_SKB_SUNRPC_DATA,
-D(2)   KM_SKB_DATA_SOFTIRQ,
-D(3)   KM_USER0,
-D(4)   KM_USER1,
-D(5)   KM_BIO_SRC_IRQ,
-D(6)   KM_BIO_DST_IRQ,
-D(7)   KM_PTE0,
-D(8)   KM_PTE1,
-D(9)   KM_IRQ0,
-D(10)  KM_IRQ1,
-D(11)  KM_SOFTIRQ0,
-D(12)  KM_SOFTIRQ1,
-D(13)  KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
-#undef D
+#undef __WITH_KM_FENCE
 
 #endif
index 149cd91..5b457a4 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 3398f9f..76d093b 100644 (file)
@@ -1,31 +1,6 @@
-/* MN10300 kmap_atomic() slot IDs
- *
- * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
- * Written by David Howells (dhowells@redhat.com)
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public Licence
- * as published by the Free Software Foundation; either version
- * 2 of the Licence, or (at your option) any later version.
- */
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
 #endif /* _ASM_KMAP_TYPES_H */
index 5ac3566..80d423b 100644 (file)
@@ -20,9 +20,6 @@
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 806aae3..58e91ed 100644 (file)
@@ -1,30 +1,12 @@
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
-
 #ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
+#define  __WITH_KM_FENCE
 #endif
 
-enum km_type {
-D(0)   KM_BOUNCE_READ,
-D(1)   KM_SKB_SUNRPC_DATA,
-D(2)   KM_SKB_DATA_SOFTIRQ,
-D(3)   KM_USER0,
-D(4)   KM_USER1,
-D(5)   KM_BIO_SRC_IRQ,
-D(6)   KM_BIO_DST_IRQ,
-D(7)   KM_PTE0,
-D(8)   KM_PTE1,
-D(9)   KM_IRQ0,
-D(10)  KM_IRQ1,
-D(11)  KM_SOFTIRQ0,
-D(12)  KM_SOFTIRQ1,
-D(13)  KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
-#undef D
+#undef __WITH_KM_FENCE
 
 #endif
index 1e25a45..82974b2 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial task structure.
  *
index b70d6e5..a71c9c1 100644 (file)
@@ -1,10 +1,3 @@
-#ifndef _ASM_POWERPC_8253PIT_H
-#define _ASM_POWERPC_8253PIT_H
-
 /*
  * 8253/8254 Programmable Interval Timer
  */
-
-#define PIT_TICK_RATE  1193182UL
-
-#endif /* _ASM_POWERPC_8253PIT_H */
index 688b329..ffc4253 100644 (file)
@@ -9,10 +9,6 @@
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 2f0e64b..ef6f649 100644 (file)
 #include <asm/sections.h>
 #include <asm/machdep.h>
 
-#ifdef CONFIG_LOGO_LINUX_CLUT224
 #include <linux/linux_logo.h>
-extern const struct linux_logo logo_linux_clut224;
-#endif
 
 /*
  * Properties whose value is longer than this get excluded from our
index 296b526..5e0a191 100644 (file)
@@ -122,8 +122,8 @@ static int __init cbe_ptcal_enable_on_node(int nid, int order)
 
        area->nid = nid;
        area->order = order;
-       area->pages = alloc_pages_node(area->nid, GFP_KERNEL | GFP_THISNODE,
-                                       area->order);
+       area->pages = alloc_pages_exact_node(area->nid, GFP_KERNEL|GFP_THISNODE,
+                                               area->order);
 
        if (!area->pages) {
                printk(KERN_WARNING "%s: no page on node %d\n",
index 9abd210..8547e86 100644 (file)
@@ -752,17 +752,8 @@ static int __init init_spu_base(void)
                goto out_unregister_sysdev_class;
        }
 
-       if (ret > 0) {
-               /*
-                * We cannot put the forward declaration in
-                * <linux/linux_logo.h> because of conflicting session type
-                * conflicts for const and __initdata with different compiler
-                * versions
-                */
-               extern const struct linux_logo logo_spe_clut224;
-
+       if (ret > 0)
                fb_append_extra_logo(&logo_spe_clut224, ret);
-       }
 
        mutex_lock(&spu_full_list_mutex);
        xmon_register_spus(&spu_full_list);
index fd15746..94ec3ee 100644 (file)
@@ -2,22 +2,7 @@
 #ifndef _ASM_KMAP_TYPES_H
 #define _ASM_KMAP_TYPES_H
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,    
-       KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
 #endif
 #endif /* __KERNEL__ */
index 7db95c0..fe787f9 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 84d565c..5962b08 100644 (file)
@@ -3,30 +3,12 @@
 
 /* Dummy header just to define km_type. */
 
-
 #ifdef CONFIG_DEBUG_HIGHMEM
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
+#define  __WITH_KM_FENCE
 #endif
 
-enum km_type {
-D(0)   KM_BOUNCE_READ,
-D(1)   KM_SKB_SUNRPC_DATA,
-D(2)   KM_SKB_DATA_SOFTIRQ,
-D(3)   KM_USER0,
-D(4)   KM_USER1,
-D(5)   KM_BIO_SRC_IRQ,
-D(6)   KM_BIO_DST_IRQ,
-D(7)   KM_PTE0,
-D(8)   KM_PTE1,
-D(9)   KM_IRQ0,
-D(10)  KM_IRQ1,
-D(11)  KM_SOFTIRQ0,
-D(12)  KM_SOFTIRQ1,
-D(13)  KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
-#undef D
+#undef __WITH_KM_FENCE
 
 #endif
index 80c35ff..1719957 100644 (file)
@@ -10,9 +10,6 @@
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
 struct pt_regs fake_swapper_regs;
-struct mm_struct init_mm = INIT_MM(init_mm);
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial thread structure.
  *
index 602f5e0..aad2174 100644 (file)
@@ -5,21 +5,6 @@
  * is actually used on sparc.  -DaveM
  */
 
-enum km_type {
-       KM_BOUNCE_READ,
-       KM_SKB_SUNRPC_DATA,
-       KM_SKB_DATA_SOFTIRQ,
-       KM_USER0,
-       KM_USER1,
-       KM_BIO_SRC_IRQ,
-       KM_BIO_DST_IRQ,
-       KM_PTE0,
-       KM_PTE1,
-       KM_IRQ0,
-       KM_IRQ1,
-       KM_SOFTIRQ0,
-       KM_SOFTIRQ1,
-       KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
 #endif
index f28cb82..28125c5 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
 struct task_struct init_task = INIT_TASK(init_task);
-
-EXPORT_SYMBOL(init_mm);
 EXPORT_SYMBOL(init_task);
 
 /* .text section in head.S is aligned at 8k boundary and this gets linked
index 37dd097..b3906f8 100644 (file)
@@ -27,7 +27,7 @@
  * sign followed by value, e.g.:
  *
  * static int init_variable __initdata = 0;
- * static char linux_logo[] __initdata = { 0x32, 0x36, ... };
+ * static const char linux_logo[] __initconst = { 0x32, 0x36, ... };
  *
  * Don't forget to initialize data not at file scope, i.e. within a function,
  * as gcc otherwise puts the data into the bss section and not into the init
index 63bee15..3dabbe1 100644 (file)
@@ -8,7 +8,7 @@
 
 #define ETH_ADDR_LEN (6)
 #define ETH_HEADER_ETHERTAP (16)
-#define ETH_HEADER_OTHER (14)
+#define ETH_HEADER_OTHER (26) /* 14 for ethernet + VLAN + MPLS for crazy people */
 #define ETH_MAX_PACKET (1500)
 
 #define UML_NET_VERSION (4)
index 806d381..b25121b 100644 (file)
 #include "linux/mqueue.h"
 #include "asm/uaccess.h"
 
-struct mm_struct init_mm = INIT_MM(init_mm);
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-EXPORT_SYMBOL(init_mm);
-
 /*
  * Initial task structure.
  *
index 336b615..454cdb4 100644 (file)
@@ -358,7 +358,7 @@ EXPORT_SYMBOL(um_request_irq);
 EXPORT_SYMBOL(reactivate_fd);
 
 /*
- * hw_interrupt_type must define (startup || enable) &&
+ * irq_chip must define (startup || enable) &&
  * (shutdown || disable) && end
  */
 static void dummy(unsigned int irq)
@@ -366,7 +366,7 @@ static void dummy(unsigned int irq)
 }
 
 /* This is used for everything else than the timer. */
-static struct hw_interrupt_type normal_irq_type = {
+static struct irq_chip normal_irq_type = {
        .typename = "SIGIO",
        .release = free_irq_by_irq_and_dev,
        .disable = dummy,
@@ -375,7 +375,7 @@ static struct hw_interrupt_type normal_irq_type = {
        .end = dummy
 };
 
-static struct hw_interrupt_type SIGVTALRM_irq_type = {
+static struct irq_chip SIGVTALRM_irq_type = {
        .typename = "SIGVTALRM",
        .release = free_irq_by_irq_and_dev,
        .shutdown = dummy, /* never called */
index c41b04b..54a36ec 100644 (file)
@@ -1,7 +1,7 @@
 #include "as-layout.h"
 
        .globl syscall_stub
-.section .__syscall_stub, "x"
+.section .__syscall_stub, "ax"
 
        .globl batch_syscall_stub
 batch_syscall_stub:
index 6e8a919..04b9e87 100644 (file)
@@ -66,28 +66,28 @@ typedef struct user_i387_struct elf_fpregset_t;
        PT_REGS_R15(regs) = 0; \
 } while (0)
 
-#define ELF_CORE_COPY_REGS(pr_reg, regs)               \
-       (pr_reg)[0] = (regs)->regs.gp[0];                       \
-       (pr_reg)[1] = (regs)->regs.gp[1];                       \
-       (pr_reg)[2] = (regs)->regs.gp[2];                       \
-       (pr_reg)[3] = (regs)->regs.gp[3];                       \
-       (pr_reg)[4] = (regs)->regs.gp[4];                       \
-       (pr_reg)[5] = (regs)->regs.gp[5];                       \
-       (pr_reg)[6] = (regs)->regs.gp[6];                       \
-       (pr_reg)[7] = (regs)->regs.gp[7];                       \
-       (pr_reg)[8] = (regs)->regs.gp[8];                       \
-       (pr_reg)[9] = (regs)->regs.gp[9];                       \
-       (pr_reg)[10] = (regs)->regs.gp[10];                     \
-       (pr_reg)[11] = (regs)->regs.gp[11];                     \
-       (pr_reg)[12] = (regs)->regs.gp[12];                     \
-       (pr_reg)[13] = (regs)->regs.gp[13];                     \
-       (pr_reg)[14] = (regs)->regs.gp[14];                     \
-       (pr_reg)[15] = (regs)->regs.gp[15];                     \
-       (pr_reg)[16] = (regs)->regs.gp[16];                     \
-       (pr_reg)[17] = (regs)->regs.gp[17];                     \
-       (pr_reg)[18] = (regs)->regs.gp[18];                     \
-       (pr_reg)[19] = (regs)->regs.gp[19];                     \
-       (pr_reg)[20] = (regs)->regs.gp[20];                     \
+#define ELF_CORE_COPY_REGS(pr_reg, _regs)              \
+       (pr_reg)[0] = (_regs)->regs.gp[0];                      \
+       (pr_reg)[1] = (_regs)->regs.gp[1];                      \
+       (pr_reg)[2] = (_regs)->regs.gp[2];                      \
+       (pr_reg)[3] = (_regs)->regs.gp[3];                      \
+       (pr_reg)[4] = (_regs)->regs.gp[4];                      \
+       (pr_reg)[5] = (_regs)->regs.gp[5];                      \
+       (pr_reg)[6] = (_regs)->regs.gp[6];                      \
+       (pr_reg)[7] = (_regs)->regs.gp[7];                      \
+       (pr_reg)[8] = (_regs)->regs.gp[8];                      \
+       (pr_reg)[9] = (_regs)->regs.gp[9];                      \
+       (pr_reg)[10] = (_regs)->regs.gp[10];                    \
+       (pr_reg)[11] = (_regs)->regs.gp[11];                    \
+       (pr_reg)[12] = (_regs)->regs.gp[12];                    \
+       (pr_reg)[13] = (_regs)->regs.gp[13];                    \
+       (pr_reg)[14] = (_regs)->regs.gp[14];                    \
+       (pr_reg)[15] = (_regs)->regs.gp[15];                    \
+       (pr_reg)[16] = (_regs)->regs.gp[16];                    \
+       (pr_reg)[17] = (_regs)->regs.gp[17];                    \
+       (pr_reg)[18] = (_regs)->regs.gp[18];                    \
+       (pr_reg)[19] = (_regs)->regs.gp[19];                    \
+       (pr_reg)[20] = (_regs)->regs.gp[20];                    \
        (pr_reg)[21] = current->thread.arch.fs;                 \
        (pr_reg)[22] = 0;                                       \
        (pr_reg)[23] = 0;                                       \
index 6d9edf9..20e4a96 100644 (file)
@@ -1,7 +1,7 @@
 #include "as-layout.h"
 
        .globl syscall_stub
-.section .__syscall_stub, "x"
+.section .__syscall_stub, "ax"
 syscall_stub:
        syscall
        /* We don't have 64-bit constants, so this constructs the address
index 5759c16..9e00a73 100644 (file)
@@ -2,28 +2,11 @@
 #define _ASM_X86_KMAP_TYPES_H
 
 #if defined(CONFIG_X86_32) && defined(CONFIG_DEBUG_HIGHMEM)
-# define D(n) __KM_FENCE_##n ,
-#else
-# define D(n)
+#define  __WITH_KM_FENCE
 #endif
 
-enum km_type {
-D(0)   KM_BOUNCE_READ,
-D(1)   KM_SKB_SUNRPC_DATA,
-D(2)   KM_SKB_DATA_SOFTIRQ,
-D(3)   KM_USER0,
-D(4)   KM_USER1,
-D(5)   KM_BIO_SRC_IRQ,
-D(6)   KM_BIO_DST_IRQ,
-D(7)   KM_PTE0,
-D(8)   KM_PTE1,
-D(9)   KM_IRQ0,
-D(10)  KM_IRQ1,
-D(11)  KM_SOFTIRQ0,
-D(12)  KM_SOFTIRQ1,
-D(13)  KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
-#undef D
+#undef __WITH_KM_FENCE
 
 #endif /* _ASM_X86_KMAP_TYPES_H */
index b5c9d45..1375cfc 100644 (file)
@@ -4,9 +4,7 @@
 #include <asm/processor.h>
 #include <asm/tsc.h>
 
-/* The PIT ticks at this frequency (in HZ): */
-#define PIT_TICK_RATE          1193182
-
+/* Assume we use the PIT time source for the clock tick */
 #define CLOCK_TICK_RATE                PIT_TICK_RATE
 
 #define ARCH_HAS_READ_CURRENT_TIMER
index 3ffdcfa..9fa3388 100644 (file)
@@ -487,7 +487,6 @@ out:
 static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
 {
        char *v = c->x86_vendor_id;
-       static int printed;
        int i;
 
        for (i = 0; i < X86_VENDOR_NUM; i++) {
@@ -504,13 +503,9 @@ static void __cpuinit get_cpu_vendor(struct cpuinfo_x86 *c)
                }
        }
 
-       if (!printed) {
-               printed++;
-               printk(KERN_ERR
-                   "CPU: vendor_id '%s' unknown, using generic init.\n", v);
-
-               printk(KERN_ERR "CPU: Your system may be unstable.\n");
-       }
+       printk_once(KERN_ERR
+                       "CPU: vendor_id '%s' unknown, using generic init.\n" \
+                       "CPU: Your system may be unstable.\n", v);
 
        c->x86_vendor = X86_VENDOR_UNKNOWN;
        this_cpu = &default_cpu;
index c2e0bb0..5cf36c0 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/spinlock.h>
 #include <linux/jiffies.h>
 #include <linux/module.h>
+#include <linux/timex.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/io.h>
index df3bf26..270ff83 100644 (file)
@@ -12,7 +12,6 @@
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
 
 /*
  * Initial thread structure.
index 3e1c057..ae3180c 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/delay.h>
 #include <linux/clocksource.h>
 #include <linux/percpu.h>
+#include <linux/timex.h>
 
 #include <asm/hpet.h>
 #include <asm/timer.h>
index 32d6ae8..e770bf3 100644 (file)
@@ -1277,7 +1277,7 @@ static struct vmcs *alloc_vmcs_cpu(int cpu)
        struct page *pages;
        struct vmcs *vmcs;
 
-       pages = alloc_pages_node(node, GFP_KERNEL, vmcs_config.order);
+       pages = alloc_pages_exact_node(node, GFP_KERNEL, vmcs_config.order);
        if (!pages)
                return NULL;
        vmcs = page_address(pages);
index 9e822d2..11c687e 100644 (file)
@@ -1,31 +1,6 @@
-/*
- * include/asm-xtensa/kmap_types.h
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 2001 - 2005 Tensilica Inc.
- */
-
 #ifndef _XTENSA_KMAP_TYPES_H
 #define _XTENSA_KMAP_TYPES_H
 
-enum km_type {
-  KM_BOUNCE_READ,
-  KM_SKB_SUNRPC_DATA,
-  KM_SKB_DATA_SOFTIRQ,
-  KM_USER0,
-  KM_USER1,
-  KM_BIO_SRC_IRQ,
-  KM_BIO_DST_IRQ,
-  KM_PTE0,
-  KM_PTE1,
-  KM_IRQ0,
-  KM_IRQ1,
-  KM_SOFTIRQ0,
-  KM_SOFTIRQ1,
-  KM_TYPE_NR
-};
+#include <asm-generic/kmap_types.h>
 
 #endif /* _XTENSA_KMAP_TYPES_H */
index e07f5c9..c4302f0 100644 (file)
 
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
 static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-struct mm_struct init_mm = INIT_MM(init_mm);
-
-EXPORT_SYMBOL(init_mm);
-
 union thread_union init_thread_union
        __attribute__((__section__(".data.init_task"))) =
 { INIT_THREAD_INFO(init_task) };
index 00cf955..a442c8f 100644 (file)
@@ -104,6 +104,8 @@ source "drivers/auxdisplay/Kconfig"
 
 source "drivers/uio/Kconfig"
 
+source "drivers/vlynq/Kconfig"
+
 source "drivers/xen/Kconfig"
 
 source "drivers/staging/Kconfig"
index 9e7d4e5..00b44f4 100644 (file)
@@ -105,6 +105,7 @@ obj-$(CONFIG_PPC_PS3)               += ps3/
 obj-$(CONFIG_OF)               += of/
 obj-$(CONFIG_SSB)              += ssb/
 obj-$(CONFIG_VIRTIO)           += virtio/
+obj-$(CONFIG_VLYNQ)            += vlynq/
 obj-$(CONFIG_STAGING)          += staging/
 obj-y                          += platform/
 obj-y                          += ieee802154/
index 40b8097..91d4087 100644 (file)
@@ -72,10 +72,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
                       "Node %d Inactive(anon): %8lu kB\n"
                       "Node %d Active(file):   %8lu kB\n"
                       "Node %d Inactive(file): %8lu kB\n"
-#ifdef CONFIG_UNEVICTABLE_LRU
                       "Node %d Unevictable:    %8lu kB\n"
                       "Node %d Mlocked:        %8lu kB\n"
-#endif
 #ifdef CONFIG_HIGHMEM
                       "Node %d HighTotal:      %8lu kB\n"
                       "Node %d HighFree:       %8lu kB\n"
@@ -105,10 +103,8 @@ static ssize_t node_read_meminfo(struct sys_device * dev,
                       nid, K(node_page_state(nid, NR_INACTIVE_ANON)),
                       nid, K(node_page_state(nid, NR_ACTIVE_FILE)),
                       nid, K(node_page_state(nid, NR_INACTIVE_FILE)),
-#ifdef CONFIG_UNEVICTABLE_LRU
                       nid, K(node_page_state(nid, NR_UNEVICTABLE)),
                       nid, K(node_page_state(nid, NR_MLOCK)),
-#endif
 #ifdef CONFIG_HIGHMEM
                       nid, K(i.totalhigh),
                       nid, K(i.freehigh),
index c796a86..d9113b4 100644 (file)
@@ -171,8 +171,9 @@ int do_poke_blanked_console;
 int console_blanked;
 
 static int vesa_blank_mode; /* 0:none 1:suspendV 2:suspendH 3:powerdown */
-static int blankinterval = 10*60*HZ;
 static int vesa_off_interval;
+static int blankinterval = 10*60;
+core_param(consoleblank, blankinterval, int, 0444);
 
 static DECLARE_WORK(console_work, console_callback);
 
@@ -1485,7 +1486,7 @@ static void setterm_command(struct vc_data *vc)
                        update_attr(vc);
                        break;
                case 9: /* set blanking interval */
-                       blankinterval = ((vc->vc_par[1] < 60) ? vc->vc_par[1] : 60) * 60 * HZ;
+                       blankinterval = ((vc->vc_par[1] < 60) ? vc->vc_par[1] : 60) * 60;
                        poke_blanked_console();
                        break;
                case 10: /* set bell frequency in Hz */
@@ -2871,7 +2872,7 @@ static int __init con_init(void)
 
        if (blankinterval) {
                blank_state = blank_normal_wait;
-               mod_timer(&console_timer, jiffies + blankinterval);
+               mod_timer(&console_timer, jiffies + (blankinterval * HZ));
        }
 
        for (currcons = 0; currcons < MIN_NR_CONSOLES; currcons++) {
@@ -3677,7 +3678,7 @@ void do_unblank_screen(int leaving_gfx)
                return; /* but leave console_blanked != 0 */
 
        if (blankinterval) {
-               mod_timer(&console_timer, jiffies + blankinterval);
+               mod_timer(&console_timer, jiffies + (blankinterval * HZ));
                blank_state = blank_normal_wait;
        }
 
@@ -3711,7 +3712,7 @@ void unblank_screen(void)
 static void blank_screen_t(unsigned long dummy)
 {
        if (unlikely(!keventd_up())) {
-               mod_timer(&console_timer, jiffies + blankinterval);
+               mod_timer(&console_timer, jiffies + (blankinterval * HZ));
                return;
        }
        blank_timer_expired = 1;
@@ -3741,7 +3742,7 @@ void poke_blanked_console(void)
        if (console_blanked)
                unblank_screen();
        else if (blankinterval) {
-               mod_timer(&console_timer, jiffies + blankinterval);
+               mod_timer(&console_timer, jiffies + (blankinterval * HZ));
                blank_state = blank_normal_wait;
        }
 }
index 40bd8c6..72a633a 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <linux/acpi_pmtmr.h>
 #include <linux/clocksource.h>
+#include <linux/timex.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/pci.h>
index ed69837..6cbb7a5 100644 (file)
@@ -1140,6 +1140,11 @@ NON0301 "c't Universale Graphic Adapter"
 NON0401 "c't Universal Ethernet Adapter"
 NON0501 "c't Universal 16-Bit Sound Adapter"
 NON0601 "c't Universal 8-Bit Adapter"
+NPI0120 "Network Peripherals NP-EISA-1 FDDI Interface"
+NPI0221 "Network Peripherals NP-EISA-2 FDDI Interface"
+NPI0223 "Network Peripherals NP-EISA-2E Enhanced FDDI Interface"
+NPI0301 "Network Peripherals NP-EISA-3 FDDI Interface"
+NPI0303 "Network Peripherals NP-EISA-3E Enhanced FDDI Interface"
 NSS0011 "Newport Systems Solutions WNIC Adapter"
 NVL0701 "Novell NE3200 Bus Master Ethernet"
 NVL0702 "Novell NE3200T Bus Master Ethernet"
index 05aa2d4..d5ea8a6 100644 (file)
  * information is necessary as for the resource tree.
  */
 struct firmware_map_entry {
-       resource_size_t         start;  /* start of the memory range */
-       resource_size_t         end;    /* end of the memory range (incl.) */
+       /*
+        * start and end must be u64 rather than resource_size_t, because e820
+        * resources can lie at addresses above 4G.
+        */
+       u64                     start;  /* start of the memory range */
+       u64                     end;    /* end of the memory range (incl.) */
        const char              *type;  /* type of the memory range */
        struct list_head        list;   /* entry for the linked list */
        struct kobject          kobj;   /* kobject for each entry */
@@ -101,7 +105,7 @@ static LIST_HEAD(map_entries);
  * 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,
+static int firmware_map_add_entry(u64 start, u64 end,
                                  const char *type,
                                  struct firmware_map_entry *entry)
 {
@@ -132,8 +136,7 @@ static int firmware_map_add_entry(resource_size_t start, resource_size_t end,
  *
  * 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)
+int firmware_map_add(u64 start, u64 end, const char *type)
 {
        struct firmware_map_entry *entry;
 
@@ -157,8 +160,7 @@ int firmware_map_add(resource_size_t start, resource_size_t end,
  *
  * Returns 0 on success, or -ENOMEM if no memory could be allocated.
  **/
-int __init firmware_map_add_early(resource_size_t start, resource_size_t end,
-                                 const char *type)
+int __init firmware_map_add_early(u64 start, u64 end, const char *type)
 {
        struct firmware_map_entry *entry;
 
index 0ecf6b7..8e28e59 100644 (file)
@@ -504,6 +504,14 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width,
        info->fbops = &intelfb_ops;
 
        info->fix.line_length = fb->pitch;
+
+       /* setup aperture base/size for vesafb takeover */
+       info->aperture_base = dev->mode_config.fb_base;
+       if (IS_I9XX(dev))
+               info->aperture_size = pci_resource_len(dev->pdev, 2);
+       else
+               info->aperture_size = pci_resource_len(dev->pdev, 0);
+
        info->fix.smem_start = dev->mode_config.fb_base + obj_priv->gtt_offset;
        info->fix.smem_len = size;
 
index f8090e1..2d50166 100644 (file)
@@ -950,6 +950,7 @@ config SENSORS_HDAPS
 config SENSORS_LIS3LV02D
        tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer"
        depends on ACPI && INPUT
+       select INPUT_POLLDEV
        select NEW_LEDS
        select LEDS_CLASS
        default n
@@ -977,6 +978,7 @@ config SENSORS_LIS3LV02D
 config SENSORS_LIS3_SPI
        tristate "STMicroeletronics LIS3LV02Dx three-axis digital accelerometer (SPI)"
        depends on !ACPI && SPI_MASTER && INPUT
+       select INPUT_POLLDEV
        default n
        help
          This driver provides support for the LIS3LV02Dx accelerometer connected
index abca7e9..6679854 100644 (file)
@@ -27,9 +27,6 @@
 #include <linux/types.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
-#include <linux/input.h>
-#include <linux/kthread.h>
-#include <linux/semaphore.h>
 #include <linux/delay.h>
 #include <linux/wait.h>
 #include <linux/poll.h>
@@ -161,6 +158,7 @@ static struct axis_conversion lis3lv02d_axis_normal = {1, 2, 3};
 static struct axis_conversion lis3lv02d_axis_y_inverted = {1, -2, 3};
 static struct axis_conversion lis3lv02d_axis_x_inverted = {-1, 2, 3};
 static struct axis_conversion lis3lv02d_axis_z_inverted = {1, 2, -3};
+static struct axis_conversion lis3lv02d_axis_xy_swap = {2, 1, 3};
 static struct axis_conversion lis3lv02d_axis_xy_rotated_left = {-2, 1, 3};
 static struct axis_conversion lis3lv02d_axis_xy_rotated_left_usd = {-2, 1, -3};
 static struct axis_conversion lis3lv02d_axis_xy_swap_inverted = {-2, -1, 3};
@@ -194,13 +192,16 @@ static struct dmi_system_id lis3lv02d_dmi_ids[] = {
        AXIS_DMI_MATCH("NX9420", "HP Compaq nx9420", x_inverted),
        AXIS_DMI_MATCH("NW9440", "HP Compaq nw9440", x_inverted),
        AXIS_DMI_MATCH("NC2510", "HP Compaq 2510", y_inverted),
+       AXIS_DMI_MATCH("NC2710", "HP Compaq 2710", xy_swap),
        AXIS_DMI_MATCH("NC8510", "HP Compaq 8510", xy_swap_inverted),
        AXIS_DMI_MATCH("HP2133", "HP 2133", xy_rotated_left),
        AXIS_DMI_MATCH("HP2140", "HP 2140", xy_swap_inverted),
        AXIS_DMI_MATCH("NC653x", "HP Compaq 653", xy_rotated_left_usd),
        AXIS_DMI_MATCH("NC673x", "HP Compaq 673", xy_rotated_left_usd),
        AXIS_DMI_MATCH("NC651xx", "HP Compaq 651", xy_rotated_right),
-       AXIS_DMI_MATCH("NC671xx", "HP Compaq 671", xy_swap_yz_inverted),
+       AXIS_DMI_MATCH("NC6710x", "HP Compaq 6710", xy_swap_yz_inverted),
+       AXIS_DMI_MATCH("NC6715x", "HP Compaq 6715", y_inverted),
+       AXIS_DMI_MATCH("NC693xx", "HP EliteBook 693", xy_rotated_right),
        /* Intel-based HP Pavilion dv5 */
        AXIS_DMI_MATCH2("HPDV5_I",
                        PRODUCT_NAME, "HP Pavilion dv5",
@@ -216,7 +217,6 @@ static struct dmi_system_id lis3lv02d_dmi_ids[] = {
        { NULL, }
 /* Laptop models without axis info (yet):
  * "NC6910" "HP Compaq 6910"
- * HP Compaq 8710x Notebook PC / Mobile Workstation
  * "NC2400" "HP Compaq nc2400"
  * "NX74x0" "HP Compaq nx74"
  * "NX6325" "HP Compaq nx6325"
@@ -324,7 +324,7 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
        flush_work(&hpled_led.work);
        led_classdev_unregister(&hpled_led.led_classdev);
 
-       return lis3lv02d_remove_fs();
+       return lis3lv02d_remove_fs(&lis3_dev);
 }
 
 
@@ -338,13 +338,7 @@ static int lis3lv02d_suspend(struct acpi_device *device, pm_message_t state)
 
 static int lis3lv02d_resume(struct acpi_device *device)
 {
-       /* put back the device in the right state (ACPI might turn it on) */
-       mutex_lock(&lis3_dev.lock);
-       if (lis3_dev.usage > 0)
-               lis3lv02d_poweron(&lis3_dev);
-       else
-               lis3lv02d_poweroff(&lis3_dev);
-       mutex_unlock(&lis3_dev.lock);
+       lis3lv02d_poweron(&lis3_dev);
        return 0;
 }
 #else
index 778eb77..271338b 100644 (file)
@@ -27,9 +27,7 @@
 #include <linux/types.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
-#include <linux/input.h>
-#include <linux/kthread.h>
-#include <linux/semaphore.h>
+#include <linux/input-polldev.h>
 #include <linux/delay.h>
 #include <linux/wait.h>
 #include <linux/poll.h>
@@ -105,56 +103,39 @@ static void lis3lv02d_get_xyz(struct lis3lv02d *lis3, int *x, int *y, int *z)
 {
        int position[3];
 
-       position[0] = lis3_dev.read_data(lis3, OUTX);
-       position[1] = lis3_dev.read_data(lis3, OUTY);
-       position[2] = lis3_dev.read_data(lis3, OUTZ);
+       position[0] = lis3->read_data(lis3, OUTX);
+       position[1] = lis3->read_data(lis3, OUTY);
+       position[2] = lis3->read_data(lis3, OUTZ);
 
-       *x = lis3lv02d_get_axis(lis3_dev.ac.x, position);
-       *y = lis3lv02d_get_axis(lis3_dev.ac.y, position);
-       *z = lis3lv02d_get_axis(lis3_dev.ac.z, position);
+       *x = lis3lv02d_get_axis(lis3->ac.x, position);
+       *y = lis3lv02d_get_axis(lis3->ac.y, position);
+       *z = lis3lv02d_get_axis(lis3->ac.z, position);
 }
 
 void lis3lv02d_poweroff(struct lis3lv02d *lis3)
 {
-       lis3_dev.is_on = 0;
+       /* disable X,Y,Z axis and power down */
+       lis3->write(lis3, CTRL_REG1, 0x00);
 }
 EXPORT_SYMBOL_GPL(lis3lv02d_poweroff);
 
 void lis3lv02d_poweron(struct lis3lv02d *lis3)
 {
-       lis3_dev.is_on = 1;
-       lis3_dev.init(lis3);
-}
-EXPORT_SYMBOL_GPL(lis3lv02d_poweron);
+       u8 reg;
 
-/*
- * To be called before starting to use the device. It makes sure that the
- * device will always be on until a call to lis3lv02d_decrease_use(). Not to be
- * used from interrupt context.
- */
-static void lis3lv02d_increase_use(struct lis3lv02d *dev)
-{
-       mutex_lock(&dev->lock);
-       dev->usage++;
-       if (dev->usage == 1) {
-               if (!dev->is_on)
-                       lis3lv02d_poweron(dev);
-       }
-       mutex_unlock(&dev->lock);
-}
+       lis3->init(lis3);
 
-/*
- * To be called whenever a usage of the device is stopped.
- * It will make sure to turn off the device when there is not usage.
- */
-static void lis3lv02d_decrease_use(struct lis3lv02d *dev)
-{
-       mutex_lock(&dev->lock);
-       dev->usage--;
-       if (dev->usage == 0)
-               lis3lv02d_poweroff(dev);
-       mutex_unlock(&dev->lock);
+       /*
+        * Common configuration
+        * BDU: LSB and MSB values are not updated until both have been read.
+        *      So the value read will always be correct.
+        */
+       lis3->read(lis3, CTRL_REG2, &reg);
+       reg |= CTRL2_BDU;
+       lis3->write(lis3, CTRL_REG2, reg);
 }
+EXPORT_SYMBOL_GPL(lis3lv02d_poweron);
+
 
 static irqreturn_t lis302dl_interrupt(int irq, void *dummy)
 {
@@ -198,15 +179,12 @@ static int lis3lv02d_misc_open(struct inode *inode, struct file *file)
                printk(KERN_ERR DRIVER_NAME ": IRQ%d allocation failed\n", lis3_dev.irq);
                return -EBUSY;
        }
-       lis3lv02d_increase_use(&lis3_dev);
-       printk("lis3: registered interrupt %d\n", lis3_dev.irq);
        return 0;
 }
 
 static int lis3lv02d_misc_release(struct inode *inode, struct file *file)
 {
        fasync_helper(-1, file, 0, &lis3_dev.async_queue);
-       lis3lv02d_decrease_use(&lis3_dev);
        free_irq(lis3_dev.irq, &lis3_dev);
        clear_bit(0, &lis3_dev.misc_opened); /* release the device */
        return 0;
@@ -290,46 +268,16 @@ static struct miscdevice lis3lv02d_misc_device = {
        .fops    = &lis3lv02d_misc_fops,
 };
 
-/**
- * lis3lv02d_joystick_kthread - Kthread polling function
- * @data: unused - here to conform to threadfn prototype
- */
-static int lis3lv02d_joystick_kthread(void *data)
+static void lis3lv02d_joystick_poll(struct input_polled_dev *pidev)
 {
        int x, y, z;
 
-       while (!kthread_should_stop()) {
-               lis3lv02d_get_xyz(&lis3_dev, &x, &y, &z);
-               input_report_abs(lis3_dev.idev, ABS_X, x - lis3_dev.xcalib);
-               input_report_abs(lis3_dev.idev, ABS_Y, y - lis3_dev.ycalib);
-               input_report_abs(lis3_dev.idev, ABS_Z, z - lis3_dev.zcalib);
-
-               input_sync(lis3_dev.idev);
-
-               try_to_freeze();
-               msleep_interruptible(MDPS_POLL_INTERVAL);
-       }
-
-       return 0;
-}
-
-static int lis3lv02d_joystick_open(struct input_dev *input)
-{
-       lis3lv02d_increase_use(&lis3_dev);
-       lis3_dev.kthread = kthread_run(lis3lv02d_joystick_kthread, NULL, "klis3lv02d");
-       if (IS_ERR(lis3_dev.kthread)) {
-               lis3lv02d_decrease_use(&lis3_dev);
-               return PTR_ERR(lis3_dev.kthread);
-       }
-
-       return 0;
+       lis3lv02d_get_xyz(&lis3_dev, &x, &y, &z);
+       input_report_abs(pidev->input, ABS_X, x - lis3_dev.xcalib);
+       input_report_abs(pidev->input, ABS_Y, y - lis3_dev.ycalib);
+       input_report_abs(pidev->input, ABS_Z, z - lis3_dev.zcalib);
 }
 
-static void lis3lv02d_joystick_close(struct input_dev *input)
-{
-       kthread_stop(lis3_dev.kthread);
-       lis3lv02d_decrease_use(&lis3_dev);
-}
 
 static inline void lis3lv02d_calibrate_joystick(void)
 {
@@ -339,33 +287,36 @@ static inline void lis3lv02d_calibrate_joystick(void)
 
 int lis3lv02d_joystick_enable(void)
 {
+       struct input_dev *input_dev;
        int err;
 
        if (lis3_dev.idev)
                return -EINVAL;
 
-       lis3_dev.idev = input_allocate_device();
+       lis3_dev.idev = input_allocate_polled_device();
        if (!lis3_dev.idev)
                return -ENOMEM;
 
+       lis3_dev.idev->poll = lis3lv02d_joystick_poll;
+       lis3_dev.idev->poll_interval = MDPS_POLL_INTERVAL;
+       input_dev = lis3_dev.idev->input;
+
        lis3lv02d_calibrate_joystick();
 
-       lis3_dev.idev->name       = "ST LIS3LV02DL Accelerometer";
-       lis3_dev.idev->phys       = DRIVER_NAME "/input0";
-       lis3_dev.idev->id.bustype = BUS_HOST;
-       lis3_dev.idev->id.vendor  = 0;
-       lis3_dev.idev->dev.parent = &lis3_dev.pdev->dev;
-       lis3_dev.idev->open       = lis3lv02d_joystick_open;
-       lis3_dev.idev->close      = lis3lv02d_joystick_close;
+       input_dev->name       = "ST LIS3LV02DL Accelerometer";
+       input_dev->phys       = DRIVER_NAME "/input0";
+       input_dev->id.bustype = BUS_HOST;
+       input_dev->id.vendor  = 0;
+       input_dev->dev.parent = &lis3_dev.pdev->dev;
 
-       set_bit(EV_ABS, lis3_dev.idev->evbit);
-       input_set_abs_params(lis3_dev.idev, ABS_X, -lis3_dev.mdps_max_val, lis3_dev.mdps_max_val, 3, 3);
-       input_set_abs_params(lis3_dev.idev, ABS_Y, -lis3_dev.mdps_max_val, lis3_dev.mdps_max_val, 3, 3);
-       input_set_abs_params(lis3_dev.idev, ABS_Z, -lis3_dev.mdps_max_val, lis3_dev.mdps_max_val, 3, 3);
+       set_bit(EV_ABS, input_dev->evbit);
+       input_set_abs_params(input_dev, ABS_X, -lis3_dev.mdps_max_val, lis3_dev.mdps_max_val, 3, 3);
+       input_set_abs_params(input_dev, ABS_Y, -lis3_dev.mdps_max_val, lis3_dev.mdps_max_val, 3, 3);
+       input_set_abs_params(input_dev, ABS_Z, -lis3_dev.mdps_max_val, lis3_dev.mdps_max_val, 3, 3);
 
-       err = input_register_device(lis3_dev.idev);
+       err = input_register_polled_device(lis3_dev.idev);
        if (err) {
-               input_free_device(lis3_dev.idev);
+               input_free_polled_device(lis3_dev.idev);
                lis3_dev.idev = NULL;
        }
 
@@ -378,8 +329,9 @@ void lis3lv02d_joystick_disable(void)
        if (!lis3_dev.idev)
                return;
 
-       misc_deregister(&lis3lv02d_misc_device);
-       input_unregister_device(lis3_dev.idev);
+       if (lis3_dev.irq)
+               misc_deregister(&lis3lv02d_misc_device);
+       input_unregister_polled_device(lis3_dev.idev);
        lis3_dev.idev = NULL;
 }
 EXPORT_SYMBOL_GPL(lis3lv02d_joystick_disable);
@@ -390,9 +342,7 @@ static ssize_t lis3lv02d_position_show(struct device *dev,
 {
        int x, y, z;
 
-       lis3lv02d_increase_use(&lis3_dev);
        lis3lv02d_get_xyz(&lis3_dev, &x, &y, &z);
-       lis3lv02d_decrease_use(&lis3_dev);
        return sprintf(buf, "(%d,%d,%d)\n", x, y, z);
 }
 
@@ -406,9 +356,7 @@ static ssize_t lis3lv02d_calibrate_store(struct device *dev,
                                struct device_attribute *attr,
                                const char *buf, size_t count)
 {
-       lis3lv02d_increase_use(&lis3_dev);
        lis3lv02d_calibrate_joystick();
-       lis3lv02d_decrease_use(&lis3_dev);
        return count;
 }
 
@@ -420,9 +368,7 @@ static ssize_t lis3lv02d_rate_show(struct device *dev,
        u8 ctrl;
        int val;
 
-       lis3lv02d_increase_use(&lis3_dev);
        lis3_dev.read(&lis3_dev, CTRL_REG1, &ctrl);
-       lis3lv02d_decrease_use(&lis3_dev);
        val = (ctrl & (CTRL1_DF0 | CTRL1_DF1)) >> 4;
        return sprintf(buf, "%d\n", lis3lv02dl_df_val[val]);
 }
@@ -446,17 +392,17 @@ static struct attribute_group lis3lv02d_attribute_group = {
 
 static int lis3lv02d_add_fs(struct lis3lv02d *lis3)
 {
-       lis3_dev.pdev = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0);
-       if (IS_ERR(lis3_dev.pdev))
-               return PTR_ERR(lis3_dev.pdev);
+       lis3->pdev = platform_device_register_simple(DRIVER_NAME, -1, NULL, 0);
+       if (IS_ERR(lis3->pdev))
+               return PTR_ERR(lis3->pdev);
 
-       return sysfs_create_group(&lis3_dev.pdev->dev.kobj, &lis3lv02d_attribute_group);
+       return sysfs_create_group(&lis3->pdev->dev.kobj, &lis3lv02d_attribute_group);
 }
 
-int lis3lv02d_remove_fs(void)
+int lis3lv02d_remove_fs(struct lis3lv02d *lis3)
 {
-       sysfs_remove_group(&lis3_dev.pdev->dev.kobj, &lis3lv02d_attribute_group);
-       platform_device_unregister(lis3_dev.pdev);
+       sysfs_remove_group(&lis3->pdev->dev.kobj, &lis3lv02d_attribute_group);
+       platform_device_unregister(lis3->pdev);
        return 0;
 }
 EXPORT_SYMBOL_GPL(lis3lv02d_remove_fs);
@@ -482,18 +428,35 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
                break;
        default:
                printk(KERN_ERR DRIVER_NAME
-                       ": unknown sensor type 0x%X\n", lis3_dev.whoami);
+                       ": unknown sensor type 0x%X\n", dev->whoami);
                return -EINVAL;
        }
 
-       mutex_init(&dev->lock);
        lis3lv02d_add_fs(dev);
-       lis3lv02d_increase_use(dev);
+       lis3lv02d_poweron(dev);
 
        if (lis3lv02d_joystick_enable())
                printk(KERN_ERR DRIVER_NAME ": joystick initialization failed\n");
 
-       printk("lis3_init_device: irq %d\n", dev->irq);
+       /* passing in platform specific data is purely optional and only
+        * used by the SPI transport layer at the moment */
+       if (dev->pdata) {
+               struct lis3lv02d_platform_data *p = dev->pdata;
+
+               if (p->click_flags && (dev->whoami == LIS_SINGLE_ID)) {
+                       dev->write(dev, CLICK_CFG, p->click_flags);
+                       dev->write(dev, CLICK_TIMELIMIT, p->click_time_limit);
+                       dev->write(dev, CLICK_LATENCY, p->click_latency);
+                       dev->write(dev, CLICK_WINDOW, p->click_window);
+                       dev->write(dev, CLICK_THSZ, p->click_thresh_z & 0xf);
+                       dev->write(dev, CLICK_THSY_X,
+                                       (p->click_thresh_x & 0xf) |
+                                       (p->click_thresh_y << 4));
+               }
+
+               if (p->irq_cfg)
+                       dev->write(dev, CTRL_REG3, p->irq_cfg);
+       }
 
        /* bail if we did not get an IRQ from the bus layer */
        if (!dev->irq) {
@@ -502,11 +465,9 @@ int lis3lv02d_init_device(struct lis3lv02d *dev)
                goto out;
        }
 
-       printk("lis3: registering device\n");
        if (misc_register(&lis3lv02d_misc_device))
                printk(KERN_ERR DRIVER_NAME ": misc_register failed\n");
 out:
-       lis3lv02d_decrease_use(dev);
        return 0;
 }
 EXPORT_SYMBOL_GPL(lis3lv02d_init_device);
index 745ec96..e320e2f 100644 (file)
@@ -18,6 +18,8 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+#include <linux/platform_device.h>
+#include <linux/input-polldev.h>
 
 /*
  * The actual chip is STMicroelectronics LIS3LV02DL or LIS3LV02DQ that seems to
  * They can also be connected via I²C.
  */
 
+#include <linux/lis3lv02d.h>
+
 /* 2-byte registers */
 #define LIS_DOUBLE_ID  0x3A /* LIS3LV02D[LQ] */
 /* 1-byte registers */
 #define LIS_SINGLE_ID  0x3B /* LIS[32]02DL and others */
 
-enum lis3lv02d_reg {
+enum lis3_reg {
        WHO_AM_I        = 0x0F,
        OFFSET_X        = 0x16,
        OFFSET_Y        = 0x17,
@@ -60,6 +64,19 @@ enum lis3lv02d_reg {
        FF_WU_THS_L     = 0x34,
        FF_WU_THS_H     = 0x35,
        FF_WU_DURATION  = 0x36,
+};
+
+enum lis302d_reg {
+       CLICK_CFG       = 0x38,
+       CLICK_SRC       = 0x39,
+       CLICK_THSY_X    = 0x3B,
+       CLICK_THSZ      = 0x3C,
+       CLICK_TIMELIMIT = 0x3D,
+       CLICK_LATENCY   = 0x3E,
+       CLICK_WINDOW    = 0x3F,
+};
+
+enum lis3lv02d_reg {
        DD_CFG          = 0x38,
        DD_SRC          = 0x39,
        DD_ACK          = 0x3A,
@@ -169,22 +186,20 @@ struct lis3lv02d {
        s16 (*read_data) (struct lis3lv02d *lis3, int reg);
        int                     mdps_max_val;
 
-       struct input_dev        *idev;     /* input device */
-       struct task_struct      *kthread;  /* kthread for input */
-       struct mutex            lock;
+       struct input_polled_dev *idev;     /* input device */
        struct platform_device  *pdev;     /* platform device */
        atomic_t                count;     /* interrupt count after last read */
        int                     xcalib;    /* calibrated null value for x */
        int                     ycalib;    /* calibrated null value for y */
        int                     zcalib;    /* calibrated null value for z */
-       unsigned char           is_on;     /* whether the device is on or off */
-       unsigned char           usage;     /* usage counter */
        struct axis_conversion  ac;        /* hw -> logical axis */
 
        u32                     irq;       /* IRQ number */
        struct fasync_struct    *async_queue; /* queue for the misc device */
        wait_queue_head_t       misc_wait; /* Wait queue for the misc device */
        unsigned long           misc_opened; /* bit0: whether the device is open */
+
+       struct lis3lv02d_platform_data *pdata;  /* for passing board config */
 };
 
 int lis3lv02d_init_device(struct lis3lv02d *lis3);
@@ -192,6 +207,6 @@ int lis3lv02d_joystick_enable(void);
 void lis3lv02d_joystick_disable(void);
 void lis3lv02d_poweroff(struct lis3lv02d *lis3);
 void lis3lv02d_poweron(struct lis3lv02d *lis3);
-int lis3lv02d_remove_fs(void);
+int lis3lv02d_remove_fs(struct lis3lv02d *lis3);
 
 extern struct lis3lv02d lis3_dev;
index 07ae74b..3827ff0 100644 (file)
@@ -72,6 +72,7 @@ static int __devinit lis302dl_spi_probe(struct spi_device *spi)
        lis3_dev.write = lis3_spi_write;
        lis3_dev.irq = spi->irq;
        lis3_dev.ac = lis3lv02d_axis_normal;
+       lis3_dev.pdata = spi->dev.platform_data;
        spi_set_drvdata(spi, &lis3_dev);
 
        ret = lis3lv02d_init_device(&lis3_dev);
index 356b3a2..1c0b529 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/input.h>
 #include <linux/gameport.h>
 #include <linux/jiffies.h>
-#include <asm/timex.h>
+#include <linux/timex.h>
 
 #define DRIVER_DESC    "Analog joystick and gamepad driver"
 
index d6a30ce..6d67af5 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/platform_device.h>
+#include <linux/timex.h>
 #include <asm/io.h>
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
index 6109fb5..0c29a01 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
+#include <linux/pagemap.h>
 #include <linux/dma-mapping.h>
 #include <media/videobuf-dma-contig.h>
 
@@ -25,6 +26,7 @@ struct videobuf_dma_contig_memory {
        void *vaddr;
        dma_addr_t dma_handle;
        unsigned long size;
+       int is_userptr;
 };
 
 #define MAGIC_DC_MEM 0x0733ac61
@@ -108,6 +110,82 @@ static struct vm_operations_struct videobuf_vm_ops = {
        .close    = videobuf_vm_close,
 };
 
+/**
+ * videobuf_dma_contig_user_put() - reset pointer to user space buffer
+ * @mem: per-buffer private videobuf-dma-contig data
+ *
+ * This function resets the user space pointer
+ */
+static void videobuf_dma_contig_user_put(struct videobuf_dma_contig_memory *mem)
+{
+       mem->is_userptr = 0;
+       mem->dma_handle = 0;
+       mem->size = 0;
+}
+
+/**
+ * videobuf_dma_contig_user_get() - setup user space memory pointer
+ * @mem: per-buffer private videobuf-dma-contig data
+ * @vb: video buffer to map
+ *
+ * This function validates and sets up a pointer to user space memory.
+ * Only physically contiguous pfn-mapped memory is accepted.
+ *
+ * Returns 0 if successful.
+ */
+static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem,
+                                       struct videobuf_buffer *vb)
+{
+       struct mm_struct *mm = current->mm;
+       struct vm_area_struct *vma;
+       unsigned long prev_pfn, this_pfn;
+       unsigned long pages_done, user_address;
+       int ret;
+
+       mem->size = PAGE_ALIGN(vb->size);
+       mem->is_userptr = 0;
+       ret = -EINVAL;
+
+       down_read(&mm->mmap_sem);
+
+       vma = find_vma(mm, vb->baddr);
+       if (!vma)
+               goto out_up;
+
+       if ((vb->baddr + mem->size) > vma->vm_end)
+               goto out_up;
+
+       pages_done = 0;
+       prev_pfn = 0; /* kill warning */
+       user_address = vb->baddr;
+
+       while (pages_done < (mem->size >> PAGE_SHIFT)) {
+               ret = follow_pfn(vma, user_address, &this_pfn);
+               if (ret)
+                       break;
+
+               if (pages_done == 0)
+                       mem->dma_handle = this_pfn << PAGE_SHIFT;
+               else if (this_pfn != (prev_pfn + 1))
+                       ret = -EFAULT;
+
+               if (ret)
+                       break;
+
+               prev_pfn = this_pfn;
+               user_address += PAGE_SIZE;
+               pages_done++;
+       }
+
+       if (!ret)
+               mem->is_userptr = 1;
+
+ out_up:
+       up_read(&current->mm->mmap_sem);
+
+       return ret;
+}
+
 static void *__videobuf_alloc(size_t size)
 {
        struct videobuf_dma_contig_memory *mem;
@@ -154,12 +232,11 @@ static int __videobuf_iolock(struct videobuf_queue *q,
        case V4L2_MEMORY_USERPTR:
                dev_dbg(q->dev, "%s memory method USERPTR\n", __func__);
 
-               /* The only USERPTR currently supported is the one needed for
-                  read() method.
-                */
+               /* handle pointer from user space */
                if (vb->baddr)
-                       return -EINVAL;
+                       return videobuf_dma_contig_user_get(mem, vb);
 
+               /* allocate memory for the read() method */
                mem->size = PAGE_ALIGN(vb->size);
                mem->vaddr = dma_alloc_coherent(q->dev, mem->size,
                                                &mem->dma_handle, GFP_KERNEL);
@@ -400,7 +477,7 @@ void videobuf_dma_contig_free(struct videobuf_queue *q,
           So, it should free memory only if the memory were allocated for
           read() operation.
         */
-       if ((buf->memory != V4L2_MEMORY_USERPTR) || buf->baddr)
+       if (buf->memory != V4L2_MEMORY_USERPTR)
                return;
 
        if (!mem)
@@ -408,6 +485,13 @@ void videobuf_dma_contig_free(struct videobuf_queue *q,
 
        MAGIC_CHECK(mem->magic, MAGIC_DC_MEM);
 
+       /* handle user space pointer case */
+       if (buf->baddr) {
+               videobuf_dma_contig_user_put(mem);
+               return;
+       }
+
+       /* read() method */
        dma_free_coherent(q->dev, mem->size, mem->vaddr, mem->dma_handle);
        mem->vaddr = NULL;
 }
index bbefe77..3ce2920 100644 (file)
@@ -302,7 +302,7 @@ static int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr)
                pnode = uv_node_to_pnode(nid);
                if (bid < 0 || gru_base[bid])
                        continue;
-               page = alloc_pages_node(nid, GFP_KERNEL, order);
+               page = alloc_pages_exact_node(nid, GFP_KERNEL, order);
                if (!page)
                        goto fail;
                gru_base[bid] = page_address(page);
index 9172fcd..c76677a 100644 (file)
@@ -232,7 +232,7 @@ xpc_create_gru_mq_uv(unsigned int mq_size, int cpu, char *irq_name,
        mq->mmr_blade = uv_cpu_to_blade_id(cpu);
 
        nid = cpu_to_node(cpu);
-       page = alloc_pages_node(nid, GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
+       page = alloc_pages_exact_node(nid, GFP_KERNEL | __GFP_ZERO | GFP_THISNODE,
                                pg_order);
        if (page == NULL) {
                dev_err(xpc_part, "xpc_create_gru_mq_uv() failed to alloc %d "
index 1703b20..6095f8d 100644 (file)
@@ -915,12 +915,9 @@ static int ds_ioctl(struct inode * inode, struct file * file,
                err = -EPERM;
                goto free_out;
        } else {
-               static int printed = 0;
-               if (!printed) {
-                       printk(KERN_WARNING "2.6. kernels use pcmciamtd instead of memory_cs.c and do not require special\n");
-                       printk(KERN_WARNING "MTD handling any more.\n");
-                       printed++;
-               }
+                       printk_once(KERN_WARNING
+                               "2.6. kernels use pcmciamtd instead of memory_cs.c and do not require special\n");
+                       printk_once(KERN_WARNING "MTD handling any more.\n");
        }
        err = -EINVAL;
        goto free_out;
index f4573a9..a32ccb4 100644 (file)
@@ -711,12 +711,12 @@ static int of_mpc83xx_spi_get_chipselects(struct device *dev)
                return 0;
        }
 
-       pinfo->gpios = kmalloc(ngpios * sizeof(pinfo->gpios), GFP_KERNEL);
+       pinfo->gpios = kmalloc(ngpios * sizeof(*pinfo->gpios), GFP_KERNEL);
        if (!pinfo->gpios)
                return -ENOMEM;
-       memset(pinfo->gpios, -1, ngpios * sizeof(pinfo->gpios));
+       memset(pinfo->gpios, -1, ngpios * sizeof(*pinfo->gpios));
 
-       pinfo->alow_flags = kzalloc(ngpios * sizeof(pinfo->alow_flags),
+       pinfo->alow_flags = kzalloc(ngpios * sizeof(*pinfo->alow_flags),
                                    GFP_KERNEL);
        if (!pinfo->alow_flags) {
                ret = -ENOMEM;
index 2b5a691..932ffdb 100644 (file)
@@ -2104,6 +2104,7 @@ config FB_MB862XX_LIME
        bool "Lime GDC"
        depends on FB_MB862XX
        depends on OF && !FB_MB862XX_PCI_GDC
+       depends on PPC
        select FB_FOREIGN_ENDIAN
        select FB_LITTLE_ENDIAN
        ---help---
index 6995fe1..0bcc59e 100644 (file)
@@ -859,43 +859,6 @@ acornfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
        return 0;
 }
 
-/*
- * Note that we are entered with the kernel locked.
- */
-static int
-acornfb_mmap(struct fb_info *info, struct vm_area_struct *vma)
-{
-       unsigned long off, start;
-       u32 len;
-
-       off = vma->vm_pgoff << PAGE_SHIFT;
-
-       start = info->fix.smem_start;
-       len = PAGE_ALIGN(start & ~PAGE_MASK) + info->fix.smem_len;
-       start &= PAGE_MASK;
-       if ((vma->vm_end - vma->vm_start + off) > len)
-               return -EINVAL;
-       off += start;
-       vma->vm_pgoff = off >> PAGE_SHIFT;
-
-       /* This is an IO map - tell maydump to skip this VMA */
-       vma->vm_flags |= VM_IO;
-
-       vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
-
-       /*
-        * Don't alter the page protection flags; we want to keep the area
-        * cached for better performance.  This does mean that we may miss
-        * some updates to the screen occasionally, but process switches
-        * should cause the caches and buffers to be flushed often enough.
-        */
-       if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
-                               vma->vm_end - vma->vm_start,
-                               vma->vm_page_prot))
-               return -EAGAIN;
-       return 0;
-}
-
 static struct fb_ops acornfb_ops = {
        .owner          = THIS_MODULE,
        .fb_check_var   = acornfb_check_var,
@@ -905,7 +868,6 @@ static struct fb_ops acornfb_ops = {
        .fb_fillrect    = cfb_fillrect,
        .fb_copyarea    = cfb_copyarea,
        .fb_imageblit   = cfb_imageblit,
-       .fb_mmap        = acornfb_mmap,
 };
 
 /*
index 2fb63f6..5afd644 100644 (file)
@@ -345,7 +345,7 @@ static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
        dev_dbg(dev, "  bpp:        %u\n", var->bits_per_pixel);
        dev_dbg(dev, "  clk:        %lu KHz\n", clk_value_khz);
 
-       if ((PICOS2KHZ(var->pixclock) * var->bits_per_pixel / 8) > clk_value_khz) {
+       if (PICOS2KHZ(var->pixclock) > clk_value_khz) {
                dev_err(dev, "%lu KHz pixel clock is too fast\n", PICOS2KHZ(var->pixclock));
                return -EINVAL;
        }
index 97a1f09..515cf19 100644 (file)
@@ -213,7 +213,6 @@ static void radeon_pm_disable_dynamic_mode(struct radeonfb_info *rinfo)
                         PIXCLKS_CNTL__R300_PIXCLK_TRANS_ALWAYS_ONb     |
                         PIXCLKS_CNTL__R300_PIXCLK_TVO_ALWAYS_ONb       |
                         PIXCLKS_CNTL__R300_P2G2CLK_ALWAYS_ONb          |
-                        PIXCLKS_CNTL__R300_P2G2CLK_ALWAYS_ONb          |
                         PIXCLKS_CNTL__R300_DISP_DAC_PIXCLK_DAC2_BLANK_OFF);
                 OUTPLL(pllPIXCLKS_CNTL, tmp);
 
@@ -395,7 +394,7 @@ static void radeon_pm_enable_dynamic_mode(struct radeonfb_info *rinfo)
                        PIXCLKS_CNTL__R300_PIXCLK_TRANS_ALWAYS_ONb      |
                        PIXCLKS_CNTL__R300_PIXCLK_TVO_ALWAYS_ONb        |
                        PIXCLKS_CNTL__R300_P2G2CLK_ALWAYS_ONb           |
-                       PIXCLKS_CNTL__R300_P2G2CLK_ALWAYS_ONb);
+                       PIXCLKS_CNTL__R300_P2G2CLK_DAC_ALWAYS_ONb);
                OUTPLL(pllPIXCLKS_CNTL, tmp);
 
                tmp = INPLL(pllMCLK_MISC);
index 37e60b1..e49ae5e 100644 (file)
@@ -323,7 +323,6 @@ static int bfin_bf54x_fb_release(struct fb_info *info, int user)
                bfin_write_EPPI0_CONTROL(0);
                SSYNC();
                disable_dma(CH_EPPI0);
-               memset(fbi->fb_buffer, 0, info->fix.smem_len);
        }
 
        spin_unlock(&fbi->lock);
@@ -530,7 +529,7 @@ static irqreturn_t bfin_bf54x_irq_error(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static int __init bfin_bf54x_probe(struct platform_device *pdev)
+static int __devinit bfin_bf54x_probe(struct platform_device *pdev)
 {
        struct bfin_bf54xfb_info *info;
        struct fb_info *fbinfo;
@@ -626,14 +625,12 @@ static int __init bfin_bf54x_probe(struct platform_device *pdev)
                goto out3;
        }
 
-       memset(info->fb_buffer, 0, fbinfo->fix.smem_len);
-
        fbinfo->screen_base = (void *)info->fb_buffer;
        fbinfo->fix.smem_start = (int)info->fb_buffer;
 
        fbinfo->fbops = &bfin_bf54x_fb_ops;
 
-       fbinfo->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL);
+       fbinfo->pseudo_palette = kzalloc(sizeof(u32) * 16, GFP_KERNEL);
        if (!fbinfo->pseudo_palette) {
                printk(KERN_ERR DRIVER_NAME
                       "Fail to allocate pseudo_palette\n");
@@ -642,8 +639,6 @@ static int __init bfin_bf54x_probe(struct platform_device *pdev)
                goto out4;
        }
 
-       memset(fbinfo->pseudo_palette, 0, sizeof(u32) * 16);
-
        if (fb_alloc_cmap(&fbinfo->cmap, BFIN_LCD_NBR_PALETTE_ENTRIES, 0)
            < 0) {
                printk(KERN_ERR DRIVER_NAME
@@ -712,7 +707,7 @@ out1:
        return ret;
 }
 
-static int bfin_bf54x_remove(struct platform_device *pdev)
+static int __devexit bfin_bf54x_remove(struct platform_device *pdev)
 {
 
        struct fb_info *fbinfo = platform_get_drvdata(pdev);
@@ -781,7 +776,7 @@ static int bfin_bf54x_resume(struct platform_device *pdev)
 
 static struct platform_driver bfin_bf54x_driver = {
        .probe = bfin_bf54x_probe,
-       .remove = bfin_bf54x_remove,
+       .remove = __devexit_p(bfin_bf54x_remove),
        .suspend = bfin_bf54x_suspend,
        .resume = bfin_bf54x_resume,
        .driver = {
@@ -790,7 +785,7 @@ static struct platform_driver bfin_bf54x_driver = {
                   },
 };
 
-static int __devinit bfin_bf54x_driver_init(void)
+static int __init bfin_bf54x_driver_init(void)
 {
        return platform_driver_register(&bfin_bf54x_driver);
 }
index 90cfdda..5cc36cf 100644 (file)
@@ -242,7 +242,6 @@ static int bfin_t350mcqb_fb_release(struct fb_info *info, int user)
                SSYNC();
                disable_dma(CH_PPI);
                bfin_t350mcqb_stop_timers();
-               memset(fbi->fb_buffer, 0, info->fix.smem_len);
        }
 
        spin_unlock(&fbi->lock);
@@ -527,8 +526,6 @@ static int __devinit bfin_t350mcqb_probe(struct platform_device *pdev)
                goto out3;
        }
 
-       memset(info->fb_buffer, 0, fbinfo->fix.smem_len);
-
        fbinfo->screen_base = (void *)info->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET;
        fbinfo->fix.smem_start = (int)info->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET;
 
@@ -602,7 +599,7 @@ out1:
        return ret;
 }
 
-static int bfin_t350mcqb_remove(struct platform_device *pdev)
+static int __devexit bfin_t350mcqb_remove(struct platform_device *pdev)
 {
 
        struct fb_info *fbinfo = platform_get_drvdata(pdev);
@@ -637,9 +634,6 @@ static int bfin_t350mcqb_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t state)
 {
-       struct fb_info *fbinfo = platform_get_drvdata(pdev);
-       struct bfin_t350mcqbfb_info *info = fbinfo->par;
-
        bfin_t350mcqb_disable_ppi();
        disable_dma(CH_PPI);
        bfin_write_PPI_STATUS(0xFFFF);
@@ -649,9 +643,6 @@ static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t stat
 
 static int bfin_t350mcqb_resume(struct platform_device *pdev)
 {
-       struct fb_info *fbinfo = platform_get_drvdata(pdev);
-       struct bfin_t350mcqbfb_info *info = fbinfo->par;
-
        enable_dma(CH_PPI);
        bfin_t350mcqb_enable_ppi();
 
@@ -664,7 +655,7 @@ static int bfin_t350mcqb_resume(struct platform_device *pdev)
 
 static struct platform_driver bfin_t350mcqb_driver = {
        .probe = bfin_t350mcqb_probe,
-       .remove = bfin_t350mcqb_remove,
+       .remove = __devexit_p(bfin_t350mcqb_remove),
        .suspend = bfin_t350mcqb_suspend,
        .resume = bfin_t350mcqb_resume,
        .driver = {
@@ -673,7 +664,7 @@ static struct platform_driver bfin_t350mcqb_driver = {
                   },
 };
 
-static int __devinit bfin_t350mcqb_driver_init(void)
+static int __init bfin_t350mcqb_driver_init(void)
 {
        return platform_driver_register(&bfin_t350mcqb_driver);
 }
index c7ff3c1..0c02f8e 100644 (file)
@@ -562,7 +562,7 @@ static int __devinit alloc_carmine_fb(void __iomem *regs, void __iomem *smem_bas
        if (ret < 0)
                goto err_free_fb;
 
-       if (fb_mode > ARRAY_SIZE(carmine_modedb))
+       if (fb_mode >= ARRAY_SIZE(carmine_modedb))
                fb_mode = CARMINEFB_DEFAULT_VIDEO_MODE;
 
        par->cur_mode = par->new_mode = ~0;
index 777389c..57b9d27 100644 (file)
@@ -414,7 +414,6 @@ chipsfb_pci_init(struct pci_dev *dp, const struct pci_device_id *ent)
        }
 
        pci_set_drvdata(dp, p);
-       p->device = &dp->dev;
 
        init_chips(p, addr);
 
index 8dea2bc..eb12182 100644 (file)
@@ -280,6 +280,9 @@ static int __init efifb_probe(struct platform_device *dev)
        info->pseudo_palette = info->par;
        info->par = NULL;
 
+       info->aperture_base = efifb_fix.smem_start;
+       info->aperture_size = size_total;
+
        info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len);
        if (!info->screen_base) {
                printk(KERN_ERR "efifb: abort, cannot ioremap video memory "
@@ -337,7 +340,7 @@ static int __init efifb_probe(struct platform_device *dev)
        info->fbops = &efifb_ops;
        info->var = efifb_defined;
        info->fix = efifb_fix;
-       info->flags = FBINFO_FLAG_DEFAULT;
+       info->flags = FBINFO_FLAG_DEFAULT | FBINFO_MISC_FIRMWARE;
 
        if ((err = fb_alloc_cmap(&info->cmap, 256, 0)) < 0) {
                printk(KERN_ERR "efifb: cannot allocate colormap\n");
index d412a1d..f8a09bf 100644 (file)
@@ -1462,6 +1462,16 @@ static int fb_check_foreignness(struct fb_info *fi)
        return 0;
 }
 
+static bool fb_do_apertures_overlap(struct fb_info *gen, struct fb_info *hw)
+{
+       /* is the generic aperture base the same as the HW one */
+       if (gen->aperture_base == hw->aperture_base)
+               return true;
+       /* is the generic aperture base inside the hw base->hw base+size */
+       if (gen->aperture_base > hw->aperture_base && gen->aperture_base <= hw->aperture_base + hw->aperture_size)
+               return true;
+       return false;
+}
 /**
  *     register_framebuffer - registers a frame buffer device
  *     @fb_info: frame buffer info structure
@@ -1485,6 +1495,23 @@ register_framebuffer(struct fb_info *fb_info)
        if (fb_check_foreignness(fb_info))
                return -ENOSYS;
 
+       /* check all firmware fbs and kick off if the base addr overlaps */
+       for (i = 0 ; i < FB_MAX; i++) {
+               if (!registered_fb[i])
+                       continue;
+
+               if (registered_fb[i]->flags & FBINFO_MISC_FIRMWARE) {
+                       if (fb_do_apertures_overlap(registered_fb[i], fb_info)) {
+                               printk(KERN_ERR "fb: conflicting fb hw usage "
+                                      "%s vs %s - removing generic driver\n",
+                                      fb_info->fix.id,
+                                      registered_fb[i]->fix.id);
+                               unregister_framebuffer(registered_fb[i]);
+                               break;
+                       }
+               }
+       }
+
        num_registered_fb++;
        for (i = 0 ; i < FB_MAX; i++)
                if (!registered_fb[i])
@@ -1586,6 +1613,10 @@ unregister_framebuffer(struct fb_info *fb_info)
        device_destroy(fb_class, MKDEV(FB_MAJOR, i));
        event.info = fb_info;
        fb_notifier_call_chain(FB_EVENT_FB_UNREGISTERED, &event);
+
+       /* this may free fb info */
+       if (fb_info->fbops->fb_destroy)
+               fb_info->fbops->fb_destroy(fb_info);
 done:
        return ret;
 }
index 3a81060..15d2001 100644 (file)
@@ -395,17 +395,16 @@ int __init igafb_init(void)
        /* We leak a reference here but as it cannot be unloaded this is
           fine. If you write unload code remember to free it in unload */
        
-       size = sizeof(struct fb_info) + sizeof(struct iga_par) + sizeof(u32)*16;
+       size = sizeof(struct iga_par) + sizeof(u32)*16;
 
-        info = kzalloc(size, GFP_ATOMIC);
+       info = framebuffer_alloc(size, &pdev->dev);
         if (!info) {
                 printk("igafb_init: can't alloc fb_info\n");
                 pci_dev_put(pdev);
                 return -ENOMEM;
         }
 
-       par = (struct iga_par *) (info + 1);
-       
+       par = info->par;
 
        if ((addr = pdev->resource[0].start) == 0) {
                 printk("igafb_init: no memory start\n");
@@ -526,7 +525,6 @@ int __init igafb_init(void)
        info->var = default_var;
        info->fix = igafb_fix;
        info->pseudo_palette = (void *)(par + 1);
-       info->device = &pdev->dev;
 
        if (!iga_init(info, par)) {
                iounmap((void *)par->io_base);
index ace14fe..0cafd64 100644 (file)
@@ -1365,6 +1365,11 @@ static int intelfb_set_par(struct fb_info *info)
        DBG_MSG("intelfb_set_par (%dx%d-%d)\n", info->var.xres,
                info->var.yres, info->var.bits_per_pixel);
 
+       /*
+        * Disable VCO prior to timing register change.
+        */
+       OUTREG(DPLL_A, INREG(DPLL_A) & ~DPLL_VCO_ENABLE);
+
        intelfb_blank(FB_BLANK_POWERDOWN, info);
 
        if (ACCEL(dinfo, info))
index b91251d..3b43781 100644 (file)
@@ -37,22 +37,24 @@ extra-y += $(call logo-cfiles,_clut224,ppm)
 # Gray 256
 extra-y += $(call logo-cfiles,_gray256,pgm)
 
+pnmtologo := scripts/pnmtologo
+
 # Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
 quiet_cmd_logo = LOGO    $@
-       cmd_logo = scripts/pnmtologo \
+       cmd_logo = $(pnmtologo) \
                        -t $(patsubst $*_%,%,$(notdir $(basename $<))) \
                        -n $(notdir $(basename $<)) -o $@ $<
 
-$(obj)/%_mono.c: $(src)/%_mono.pbm FORCE
+$(obj)/%_mono.c: $(src)/%_mono.pbm $(pnmtologo) FORCE
        $(call if_changed,logo)
 
-$(obj)/%_vga16.c: $(src)/%_vga16.ppm FORCE
+$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(pnmtologo) FORCE
        $(call if_changed,logo)
 
-$(obj)/%_clut224.c: $(src)/%_clut224.ppm FORCE
+$(obj)/%_clut224.c: $(src)/%_clut224.ppm $(pnmtologo) FORCE
        $(call if_changed,logo)
 
-$(obj)/%_gray256.c: $(src)/%_gray256.pgm FORCE
+$(obj)/%_gray256.c: $(src)/%_gray256.pgm $(pnmtologo) FORCE
        $(call if_changed,logo)
 
 # Files generated that shall be removed upon make clean
index 2e85a2b..ea7a8cc 100644 (file)
 #include <asm/bootinfo.h>
 #endif
 
-extern const struct linux_logo logo_linux_mono;
-extern const struct linux_logo logo_linux_vga16;
-extern const struct linux_logo logo_linux_clut224;
-extern const struct linux_logo logo_blackfin_vga16;
-extern const struct linux_logo logo_blackfin_clut224;
-extern const struct linux_logo logo_dec_clut224;
-extern const struct linux_logo logo_mac_clut224;
-extern const struct linux_logo logo_parisc_clut224;
-extern const struct linux_logo logo_sgi_clut224;
-extern const struct linux_logo logo_sun_clut224;
-extern const struct linux_logo logo_superh_mono;
-extern const struct linux_logo logo_superh_vga16;
-extern const struct linux_logo logo_superh_clut224;
-extern const struct linux_logo logo_m32r_clut224;
-
 static int nologo;
 module_param(nologo, bool, 0);
 MODULE_PARM_DESC(nologo, "Disables startup logo");
index fb64234..a28e3cf 100644 (file)
@@ -19,7 +19,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
-#if defined(CONFIG_PPC_OF)
+#if defined(CONFIG_OF)
 #include <linux/of_platform.h>
 #endif
 #include "mb862xxfb.h"
index 1618624..34e4e79 100644 (file)
@@ -264,6 +264,14 @@ static const struct fb_videomode modedb[] = {
        /* 1280x800, 60 Hz, 47.403 kHz hsync, WXGA 16:10 aspect ratio */
        NULL, 60, 1280, 800, 12048, 200, 64, 24, 1, 136, 3,
        0, FB_VMODE_NONINTERLACED
+    }, {
+       /* 720x576i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
+       NULL, 50, 720, 576, 74074, 64, 16, 39, 5, 64, 5,
+       0, FB_VMODE_INTERLACED
+    }, {
+       /* 800x520i @ 50 Hz, 15.625 kHz hsync (PAL RGB) */
+       NULL, 50, 800, 520, 58823, 144, 64, 72, 28, 80, 5,
+       0, FB_VMODE_INTERLACED
     },
 };
 
index e1d9eeb..4d8c54c 100644 (file)
@@ -378,7 +378,6 @@ static void __init offb_init_fb(const char *name, const char *full_name,
        struct fb_fix_screeninfo *fix;
        struct fb_var_screeninfo *var;
        struct fb_info *info;
-       int size;
 
        if (!request_mem_region(res_start, res_size, "offb"))
                return;
@@ -393,15 +392,12 @@ static void __init offb_init_fb(const char *name, const char *full_name,
                return;
        }
 
-       size = sizeof(struct fb_info) + sizeof(u32) * 16;
-
-       info = kmalloc(size, GFP_ATOMIC);
+       info = framebuffer_alloc(sizeof(u32) * 16, NULL);
        
        if (info == 0) {
                release_mem_region(res_start, res_size);
                return;
        }
-       memset(info, 0, size);
 
        fix = &info->fix;
        var = &info->var;
@@ -497,7 +493,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
                iounmap(par->cmap_adr);
                par->cmap_adr = NULL;
                iounmap(info->screen_base);
-               kfree(info);
+               framebuffer_release(info);
                release_mem_region(res_start, res_size);
                return;
        }
index c6dd924..36436ee 100644 (file)
@@ -1748,7 +1748,7 @@ static void __devexit pm2fb_remove(struct pci_dev *pdev)
        pci_set_drvdata(pdev, NULL);
        fb_dealloc_cmap(&info->cmap);
        kfree(info->pixmap.addr);
-       kfree(info);
+       framebuffer_release(info);
 }
 
 static struct pci_device_id pm2fb_id_table[] = {
index 0726aec..0deb0a8 100644 (file)
@@ -2,6 +2,7 @@
  *
  * (c) 2004 Simtec Electronics
  * (c) 2005 Thibaut VARENE <varenet@parisc-linux.org>
+ * (c) 2009 Kristoffer Ericson <kristoffer.ericson@gmail.com>
  *
  * Driver for Epson S1D13xxx series framebuffer chips
  *
  *  linux/drivers/video/epson1355fb.c
  *  linux/drivers/video/epson/s1d13xxxfb.c (2.4 driver by Epson)
  *
- * Note, currently only tested on S1D13806 with 16bit CRT.
- * As such, this driver might still contain some hardcoded bits relating to
- * S1D13806.
- * Making it work on other S1D13XXX chips should merely be a matter of adding
- * a few switch()s, some missing glue here and there maybe, and split header
- * files.
- *
  * TODO: - handle dual screen display (CRT and LCD at the same time).
  *      - check_var(), mode change, etc.
- *      - PM untested.
- *      - Accelerated interfaces.
- *      - Probably not SMP safe :)
+ *      - probably not SMP safe :)
+ *       - support all bitblt operations on all cards
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License. See the file COPYING in the main directory of this archive for
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
-
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/mm.h>
 #include <linux/mman.h>
 #include <linux/fb.h>
+#include <linux/spinlock_types.h>
+#include <linux/spinlock.h>
 
 #include <asm/io.h>
 
 #include <video/s1d13xxxfb.h>
 
-#define PFX "s1d13xxxfb: "
+#define PFX    "s1d13xxxfb: "
+#define BLIT   "s1d13xxxfb_bitblt: "
 
+/*
+ * set this to enable debugging on general functions
+ */
 #if 0
 #define dbg(fmt, args...) do { printk(KERN_INFO fmt, ## args); } while(0)
 #else
 #endif
 
 /*
- * List of card production ids
+ * set this to enable debugging on 2D acceleration
+ */
+#if 0
+#define dbg_blit(fmt, args...) do { printk(KERN_INFO BLIT fmt, ## args); } while (0)
+#else
+#define dbg_blit(fmt, args...) do { } while (0)
+#endif
+
+/*
+ * we make sure only one bitblt operation is running
+ */
+static DEFINE_SPINLOCK(s1d13xxxfb_bitblt_lock);
+
+/*
+ * list of card production ids
  */
 static const int s1d13xxxfb_prod_ids[] = {
        S1D13505_PROD_ID,
@@ -69,7 +81,7 @@ static const char *s1d13xxxfb_prod_names[] = {
 };
 
 /*
- * Here we define the default struct fb_fix_screeninfo
+ * here we define the default struct fb_fix_screeninfo
  */
 static struct fb_fix_screeninfo __devinitdata s1d13xxxfb_fix = {
        .id             = S1D_FBID,
@@ -145,8 +157,10 @@ crt_enable(struct s1d13xxxfb_par *par, int enable)
        s1d13xxxfb_writereg(par, S1DREG_COM_DISP_MODE, mode);
 }
 
-/* framebuffer control routines */
 
+/*************************************************************
+ framebuffer control functions
+ *************************************************************/
 static inline void
 s1d13xxxfb_setup_pseudocolour(struct fb_info *info)
 {
@@ -242,13 +256,13 @@ s1d13xxxfb_set_par(struct fb_info *info)
 }
 
 /**
- *     s1d13xxxfb_setcolreg - sets a color register.
- *      @regno: Which register in the CLUT we are programming
- *      @red: The red value which can be up to 16 bits wide
+ *     s1d13xxxfb_setcolreg - sets a color register.
+ *     @regno: Which register in the CLUT we are programming
+ *     @red: The red value which can be up to 16 bits wide
  *     @green: The green value which can be up to 16 bits wide
  *     @blue:  The blue value which can be up to 16 bits wide.
  *     @transp: If supported the alpha value which can be up to 16 bits wide.
- *      @info: frame buffer info structure
+ *     @info: frame buffer info structure
  *
  *     Returns negative errno on error, or zero on success.
  */
@@ -351,15 +365,15 @@ s1d13xxxfb_blank(int blank_mode, struct fb_info *info)
 }
 
 /**
- *      s1d13xxxfb_pan_display - Pans the display.
- *      @var: frame buffer variable screen structure
- *      @info: frame buffer structure that represents a single frame buffer
+ *     s1d13xxxfb_pan_display - Pans the display.
+ *     @var: frame buffer variable screen structure
+ *     @info: frame buffer structure that represents a single frame buffer
  *
  *     Pan (or wrap, depending on the `vmode' field) the display using the
- *     `yoffset' field of the `var' structure (`xoffset'  not yet supported).
- *     If the values don't fit, return -EINVAL.
+ *     `yoffset' field of the `var' structure (`xoffset'  not yet supported).
+ *     If the values don't fit, return -EINVAL.
  *
- *      Returns negative errno on error, or zero on success.
+ *     Returns negative errno on error, or zero on success.
  */
 static int
 s1d13xxxfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
@@ -390,8 +404,259 @@ s1d13xxxfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
        return 0;
 }
 
-/* framebuffer information structures */
+/************************************************************
+ functions to handle bitblt acceleration
+ ************************************************************/
+
+/**
+ *     bltbit_wait_bitset - waits for change in register value
+ *     @info : framebuffer structure
+ *     @bit  : value expected in register
+ *     @timeout : ...
+ *
+ *     waits until value changes INTO bit
+ */
+static u8
+bltbit_wait_bitset(struct fb_info *info, u8 bit, int timeout)
+{
+       while (!(s1d13xxxfb_readreg(info->par, S1DREG_BBLT_CTL0) & bit)) {
+               udelay(10);
+               if (!--timeout) {
+                       dbg_blit("wait_bitset timeout\n");
+                       break;
+               }
+       }
+
+       return timeout;
+}
+
+/**
+ *     bltbit_wait_bitclear - waits for change in register value
+ *     @info : frambuffer structure
+ *     @bit  : value currently in register
+ *     @timeout : ...
+ *
+ *     waits until value changes FROM bit
+ *
+ */
+static u8
+bltbit_wait_bitclear(struct fb_info *info, u8 bit, int timeout)
+{
+       while (s1d13xxxfb_readreg(info->par, S1DREG_BBLT_CTL0) & bit) {
+               udelay(10);
+               if (!--timeout) {
+                       dbg_blit("wait_bitclear timeout\n");
+                       break;
+               }
+       }
+
+       return timeout;
+}
+
+/**
+ *     bltbit_fifo_status - checks the current status of the fifo
+ *     @info : framebuffer structure
+ *
+ *     returns number of free words in buffer
+ */
+static u8
+bltbit_fifo_status(struct fb_info *info)
+{
+       u8 status;
 
+       status = s1d13xxxfb_readreg(info->par, S1DREG_BBLT_CTL0);
+
+       /* its empty so room for 16 words */
+       if (status & BBLT_FIFO_EMPTY)
+               return 16;
+
+       /* its full so we dont want to add */
+       if (status & BBLT_FIFO_FULL)
+               return 0;
+
+       /* its atleast half full but we can add one atleast */
+       if (status & BBLT_FIFO_NOT_FULL)
+               return 1;
+
+       return 0;
+}
+
+/*
+ *     s1d13xxxfb_bitblt_copyarea - accelerated copyarea function
+ *     @info : framebuffer structure
+ *     @area : fb_copyarea structure
+ *
+ *     supports (atleast) S1D13506
+ *
+ */
+static void
+s1d13xxxfb_bitblt_copyarea(struct fb_info *info, const struct fb_copyarea *area)
+{
+       u32 dst, src;
+       u32 stride;
+       u16 reverse = 0;
+       u16 sx = area->sx, sy = area->sy;
+       u16 dx = area->dx, dy = area->dy;
+       u16 width = area->width, height = area->height;
+       u16 bpp;
+
+       spin_lock(&s1d13xxxfb_bitblt_lock);
+
+       /* bytes per xres line */
+       bpp = (info->var.bits_per_pixel >> 3);
+       stride = bpp * info->var.xres;
+
+       /* reverse, calculate the last pixel in rectangle */
+       if ((dy > sy) || ((dy == sy) && (dx >= sx))) {
+               dst = (((dy + height - 1) * stride) + (bpp * (dx + width - 1)));
+               src = (((sy + height - 1) * stride) + (bpp * (sx + width - 1)));
+               reverse = 1;
+       /* not reverse, calculate the first pixel in rectangle */
+       } else { /* (y * xres) + (bpp * x) */
+               dst = (dy * stride) + (bpp * dx);
+               src = (sy * stride) + (bpp * sx);
+       }
+
+       /* set source adress */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_SRC_START0, (src & 0xff));
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_SRC_START1, (src >> 8) & 0x00ff);
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_SRC_START2, (src >> 16) & 0x00ff);
+
+       /* set destination adress */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_DST_START0, (dst & 0xff));
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_DST_START1, (dst >> 8) & 0x00ff);
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_DST_START2, (dst >> 16) & 0x00ff);
+
+       /* program height and width */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_WIDTH0, (width & 0xff) - 1);
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_WIDTH1, (width >> 8));
+
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_HEIGHT0, (height & 0xff) - 1);
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_HEIGHT1, (height >> 8));
+
+       /* negative direction ROP */
+       if (reverse == 1) {
+               dbg_blit("(copyarea) negative rop\n");
+               s1d13xxxfb_writereg(info->par, S1DREG_BBLT_OP, 0x03);
+       } else /* positive direction ROP */ {
+               s1d13xxxfb_writereg(info->par, S1DREG_BBLT_OP, 0x02);
+               dbg_blit("(copyarea) positive rop\n");
+       }
+
+       /* set for rectangel mode and not linear */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_CTL0, 0x0);
+
+       /* setup the bpp 1 = 16bpp, 0 = 8bpp*/
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_CTL1, (bpp >> 1));
+
+       /* set words per xres */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_MEM_OFF0, (stride >> 1) & 0xff);
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_MEM_OFF1, (stride >> 9));
+
+       dbg_blit("(copyarea) dx=%d, dy=%d\n", dx, dy);
+       dbg_blit("(copyarea) sx=%d, sy=%d\n", sx, sy);
+       dbg_blit("(copyarea) width=%d, height=%d\n", width - 1, height - 1);
+       dbg_blit("(copyarea) stride=%d\n", stride);
+       dbg_blit("(copyarea) bpp=%d=0x0%d, mem_offset1=%d, mem_offset2=%d\n", bpp, (bpp >> 1),
+               (stride >> 1) & 0xff, stride >> 9);
+
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_CC_EXP, 0x0c);
+
+       /* initialize the engine */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_CTL0, 0x80);
+
+       /* wait to complete */
+       bltbit_wait_bitclear(info, 0x80, 8000);
+
+       spin_unlock(&s1d13xxxfb_bitblt_lock);
+}
+
+/**
+ *
+ *     s1d13xxxfb_bitblt_solidfill - accelerated solidfill function
+ *     @info : framebuffer structure
+ *     @rect : fb_fillrect structure
+ *
+ *     supports (atleast 13506)
+ *
+ **/
+static void
+s1d13xxxfb_bitblt_solidfill(struct fb_info *info, const struct fb_fillrect *rect)
+{
+       u32 screen_stride, dest;
+       u32 fg;
+       u16 bpp = (info->var.bits_per_pixel >> 3);
+
+       /* grab spinlock */
+       spin_lock(&s1d13xxxfb_bitblt_lock);
+
+       /* bytes per x width */
+       screen_stride = (bpp * info->var.xres);
+
+       /* bytes to starting point */
+       dest = ((rect->dy * screen_stride) + (bpp * rect->dx));
+
+       dbg_blit("(solidfill) dx=%d, dy=%d, stride=%d, dest=%d\n"
+                "(solidfill) : rect_width=%d, rect_height=%d\n",
+                               rect->dx, rect->dy, screen_stride, dest,
+                               rect->width - 1, rect->height - 1);
+
+       dbg_blit("(solidfill) : xres=%d, yres=%d, bpp=%d\n",
+                               info->var.xres, info->var.yres,
+                               info->var.bits_per_pixel);
+       dbg_blit("(solidfill) : rop=%d\n", rect->rop);
+
+       /* We split the destination into the three registers */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_DST_START0, (dest & 0x00ff));
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_DST_START1, ((dest >> 8) & 0x00ff));
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_DST_START2, ((dest >> 16) & 0x00ff));
+
+       /* give information regarding rectangel width */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_WIDTH0, ((rect->width) & 0x00ff) - 1);
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_WIDTH1, (rect->width >> 8));
+
+       /* give information regarding rectangel height */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_HEIGHT0, ((rect->height) & 0x00ff) - 1);
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_HEIGHT1, (rect->height >> 8));
+
+       if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
+               info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
+               fg = ((u32 *)info->pseudo_palette)[rect->color];
+               dbg_blit("(solidfill) truecolor/directcolor\n");
+               dbg_blit("(solidfill) pseudo_palette[%d] = %d\n", rect->color, fg);
+       } else {
+               fg = rect->color;
+               dbg_blit("(solidfill) color = %d\n", rect->color);
+       }
+
+       /* set foreground color */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_FGC0, (fg & 0xff));
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_FGC1, (fg >> 8) & 0xff);
+
+       /* set rectangual region of memory (rectangle and not linear) */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_CTL0, 0x0);
+
+       /* set operation mode SOLID_FILL */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_OP, BBLT_SOLID_FILL);
+
+       /* set bits per pixel (1 = 16bpp, 0 = 8bpp) */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_CTL1, (info->var.bits_per_pixel >> 4));
+
+       /* set the memory offset for the bblt in word sizes */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_MEM_OFF0, (screen_stride >> 1) & 0x00ff);
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_MEM_OFF1, (screen_stride >> 9));
+
+       /* and away we go.... */
+       s1d13xxxfb_writereg(info->par, S1DREG_BBLT_CTL0, 0x80);
+
+       /* wait until its done */
+       bltbit_wait_bitclear(info, 0x80, 8000);
+
+       /* let others play */
+       spin_unlock(&s1d13xxxfb_bitblt_lock);
+}
+
+/* framebuffer information structures */
 static struct fb_ops s1d13xxxfb_fbops = {
        .owner          = THIS_MODULE,
        .fb_set_par     = s1d13xxxfb_set_par,
@@ -400,7 +665,7 @@ static struct fb_ops s1d13xxxfb_fbops = {
 
        .fb_pan_display = s1d13xxxfb_pan_display,
 
-       /* to be replaced by any acceleration we can */
+       /* gets replaced at chip detection time */
        .fb_fillrect    = cfb_fillrect,
        .fb_copyarea    = cfb_copyarea,
        .fb_imageblit   = cfb_imageblit,
@@ -412,9 +677,9 @@ static int s1d13xxxfb_width_tab[2][4] __devinitdata = {
 };
 
 /**
- *      s1d13xxxfb_fetch_hw_state - Configure the framebuffer according to
+ *     s1d13xxxfb_fetch_hw_state - Configure the framebuffer according to
  *     hardware setup.
- *      @info: frame buffer structure
+ *     @info: frame buffer structure
  *
  *     We setup the framebuffer structures according to the current
  *     hardware setup. On some machines, the BIOS will have filled
@@ -569,7 +834,6 @@ s1d13xxxfb_probe(struct platform_device *pdev)
        if (pdata && pdata->platform_init_video)
                pdata->platform_init_video();
 
-
        if (pdev->num_resources != 2) {
                dev_err(&pdev->dev, "invalid num_resources: %i\n",
                       pdev->num_resources);
@@ -655,16 +919,27 @@ s1d13xxxfb_probe(struct platform_device *pdev)
 
        info->fix = s1d13xxxfb_fix;
        info->fix.mmio_start = pdev->resource[1].start;
-       info->fix.mmio_len = pdev->resource[1].end - pdev->resource[1].start +1;
+       info->fix.mmio_len = pdev->resource[1].end - pdev->resource[1].start + 1;
        info->fix.smem_start = pdev->resource[0].start;
-       info->fix.smem_len = pdev->resource[0].end - pdev->resource[0].start +1;
+       info->fix.smem_len = pdev->resource[0].end - pdev->resource[0].start + 1;
 
        printk(KERN_INFO PFX "regs mapped at 0x%p, fb %d KiB mapped at 0x%p\n",
               default_par->regs, info->fix.smem_len / 1024, info->screen_base);
 
        info->par = default_par;
-       info->fbops = &s1d13xxxfb_fbops;
        info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN;
+       info->fbops = &s1d13xxxfb_fbops;
+
+       switch(prod_id) {
+       case S1D13506_PROD_ID:  /* activate acceleration */
+               s1d13xxxfb_fbops.fb_fillrect = s1d13xxxfb_bitblt_solidfill;
+               s1d13xxxfb_fbops.fb_copyarea = s1d13xxxfb_bitblt_copyarea;
+               info->flags = FBINFO_DEFAULT | FBINFO_HWACCEL_YPAN |
+                       FBINFO_HWACCEL_FILLRECT | FBINFO_HWACCEL_COPYAREA;
+               break;
+       default:
+               break;
+       }
 
        /* perform "manual" chip initialization, if needed */
        if (pdata && pdata->initregs)
index d3a568e..43680e5 100644 (file)
@@ -358,9 +358,16 @@ static int s3c_fb_set_par(struct fb_info *info)
        writel(data, regs + VIDOSD_B(win_no));
 
        data = var->xres * var->yres;
+
+       u32 osdc_data = 0;
+
+       osdc_data = VIDISD14C_ALPHA1_R(0xf) |
+               VIDISD14C_ALPHA1_G(0xf) |
+               VIDISD14C_ALPHA1_B(0xf);
+
        if (s3c_fb_has_osd_d(win_no)) {
                writel(data, regs + VIDOSD_D(win_no));
-               writel(0, regs + VIDOSD_C(win_no));
+               writel(osdc_data, regs + VIDOSD_C(win_no));
        } else
                writel(data, regs + VIDOSD_C(win_no));
 
@@ -409,8 +416,12 @@ static int s3c_fb_set_par(struct fb_info *info)
                                data |= WINCON1_BPPMODE_19BPP_A1666;
                        else
                                data |= WINCON1_BPPMODE_18BPP_666;
-               } else if (var->transp.length != 0)
-                       data |= WINCON1_BPPMODE_25BPP_A1888;
+               } else if (var->transp.length == 1)
+                       data |= WINCON1_BPPMODE_25BPP_A1888
+                               | WINCON1_BLD_PIX;
+               else if (var->transp.length == 4)
+                       data |= WINCON1_BPPMODE_28BPP_A4888
+                               | WINCON1_BLD_PIX | WINCON1_ALPHA_SEL;
                else
                        data |= WINCON0_BPPMODE_24BPP_888;
 
@@ -418,6 +429,20 @@ static int s3c_fb_set_par(struct fb_info *info)
                break;
        }
 
+       /* It has no color key control register for window0 */
+       if (win_no > 0) {
+               u32 keycon0_data = 0, keycon1_data = 0;
+
+               keycon0_data = ~(WxKEYCON0_KEYBL_EN |
+                               WxKEYCON0_KEYEN_F |
+                               WxKEYCON0_DIRCON) | WxKEYCON0_COMPKEY(0);
+
+               keycon1_data = WxKEYCON1_COLVAL(0xffffff);
+
+               writel(keycon0_data, regs + WxKEYCONy(win_no-1, 0));
+               writel(keycon1_data, regs + WxKEYCONy(win_no-1, 1));
+       }
+
        writel(data, regs + WINCON(win_no));
        writel(0x0, regs + WINxMAP(win_no));
 
@@ -700,9 +725,12 @@ static void s3c_fb_free_memory(struct s3c_fb *sfb, struct s3c_fb_win *win)
  */
 static void s3c_fb_release_win(struct s3c_fb *sfb, struct s3c_fb_win *win)
 {
-       fb_dealloc_cmap(&win->fbinfo->cmap);
-       unregister_framebuffer(win->fbinfo);
-       s3c_fb_free_memory(sfb, win);
+       if (win->fbinfo) {
+               unregister_framebuffer(win->fbinfo);
+               fb_dealloc_cmap(&win->fbinfo->cmap);
+               s3c_fb_free_memory(sfb, win);
+               framebuffer_release(win->fbinfo);
+       }
 }
 
 /**
@@ -753,7 +781,7 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
        ret = s3c_fb_alloc_memory(sfb, win);
        if (ret) {
                dev_err(sfb->dev, "failed to allocate display memory\n");
-               goto err_framebuffer;
+               return ret;
        }
 
        /* setup the r/b/g positions for the window's palette */
@@ -776,7 +804,7 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
        ret = s3c_fb_check_var(&fbinfo->var, fbinfo);
        if (ret < 0) {
                dev_err(sfb->dev, "check_var failed on initial video params\n");
-               goto err_alloc_mem;
+               return ret;
        }
 
        /* create initial colour map */
@@ -796,20 +824,13 @@ static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
        ret = register_framebuffer(fbinfo);
        if (ret < 0) {
                dev_err(sfb->dev, "failed to register framebuffer\n");
-               goto err_alloc_mem;
+               return ret;
        }
 
        *res = win;
        dev_info(sfb->dev, "window %d: fb %s\n", win_no, fbinfo->fix.id);
 
        return 0;
-
-err_alloc_mem:
-       s3c_fb_free_memory(sfb, win);
-
-err_framebuffer:
-       unregister_framebuffer(fbinfo);
-       return ret;
 }
 
 /**
index b0b4513..7da0027 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
+#include <linux/cpufreq.h>
 
 #include <asm/io.h>
 #include <asm/div64.h>
@@ -89,7 +90,7 @@ static void s3c2410fb_set_lcdaddr(struct fb_info *info)
 static unsigned int s3c2410fb_calc_pixclk(struct s3c2410fb_info *fbi,
                                          unsigned long pixclk)
 {
-       unsigned long clk = clk_get_rate(fbi->clk);
+       unsigned long clk = fbi->clk_rate;
        unsigned long long div;
 
        /* pixclk is in picoseconds, our clock is in Hz
@@ -758,6 +759,57 @@ static irqreturn_t s3c2410fb_irq(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
+#ifdef CONFIG_CPU_FREQ
+
+static int s3c2410fb_cpufreq_transition(struct notifier_block *nb,
+                                       unsigned long val, void *data)
+{
+       struct cpufreq_freqs *freqs = data;
+       struct s3c2410fb_info *info;
+       struct fb_info *fbinfo;
+       long delta_f;
+
+       info = container_of(nb, struct s3c2410fb_info, freq_transition);
+       fbinfo = platform_get_drvdata(to_platform_device(info->dev));
+
+       /* work out change, <0 for speed-up */
+       delta_f = info->clk_rate - clk_get_rate(info->clk);
+
+       if ((val == CPUFREQ_POSTCHANGE && delta_f > 0) ||
+           (val == CPUFREQ_PRECHANGE && delta_f < 0)) {
+               info->clk_rate = clk_get_rate(info->clk);
+               s3c2410fb_activate_var(fbinfo);
+       }
+
+       return 0;
+}
+
+static inline int s3c2410fb_cpufreq_register(struct s3c2410fb_info *info)
+{
+       info->freq_transition.notifier_call = s3c2410fb_cpufreq_transition;
+
+       return cpufreq_register_notifier(&info->freq_transition,
+                                        CPUFREQ_TRANSITION_NOTIFIER);
+}
+
+static inline void s3c2410fb_cpufreq_deregister(struct s3c2410fb_info *info)
+{
+       cpufreq_unregister_notifier(&info->freq_transition,
+                                   CPUFREQ_TRANSITION_NOTIFIER);
+}
+
+#else
+static inline int s3c2410fb_cpufreq_register(struct s3c2410fb_info *info)
+{
+       return 0;
+}
+
+static inline void s3c2410fb_cpufreq_deregister(struct s3c2410fb_info *info)
+{
+}
+#endif
+
+
 static char driver_name[] = "s3c2410fb";
 
 static int __init s3c24xxfb_probe(struct platform_device *pdev,
@@ -875,6 +927,8 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev,
 
        msleep(1);
 
+       info->clk_rate = clk_get_rate(info->clk);
+
        /* find maximum required memory size for display */
        for (i = 0; i < mach_info->num_displays; i++) {
                unsigned long smem_len = mach_info->displays[i].xres;
@@ -904,11 +958,17 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev,
 
        s3c2410fb_check_var(&fbinfo->var, fbinfo);
 
+       ret = s3c2410fb_cpufreq_register(info);
+       if (ret < 0) {
+               dev_err(&pdev->dev, "Failed to register cpufreq\n");
+               goto free_video_memory;
+       }
+
        ret = register_framebuffer(fbinfo);
        if (ret < 0) {
                printk(KERN_ERR "Failed to register framebuffer device: %d\n",
                        ret);
-               goto free_video_memory;
+               goto free_cpufreq;
        }
 
        /* create device files */
@@ -922,6 +982,8 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev,
 
        return 0;
 
+ free_cpufreq:
+       s3c2410fb_cpufreq_deregister(info);
 free_video_memory:
        s3c2410fb_unmap_video_memory(fbinfo);
 release_clock:
@@ -961,6 +1023,7 @@ static int s3c2410fb_remove(struct platform_device *pdev)
        int irq;
 
        unregister_framebuffer(fbinfo);
+       s3c2410fb_cpufreq_deregister(info);
 
        s3c2410fb_lcd_enable(info, 0);
        msleep(1);
index 9a6ba3e..47a17bd 100644 (file)
@@ -29,8 +29,13 @@ struct s3c2410fb_info {
        enum s3c_drv_type       drv_type;
        struct s3c2410fb_hw     regs;
 
+       unsigned long           clk_rate;
        unsigned int            palette_ready;
 
+#ifdef CONFIG_CPU_FREQ
+       struct notifier_block   freq_transition;
+#endif
+
        /* keep these registers in case we need to re-write palette */
        u32                     palette_buffer[256];
        u32                     pseudo_pal[16];
index 7e17ee9..7072d19 100644 (file)
@@ -5928,7 +5928,7 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                if(pci_enable_device(pdev)) {
                        if(ivideo->nbridge) pci_dev_put(ivideo->nbridge);
                        pci_set_drvdata(pdev, NULL);
-                       kfree(sis_fb_info);
+                       framebuffer_release(sis_fb_info);
                        return -EIO;
                }
        }
@@ -6134,7 +6134,7 @@ error_3:  vfree(ivideo->bios_abase);
                pci_set_drvdata(pdev, NULL);
                if(!ivideo->sisvga_enabled)
                        pci_disable_device(pdev);
-               kfree(sis_fb_info);
+               framebuffer_release(sis_fb_info);
                return ret;
        }
 
index eabaad7..eec9dcb 100644 (file)
@@ -1380,7 +1380,7 @@ stifb_cleanup(void)
                                if (info->screen_base)
                                        iounmap(info->screen_base);
                        fb_dealloc_cmap(&info->cmap);
-                       kfree(info); 
+                       framebuffer_release(info);
                }
                sti->info = NULL;
        }
index 643afbf..45b8835 100644 (file)
@@ -116,17 +116,16 @@ struct tcx_par {
        u32                     flags;
 #define TCX_FLAG_BLANKED       0x00000001
 
-       unsigned long           physbase;
        unsigned long           which_io;
-       unsigned long           fbsize;
 
        struct sbus_mmap_map    mmap_map[TCX_MMAP_ENTRIES];
        int                     lowdepth;
 };
 
 /* Reset control plane so that WID is 8-bit plane. */
-static void __tcx_set_control_plane(struct tcx_par *par)
+static void __tcx_set_control_plane(struct fb_info *info)
 {
+       struct tcx_par *par = info->par;
        u32 __iomem *p, *pend;
 
        if (par->lowdepth)
@@ -135,7 +134,7 @@ static void __tcx_set_control_plane(struct tcx_par *par)
        p = par->cplane;
        if (p == NULL)
                return;
-       for (pend = p + par->fbsize; p < pend; p++) {
+       for (pend = p + info->fix.smem_len; p < pend; p++) {
                u32 tmp = sbus_readl(p);
 
                tmp &= 0xffffff;
@@ -149,7 +148,7 @@ static void tcx_reset(struct fb_info *info)
        unsigned long flags;
 
        spin_lock_irqsave(&par->lock, flags);
-       __tcx_set_control_plane(par);
+       __tcx_set_control_plane(info);
        spin_unlock_irqrestore(&par->lock, flags);
 }
 
@@ -304,7 +303,7 @@ static int tcx_mmap(struct fb_info *info, struct vm_area_struct *vma)
        struct tcx_par *par = (struct tcx_par *)info->par;
 
        return sbusfb_mmap_helper(par->mmap_map,
-                                 par->physbase, par->fbsize,
+                                 info->fix.smem_start, info->fix.smem_len,
                                  par->which_io, vma);
 }
 
@@ -316,7 +315,7 @@ static int tcx_ioctl(struct fb_info *info, unsigned int cmd,
        return sbusfb_ioctl_helper(cmd, arg, info,
                                   FBTYPE_TCXCOLOR,
                                   (par->lowdepth ? 8 : 24),
-                                  par->fbsize);
+                                  info->fix.smem_len);
 }
 
 /*
@@ -358,10 +357,10 @@ static void tcx_unmap_regs(struct of_device *op, struct fb_info *info,
                           par->bt, sizeof(struct bt_regs));
        if (par->cplane)
                of_iounmap(&op->resource[4],
-                          par->cplane, par->fbsize * sizeof(u32));
+                          par->cplane, info->fix.smem_len * sizeof(u32));
        if (info->screen_base)
                of_iounmap(&op->resource[0],
-                          info->screen_base, par->fbsize);
+                          info->screen_base, info->fix.smem_len);
 }
 
 static int __devinit tcx_probe(struct of_device *op,
@@ -391,7 +390,7 @@ static int __devinit tcx_probe(struct of_device *op,
 
        linebytes = of_getintprop_default(dp, "linebytes",
                                          info->var.xres);
-       par->fbsize = PAGE_ALIGN(linebytes * info->var.yres);
+       info->fix.smem_len = PAGE_ALIGN(linebytes * info->var.yres);
 
        par->tec = of_ioremap(&op->resource[7], 0,
                                  sizeof(struct tcx_tec), "tcx tec");
@@ -400,7 +399,7 @@ static int __devinit tcx_probe(struct of_device *op,
        par->bt = of_ioremap(&op->resource[8], 0,
                                 sizeof(struct bt_regs), "tcx dac");
        info->screen_base = of_ioremap(&op->resource[0], 0,
-                                          par->fbsize, "tcx ram");
+                                          info->fix.smem_len, "tcx ram");
        if (!par->tec || !par->thc ||
            !par->bt || !info->screen_base)
                goto out_unmap_regs;