Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
Linus Torvalds [Thu, 7 Apr 2011 18:14:49 +0000 (11:14 -0700)]
* 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6:
  Fix common misspellings

283 files changed:
Documentation/00-INDEX
Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
Documentation/ABI/testing/sysfs-platform-asus-laptop
Documentation/cgroups/cgroups.txt
Documentation/devicetree/booting-without-of.txt
Documentation/dvb/udev.txt
Documentation/edac.txt
Documentation/kernel-parameters.txt
Documentation/kmemleak.txt
Documentation/laptops/asus-laptop.txt
Documentation/leds/00-INDEX [new file with mode: 0644]
Documentation/leds/leds-class.txt [moved from Documentation/leds-class.txt with 99% similarity]
Documentation/leds/leds-lp3944.txt [moved from Documentation/leds-lp3944.txt with 100% similarity]
Documentation/networking/batman-adv.txt
Documentation/s390/Debugging390.txt
Documentation/scheduler/sched-domains.txt
Documentation/scsi/sym53c8xx_2.txt
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/sound/oss/AudioExcelDSP16
Documentation/sound/oss/README.ymfsb
Documentation/video4linux/bttv/Insmod-options
Documentation/video4linux/bttv/Sound-FAQ
Documentation/video4linux/et61x251.txt
Documentation/video4linux/sn9c102.txt
Documentation/video4linux/w9968cf.txt
Documentation/video4linux/zc0301.txt
Makefile
arch/ia64/sn/kernel/irq.c
arch/ia64/sn/kernel/sn2/sn_proc_fs.c
arch/microblaze/include/asm/unistd.h
arch/microblaze/kernel/Makefile
arch/microblaze/kernel/ftrace.c
arch/microblaze/kernel/intc.c
arch/microblaze/kernel/syscall_table.S
arch/microblaze/lib/Makefile
arch/powerpc/boot/dts/p1020rdb.dts
arch/powerpc/boot/dts/p2020rdb.dts
arch/powerpc/boot/dts/p2020rdb_camp_core0.dts
arch/powerpc/boot/dts/p2020rdb_camp_core1.dts
arch/powerpc/include/asm/machdep.h
arch/powerpc/include/asm/smp.h
arch/powerpc/kernel/crash.c
arch/powerpc/kernel/head_32.S
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/idle_power4.S
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/paca.c
arch/powerpc/kernel/setup-common.c
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/time.c
arch/powerpc/mm/tlb_low_64e.S
arch/powerpc/platforms/Kconfig
arch/powerpc/platforms/powermac/pmac.h
arch/powerpc/platforms/powermac/setup.c
arch/powerpc/platforms/powermac/smp.c
arch/powerpc/platforms/pseries/offline_states.h
arch/powerpc/platforms/pseries/setup.c
arch/powerpc/platforms/pseries/smp.c
arch/sparc/include/asm/unistd.h
arch/sparc/kernel/auxio_64.c
arch/sparc/kernel/central.c
arch/sparc/kernel/ds.c
arch/sparc/kernel/entry.S
arch/sparc/kernel/mdesc.c
arch/sparc/kernel/pci_fire.c
arch/sparc/kernel/pci_psycho.c
arch/sparc/kernel/pci_sabre.c
arch/sparc/kernel/pci_schizo.c
arch/sparc/kernel/pci_sun4v.c
arch/sparc/kernel/power.c
arch/sparc/kernel/systbls_32.S
arch/sparc/kernel/systbls_64.S
arch/sparc/kernel/time_64.c
arch/unicore32/Makefile
arch/unicore32/include/asm/futex.h [deleted file]
arch/unicore32/include/mach/PKUnity.h
arch/unicore32/include/mach/memory.h
arch/unicore32/kernel/puv3-core.c
arch/unicore32/kernel/rtc.c
arch/unicore32/kernel/setup.c
arch/unicore32/kernel/traps.c
arch/unicore32/kernel/vmlinux.lds.S
arch/unicore32/mm/mmu.c
arch/x86/include/asm/apic.h
arch/x86/include/asm/dma.h
arch/x86/kernel/amd_nb.c
arch/x86/kernel/apic/hw_nmi.c
arch/x86/kernel/apic/x2apic_uv_x.c
arch/x86/kernel/cpu/mcheck/mce.c
arch/x86/kernel/cpu/mtrr/main.c
arch/x86/kernel/irq.c
arch/x86/kernel/microcode_core.c
arch/x86/kernel/reboot.c
arch/x86/oprofile/nmi_int.c
arch/x86/oprofile/op_counter.h
arch/x86/platform/uv/tlb_uv.c
block/blk-core.c
block/blk-flush.c
block/blk-integrity.c
block/blk-throttle.c
block/elevator.c
drivers/atm/solos-pci.c
drivers/bluetooth/btusb.c
drivers/connector/cn_queue.c
drivers/connector/connector.c
drivers/edac/mpc85xx_edac.c
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/i915/intel_crt.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_i2c.c
drivers/gpu/drm/i915/intel_lvds.c
drivers/gpu/drm/nouveau/nouveau_gem.c
drivers/gpu/drm/radeon/atombios_crtc.c
drivers/gpu/drm/radeon/evergreen.c
drivers/gpu/drm/radeon/radeon_atombios.c
drivers/gpu/drm/radeon/radeon_combios.c
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_tt.c
drivers/hid/Kconfig
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/hid/hid-lgff.c
drivers/hid/hid-magicmouse.c
drivers/hid/hid-ortek.c
drivers/hid/hid-roccat-pyra.c
drivers/hid/usbhid/hid-quirks.c
drivers/hwmon/twl4030-madc-hwmon.c
drivers/ide/ide-io.c
drivers/input/keyboard/spear-keyboard.c
drivers/input/misc/uinput.c
drivers/input/mouse/synaptics.c
drivers/input/serio/i8042.c
drivers/input/serio/rpckbd.c
drivers/input/sparse-keymap.c
drivers/input/tablet/wacom_wac.c
drivers/input/tablet/wacom_wac.h
drivers/input/touchscreen/h3600_ts_input.c
drivers/macintosh/therm_pm72.c
drivers/md/dm-table.c
drivers/media/radio/wl128x/fmdrv_common.c
drivers/media/rc/ite-cir.c
drivers/net/atlx/atl2.c
drivers/net/bonding/bond_alb.h
drivers/net/irda/via-ircc.c
drivers/net/mlx4/eq.c
drivers/net/mlx4/mcg.c
drivers/net/phy/phy_device.c
drivers/net/starfire.c
drivers/net/usb/Kconfig
drivers/net/usb/Makefile
drivers/net/usb/cdc_eem.c
drivers/net/usb/cdc_ether.c
drivers/net/usb/cdc_ncm.c
drivers/net/usb/cdc_subset.c
drivers/net/usb/gl620a.c
drivers/net/usb/lg-vl600.c [new file with mode: 0644]
drivers/net/usb/net1080.c
drivers/net/usb/plusb.c
drivers/net/usb/rndis_host.c
drivers/net/usb/usbnet.c
drivers/net/usb/zaurus.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/carl9170/carl9170.h
drivers/net/wireless/ath/carl9170/main.c
drivers/net/wireless/ath/carl9170/tx.c
drivers/net/wireless/iwlegacy/iwl-core.c
drivers/net/wireless/iwlegacy/iwl3945-base.c
drivers/net/wireless/rt2x00/rt2800usb.c
drivers/rtc/rtc-mrst.c
drivers/scsi/ultrastor.c
drivers/staging/altera-stapl/altera-jtag.c
drivers/staging/hv/hv_mouse.c
drivers/tty/n_tty.c
drivers/tty/serial/Kconfig
drivers/tty/serial/apbuart.c
drivers/tty/tty_buffer.c
drivers/usb/serial/mct_u232.c
drivers/usb/serial/opticon.c
drivers/video/fb-puv3.c
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/file.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/root-tree.c
fs/btrfs/super.c
fs/btrfs/transaction.c
fs/ceph/mds_client.c
fs/ceph/super.c
fs/inode.c
fs/nilfs2/file.c
fs/nilfs2/nilfs.h
fs/nilfs2/page.c
fs/notify/inotify/inotify_fsnotify.c
fs/notify/inotify/inotify_user.c
fs/ubifs/xattr.c
fs/ufs/truncate.c
include/asm-generic/bug.h
include/drm/drm_crtc.h
include/drm/drm_pciids.h
include/drm/ttm/ttm_bo_api.h
include/drm/ttm/ttm_bo_driver.h
include/keys/ceph-type.h [new file with mode: 0644]
include/linux/atmdev.h
include/linux/blkdev.h
include/linux/ceph/auth.h
include/linux/ceph/libceph.h
include/linux/connector.h
include/linux/elevator.h
include/linux/fs.h
include/linux/kexec.h
include/linux/netdevice.h
include/linux/pci_ids.h
include/linux/perf_event.h
include/linux/rcupdate.h
include/linux/skbuff.h
include/linux/usb/usbnet.h
include/net/bluetooth/hci.h
include/net/if_inet6.h
include/net/ip.h
include/net/sctp/structs.h
include/sound/soc-dapm.h
kernel/kexec.c
kernel/perf_event.c
kernel/sched.c
kernel/sched_fair.c
kernel/signal.c
kernel/time/ntp.c
lib/Kconfig.debug
mm/mremap.c
net/appletalk/ddp.c
net/atm/common.c
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c
net/bluetooth/l2cap_core.c
net/bluetooth/l2cap_sock.c
net/bluetooth/mgmt.c
net/bridge/br_multicast.c
net/bridge/br_stp_if.c
net/ceph/Kconfig
net/ceph/auth.c
net/ceph/auth_x.c
net/ceph/ceph_common.c
net/ceph/crypto.c
net/ceph/crypto.h
net/ceph/mon_client.c
net/ceph/osd_client.c
net/core/dev.c
net/ipv4/arp.c
net/ipv4/fib_frontend.c
net/ipv4/tcp_output.c
net/ipv6/ndisc.c
net/ipv6/tcp_ipv6.c
net/mac80211/key.c
net/mac80211/rc80211_minstrel_ht.c
net/mac80211/rx.c
net/sctp/protocol.c
net/sctp/sm_make_chunk.c
net/wireless/scan.c
sound/core/pcm_lib.c
sound/firewire/speakers.c
sound/pci/ens1370.c
sound/pci/hda/patch_conexant.c
sound/pci/hda/patch_realtek.c
sound/soc/codecs/sn95031.c
sound/soc/codecs/tlv320dac33.c
sound/soc/codecs/twl6040.c
sound/soc/imx/imx-pcm-dma-mx2.c
sound/soc/imx/imx-ssi.h
sound/soc/pxa/corgi.c
tools/perf/Makefile
tools/perf/builtin-record.c
tools/perf/builtin-top.c
tools/perf/util/debug.c
tools/perf/util/debug.h
tools/perf/util/event.c
tools/perf/util/setup.py
tools/perf/util/symbol.c

index f607367..c17cd4b 100644 (file)
@@ -206,8 +206,8 @@ laptops/
        - directory with laptop related info and laptop driver documentation.
 ldm.txt
        - a brief description of LDM (Windows Dynamic Disks).
-leds-class.txt
-       - documents LED handling under Linux.
+leds/
+       - directory with info about LED handling under Linux.
 local_ops.txt
        - semantics and behavior of local atomic operations.
 lockdep-design.txt
index b4c4f15..3ca3971 100644 (file)
@@ -40,7 +40,7 @@ What:         /sys/bus/usb/devices/<busnum>-<devnum>:<config num>.<interface num>/<hid-
 Date:          March 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
-                press of a button. A profile holds informations like button
+                press of a button. A profile holds information like button
                 mappings, sensitivity, the colors of the 5 leds and light
                 effects.
                 When read, these files return the respective profile. The
index 00efced..326e054 100644 (file)
@@ -33,7 +33,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When written, this file lets one write the respective profile
                buttons back to the mouse. The data has to be 77 bytes long.
                The mouse will reject invalid data.
@@ -47,7 +47,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When read, these files return the respective profile buttons.
                The returned data is 77 bytes in size.
                This file is readonly.
@@ -58,7 +58,7 @@ Date:         October 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When written, this file lets one write the respective profile
                settings back to the mouse. The data has to be 43 bytes long.
@@ -73,7 +73,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When read, these files return the respective profile settings.
                The returned data is 43 bytes in size.
index fdfa16f..20f937c 100644 (file)
@@ -52,7 +52,7 @@ Date:         January 2011
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When written, this file lets one write the respective profile
                buttons back to the mouse. The data has to be 23 bytes long.
                The mouse will reject invalid data.
@@ -66,7 +66,7 @@ Date:         January 2011
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When read, these files return the respective profile buttons.
                The returned data is 23 bytes in size.
                This file is readonly.
@@ -77,7 +77,7 @@ Date:         January 2011
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When written, this file lets one write the respective profile
                settings back to the mouse. The data has to be 16 bytes long.
@@ -92,7 +92,7 @@ Date:         January 2011
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When read, these files return the respective profile settings.
                The returned data is 16 bytes in size.
index 5fab71a..3f8de50 100644 (file)
@@ -39,7 +39,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When written, this file lets one write the respective profile
                settings back to the mouse. The data has to be 13 bytes long.
@@ -54,7 +54,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_settings holds informations like resolution, sensitivity
+               profile_settings holds information like resolution, sensitivity
                and light effects.
                When read, these files return the respective profile settings.
                The returned data is 13 bytes in size.
@@ -66,7 +66,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When written, this file lets one write the respective profile
                buttons back to the mouse. The data has to be 19 bytes long.
                The mouse will reject invalid data.
@@ -80,7 +80,7 @@ Date:         August 2010
 Contact:       Stefan Achatz <erazor_de@users.sourceforge.net>
 Description:   The mouse can store 5 profiles which can be switched by the
                press of a button. A profile is split in settings and buttons.
-               profile_buttons holds informations about button layout.
+               profile_buttons holds information about button layout.
                When read, these files return the respective profile buttons.
                The returned data is 19 bytes in size.
                This file is readonly.
index 41ff8ae..cd9d667 100644 (file)
@@ -27,7 +27,7 @@ KernelVersion:        2.6.20
 Contact:       "Corentin Chary" <corentincj@iksaif.net>
 Description:
                Some models like the W1N have a LED display that can be
-               used to display several informations.
+               used to display several items of information.
                To control the LED display, use the following :
                    echo 0x0T000DDD > /sys/devices/platform/asus_laptop/
                where T control the 3 letters display, and DDD the 3 digits display.
index cbdfb7d..aedf1bd 100644 (file)
@@ -110,22 +110,22 @@ university server with various users - students, professors, system
 tasks etc. The resource planning for this server could be along the
 following lines:
 
-       CPU :           Top cpuset
+       CPU :          "Top cpuset"
                        /       \
                CPUSet1         CPUSet2
-                  |              |
-               (Profs)         (Students)
+                  |               |
+               (Professors)    (Students)
 
                In addition (system tasks) are attached to topcpuset (so
                that they can run anywhere) with a limit of 20%
 
-       Memory : Professors (50%), students (30%), system (20%)
+       Memory : Professors (50%), Students (30%), system (20%)
 
-       Disk : Prof (50%), students (30%), system (20%)
+       Disk : Professors (50%), Students (30%), system (20%)
 
        Network : WWW browsing (20%), Network File System (60%), others (20%)
                                / \
-                       Prof (15%) students (5%)
+               Professors (15%)  students (5%)
 
 Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go
 into NFS network class.
index 55fd262..50619a0 100644 (file)
@@ -138,7 +138,7 @@ and properties to be present. This will be described in detail in
 section III, but, for example, the kernel does not require you to
 create a node for every PCI device in the system. It is a requirement
 to have a node for PCI host bridges in order to provide interrupt
-routing informations and memory/IO ranges, among others. It is also
+routing information and memory/IO ranges, among others. It is also
 recommended to define nodes for on chip devices and other buses that
 don't specifically fit in an existing OF specification. This creates a
 great flexibility in the way the kernel can then probe those and match
@@ -385,7 +385,7 @@ struct boot_param_header {
      among others, by kexec. If you are on an SMP system, this value
      should match the content of the "reg" property of the CPU node in
      the device-tree corresponding to the CPU calling the kernel entry
-     point (see further chapters for more informations on the required
+     point (see further chapters for more information on the required
      device-tree contents)
 
    - size_dt_strings
@@ -553,7 +553,7 @@ looks like in practice.
 
 This tree is almost a minimal tree. It pretty much contains the
 minimal set of required nodes and properties to boot a linux kernel;
-that is, some basic model informations at the root, the CPUs, and the
+that is, some basic model information at the root, the CPUs, and the
 physical memory layout.  It also includes misc information passed
 through /chosen, like in this example, the platform type (mandatory)
 and the kernel command line arguments (optional).
index 68ee224..412305b 100644 (file)
@@ -1,7 +1,7 @@
 The DVB subsystem currently registers to the sysfs subsystem using the
 "class_simple" interface.
 
-This means that only the basic informations like module loading parameters
+This means that only the basic information like module loading parameters
 are presented through sysfs. Other things that might be interesting are
 currently *not* available.
 
index 44364fa..249822c 100644 (file)
@@ -311,7 +311,7 @@ Total Correctable Errors count attribute file:
        'ce_noinfo_count'
 
        This attribute file displays the number of CEs that
-       have occurred wherewith no informations as to which DIMM slot
+       have occurred wherewith no information as to which DIMM slot
        is having errors. Memory is handicapped, but operational,
        yet no information is available to indicate which slot
        the failing memory is in. This count field should be also
index 49e9796..cc85a92 100644 (file)
@@ -1832,15 +1832,17 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
                                perfmon on Intel CPUs instead of the
                                CPU specific event set.
 
-       oops=panic      Always panic on oopses. Default is to just kill the process,
-                       but there is a small probability of deadlocking the machine.
+       oops=panic      Always panic on oopses. Default is to just kill the
+                       process, but there is a small probability of
+                       deadlocking the machine.
                        This will also cause panics on machine check exceptions.
                        Useful together with panic=30 to trigger a reboot.
 
        OSS             [HW,OSS]
                        See Documentation/sound/oss/oss-parameters.txt
 
-       panic=          [KNL] Kernel behaviour on panic
+       panic=          [KNL] Kernel behaviour on panic: delay <timeout>
+                       seconds before rebooting
                        Format: <timeout>
 
        parkbd.port=    [HW] Parallel port number the keyboard adapter is
@@ -2343,6 +2345,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
 
        softlockup_panic=
                        [KNL] Should the soft-lockup detector generate panics.
+                       Format: <integer>
 
        sonypi.*=       [HW] Sony Programmable I/O Control Device driver
                        See Documentation/sonypi.txt
@@ -2475,8 +2478,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
        topology=       [S390]
                        Format: {off | on}
                        Specify if the kernel should make use of the cpu
-                       topology informations if the hardware supports these.
-                       The scheduler will make use of these informations and
+                       topology information if the hardware supports this.
+                       The scheduler will make use of this information and
                        e.g. base its process migration decisions on it.
                        Default is on.
 
@@ -2529,8 +2532,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
                        reported either.
 
        unknown_nmi_panic
-                       [X86]
-                       Set unknown_nmi_panic=1 early on boot.
+                       [X86] Cause panic on unknown NMI.
 
        usbcore.autosuspend=
                        [USB] The autosuspend time delay (in seconds) used
index 34f6638..090e6ee 100644 (file)
@@ -11,6 +11,7 @@ with the difference that the orphan objects are not freed but only
 reported via /sys/kernel/debug/kmemleak. A similar method is used by the
 Valgrind tool (memcheck --leak-check) to detect the memory leaks in
 user-space applications.
+Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze and tile.
 
 Usage
 -----
@@ -178,5 +179,4 @@ block doesn't need to be freed (some cases in the init_call functions),
 the pointer is calculated by other methods than the usual container_of
 macro or the pointer is stored in a location not scanned by kmemleak.
 
-Page allocations and ioremap are not tracked. Only the ARM and x86
-architectures are currently supported.
+Page allocations and ioremap are not tracked.
index c1c5be8..803e51f 100644 (file)
@@ -61,7 +61,7 @@ Usage
   Hotkeys are also reported as input keys (like keyboards) you can check
   which key are supported using "xev" under X11.
 
-  You can get informations on the version of your DSDT table by reading the
+  You can get information on the version of your DSDT table by reading the
   /sys/devices/platform/asus-laptop/infos entry. If you have a question or a
   bug report to do, please include the output of this entry.
 
@@ -178,7 +178,7 @@ LED display
 -----------
 
   Some models like the W1N have a LED display that can be used to display
-  several informations.
+  several items of information.
 
   LED display works for the following models:
     W1000N
diff --git a/Documentation/leds/00-INDEX b/Documentation/leds/00-INDEX
new file mode 100644 (file)
index 0000000..29f481d
--- /dev/null
@@ -0,0 +1,8 @@
+leds-class.txt
+       - documents LED handling under Linux.
+leds-lp3944.txt
+       - notes on how to use the leds-lp3944 driver.
+leds-lp5521.txt
+       - notes on how to use the leds-lp5521 driver.
+leds-lp5523.txt
+       - notes on how to use the leds-lp5523 driver.
similarity index 99%
rename from Documentation/leds-class.txt
rename to Documentation/leds/leds-class.txt
index 58b266b..4996586 100644 (file)
@@ -95,4 +95,3 @@ There are a number of cases where a trigger might only be mappable to a
 particular LED (ACPI?). The addition of triggers provided by the LED driver
 should cover this option and be possible to add without breaking the
 current interface.
-
index 18afcd8..ee496eb 100644 (file)
@@ -72,7 +72,7 @@ folder:
 #  fragmentation    gw_sel_class  vis_mode
 
 
-There is a special folder for debugging informations:
+There is a special folder for debugging information:
 
 #  ls /sys/kernel/debug/batman_adv/bat0/
 #  gateways     socket        transtable_global  vis_data
index 86f9f74..efe998b 100644 (file)
@@ -2273,7 +2273,7 @@ IP forwarding is on.
 There is a lot of useful info in here best found by going in & having a look around,
 so I'll take you through some entries I consider important.
 
-All the processes running on the machine have there own entry defined by
+All the processes running on the machine have their own entry defined by
 /proc/<pid>
 So lets have a look at the init process
 cd /proc/1
index 373ceac..b7ee379 100644 (file)
@@ -1,8 +1,7 @@
-Each CPU has a "base" scheduling domain (struct sched_domain). These are
-accessed via cpu_sched_domain(i) and this_sched_domain() macros. The domain
+Each CPU has a "base" scheduling domain (struct sched_domain). The domain
 hierarchy is built from these base domains via the ->parent pointer. ->parent
-MUST be NULL terminated, and domain structures should be per-CPU as they
-are locklessly updated.
+MUST be NULL terminated, and domain structures should be per-CPU as they are
+locklessly updated.
 
 Each scheduling domain spans a number of CPUs (stored in the ->span field).
 A domain's span MUST be a superset of it child's span (this restriction could
@@ -26,11 +25,26 @@ is treated as one entity. The load of a group is defined as the sum of the
 load of each of its member CPUs, and only when the load of a group becomes
 out of balance are tasks moved between groups.
 
-In kernel/sched.c, rebalance_tick is run periodically on each CPU. This
-function takes its CPU's base sched domain and checks to see if has reached
-its rebalance interval. If so, then it will run load_balance on that domain.
-rebalance_tick then checks the parent sched_domain (if it exists), and the
-parent of the parent and so forth.
+In kernel/sched.c, trigger_load_balance() is run periodically on each CPU
+through scheduler_tick(). It raises a softirq after the next regularly scheduled
+rebalancing event for the current runqueue has arrived. The actual load
+balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run
+in softirq context (SCHED_SOFTIRQ).
+
+The latter function takes two arguments: the current CPU and whether it was idle
+at the time the scheduler_tick() happened and iterates over all sched domains
+our CPU is on, starting from its base domain and going up the ->parent chain.
+While doing that, it checks to see if the current domain has exhausted its
+rebalance interval. If so, it runs load_balance() on that domain. It then checks
+the parent sched_domain (if it exists), and the parent of the parent and so
+forth.
+
+Initially, load_balance() finds the busiest group in the current sched domain.
+If it succeeds, it looks for the busiest runqueue of all the CPUs' runqueues in
+that group. If it manages to find such a runqueue, it locks both our initial
+CPU's runqueue and the newly found busiest one and starts moving tasks from it
+to our runqueue. The exact number of tasks amounts to an imbalance previously
+computed while iterating over this sched domain's groups.
 
 *** Implementing sched domains ***
 The "base" domain will "span" the first level of the hierarchy. In the case
index 6f63b79..6af8f7a 100644 (file)
@@ -285,7 +285,7 @@ from the driver.
 
 7. Profiling information
 
-This driver does not provide profiling informations as did its predecessors.
+This driver does not provide profiling information as did its predecessors.
 This feature was not this useful and added complexity to the code. 
 As the driver code got more complex, I have decided to remove everything 
 that didn't seem actually useful.
index b9b7f30..9822afb 100644 (file)
@@ -2229,7 +2229,7 @@ Proc interfaces (/proc/asound)
 
 /proc/asound/card#/pcm#[cp]/oss
 -------------------------------
-  String "erase" - erase all additional informations about OSS applications
+  String "erase" - erase all additional information about OSS applications
   String "<app_name> <fragments> <fragment_size> [<options>]"
 
    <app_name> - name of application with (higher priority) or without path
index c0f0892..e0dc064 100644 (file)
@@ -1,10 +1,10 @@
 Driver
 ------
 
-Informations about Audio Excel DSP 16 driver can be found in the source
+Information about Audio Excel DSP 16 driver can be found in the source
 file aedsp16.c
 Please, read the head of the source before using it. It contain useful
-informations.
+information.
 
 Configuration
 -------------
@@ -68,7 +68,7 @@ Sound cards supported
 This driver supports the SC-6000 and SC-6600 based Gallant's sound card.
 It don't support the Audio Excel DSP 16 III (try the SC-6600 code).
 I'm working on the III version of the card: if someone have useful
-informations about it, please let me know.
+information about it, please let me know.
 For all the non-supported audio cards, you have to boot MS-DOS (or WIN95)
 activating the audio card with the MS-DOS device driver, then you have to
 <ctrl>-<alt>-<del> and boot Linux.
index af8a7d3..b6b7790 100644 (file)
@@ -5,7 +5,7 @@ FIRST OF ALL
 ============
 
   This code references YAMAHA's sample codes and data sheets.
-  I respect and thank for all people they made open the informations
+  I respect and thank for all people they made open the information
   about YMF7xx cards.
 
   And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s
index bbe3ed6..14c065f 100644 (file)
@@ -1,5 +1,5 @@
 
-Note: "modinfo <module>" prints various informations about a kernel
+Note: "modinfo <module>" prints various information about a kernel
 module, among them a complete and up-to-date list of insmod options.
 This list tends to be outdated because it is updated manually ...
 
index b6e6deb..395f6c6 100644 (file)
@@ -8,7 +8,7 @@ completely by the bt8xx chip, which is common on all boards.  But
 sound is handled in slightly different ways on each board.
 
 To handle the grabber boards correctly, there is a array tvcards[] in
-bttv-cards.c, which holds the informations required for each board.
+bttv-cards.c, which holds the information required for each board.
 Sound will work only, if the correct entry is used (for video it often
 makes no difference).  The bttv driver prints a line to the kernel
 log, telling which card type is used.  Like this one:
index 1247566..e0cdae4 100644 (file)
@@ -191,10 +191,10 @@ Syntax:         <n>
 Description:    Debugging information level, from 0 to 3:
                0 = none (use carefully)
                1 = critical errors
-               2 = significant informations
+               2 = significant information
                3 = more verbose messages
                Level 3 is useful for testing only, when only one device
-               is used at the same time. It also shows some more informations
+               is used at the same time. It also shows some more information
                about the hardware being detected. This module parameter can be
                changed at runtime thanks to the /sys filesystem interface.
 Default:        2
index 73de405..b4f6704 100644 (file)
@@ -214,10 +214,10 @@ Syntax:         <n>
 Description:    Debugging information level, from 0 to 3:
                0 = none (use carefully)
                1 = critical errors
-               2 = significant informations
+               2 = significant information
                3 = more verbose messages
                Level 3 is useful for testing only. It also shows some more
-               informations about the hardware being detected.
+               information about the hardware being detected.
                This parameter can be changed at runtime thanks to the /sys
                filesystem interface.
 Default:        2
index 05138e8..9649450 100644 (file)
@@ -413,7 +413,7 @@ Syntax:         <n>
 Description:    Debugging information level, from 0 to 6:
                0 = none (use carefully)
                1 = critical errors
-               2 = significant informations
+               2 = significant information
                3 = configuration or general messages
                4 = warnings
                5 = called functions
index befdfda..b41c83c 100644 (file)
@@ -181,10 +181,10 @@ Syntax:         <n>
 Description:    Debugging information level, from 0 to 3:
                0 = none (use carefully)
                1 = critical errors
-               2 = significant informations
+               2 = significant information
                3 = more verbose messages
                Level 3 is useful for testing only, when only one device
-               is used at the same time. It also shows some more informations
+               is used at the same time. It also shows some information
                about the hardware being detected. This module parameter can be
                changed at runtime thanks to the /sys filesystem interface.
 Default:        2
@@ -261,7 +261,7 @@ the fingerprint is: '88E8 F32F 7244 68BA 3958  5D40 99DA 5D2A FCE6 35A4'.
 
 11. Credits
 ===========
-- Informations about the chip internals needed to enable the I2C protocol have
+- Information about the chip internals needed to enable the I2C protocol have
   been taken from the documentation of the ZC030x Video4Linux1 driver written
   by Andrew Birkett <andy@nobugs.org>;
 - The initialization values of the ZC0301 controller connected to the PAS202BCB
index ba7a55c..8392b64 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 39
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 NAME = Flesh-Eating Bats with Fangs
 
 # *DOCUMENTATION*
index 1c50e4c..81a1f4e 100644 (file)
@@ -412,7 +412,7 @@ sn_call_force_intr_provider(struct sn_irq_info *sn_irq_info)
        pci_provider = sn_pci_provider[sn_irq_info->irq_bridge_type];
 
        /* Don't force an interrupt if the irq has been disabled */
-       if (!irqd_irq_disabled(sn_irq_info->irq_irq) &&
+       if (!irqd_irq_disabled(irq_get_irq_data(sn_irq_info->irq_irq)) &&
            pci_provider && pci_provider->force_interrupt)
                (*pci_provider->force_interrupt)(sn_irq_info);
 }
index c76d8dc..7aab87f 100644 (file)
@@ -45,38 +45,6 @@ static int licenseID_open(struct inode *inode, struct file *file)
        return single_open(file, licenseID_show, NULL);
 }
 
-/*
- * Enable forced interrupt by default.
- * When set, the sn interrupt handler writes the force interrupt register on
- * the bridge chip.  The hardware will then send an interrupt message if the
- * interrupt line is active.  This mimics a level sensitive interrupt.
- */
-extern int sn_force_interrupt_flag;
-
-static int sn_force_interrupt_show(struct seq_file *s, void *p)
-{
-       seq_printf(s, "Force interrupt is %s\n",
-               sn_force_interrupt_flag ? "enabled" : "disabled");
-       return 0;
-}
-
-static ssize_t sn_force_interrupt_write_proc(struct file *file,
-               const char __user *buffer, size_t count, loff_t *data)
-{
-       char val;
-
-       if (copy_from_user(&val, buffer, 1))
-               return -EFAULT;
-
-       sn_force_interrupt_flag = (val == '0') ? 0 : 1;
-       return count;
-}
-
-static int sn_force_interrupt_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, sn_force_interrupt_show, NULL);
-}
-
 static int coherence_id_show(struct seq_file *s, void *p)
 {
        seq_printf(s, "%d\n", partition_coherence_id());
@@ -114,14 +82,6 @@ static const struct file_operations proc_license_id_fops = {
        .release        = single_release,
 };
 
-static const struct file_operations proc_sn_force_intr_fops = {
-       .open           = sn_force_interrupt_open,
-       .read           = seq_read,
-       .write          = sn_force_interrupt_write_proc,
-       .llseek         = seq_lseek,
-       .release        = single_release,
-};
-
 static const struct file_operations proc_coherence_id_fops = {
        .open           = coherence_id_open,
        .read           = seq_read,
@@ -149,8 +109,6 @@ void register_sn_procfs(void)
        proc_create("system_serial_number", 0444, sgi_proc_dir,
                    &proc_system_sn_fops);
        proc_create("licenseID", 0444, sgi_proc_dir, &proc_license_id_fops);
-       proc_create("sn_force_interrupt", 0644, sgi_proc_dir,
-                   &proc_sn_force_intr_fops);
        proc_create("coherence_id", 0444, sgi_proc_dir,
                    &proc_coherence_id_fops);
        proc_create("sn_topology", 0444, sgi_proc_dir, &proc_sn_topo_fops);
index d770b00..30edd61 100644 (file)
 #define __NR_fanotify_init     368
 #define __NR_fanotify_mark     369
 #define __NR_prlimit64         370
+#define __NR_name_to_handle_at 371
+#define __NR_open_by_handle_at 372
+#define __NR_clock_adjtime     373
+#define __NR_syncfs            374
 
-#define __NR_syscalls          371
+#define __NR_syscalls          375
 
 #ifdef __KERNEL__
 #ifndef __ASSEMBLY__
index f0cb5c2..494b63b 100644 (file)
@@ -10,6 +10,7 @@ CFLAGS_REMOVE_early_printk.o = -pg
 CFLAGS_REMOVE_selfmod.o = -pg
 CFLAGS_REMOVE_heartbeat.o = -pg
 CFLAGS_REMOVE_ftrace.o = -pg
+CFLAGS_REMOVE_process.o = -pg
 endif
 
 extra-y := head.o vmlinux.lds
index 515feb4..357d56a 100644 (file)
@@ -51,6 +51,9 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr)
                        : "r" (parent), "r" (return_hooker)
        );
 
+       flush_dcache_range((u32)parent, (u32)parent + 4);
+       flush_icache_range((u32)parent, (u32)parent + 4);
+
        if (unlikely(faulted)) {
                ftrace_graph_stop();
                WARN_ON(1);
@@ -95,6 +98,9 @@ static int ftrace_modify_code(unsigned long addr, unsigned int value)
        if (unlikely(faulted))
                return -EFAULT;
 
+       flush_dcache_range(addr, addr + 4);
+       flush_icache_range(addr, addr + 4);
+
        return 0;
 }
 
@@ -195,8 +201,6 @@ int ftrace_update_ftrace_func(ftrace_func_t func)
        ret += ftrace_modify_code((unsigned long)&ftrace_caller,
                                  MICROBLAZE_NOP);
 
-       /* All changes are done - lets do caches consistent */
-       flush_icache();
        return ret;
 }
 
@@ -210,7 +214,6 @@ int ftrace_enable_ftrace_graph_caller(void)
 
        old_jump = *(unsigned int *)ip; /* save jump over instruction */
        ret = ftrace_modify_code(ip, MICROBLAZE_NOP);
-       flush_icache();
 
        pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump);
        return ret;
@@ -222,7 +225,6 @@ int ftrace_disable_ftrace_graph_caller(void)
        unsigned long ip = (unsigned long)(&ftrace_call_graph);
 
        ret = ftrace_modify_code(ip, old_jump);
-       flush_icache();
 
        pr_debug("%s\n", __func__);
        return ret;
index 5ba7e16..c88f066 100644 (file)
@@ -158,11 +158,11 @@ void __init init_IRQ(void)
        for (i = 0; i < nr_irq; ++i) {
                if (intr_type & (0x00000001 << i)) {
                        irq_set_chip_and_handler_name(i, &intc_dev,
-                               handle_edge_irq, intc_dev.name);
+                               handle_edge_irq, "edge");
                        irq_clear_status_flags(i, IRQ_LEVEL);
                } else {
                        irq_set_chip_and_handler_name(i, &intc_dev,
-                               handle_level_irq, intc_dev.name);
+                               handle_level_irq, "level");
                        irq_set_status_flags(i, IRQ_LEVEL);
                }
        }
index e88a930..85cea81 100644 (file)
@@ -375,3 +375,7 @@ ENTRY(sys_call_table)
        .long sys_fanotify_init
        .long sys_fanotify_mark
        .long sys_prlimit64     /* 370 */
+       .long sys_name_to_handle_at
+       .long sys_open_by_handle_at
+       .long sys_clock_adjtime
+       .long sys_syncfs
index f1fcbff..10c320a 100644 (file)
@@ -2,6 +2,12 @@
 # Makefile
 #
 
+ifdef CONFIG_FUNCTION_TRACER
+CFLAGS_REMOVE_ashldi3.o = -pg
+CFLAGS_REMOVE_ashrdi3.o = -pg
+CFLAGS_REMOVE_lshrdi3.o = -pg
+endif
+
 lib-y :=  memset.o
 
 ifeq ($(CONFIG_OPT_LIB_ASM),y)
index 22f64b6..e0668f8 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * P1020 RDB Device Tree Source
  *
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
                reg = <0 0xffe09000 0 0x1000>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>;
+                         0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <16 2>;
                #address-cells = <3>;
                reg = <0 0xffe0a000 0 0x1000>;
                bus-range = <0 255>;
-               ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;
+               ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
+                         0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <16 2>;
                        #size-cells = <2>;
                        #address-cells = <3>;
                        device_type = "pci";
-                       ranges = <0x2000000 0x0 0xc0000000
-                                 0x2000000 0x0 0xc0000000
+                       ranges = <0x2000000 0x0 0x80000000
+                                 0x2000000 0x0 0x80000000
                                  0x0 0x20000000
 
                                  0x1000000 0x0 0x0
index da4cb0d..e2d48fd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * P2020 RDB Device Tree Source
  *
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
                reg = <0 0xffe09000 0 0x1000>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>;
+                         0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <25 2>;
                #address-cells = <3>;
                reg = <0 0xffe0a000 0 0x1000>;
                bus-range = <0 255>;
-               ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;
+               ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
+                         0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <26 2>;
                        #size-cells = <2>;
                        #address-cells = <3>;
                        device_type = "pci";
-                       ranges = <0x2000000 0x0 0xc0000000
-                                 0x2000000 0x0 0xc0000000
+                       ranges = <0x2000000 0x0 0x80000000
+                                 0x2000000 0x0 0x80000000
                                  0x0 0x20000000
 
                                  0x1000000 0x0 0x0
index 0fe93d0..b69c3a5 100644 (file)
@@ -6,7 +6,7 @@
  * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb,
  * eth1, eth2, sdhc, crypto, global-util, pci0.
  *
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
                reg = <0 0xffe09000 0 0x1000>;
                bus-range = <0 255>;
                ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>;
+                         0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <25 2>;
index e95a512..7a31d46 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Please note to add "-b 1" for core1's dts compiling.
  *
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
  *
  * This program is free software; you can redistribute  it and/or modify it
  * under  the terms of  the GNU General  Public License as published by the
                #address-cells = <3>;
                reg = <0 0xffe0a000 0 0x1000>;
                bus-range = <0 255>;
-               ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
-                         0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;
+               ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
+                         0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
                clock-frequency = <33333333>;
                interrupt-parent = <&mpic>;
                interrupts = <26 2>;
                        #size-cells = <2>;
                        #address-cells = <3>;
                        device_type = "pci";
-                       ranges = <0x2000000 0x0 0xc0000000
-                                 0x2000000 0x0 0xc0000000
+                       ranges = <0x2000000 0x0 0x80000000
+                                 0x2000000 0x0 0x80000000
                                  0x0 0x20000000
 
                                  0x1000000 0x0 0x0
index fe56a23..e4f0191 100644 (file)
@@ -35,9 +35,9 @@ struct smp_ops_t {
        int   (*probe)(void);
        void  (*kick_cpu)(int nr);
        void  (*setup_cpu)(int nr);
+       void  (*bringup_done)(void);
        void  (*take_timebase)(void);
        void  (*give_timebase)(void);
-       int   (*cpu_enable)(unsigned int nr);
        int   (*cpu_disable)(void);
        void  (*cpu_die)(unsigned int nr);
        int   (*cpu_bootable)(unsigned int nr);
@@ -267,7 +267,6 @@ struct machdep_calls {
 
 extern void e500_idle(void);
 extern void power4_idle(void);
-extern void power4_cpu_offline_powersave(void);
 extern void ppc6xx_idle(void);
 extern void book3e_idle(void);
 
index 66e237b..a902a0d 100644 (file)
@@ -36,15 +36,16 @@ extern void cpu_die(void);
 
 extern void smp_send_debugger_break(int cpu);
 extern void smp_message_recv(int);
+extern void start_secondary_resume(void);
 
 DECLARE_PER_CPU(unsigned int, cpu_pvr);
 
 #ifdef CONFIG_HOTPLUG_CPU
-extern void fixup_irqs(const struct cpumask *map);
+extern void migrate_irqs(void);
 int generic_cpu_disable(void);
-int generic_cpu_enable(unsigned int cpu);
 void generic_cpu_die(unsigned int cpu);
 void generic_mach_cpu_die(void);
+void generic_set_cpu_dead(unsigned int cpu);
 #endif
 
 #ifdef CONFIG_PPC64
index 3d569e2..3d3d416 100644 (file)
@@ -163,7 +163,7 @@ static void crash_kexec_prepare_cpus(int cpu)
 }
 
 /* wait for all the CPUs to hit real mode but timeout if they don't come in */
-#ifdef CONFIG_PPC_STD_MMU_64
+#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
 static void crash_kexec_wait_realmode(int cpu)
 {
        unsigned int msecs;
@@ -188,6 +188,8 @@ static void crash_kexec_wait_realmode(int cpu)
        }
        mb();
 }
+#else
+static inline void crash_kexec_wait_realmode(int cpu) {}
 #endif
 
 /*
@@ -344,9 +346,7 @@ void default_machine_crash_shutdown(struct pt_regs *regs)
        crash_save_cpu(regs, crashing_cpu);
        crash_kexec_prepare_cpus(crashing_cpu);
        cpu_set(crashing_cpu, cpus_in_crash);
-#if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP)
        crash_kexec_wait_realmode(crashing_cpu);
-#endif
 
        machine_kexec_mask_interrupts();
 
index 98c4b29..c5c24be 100644 (file)
@@ -890,6 +890,15 @@ __secondary_start:
        mtspr   SPRN_SRR1,r4
        SYNC
        RFI
+
+_GLOBAL(start_secondary_resume)
+       /* Reset stack */
+       rlwinm  r1,r1,0,0,(31-THREAD_SHIFT)     /* current_thread_info() */
+       addi    r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
+       li      r3,0
+       std     r3,0(r1)                /* Zero the stack frame pointer */
+       bl      start_secondary
+       b       .
 #endif /* CONFIG_SMP */
 
 #ifdef CONFIG_KVM_BOOK3S_HANDLER
index 285e6f7..3a319f9 100644 (file)
@@ -536,6 +536,13 @@ _GLOBAL(pmac_secondary_start)
        add     r13,r13,r4              /* for this processor.          */
        mtspr   SPRN_SPRG_PACA,r13      /* Save vaddr of paca in an SPRG*/
 
+       /* Mark interrupts soft and hard disabled (they might be enabled
+        * in the PACA when doing hotplug)
+        */
+       li      r0,0
+       stb     r0,PACASOFTIRQEN(r13)
+       stb     r0,PACAHARDIRQEN(r13)
+
        /* Create a temp kernel stack for use before relocation is on.  */
        ld      r1,PACAEMERGSP(r13)
        subi    r1,r1,STACK_FRAME_OVERHEAD
index 5328709..ba31954 100644 (file)
@@ -53,24 +53,3 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
        isync
        b       1b
 
-_GLOBAL(power4_cpu_offline_powersave)
-       /* Go to NAP now */
-       mfmsr   r7
-       rldicl  r0,r7,48,1
-       rotldi  r0,r0,16
-       mtmsrd  r0,1                    /* hard-disable interrupts */
-       li      r0,1
-       li      r6,0
-       stb     r0,PACAHARDIRQEN(r13)   /* we'll hard-enable shortly */
-       stb     r6,PACASOFTIRQEN(r13)   /* soft-disable irqs */
-BEGIN_FTR_SECTION
-       DSSALL
-       sync
-END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
-       ori     r7,r7,MSR_EE
-       oris    r7,r7,MSR_POW@h
-       sync
-       isync
-       mtmsrd  r7
-       isync
-       blr
index 63625e0..f621b7d 100644 (file)
@@ -246,12 +246,13 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
 }
 
 #ifdef CONFIG_HOTPLUG_CPU
-void fixup_irqs(const struct cpumask *map)
+void migrate_irqs(void)
 {
        struct irq_desc *desc;
        unsigned int irq;
        static int warned;
        cpumask_var_t mask;
+       const struct cpumask *map = cpu_online_mask;
 
        alloc_cpumask_var(&mask, GFP_KERNEL);
 
index f4adf89..10f0aad 100644 (file)
@@ -203,7 +203,7 @@ void __init free_unused_pacas(void)
 {
        int new_size;
 
-       new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus());
+       new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids);
 
        if (new_size >= paca_size)
                return;
index 9d4882a..21f30cb 100644 (file)
@@ -509,6 +509,9 @@ void __init smp_setup_cpu_maps(void)
         */
        cpu_init_thread_core_maps(nthreads);
 
+       /* Now that possible cpus are set, set nr_cpu_ids for later use */
+       nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
+
        free_unused_pacas();
 }
 #endif /* CONFIG_SMP */
index 9813605..cbdbb14 100644 (file)
 #define DBG(fmt...)
 #endif
 
+
+/* Store all idle threads, this can be reused instead of creating
+* a new thread. Also avoids complicated thread destroy functionality
+* for idle threads.
+*/
+#ifdef CONFIG_HOTPLUG_CPU
+/*
+ * Needed only for CONFIG_HOTPLUG_CPU because __cpuinitdata is
+ * removed after init for !CONFIG_HOTPLUG_CPU.
+ */
+static DEFINE_PER_CPU(struct task_struct *, idle_thread_array);
+#define get_idle_for_cpu(x)      (per_cpu(idle_thread_array, x))
+#define set_idle_for_cpu(x, p)   (per_cpu(idle_thread_array, x) = (p))
+#else
+static struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ;
+#define get_idle_for_cpu(x)      (idle_thread_array[(x)])
+#define set_idle_for_cpu(x, p)   (idle_thread_array[(x)] = (p))
+#endif
+
 struct thread_info *secondary_ti;
 
 DEFINE_PER_CPU(cpumask_var_t, cpu_sibling_map);
@@ -238,23 +257,6 @@ static void __devinit smp_store_cpu_info(int id)
        per_cpu(cpu_pvr, id) = mfspr(SPRN_PVR);
 }
 
-static void __init smp_create_idle(unsigned int cpu)
-{
-       struct task_struct *p;
-
-       /* create a process for the processor */
-       p = fork_idle(cpu);
-       if (IS_ERR(p))
-               panic("failed fork for CPU %u: %li", cpu, PTR_ERR(p));
-#ifdef CONFIG_PPC64
-       paca[cpu].__current = p;
-       paca[cpu].kstack = (unsigned long) task_thread_info(p)
-               + THREAD_SIZE - STACK_FRAME_OVERHEAD;
-#endif
-       current_set[cpu] = task_thread_info(p);
-       task_thread_info(p)->cpu = cpu;
-}
-
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
        unsigned int cpu;
@@ -288,10 +290,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
                        max_cpus = NR_CPUS;
        else
                max_cpus = 1;
-
-       for_each_possible_cpu(cpu)
-               if (cpu != boot_cpuid)
-                       smp_create_idle(cpu);
 }
 
 void __devinit smp_prepare_boot_cpu(void)
@@ -305,7 +303,7 @@ void __devinit smp_prepare_boot_cpu(void)
 
 #ifdef CONFIG_HOTPLUG_CPU
 /* State of each CPU during hotplug phases */
-DEFINE_PER_CPU(int, cpu_state) = { 0 };
+static DEFINE_PER_CPU(int, cpu_state) = { 0 };
 
 int generic_cpu_disable(void)
 {
@@ -317,30 +315,8 @@ int generic_cpu_disable(void)
        set_cpu_online(cpu, false);
 #ifdef CONFIG_PPC64
        vdso_data->processorCount--;
-       fixup_irqs(cpu_online_mask);
-#endif
-       return 0;
-}
-
-int generic_cpu_enable(unsigned int cpu)
-{
-       /* Do the normal bootup if we haven't
-        * already bootstrapped. */
-       if (system_state != SYSTEM_RUNNING)
-               return -ENOSYS;
-
-       /* get the target out of it's holding state */
-       per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
-       smp_wmb();
-
-       while (!cpu_online(cpu))
-               cpu_relax();
-
-#ifdef CONFIG_PPC64
-       fixup_irqs(cpu_online_mask);
-       /* counter the irq disable in fixup_irqs */
-       local_irq_enable();
 #endif
+       migrate_irqs();
        return 0;
 }
 
@@ -362,37 +338,89 @@ void generic_mach_cpu_die(void)
        unsigned int cpu;
 
        local_irq_disable();
+       idle_task_exit();
        cpu = smp_processor_id();
        printk(KERN_DEBUG "CPU%d offline\n", cpu);
        __get_cpu_var(cpu_state) = CPU_DEAD;
        smp_wmb();
        while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE)
                cpu_relax();
-       set_cpu_online(cpu, true);
-       local_irq_enable();
+}
+
+void generic_set_cpu_dead(unsigned int cpu)
+{
+       per_cpu(cpu_state, cpu) = CPU_DEAD;
 }
 #endif
 
-static int __devinit cpu_enable(unsigned int cpu)
+struct create_idle {
+       struct work_struct work;
+       struct task_struct *idle;
+       struct completion done;
+       int cpu;
+};
+
+static void __cpuinit do_fork_idle(struct work_struct *work)
 {
-       if (smp_ops && smp_ops->cpu_enable)
-               return smp_ops->cpu_enable(cpu);
+       struct create_idle *c_idle =
+               container_of(work, struct create_idle, work);
+
+       c_idle->idle = fork_idle(c_idle->cpu);
+       complete(&c_idle->done);
+}
+
+static int __cpuinit create_idle(unsigned int cpu)
+{
+       struct thread_info *ti;
+       struct create_idle c_idle = {
+               .cpu    = cpu,
+               .done   = COMPLETION_INITIALIZER_ONSTACK(c_idle.done),
+       };
+       INIT_WORK_ONSTACK(&c_idle.work, do_fork_idle);
+
+       c_idle.idle = get_idle_for_cpu(cpu);
+
+       /* We can't use kernel_thread since we must avoid to
+        * reschedule the child. We use a workqueue because
+        * we want to fork from a kernel thread, not whatever
+        * userspace process happens to be trying to online us.
+        */
+       if (!c_idle.idle) {
+               schedule_work(&c_idle.work);
+               wait_for_completion(&c_idle.done);
+       } else
+               init_idle(c_idle.idle, cpu);
+       if (IS_ERR(c_idle.idle)) {              
+               pr_err("Failed fork for CPU %u: %li", cpu, PTR_ERR(c_idle.idle));
+               return PTR_ERR(c_idle.idle);
+       }
+       ti = task_thread_info(c_idle.idle);
+
+#ifdef CONFIG_PPC64
+       paca[cpu].__current = c_idle.idle;
+       paca[cpu].kstack = (unsigned long)ti + THREAD_SIZE - STACK_FRAME_OVERHEAD;
+#endif
+       ti->cpu = cpu;
+       current_set[cpu] = ti;
 
-       return -ENOSYS;
+       return 0;
 }
 
 int __cpuinit __cpu_up(unsigned int cpu)
 {
-       int c;
+       int rc, c;
 
        secondary_ti = current_set[cpu];
-       if (!cpu_enable(cpu))
-               return 0;
 
        if (smp_ops == NULL ||
            (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)))
                return -EINVAL;
 
+       /* Make sure we have an idle thread */
+       rc = create_idle(cpu);
+       if (rc)
+               return rc;
+
        /* Make sure callin-map entry is 0 (can be leftover a CPU
         * hotplug
         */
@@ -502,7 +530,7 @@ static struct device_node *cpu_to_l2cache(int cpu)
 }
 
 /* Activate a secondary processor. */
-int __devinit start_secondary(void *unused)
+void __devinit start_secondary(void *unused)
 {
        unsigned int cpu = smp_processor_id();
        struct device_node *l2_cache;
@@ -523,6 +551,10 @@ int __devinit start_secondary(void *unused)
 
        secondary_cpu_time_init();
 
+#ifdef CONFIG_PPC64
+       if (system_state == SYSTEM_RUNNING)
+               vdso_data->processorCount++;
+#endif
        ipi_call_lock();
        notify_cpu_starting(cpu);
        set_cpu_online(cpu, true);
@@ -558,7 +590,8 @@ int __devinit start_secondary(void *unused)
        local_irq_enable();
 
        cpu_idle();
-       return 0;
+
+       BUG();
 }
 
 int setup_profiling_timer(unsigned int multiplier)
@@ -585,7 +618,11 @@ void __init smp_cpus_done(unsigned int max_cpus)
 
        free_cpumask_var(old_mask);
 
+       if (smp_ops && smp_ops->bringup_done)
+               smp_ops->bringup_done();
+
        dump_numa_cpu_topology();
+
 }
 
 int arch_sd_sibling_asym_packing(void)
@@ -660,5 +697,9 @@ void cpu_die(void)
 {
        if (ppc_md.cpu_die)
                ppc_md.cpu_die();
+
+       /* If we return, we re-enter start_secondary */
+       start_secondary_resume();
 }
+
 #endif
index aa92696..375480c 100644 (file)
@@ -577,14 +577,21 @@ void timer_interrupt(struct pt_regs * regs)
        struct clock_event_device *evt = &decrementer->event;
        u64 now;
 
+       /* Ensure a positive value is written to the decrementer, or else
+        * some CPUs will continue to take decrementer exceptions.
+        */
+       set_dec(DECREMENTER_MAX);
+
+       /* Some implementations of hotplug will get timer interrupts while
+        * offline, just ignore these
+        */
+       if (!cpu_online(smp_processor_id()))
+               return;
+
        trace_timer_interrupt_entry(regs);
 
        __get_cpu_var(irq_stat).timer_irqs++;
 
-       /* Ensure a positive value is written to the decrementer, or else
-        * some CPUs will continuue to take decrementer exceptions */
-       set_dec(DECREMENTER_MAX);
-
 #if defined(CONFIG_PPC32) && defined(CONFIG_PMAC)
        if (atomic_read(&ppc_n_lost_interrupts) != 0)
                do_IRQ(regs);
index 33cf704..af08922 100644 (file)
@@ -431,7 +431,7 @@ virt_page_table_tlb_miss_fault:
         * The thing is, we know that in normal circumstances, this is
         * always called as a second level tlb miss for SW load or as a first
         * level TLB miss for HW load, so we should be able to peek at the
-        * relevant informations in the first exception frame in the PACA.
+        * relevant information in the first exception frame in the PACA.
         *
         * However, we do need to double check that, because we may just hit
         * a stray kernel pointer or a userland attack trying to hit those
index 2057682..f7b0772 100644 (file)
@@ -46,7 +46,7 @@ config PPC_OF_BOOT_TRAMPOLINE
        help
          Support from booting from Open Firmware or yaboot using an
          Open Firmware client interface. This enables the kernel to
-         communicate with open firmware to retrieve system informations
+         communicate with open firmware to retrieve system information
          such as the device tree.
 
          In case of doubt, say Y
index f0bc08f..20468f4 100644 (file)
@@ -33,7 +33,6 @@ extern void pmac_setup_pci_dma(void);
 extern void pmac_check_ht_link(void);
 
 extern void pmac_setup_smp(void);
-extern void pmac32_cpu_die(void);
 extern void low_cpu_die(void) __attribute__((noreturn));
 
 extern int pmac_nvram_init(void);
index d5aceb7..aa45281 100644 (file)
@@ -650,51 +650,6 @@ static int pmac_pci_probe_mode(struct pci_bus *bus)
                return PCI_PROBE_NORMAL;
        return PCI_PROBE_DEVTREE;
 }
-
-#ifdef CONFIG_HOTPLUG_CPU
-/* access per cpu vars from generic smp.c */
-DECLARE_PER_CPU(int, cpu_state);
-
-static void pmac64_cpu_die(void)
-{
-       /*
-        * turn off as much as possible, we'll be
-        * kicked out as this will only be invoked
-        * on core99 platforms for now ...
-        */
-
-       printk(KERN_INFO "CPU#%d offline\n", smp_processor_id());
-       __get_cpu_var(cpu_state) = CPU_DEAD;
-       smp_wmb();
-
-       /*
-        * during the path that leads here preemption is disabled,
-        * reenable it now so that when coming up preempt count is
-        * zero correctly
-        */
-       preempt_enable();
-
-       /*
-        * hard-disable interrupts for the non-NAP case, the NAP code
-        * needs to re-enable interrupts (but soft-disables them)
-        */
-       hard_irq_disable();
-
-       while (1) {
-               /* let's not take timer interrupts too often ... */
-               set_dec(0x7fffffff);
-
-               /* should always be true at this point */
-               if (cpu_has_feature(CPU_FTR_CAN_NAP))
-                       power4_cpu_offline_powersave();
-               else {
-                       HMT_low();
-                       HMT_very_low();
-               }
-       }
-}
-#endif /* CONFIG_HOTPLUG_CPU */
-
 #endif /* CONFIG_PPC64 */
 
 define_machine(powermac) {
@@ -726,15 +681,4 @@ define_machine(powermac) {
        .pcibios_after_init     = pmac_pcibios_after_init,
        .phys_mem_access_prot   = pci_phys_mem_access_prot,
 #endif
-#ifdef CONFIG_HOTPLUG_CPU
-#ifdef CONFIG_PPC64
-       .cpu_die                = pmac64_cpu_die,
-#endif
-#ifdef CONFIG_PPC32
-       .cpu_die                = pmac32_cpu_die,
-#endif
-#endif
-#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32)
-       .cpu_die                = generic_mach_cpu_die,
-#endif
 };
index c95215f..a830c5e 100644 (file)
@@ -840,92 +840,149 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
 
        /* Setup openpic */
        mpic_setup_this_cpu();
+}
 
-       if (cpu_nr == 0) {
-#ifdef CONFIG_PPC64
-               extern void g5_phy_disable_cpu1(void);
+#ifdef CONFIG_HOTPLUG_CPU
+static int smp_core99_cpu_notify(struct notifier_block *self,
+                                unsigned long action, void *hcpu)
+{
+       int rc;
 
-               /* Close i2c bus if it was used for tb sync */
+       switch(action) {
+       case CPU_UP_PREPARE:
+       case CPU_UP_PREPARE_FROZEN:
+               /* Open i2c bus if it was used for tb sync */
                if (pmac_tb_clock_chip_host) {
-                       pmac_i2c_close(pmac_tb_clock_chip_host);
-                       pmac_tb_clock_chip_host = NULL;
+                       rc = pmac_i2c_open(pmac_tb_clock_chip_host, 1);
+                       if (rc) {
+                               pr_err("Failed to open i2c bus for time sync\n");
+                               return notifier_from_errno(rc);
+                       }
                }
+               break;
+       case CPU_ONLINE:
+       case CPU_UP_CANCELED:
+               /* Close i2c bus if it was used for tb sync */
+               if (pmac_tb_clock_chip_host)
+                       pmac_i2c_close(pmac_tb_clock_chip_host);
+               break;
+       default:
+               break;
+       }
+       return NOTIFY_OK;
+}
 
-               /* If we didn't start the second CPU, we must take
-                * it off the bus
-                */
-               if (of_machine_is_compatible("MacRISC4") &&
-                   num_online_cpus() < 2)              
-                       g5_phy_disable_cpu1();
-#endif /* CONFIG_PPC64 */
+static struct notifier_block __cpuinitdata smp_core99_cpu_nb = {
+       .notifier_call  = smp_core99_cpu_notify,
+};
+#endif /* CONFIG_HOTPLUG_CPU */
+
+static void __init smp_core99_bringup_done(void)
+{
+#ifdef CONFIG_PPC64
+       extern void g5_phy_disable_cpu1(void);
+
+       /* Close i2c bus if it was used for tb sync */
+       if (pmac_tb_clock_chip_host)
+               pmac_i2c_close(pmac_tb_clock_chip_host);
 
-               if (ppc_md.progress)
-                       ppc_md.progress("core99_setup_cpu 0 done", 0x349);
+       /* If we didn't start the second CPU, we must take
+        * it off the bus.
+        */
+       if (of_machine_is_compatible("MacRISC4") &&
+           num_online_cpus() < 2) {
+               set_cpu_present(1, false);
+               g5_phy_disable_cpu1();
        }
-}
+#endif /* CONFIG_PPC64 */
 
+#ifdef CONFIG_HOTPLUG_CPU
+       register_cpu_notifier(&smp_core99_cpu_nb);
+#endif
+       if (ppc_md.progress)
+               ppc_md.progress("smp_core99_bringup_done", 0x349);
+}
 
-#if defined(CONFIG_HOTPLUG_CPU) && defined(CONFIG_PPC32)
+#ifdef CONFIG_HOTPLUG_CPU
 
-int smp_core99_cpu_disable(void)
+static int smp_core99_cpu_disable(void)
 {
-       set_cpu_online(smp_processor_id(), false);
+       int rc = generic_cpu_disable();
+       if (rc)
+               return rc;
 
-       /* XXX reset cpu affinity here */
        mpic_cpu_set_priority(0xf);
-       asm volatile("mtdec %0" : : "r" (0x7fffffff));
-       mb();
-       udelay(20);
-       asm volatile("mtdec %0" : : "r" (0x7fffffff));
+
        return 0;
 }
 
-static int cpu_dead[NR_CPUS];
+#ifdef CONFIG_PPC32
 
-void pmac32_cpu_die(void)
+static void pmac_cpu_die(void)
 {
+       int cpu = smp_processor_id();
+
        local_irq_disable();
-       cpu_dead[smp_processor_id()] = 1;
+       idle_task_exit();
+       pr_debug("CPU%d offline\n", cpu);
+       generic_set_cpu_dead(cpu);
+       smp_wmb();
        mb();
        low_cpu_die();
 }
 
-void smp_core99_cpu_die(unsigned int cpu)
+#else /* CONFIG_PPC32 */
+
+static void pmac_cpu_die(void)
 {
-       int timeout;
+       int cpu = smp_processor_id();
 
-       timeout = 1000;
-       while (!cpu_dead[cpu]) {
-               if (--timeout == 0) {
-                       printk("CPU %u refused to die!\n", cpu);
-                       break;
-               }
-               msleep(1);
+       local_irq_disable();
+       idle_task_exit();
+
+       /*
+        * turn off as much as possible, we'll be
+        * kicked out as this will only be invoked
+        * on core99 platforms for now ...
+        */
+
+       printk(KERN_INFO "CPU#%d offline\n", cpu);
+       generic_set_cpu_dead(cpu);
+       smp_wmb();
+
+       /*
+        * Re-enable interrupts. The NAP code needs to enable them
+        * anyways, do it now so we deal with the case where one already
+        * happened while soft-disabled.
+        * We shouldn't get any external interrupts, only decrementer, and the
+        * decrementer handler is safe for use on offline CPUs
+        */
+       local_irq_enable();
+
+       while (1) {
+               /* let's not take timer interrupts too often ... */
+               set_dec(0x7fffffff);
+
+               /* Enter NAP mode */
+               power4_idle();
        }
-       cpu_dead[cpu] = 0;
 }
 
-#endif /* CONFIG_HOTPLUG_CPU && CONFIG_PP32 */
+#endif /* else CONFIG_PPC32 */
+#endif /* CONFIG_HOTPLUG_CPU */
 
 /* Core99 Macs (dual G4s and G5s) */
 struct smp_ops_t core99_smp_ops = {
        .message_pass   = smp_mpic_message_pass,
        .probe          = smp_core99_probe,
+       .bringup_done   = smp_core99_bringup_done,
        .kick_cpu       = smp_core99_kick_cpu,
        .setup_cpu      = smp_core99_setup_cpu,
        .give_timebase  = smp_core99_give_timebase,
        .take_timebase  = smp_core99_take_timebase,
 #if defined(CONFIG_HOTPLUG_CPU)
-# if defined(CONFIG_PPC32)
        .cpu_disable    = smp_core99_cpu_disable,
-       .cpu_die        = smp_core99_cpu_die,
-# endif
-# if defined(CONFIG_PPC64)
-       .cpu_disable    = generic_cpu_disable,
        .cpu_die        = generic_cpu_die,
-       /* intentionally do *NOT* assign cpu_enable,
-        * the generic code will use kick_cpu then! */
-# endif
 #endif
 };
 
@@ -957,5 +1014,10 @@ void __init pmac_setup_smp(void)
                smp_ops = &psurge_smp_ops;
        }
 #endif /* CONFIG_PPC32 */
+
+#ifdef CONFIG_HOTPLUG_CPU
+       ppc_md.cpu_die = pmac_cpu_die;
+#endif
 }
 
+
index 75a6f48..08672d9 100644 (file)
@@ -34,6 +34,4 @@ static inline void set_default_offline_state(int cpu)
 #endif
 
 extern enum cpu_state_vals get_preferred_offline_state(int cpu);
-extern int start_secondary(void);
-extern void start_secondary_resume(void);
 #endif
index c319d04..0007241 100644 (file)
@@ -378,7 +378,7 @@ static int __init pSeries_init_panel(void)
 
        return 0;
 }
-arch_initcall(pSeries_init_panel);
+machine_arch_initcall(pseries, pSeries_init_panel);
 
 static int pseries_set_dabr(unsigned long dabr)
 {
index d6479f9..a509c52 100644 (file)
@@ -112,10 +112,10 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
 
        /* Fixup atomic count: it exited inside IRQ handler. */
        task_thread_info(paca[lcpu].__current)->preempt_count   = 0;
-
+#ifdef CONFIG_HOTPLUG_CPU
        if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE)
                goto out;
-
+#endif
        /* 
         * If the RTAS start-cpu token does not exist then presume the
         * cpu is already spinning.
@@ -130,7 +130,9 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu)
                return 0;
        }
 
+#ifdef CONFIG_HOTPLUG_CPU
 out:
+#endif
        return 1;
 }
 
@@ -144,16 +146,15 @@ static void __devinit smp_xics_setup_cpu(int cpu)
                vpa_init(cpu);
 
        cpumask_clear_cpu(cpu, of_spin_mask);
+#ifdef CONFIG_HOTPLUG_CPU
        set_cpu_current_state(cpu, CPU_STATE_ONLINE);
        set_default_offline_state(cpu);
-
+#endif
 }
 #endif /* CONFIG_XICS */
 
 static void __devinit smp_pSeries_kick_cpu(int nr)
 {
-       long rc;
-       unsigned long hcpuid;
        BUG_ON(nr < 0 || nr >= NR_CPUS);
 
        if (!smp_startup_cpu(nr))
@@ -165,16 +166,20 @@ static void __devinit smp_pSeries_kick_cpu(int nr)
         * the processor will continue on to secondary_start
         */
        paca[nr].cpu_start = 1;
-
+#ifdef CONFIG_HOTPLUG_CPU
        set_preferred_offline_state(nr, CPU_STATE_ONLINE);
 
        if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) {
+               long rc;
+               unsigned long hcpuid;
+
                hcpuid = get_hard_smp_processor_id(nr);
                rc = plpar_hcall_norets(H_PROD, hcpuid);
                if (rc != H_SUCCESS)
                        printk(KERN_ERR "Error: Prod to wake up processor %d "
                                                "Ret= %ld\n", nr, rc);
        }
+#endif
 }
 
 static int smp_pSeries_cpu_bootable(unsigned int nr)
index 2f475d7..9d897b6 100644 (file)
 #define __NR_name_to_handle_at 332
 #define __NR_open_by_handle_at 333
 #define __NR_clock_adjtime     334
+#define __NR_syncfs            335
 
-#define NR_syscalls            335
+#define NR_syscalls            336
 
 #ifdef __32bit_syscall_numbers__
 /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants,
index 2abace0..773091a 100644 (file)
@@ -93,7 +93,7 @@ void auxio_set_lte(int on)
 }
 EXPORT_SYMBOL(auxio_set_lte);
 
-static struct of_device_id __initdata auxio_match[] = {
+static const struct of_device_id auxio_match[] = {
        {
                .name = "auxio",
        },
index 136d371..7eef3f7 100644 (file)
@@ -140,7 +140,7 @@ out_free:
        goto out;
 }
 
-static struct of_device_id __initdata clock_board_match[] = {
+static const struct of_device_id clock_board_match[] = {
        {
                .name = "clock-board",
        },
@@ -245,7 +245,7 @@ out_free:
        goto out;
 }
 
-static struct of_device_id __initdata fhc_match[] = {
+static const struct of_device_id fhc_match[] = {
        {
                .name = "fhc",
        },
index 4a700f4..3add4de 100644 (file)
@@ -1218,7 +1218,7 @@ static int ds_remove(struct vio_dev *vdev)
        return 0;
 }
 
-static struct vio_device_id __initdata ds_match[] = {
+static const struct vio_device_id ds_match[] = {
        {
                .type = "domain-services-port",
        },
index 8e607b3..6da784a 100644 (file)
@@ -1283,7 +1283,7 @@ linux_syscall_trace:
        .globl  ret_from_fork
 ret_from_fork:
        call    schedule_tail
-        mov    %g3, %o0
+        ld     [%g3 + TI_TASK], %o0
        b       ret_sys_call
         ld     [%sp + STACKFRAME_SZ + PT_I0], %o0
 
index 6addb91..56db064 100644 (file)
@@ -107,7 +107,7 @@ static struct mdesc_handle * __init mdesc_memblock_alloc(unsigned int mdesc_size
        return hp;
 }
 
-static void mdesc_memblock_free(struct mdesc_handle *hp)
+static void __init mdesc_memblock_free(struct mdesc_handle *hp)
 {
        unsigned int alloc_size;
        unsigned long start;
index 3d70f83..d29a32f 100644 (file)
@@ -496,7 +496,7 @@ out_err:
        return err;
 }
 
-static struct of_device_id __initdata fire_match[] = {
+static const struct of_device_id fire_match[] = {
        {
                .name = "pci",
                .compatible = "pciex108e,80f0",
index 56ee745..86ae08d 100644 (file)
@@ -592,7 +592,7 @@ out_err:
        return err;
 }
 
-static struct of_device_id __initdata psycho_match[] = {
+static const struct of_device_id psycho_match[] = {
        {
                .name = "pci",
                .compatible = "pci108e,8000",
index 2857073..948068a 100644 (file)
@@ -581,7 +581,7 @@ out_err:
        return err;
 }
 
-static struct of_device_id __initdata sabre_match[] = {
+static const struct of_device_id sabre_match[] = {
        {
                .name = "pci",
                .compatible = "pci108e,a001",
index 1d41af7..fecfcb2 100644 (file)
@@ -1470,7 +1470,7 @@ static int __devinit schizo_probe(struct platform_device *op)
  * and pci108e,8001.  So list the chips in reverse chronological
  * order.
  */
-static struct of_device_id __initdata schizo_match[] = {
+static const struct of_device_id schizo_match[] = {
        {
                .name = "pci",
                .compatible = "pci108e,a801",
index 6cf5346..b01a06e 100644 (file)
@@ -998,7 +998,7 @@ out_err:
        return err;
 }
 
-static struct of_device_id __initdata pci_sun4v_match[] = {
+static const struct of_device_id pci_sun4v_match[] = {
        {
                .name = "pci",
                .compatible = "SUNW,sun4v-pci",
index cd725fe..cb4c0f5 100644 (file)
@@ -52,7 +52,7 @@ static int __devinit power_probe(struct platform_device *op)
        return 0;
 }
 
-static struct of_device_id __initdata power_match[] = {
+static const struct of_device_id power_match[] = {
        {
                .name = "power",
        },
index 4b86eaf..47ac73c 100644 (file)
@@ -84,4 +84,4 @@ sys_call_table:
 /*320*/        .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
 /*325*/        .long sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
 /*330*/        .long sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
-
+/*335*/        .long sys_syncfs
index 0331baf..4f3170c 100644 (file)
@@ -85,6 +85,7 @@ sys_call_table32:
 /*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, compat_sys_preadv
        .word compat_sys_pwritev, compat_sys_rt_tgsigqueueinfo, sys_perf_event_open, compat_sys_recvmmsg, sys_fanotify_init
 /*330*/        .word sys32_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, compat_sys_open_by_handle_at, compat_sys_clock_adjtime
+       .word sys_syncfs
 
 #endif /* CONFIG_COMPAT */
 
@@ -161,3 +162,4 @@ sys_call_table:
 /*320*/        .word sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4, sys_preadv
        .word sys_pwritev, sys_rt_tgsigqueueinfo, sys_perf_event_open, sys_recvmmsg, sys_fanotify_init
 /*330*/        .word sys_fanotify_mark, sys_prlimit64, sys_name_to_handle_at, sys_open_by_handle_at, sys_clock_adjtime
+       .word sys_syncfs
index 95ec25f..2b8d54b 100644 (file)
@@ -442,7 +442,7 @@ static int __devinit rtc_probe(struct platform_device *op)
        return platform_device_register(&rtc_cmos_device);
 }
 
-static struct of_device_id __initdata rtc_match[] = {
+static const struct of_device_id rtc_match[] = {
        {
                .name = "rtc",
                .compatible = "m5819",
@@ -487,7 +487,7 @@ static int __devinit bq4802_probe(struct platform_device *op)
        return platform_device_register(&rtc_bq4802_device);
 }
 
-static struct of_device_id __initdata bq4802_match[] = {
+static const struct of_device_id bq4802_match[] = {
        {
                .name = "rtc",
                .compatible = "bq4802",
@@ -552,7 +552,7 @@ static int __devinit mostek_probe(struct platform_device *op)
        return platform_device_register(&m48t59_rtc);
 }
 
-static struct of_device_id __initdata mostek_match[] = {
+static const struct of_device_id mostek_match[] = {
        {
                .name = "eeprom",
        },
index e08d6d3..76a8bee 100644 (file)
@@ -48,7 +48,7 @@ ASM_GENERIC_HEADERS   += bitsperlong.h bug.h bugs.h
 ASM_GENERIC_HEADERS    += cputime.h current.h
 ASM_GENERIC_HEADERS    += device.h div64.h
 ASM_GENERIC_HEADERS    += emergency-restart.h errno.h
-ASM_GENERIC_HEADERS    += fb.h fcntl.h ftrace.h
+ASM_GENERIC_HEADERS    += fb.h fcntl.h ftrace.h futex.h
 ASM_GENERIC_HEADERS    += hardirq.h hw_irq.h
 ASM_GENERIC_HEADERS    += ioctl.h ioctls.h ipcbuf.h irq_regs.h
 ASM_GENERIC_HEADERS    += kdebug.h kmap_types.h
diff --git a/arch/unicore32/include/asm/futex.h b/arch/unicore32/include/asm/futex.h
deleted file mode 100644 (file)
index 07dea61..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * linux/arch/unicore32/include/asm/futex.h
- *
- * Code specific to PKUnity SoC and UniCore ISA
- *
- * Copyright (C) 2001-2010 GUAN Xue-tao
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __UNICORE_FUTEX_H__
-#define __UNICORE_FUTEX_H__
-
-#ifdef __KERNEL__
-
-#include <linux/futex.h>
-#include <linux/preempt.h>
-#include <linux/uaccess.h>
-#include <linux/errno.h>
-
-#define __futex_atomic_op(insn, ret, oldval, uaddr, oparg)     \
-       __asm__ __volatile__(                                   \
-       "1:     ldw.u   %1, [%2]\n"                             \
-       "       " insn "\n"                                     \
-       "2:     stw.u   %0, [%2]\n"                             \
-       "       mov     %0, #0\n"                               \
-       "3:\n"                                                  \
-       "       .pushsection __ex_table,\"a\"\n"                \
-       "       .align  3\n"                                    \
-       "       .long   1b, 4f, 2b, 4f\n"                       \
-       "       .popsection\n"                                  \
-       "       .pushsection .fixup,\"ax\"\n"                   \
-       "4:     mov     %0, %4\n"                               \
-       "       b       3b\n"                                   \
-       "       .popsection"                                    \
-       : "=&r" (ret), "=&r" (oldval)                           \
-       : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT)              \
-       : "cc", "memory")
-
-static inline int
-futex_atomic_op_inuser(int encoded_op, int __user *uaddr)
-{
-       int op = (encoded_op >> 28) & 7;
-       int cmp = (encoded_op >> 24) & 15;
-       int oparg = (encoded_op << 8) >> 20;
-       int cmparg = (encoded_op << 20) >> 20;
-       int oldval = 0, ret;
-
-       if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
-               oparg = 1 << oparg;
-
-       if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
-               return -EFAULT;
-
-       pagefault_disable();    /* implies preempt_disable() */
-
-       switch (op) {
-       case FUTEX_OP_SET:
-               __futex_atomic_op("mov  %0, %3", ret, oldval, uaddr, oparg);
-               break;
-       case FUTEX_OP_ADD:
-               __futex_atomic_op("add  %0, %1, %3", ret, oldval, uaddr, oparg);
-               break;
-       case FUTEX_OP_OR:
-               __futex_atomic_op("or   %0, %1, %3", ret, oldval, uaddr, oparg);
-               break;
-       case FUTEX_OP_ANDN:
-               __futex_atomic_op("and  %0, %1, %3",
-                               ret, oldval, uaddr, ~oparg);
-               break;
-       case FUTEX_OP_XOR:
-               __futex_atomic_op("xor  %0, %1, %3", ret, oldval, uaddr, oparg);
-               break;
-       default:
-               ret = -ENOSYS;
-       }
-
-       pagefault_enable();     /* subsumes preempt_enable() */
-
-       if (!ret) {
-               switch (cmp) {
-               case FUTEX_OP_CMP_EQ:
-                       ret = (oldval == cmparg);
-                       break;
-               case FUTEX_OP_CMP_NE:
-                       ret = (oldval != cmparg);
-                       break;
-               case FUTEX_OP_CMP_LT:
-                       ret = (oldval <  cmparg);
-                       break;
-               case FUTEX_OP_CMP_GE:
-                       ret = (oldval >= cmparg);
-                       break;
-               case FUTEX_OP_CMP_LE:
-                       ret = (oldval <= cmparg);
-                       break;
-               case FUTEX_OP_CMP_GT:
-                       ret = (oldval >  cmparg);
-                       break;
-               default:
-                       ret = -ENOSYS;
-               }
-       }
-       return ret;
-}
-
-static inline int
-futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
-{
-       int val;
-
-       if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int)))
-               return -EFAULT;
-
-       pagefault_disable();    /* implies preempt_disable() */
-
-       __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n"
-       "1:     ldw.u   %0, [%3]\n"
-       "       cmpxor.a        %0, %1\n"
-       "       bne     3f\n"
-       "2:     stw.u   %2, [%3]\n"
-       "3:\n"
-       "       .pushsection __ex_table,\"a\"\n"
-       "       .align  3\n"
-       "       .long   1b, 4f, 2b, 4f\n"
-       "       .popsection\n"
-       "       .pushsection .fixup,\"ax\"\n"
-       "4:     mov     %0, %4\n"
-       "       b       3b\n"
-       "       .popsection"
-       : "=&r" (val)
-       : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT)
-       : "cc", "memory");
-
-       pagefault_enable();     /* subsumes preempt_enable() */
-
-       return val;
-}
-
-#endif /* __KERNEL__ */
-#endif /* __UNICORE_FUTEX_H__ */
index a18bdc3..8040d57 100644 (file)
 #define PKUNITY_MMIO_BASE              0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */
 
 /*
- * PKUNITY Memory Map Addresses: 0x0D000000 - 0x0EFFFFFF (32MB)
- *     0x0D000000 - 0x0DFFFFFF 16MB: for UVC
- *     0x0E000000 - 0x0EFFFFFF 16MB: for UNIGFX
- */
-#define PKUNITY_UVC_MMAP_BASE          0x0D000000
-#define PKUNITY_UVC_MMAP_SIZE          0x01000000 /* 16MB */
-#define PKUNITY_UNIGFX_MMAP_BASE        0x0E000000
-#define PKUNITY_UNIGFX_MMAP_SIZE        0x01000000 /* 16MB */
-
-/*
  * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB)
  * 0x80000000 - 0x8000000B 12B    PCI Configuration regs
  * 0x80010000 - 0x80010250 592B   PCI Bridge Base
index 0bf21c9..4be72c2 100644 (file)
@@ -50,7 +50,6 @@ void puv3_pci_adjust_zones(unsigned long *size, unsigned long *holes);
 
 /* kuser area */
 #define KUSER_VECPAGE_BASE     (KUSER_BASE + UL(0x3fff0000))
-#define KUSER_UNIGFX_BASE      (PAGE_OFFSET + PKUNITY_UNIGFX_MMAP_BASE)
 /* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */
 #define kuser_vecpage_to_vectors(x)    ((x) - (KUSER_VECPAGE_BASE)     \
                                        + (VECTORS_BASE))
index 8b1b6be..1a505a7 100644 (file)
@@ -99,11 +99,6 @@ static struct resource puv3_unigfx_resources[] = {
                .end    = io_v2p(PKUNITY_UNIGFX_BASE) + 0xfff,
                .flags  = IORESOURCE_MEM,
        },
-       [1] = {
-               .start  = PKUNITY_UNIGFX_MMAP_BASE,
-               .end    = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE,
-               .flags  = IORESOURCE_MEM,
-       },
 };
 
 static struct resource puv3_rtc_resources[] = {
index c5f0682..8cad70b 100644 (file)
@@ -88,11 +88,6 @@ static int puv3_rtc_setpie(struct device *dev, int enabled)
        return 0;
 }
 
-static int puv3_rtc_setfreq(struct device *dev, int freq)
-{
-       return 0;
-}
-
 /* Time read/write */
 
 static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm)
@@ -214,8 +209,6 @@ static const struct rtc_class_ops puv3_rtcops = {
        .set_time       = puv3_rtc_settime,
        .read_alarm     = puv3_rtc_getalarm,
        .set_alarm      = puv3_rtc_setalarm,
-       .irq_set_freq   = puv3_rtc_setfreq,
-       .irq_set_state  = puv3_rtc_setpie,
        .proc           = puv3_rtc_proc,
 };
 
@@ -294,8 +287,6 @@ static int puv3_rtc_probe(struct platform_device *pdev)
 
        puv3_rtc_enable(pdev, 1);
 
-       puv3_rtc_setfreq(&pdev->dev, 1);
-
        /* register RTC and exit */
 
        rtc = rtc_device_register("pkunity", &pdev->dev, &puv3_rtcops,
index 1e175a8..471b6bc 100644 (file)
@@ -64,12 +64,6 @@ static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
  */
 static struct resource mem_res[] = {
        {
-               .name = "Video RAM",
-               .start = 0,
-               .end = 0,
-               .flags = IORESOURCE_MEM
-       },
-       {
                .name = "Kernel text",
                .start = 0,
                .end = 0,
@@ -83,9 +77,8 @@ static struct resource mem_res[] = {
        }
 };
 
-#define video_ram   mem_res[0]
-#define kernel_code mem_res[1]
-#define kernel_data mem_res[2]
+#define kernel_code mem_res[0]
+#define kernel_data mem_res[1]
 
 /*
  * These functions re-use the assembly code in head.S, which
@@ -224,10 +217,6 @@ request_standard_resources(struct meminfo *mi)
                    kernel_data.end <= res->end)
                        request_resource(res, &kernel_data);
        }
-
-       video_ram.start = PKUNITY_UNIGFX_MMAP_BASE;
-       video_ram.end   = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE;
-       request_resource(&iomem_resource, &video_ram);
 }
 
 static void (*init_machine)(void) __initdata;
index 25abbb1..254e36f 100644 (file)
@@ -22,7 +22,6 @@
 #include <linux/delay.h>
 #include <linux/hardirq.h>
 #include <linux/init.h>
-#include <linux/uaccess.h>
 #include <linux/atomic.h>
 #include <linux/unistd.h>
 
index 0b4eb89..9bf7f7a 100644 (file)
@@ -14,6 +14,7 @@
 #include <asm/thread_info.h>
 #include <asm/memory.h>
 #include <asm/page.h>
+#include <asm/cache.h>
 
 OUTPUT_ARCH(unicore32)
 ENTRY(stext)
@@ -29,7 +30,7 @@ SECTIONS
        HEAD_TEXT_SECTION
        INIT_TEXT_SECTION(PAGE_SIZE)
        INIT_DATA_SECTION(16)
-       PERCPU(PAGE_SIZE)
+       PERCPU(L1_CACHE_BYTES, PAGE_SIZE)
        __init_end = .;
 
        _stext = .;
@@ -45,10 +46,10 @@ SECTIONS
 
        _sdata = .;
        RO_DATA_SECTION(PAGE_SIZE)
-       RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
+       RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
        _edata = .;
 
-       EXCEPTION_TABLE(32)
+       EXCEPTION_TABLE(L1_CACHE_BYTES)
        NOTES
 
        BSS_SECTION(0, 0, 0)
index 7bf3d58..db2d334 100644 (file)
@@ -338,15 +338,6 @@ void __init uc32_mm_memblock_reserve(void)
         * and can only be in node 0.
         */
        memblock_reserve(__pa(swapper_pg_dir), PTRS_PER_PGD * sizeof(pgd_t));
-
-#ifdef CONFIG_PUV3_UNIGFX
-       /*
-        * These should likewise go elsewhere.  They pre-reserve the
-        * screen/video memory region at the 48M~64M of main system memory.
-        */
-       memblock_reserve(PKUNITY_UNIGFX_MMAP_BASE, PKUNITY_UNIGFX_MMAP_SIZE);
-       memblock_reserve(PKUNITY_UVC_MMAP_BASE, PKUNITY_UVC_MMAP_SIZE);
-#endif
 }
 
 /*
@@ -371,17 +362,6 @@ static void __init devicemaps_init(void)
                pmd_clear(pmd_off_k(addr));
 
        /*
-        * Create a mapping for UniGFX VRAM
-        */
-#ifdef CONFIG_PUV3_UNIGFX
-       map.pfn = __phys_to_pfn(PKUNITY_UNIGFX_MMAP_BASE);
-       map.virtual = KUSER_UNIGFX_BASE;
-       map.length = PKUNITY_UNIGFX_MMAP_SIZE;
-       map.type = MT_KUSER;
-       create_mapping(&map);
-#endif
-
-       /*
         * Create a mapping for the machine vectors at the high-vectors
         * location (0xffff0000).  If we aren't using high-vectors, also
         * create a mapping at the low-vectors virtual address.
index a279d98..2b7d573 100644 (file)
@@ -2,7 +2,6 @@
 #define _ASM_X86_APIC_H
 
 #include <linux/cpumask.h>
-#include <linux/delay.h>
 #include <linux/pm.h>
 
 #include <asm/alternative.h>
index 97b6d81..057099e 100644 (file)
@@ -10,7 +10,6 @@
 
 #include <linux/spinlock.h>    /* And spinlocks */
 #include <asm/io.h>            /* need byte IO */
-#include <linux/delay.h>
 
 #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER
 #define dma_outb       outb_p
index 6801959..4c39baa 100644 (file)
@@ -21,7 +21,7 @@ const struct pci_device_id amd_nb_misc_ids[] = {
 EXPORT_SYMBOL(amd_nb_misc_ids);
 
 static struct pci_device_id amd_nb_link_ids[] = {
-       { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_LINK) },
+       { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
        {}
 };
 
index c4e557a..5260fe9 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/kprobes.h>
 #include <linux/nmi.h>
 #include <linux/module.h>
+#include <linux/delay.h>
 
 #ifdef CONFIG_HARDLOCKUP_DETECTOR
 u64 hw_nmi_get_sample_period(void)
index 3c28928..33b10a0 100644 (file)
@@ -23,6 +23,8 @@
 #include <linux/io.h>
 #include <linux/pci.h>
 #include <linux/kdebug.h>
+#include <linux/delay.h>
+#include <linux/crash_dump.h>
 
 #include <asm/uv/uv_mmrs.h>
 #include <asm/uv/uv_hub.h>
@@ -34,6 +36,7 @@
 #include <asm/ipi.h>
 #include <asm/smp.h>
 #include <asm/x86_init.h>
+#include <asm/emergency-restart.h>
 
 DEFINE_PER_CPU(int, x2apic_extra_bits);
 
@@ -810,4 +813,11 @@ void __init uv_system_init(void)
 
        /* register Legacy VGA I/O redirection handler */
        pci_register_set_vga_state(uv_set_vga_state);
+
+       /*
+        * For a kdump kernel the reset must be BOOT_ACPI, not BOOT_EFI, as
+        * EFI is not enabled in the kdump kernel.
+        */
+       if (is_kdump_kernel())
+               reboot_type = BOOT_ACPI;
 }
index 5a05ef6..3385ea2 100644 (file)
@@ -1626,7 +1626,7 @@ out:
 static unsigned int mce_poll(struct file *file, poll_table *wait)
 {
        poll_wait(file, &mce_wait, wait);
-       if (rcu_dereference_check_mce(mcelog.next))
+       if (rcu_access_index(mcelog.next))
                return POLLIN | POLLRDNORM;
        if (!mce_apei_read_done && apei_check_mce())
                return POLLIN | POLLRDNORM;
index 307dfbb..929739a 100644 (file)
@@ -293,14 +293,24 @@ set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type typ
 
        /*
         * HACK!
-        * We use this same function to initialize the mtrrs on boot.
-        * The state of the boot cpu's mtrrs has been saved, and we want
-        * to replicate across all the APs.
-        * If we're doing that @reg is set to something special...
+        *
+        * We use this same function to initialize the mtrrs during boot,
+        * resume, runtime cpu online and on an explicit request to set a
+        * specific MTRR.
+        *
+        * During boot or suspend, the state of the boot cpu's mtrrs has been
+        * saved, and we want to replicate that across all the cpus that come
+        * online (either at the end of boot or resume or during a runtime cpu
+        * online). If we're doing that, @reg is set to something special and on
+        * this cpu we still do mtrr_if->set_all(). During boot/resume, this
+        * is unnecessary if at this point we are still on the cpu that started
+        * the boot/resume sequence. But there is no guarantee that we are still
+        * on the same cpu. So we do mtrr_if->set_all() on this cpu aswell to be
+        * sure that we are in sync with everyone else.
         */
        if (reg != ~0U)
                mtrr_if->set(reg, base, size, type);
-       else if (!mtrr_aps_delayed_init)
+       else
                mtrr_if->set_all();
 
        /* Wait for the others */
index 948a31e..1cb0b9f 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/seq_file.h>
 #include <linux/smp.h>
 #include <linux/ftrace.h>
+#include <linux/delay.h>
 
 #include <asm/apic.h>
 #include <asm/io_apic.h>
index 5ed0ab5..f924280 100644 (file)
@@ -550,6 +550,7 @@ static void __exit microcode_exit(void)
        microcode_dev_exit();
 
        unregister_hotcpu_notifier(&mc_cpu_notifier);
+       unregister_syscore_ops(&mc_syscore_ops);
 
        get_online_cpus();
        mutex_lock(&microcode_mutex);
index d3ce37e..08c44b0 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/dmi.h>
 #include <linux/sched.h>
 #include <linux/tboot.h>
+#include <linux/delay.h>
 #include <acpi/reboot.h>
 #include <asm/io.h>
 #include <asm/apic.h>
index 8dace18..cf97500 100644 (file)
@@ -49,6 +49,10 @@ u64 op_x86_get_ctrl(struct op_x86_model_spec const *model,
        val |= counter_config->user ? ARCH_PERFMON_EVENTSEL_USR : 0;
        val |= counter_config->kernel ? ARCH_PERFMON_EVENTSEL_OS : 0;
        val |= (counter_config->unit_mask & 0xFF) << 8;
+       counter_config->extra &= (ARCH_PERFMON_EVENTSEL_INV |
+                                 ARCH_PERFMON_EVENTSEL_EDGE |
+                                 ARCH_PERFMON_EVENTSEL_CMASK);
+       val |= counter_config->extra;
        event &= model->event_mask ? model->event_mask : 0xFF;
        val |= event & 0xFF;
        val |= (event & 0x0F00) << 24;
@@ -440,6 +444,7 @@ static int nmi_create_files(struct super_block *sb, struct dentry *root)
                oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask);
                oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel);
                oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user);
+               oprofilefs_create_ulong(sb, dir, "extra", &counter_config[i].extra);
        }
 
        return 0;
index e28398d..0b7b7b1 100644 (file)
@@ -22,6 +22,7 @@ struct op_counter_config {
        unsigned long kernel;
        unsigned long user;
        unsigned long unit_mask;
+       unsigned long extra;
 };
 
 extern struct op_counter_config counter_config[];
index a7b38d3..7cb6424 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/debugfs.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 
 #include <asm/mmu_context.h>
 #include <asm/uv/uv.h>
index 071ae6d..90f22cc 100644 (file)
@@ -2163,7 +2163,7 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
         * size, something has gone terribly wrong.
         */
        if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) {
-               printk(KERN_ERR "blk: request botched\n");
+               blk_dump_rq_flags(req, "request botched");
                req->__data_len = blk_rq_cur_bytes(req);
        }
 
@@ -2665,7 +2665,7 @@ static int plug_rq_cmp(void *priv, struct list_head *a, struct list_head *b)
        struct request *rqa = container_of(a, struct request, queuelist);
        struct request *rqb = container_of(b, struct request, queuelist);
 
-       return !(rqa->q == rqb->q);
+       return !(rqa->q <= rqb->q);
 }
 
 static void flush_plug_list(struct blk_plug *plug)
index 93d5fd8..eba4a27 100644 (file)
@@ -261,7 +261,7 @@ static bool blk_kick_flush(struct request_queue *q)
        q->flush_rq.end_io = flush_end_io;
 
        q->flush_pending_idx ^= 1;
-       elv_insert(q, &q->flush_rq, ELEVATOR_INSERT_REQUEUE);
+       list_add_tail(&q->flush_rq.queuelist, &q->queue_head);
        return true;
 }
 
@@ -281,7 +281,7 @@ static void flush_data_end_io(struct request *rq, int error)
  * blk_insert_flush - insert a new FLUSH/FUA request
  * @rq: request to insert
  *
- * To be called from elv_insert() for %ELEVATOR_INSERT_FLUSH insertions.
+ * To be called from __elv_add_request() for %ELEVATOR_INSERT_FLUSH insertions.
  * @rq is being submitted.  Analyze what needs to be done and put it on the
  * right queue.
  *
@@ -312,7 +312,7 @@ void blk_insert_flush(struct request *rq)
         */
        if ((policy & REQ_FSEQ_DATA) &&
            !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) {
-               list_add(&rq->queuelist, &q->queue_head);
+               list_add_tail(&rq->queuelist, &q->queue_head);
                return;
        }
 
index 54bcba6..129b9e2 100644 (file)
@@ -30,6 +30,8 @@
 
 static struct kmem_cache *integrity_cachep;
 
+static const char *bi_unsupported_name = "unsupported";
+
 /**
  * blk_rq_count_integrity_sg - Count number of integrity scatterlist elements
  * @q:         request queue
@@ -358,6 +360,14 @@ static struct kobj_type integrity_ktype = {
        .release        = blk_integrity_release,
 };
 
+bool blk_integrity_is_initialized(struct gendisk *disk)
+{
+       struct blk_integrity *bi = blk_get_integrity(disk);
+
+       return (bi && bi->name && strcmp(bi->name, bi_unsupported_name) != 0);
+}
+EXPORT_SYMBOL(blk_integrity_is_initialized);
+
 /**
  * blk_integrity_register - Register a gendisk as being integrity-capable
  * @disk:      struct gendisk pointer to make integrity-aware
@@ -407,7 +417,7 @@ int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template)
                bi->get_tag_fn = template->get_tag_fn;
                bi->tag_size = template->tag_size;
        } else
-               bi->name = "unsupported";
+               bi->name = bi_unsupported_name;
 
        return 0;
 }
index c8b16c8..0475a22 100644 (file)
@@ -77,7 +77,7 @@ struct throtl_grp {
        unsigned long slice_end[2];
 
        /* Some throttle limits got updated for the group */
-       bool limits_changed;
+       int limits_changed;
 };
 
 struct throtl_data
@@ -102,7 +102,7 @@ struct throtl_data
        /* Work for dispatching throttled bios */
        struct delayed_work throtl_work;
 
-       bool limits_changed;
+       int limits_changed;
 };
 
 enum tg_state_flags {
index c387d31..0cdb4e7 100644 (file)
@@ -610,7 +610,7 @@ void elv_requeue_request(struct request_queue *q, struct request *rq)
 
        rq->cmd_flags &= ~REQ_STARTED;
 
-       elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE);
+       __elv_add_request(q, rq, ELEVATOR_INSERT_REQUEUE);
 }
 
 void elv_drain_elevator(struct request_queue *q)
@@ -655,12 +655,25 @@ void elv_quiesce_end(struct request_queue *q)
        queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q);
 }
 
-void elv_insert(struct request_queue *q, struct request *rq, int where)
+void __elv_add_request(struct request_queue *q, struct request *rq, int where)
 {
        trace_block_rq_insert(q, rq);
 
        rq->q = q;
 
+       BUG_ON(rq->cmd_flags & REQ_ON_PLUG);
+
+       if (rq->cmd_flags & REQ_SOFTBARRIER) {
+               /* barriers are scheduling boundary, update end_sector */
+               if (rq->cmd_type == REQ_TYPE_FS ||
+                   (rq->cmd_flags & REQ_DISCARD)) {
+                       q->end_sector = rq_end_sector(rq);
+                       q->boundary_rq = rq;
+               }
+       } else if (!(rq->cmd_flags & REQ_ELVPRIV) &&
+                   where == ELEVATOR_INSERT_SORT)
+               where = ELEVATOR_INSERT_BACK;
+
        switch (where) {
        case ELEVATOR_INSERT_REQUEUE:
        case ELEVATOR_INSERT_FRONT:
@@ -722,24 +735,6 @@ void elv_insert(struct request_queue *q, struct request *rq, int where)
                BUG();
        }
 }
-
-void __elv_add_request(struct request_queue *q, struct request *rq, int where)
-{
-       BUG_ON(rq->cmd_flags & REQ_ON_PLUG);
-
-       if (rq->cmd_flags & REQ_SOFTBARRIER) {
-               /* barriers are scheduling boundary, update end_sector */
-               if (rq->cmd_type == REQ_TYPE_FS ||
-                   (rq->cmd_flags & REQ_DISCARD)) {
-                       q->end_sector = rq_end_sector(rq);
-                       q->boundary_rq = rq;
-               }
-       } else if (!(rq->cmd_flags & REQ_ELVPRIV) &&
-                   where == ELEVATOR_INSERT_SORT)
-               where = ELEVATOR_INSERT_BACK;
-
-       elv_insert(q, rq, where);
-}
 EXPORT_SYMBOL(__elv_add_request);
 
 void elv_add_request(struct request_queue *q, struct request *rq, int where)
index 25ef1a4..cd0ff66 100644 (file)
@@ -165,7 +165,6 @@ static uint32_t fpga_tx(struct solos_card *);
 static irqreturn_t solos_irq(int irq, void *dev_id);
 static struct atm_vcc* find_vcc(struct atm_dev *dev, short vpi, int vci);
 static int list_vccs(int vci);
-static void release_vccs(struct atm_dev *dev);
 static int atm_init(struct solos_card *, struct device *);
 static void atm_remove(struct solos_card *);
 static int send_command(struct solos_card *card, int dev, const char *buf, size_t size);
@@ -384,7 +383,6 @@ static int process_status(struct solos_card *card, int port, struct sk_buff *skb
        /* Anything but 'Showtime' is down */
        if (strcmp(state_str, "Showtime")) {
                atm_dev_signal_change(card->atmdev[port], ATM_PHY_SIG_LOST);
-               release_vccs(card->atmdev[port]);
                dev_info(&card->dev->dev, "Port %d: %s\n", port, state_str);
                return 0;
        }
@@ -697,7 +695,7 @@ void solos_bh(unsigned long card_arg)
                                              size);
                        }
                        if (atmdebug) {
-                               dev_info(&card->dev->dev, "Received: device %d\n", port);
+                               dev_info(&card->dev->dev, "Received: port %d\n", port);
                                dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n",
                                         size, le16_to_cpu(header->vpi),
                                         le16_to_cpu(header->vci));
@@ -710,8 +708,8 @@ void solos_bh(unsigned long card_arg)
                                               le16_to_cpu(header->vci));
                                if (!vcc) {
                                        if (net_ratelimit())
-                                               dev_warn(&card->dev->dev, "Received packet for unknown VCI.VPI %d.%d on port %d\n",
-                                                        le16_to_cpu(header->vci), le16_to_cpu(header->vpi),
+                                               dev_warn(&card->dev->dev, "Received packet for unknown VPI.VCI %d.%d on port %d\n",
+                                                        le16_to_cpu(header->vpi), le16_to_cpu(header->vci),
                                                         port);
                                        continue;
                                }
@@ -830,28 +828,6 @@ static int list_vccs(int vci)
        return num_found;
 }
 
-static void release_vccs(struct atm_dev *dev)
-{
-        int i;
-
-        write_lock_irq(&vcc_sklist_lock);
-        for (i = 0; i < VCC_HTABLE_SIZE; i++) {
-                struct hlist_head *head = &vcc_hash[i];
-                struct hlist_node *node, *tmp;
-                struct sock *s;
-                struct atm_vcc *vcc;
-
-                sk_for_each_safe(s, node, tmp, head) {
-                        vcc = atm_sk(s);
-                        if (vcc->dev == dev) {
-                                vcc_release_async(vcc, -EPIPE);
-                                sk_del_node_init(s);
-                        }
-                }
-        }
-        write_unlock_irq(&vcc_sklist_lock);
-}
-
 
 static int popen(struct atm_vcc *vcc)
 {
@@ -1018,8 +994,15 @@ static uint32_t fpga_tx(struct solos_card *card)
 
                        /* Clean up and free oldskb now it's gone */
                        if (atmdebug) {
+                               struct pkt_hdr *header = (void *)oldskb->data;
+                               int size = le16_to_cpu(header->size);
+
+                               skb_pull(oldskb, sizeof(*header));
                                dev_info(&card->dev->dev, "Transmitted: port %d\n",
                                         port);
+                               dev_info(&card->dev->dev, "size: %d VPI: %d VCI: %d\n",
+                                        size, le16_to_cpu(header->vpi),
+                                        le16_to_cpu(header->vci));
                                print_buffer(oldskb);
                        }
 
@@ -1262,7 +1245,7 @@ static int atm_init(struct solos_card *card, struct device *parent)
                card->atmdev[i]->ci_range.vci_bits = 16;
                card->atmdev[i]->dev_data = card;
                card->atmdev[i]->phy_data = (void *)(unsigned long)i;
-               atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_UNKNOWN);
+               atm_dev_signal_change(card->atmdev[i], ATM_PHY_SIG_FOUND);
 
                skb = alloc_skb(sizeof(*header), GFP_ATOMIC);
                if (!skb) {
index 8668114..762a510 100644 (file)
@@ -71,6 +71,9 @@ static struct usb_device_id btusb_table[] = {
        /* Apple MacBookAir3,1, MacBookAir3,2 */
        { USB_DEVICE(0x05ac, 0x821b) },
 
+       /* Apple MacBookPro8,2 */
+       { USB_DEVICE(0x05ac, 0x821a) },
+
        /* AVM BlueFRITZ! USB v2.0 */
        { USB_DEVICE(0x057c, 0x3800) },
 
@@ -690,7 +693,8 @@ static int btusb_send_frame(struct sk_buff *skb)
                break;
 
        case HCI_ACLDATA_PKT:
-               if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1)
+               if (!data->bulk_tx_ep || (hdev->conn_hash.acl_num < 1 &&
+                                               hdev->conn_hash.le_num < 1))
                        return -ENODEV;
 
                urb = usb_alloc_urb(0, GFP_ATOMIC);
index 55653ab..c42c9d5 100644 (file)
 #include <linux/connector.h>
 #include <linux/delay.h>
 
-void cn_queue_wrapper(struct work_struct *work)
-{
-       struct cn_callback_entry *cbq =
-               container_of(work, struct cn_callback_entry, work);
-       struct cn_callback_data *d = &cbq->data;
-       struct cn_msg *msg = NLMSG_DATA(nlmsg_hdr(d->skb));
-       struct netlink_skb_parms *nsp = &NETLINK_CB(d->skb);
-
-       d->callback(msg, nsp);
-
-       kfree_skb(d->skb);
-       d->skb = NULL;
-
-       kfree(d->free);
-}
-
 static struct cn_callback_entry *
-cn_queue_alloc_callback_entry(const char *name, struct cb_id *id,
+cn_queue_alloc_callback_entry(struct cn_queue_dev *dev, const char *name,
+                             struct cb_id *id,
                              void (*callback)(struct cn_msg *, struct netlink_skb_parms *))
 {
        struct cn_callback_entry *cbq;
@@ -59,17 +44,23 @@ cn_queue_alloc_callback_entry(const char *name, struct cb_id *id,
                return NULL;
        }
 
+       atomic_set(&cbq->refcnt, 1);
+
+       atomic_inc(&dev->refcnt);
+       cbq->pdev = dev;
+
        snprintf(cbq->id.name, sizeof(cbq->id.name), "%s", name);
        memcpy(&cbq->id.id, id, sizeof(struct cb_id));
-       cbq->data.callback = callback;
-
-       INIT_WORK(&cbq->work, &cn_queue_wrapper);
+       cbq->callback = callback;
        return cbq;
 }
 
-static void cn_queue_free_callback(struct cn_callback_entry *cbq)
+void cn_queue_release_callback(struct cn_callback_entry *cbq)
 {
-       flush_workqueue(cbq->pdev->cn_queue);
+       if (!atomic_dec_and_test(&cbq->refcnt))
+               return;
+
+       atomic_dec(&cbq->pdev->refcnt);
        kfree(cbq);
 }
 
@@ -85,13 +76,10 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
        struct cn_callback_entry *cbq, *__cbq;
        int found = 0;
 
-       cbq = cn_queue_alloc_callback_entry(name, id, callback);
+       cbq = cn_queue_alloc_callback_entry(dev, name, id, callback);
        if (!cbq)
                return -ENOMEM;
 
-       atomic_inc(&dev->refcnt);
-       cbq->pdev = dev;
-
        spin_lock_bh(&dev->queue_lock);
        list_for_each_entry(__cbq, &dev->queue_list, callback_entry) {
                if (cn_cb_equal(&__cbq->id.id, id)) {
@@ -104,8 +92,7 @@ int cn_queue_add_callback(struct cn_queue_dev *dev, const char *name,
        spin_unlock_bh(&dev->queue_lock);
 
        if (found) {
-               cn_queue_free_callback(cbq);
-               atomic_dec(&dev->refcnt);
+               cn_queue_release_callback(cbq);
                return -EINVAL;
        }
 
@@ -130,10 +117,8 @@ void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id)
        }
        spin_unlock_bh(&dev->queue_lock);
 
-       if (found) {
-               cn_queue_free_callback(cbq);
-               atomic_dec(&dev->refcnt);
-       }
+       if (found)
+               cn_queue_release_callback(cbq);
 }
 
 struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *nls)
@@ -151,12 +136,6 @@ struct cn_queue_dev *cn_queue_alloc_dev(const char *name, struct sock *nls)
 
        dev->nls = nls;
 
-       dev->cn_queue = alloc_ordered_workqueue(dev->name, 0);
-       if (!dev->cn_queue) {
-               kfree(dev);
-               return NULL;
-       }
-
        return dev;
 }
 
@@ -164,9 +143,6 @@ void cn_queue_free_dev(struct cn_queue_dev *dev)
 {
        struct cn_callback_entry *cbq, *n;
 
-       flush_workqueue(dev->cn_queue);
-       destroy_workqueue(dev->cn_queue);
-
        spin_lock_bh(&dev->queue_lock);
        list_for_each_entry_safe(cbq, n, &dev->queue_list, callback_entry)
                list_del(&cbq->callback_entry);
index f7554de..d770058 100644 (file)
@@ -122,51 +122,28 @@ EXPORT_SYMBOL_GPL(cn_netlink_send);
  */
 static int cn_call_callback(struct sk_buff *skb)
 {
-       struct cn_callback_entry *__cbq, *__new_cbq;
+       struct cn_callback_entry *i, *cbq = NULL;
        struct cn_dev *dev = &cdev;
        struct cn_msg *msg = NLMSG_DATA(nlmsg_hdr(skb));
+       struct netlink_skb_parms *nsp = &NETLINK_CB(skb);
        int err = -ENODEV;
 
        spin_lock_bh(&dev->cbdev->queue_lock);
-       list_for_each_entry(__cbq, &dev->cbdev->queue_list, callback_entry) {
-               if (cn_cb_equal(&__cbq->id.id, &msg->id)) {
-                       if (likely(!work_pending(&__cbq->work) &&
-                                       __cbq->data.skb == NULL)) {
-                               __cbq->data.skb = skb;
-
-                               if (queue_work(dev->cbdev->cn_queue,
-                                              &__cbq->work))
-                                       err = 0;
-                               else
-                                       err = -EINVAL;
-                       } else {
-                               struct cn_callback_data *d;
-
-                               err = -ENOMEM;
-                               __new_cbq = kzalloc(sizeof(struct cn_callback_entry), GFP_ATOMIC);
-                               if (__new_cbq) {
-                                       d = &__new_cbq->data;
-                                       d->skb = skb;
-                                       d->callback = __cbq->data.callback;
-                                       d->free = __new_cbq;
-
-                                       INIT_WORK(&__new_cbq->work,
-                                                       &cn_queue_wrapper);
-
-                                       if (queue_work(dev->cbdev->cn_queue,
-                                                      &__new_cbq->work))
-                                               err = 0;
-                                       else {
-                                               kfree(__new_cbq);
-                                               err = -EINVAL;
-                                       }
-                               }
-                       }
+       list_for_each_entry(i, &dev->cbdev->queue_list, callback_entry) {
+               if (cn_cb_equal(&i->id.id, &msg->id)) {
+                       atomic_inc(&i->refcnt);
+                       cbq = i;
                        break;
                }
        }
        spin_unlock_bh(&dev->cbdev->queue_lock);
 
+       if (cbq != NULL) {
+               cbq->callback(msg, nsp);
+               kfree_skb(skb);
+               cn_queue_release_callback(cbq);
+       }
+
        return err;
 }
 
index ffb5ad0..38ab8e2 100644 (file)
@@ -1147,13 +1147,14 @@ static struct platform_driver mpc85xx_mc_err_driver = {
 static void __init mpc85xx_mc_clear_rfxe(void *data)
 {
        orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1);
-       mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~0x20000));
+       mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~HID1_RFXE));
 }
 #endif
 
 static int __init mpc85xx_mc_init(void)
 {
        int res = 0;
+       u32 pvr = 0;
 
        printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, "
               "(C) 2006 Montavista Software\n");
@@ -1183,12 +1184,17 @@ static int __init mpc85xx_mc_init(void)
 #endif
 
 #ifdef CONFIG_FSL_SOC_BOOKE
-       /*
-        * need to clear HID1[RFXE] to disable machine check int
-        * so we can catch it
-        */
-       if (edac_op_state == EDAC_OPSTATE_INT)
-               on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0);
+       pvr = mfspr(SPRN_PVR);
+
+       if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
+           (PVR_VER(pvr) == PVR_VER_E500V2)) {
+               /*
+                * need to clear HID1[RFXE] to disable machine check int
+                * so we can catch it
+                */
+               if (edac_op_state == EDAC_OPSTATE_INT)
+                       on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0);
+       }
 #endif
 
        return 0;
@@ -1206,7 +1212,12 @@ static void __exit mpc85xx_mc_restore_hid1(void *data)
 static void __exit mpc85xx_mc_exit(void)
 {
 #ifdef CONFIG_FSL_SOC_BOOKE
-       on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
+       u32 pvr = mfspr(SPRN_PVR);
+
+       if ((PVR_VER(pvr) == PVR_VER_E500V1) ||
+           (PVR_VER(pvr) == PVR_VER_E500V2)) {
+               on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0);
+       }
 #endif
 #ifdef CONFIG_PCI
        platform_driver_unregister(&mpc85xx_pci_err_driver);
index 9c595e3..adc9358 100644 (file)
@@ -1297,7 +1297,7 @@ add_detailed_modes(struct drm_connector *connector, struct edid *edid,
 /**
  * Search EDID for CEA extension block.
  */
-static u8 *drm_find_cea_extension(struct edid *edid)
+u8 *drm_find_cea_extension(struct edid *edid)
 {
        u8 *edid_ext = NULL;
        int i;
@@ -1318,6 +1318,7 @@ static u8 *drm_find_cea_extension(struct edid *edid)
 
        return edid_ext;
 }
+EXPORT_SYMBOL(drm_find_cea_extension);
 
 /**
  * drm_detect_hdmi_monitor - detect whether monitor is hdmi.
index 8342259..d03fc05 100644 (file)
@@ -269,21 +269,6 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)
        return ret;
 }
 
-static bool intel_crt_ddc_probe(struct drm_i915_private *dev_priv, int ddc_bus)
-{
-       u8 buf;
-       struct i2c_msg msgs[] = {
-               {
-                       .addr = 0xA0,
-                       .flags = 0,
-                       .len = 1,
-                       .buf = &buf,
-               },
-       };
-       /* DDC monitor detect: Does it ACK a write to 0xA0? */
-       return i2c_transfer(&dev_priv->gmbus[ddc_bus].adapter, msgs, 1) == 1;
-}
-
 static bool intel_crt_detect_ddc(struct drm_connector *connector)
 {
        struct intel_crt *crt = intel_attached_crt(connector);
@@ -293,11 +278,6 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector)
        if (crt->base.type != INTEL_OUTPUT_ANALOG)
                return false;
 
-       if (intel_crt_ddc_probe(dev_priv, dev_priv->crt_ddc_pin)) {
-               DRM_DEBUG_KMS("CRT detected via DDC:0xa0\n");
-               return true;
-       }
-
        if (intel_ddc_probe(&crt->base, dev_priv->crt_ddc_pin)) {
                struct edid *edid;
                bool is_digital = false;
index 5daa991..f5b0d83 100644 (file)
@@ -39,7 +39,7 @@
                        ret__ = -ETIMEDOUT;                             \
                        break;                                          \
                }                                                       \
-               if (W && !in_dbg_master()) msleep(W);                   \
+               if (W && !(in_atomic() || in_dbg_master())) msleep(W);  \
        }                                                               \
        ret__;                                                          \
 })
index 82d04c5..d3b903b 100644 (file)
@@ -259,7 +259,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
                                if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50))
                                        goto timeout;
                                if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER)
-                                       return 0;
+                                       goto clear_err;
 
                                val = I915_READ(GMBUS3 + reg_offset);
                                do {
@@ -287,7 +287,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
                                if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50))
                                        goto timeout;
                                if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER)
-                                       return 0;
+                                       goto clear_err;
 
                                val = loop = 0;
                                do {
@@ -302,14 +302,31 @@ gmbus_xfer(struct i2c_adapter *adapter,
                if (i + 1 < num && wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_WAIT_PHASE), 50))
                        goto timeout;
                if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER)
-                       return 0;
+                       goto clear_err;
        }
 
-       return num;
+       goto done;
+
+clear_err:
+       /* Toggle the Software Clear Interrupt bit. This has the effect
+        * of resetting the GMBUS controller and so clearing the
+        * BUS_ERROR raised by the slave's NAK.
+        */
+       I915_WRITE(GMBUS1 + reg_offset, GMBUS_SW_CLR_INT);
+       I915_WRITE(GMBUS1 + reg_offset, 0);
+
+done:
+       /* Mark the GMBUS interface as disabled. We will re-enable it at the
+        * start of the next xfer, till then let it sleep.
+        */
+       I915_WRITE(GMBUS0 + reg_offset, 0);
+       return i;
 
 timeout:
        DRM_INFO("GMBUS timed out, falling back to bit banging on pin %d [%s]\n",
                 bus->reg0 & 0xff, bus->adapter.name);
+       I915_WRITE(GMBUS0 + reg_offset, 0);
+
        /* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */
        bus->force_bit = intel_gpio_create(dev_priv, bus->reg0 & 0xff);
        if (!bus->force_bit)
index 1a311ad..a562bd2 100644 (file)
@@ -473,19 +473,13 @@ static enum drm_connector_status
 intel_lvds_detect(struct drm_connector *connector, bool force)
 {
        struct drm_device *dev = connector->dev;
-       enum drm_connector_status status = connector_status_connected;
+       enum drm_connector_status status;
 
        status = intel_panel_detect(dev);
        if (status != connector_status_unknown)
                return status;
 
-       /* ACPI lid methods were generally unreliable in this generation, so
-        * don't even bother.
-        */
-       if (IS_GEN2(dev) || IS_GEN3(dev))
-               return connector_status_connected;
-
-       return status;
+       return connector_status_connected;
 }
 
 /**
@@ -835,25 +829,6 @@ static bool lvds_is_present_in_vbt(struct drm_device *dev,
        return false;
 }
 
-static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin)
-{
-       struct drm_i915_private *dev_priv = dev->dev_private;
-       u8 buf = 0;
-       struct i2c_msg msgs[] = {
-               {
-                       .addr = 0xA0,
-                       .flags = 0,
-                       .len = 1,
-                       .buf = &buf,
-               },
-       };
-       struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter;
-       /* XXX this only appears to work when using GMBUS */
-       if (intel_gmbus_is_forced_bit(i2c))
-               return true;
-       return i2c_transfer(i2c, msgs, 1) == 1;
-}
-
 /**
  * intel_lvds_init - setup LVDS connectors on this device
  * @dev: drm device
@@ -894,11 +869,6 @@ bool intel_lvds_init(struct drm_device *dev)
                }
        }
 
-       if (!intel_lvds_ddc_probe(dev, pin)) {
-               DRM_DEBUG_KMS("LVDS did not respond to DDC probe\n");
-               return false;
-       }
-
        intel_lvds = kzalloc(sizeof(struct intel_lvds), GFP_KERNEL);
        if (!intel_lvds) {
                return false;
index e8b04f4..b52e460 100644 (file)
@@ -97,7 +97,7 @@ nouveau_gem_new(struct drm_device *dev, struct nouveau_channel *chan,
                return -ENOMEM;
        }
 
-       nvbo->bo.persistant_swap_storage = nvbo->gem->filp;
+       nvbo->bo.persistent_swap_storage = nvbo->gem->filp;
        nvbo->gem->driver_private = nvbo;
        return 0;
 }
index 10e41af..b41ec59 100644 (file)
@@ -1009,6 +1009,7 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,
        uint64_t fb_location;
        uint32_t fb_format, fb_pitch_pixels, tiling_flags;
        u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE);
+       u32 tmp;
        int r;
 
        /* no fb bound */
@@ -1137,6 +1138,15 @@ static int dce4_crtc_do_set_base(struct drm_crtc *crtc,
        WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset,
               (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay);
 
+       /* pageflip setup */
+       /* make sure flip is at vb rather than hb */
+       tmp = RREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset);
+       tmp &= ~EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN;
+       WREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp);
+
+       /* set pageflip to happen anywhere in vblank interval */
+       WREG32(EVERGREEN_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0);
+
        if (!atomic && fb && fb != crtc->fb) {
                radeon_fb = to_radeon_framebuffer(fb);
                rbo = gem_to_radeon_bo(radeon_fb->obj);
@@ -1167,6 +1177,7 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc,
        uint64_t fb_location;
        uint32_t fb_format, fb_pitch_pixels, tiling_flags;
        u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE;
+       u32 tmp;
        int r;
 
        /* no fb bound */
@@ -1294,6 +1305,15 @@ static int avivo_crtc_do_set_base(struct drm_crtc *crtc,
        WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset,
               (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay);
 
+       /* pageflip setup */
+       /* make sure flip is at vb rather than hb */
+       tmp = RREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset);
+       tmp &= ~AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN;
+       WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp);
+
+       /* set pageflip to happen anywhere in vblank interval */
+       WREG32(AVIVO_D1MODE_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0);
+
        if (!atomic && fb && fb != crtc->fb) {
                radeon_fb = to_radeon_framebuffer(fb);
                rbo = gem_to_radeon_bo(radeon_fb->obj);
index 941080a..0b0cc74 100644 (file)
@@ -43,17 +43,6 @@ static void evergreen_pcie_gen2_enable(struct radeon_device *rdev);
 
 void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc)
 {
-       struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc];
-       u32 tmp;
-
-       /* make sure flip is at vb rather than hb */
-       tmp = RREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset);
-       tmp &= ~EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN;
-       WREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp);
-
-       /* set pageflip to happen anywhere in vblank interval */
-       WREG32(EVERGREEN_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0);
-
        /* enable the pflip int */
        radeon_irq_kms_pflip_irq_get(rdev, crtc);
 }
index 02d5c41..99768d9 100644 (file)
@@ -675,7 +675,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
                                                        ATOM_ENCODER_CAP_RECORD *cap_record;
                                                        u16 caps = 0;
 
-                                                       while (record->ucRecordType > 0 &&
+                                                       while (record->ucRecordSize > 0 &&
+                                                              record->ucRecordType > 0 &&
                                                               record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) {
                                                                switch (record->ucRecordType) {
                                                                case ATOM_ENCODER_CAP_RECORD_TYPE:
@@ -720,7 +721,8 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
                                                                        break;
                                                        }
 
-                                                       while (record->ucRecordType > 0 &&
+                                                       while (record->ucRecordSize > 0 &&
+                                                              record->ucRecordType > 0 &&
                                                               record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) {
                                                                switch (record->ucRecordType) {
                                                                case ATOM_I2C_RECORD_TYPE:
@@ -782,10 +784,9 @@ bool radeon_get_atom_connector_info_from_object_table(struct drm_device *dev)
                                                ATOM_HPD_INT_RECORD *hpd_record;
                                                ATOM_I2C_ID_CONFIG_ACCESS *i2c_config;
 
-                                               while (record->ucRecordType > 0
-                                                      && record->
-                                                      ucRecordType <=
-                                                      ATOM_MAX_OBJECT_RECORD_NUMBER) {
+                                               while (record->ucRecordSize > 0 &&
+                                                      record->ucRecordType > 0 &&
+                                                      record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) {
                                                        switch (record->ucRecordType) {
                                                        case ATOM_I2C_RECORD_TYPE:
                                                                i2c_record =
index cf602e2..8caf546 100644 (file)
@@ -2079,6 +2079,19 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
                                            DRM_MODE_CONNECTOR_DVII, &ddc_i2c,
                                            CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I,
                                            &hpd);
+               /* TV - TV DAC */
+               ddc_i2c.valid = false;
+               hpd.hpd = RADEON_HPD_NONE;
+               radeon_add_legacy_encoder(dev,
+                                         radeon_get_encoder_enum(dev,
+                                                               ATOM_DEVICE_TV1_SUPPORT,
+                                                               2),
+                                         ATOM_DEVICE_TV1_SUPPORT);
+               radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT,
+                                           DRM_MODE_CONNECTOR_SVIDEO,
+                                           &ddc_i2c,
+                                           CONNECTOR_OBJECT_ID_SVIDEO,
+                                           &hpd);
                break;
        default:
                DRM_INFO("Connector table: %d (invalid)\n",
index 19763f5..876cebc 100644 (file)
@@ -48,17 +48,6 @@ int rs600_mc_wait_for_idle(struct radeon_device *rdev);
 
 void rs600_pre_page_flip(struct radeon_device *rdev, int crtc)
 {
-       struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc];
-       u32 tmp;
-
-       /* make sure flip is at vb rather than hb */
-       tmp = RREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset);
-       tmp &= ~AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN;
-       WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp);
-
-       /* set pageflip to happen anywhere in vblank interval */
-       WREG32(AVIVO_D1MODE_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0);
-
        /* enable the pflip int */
        radeon_irq_kms_pflip_irq_get(rdev, crtc);
 }
index 0b6a55a..2e618b5 100644 (file)
@@ -1168,7 +1168,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
                uint32_t page_alignment,
                unsigned long buffer_start,
                bool interruptible,
-               struct file *persistant_swap_storage,
+               struct file *persistent_swap_storage,
                size_t acc_size,
                void (*destroy) (struct ttm_buffer_object *))
 {
@@ -1211,7 +1211,7 @@ int ttm_bo_init(struct ttm_bo_device *bdev,
        bo->priv_flags = 0;
        bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED);
        bo->seq_valid = false;
-       bo->persistant_swap_storage = persistant_swap_storage;
+       bo->persistent_swap_storage = persistent_swap_storage;
        bo->acc_size = acc_size;
        atomic_inc(&bo->glob->bo_count);
 
@@ -1260,7 +1260,7 @@ int ttm_bo_create(struct ttm_bo_device *bdev,
                        uint32_t page_alignment,
                        unsigned long buffer_start,
                        bool interruptible,
-                       struct file *persistant_swap_storage,
+                       struct file *persistent_swap_storage,
                        struct ttm_buffer_object **p_bo)
 {
        struct ttm_buffer_object *bo;
@@ -1282,7 +1282,7 @@ int ttm_bo_create(struct ttm_bo_device *bdev,
 
        ret = ttm_bo_init(bdev, bo, size, type, placement, page_alignment,
                                buffer_start, interruptible,
-                               persistant_swap_storage, acc_size, NULL);
+                               persistent_swap_storage, acc_size, NULL);
        if (likely(ret == 0))
                *p_bo = bo;
 
@@ -1863,7 +1863,7 @@ static int ttm_bo_swapout(struct ttm_mem_shrink *shrink)
        if (bo->bdev->driver->swap_notify)
                bo->bdev->driver->swap_notify(bo);
 
-       ret = ttm_tt_swapout(bo->ttm, bo->persistant_swap_storage);
+       ret = ttm_tt_swapout(bo->ttm, bo->persistent_swap_storage);
 out:
 
        /**
index 86d5b17..90e23e0 100644 (file)
@@ -332,7 +332,7 @@ void ttm_tt_destroy(struct ttm_tt *ttm)
                ttm_tt_free_page_directory(ttm);
        }
 
-       if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP) &&
+       if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP) &&
            ttm->swap_storage)
                fput(ttm->swap_storage);
 
@@ -503,7 +503,7 @@ static int ttm_tt_swapin(struct ttm_tt *ttm)
                page_cache_release(from_page);
        }
 
-       if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP))
+       if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP))
                fput(swap_storage);
        ttm->swap_storage = NULL;
        ttm->page_flags &= ~TTM_PAGE_FLAG_SWAPPED;
@@ -514,7 +514,7 @@ out_err:
        return ret;
 }
 
-int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
+int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage)
 {
        struct address_space *swap_space;
        struct file *swap_storage;
@@ -540,7 +540,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
                return 0;
        }
 
-       if (!persistant_swap_storage) {
+       if (!persistent_swap_storage) {
                swap_storage = shmem_file_setup("ttm swap",
                                                ttm->num_pages << PAGE_SHIFT,
                                                0);
@@ -549,7 +549,7 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
                        return PTR_ERR(swap_storage);
                }
        } else
-               swap_storage = persistant_swap_storage;
+               swap_storage = persistent_swap_storage;
 
        swap_space = swap_storage->f_path.dentry->d_inode->i_mapping;
 
@@ -577,12 +577,12 @@ int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage)
        ttm_tt_free_alloced_pages(ttm);
        ttm->swap_storage = swap_storage;
        ttm->page_flags |= TTM_PAGE_FLAG_SWAPPED;
-       if (persistant_swap_storage)
-               ttm->page_flags |= TTM_PAGE_FLAG_PERSISTANT_SWAP;
+       if (persistent_swap_storage)
+               ttm->page_flags |= TTM_PAGE_FLAG_PERSISTENT_SWAP;
 
        return 0;
 out_err:
-       if (!persistant_swap_storage)
+       if (!persistent_swap_storage)
                fput(swap_storage);
 
        return ret;
index b7ec405..9de9e97 100644 (file)
@@ -185,7 +185,7 @@ config HID_EZKEY
        Support for Ezkey BTC 8193 keyboard.
 
 config HID_KEYTOUCH
-       tristate "Keyoutch HID devices"
+       tristate "Keytouch HID devices"
        depends on USB_HID
        ---help---
        Support for Keytouch HID devices not fully compliant with
@@ -340,10 +340,17 @@ config HID_NTRIG
        Support for N-Trig touch screen.
 
 config HID_ORTEK
-       tristate "Ortek PKB-1700/WKB-2000 wireless keyboard and mouse trackpad"
+       tristate "Ortek PKB-1700/WKB-2000/Skycable wireless keyboard and mouse trackpad"
        depends on USB_HID
        ---help---
-       Support for Ortek PKB-1700/WKB-2000 wireless keyboard + mouse trackpad.
+       There are certain devices which have LogicalMaximum wrong in the keyboard
+       usage page of their report descriptor. The most prevailing ones so far
+       are manufactured by Ortek, thus the name of the driver. Currently
+       supported devices by this driver are
+
+          - Ortek PKB-1700
+          - Ortek WKB-2000
+          - Skycable wireless presenter
 
 config HID_PANTHERLORD
        tristate "Pantherlord/GreenAsia game controller"
index 453e7e6..408c4be 100644 (file)
@@ -1449,8 +1449,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
index 65ac53d..00a94b5 100644 (file)
 #define USB_DEVICE_ID_CANDO_MULTI_TOUCH_15_6 0x0f01
 
 #define USB_VENDOR_ID_CH               0x068e
+#define USB_DEVICE_ID_CH_PRO_THROTTLE  0x00f1
 #define USB_DEVICE_ID_CH_PRO_PEDALS    0x00f2
 #define USB_DEVICE_ID_CH_COMBATSTICK   0x00f4
 #define USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE       0x0051
 #define USB_DEVICE_ID_SAMSUNG_IR_REMOTE        0x0001
 #define USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE       0x0600
 
+#define USB_VENDOR_ID_SKYCABLE                 0x1223
+#define        USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER       0x3F07
+
 #define USB_VENDOR_ID_SONY                     0x054c
 #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE      0x024b
 #define USB_DEVICE_ID_SONY_PS3_CONTROLLER      0x0268
index 90d0ef2..f099079 100644 (file)
@@ -73,6 +73,8 @@ static const struct dev_type devices[] = {
        { 0x046d, 0xc293, ff_joystick },
        { 0x046d, 0xc294, ff_wheel },
        { 0x046d, 0xc295, ff_joystick },
+       { 0x046d, 0xc298, ff_wheel },
+       { 0x046d, 0xc299, ff_wheel },
        { 0x046d, 0xca03, ff_wheel },
 };
 
index 7a61373..0ec91c1 100644 (file)
@@ -418,6 +418,8 @@ static void magicmouse_setup_input(struct input_dev *input, struct hid_device *h
                        input_set_abs_params(input, ABS_MT_POSITION_Y, -2456,
                                2565, 4, 0);
                }
+
+               input_set_events_per_packet(input, 60);
        }
 
        if (report_undeciphered) {
index f9b7dd4..0ffa1d2 100644 (file)
@@ -1,8 +1,14 @@
 /*
- *  HID driver for Ortek PKB-1700/WKB-2000 (wireless keyboard + mouse trackpad).
- *  Fixes LogicalMaximum error in HID report description.
+ *  HID driver for various devices which are apparently based on the same chipset
+ *  from certain vendor which produces chips that contain wrong LogicalMaximum
+ *  value in their HID report descriptor. Currently supported devices are:
+ *
+ *    Ortek PKB-1700
+ *    Ortek WKB-2000
+ *    Skycable wireless presenter
  *
  *  Copyright (c) 2010 Johnathon Harris <jmharris@gmail.com>
+ *  Copyright (c) 2011 Jiri Kosina
  */
 
 /*
@@ -22,8 +28,11 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
                unsigned int *rsize)
 {
        if (*rsize >= 56 && rdesc[54] == 0x25 && rdesc[55] == 0x01) {
-               hid_info(hdev, "Fixing up Ortek WKB-2000 report descriptor\n");
+               hid_info(hdev, "Fixing up logical minimum in report descriptor (Ortek)\n");
                rdesc[55] = 0x92;
+       } else if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) {
+               hid_info(hdev, "Fixing up logical minimum in report descriptor (Skycable)\n");
+               rdesc[53] = 0x65;
        }
        return rdesc;
 }
@@ -31,6 +40,7 @@ static __u8 *ortek_report_fixup(struct hid_device *hdev, __u8 *rdesc,
 static const struct hid_device_id ortek_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
        { }
 };
 MODULE_DEVICE_TABLE(hid, ortek_devices);
index 160f481..38280c0 100644 (file)
@@ -652,7 +652,8 @@ static int pyra_raw_event(struct hid_device *hdev, struct hid_report *report,
 static const struct hid_device_id pyra_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT,
                        USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
-       /* TODO add USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS after testing */
+       { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT,
+                       USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) },
        { }
 };
 
index 9a94b64..a8426f1 100644 (file)
@@ -59,6 +59,7 @@ static const struct hid_blacklist {
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_COMBATSTICK, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_ECLIPSE_YOKE, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_FLIGHT_SIM_YOKE, HID_QUIRK_NOGET },
+       { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_THROTTLE, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_PRO_PEDALS, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
index 97e22be..de58191 100644 (file)
@@ -154,4 +154,4 @@ module_exit(twl4030_madc_hwmon_exit);
 MODULE_DESCRIPTION("TWL4030 ADC Hwmon driver");
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("J Keerthy");
-MODULE_ALIAS("twl4030_madc_hwmon");
+MODULE_ALIAS("platform:twl4030_madc_hwmon");
index 0e406d7..177db6d 100644 (file)
@@ -430,6 +430,26 @@ static inline void ide_unlock_host(struct ide_host *host)
        }
 }
 
+static void __ide_requeue_and_plug(struct request_queue *q, struct request *rq)
+{
+       if (rq)
+               blk_requeue_request(q, rq);
+       if (rq || blk_peek_request(q)) {
+               /* Use 3ms as that was the old plug delay */
+               blk_delay_queue(q, 3);
+       }
+}
+
+void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq)
+{
+       struct request_queue *q = drive->queue;
+       unsigned long flags;
+
+       spin_lock_irqsave(q->queue_lock, flags);
+       __ide_requeue_and_plug(q, rq);
+       spin_unlock_irqrestore(q->queue_lock, flags);
+}
+
 /*
  * Issue a new request to a device.
  */
@@ -550,28 +570,7 @@ plug_device:
        ide_unlock_host(host);
 plug_device_2:
        spin_lock_irq(q->queue_lock);
-
-       if (rq) {
-               blk_requeue_request(q, rq);
-               blk_delay_queue(q, queue_run_ms);
-       }
-}
-
-void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq)
-{
-       struct request_queue *q = drive->queue;
-       unsigned long flags;
-
-       spin_lock_irqsave(q->queue_lock, flags);
-
-       if (rq)
-               blk_requeue_request(q, rq);
-
-       spin_unlock_irqrestore(q->queue_lock, flags);
-
-       /* Use 3ms as that was the old plug delay */
-       if (rq)
-               blk_delay_queue(q, 3);
+       __ide_requeue_and_plug(q, rq);
 }
 
 static int drive_is_ready(ide_drive_t *drive)
index bee03d6..d712dff 100644 (file)
@@ -69,7 +69,7 @@ static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id)
        u8 sts, val;
 
        sts = readb(kbd->io_base + STATUS_REG);
-       if (sts & DATA_AVAIL)
+       if (!(sts & DATA_AVAIL))
                return IRQ_NONE;
 
        if (kbd->last_key != KEY_RESERVED) {
index 364bdf4..7360568 100644 (file)
@@ -302,10 +302,14 @@ static int uinput_validate_absbits(struct input_dev *dev)
        int retval = 0;
 
        for (cnt = 0; cnt < ABS_CNT; cnt++) {
+               int min, max;
                if (!test_bit(cnt, dev->absbit))
                        continue;
 
-               if (input_abs_get_max(dev, cnt) <= input_abs_get_min(dev, cnt)) {
+               min = input_abs_get_min(dev, cnt);
+               max = input_abs_get_max(dev, cnt);
+
+               if ((min != 0 || max != 0) && max <= min) {
                        printk(KERN_DEBUG
                                "%s: invalid abs[%02x] min:%d max:%d\n",
                                UINPUT_NAME, cnt,
index aa186cf..e06e045 100644 (file)
@@ -836,8 +836,8 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
                },
 
        },
-       { }
 #endif
+       { }
 };
 
 static bool broken_olpc_ec;
@@ -851,8 +851,8 @@ static const struct dmi_system_id __initconst olpc_dmi_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
                },
        },
-       { }
 #endif
+       { }
 };
 
 void __init synaptics_module_init(void)
index ac4c936..d37a48e 100644 (file)
@@ -869,15 +869,15 @@ static int i8042_controller_selftest(void)
        do {
 
                if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
-                       pr_err("i8042 controller self test timeout\n");
+                       pr_err("i8042 controller selftest timeout\n");
                        return -ENODEV;
                }
 
                if (param == I8042_RET_CTL_TEST)
                        return 0;
 
-               pr_err("i8042 controller selftest failed. (%#x != %#x)\n",
-                      param, I8042_RET_CTL_TEST);
+               dbg("i8042 controller selftest: %#x != %#x\n",
+                   param, I8042_RET_CTL_TEST);
                msleep(50);
        } while (i++ < 5);
 
@@ -891,6 +891,7 @@ static int i8042_controller_selftest(void)
        pr_info("giving up on controller selftest, continuing anyway...\n");
        return 0;
 #else
+       pr_err("i8042 controller selftest failed\n");
        return -EIO;
 #endif
 }
index 9da6fbc..7ec3c97 100644 (file)
@@ -90,7 +90,7 @@ static int rpckbd_open(struct serio *port)
 
        if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) {
                printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n");
-               free_irq(IRQ_KEYBOARDRX, NULL);
+               free_irq(IRQ_KEYBOARDRX, port);
                return -EBUSY;
        }
 
index 337bf51..fdb6a39 100644 (file)
@@ -208,6 +208,12 @@ int sparse_keymap_setup(struct input_dev *dev,
                }
        }
 
+       if (test_bit(EV_KEY, dev->evbit)) {
+               __set_bit(KEY_UNKNOWN, dev->keybit);
+               __set_bit(EV_MSC, dev->evbit);
+               __set_bit(MSC_SCAN, dev->mscbit);
+       }
+
        dev->keycode = map;
        dev->keycodemax = map_size;
        dev->getkeycode = sparse_keymap_getkeycode;
@@ -268,6 +274,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k
 {
        switch (ke->type) {
        case KE_KEY:
+               input_event(dev, EV_MSC, MSC_SCAN, ke->code);
                input_report_key(dev, ke->keycode, value);
                input_sync(dev);
                if (value && autorelease) {
@@ -305,12 +312,19 @@ bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code,
 {
        const struct key_entry *ke =
                sparse_keymap_entry_from_scancode(dev, code);
+       struct key_entry unknown_ke;
 
        if (ke) {
                sparse_keymap_report_entry(dev, ke, value, autorelease);
                return true;
        }
 
+       /* Report an unknown key event as a debugging aid */
+       unknown_ke.type = KE_KEY;
+       unknown_ke.code = code;
+       unknown_ke.keycode = KEY_UNKNOWN;
+       sparse_keymap_report_entry(dev, &unknown_ke, value, true);
+
        return false;
 }
 EXPORT_SYMBOL(sparse_keymap_report_event);
index 5597637..08ba5ad 100644 (file)
 #include "wacom.h"
 #include <linux/input/mt.h>
 
+/* resolution for penabled devices */
+#define WACOM_PL_RES           20
+#define WACOM_PENPRTN_RES      40
+#define WACOM_VOLITO_RES       50
+#define WACOM_GRAPHIRE_RES     80
+#define WACOM_INTUOS_RES       100
+#define WACOM_INTUOS3_RES      200
+
 static int wacom_penpartner_irq(struct wacom_wac *wacom)
 {
        unsigned char *data = wacom->data;
@@ -1055,6 +1063,19 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
        input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max,
                             features->pressure_fuzz, 0);
 
+       if (features->device_type == BTN_TOOL_PEN) {
+               /* penabled devices have fixed resolution for each model */
+               input_abs_set_res(input_dev, ABS_X, features->x_resolution);
+               input_abs_set_res(input_dev, ABS_Y, features->y_resolution);
+       } else {
+               input_abs_set_res(input_dev, ABS_X,
+                       wacom_calculate_touch_res(features->x_max,
+                                               features->x_phy));
+               input_abs_set_res(input_dev, ABS_Y,
+                       wacom_calculate_touch_res(features->y_max,
+                                               features->y_phy));
+       }
+
        __set_bit(ABS_MISC, input_dev->absbit);
 
        switch (wacom_wac->features.type) {
@@ -1171,15 +1192,9 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
        case TABLETPC:
                __clear_bit(ABS_MISC, input_dev->absbit);
 
-               if (features->device_type != BTN_TOOL_PEN) {
-                       input_abs_set_res(input_dev, ABS_X,
-                               wacom_calculate_touch_res(features->x_max,
-                                                       features->x_phy));
-                       input_abs_set_res(input_dev, ABS_Y,
-                               wacom_calculate_touch_res(features->y_max,
-                                                       features->y_phy));
+               if (features->device_type != BTN_TOOL_PEN)
                        break;  /* no need to process stylus stuff */
-               }
+
                /* fall through */
 
        case PL:
@@ -1216,12 +1231,6 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
                        input_set_abs_params(input_dev, ABS_MT_PRESSURE,
                                             0, features->pressure_max,
                                             features->pressure_fuzz, 0);
-                       input_abs_set_res(input_dev, ABS_X,
-                               wacom_calculate_touch_res(features->x_max,
-                                                       features->x_phy));
-                       input_abs_set_res(input_dev, ABS_Y,
-                               wacom_calculate_touch_res(features->y_max,
-                                                       features->y_phy));
                } else if (features->device_type == BTN_TOOL_PEN) {
                        __set_bit(BTN_TOOL_RUBBER, input_dev->keybit);
                        __set_bit(BTN_TOOL_PEN, input_dev->keybit);
@@ -1233,161 +1242,242 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev,
 }
 
 static const struct wacom_features wacom_features_0x00 =
-       { "Wacom Penpartner",     WACOM_PKGLEN_PENPRTN,    5040,  3780,  255,  0, PENPARTNER };
+       { "Wacom Penpartner",     WACOM_PKGLEN_PENPRTN,    5040,  3780,  255,
+         0, PENPARTNER, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES };
 static const struct wacom_features wacom_features_0x10 =
-       { "Wacom Graphire",       WACOM_PKGLEN_GRAPHIRE,  10206,  7422,  511, 63, GRAPHIRE };
+       { "Wacom Graphire",       WACOM_PKGLEN_GRAPHIRE,  10206,  7422,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x11 =
-       { "Wacom Graphire2 4x5",  WACOM_PKGLEN_GRAPHIRE,  10206,  7422,  511, 63, GRAPHIRE };
+       { "Wacom Graphire2 4x5",  WACOM_PKGLEN_GRAPHIRE,  10206,  7422,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x12 =
-       { "Wacom Graphire2 5x7",  WACOM_PKGLEN_GRAPHIRE,  13918, 10206,  511, 63, GRAPHIRE };
+       { "Wacom Graphire2 5x7",  WACOM_PKGLEN_GRAPHIRE,  13918, 10206,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x13 =
-       { "Wacom Graphire3",      WACOM_PKGLEN_GRAPHIRE,  10208,  7424,  511, 63, GRAPHIRE };
+       { "Wacom Graphire3",      WACOM_PKGLEN_GRAPHIRE,  10208,  7424,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x14 =
-       { "Wacom Graphire3 6x8",  WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511, 63, GRAPHIRE };
+       { "Wacom Graphire3 6x8",  WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x15 =
-       { "Wacom Graphire4 4x5",  WACOM_PKGLEN_GRAPHIRE,  10208,  7424,  511, 63, WACOM_G4 };
+       { "Wacom Graphire4 4x5",  WACOM_PKGLEN_GRAPHIRE,  10208,  7424,  511,
+         63, WACOM_G4, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x16 =
-       { "Wacom Graphire4 6x8",  WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511, 63, WACOM_G4 };
+       { "Wacom Graphire4 6x8",  WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511,
+         63, WACOM_G4, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x17 =
-       { "Wacom BambooFun 4x5",  WACOM_PKGLEN_BBFUN,     14760,  9225,  511, 63, WACOM_MO };
+       { "Wacom BambooFun 4x5",  WACOM_PKGLEN_BBFUN,     14760,  9225,  511,
+         63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x18 =
-       { "Wacom BambooFun 6x8",  WACOM_PKGLEN_BBFUN,     21648, 13530,  511, 63, WACOM_MO };
+       { "Wacom BambooFun 6x8",  WACOM_PKGLEN_BBFUN,     21648, 13530,  511,
+         63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x19 =
-       { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511, 63, GRAPHIRE };
+       { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE,  16704, 12064,  511,
+         63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES };
 static const struct wacom_features wacom_features_0x60 =
-       { "Wacom Volito",         WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511, 63, GRAPHIRE };
+       { "Wacom Volito",         WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x61 =
-       { "Wacom PenStation2",    WACOM_PKGLEN_GRAPHIRE,   3250,  2320,  255, 63, GRAPHIRE };
+       { "Wacom PenStation2",    WACOM_PKGLEN_GRAPHIRE,   3250,  2320,  255,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x62 =
-       { "Wacom Volito2 4x5",    WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511, 63, GRAPHIRE };
+       { "Wacom Volito2 4x5",    WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x63 =
-       { "Wacom Volito2 2x3",    WACOM_PKGLEN_GRAPHIRE,   3248,  2320,  511, 63, GRAPHIRE };
+       { "Wacom Volito2 2x3",    WACOM_PKGLEN_GRAPHIRE,   3248,  2320,  511,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x64 =
-       { "Wacom PenPartner2",    WACOM_PKGLEN_GRAPHIRE,   3250,  2320,  511, 63, GRAPHIRE };
+       { "Wacom PenPartner2",    WACOM_PKGLEN_GRAPHIRE,   3250,  2320,  511,
+         63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES };
 static const struct wacom_features wacom_features_0x65 =
-       { "Wacom Bamboo",         WACOM_PKGLEN_BBFUN,     14760,  9225,  511, 63, WACOM_MO };
+       { "Wacom Bamboo",         WACOM_PKGLEN_BBFUN,     14760,  9225,  511,
+         63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x69 =
-       { "Wacom Bamboo1",        WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511, 63, GRAPHIRE };
+       { "Wacom Bamboo1",        WACOM_PKGLEN_GRAPHIRE,   5104,  3712,  511,
+         63, GRAPHIRE, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES };
 static const struct wacom_features wacom_features_0x20 =
-       { "Wacom Intuos 4x5",     WACOM_PKGLEN_INTUOS,    12700, 10600, 1023, 31, INTUOS };
+       { "Wacom Intuos 4x5",     WACOM_PKGLEN_INTUOS,    12700, 10600, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x21 =
-       { "Wacom Intuos 6x8",     WACOM_PKGLEN_INTUOS,    20320, 16240, 1023, 31, INTUOS };
+       { "Wacom Intuos 6x8",     WACOM_PKGLEN_INTUOS,    20320, 16240, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x22 =
-       { "Wacom Intuos 9x12",    WACOM_PKGLEN_INTUOS,    30480, 24060, 1023, 31, INTUOS };
+       { "Wacom Intuos 9x12",    WACOM_PKGLEN_INTUOS,    30480, 24060, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x23 =
-       { "Wacom Intuos 12x12",   WACOM_PKGLEN_INTUOS,    30480, 31680, 1023, 31, INTUOS };
+       { "Wacom Intuos 12x12",   WACOM_PKGLEN_INTUOS,    30480, 31680, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x24 =
-       { "Wacom Intuos 12x18",   WACOM_PKGLEN_INTUOS,    45720, 31680, 1023, 31, INTUOS };
+       { "Wacom Intuos 12x18",   WACOM_PKGLEN_INTUOS,    45720, 31680, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x30 =
-       { "Wacom PL400",          WACOM_PKGLEN_GRAPHIRE,   5408,  4056,  255,  0, PL };
+       { "Wacom PL400",          WACOM_PKGLEN_GRAPHIRE,   5408,  4056,  255,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x31 =
-       { "Wacom PL500",          WACOM_PKGLEN_GRAPHIRE,   6144,  4608,  255,  0, PL };
+       { "Wacom PL500",          WACOM_PKGLEN_GRAPHIRE,   6144,  4608,  255,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x32 =
-       { "Wacom PL600",          WACOM_PKGLEN_GRAPHIRE,   6126,  4604,  255,  0, PL };
+       { "Wacom PL600",          WACOM_PKGLEN_GRAPHIRE,   6126,  4604,  255,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x33 =
-       { "Wacom PL600SX",        WACOM_PKGLEN_GRAPHIRE,   6260,  5016,  255,  0, PL };
+       { "Wacom PL600SX",        WACOM_PKGLEN_GRAPHIRE,   6260,  5016,  255,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x34 =
-       { "Wacom PL550",          WACOM_PKGLEN_GRAPHIRE,   6144,  4608,  511,  0, PL };
+       { "Wacom PL550",          WACOM_PKGLEN_GRAPHIRE,   6144,  4608,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x35 =
-       { "Wacom PL800",          WACOM_PKGLEN_GRAPHIRE,   7220,  5780,  511,  0, PL };
+       { "Wacom PL800",          WACOM_PKGLEN_GRAPHIRE,   7220,  5780,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x37 =
-       { "Wacom PL700",          WACOM_PKGLEN_GRAPHIRE,   6758,  5406,  511,  0, PL };
+       { "Wacom PL700",          WACOM_PKGLEN_GRAPHIRE,   6758,  5406,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x38 =
-       { "Wacom PL510",          WACOM_PKGLEN_GRAPHIRE,   6282,  4762,  511,  0, PL };
+       { "Wacom PL510",          WACOM_PKGLEN_GRAPHIRE,   6282,  4762,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x39 =
-       { "Wacom DTU710",         WACOM_PKGLEN_GRAPHIRE,  34080, 27660,  511,  0, PL };
+       { "Wacom DTU710",         WACOM_PKGLEN_GRAPHIRE,  34080, 27660,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0xC4 =
-       { "Wacom DTF521",         WACOM_PKGLEN_GRAPHIRE,   6282,  4762,  511,  0, PL };
+       { "Wacom DTF521",         WACOM_PKGLEN_GRAPHIRE,   6282,  4762,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0xC0 =
-       { "Wacom DTF720",         WACOM_PKGLEN_GRAPHIRE,   6858,  5506,  511,  0, PL };
+       { "Wacom DTF720",         WACOM_PKGLEN_GRAPHIRE,   6858,  5506,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0xC2 =
-       { "Wacom DTF720a",        WACOM_PKGLEN_GRAPHIRE,   6858,  5506,  511,  0, PL };
+       { "Wacom DTF720a",        WACOM_PKGLEN_GRAPHIRE,   6858,  5506,  511,
+         0, PL, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x03 =
-       { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE,  20480, 15360,  511,  0, PTU };
+       { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE,  20480, 15360,  511,
+         0, PTU, WACOM_PL_RES, WACOM_PL_RES };
 static const struct wacom_features wacom_features_0x41 =
-       { "Wacom Intuos2 4x5",    WACOM_PKGLEN_INTUOS,    12700, 10600, 1023, 31, INTUOS };
+       { "Wacom Intuos2 4x5",    WACOM_PKGLEN_INTUOS,    12700, 10600, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x42 =
-       { "Wacom Intuos2 6x8",    WACOM_PKGLEN_INTUOS,    20320, 16240, 1023, 31, INTUOS };
+       { "Wacom Intuos2 6x8",    WACOM_PKGLEN_INTUOS,    20320, 16240, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x43 =
-       { "Wacom Intuos2 9x12",   WACOM_PKGLEN_INTUOS,    30480, 24060, 1023, 31, INTUOS };
+       { "Wacom Intuos2 9x12",   WACOM_PKGLEN_INTUOS,    30480, 24060, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x44 =
-       { "Wacom Intuos2 12x12",  WACOM_PKGLEN_INTUOS,    30480, 31680, 1023, 31, INTUOS };
+       { "Wacom Intuos2 12x12",  WACOM_PKGLEN_INTUOS,    30480, 31680, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x45 =
-       { "Wacom Intuos2 12x18",  WACOM_PKGLEN_INTUOS,    45720, 31680, 1023, 31, INTUOS };
+       { "Wacom Intuos2 12x18",  WACOM_PKGLEN_INTUOS,    45720, 31680, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xB0 =
-       { "Wacom Intuos3 4x5",    WACOM_PKGLEN_INTUOS,    25400, 20320, 1023, 63, INTUOS3S };
+       { "Wacom Intuos3 4x5",    WACOM_PKGLEN_INTUOS,    25400, 20320, 1023,
+         63, INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB1 =
-       { "Wacom Intuos3 6x8",    WACOM_PKGLEN_INTUOS,    40640, 30480, 1023, 63, INTUOS3 };
+       { "Wacom Intuos3 6x8",    WACOM_PKGLEN_INTUOS,    40640, 30480, 1023,
+         63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB2 =
-       { "Wacom Intuos3 9x12",   WACOM_PKGLEN_INTUOS,    60960, 45720, 1023, 63, INTUOS3 };
+       { "Wacom Intuos3 9x12",   WACOM_PKGLEN_INTUOS,    60960, 45720, 1023,
+         63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB3 =
-       { "Wacom Intuos3 12x12",  WACOM_PKGLEN_INTUOS,    60960, 60960, 1023, 63, INTUOS3L };
+       { "Wacom Intuos3 12x12",  WACOM_PKGLEN_INTUOS,    60960, 60960, 1023,
+         63, INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB4 =
-       { "Wacom Intuos3 12x19",  WACOM_PKGLEN_INTUOS,    97536, 60960, 1023, 63, INTUOS3L };
+       { "Wacom Intuos3 12x19",  WACOM_PKGLEN_INTUOS,    97536, 60960, 1023,
+         63, INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB5 =
-       { "Wacom Intuos3 6x11",   WACOM_PKGLEN_INTUOS,    54204, 31750, 1023, 63, INTUOS3 };
+       { "Wacom Intuos3 6x11",   WACOM_PKGLEN_INTUOS,    54204, 31750, 1023,
+         63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB7 =
-       { "Wacom Intuos3 4x6",    WACOM_PKGLEN_INTUOS,    31496, 19685, 1023, 63, INTUOS3S };
+       { "Wacom Intuos3 4x6",    WACOM_PKGLEN_INTUOS,    31496, 19685, 1023,
+         63, INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB8 =
-       { "Wacom Intuos4 4x6",    WACOM_PKGLEN_INTUOS,    31496, 19685, 2047, 63, INTUOS4S };
+       { "Wacom Intuos4 4x6",    WACOM_PKGLEN_INTUOS,    31496, 19685, 2047,
+         63, INTUOS4S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xB9 =
-       { "Wacom Intuos4 6x9",    WACOM_PKGLEN_INTUOS,    44704, 27940, 2047, 63, INTUOS4 };
+       { "Wacom Intuos4 6x9",    WACOM_PKGLEN_INTUOS,    44704, 27940, 2047,
+         63, INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xBA =
-       { "Wacom Intuos4 8x13",   WACOM_PKGLEN_INTUOS,    65024, 40640, 2047, 63, INTUOS4L };
+       { "Wacom Intuos4 8x13",   WACOM_PKGLEN_INTUOS,    65024, 40640, 2047,
+         63, INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xBB =
-       { "Wacom Intuos4 12x19",  WACOM_PKGLEN_INTUOS,    97536, 60960, 2047, 63, INTUOS4L };
+       { "Wacom Intuos4 12x19",  WACOM_PKGLEN_INTUOS,    97536, 60960, 2047,
+         63, INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xBC =
-       { "Wacom Intuos4 WL",     WACOM_PKGLEN_INTUOS,    40840, 25400, 2047, 63, INTUOS4 };
+       { "Wacom Intuos4 WL",     WACOM_PKGLEN_INTUOS,    40840, 25400, 2047,
+         63, INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0x3F =
-       { "Wacom Cintiq 21UX",    WACOM_PKGLEN_INTUOS,    87200, 65600, 1023, 63, CINTIQ };
+       { "Wacom Cintiq 21UX",    WACOM_PKGLEN_INTUOS,    87200, 65600, 1023,
+         63, CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xC5 =
-       { "Wacom Cintiq 20WSX",   WACOM_PKGLEN_INTUOS,    86680, 54180, 1023, 63, WACOM_BEE };
+       { "Wacom Cintiq 20WSX",   WACOM_PKGLEN_INTUOS,    86680, 54180, 1023,
+         63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xC6 =
-       { "Wacom Cintiq 12WX",    WACOM_PKGLEN_INTUOS,    53020, 33440, 1023, 63, WACOM_BEE };
+       { "Wacom Cintiq 12WX",    WACOM_PKGLEN_INTUOS,    53020, 33440, 1023,
+         63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0xC7 =
-       { "Wacom DTU1931",        WACOM_PKGLEN_GRAPHIRE,  37832, 30305,  511,  0, PL };
+       { "Wacom DTU1931",        WACOM_PKGLEN_GRAPHIRE,  37832, 30305,  511,
+         0, PL, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xCE =
-       { "Wacom DTU2231",        WACOM_PKGLEN_GRAPHIRE,  47864, 27011,  511,  0, DTU };
+       { "Wacom DTU2231",        WACOM_PKGLEN_GRAPHIRE,  47864, 27011,  511,
+         0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xF0 =
-       { "Wacom DTU1631",        WACOM_PKGLEN_GRAPHIRE,  34623, 19553,  511,  0, DTU };
+       { "Wacom DTU1631",        WACOM_PKGLEN_GRAPHIRE,  34623, 19553,  511,
+         0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xCC =
-       { "Wacom Cintiq 21UX2",   WACOM_PKGLEN_INTUOS,    87200, 65600, 2047, 63, WACOM_21UX2 };
+       { "Wacom Cintiq 21UX2",   WACOM_PKGLEN_INTUOS,    87200, 65600, 2047,
+         63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES };
 static const struct wacom_features wacom_features_0x90 =
-       { "Wacom ISDv4 90",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,  0, TABLETPC };
+       { "Wacom ISDv4 90",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x93 =
-       { "Wacom ISDv4 93",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,  0, TABLETPC };
+       { "Wacom ISDv4 93",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x9A =
-       { "Wacom ISDv4 9A",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,  0, TABLETPC };
+       { "Wacom ISDv4 9A",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x9F =
-       { "Wacom ISDv4 9F",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,  0, TABLETPC };
+       { "Wacom ISDv4 9F",       WACOM_PKGLEN_GRAPHIRE,  26202, 16325,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xE2 =
-       { "Wacom ISDv4 E2",       WACOM_PKGLEN_TPC2FG,    26202, 16325,  255,  0, TABLETPC2FG };
+       { "Wacom ISDv4 E2",       WACOM_PKGLEN_TPC2FG,    26202, 16325,  255,
+         0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xE3 =
-       { "Wacom ISDv4 E3",       WACOM_PKGLEN_TPC2FG,    26202, 16325,  255,  0, TABLETPC2FG };
+       { "Wacom ISDv4 E3",       WACOM_PKGLEN_TPC2FG,    26202, 16325,  255,
+         0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xE6 =
+       { "Wacom ISDv4 E6",       WACOM_PKGLEN_TPC2FG,    27760, 15694,  255,
+         0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x47 =
-       { "Wacom Intuos2 6x8",    WACOM_PKGLEN_INTUOS,    20320, 16240, 1023, 31, INTUOS };
-static struct wacom_features wacom_features_0xD0 =
-       { "Wacom Bamboo 2FG",     WACOM_PKGLEN_BBFUN,     14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD1 =
-       { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN,     14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD2 =
-       { "Wacom Bamboo Craft",   WACOM_PKGLEN_BBFUN,     14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD3 =
-       { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN,     21648, 13530, 1023, 63, BAMBOO_PT };
+       { "Wacom Intuos2 6x8",    WACOM_PKGLEN_INTUOS,    20320, 16240, 1023,
+         31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD0 =
+       { "Wacom Bamboo 2FG",     WACOM_PKGLEN_BBFUN,     14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD1 =
+       { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN,     14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD2 =
+       { "Wacom Bamboo Craft",   WACOM_PKGLEN_BBFUN,     14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD3 =
+       { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN,     21648, 13530, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0xD4 =
-       { "Wacom Bamboo Pen",     WACOM_PKGLEN_BBFUN,     14720,  9200,  255, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD6 =
-       { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN,   14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD7 =
-       { "Wacom BambooPT 2FG Small", WACOM_PKGLEN_BBFUN, 14720,  9200, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xD8 =
-       { "Wacom Bamboo Comic 2FG", WACOM_PKGLEN_BBFUN,   21648, 13530, 1023, 63, BAMBOO_PT };
-static struct wacom_features wacom_features_0xDA =
-       { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN,  14720,  9200, 1023, 63, BAMBOO_PT };
+       { "Wacom Bamboo Pen",     WACOM_PKGLEN_BBFUN,     14720,  9200,  255,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD6 =
+       { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN,   14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD7 =
+       { "Wacom BambooPT 2FG Small", WACOM_PKGLEN_BBFUN, 14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xD8 =
+       { "Wacom Bamboo Comic 2FG", WACOM_PKGLEN_BBFUN,   21648, 13530, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
+static const struct wacom_features wacom_features_0xDA =
+       { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN,  14720,  9200, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static struct wacom_features wacom_features_0xDB =
-       { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN,  21648, 13530, 1023, 63, BAMBOO_PT };
+       { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN,  21648, 13530, 1023,
+         63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 static const struct wacom_features wacom_features_0x6004 =
-       { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800, 8000, 255, 0, TABLETPC };
+       { "ISD-V4",               WACOM_PKGLEN_GRAPHIRE,  12800,  8000,  255,
+         0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES };
 
 #define USB_DEVICE_WACOM(prod)                                 \
        USB_DEVICE(USB_VENDOR_ID_WACOM, prod),                  \
@@ -1474,6 +1564,7 @@ const struct usb_device_id wacom_ids[] = {
        { USB_DEVICE_WACOM(0x9F) },
        { USB_DEVICE_WACOM(0xE2) },
        { USB_DEVICE_WACOM(0xE3) },
+       { USB_DEVICE_WACOM(0xE6) },
        { USB_DEVICE_WACOM(0x47) },
        { USB_DEVICE_LENOVO(0x6004) },
        { }
index 835f756..53eb71b 100644 (file)
@@ -74,6 +74,8 @@ struct wacom_features {
        int pressure_max;
        int distance_max;
        int type;
+       int x_resolution;
+       int y_resolution;
        int device_type;
        int x_phy;
        int y_phy;
index b4d7f63..efa0688 100644 (file)
@@ -62,7 +62,7 @@ MODULE_LICENSE("GPL");
         Programmer has no control over these numbers.
         TODO there are holes - specifically  1,7,0x0a
 */
-#define VERSION_ID              0       /* Get Version (request/respose) */
+#define VERSION_ID              0       /* Get Version (request/response) */
 #define KEYBD_ID                2       /* Keyboard (event) */
 #define TOUCHS_ID               3       /* Touch Screen (event)*/
 #define EEPROM_READ_ID          4       /* (request/response) */
index d25df48..bb8b722 100644 (file)
@@ -153,7 +153,7 @@ static struct i2c_adapter *         u3_0;
 static struct i2c_adapter *            u3_1;
 static struct i2c_adapter *            k2;
 static struct i2c_client *             fcu;
-static struct cpu_pid_state            cpu_state[2];
+static struct cpu_pid_state            processor_state[2];
 static struct basckside_pid_params     backside_params;
 static struct backside_pid_state       backside_state;
 static struct drives_pid_state         drives_state;
@@ -664,8 +664,8 @@ static int read_eeprom(int cpu, struct mpu_data *out)
 
 static void fetch_cpu_pumps_minmax(void)
 {
-       struct cpu_pid_state *state0 = &cpu_state[0];
-       struct cpu_pid_state *state1 = &cpu_state[1];
+       struct cpu_pid_state *state0 = &processor_state[0];
+       struct cpu_pid_state *state1 = &processor_state[1];
        u16 pump_min = 0, pump_max = 0xffff;
        u16 tmp[4];
 
@@ -717,17 +717,17 @@ static ssize_t show_##name(struct device *dev, struct device_attribute *attr, ch
        return sprintf(buf, "%d", data);                        \
 }
 
-BUILD_SHOW_FUNC_FIX(cpu0_temperature, cpu_state[0].last_temp)
-BUILD_SHOW_FUNC_FIX(cpu0_voltage, cpu_state[0].voltage)
-BUILD_SHOW_FUNC_FIX(cpu0_current, cpu_state[0].current_a)
-BUILD_SHOW_FUNC_INT(cpu0_exhaust_fan_rpm, cpu_state[0].rpm)
-BUILD_SHOW_FUNC_INT(cpu0_intake_fan_rpm, cpu_state[0].intake_rpm)
+BUILD_SHOW_FUNC_FIX(cpu0_temperature, processor_state[0].last_temp)
+BUILD_SHOW_FUNC_FIX(cpu0_voltage, processor_state[0].voltage)
+BUILD_SHOW_FUNC_FIX(cpu0_current, processor_state[0].current_a)
+BUILD_SHOW_FUNC_INT(cpu0_exhaust_fan_rpm, processor_state[0].rpm)
+BUILD_SHOW_FUNC_INT(cpu0_intake_fan_rpm, processor_state[0].intake_rpm)
 
-BUILD_SHOW_FUNC_FIX(cpu1_temperature, cpu_state[1].last_temp)
-BUILD_SHOW_FUNC_FIX(cpu1_voltage, cpu_state[1].voltage)
-BUILD_SHOW_FUNC_FIX(cpu1_current, cpu_state[1].current_a)
-BUILD_SHOW_FUNC_INT(cpu1_exhaust_fan_rpm, cpu_state[1].rpm)
-BUILD_SHOW_FUNC_INT(cpu1_intake_fan_rpm, cpu_state[1].intake_rpm)
+BUILD_SHOW_FUNC_FIX(cpu1_temperature, processor_state[1].last_temp)
+BUILD_SHOW_FUNC_FIX(cpu1_voltage, processor_state[1].voltage)
+BUILD_SHOW_FUNC_FIX(cpu1_current, processor_state[1].current_a)
+BUILD_SHOW_FUNC_INT(cpu1_exhaust_fan_rpm, processor_state[1].rpm)
+BUILD_SHOW_FUNC_INT(cpu1_intake_fan_rpm, processor_state[1].intake_rpm)
 
 BUILD_SHOW_FUNC_FIX(backside_temperature, backside_state.last_temp)
 BUILD_SHOW_FUNC_INT(backside_fan_pwm, backside_state.pwm)
@@ -919,8 +919,8 @@ static void do_cpu_pid(struct cpu_pid_state *state, s32 temp, s32 power)
 
 static void do_monitor_cpu_combined(void)
 {
-       struct cpu_pid_state *state0 = &cpu_state[0];
-       struct cpu_pid_state *state1 = &cpu_state[1];
+       struct cpu_pid_state *state0 = &processor_state[0];
+       struct cpu_pid_state *state1 = &processor_state[1];
        s32 temp0, power0, temp1, power1;
        s32 temp_combi, power_combi;
        int rc, intake, pump;
@@ -1150,7 +1150,7 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state)
 /*
  * Initialize the state structure for one CPU control loop
  */
-static int init_cpu_state(struct cpu_pid_state *state, int index)
+static int init_processor_state(struct cpu_pid_state *state, int index)
 {
        int err;
 
@@ -1205,7 +1205,7 @@ static int init_cpu_state(struct cpu_pid_state *state, int index)
 /*
  * Dispose of the state data for one CPU control loop
  */
-static void dispose_cpu_state(struct cpu_pid_state *state)
+static void dispose_processor_state(struct cpu_pid_state *state)
 {
        if (state->monitor == NULL)
                return;
@@ -1804,9 +1804,9 @@ static int main_control_loop(void *x)
                set_pwm_fan(SLOTS_FAN_PWM_INDEX, SLOTS_FAN_DEFAULT_PWM);
 
        /* Initialize ADCs */
-       initialize_adc(&cpu_state[0]);
-       if (cpu_state[1].monitor != NULL)
-               initialize_adc(&cpu_state[1]);
+       initialize_adc(&processor_state[0]);
+       if (processor_state[1].monitor != NULL)
+               initialize_adc(&processor_state[1]);
 
        fcu_tickle_ticks = FCU_TICKLE_TICKS;
 
@@ -1833,14 +1833,14 @@ static int main_control_loop(void *x)
                if (cpu_pid_type == CPU_PID_TYPE_COMBINED)
                        do_monitor_cpu_combined();
                else if (cpu_pid_type == CPU_PID_TYPE_RACKMAC) {
-                       do_monitor_cpu_rack(&cpu_state[0]);
-                       if (cpu_state[1].monitor != NULL)
-                               do_monitor_cpu_rack(&cpu_state[1]);
+                       do_monitor_cpu_rack(&processor_state[0]);
+                       if (processor_state[1].monitor != NULL)
+                               do_monitor_cpu_rack(&processor_state[1]);
                        // better deal with UP
                } else {
-                       do_monitor_cpu_split(&cpu_state[0]);
-                       if (cpu_state[1].monitor != NULL)
-                               do_monitor_cpu_split(&cpu_state[1]);
+                       do_monitor_cpu_split(&processor_state[0]);
+                       if (processor_state[1].monitor != NULL)
+                               do_monitor_cpu_split(&processor_state[1]);
                        // better deal with UP
                }
                /* Then, the rest */
@@ -1885,8 +1885,8 @@ static int main_control_loop(void *x)
  */
 static void dispose_control_loops(void)
 {
-       dispose_cpu_state(&cpu_state[0]);
-       dispose_cpu_state(&cpu_state[1]);
+       dispose_processor_state(&processor_state[0]);
+       dispose_processor_state(&processor_state[1]);
        dispose_backside_state(&backside_state);
        dispose_drives_state(&drives_state);
        dispose_slots_state(&slots_state);
@@ -1928,12 +1928,12 @@ static int create_control_loops(void)
        /* Create control loops for everything. If any fail, everything
         * fails
         */
-       if (init_cpu_state(&cpu_state[0], 0))
+       if (init_processor_state(&processor_state[0], 0))
                goto fail;
        if (cpu_pid_type == CPU_PID_TYPE_COMBINED)
                fetch_cpu_pumps_minmax();
 
-       if (cpu_count > 1 && init_cpu_state(&cpu_state[1], 1))
+       if (cpu_count > 1 && init_processor_state(&processor_state[1], 1))
                goto fail;
        if (init_backside_state(&backside_state))
                goto fail;
index 416d4e2..cb8380c 100644 (file)
@@ -927,20 +927,80 @@ static int dm_table_build_index(struct dm_table *t)
 }
 
 /*
+ * Get a disk whose integrity profile reflects the table's profile.
+ * If %match_all is true, all devices' profiles must match.
+ * If %match_all is false, all devices must at least have an
+ * allocated integrity profile; but uninitialized is ok.
+ * Returns NULL if integrity support was inconsistent or unavailable.
+ */
+static struct gendisk * dm_table_get_integrity_disk(struct dm_table *t,
+                                                   bool match_all)
+{
+       struct list_head *devices = dm_table_get_devices(t);
+       struct dm_dev_internal *dd = NULL;
+       struct gendisk *prev_disk = NULL, *template_disk = NULL;
+
+       list_for_each_entry(dd, devices, list) {
+               template_disk = dd->dm_dev.bdev->bd_disk;
+               if (!blk_get_integrity(template_disk))
+                       goto no_integrity;
+               if (!match_all && !blk_integrity_is_initialized(template_disk))
+                       continue; /* skip uninitialized profiles */
+               else if (prev_disk &&
+                        blk_integrity_compare(prev_disk, template_disk) < 0)
+                       goto no_integrity;
+               prev_disk = template_disk;
+       }
+
+       return template_disk;
+
+no_integrity:
+       if (prev_disk)
+               DMWARN("%s: integrity not set: %s and %s profile mismatch",
+                      dm_device_name(t->md),
+                      prev_disk->disk_name,
+                      template_disk->disk_name);
+       return NULL;
+}
+
+/*
  * Register the mapped device for blk_integrity support if
- * the underlying devices support it.
+ * the underlying devices have an integrity profile.  But all devices
+ * may not have matching profiles (checking all devices isn't reliable
+ * during table load because this table may use other DM device(s) which
+ * must be resumed before they will have an initialized integity profile).
+ * Stacked DM devices force a 2 stage integrity profile validation:
+ * 1 - during load, validate all initialized integrity profiles match
+ * 2 - during resume, validate all integrity profiles match
  */
 static int dm_table_prealloc_integrity(struct dm_table *t, struct mapped_device *md)
 {
-       struct list_head *devices = dm_table_get_devices(t);
-       struct dm_dev_internal *dd;
+       struct gendisk *template_disk = NULL;
 
-       list_for_each_entry(dd, devices, list)
-               if (bdev_get_integrity(dd->dm_dev.bdev)) {
-                       t->integrity_supported = 1;
-                       return blk_integrity_register(dm_disk(md), NULL);
-               }
+       template_disk = dm_table_get_integrity_disk(t, false);
+       if (!template_disk)
+               return 0;
 
+       if (!blk_integrity_is_initialized(dm_disk(md))) {
+               t->integrity_supported = 1;
+               return blk_integrity_register(dm_disk(md), NULL);
+       }
+
+       /*
+        * If DM device already has an initalized integrity
+        * profile the new profile should not conflict.
+        */
+       if (blk_integrity_is_initialized(template_disk) &&
+           blk_integrity_compare(dm_disk(md), template_disk) < 0) {
+               DMWARN("%s: conflict with existing integrity profile: "
+                      "%s profile mismatch",
+                      dm_device_name(t->md),
+                      template_disk->disk_name);
+               return 1;
+       }
+
+       /* Preserve existing initialized integrity profile */
+       t->integrity_supported = 1;
        return 0;
 }
 
@@ -1094,41 +1154,27 @@ combine_limits:
 
 /*
  * Set the integrity profile for this device if all devices used have
- * matching profiles.
+ * matching profiles.  We're quite deep in the resume path but still
+ * don't know if all devices (particularly DM devices this device
+ * may be stacked on) have matching profiles.  Even if the profiles
+ * don't match we have no way to fail (to resume) at this point.
  */
 static void dm_table_set_integrity(struct dm_table *t)
 {
-       struct list_head *devices = dm_table_get_devices(t);
-       struct dm_dev_internal *prev = NULL, *dd = NULL;
+       struct gendisk *template_disk = NULL;
 
        if (!blk_get_integrity(dm_disk(t->md)))
                return;
 
-       list_for_each_entry(dd, devices, list) {
-               if (prev &&
-                   blk_integrity_compare(prev->dm_dev.bdev->bd_disk,
-                                         dd->dm_dev.bdev->bd_disk) < 0) {
-                       DMWARN("%s: integrity not set: %s and %s mismatch",
-                              dm_device_name(t->md),
-                              prev->dm_dev.bdev->bd_disk->disk_name,
-                              dd->dm_dev.bdev->bd_disk->disk_name);
-                       goto no_integrity;
-               }
-               prev = dd;
+       template_disk = dm_table_get_integrity_disk(t, true);
+       if (!template_disk &&
+           blk_integrity_is_initialized(dm_disk(t->md))) {
+               DMWARN("%s: device no longer has a valid integrity profile",
+                      dm_device_name(t->md));
+               return;
        }
-
-       if (!prev || !bdev_get_integrity(prev->dm_dev.bdev))
-               goto no_integrity;
-
        blk_integrity_register(dm_disk(t->md),
-                              bdev_get_integrity(prev->dm_dev.bdev));
-
-       return;
-
-no_integrity:
-       blk_integrity_register(dm_disk(t->md), NULL);
-
-       return;
+                              blk_get_integrity(template_disk));
 }
 
 void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
index 26fb9cb..5991ab6 100644 (file)
@@ -1494,12 +1494,17 @@ u32 fmc_prepare(struct fmdev *fmdev)
        }
 
        memset(&fm_st_proto, 0, sizeof(fm_st_proto));
-       fm_st_proto.type = ST_FM;
        fm_st_proto.recv = fm_st_receive;
        fm_st_proto.match_packet = NULL;
        fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb;
        fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */
        fm_st_proto.priv_data = fmdev;
+       fm_st_proto.chnl_id = 0x08;
+       fm_st_proto.max_frame_size = 0xff;
+       fm_st_proto.hdr_len = 1;
+       fm_st_proto.offset_len_in_hdr = 0;
+       fm_st_proto.len_size = 1;
+       fm_st_proto.reserve = 1;
 
        ret = st_register(&fm_st_proto);
        if (ret == -EINPROGRESS) {
@@ -1532,7 +1537,7 @@ u32 fmc_prepare(struct fmdev *fmdev)
                g_st_write = fm_st_proto.write;
        } else {
                fmerr("Failed to get ST write func pointer\n");
-               ret = st_unregister(ST_FM);
+               ret = st_unregister(&fm_st_proto);
                if (ret < 0)
                        fmerr("st_unregister failed %d\n", ret);
                return -EAGAIN;
@@ -1586,6 +1591,7 @@ u32 fmc_prepare(struct fmdev *fmdev)
  */
 u32 fmc_release(struct fmdev *fmdev)
 {
+       static struct st_proto_s fm_st_proto;
        u32 ret;
 
        if (!test_bit(FM_CORE_READY, &fmdev->flag)) {
@@ -1604,7 +1610,11 @@ u32 fmc_release(struct fmdev *fmdev)
        fmdev->resp_comp = NULL;
        fmdev->rx.freq = 0;
 
-       ret = st_unregister(ST_FM);
+       memset(&fm_st_proto, 0, sizeof(fm_st_proto));
+       fm_st_proto.chnl_id = 0x08;
+
+       ret = st_unregister(&fm_st_proto);
+
        if (ret < 0)
                fmerr("Failed to de-register FM from ST %d\n", ret);
        else
index ac0e42b..accaf6c 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/bitops.h>
 #include <media/rc-core.h>
 #include <linux/pci_ids.h>
+#include&