]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'master' of git://git.infradead.org/users/pcmoore/lblnet-2.6
authorDavid S. Miller <davem@davemloft.net>
Fri, 31 Oct 2008 06:57:40 +0000 (23:57 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Oct 2008 06:57:40 +0000 (23:57 -0700)
293 files changed:
.mailmap
Documentation/00-INDEX
Documentation/DocBook/Makefile
Documentation/DocBook/deviceiobook.tmpl
Documentation/DocBook/mcabook.tmpl
Documentation/DocBook/wanbook.tmpl
Documentation/DocBook/z8530book.tmpl
Documentation/ManagementStyle
Documentation/accounting/.gitignore [new file with mode: 0644]
Documentation/arm/empeg/README [deleted file]
Documentation/arm/empeg/ir.txt [deleted file]
Documentation/arm/empeg/mkdevs [deleted file]
Documentation/auxdisplay/.gitignore [new file with mode: 0644]
Documentation/connector/.gitignore [new file with mode: 0644]
Documentation/filesystems/Locking
Documentation/filesystems/vfs.txt
Documentation/ftrace.txt
Documentation/i2c/busses/i2c-sis96x
Documentation/ia64/.gitignore [new file with mode: 0644]
Documentation/isdn/CREDITS
Documentation/ja_JP/HOWTO
Documentation/kernel-parameters.txt
Documentation/lguest/Makefile
Documentation/lguest/lguest.c
Documentation/networking/.gitignore [new file with mode: 0644]
Documentation/networking/dmfe.txt
Documentation/pcmcia/.gitignore [new file with mode: 0644]
Documentation/scheduler/00-INDEX
Documentation/scsi/aacraid.txt
Documentation/spi/.gitignore [new file with mode: 0644]
Documentation/stable_kernel_rules.txt
Documentation/sysctl/kernel.txt
Documentation/video4linux/.gitignore [new file with mode: 0644]
Documentation/video4linux/bttv/CONTRIBUTORS
Documentation/vm/.gitignore [new file with mode: 0644]
Documentation/watchdog/src/.gitignore [new file with mode: 0644]
Documentation/x86/x86_64/boot-options.txt
Documentation/x86/x86_64/fake-numa-for-cpusets
MAINTAINERS
Makefile
arch/arm/common/sharpsl_pm.c
arch/arm/mach-at91/board-afeb-9260v1.c
arch/arm/mach-at91/include/mach/gpio.h
arch/arm/mach-ep93xx/core.c
arch/arm/mach-imx/include/mach/gpio.h
arch/arm/mach-ixp4xx/include/mach/gpio.h
arch/arm/mach-ks8695/include/mach/gpio.h
arch/arm/mach-mx3/mx31ads.c
arch/arm/mach-mx3/pcm037.c
arch/arm/mach-ns9xxx/gpio.c
arch/arm/mach-orion5x/gpio.c
arch/arm/mach-pxa/corgi_pm.c
arch/arm/mach-pxa/include/mach/sharpsl.h
arch/arm/mach-pxa/spitz.c
arch/arm/mach-pxa/spitz_pm.c
arch/arm/mm/proc-xsc3.S
arch/arm/plat-mxc/gpio.c
arch/arm/plat-mxc/include/mach/io.h
arch/ia64/include/asm/iommu.h
arch/ia64/kernel/pci-dma.c
arch/mips/Kconfig
arch/mips/configs/ip22_defconfig
arch/mips/configs/ip27_defconfig
arch/mips/configs/ip28_defconfig
arch/mips/include/asm/bitops.h
arch/mips/include/asm/break.h
arch/mips/include/asm/byteorder.h
arch/mips/include/asm/cpu-features.h
arch/mips/include/asm/ds1286.h [deleted file]
arch/mips/include/asm/fpu_emulator.h
arch/mips/include/asm/m48t35.h [deleted file]
arch/mips/kernel/cpu-probe.c
arch/mips/kernel/smp.c
arch/mips/kernel/traps.c
arch/mips/kernel/unaligned.c
arch/mips/math-emu/cp1emu.c
arch/mips/math-emu/dsemul.c
arch/mips/math-emu/dsemul.h [deleted file]
arch/mips/txx9/rbtx4927/setup.c
arch/mips/txx9/rbtx4939/setup.c
arch/powerpc/sysdev/fsl_soc.c
arch/x86/Kconfig
arch/x86/Kconfig.cpu
arch/x86/boot/compressed/.gitignore
arch/x86/include/asm/es7000/wakecpu.h
arch/x86/include/asm/io.h
arch/x86/include/asm/iommu.h
arch/x86/include/asm/mach-default/mach_wakecpu.h
arch/x86/include/asm/pgtable-3level.h
arch/x86/include/asm/smp.h
arch/x86/include/asm/uv/uv_hub.h
arch/x86/kernel/cpu/addon_cpuid_features.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/k8.c
arch/x86/kernel/machine_kexec_32.c
arch/x86/kernel/microcode_amd.c
arch/x86/kernel/microcode_core.c
arch/x86/kernel/pci-dma.c
arch/x86/kernel/pci-gart_64.c
arch/x86/kernel/tsc.c
arch/x86/kernel/vsmp_64.c
arch/x86/lguest/boot.c
arch/x86/mach-voyager/voyager_smp.c
arch/x86/mm/gup.c
arch/x86/mm/init_64.c
arch/x86/mm/ioremap.c
arch/x86/mm/pat.c
drivers/Kconfig
drivers/base/sys.c
drivers/block/loop.c
drivers/bluetooth/bluecard_cs.c
drivers/bluetooth/bt3c_cs.c
drivers/bluetooth/btuart_cs.c
drivers/bluetooth/dtl1_cs.c
drivers/char/Kconfig
drivers/char/Makefile
drivers/char/ds1286.c [deleted file]
drivers/char/ip27-rtc.c [deleted file]
drivers/char/ipmi/ipmi_devintf.c
drivers/char/pcmcia/synclink_cs.c
drivers/edac/Kconfig
drivers/edac/Makefile
drivers/edac/cell_edac.c
drivers/edac/x38_edac.c [new file with mode: 0644]
drivers/hid/hid-core.c
drivers/hid/hid-dell.c
drivers/hid/hid-ids.h
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/usbhid.h
drivers/i2c/busses/i2c-s3c2410.c
drivers/i2c/busses/scx200_i2c.c
drivers/leds/leds-da903x.c
drivers/md/dm-raid1.c
drivers/md/dm-snap.c
drivers/md/dm-snap.h
drivers/md/md.c
drivers/message/i2o/i2o_block.c
drivers/misc/hdpuftrs/hdpu_nexus.c
drivers/misc/sgi-xp/Makefile
drivers/misc/sgi-xp/xp.h
drivers/misc/sgi-xp/xpc_main.c
drivers/misc/sony-laptop.c
drivers/mmc/host/mmci.c
drivers/net/amd8111e.c
drivers/net/arm/at91_ether.c
drivers/net/atlx/atl1.c
drivers/net/atlx/atl1.h
drivers/net/bonding/bond_alb.c
drivers/net/bonding/bond_main.c
drivers/net/ehea/ehea.h
drivers/net/ehea/ehea_qmr.c
drivers/net/ehea/ehea_qmr.h
drivers/net/gianfar.c
drivers/net/gianfar_mii.c
drivers/net/gianfar_mii.h
drivers/net/ibm_newemac/core.c
drivers/net/mlx4/en_main.c
drivers/net/mlx4/fw.c
drivers/net/myri10ge/myri10ge.c
drivers/net/pppoe.c
drivers/net/smc91x.c
drivers/net/tulip/dmfe.c
drivers/net/usb/dm9601.c
drivers/net/via-velocity.c
drivers/net/wan/syncppp.c
drivers/net/wan/z85230.c
drivers/net/wireless/ath5k/base.c
drivers/net/wireless/ath5k/debug.c
drivers/net/wireless/ath5k/initvals.c
drivers/net/wireless/ath5k/reset.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/libertas/cmd.c
drivers/net/wireless/libertas/scan.c
drivers/net/wireless/p54/p54common.c
drivers/net/wireless/p54/p54pci.c
drivers/net/wireless/rt2x00/Kconfig
drivers/parport/parport_cs.c
drivers/pci/quirks.c
drivers/pcmcia/pcmcia_resource.c
drivers/regulator/da903x.c
drivers/rtc/rtc-ds3234.c
drivers/rtc/rtc-s3c.c
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c
drivers/s390/net/qeth_l3_sys.c
drivers/scsi/fdomain.c
drivers/serial/Kconfig
drivers/serial/netx-serial.c
drivers/usb/class/usbtmc.c
drivers/usb/core/hcd.c
drivers/usb/core/hcd.h
drivers/usb/core/hub.c
drivers/usb/core/urb.c
drivers/usb/serial/usb-serial.c
drivers/usb/storage/unusual_devs.h
drivers/video/backlight/corgi_lcd.c
drivers/video/console/fbcon.c
drivers/video/fbmem.c
drivers/video/via/global.h
drivers/watchdog/acquirewdt.c
drivers/watchdog/advantechwdt.c
drivers/watchdog/bfin_wdt.c
drivers/watchdog/eurotechwdt.c
drivers/watchdog/i6300esb.c
drivers/watchdog/ib700wdt.c
drivers/watchdog/indydog.c
drivers/watchdog/mpcore_wdt.c
drivers/watchdog/omap_wdt.c
drivers/watchdog/pcwd_pci.c
drivers/watchdog/pcwd_usb.c
drivers/watchdog/rc32434_wdt.c
drivers/watchdog/s3c2410_wdt.c
drivers/watchdog/sa1100_wdt.c
drivers/watchdog/sb_wdog.c
drivers/watchdog/sbc8360.c
drivers/watchdog/sbc_epx_c3.c
drivers/watchdog/smsc37b787_wdt.c
drivers/watchdog/softdog.c
drivers/watchdog/w83627hf_wdt.c
drivers/watchdog/w83697hf_wdt.c
drivers/watchdog/wafer5823wdt.c
drivers/watchdog/wdt.c
drivers/watchdog/wdt285.c
drivers/watchdog/wdt_pci.c
fs/ecryptfs/crypto.c
fs/fat/inode.c
fs/jbd/transaction.c
fs/libfs.c
fs/nfs/inode.c
fs/ocfs2/file.c
fs/splice.c
include/linux/cgroup.h
include/linux/freezer.h
include/linux/fs.h
include/linux/fsl_devices.h
include/linux/hid.h
include/linux/init.h
include/linux/kernel.h
include/linux/mod_devicetable.h
include/linux/netdevice.h
include/linux/resource.h
include/linux/security.h
include/linux/spi/spi_bitbang.h
include/net/mac80211.h
include/net/net_namespace.h
include/net/sock.h
include/sound/soc.h
init/Kconfig
init/do_mounts_md.c
kernel/cgroup_freezer.c
kernel/freezer.c
kernel/profile.c
kernel/resource.c
kernel/sched_debug.c
kernel/signal.c
kernel/trace/Kconfig
kernel/trace/ftrace.c
kernel/trace/trace.c
kernel/trace/trace.h
lib/dynamic_printk.c
mm/filemap.c
mm/mmap.c
mm/nommu.c
mm/shmem.c
mm/vmalloc.c
net/core/net_namespace.c
net/core/pktgen.c
net/mac80211/rc80211_minstrel_debugfs.c
net/netfilter/nf_conntrack_proto_gre.c
net/rfkill/rfkill-input.c
net/sunrpc/auth.c
net/sunrpc/xprtsock.c
scripts/Makefile.modpost
scripts/checksyscalls.sh
scripts/headers_check.pl
scripts/headers_install.pl
scripts/mod/sumversion.c
scripts/package/mkspec
scripts/setlocalversion
security/security.c
sound/core/control.c
sound/pci/ac97/ac97_codec.c
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_intel.c
sound/pci/hda/patch_analog.c
sound/pci/hda/patch_sigmatel.c
sound/pci/ice1712/ice1712.c
sound/pci/intel8x0.c
sound/soc/codecs/wm9713.c
sound/soc/fsl/mpc5200_psc_i2s.c
sound/soc/soc-core.c
sound/usb/usbquirks.h

index eba9bf953ef5bc2e21bc670d33c845a8483e20a6..97f7b4fb61398e2b0d4e3e6c2fc030f383849b39 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -80,6 +80,8 @@ Nguyen Anh Quynh <aquynh@gmail.com>
 Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
 Patrick Mochel <mochel@digitalimplant.org>
 Peter A Jonsson <pj@ludd.ltu.se>
+Peter Oruba <peter@oruba.de>
+Peter Oruba <peter.oruba@amd.com>
 Praveen BP <praveenbp@ti.com>
 Rajesh Shah <rajesh.shah@intel.com>
 Ralf Baechle <ralf@linux-mips.org>
index 7286ad090db7b81242b223786d897a4518db2a1d..edef85ce1195e0a0e98f2f135d4051c1b5844947 100644 (file)
@@ -172,7 +172,7 @@ i2c/
        - directory with info about the I2C bus/protocol (2 wire, kHz speed).
 i2o/
        - directory with info about the Linux I2O subsystem.
-i386/
+x86/i386/
        - directory with info about Linux on Intel 32 bit architecture.
 ia64/
        - directory with info about Linux on Intel 64 bit architecture.
@@ -382,7 +382,7 @@ w1/
        - directory with documents regarding the 1-wire (w1) subsystem.
 watchdog/
        - how to auto-reboot Linux if it has "fallen and can't get up". ;-)
-x86_64/
+x86/x86_64/
        - directory with info on Linux support for AMD x86-64 (Hammer) machines.
 zorro.txt
        - info on writing drivers for Zorro bus devices found on Amigas.
index fabc06466b93d69a842af47403e7b5f9c5977502..9b1f6ca100d1de96e9071193f90a3cbf6d81e34c 100644 (file)
@@ -136,7 +136,7 @@ quiet_cmd_db2ps = PS      $@
 %.ps : %.xml
        $(call cmd,db2ps)
 
-quiet_cmd_db2pdf = PDF      $@
+quiet_cmd_db2pdf = PDF     $@
       cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template))
 %.pdf : %.xml
        $(call cmd,db2pdf)
@@ -148,7 +148,7 @@ build_main_index = rm -rf $(main_idx) && \
                   echo '<h2>Kernel Version: $(KERNELVERSION)</h2>' >> $(main_idx) && \
                   cat $(HTML) >> $(main_idx)
 
-quiet_cmd_db2html = HTML   $@
+quiet_cmd_db2html = HTML    $@
       cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \
                echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \
         $(patsubst %.html,%,$(notdir $@))</a><p>' > $@
index 60d6e0b81bd97e8cb528d6edbeb7af839eeb8563..3ed88126ab8f8f360dac4d10933e8202ba3469e5 100644 (file)
@@ -24,7 +24,7 @@
     <surname>Cox</surname>
     <affiliation>
      <address>
-      <email>alan@redhat.com</email>
+      <email>alan@lxorguk.ukuu.org.uk</email>
      </address>
     </affiliation>
    </author>
index 499eddc2d0792396d6598fbdd7ad08d3c86aaa77..467ccac6ec5093e2a967b120ff71486f344a1bf0 100644 (file)
@@ -12,7 +12,7 @@
     <surname>Cox</surname>
     <affiliation>
      <address>
-      <email>alan@redhat.com</email>
+      <email>alan@lxorguk.ukuu.org.uk</email>
      </address>
     </affiliation>
    </author>
index 9eebcc304de4b52ac3715965d6f7ff7cfae66e1c..8c93db122f049a13177b5d5f612d8da3f12aeaad 100644 (file)
@@ -12,7 +12,7 @@
     <surname>Cox</surname>
     <affiliation>
      <address>
-      <email>alan@redhat.com</email>
+      <email>alan@lxorguk.ukuu.org.uk</email>
      </address>
     </affiliation>
    </author>
index a42a8a4c76890db386c3c4f36a140acf5e2de1d0..6f3883be877e2a00a5664e5539fec5e47089a902 100644 (file)
@@ -12,7 +12,7 @@
     <surname>Cox</surname>
     <affiliation>
      <address>
-      <email>alan@redhat.com</email>
+      <email>alan@lxorguk.ukuu.org.uk</email>
      </address>
     </affiliation>
    </author>
index 49a8efa5afebf0e42dbf4a7f3c3a916c604bc62d..a5f0ea58c788f19527b634875a372fa394057160 100644 (file)
@@ -17,7 +17,7 @@ companies.  If you sign purchase orders or you have any clue about the
 budget of your group, you're almost certainly not a kernel manager. 
 These suggestions may or may not apply to you. 
 
-First off, I'd suggest buying "Seven Habits of Highly Successful
+First off, I'd suggest buying "Seven Habits of Highly Effective
 People", and NOT read it.  Burn it, it's a great symbolic gesture. 
 
 (*) This document does so not so much by answering the question, but by
diff --git a/Documentation/accounting/.gitignore b/Documentation/accounting/.gitignore
new file mode 100644 (file)
index 0000000..8648520
--- /dev/null
@@ -0,0 +1 @@
+getdelays
diff --git a/Documentation/arm/empeg/README b/Documentation/arm/empeg/README
deleted file mode 100644 (file)
index 09cc8d0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Empeg, Ltd's Empeg MP3 Car Audio Player
-
-The initial design is to go in your car, but you can use it at home, on a
-boat... almost anywhere. The principle is to store CD-quality music using
-MPEG technology onto a hard disk in the unit, and use the power of the
-embedded computer to serve up the music you want.
-
-For more details, see:
-
-       http://www.empeg.com
-
-
-
diff --git a/Documentation/arm/empeg/ir.txt b/Documentation/arm/empeg/ir.txt
deleted file mode 100644 (file)
index 10a2974..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-Infra-red driver documentation.
-
-Mike Crowe <mac@empeg.com>
-(C) Empeg Ltd 1999
-
-Not a lot here yet :-)
-
-The Kenwood KCA-R6A remote control generates a sequence like the following:
-
-Go low for approx 16T (Around 9000us)
-Go high for approx 8T (Around 4000us)
-Go low for less than 2T (Around 750us)
-
-For each of the 32 bits
-  Go high for more than 2T (Around 1500us) == 1
-  Go high for less than T (Around 400us) == 0
-  Go low for less than 2T (Around 750us)
-
-Rather than repeat a signal when the button is held down certain buttons
-generate the following code to indicate repetition.
-
-Go low for approx 16T
-Go high for approx 4T
-Go low for less than 2T
-
-(By removing the <2T from the start of the sequence and placing at the end
- it can be considered a stop bit but I found it easier to deal with it at
- the start).
-
-The 32 bits are encoded as XxYy where x and y are the actual data values
-while X and Y are the logical inverses of the associated data values. Using 
-LSB first yields sensible codes for the numbers.
-
-All codes are of the form b9xx
-
-The numeric keys generate the code 0x where x is the number pressed.
-
-Tuner          1c
-Tape           1d
-CD             1e
-CD-MD-CH       1f
-Track-         0a
-Track+         0b
-Rewind         0c
-FF             0d
-DNPP           5e
-Play/Pause     0e
-Vol+           14
-Vol-           15
diff --git a/Documentation/arm/empeg/mkdevs b/Documentation/arm/empeg/mkdevs
deleted file mode 100644 (file)
index 7a85e28..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-mknod /dev/display c 244 0
-mknod /dev/ir c 242 0
-mknod /dev/usb0 c 243 0
-mknod /dev/audio c 245 4
-mknod /dev/dsp c 245 3
-mknod /dev/mixer c 245 0
-mknod /dev/empeg_state c 246 0
-mknod /dev/radio0 c 81 64
-ln -sf radio0 radio
-ln -sf usb0 usb
diff --git a/Documentation/auxdisplay/.gitignore b/Documentation/auxdisplay/.gitignore
new file mode 100644 (file)
index 0000000..7af2228
--- /dev/null
@@ -0,0 +1 @@
+cfag12864b-example
diff --git a/Documentation/connector/.gitignore b/Documentation/connector/.gitignore
new file mode 100644 (file)
index 0000000..d2b9c32
--- /dev/null
@@ -0,0 +1 @@
+ucon
index 8362860e21a7d6b4db3595e83905b32b25e55ecf..23d2f4460debf2122676e83a6d4c9139df889253 100644 (file)
@@ -161,8 +161,12 @@ prototypes:
        int (*set_page_dirty)(struct page *page);
        int (*readpages)(struct file *filp, struct address_space *mapping,
                        struct list_head *pages, unsigned nr_pages);
-       int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
-       int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
+       int (*write_begin)(struct file *, struct address_space *mapping,
+                               loff_t pos, unsigned len, unsigned flags,
+                               struct page **pagep, void **fsdata);
+       int (*write_end)(struct file *, struct address_space *mapping,
+                               loff_t pos, unsigned len, unsigned copied,
+                               struct page *page, void *fsdata);
        sector_t (*bmap)(struct address_space *, sector_t);
        int (*invalidatepage) (struct page *, unsigned long);
        int (*releasepage) (struct page *, int);
@@ -180,8 +184,6 @@ sync_page:          no      maybe
 writepages:            no
 set_page_dirty         no      no
 readpages:             no
-prepare_write:         no      yes                     yes
-commit_write:          no      yes                     yes
 write_begin:           no      locks the page          yes
 write_end:             no      yes, unlocks            yes
 perform_write:         no      n/a                     yes
@@ -191,7 +193,7 @@ releasepage:                no      yes
 direct_IO:             no
 launder_page:          no      yes
 
-       ->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
+       ->write_begin(), ->write_end(), ->sync_page() and ->readpage()
 may be called from the request handler (/dev/loop).
 
        ->readpage() unlocks the page, either synchronously or via I/O
index c4d348dabe9499454055ebff41fb88ef71346dda..5579bda58a6dadc3b793b208e032e1cc6456ad33 100644 (file)
@@ -492,7 +492,7 @@ written-back to storage typically in whole pages, however the
 address_space has finer control of write sizes.
 
 The read process essentially only requires 'readpage'.  The write
-process is more complicated and uses prepare_write/commit_write or
+process is more complicated and uses write_begin/write_end or
 set_page_dirty to write data into the address_space, and writepage,
 sync_page, and writepages to writeback data to storage.
 
@@ -521,8 +521,6 @@ struct address_space_operations {
        int (*set_page_dirty)(struct page *page);
        int (*readpages)(struct file *filp, struct address_space *mapping,
                        struct list_head *pages, unsigned nr_pages);
-       int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
-       int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
        int (*write_begin)(struct file *, struct address_space *mapping,
                                loff_t pos, unsigned len, unsigned flags,
                                struct page **pagep, void **fsdata);
@@ -598,37 +596,7 @@ struct address_space_operations {
        readpages is only used for read-ahead, so read errors are
        ignored.  If anything goes wrong, feel free to give up.
 
-  prepare_write: called by the generic write path in VM to set up a write
-       request for a page.  This indicates to the address space that
-       the given range of bytes is about to be written.  The
-       address_space should check that the write will be able to
-       complete, by allocating space if necessary and doing any other
-       internal housekeeping.  If the write will update parts of
-       any basic-blocks on storage, then those blocks should be
-       pre-read (if they haven't been read already) so that the
-       updated blocks can be written out properly.
-       The page will be locked.
-
-       Note: the page _must not_ be marked uptodate in this function
-       (or anywhere else) unless it actually is uptodate right now. As
-       soon as a page is marked uptodate, it is possible for a concurrent
-       read(2) to copy it to userspace.
-
-  commit_write: If prepare_write succeeds, new data will be copied
-        into the page and then commit_write will be called.  It will
-        typically update the size of the file (if appropriate) and
-        mark the inode as dirty, and do any other related housekeeping
-        operations.  It should avoid returning an error if possible -
-        errors should have been handled by prepare_write.
-
-  write_begin: This is intended as a replacement for prepare_write. The
-       key differences being that:
-               - it returns a locked page (in *pagep) rather than being
-                 given a pre locked page;
-               - it must be able to cope with short writes (where the
-                 length passed to write_begin is greater than the number
-                 of bytes copied into the page).
-
+  write_begin:
        Called by the generic buffered write code to ask the filesystem to
        prepare to write len bytes at the given offset in the file. The
        address_space should check that the write will be able to complete,
@@ -640,6 +608,9 @@ struct address_space_operations {
         The filesystem must return the locked pagecache page for the specified
        offset, in *pagep, for the caller to write into.
 
+       It must be able to cope with short writes (where the length passed to
+       write_begin is greater than the number of bytes copied into the page).
+
        flags is a field for AOP_FLAG_xxx flags, described in
        include/linux/fs.h.
 
index d330fe3103da9c9a3cb8f888ac7255ce48e666d4..ea5a827395dd31a6c34e91da54a6d81367be077a 100644 (file)
@@ -291,6 +291,9 @@ explains which is which.
   CPU#: The CPU which the process was running on.
 
   irqs-off: 'd' interrupts are disabled. '.' otherwise.
+           Note: If the architecture does not support a way to
+                 read the irq flags variable, an 'X' will always
+                 be printed here.
 
   need-resched: 'N' task need_resched is set, '.' otherwise.
 
index 266481fd26e2de612cd3a87075c6cc103501e961..70e6a0cc1e15e822b5d20f831d57a60eb078668e 100644 (file)
@@ -42,7 +42,7 @@ I suspect that this driver could be made to work for the following SiS
 chipsets as well: 635, and 635T. If anyone owns a board with those chips
 AND is willing to risk crashing & burning an otherwise well-behaved kernel
 in the name of progress... please contact me at <mhoffman@lightlink.com> or
-via the project's mailing list: <i2c@lm-sensors.org>.  Please send bug
+via the linux-i2c mailing list: <linux-i2c@vger.kernel.org>.  Please send bug
 reports and/or success stories as well.
 
 
diff --git a/Documentation/ia64/.gitignore b/Documentation/ia64/.gitignore
new file mode 100644 (file)
index 0000000..ab806ed
--- /dev/null
@@ -0,0 +1 @@
+aliasing-test
index 8cac6c2f23ee3dd1337efb71db394e51c3284492..c1679e913fca4668584be5c5e2e296bc75f40ada 100644 (file)
@@ -5,7 +5,7 @@ I want to thank all who contributed to this project and especially to:
 Thomas Bogendörfer (tsbogend@bigbug.franken.de)
   Tester, lots of bugfixes and hints.
 
-Alan Cox (alan@redhat.com)
+Alan Cox (alan@lxorguk.ukuu.org.uk)
   For help getting into standard-kernel.
 
 Henner Eisen (eis@baty.hanse.de)
index 0775cf4798b22f89d484f171f3a79726712ed695..55476982b5ca85f56e9469c8e77f80fddf54c6f4 100644 (file)
@@ -11,14 +11,14 @@ for non English (read: Japanese) speakers and is not intended as a
 fork. So if you have any comments or updates for this file, please try
 to update the original English file first.
 
-Last Updated: 2008/08/21
+Last Updated: 2008/10/24
 ==================================
 これは、
-linux-2.6.27/Documentation/HOWTO
+linux-2.6.28/Documentation/HOWTO
 の和訳です。
 
 翻訳団体: JF プロジェクト < http://www.linux.or.jp/JF/ >
-翻訳日: 2008/8/5
+翻訳日: 2008/10/24
 翻訳者: Tsugikazu Shibata <tshibata at ab dot jp dot nec dot com>
 校正者: 松倉さん <nbh--mats at nifty dot com>
          小林 雅典さん (Masanori Kobayasi) <zap03216 at nifty dot ne dot jp>
@@ -110,8 +110,8 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを
 新しいドキュメントファイルも追加することを勧めます。
 カーネルの変更が、カーネルがユーザ空間に公開しているインターフェイスの
 変更を引き起こす場合、その変更を説明するマニュアルページのパッチや情報
\82\92ã\83\9eã\83\8bã\83¥ã\82¢ã\83«ã\83\9aã\83¼ã\82¸ã\81®ã\83¡ã\83³ã\83\86ã\83\8a mtk.manpages@gmail.com ã\81«é\80\81ã\82\8bã\81\93ã\81¨ã\82\92å\8b§ã\82\81ã\81¾
-す。
\82\92ã\83\9eã\83\8bã\83¥ã\82¢ã\83«ã\83\9aã\83¼ã\82¸ã\81®ã\83¡ã\83³ã\83\86ã\83\8a mtk.manpages@gmail.com ã\81«é\80\81ã\82\8aã\80\81CC ã\82\92
+linux-api@ver.kernel.org に送ることを勧めます。
 
 以下はカーネルソースツリーに含まれている読んでおくべきファイルの一覧で
 す-
@@ -149,7 +149,7 @@ Linux カーネルソースツリーは幅広い範囲のドキュメントを
      この他にパッチを作る方法についてのよくできた記述は-
 
        "The Perfect Patch"
-               http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
+               http://userweb.kernel.org/~akpm/stuff/tpp.txt
        "Linux kernel patch submission format"
                http://linux.yyz.us/patch-format.html
 
@@ -664,7 +664,7 @@ Linux カーネルコミュニティは、一度に大量のコードの塊を
 これについて全てがどのようにあるべきかについての詳細は、以下のドキュメ
 ントの ChangeLog セクションを見てください-
   "The Perfect Patch"
-      http://www.zip.com.au/~akpm/linux/patches/stuff/tpp.txt
+      http://userweb.kernel.org/~akpm/stuff/tpp.txt
 
 これらのどれもが、時にはとても困難です。これらの慣例を完璧に実施するに
 は数年かかるかもしれません。これは継続的な改善のプロセスであり、そのた
index 343e0f0f84b60e9f62bcdef4963f5c8912073c8a..1bbcaa8982b6c2445fcfdd852f9e33702129cd8b 100644 (file)
@@ -100,7 +100,7 @@ parameter is applicable:
        X86-32  X86-32, aka i386 architecture is enabled.
        X86-64  X86-64 architecture is enabled.
                        More X86-64 boot options can be found in
-                       Documentation/x86_64/boot-options.txt .
+                       Documentation/x86/x86_64/boot-options.txt .
        X86     Either 32bit or 64bit x86 (same as X86-32+X86-64)
 
 In addition, the following text indicates that the option:
@@ -112,10 +112,10 @@ In addition, the following text indicates that the option:
 Parameters denoted with BOOT are actually interpreted by the boot
 loader, and have no meaning to the kernel directly.
 Do not modify the syntax of boot loader parameters without extreme
-need or coordination with <Documentation/i386/boot.txt>.
+need or coordination with <Documentation/x86/i386/boot.txt>.
 
 There are also arch-specific kernel-parameters not documented here.
-See for example <Documentation/x86_64/boot-options.txt>.
+See for example <Documentation/x86/x86_64/boot-options.txt>.
 
 Note that ALL kernel parameters listed below are CASE SENSITIVE, and that
 a trailing = on the name of any parameter states that that parameter will
@@ -1222,7 +1222,7 @@ and is between 256 and 4096 characters. It is defined in the file
 
        mce             [X86-32] Machine Check Exception
 
-       mce=option      [X86-64] See Documentation/x86_64/boot-options.txt
+       mce=option      [X86-64] See Documentation/x86/x86_64/boot-options.txt
 
        md=             [HW] RAID subsystems devices and level
                        See Documentation/md.txt.
@@ -1728,7 +1728,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        See Documentation/paride.txt.
 
        pirq=           [SMP,APIC] Manual mp-table setup
-                       See Documentation/i386/IO-APIC.txt.
+                       See Documentation/x86/i386/IO-APIC.txt.
 
        plip=           [PPT,NET] Parallel port network link
                        Format: { parport<nr> | timid | 0 }
@@ -2343,7 +2343,7 @@ and is between 256 and 4096 characters. It is defined in the file
                        See Documentation/fb/modedb.txt.
 
        vga=            [BOOT,X86-32] Select a particular video mode
-                       See Documentation/i386/boot.txt and
+                       See Documentation/x86/i386/boot.txt and
                        Documentation/svga.txt.
                        Use vga=ask for menu.
                        This is actually a boot loader parameter; the value is
index bac037eb1cda771905bc9ed22926f8eb6a237481..725eef81cd48b2af4e2af1c8574fddbf102d03cf 100644 (file)
@@ -1,5 +1,5 @@
 # This creates the demonstration utility "lguest" which runs a Linux guest.
-CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include
+CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include
 LDLIBS:=-lz
 
 all: lguest
index 7228369d1014b956ff3c8843d8ef642a225682b3..804520633fcf6ad7697b56a2ad18726d1af31cc1 100644 (file)
@@ -44,7 +44,7 @@
 #include "linux/virtio_console.h"
 #include "linux/virtio_rng.h"
 #include "linux/virtio_ring.h"
-#include "asm-x86/bootparam.h"
+#include "asm/bootparam.h"
 /*L:110 We can ignore the 39 include files we need for this program, but I do
  * want to draw attention to the use of kernel-style types.
  *
@@ -402,7 +402,7 @@ static unsigned long load_bzimage(int fd)
        void *p = from_guest_phys(0x100000);
 
        /* Go back to the start of the file and read the header.  It should be
-        * a Linux boot header (see Documentation/i386/boot.txt) */
+        * a Linux boot header (see Documentation/x86/i386/boot.txt) */
        lseek(fd, 0, SEEK_SET);
        read(fd, &boot, sizeof(boot));
 
diff --git a/Documentation/networking/.gitignore b/Documentation/networking/.gitignore
new file mode 100644 (file)
index 0000000..286a568
--- /dev/null
@@ -0,0 +1 @@
+ifenslave
index b1b7499dd9d33703f431f96710d523a16d0757a1..8006c227fda25fbd150e183a622b94afd9defd86 100644 (file)
@@ -60,6 +60,6 @@ Tobias Ringstrom <tori@unhappy.mine.nu> : Current Maintainer
 Contributors:
 
 Marcelo Tosatti <marcelo@conectiva.com.br>
-Alan Cox <alan@redhat.com>
+Alan Cox <alan@lxorguk.ukuu.org.uk>
 Jeff Garzik <jgarzik@pobox.com>
 Vojtech Pavlik <vojtech@suse.cz>
diff --git a/Documentation/pcmcia/.gitignore b/Documentation/pcmcia/.gitignore
new file mode 100644 (file)
index 0000000..53d0813
--- /dev/null
@@ -0,0 +1 @@
+crc32hash
index fc234d093fbf175f8a78dabc3d8ce141f74799ec..aabcc3a089baf66c2dc10210017e0ca6f23199b0 100644 (file)
@@ -4,8 +4,6 @@ sched-arch.txt
        - CPU Scheduler implementation hints for architecture specific code.
 sched-coding.txt
        - reference for various scheduler-related methods in the O(1) scheduler.
-sched-design.txt
-       - goals, design and implementation of the Linux O(1) scheduler.
 sched-design-CFS.txt
        - goals, design and implementation of the Complete Fair Scheduler.
 sched-domains.txt
index 709ca991a451a61cef85ac519805f3e864a453cb..ddace3afc83b55974e5f6075d170711af3bcdb61 100644 (file)
@@ -128,7 +128,7 @@ Supported Cards/Chipsets
 
 People
 -------------------------
-Alan Cox <alan@redhat.com>
+Alan Cox <alan@lxorguk.ukuu.org.uk>
 Christoph Hellwig <hch@infradead.org>  (updates for new-style PCI probing and SCSI host registration,
                                         small cleanups/fixes)
 Matt Domsch <matt_domsch@dell.com>     (revision ioctl, adapter messages)
diff --git a/Documentation/spi/.gitignore b/Documentation/spi/.gitignore
new file mode 100644 (file)
index 0000000..4280576
--- /dev/null
@@ -0,0 +1,2 @@
+spidev_fdx
+spidev_test
index 4cfc78835bc1f605e53eec4482aab94d0200688d..a452227361b18a88d695d203e40e33151f93af89 100644 (file)
@@ -12,6 +12,7 @@ Rules on what kind of patches are accepted, and which ones are not, into the
    marked CONFIG_BROKEN), an oops, a hang, data corruption, a real
    security issue, or some "oh, that's not good" issue.  In short, something
    critical.
+ - New device IDs and quirks are also accepted.
  - No "theoretical race condition" issues, unless an explanation of how the
    race can be exploited is also provided.
  - It cannot contain any "trivial" fixes in it (spelling changes,
index bde799e065989a6ec47c7b7b9893acfaaf77426c..a4ccdd1981cfbc9f45b8aaabf46017dd739ab5fa 100644 (file)
@@ -363,11 +363,21 @@ tainted:
 Non-zero if the kernel has been tainted.  Numeric values, which
 can be ORed together:
 
-  1 - A module with a non-GPL license has been loaded, this
-      includes modules with no license.
-      Set by modutils >= 2.4.9 and module-init-tools.
-  2 - A module was force loaded by insmod -f.
-      Set by modutils >= 2.4.9 and module-init-tools.
-  4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
- 64 - A module from drivers/staging was loaded.
+   1 - A module with a non-GPL license has been loaded, this
+       includes modules with no license.
+       Set by modutils >= 2.4.9 and module-init-tools.
+   2 - A module was force loaded by insmod -f.
+       Set by modutils >= 2.4.9 and module-init-tools.
+   4 - Unsafe SMP processors: SMP with CPUs not designed for SMP.
+   8 - A module was forcibly unloaded from the system by rmmod -f.
+  16 - A hardware machine check error occurred on the system.
+  32 - A bad page was discovered on the system.
+  64 - The user has asked that the system be marked "tainted".  This
+       could be because they are running software that directly modifies
+       the hardware, or for other reasons.
+ 128 - The system has died.
+ 256 - The ACPI DSDT has been overridden with one supplied by the user
+        instead of using the one provided by the hardware.
+ 512 - A kernel warning has occurred.
+1024 - A module from drivers/staging was loaded.
 
diff --git a/Documentation/video4linux/.gitignore b/Documentation/video4linux/.gitignore
new file mode 100644 (file)
index 0000000..9527039
--- /dev/null
@@ -0,0 +1 @@
+v4lgrab
index 8aad6dd93d6be5ea80a2a444af8308619eb6d237..eb41b26508600f82829b33feb59961abb330ac76 100644 (file)
@@ -3,7 +3,7 @@ Contributors to bttv:
 Michael Chu <mmchu@pobox.com>
   AverMedia fix and more flexible card recognition
 
-Alan Cox <alan@redhat.com>
+Alan Cox <alan@lxorguk.ukuu.org.uk>
   Video4Linux interface and 2.1.x kernel adaptation
 
 Chris Kleitsch
diff --git a/Documentation/vm/.gitignore b/Documentation/vm/.gitignore
new file mode 100644 (file)
index 0000000..33e8a02
--- /dev/null
@@ -0,0 +1 @@
+slabinfo
diff --git a/Documentation/watchdog/src/.gitignore b/Documentation/watchdog/src/.gitignore
new file mode 100644 (file)
index 0000000..ac90997
--- /dev/null
@@ -0,0 +1,2 @@
+watchdog-simple
+watchdog-test
index 72ffb5373ec73ac9ee8c9d05491effa7b5f8a42c..f6d561a1a9b2d3d022baf17bb05138485fb32130 100644 (file)
@@ -35,7 +35,7 @@ APICs
 
    nolapic      Don't use the local APIC (alias for i386 compatibility)
 
-   pirq=...     See Documentation/i386/IO-APIC.txt
+   pirq=...     See Documentation/x86/i386/IO-APIC.txt
 
    noapictimer  Don't set up the APIC timer
 
@@ -139,7 +139,7 @@ Non Executable Mappings
 SMP
 
   additional_cpus=NUM Allow NUM more CPUs for hotplug
-                (defaults are specified by the BIOS, see Documentation/x86_64/cpu-hotplug-spec)
+                (defaults are specified by the BIOS, see Documentation/x86/x86_64/cpu-hotplug-spec)
 
 NUMA
 
index d1a985c5b00a36c5b141deda81addb8a6279da2e..33bb56655991421f8a5e7e24f695eab0ce73fe63 100644 (file)
@@ -10,7 +10,7 @@ amount of system memory that are available to a certain class of tasks.
 For more information on the features of cpusets, see Documentation/cpusets.txt.
 There are a number of different configurations you can use for your needs.  For
 more information on the numa=fake command line option and its various ways of
-configuring fake nodes, see Documentation/x86_64/boot-options.txt.
+configuring fake nodes, see Documentation/x86/x86_64/boot-options.txt.
 
 For the purposes of this introduction, we'll assume a very primitive NUMA
 emulation setup of "numa=fake=4*512,".  This will split our system memory into
index 16202c8ac68f06bf2dfcb387aa2ee91c5e9bc4f6..d643e862b8e49af7ddc15243f310703278f199e3 100644 (file)
@@ -347,7 +347,7 @@ S:  Maintained
 ALI1563 I2C DRIVER
 P:     Rudolf Marek
 M:     r.marek@assembler.cz
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 S:     Maintained
 
 ALPHA PORT
@@ -610,6 +610,11 @@ P: Philipp Zabel
 M:     philipp.zabel@gmail.com
 S:     Maintained
 
+ARM/NEC MOBILEPRO 900/c MACHINE SUPPORT
+P:     Michael Petchkovsky
+M:     mkpetch@internode.on.net
+S:     Maintained
+
 ARM/TOSA MACHINE SUPPORT
 P:     Dmitry Baryshkov
 M:     dbaryshkov@gmail.com
@@ -738,6 +743,8 @@ P:  Nick Kossifidis
 M:     mickflemm@gmail.com
 P:     Luis R. Rodriguez
 M:     mcgrof@gmail.com
+P:     Bob Copeland
+M:     me@bobcopeland.com
 L:     linux-wireless@vger.kernel.org
 L:     ath5k-devel@lists.ath5k.org
 S:     Maintained
@@ -1749,7 +1756,7 @@ FREESCALE I2C CPM DRIVER
 P:     Jochen Friedrich
 M:     jochen@scram.de
 L:     linuxppc-dev@ozlabs.org
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 S:     Maintained
 
 FREESCALE SOC FS_ENET DRIVER
@@ -2022,7 +2029,7 @@ S:        Maintained
 I2C/SMBUS STUB DRIVER
 P:     Mark M. Hoffman
 M:     mhoffman@lightlink.com
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 S:     Maintained
 
 I2C SUBSYSTEM
@@ -2030,14 +2037,14 @@ P:      Jean Delvare (PC drivers, core)
 M:     khali@linux-fr.org
 P:     Ben Dooks (embedded platforms)
 M:     ben-linux@fluff.org
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 T:     quilt http://khali.linux-fr.org/devel/linux-2.6/jdelvare-i2c/
 S:     Maintained
 
 I2C-TINY-USB DRIVER
 P:     Till Harbaum
 M:     till@harbaum.org
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 T:     http://www.harbaum.org/till/i2c_tiny_usb
 S:     Maintained
 
@@ -2701,6 +2708,16 @@ M:       matthew@wil.cx
 L:     linux-scsi@vger.kernel.org
 S:     Maintained
 
+LTP (Linux Test Project)
+P:     Subrata Modak
+M:     subrata@linux.vnet.ibm.com
+P:     Mike Frysinger
+M:     vapier@gentoo.org
+L:     ltp-list@lists.sourceforge.net (subscribers-only)
+W:     http://ltp.sourceforge.net/
+T:     git kernel.org/pub/scm/linux/kernel/git/galak/ltp.git
+S:     Maintained
+
 M32R ARCHITECTURE
 P:     Hirokazu Takata
 M:     takata@linux-m32r.org
@@ -3143,7 +3160,7 @@ S:        Maintained
 OPENCORES I2C BUS DRIVER
 P:     Peter Korsgaard
 M:     jacmet@sunsite.dk
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 S:     Maintained
 
 OPROFILE
@@ -3190,7 +3207,7 @@ S:        Maintained
 PA SEMI SMBUS DRIVER
 P:     Olof Johansson
 M:     olof@lixom.net
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 S:     Maintained
 
 PANASONIC LAPTOP ACPI EXTRAS DRIVER
@@ -3335,7 +3352,7 @@ S:        Maintained
 PNXxxxx I2C DRIVER
 P:     Vitaly Wool
 M:     vitalywool@gmail.com
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 S:     Maintained
 
 PPP PROTOCOL DRIVERS AND COMPRESSORS
@@ -3799,7 +3816,7 @@ S:        Maintained
 SIS 96X I2C/SMBUS DRIVER
 P:     Mark M. Hoffman
 M:     mhoffman@lightlink.com
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 S:     Maintained
 
 SIS FRAMEBUFFER DRIVER
@@ -4546,7 +4563,7 @@ S:        Maintained
 VIAPRO SMBUS DRIVER
 P:     Jean Delvare
 M:     khali@linux-fr.org
-L:     i2c@lm-sensors.org
+L:     linux-i2c@vger.kernel.org
 S:     Maintained
 
 VIA UNICHROME(PRO)/CHROME9 FRAMEBUFFER DRIVER
index a7f20687d8e55e9f099740b4b8d00554d0a9db33..d50081751e026ab4348cc36d9eba8679e8993800 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -961,6 +961,7 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH)
 
 # The asm symlink changes when $(ARCH) changes.
 # Detect this and ask user to run make mrproper
+# If asm is a stale symlink (point to dir that does not exist) remove it
 define check-symlink
        set -e;                                                            \
        if [ -L include/asm ]; then                                        \
@@ -970,6 +971,10 @@ define check-symlink
                        echo "       set ARCH or save .config and run 'make mrproper' to fix it";             \
                        exit 1;                                            \
                fi;                                                        \
+               test -e $$asmlink || rm include/asm;                       \
+       elif [ -d include/asm ]; then                                      \
+               echo "ERROR: $@ is a directory but a symlink was expected";\
+               exit 1;                                                    \
        fi
 endef
 
@@ -1431,7 +1436,8 @@ ALLSOURCE_ARCHS := $(SRCARCH)
 define find-sources
         ( for arch in $(ALLSOURCE_ARCHS) ; do \
               find $(__srctree)arch/$${arch} $(RCS_FIND_IGNORE) \
-                   -name $1 -print; \
+                   -wholename $(__srctree)arch/$${arch}/include/asm -type d -prune \
+                   -o -name $1 -print; \
          done ; \
          find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \
               -name $1 -print; \
index db83091614082efb5aac4a6dc6630d5d2e99353f..780bbf7cb26f28266f3141250b763b82f2590e69 100644 (file)
 /*
  * Prototypes
  */
+#ifdef CONFIG_PM
 static int sharpsl_off_charge_battery(void);
-static int sharpsl_check_battery_temp(void);
 static int sharpsl_check_battery_voltage(void);
-static int sharpsl_ac_check(void);
 static int sharpsl_fatal_check(void);
+#endif
+static int sharpsl_check_battery_temp(void);
+static int sharpsl_ac_check(void);
 static int sharpsl_average_value(int ad);
 static void sharpsl_average_clear(void);
 static void sharpsl_charge_toggle(struct work_struct *private_);
@@ -424,6 +426,7 @@ static int sharpsl_check_battery_temp(void)
        return 0;
 }
 
+#ifdef CONFIG_PM
 static int sharpsl_check_battery_voltage(void)
 {
        int val, i, buff[5];
@@ -455,6 +458,7 @@ static int sharpsl_check_battery_voltage(void)
 
        return 0;
 }
+#endif
 
 static int sharpsl_ac_check(void)
 {
@@ -586,8 +590,6 @@ static int corgi_pxa_pm_enter(suspend_state_t state)
 
        return 0;
 }
-#endif
-
 
 /*
  * Check for fatal battery errors
@@ -738,7 +740,10 @@ static int sharpsl_off_charge_battery(void)
                }
        }
 }
-
+#else
+#define sharpsl_pm_suspend     NULL
+#define sharpsl_pm_resume      NULL
+#endif
 
 static ssize_t battery_percentage_show(struct device *dev, struct device_attribute *attr, char *buf)
 {
@@ -768,10 +773,12 @@ static void sharpsl_apm_get_power_status(struct apm_power_info *info)
        info->battery_life = sharpsl_pm.battstat.mainbat_percent;
 }
 
+#ifdef CONFIG_PM
 static struct platform_suspend_ops sharpsl_pm_ops = {
        .enter          = corgi_pxa_pm_enter,
        .valid          = suspend_valid_only_mem,
 };
+#endif
 
 static int __init sharpsl_pm_probe(struct platform_device *pdev)
 {
@@ -802,7 +809,9 @@ static int __init sharpsl_pm_probe(struct platform_device *pdev)
 
        apm_get_power_status = sharpsl_apm_get_power_status;
 
+#ifdef CONFIG_PM
        suspend_set_ops(&sharpsl_pm_ops);
+#endif
 
        mod_timer(&sharpsl_pm.ac_timer, jiffies + msecs_to_jiffies(250));
 
index 9c040c78889a7597d4660b0e7e34eae9d657bdec..e263fda3e2d123ac04b1450695b03a59fd200f59 100644 (file)
@@ -165,6 +165,7 @@ static struct at91_mmc_data __initdata afeb9260_mmc_data = {
 static struct i2c_board_info __initdata afeb9260_i2c_devices[] = {
        {
                I2C_BOARD_INFO("fm3130", 0x68),
+       }, {
                I2C_BOARD_INFO("24c64", 0x50),
        },
 };
index 76d76e2fa69ef108021b521291f728cc79152182..bffa6741a7515d890179b7a4f1db286287539fcf 100644 (file)
@@ -13,6 +13,7 @@
 #ifndef __ASM_ARCH_AT91RM9200_GPIO_H
 #define __ASM_ARCH_AT91RM9200_GPIO_H
 
+#include <linux/kernel.h>
 #include <asm/irq.h>
 
 #define PIN_BASE               NR_AIC_IRQS
@@ -220,6 +221,7 @@ static inline int gpio_request(unsigned gpio, const char *label)
 
 static inline void gpio_free(unsigned gpio)
 {
+       might_sleep();
 }
 
 extern int gpio_direction_input(unsigned gpio);
index de53f0be71b9bce70b34941eb51ba263f4cbc3ff..48345fb34613434d2fa6c0e3b7bbd7dcb0a529c4 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/serial_core.h>
 #include <linux/device.h>
 #include <linux/mm.h>
+#include <linux/dma-mapping.h>
 #include <linux/time.h>
 #include <linux/timex.h>
 #include <linux/delay.h>
@@ -449,12 +450,13 @@ static struct resource ep93xx_ohci_resources[] = {
        },
 };
 
+
 static struct platform_device ep93xx_ohci_device = {
        .name           = "ep93xx-ohci",
        .id             = -1,
        .dev            = {
-               .dma_mask               = (void *)0xffffffff,
-               .coherent_dma_mask      = 0xffffffff,
+               .dma_mask               = &ep93xx_ohci_device.dev.coherent_dma_mask,
+               .coherent_dma_mask      = DMA_BIT_MASK(32),
        },
        .num_resources  = ARRAY_SIZE(ep93xx_ohci_resources),
        .resource       = ep93xx_ohci_resources,
index 6e3d795f22642c3d4301dba5f185ce6d968589bd..502d5aa2c093dad2b00acd22e5564bbfad7a21a6 100644 (file)
@@ -1,5 +1,6 @@
 #ifndef _IMX_GPIO_H
 
+#include <linux/kernel.h>
 #include <mach/imx-regs.h>
 
 #define IMX_GPIO_ALLOC_MODE_NORMAL     0
@@ -63,6 +64,8 @@ static inline int gpio_request(unsigned gpio, const char *label)
 
 static inline void gpio_free(unsigned gpio)
 {
+       might_sleep();
+
        imx_gpio_free(gpio);
 }
 
index 9fbde177920f74bf8f741ca2924a4f9cdf339030..cd5aec26c072d3d218cd171ad8cb02635529ba84 100644 (file)
@@ -25,6 +25,7 @@
 #ifndef __ASM_ARCH_IXP4XX_GPIO_H
 #define __ASM_ARCH_IXP4XX_GPIO_H
 
+#include <linux/kernel.h>
 #include <mach/hardware.h>
 
 static inline int gpio_request(unsigned gpio, const char *label)
@@ -34,6 +35,8 @@ static inline int gpio_request(unsigned gpio, const char *label)
 
 static inline void gpio_free(unsigned gpio)
 {
+       might_sleep();
+
        return;
 }
 
index 73c84168761ce4bf34decb42a536da6b16653d4b..d4af5c335f1616aace85c43a4fa6b57f25c21006 100644 (file)
@@ -11,6 +11,8 @@
 #ifndef __ASM_ARCH_GPIO_H_
 #define __ASM_ARCH_GPIO_H_
 
+#include <linux/kernel.h>
+
 #define KS8695_GPIO_0          0
 #define KS8695_GPIO_1          1
 #define KS8695_GPIO_2          2
@@ -74,6 +76,7 @@ static inline int gpio_request(unsigned int pin, const char *label)
 
 static inline void gpio_free(unsigned int pin)
 {
+       might_sleep();
 }
 
 #endif
index 1be4a390c63f1ae64ed84415ffed60bfec0be646..f902a7c37c31d6a6519d58b4559d9f87364799c0 100644 (file)
@@ -35,6 +35,8 @@
 #include <mach/imx-uart.h>
 #include <mach/iomux-mx3.h>
 
+#include "devices.h"
+
 /*!
  * @file mx31ads.c
  *
index 11fda95c86a5ca2911bdb8aaf97b6711171d8bf3..843f68c8ead11d2d1c1ada2bd017d1b93b0cd817 100644 (file)
@@ -91,12 +91,12 @@ static struct map_desc pcm037_io_desc[] __initdata = {
                .virtual        = AIPS1_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(AIPS1_BASE_ADDR),
                .length         = AIPS1_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_DEVICE_NONSHARED
        }, {
                .virtual        = AIPS2_BASE_ADDR_VIRT,
                .pfn            = __phys_to_pfn(AIPS2_BASE_ADDR),
                .length         = AIPS2_SIZE,
-               .type           = MT_DEVICE
+               .type           = MT_DEVICE_NONSHARED
        },
 };
 
index 5241e6a286cc83fc70a7281c82712137ac9e747c..5503ca09c4aee4a1d2dc8e5a249ddb6e9c31814a 100644 (file)
@@ -8,6 +8,7 @@
  * under the terms of the GNU General Public License version 2 as published by
  * the Free Software Foundation.
  */
+#include <linux/kernel.h>
 #include <linux/compiler.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
@@ -63,6 +64,7 @@ EXPORT_SYMBOL(gpio_request);
 
 void gpio_free(unsigned gpio)
 {
+       might_sleep();
        clear_bit(gpio, gpiores);
        return;
 }
index fc419868e39fae9670401c652e5d86b4191ae5e0..f99d08811e5af6487bb31120f2b8f8433ba17c23 100644 (file)
@@ -165,6 +165,8 @@ EXPORT_SYMBOL(gpio_request);
 
 void gpio_free(unsigned pin)
 {
+       might_sleep();
+
        if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) {
                pr_debug("%s: invalid GPIO %d\n", __func__, pin);
                return;
index eb7d6c94aa425bf23778efd92293dfa1737fd6df..e35259032813ae82543a75bd24b8a3a69f3f2fd8 100644 (file)
@@ -204,7 +204,9 @@ static struct sharpsl_charger_machinfo corgi_pm_machinfo = {
        .read_devdata    = corgipm_read_devdata,
        .charger_wakeup  = corgi_charger_wakeup,
        .should_wakeup   = corgi_should_wakeup,
-#ifdef CONFIG_BACKLIGHT_CORGI
+#if defined(CONFIG_LCD_CORGI)
+       .backlight_limit = corgi_lcd_limit_intensity,
+#elif defined(CONFIG_BACKLIGHT_CORGI)
        .backlight_limit = corgibl_limit_intensity,
 #endif
        .charge_on_volt   = SHARPSL_CHARGE_ON_VOLT,
index 3b1d4a72d4d1f08f43058e2a428939ba4b484cdd..8242e14a44fa10c8dc70d14a2255a2ab97aa16a3 100644 (file)
@@ -26,6 +26,7 @@ struct corgits_machinfo {
  * SharpSL Backlight
  */
 extern void corgibl_limit_intensity(int limit);
+extern void corgi_lcd_limit_intensity(int limit);
 
 
 /*
index 524f656dc56de561d11d4c467220d569380a2718..f0a5bbae0b45d32966d3f61f00c77ccf738bde16 100644 (file)
@@ -385,6 +385,16 @@ static void __init spitz_init_spi(void)
        if (err)
                goto err_free_2;
 
+       err = gpio_direction_output(SPITZ_GPIO_ADS7846_CS, 1);
+       if (err)
+               goto err_free_3;
+       err = gpio_direction_output(SPITZ_GPIO_LCDCON_CS, 1);
+       if (err)
+               goto err_free_3;
+       err = gpio_direction_output(SPITZ_GPIO_MAX1111_CS, 1);
+       if (err)
+               goto err_free_3;
+
        if (machine_is_akita()) {
                spitz_lcdcon_info.gpio_backlight_cont = AKITA_GPIO_BACKLIGHT_CONT;
                spitz_lcdcon_info.gpio_backlight_on = AKITA_GPIO_BACKLIGHT_ON;
@@ -394,6 +404,8 @@ static void __init spitz_init_spi(void)
        spi_register_board_info(ARRAY_AND_SIZE(spitz_spi_devices));
        return;
 
+err_free_3:
+       gpio_free(SPITZ_GPIO_MAX1111_CS);
 err_free_2:
        gpio_free(SPITZ_GPIO_LCDCON_CS);
 err_free_1:
index 53018db106ac278cc5a1d3f7c08ad8a4862967e6..072e77cfe5a36ee4002c0b861115e2c0d7c5f8e7 100644 (file)
@@ -198,7 +198,9 @@ struct sharpsl_charger_machinfo spitz_pm_machinfo = {
        .read_devdata     = spitzpm_read_devdata,
        .charger_wakeup   = spitz_charger_wakeup,
        .should_wakeup    = spitz_should_wakeup,
-#ifdef CONFIG_BACKLIGHT_CORGI
+#if defined(CONFIG_LCD_CORGI)
+       .backlight_limit = corgi_lcd_limit_intensity,
+#elif defined(CONFIG_BACKLIGHT_CORGI)
         .backlight_limit  = corgibl_limit_intensity,
 #endif
        .charge_on_volt   = SHARPSL_CHARGE_ON_VOLT,
index 04dc8b65401b4890b6ebc67eaac43f2c11d09169..8f6cf56c11c080fe9027777683bf1f8e39c2d882 100644 (file)
@@ -349,7 +349,7 @@ ENTRY(cpu_xsc3_switch_mm)
 cpu_xsc3_mt_table:
        .long   0x00                                            @ L_PTE_MT_UNCACHED
        .long   PTE_EXT_TEX(1)                                  @ L_PTE_MT_BUFFERABLE
-       .long   PTE_CACHEABLE                                   @ L_PTE_MT_WRITETHROUGH
+       .long   PTE_EXT_TEX(5) | PTE_CACHEABLE                  @ L_PTE_MT_WRITETHROUGH
        .long   PTE_CACHEABLE | PTE_BUFFERABLE                  @ L_PTE_MT_WRITEBACK
        .long   PTE_EXT_TEX(1) | PTE_BUFFERABLE                 @ L_PTE_MT_DEV_SHARED
        .long   0x00                                            @ unused
index 733e0acac91673621b9207db751e5ddd5b2333ac..de5c4747453fbedaf476fd3043a857fe8a1ee6c3 100644 (file)
@@ -188,7 +188,7 @@ static int mxc_gpio_get(struct gpio_chip *chip, unsigned offset)
        struct mxc_gpio_port *port =
                container_of(chip, struct mxc_gpio_port, chip);
 
-       return (__raw_readl(port->base + GPIO_DR) >> offset) & 1;
+       return (__raw_readl(port->base + GPIO_PSR) >> offset) & 1;
 }
 
 static int mxc_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
index 65b6810124c1604adb43d0adb3ba3803de6e9951..5d4cb11964411ce924cbb44392cd7788f07defe2 100644 (file)
 /* Allow IO space to be anywhere in the memory */
 #define IO_SPACE_LIMIT 0xffffffff
 
+#ifdef CONFIG_ARCH_MX3
+#define __arch_ioremap __mx3_ioremap
+#define __arch_iounmap __iounmap
+
+static inline void __iomem *
+__mx3_ioremap(unsigned long phys_addr, size_t size, unsigned int mtype)
+{
+       if (mtype == MT_DEVICE) {
+               /* Access all peripherals below 0x80000000 as nonshared device
+                * but leave l2cc alone.
+                */
+               if ((phys_addr < 0x80000000) && ((phys_addr < L2CC_BASE_ADDR) ||
+                       (phys_addr >= L2CC_BASE_ADDR + L2CC_SIZE)))
+                       mtype = MT_DEVICE_NONSHARED;
+       }
+
+       return __arm_ioremap(phys_addr, size, mtype);
+}
+#endif
+
 /* io address mapping macro */
 #define __io(a)                        ((void __iomem *)(a))
 
index 5fb2bb93de3b58480dfb0cd85aca68537342bd92..0490794fe4aa3a61890443a52e05c29bb18670e2 100644 (file)
@@ -11,6 +11,5 @@ extern int force_iommu, no_iommu;
 extern int iommu_detected;
 extern void iommu_dma_init(void);
 extern void machvec_init(const char *name);
-extern int forbid_dac;
 
 #endif
index 10a75b5576503ed360f4566beb912e38fce0437b..031abbf9c875f01a1276c88a94b08612c497ce2d 100644 (file)
@@ -89,13 +89,6 @@ int iommu_dma_supported(struct device *dev, u64 mask)
 {
        struct dma_mapping_ops *ops = get_dma_ops(dev);
 
-#ifdef CONFIG_PCI
-       if (mask > 0xffffffff && forbid_dac > 0) {
-               dev_info(dev, "Disallowing DAC for device\n");
-               return 0;
-       }
-#endif
-
        if (ops->dma_supported_op)
                return ops->dma_supported_op(dev, mask);
 
index 653574bc19cf0c52a99f0c5ef76145c61d52d1fa..f4af967a6b3081173b9183d8e735d133382072c5 100644 (file)
@@ -327,7 +327,6 @@ config SGI_IP22
        select IP22_CPU_SCACHE
        select IRQ_CPU
        select GENERIC_ISA_DMA_SUPPORT_BROKEN
-       select SGI_HAS_DS1286
        select SGI_HAS_I8042
        select SGI_HAS_INDYDOG
        select SGI_HAS_HAL2
@@ -382,7 +381,6 @@ config SGI_IP28
        select HW_HAS_EISA
        select I8253
        select I8259
-       select SGI_HAS_DS1286
        select SGI_HAS_I8042
        select SGI_HAS_INDYDOG
        select SGI_HAS_HAL2
@@ -893,9 +891,6 @@ config EMMA2RH
 config SERIAL_RM9000
        bool
 
-config SGI_HAS_DS1286
-       bool
-
 config SGI_HAS_INDYDOG
        bool
 
index cc8e6bf2b2457056fdafc99ab0d33f51bf49b4e4..f719bf5e01aa4b2a64b9c630beba112591f23308 100644 (file)
@@ -771,7 +771,6 @@ CONFIG_WATCHDOG=y
 CONFIG_INDYDOG=m
 # CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
-CONFIG_SGI_DS1286=m
 # CONFIG_R3964 is not set
 CONFIG_RAW_DRIVER=m
 CONFIG_MAX_RAW_DEVS=256
index 831d3e5a1ea6ba976d04f0febdd7793f51b367a0..34ea319be94c13cc08384b64b2535b46f119770f 100644 (file)
@@ -701,7 +701,6 @@ CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_WATCHDOG is not set
 CONFIG_HW_RANDOM=m
 # CONFIG_RTC is not set
-CONFIG_SGI_IP27_RTC=y
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
 # CONFIG_DRM is not set
index 822b01f643e3a420a09cf79412167c9aa7ceb1df..70a744e9a8c55027e6197898cffa7133da44ab74 100644 (file)
@@ -70,7 +70,6 @@ CONFIG_CPU_BIG_ENDIAN=y
 CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
 CONFIG_IRQ_CPU=y
 CONFIG_SWAP_IO_SPACE=y
-CONFIG_SGI_HAS_DS1286=y
 CONFIG_SGI_HAS_INDYDOG=y
 CONFIG_SGI_HAS_SEEQ=y
 CONFIG_SGI_HAS_WD93=y
@@ -585,7 +584,6 @@ CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_IPMI_HANDLER is not set
 # CONFIG_HW_RANDOM is not set
 # CONFIG_RTC is not set
-CONFIG_SGI_DS1286=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_RAW_DRIVER is not set
index 49df8c4c9d256afc7cf6dae67563e119f3dd64ad..bac4a960b24cbdaa6fde66fa2243b17dc5b31957 100644 (file)
@@ -558,39 +558,67 @@ static inline void __clear_bit_unlock(unsigned long nr, volatile unsigned long *
        __clear_bit(nr, addr);
 }
 
-#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64)
-
 /*
  * Return the bit position (0..63) of the most significant 1 bit in a word
  * Returns -1 if no 1 bit exists
  */
-static inline unsigned long __fls(unsigned long x)
+static inline unsigned long __fls(unsigned long word)
 {
-       int lz;
+       int num;
 
-       if (sizeof(x) == 4) {
+       if (BITS_PER_LONG == 32 &&
+           __builtin_constant_p(cpu_has_mips_r) && cpu_has_mips_r) {
                __asm__(
                "       .set    push                                    \n"
                "       .set    mips32                                  \n"
                "       clz     %0, %1                                  \n"
                "       .set    pop                                     \n"
-               : "=r" (lz)
-               : "r" (x));
+               : "=r" (num)
+               : "r" (word));
 
-               return 31 - lz;
+               return 31 - num;
        }
 
-       BUG_ON(sizeof(x) != 8);
+       if (BITS_PER_LONG == 64 &&
+           __builtin_constant_p(cpu_has_mips64) && cpu_has_mips64) {
+               __asm__(
+               "       .set    push                                    \n"
+               "       .set    mips64                                  \n"
+               "       dclz    %0, %1                                  \n"
+               "       .set    pop                                     \n"
+               : "=r" (num)
+               : "r" (word));
 
-       __asm__(
-       "       .set    push                                            \n"
-       "       .set    mips64                                          \n"
-       "       dclz    %0, %1                                          \n"
-       "       .set    pop                                             \n"
-       : "=r" (lz)
-       : "r" (x));
+               return 63 - num;
+       }
+
+       num = BITS_PER_LONG - 1;
 
-       return 63 - lz;
+#if BITS_PER_LONG == 64
+       if (!(word & (~0ul << 32))) {
+               num -= 32;
+               word <<= 32;
+       }
+#endif
+       if (!(word & (~0ul << (BITS_PER_LONG-16)))) {
+               num -= 16;
+               word <<= 16;
+       }
+       if (!(word & (~0ul << (BITS_PER_LONG-8)))) {
+               num -= 8;
+               word <<= 8;
+       }
+       if (!(word & (~0ul << (BITS_PER_LONG-4)))) {
+               num -= 4;
+               word <<= 4;
+       }
+       if (!(word & (~0ul << (BITS_PER_LONG-2)))) {
+               num -= 2;
+               word <<= 2;
+       }
+       if (!(word & (~0ul << (BITS_PER_LONG-1))))
+               num -= 1;
+       return num;
 }
 
 /*
@@ -612,23 +640,43 @@ static inline unsigned long __ffs(unsigned long word)
  * This is defined the same way as ffs.
  * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
  */
-static inline int fls(int word)
+static inline int fls(int x)
 {
-       __asm__("clz %0, %1" : "=r" (word) : "r" (word));
+       int r;
 
-       return 32 - word;
-}
+       if (__builtin_constant_p(cpu_has_mips_r) && cpu_has_mips_r) {
+               __asm__("clz %0, %1" : "=r" (x) : "r" (x));
 
-#if defined(CONFIG_64BIT) && defined(CONFIG_CPU_MIPS64)
-static inline int fls64(__u64 word)
-{
-       __asm__("dclz %0, %1" : "=r" (word) : "r" (word));
+               return 32 - x;
+       }
 
-       return 64 - word;
+       r = 32;
+       if (!x)
+               return 0;
+       if (!(x & 0xffff0000u)) {
+               x <<= 16;
+               r -= 16;
+       }
+       if (!(x & 0xff000000u)) {
+               x <<= 8;
+               r -= 8;
+       }
+       if (!(x & 0xf0000000u)) {
+               x <<= 4;
+               r -= 4;
+       }
+       if (!(x & 0xc0000000u)) {
+               x <<= 2;
+               r -= 2;
+       }
+       if (!(x & 0x80000000u)) {
+               x <<= 1;
+               r -= 1;
+       }
+       return r;
 }
-#else
+
 #include <asm-generic/bitops/fls64.h>
-#endif
 
 /*
  * ffs - find first bit set.
@@ -646,16 +694,6 @@ static inline int ffs(int word)
        return fls(word & -word);
 }
 
-#else
-
-#include <asm-generic/bitops/__ffs.h>
-#include <asm-generic/bitops/__fls.h>
-#include <asm-generic/bitops/ffs.h>
-#include <asm-generic/bitops/fls.h>
-#include <asm-generic/bitops/fls64.h>
-
-#endif /*defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) */
-
 #include <asm-generic/bitops/ffz.h>
 #include <asm-generic/bitops/find.h>
 
index 25b980c91e7eafa3ddbb2b684811329f54ac69b1..44437ed765e899a52caa04bd81f0c8036a9c2f64 100644 (file)
@@ -29,6 +29,7 @@
 #define _BRK_THREADBP  11      /* For threads, user bp (used by debuggers) */
 #define BRK_BUG                512     /* Used by BUG() */
 #define BRK_KDB                513     /* Used in KDB_ENTER() */
+#define BRK_MEMU       514     /* Used by FPU emulator */
 #define BRK_MULOVF     1023    /* Multiply overflow */
 
 #endif /* __ASM_BREAK_H */
index fe7dc2d59b6926b7e75a18fd6c103e4d92a884db..2988d29a0867f4c0ce187040e710e3c87344030d 100644 (file)
 #include <linux/compiler.h>
 #include <asm/types.h>
 
-#ifdef __GNUC__
+#if defined(__MIPSEB__)
+# define __BIG_ENDIAN
+#elif defined(__MIPSEL__)
+# define __LITTLE_ENDIAN
+#else
+# error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"
+#endif
+
+#define __SWAB_64_THRU_32__
 
 #ifdef CONFIG_CPU_MIPSR2
 
-static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x)
+static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
 {
        __asm__(
        "       wsbh    %0, %1                  \n"
@@ -24,9 +32,9 @@ static __inline__ __attribute_const__ __u16 ___arch__swab16(__u16 x)
 
        return x;
 }
-#define __arch__swab16(x)      ___arch__swab16(x)
+#define __arch_swab16 __arch_swab16
 
-static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
+static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
 {
        __asm__(
        "       wsbh    %0, %1                  \n"
@@ -36,11 +44,10 @@ static __inline__ __attribute_const__ __u32 ___arch__swab32(__u32 x)
 
        return x;
 }
-#define __arch__swab32(x)      ___arch__swab32(x)
+#define __arch_swab32 __arch_swab32
 
 #ifdef CONFIG_CPU_MIPS64_R2
-
-static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x)
+static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
 {
        __asm__(
        "       dsbh    %0, %1                  \n"
@@ -51,26 +58,11 @@ static __inline__ __attribute_const__ __u64 ___arch__swab64(__u64 x)
 
        return x;
 }
-
-#define __arch__swab64(x)      ___arch__swab64(x)
-
+#define __arch_swab64 __arch_swab64
 #endif /* CONFIG_CPU_MIPS64_R2 */
 
 #endif /* CONFIG_CPU_MIPSR2 */
 
-#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
-#  define __BYTEORDER_HAS_U64__
-#  define __SWAB_64_THRU_32__
-#endif
-
-#endif /* __GNUC__ */
-
-#if defined(__MIPSEB__)
-#  include <linux/byteorder/big_endian.h>
-#elif defined(__MIPSEL__)
-#  include <linux/byteorder/little_endian.h>
-#else
-#  error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???"
-#endif
+#include <linux/byteorder.h>
 
 #endif /* _ASM_BYTEORDER_H */
index 5ea701fc3425787d8309f90fdb07ec2737748d5e..12d12dfe73c096b8994c6f0a6bacb12d977e5f35 100644 (file)
 #define cpu_has_mips64 (cpu_has_mips64r1 | cpu_has_mips64r2)
 #define cpu_has_mips_r1        (cpu_has_mips32r1 | cpu_has_mips64r1)
 #define cpu_has_mips_r2        (cpu_has_mips32r2 | cpu_has_mips64r2)
+#define cpu_has_mips_r (cpu_has_mips32r1 | cpu_has_mips32r2 | \
+                        cpu_has_mips64r1 | cpu_has_mips64r2)
 
 #ifndef cpu_has_dsp
 #define cpu_has_dsp            (cpu_data[0].ases & MIPS_ASE_DSP)
diff --git a/arch/mips/include/asm/ds1286.h b/arch/mips/include/asm/ds1286.h
deleted file mode 100644 (file)
index 6983b6f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Machine dependent access functions for RTC registers.
- *
- * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org)
- */
-#ifndef _ASM_DS1286_H
-#define _ASM_DS1286_H
-
-#include <ds1286.h>
-
-#endif /* _ASM_DS1286_H */
index 2731c38bd7ae1f67b5ae3155eb13f7789cc8f29c..e5189572956c5221c378f542d9c945a0ca103a2d 100644 (file)
@@ -23,6 +23,9 @@
 #ifndef _ASM_FPU_EMULATOR_H
 #define _ASM_FPU_EMULATOR_H
 
+#include <asm/break.h>
+#include <asm/inst.h>
+
 struct mips_fpu_emulator_stats {
        unsigned int emulated;
        unsigned int loads;
@@ -34,4 +37,18 @@ struct mips_fpu_emulator_stats {
 
 extern struct mips_fpu_emulator_stats fpuemustats;
 
+extern int mips_dsemul(struct pt_regs *regs, mips_instruction ir,
+       unsigned long cpc);
+extern int do_dsemulret(struct pt_regs *xcp);
+
+/*
+ * Instruction inserted following the badinst to further tag the sequence
+ */
+#define BD_COOKIE 0x0000bd36   /* tne $0, $0 with baggage */
+
+/*
+ * Break instruction with special math emu break code set
+ */
+#define BREAK_MATH (0x0000000d | (BRK_MEMU << 16))
+
 #endif /* _ASM_FPU_EMULATOR_H */
diff --git a/arch/mips/include/asm/m48t35.h b/arch/mips/include/asm/m48t35.h
deleted file mode 100644 (file)
index f44852e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *  Registers for the SGS-Thomson M48T35 Timekeeper RAM chip
- */
-#ifndef _ASM_M48T35_H
-#define _ASM_M48T35_H
-
-#include <linux/spinlock.h>
-
-extern spinlock_t rtc_lock;
-
-struct m48t35_rtc {
-       volatile u8     pad[0x7ff8];    /* starts at 0x7ff8 */
-       volatile u8     control;
-       volatile u8     sec;
-       volatile u8     min;
-       volatile u8     hour;
-       volatile u8     day;
-       volatile u8     date;
-       volatile u8     month;
-       volatile u8     year;
-};
-
-#define M48T35_RTC_SET         0x80
-#define M48T35_RTC_STOPPED     0x80
-#define M48T35_RTC_READ                0x40
-
-#endif /* _ASM_M48T35_H */
index 0cf15457ecace15725e7b419438e57736540d2a6..c9207b5fd923bc033aa55485f2c2b5a2b7fde884 100644 (file)
@@ -286,11 +286,12 @@ static inline int __cpu_has_fpu(void)
 #define R4K_OPTS (MIPS_CPU_TLB | MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE \
                | MIPS_CPU_COUNTER)
 
-static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
+static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu)
 {
        switch (c->processor_id & 0xff00) {
        case PRID_IMP_R2000:
                c->cputype = CPU_R2000;
+               __cpu_name[cpu] = "R2000";
                c->isa_level = MIPS_CPU_ISA_I;
                c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE |
                             MIPS_CPU_NOFPUEX;
@@ -299,13 +300,19 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                c->tlbsize = 64;
                break;
        case PRID_IMP_R3000:
-               if ((c->processor_id & 0xff) == PRID_REV_R3000A)
-                       if (cpu_has_confreg())
+               if ((c->processor_id & 0xff) == PRID_REV_R3000A) {
+                       if (cpu_has_confreg()) {
                                c->cputype = CPU_R3081E;
-                       else
+                               __cpu_name[cpu] = "R3081";
+                       } else {
                                c->cputype = CPU_R3000A;
-               else
+                               __cpu_name[cpu] = "R3000A";
+                       }
+                       break;
+               } else {
                        c->cputype = CPU_R3000;
+                       __cpu_name[cpu] = "R3000";
+               }
                c->isa_level = MIPS_CPU_ISA_I;
                c->options = MIPS_CPU_TLB | MIPS_CPU_3K_CACHE |
                             MIPS_CPU_NOFPUEX;
@@ -315,15 +322,21 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R4000:
                if (read_c0_config() & CONF_SC) {
-                       if ((c->processor_id & 0xff) >= PRID_REV_R4400)
+                       if ((c->processor_id & 0xff) >= PRID_REV_R4400) {
                                c->cputype = CPU_R4400PC;
-                       else
+                               __cpu_name[cpu] = "R4400PC";
+                       } else {
                                c->cputype = CPU_R4000PC;
+                               __cpu_name[cpu] = "R4000PC";
+                       }
                } else {
-                       if ((c->processor_id & 0xff) >= PRID_REV_R4400)
+                       if ((c->processor_id & 0xff) >= PRID_REV_R4400) {
                                c->cputype = CPU_R4400SC;
-                       else
+                               __cpu_name[cpu] = "R4400SC";
+                       } else {
                                c->cputype = CPU_R4000SC;
+                               __cpu_name[cpu] = "R4000SC";
+                       }
                }
 
                c->isa_level = MIPS_CPU_ISA_III;
@@ -336,25 +349,34 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                switch (c->processor_id & 0xf0) {
                case PRID_REV_VR4111:
                        c->cputype = CPU_VR4111;
+                       __cpu_name[cpu] = "NEC VR4111";
                        break;
                case PRID_REV_VR4121:
                        c->cputype = CPU_VR4121;
+                       __cpu_name[cpu] = "NEC VR4121";
                        break;
                case PRID_REV_VR4122:
-                       if ((c->processor_id & 0xf) < 0x3)
+                       if ((c->processor_id & 0xf) < 0x3) {
                                c->cputype = CPU_VR4122;
-                       else
+                               __cpu_name[cpu] = "NEC VR4122";
+                       } else {
                                c->cputype = CPU_VR4181A;
+                               __cpu_name[cpu] = "NEC VR4181A";
+                       }
                        break;
                case PRID_REV_VR4130:
-                       if ((c->processor_id & 0xf) < 0x4)
+                       if ((c->processor_id & 0xf) < 0x4) {
                                c->cputype = CPU_VR4131;
-                       else
+                               __cpu_name[cpu] = "NEC VR4131";
+                       } else {
                                c->cputype = CPU_VR4133;
+                               __cpu_name[cpu] = "NEC VR4133";
+                       }
                        break;
                default:
                        printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
                        c->cputype = CPU_VR41XX;
+                       __cpu_name[cpu] = "NEC Vr41xx";
                        break;
                }
                c->isa_level = MIPS_CPU_ISA_III;
@@ -363,6 +385,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R4300:
                c->cputype = CPU_R4300;
+               __cpu_name[cpu] = "R4300";
                c->isa_level = MIPS_CPU_ISA_III;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_LLSC;
@@ -370,6 +393,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R4600:
                c->cputype = CPU_R4600;
+               __cpu_name[cpu] = "R4600";
                c->isa_level = MIPS_CPU_ISA_III;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_LLSC;
@@ -384,6 +408,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                 * it's c0_prid id number with the TX3900.
                 */
                c->cputype = CPU_R4650;
+               __cpu_name[cpu] = "R4650";
                c->isa_level = MIPS_CPU_ISA_III;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_LLSC;
                c->tlbsize = 48;
@@ -395,25 +420,26 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
 
                if ((c->processor_id & 0xf0) == (PRID_REV_TX3927 & 0xf0)) {
                        c->cputype = CPU_TX3927;
+                       __cpu_name[cpu] = "TX3927";
                        c->tlbsize = 64;
                } else {
                        switch (c->processor_id & 0xff) {
                        case PRID_REV_TX3912:
                                c->cputype = CPU_TX3912;
+                               __cpu_name[cpu] = "TX3912";
                                c->tlbsize = 32;
                                break;
                        case PRID_REV_TX3922:
                                c->cputype = CPU_TX3922;
+                               __cpu_name[cpu] = "TX3922";
                                c->tlbsize = 64;
                                break;
-                       default:
-                               c->cputype = CPU_UNKNOWN;
-                               break;
                        }
                }
                break;
        case PRID_IMP_R4700:
                c->cputype = CPU_R4700;
+               __cpu_name[cpu] = "R4700";
                c->isa_level = MIPS_CPU_ISA_III;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_LLSC;
@@ -421,6 +447,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_TX49:
                c->cputype = CPU_TX49XX;
+               __cpu_name[cpu] = "R49XX";
                c->isa_level = MIPS_CPU_ISA_III;
                c->options = R4K_OPTS | MIPS_CPU_LLSC;
                if (!(c->processor_id & 0x08))
@@ -429,6 +456,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R5000:
                c->cputype = CPU_R5000;
+               __cpu_name[cpu] = "R5000";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_LLSC;
@@ -436,6 +464,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R5432:
                c->cputype = CPU_R5432;
+               __cpu_name[cpu] = "R5432";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_WATCH | MIPS_CPU_LLSC;
@@ -443,6 +472,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R5500:
                c->cputype = CPU_R5500;
+               __cpu_name[cpu] = "R5500";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_WATCH | MIPS_CPU_LLSC;
@@ -450,6 +480,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_NEVADA:
                c->cputype = CPU_NEVADA;
+               __cpu_name[cpu] = "Nevada";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_DIVEC | MIPS_CPU_LLSC;
@@ -457,6 +488,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R6000:
                c->cputype = CPU_R6000;
+               __cpu_name[cpu] = "R6000";
                c->isa_level = MIPS_CPU_ISA_II;
                c->options = MIPS_CPU_TLB | MIPS_CPU_FPU |
                             MIPS_CPU_LLSC;
@@ -464,6 +496,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R6000A:
                c->cputype = CPU_R6000A;
+               __cpu_name[cpu] = "R6000A";
                c->isa_level = MIPS_CPU_ISA_II;
                c->options = MIPS_CPU_TLB | MIPS_CPU_FPU |
                             MIPS_CPU_LLSC;
@@ -471,6 +504,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_RM7000:
                c->cputype = CPU_RM7000;
+               __cpu_name[cpu] = "RM7000";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_LLSC;
@@ -486,6 +520,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_RM9000:
                c->cputype = CPU_RM9000;
+               __cpu_name[cpu] = "RM9000";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = R4K_OPTS | MIPS_CPU_FPU | MIPS_CPU_32FPR |
                             MIPS_CPU_LLSC;
@@ -500,6 +535,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R8000:
                c->cputype = CPU_R8000;
+               __cpu_name[cpu] = "RM8000";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX |
                             MIPS_CPU_FPU | MIPS_CPU_32FPR |
@@ -508,6 +544,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R10000:
                c->cputype = CPU_R10000;
+               __cpu_name[cpu] = "R10000";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
                             MIPS_CPU_FPU | MIPS_CPU_32FPR |
@@ -517,6 +554,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R12000:
                c->cputype = CPU_R12000;
+               __cpu_name[cpu] = "R12000";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
                             MIPS_CPU_FPU | MIPS_CPU_32FPR |
@@ -526,6 +564,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_R14000:
                c->cputype = CPU_R14000;
+               __cpu_name[cpu] = "R14000";
                c->isa_level = MIPS_CPU_ISA_IV;
                c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX |
                             MIPS_CPU_FPU | MIPS_CPU_32FPR |
@@ -535,6 +574,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c)
                break;
        case PRID_IMP_LOONGSON2:
                c->cputype = CPU_LOONGSON2;
+               __cpu_name[cpu] = "ICT Loongson-2";
                c->isa_level = MIPS_CPU_ISA_III;
                c->options = R4K_OPTS |
                             MIPS_CPU_FPU | MIPS_CPU_LLSC |
@@ -652,21 +692,24 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c)
 
 static void __cpuinit decode_configs(struct cpuinfo_mips *c)
 {
+       int ok;
+
        /* MIPS32 or MIPS64 compliant CPU.  */
        c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER |
                     MIPS_CPU_DIVEC | MIPS_CPU_LLSC | MIPS_CPU_MCHECK;
 
        c->scache.flags = MIPS_CACHE_NOT_PRESENT;
 
-       /* Read Config registers.  */
-       if (!decode_config0(c))
-               return;                 /* actually worth a panic() */
-       if (!decode_config1(c))
-               return;
-       if (!decode_config2(c))
-               return;
-       if (!decode_config3(c))
-               return;
+       ok = decode_config0(c);                 /* Read Config registers.  */
+       BUG_ON(!ok);                            /* Arch spec violation!  */
+       if (ok)
+               ok = decode_config1(c);
+       if (ok)
+               ok = decode_config2(c);
+       if (ok)
+               ok = decode_config3(c);
+
+       mips_probe_watch_registers(c);
 }
 
 #ifdef CONFIG_CPU_MIPSR2
@@ -675,52 +718,62 @@ extern void spram_config(void);
 static inline void spram_config(void) {}
 #endif
 
-static inline void cpu_probe_mips(struct cpuinfo_mips *c)
+static inline void cpu_probe_mips(struct cpuinfo_mips *c, unsigned int cpu)
 {
        decode_configs(c);
-       mips_probe_watch_registers(c);
        switch (c->processor_id & 0xff00) {
        case PRID_IMP_4KC:
                c->cputype = CPU_4KC;
+               __cpu_name[cpu] = "MIPS 4Kc";
                break;
        case PRID_IMP_4KEC:
                c->cputype = CPU_4KEC;
+               __cpu_name[cpu] = "MIPS 4KEc";
                break;
        case PRID_IMP_4KECR2:
                c->cputype = CPU_4KEC;
+               __cpu_name[cpu] = "MIPS 4KEc";
                break;
        case PRID_IMP_4KSC:
        case PRID_IMP_4KSD:
                c->cputype = CPU_4KSC;
+               __cpu_name[cpu] = "MIPS 4KSc";
                break;
        case PRID_IMP_5KC:
                c->cputype = CPU_5KC;
+               __cpu_name[cpu] = "MIPS 5Kc";
                break;
        case PRID_IMP_20KC:
                c->cputype = CPU_20KC;
+               __cpu_name[cpu] = "MIPS 20Kc";
                break;
        case PRID_IMP_24K:
        case PRID_IMP_24KE:
                c->cputype = CPU_24K;
+               __cpu_name[cpu] = "MIPS 24Kc";
                break;
        case PRID_IMP_25KF:
                c->cputype = CPU_25KF;
+               __cpu_name[cpu] = "MIPS 25Kc";
                break;
        case PRID_IMP_34K:
                c->cputype = CPU_34K;
+               __cpu_name[cpu] = "MIPS 34Kc";
                break;
        case PRID_IMP_74K:
                c->cputype = CPU_74K;
+               __cpu_name[cpu] = "MIPS 74Kc";
                break;
        case PRID_IMP_1004K:
                c->cputype = CPU_1004K;
+               __cpu_name[cpu] = "MIPS 1004Kc";
                break;
        }
 
        spram_config();
 }
 
-static inline void cpu_probe_alchemy(struct cpuinfo_mips *c)
+static inline void cpu_probe_alchemy(struct cpuinfo_mips *c, unsigned int cpu)
 {
        decode_configs(c);
        switch (c->processor_id & 0xff00) {
@@ -729,23 +782,31 @@ static inline void cpu_probe_alchemy(struct cpuinfo_mips *c)
                switch ((c->processor_id >> 24) & 0xff) {
                case 0:
                        c->cputype = CPU_AU1000;
+                       __cpu_name[cpu] = "Au1000";
                        break;
                case 1:
                        c->cputype = CPU_AU1500;
+                       __cpu_name[cpu] = "Au1500";
                        break;
                case 2:
                        c->cputype = CPU_AU1100;
+                       __cpu_name[cpu] = "Au1100";
                        break;
                case 3:
                        c->cputype = CPU_AU1550;
+                       __cpu_name[cpu] = "Au1550";
                        break;
                case 4:
                        c->cputype = CPU_AU1200;
-                       if (2 == (c->processor_id & 0xff))
+                       __cpu_name[cpu] = "Au1200";
+                       if ((c->processor_id & 0xff) == 2) {
                                c->cputype = CPU_AU1250;
+                               __cpu_name[cpu] = "Au1250";
+                       }
                        break;
                case 5:
                        c->cputype = CPU_AU1210;
+                       __cpu_name[cpu] = "Au1210";
                        break;
                default:
                        panic("Unknown Au Core!");
@@ -755,154 +816,67 @@ static inline void cpu_probe_alchemy(struct cpuinfo_mips *c)
        }
 }
 
-static inline void cpu_probe_sibyte(struct cpuinfo_mips *c)
+static inline void cpu_probe_sibyte(struct cpuinfo_mips *c, unsigned int cpu)
 {
        decode_configs(c);
 
        switch (c->processor_id & 0xff00) {
        case PRID_IMP_SB1:
                c->cputype = CPU_SB1;
+               __cpu_name[cpu] = "SiByte SB1";
                /* FPU in pass1 is known to have issues. */
                if ((c->processor_id & 0xff) < 0x02)
                        c->options &= ~(MIPS_CPU_FPU | MIPS_CPU_32FPR);
                break;
        case PRID_IMP_SB1A:
                c->cputype = CPU_SB1A;
+               __cpu_name[cpu] = "SiByte SB1A";
                break;
        }
 }
 
-static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c)
+static inline void cpu_probe_sandcraft(struct cpuinfo_mips *c, unsigned int cpu)
 {
        decode_configs(c);
        switch (c->processor_id & 0xff00) {
        case PRID_IMP_SR71000:
                c->cputype = CPU_SR71000;
+               __cpu_name[cpu] = "Sandcraft SR71000";
                c->scache.ways = 8;
                c->tlbsize = 64;
                break;
        }
 }
 
-static inline void cpu_probe_nxp(struct cpuinfo_mips *c)
+static inline void cpu_probe_nxp(struct cpuinfo_mips *c, unsigned int cpu)
 {
        decode_configs(c);
        switch (c->processor_id & 0xff00) {
        case PRID_IMP_PR4450:
                c->cputype = CPU_PR4450;
+               __cpu_name[cpu] = "Philips PR4450";
                c->isa_level = MIPS_CPU_ISA_M32R1;
                break;
-       default:
-               panic("Unknown NXP Core!"); /* REVISIT: die? */
-               break;
        }
 }
 
-
-static inline void cpu_probe_broadcom(struct cpuinfo_mips *c)
+static inline void cpu_probe_broadcom(struct cpuinfo_mips *c, unsigned int cpu)
 {
        decode_configs(c);
        switch (c->processor_id & 0xff00) {
        case PRID_IMP_BCM3302:
                c->cputype = CPU_BCM3302;
+               __cpu_name[cpu] = "Broadcom BCM3302";
                break;
        case PRID_IMP_BCM4710:
                c->cputype = CPU_BCM4710;
-               break;
-       default:
-               c->cputype = CPU_UNKNOWN;
+               __cpu_name[cpu] = "Broadcom BCM4710";
                break;
        }
 }
 
 const char *__cpu_name[NR_CPUS];
 
-/*
- * Name a CPU
- */
-static __cpuinit const char *cpu_to_name(struct cpuinfo_mips *c)
-{
-       const char *name = NULL;
-
-       switch (c->cputype) {
-       case CPU_UNKNOWN:       name = "unknown"; break;
-       case CPU_R2000:         name = "R2000"; break;
-       case CPU_R3000:         name = "R3000"; break;
-       case CPU_R3000A:        name = "R3000A"; break;
-       case CPU_R3041:         name = "R3041"; break;
-       case CPU_R3051:         name = "R3051"; break;
-       case CPU_R3052:         name = "R3052"; break;
-       case CPU_R3081:         name = "R3081"; break;
-       case CPU_R3081E:        name = "R3081E"; break;
-       case CPU_R4000PC:       name = "R4000PC"; break;
-       case CPU_R4000SC:       name = "R4000SC"; break;
-       case CPU_R4000MC:       name = "R4000MC"; break;
-       case CPU_R4200:         name = "R4200"; break;
-       case CPU_R4400PC:       name = "R4400PC"; break;
-       case CPU_R4400SC:       name = "R4400SC"; break;
-       case CPU_R4400MC:       name = "R4400MC"; break;
-       case CPU_R4600:         name = "R4600"; break;
-       case CPU_R6000:         name = "R6000"; break;
-       case CPU_R6000A:        name = "R6000A"; break;
-       case CPU_R8000:         name = "R8000"; break;
-       case CPU_R10000:        name = "R10000"; break;
-       case CPU_R12000:        name = "R12000"; break;
-       case CPU_R14000:        name = "R14000"; break;
-       case CPU_R4300:         name = "R4300"; break;
-       case CPU_R4650:         name = "R4650"; break;
-       case CPU_R4700:         name = "R4700"; break;
-       case CPU_R5000:         name = "R5000"; break;
-       case CPU_R5000A:        name = "R5000A"; break;
-       case CPU_R4640:         name = "R4640"; break;
-       case CPU_NEVADA:        name = "Nevada"; break;
-       case CPU_RM7000:        name = "RM7000"; break;
-       case CPU_RM9000:        name = "RM9000"; break;
-       case CPU_R5432:         name = "R5432"; break;
-       case CPU_4KC:           name = "MIPS 4Kc"; break;
-       case CPU_5KC:           name = "MIPS 5Kc"; break;
-       case CPU_R4310:         name = "R4310"; break;
-       case CPU_SB1:           name = "SiByte SB1"; break;
-       case CPU_SB1A:          name = "SiByte SB1A"; break;
-       case CPU_TX3912:        name = "TX3912"; break;
-       case CPU_TX3922:        name = "TX3922"; break;
-       case CPU_TX3927:        name = "TX3927"; break;
-       case CPU_AU1000:        name = "Au1000"; break;
-       case CPU_AU1500:        name = "Au1500"; break;
-       case CPU_AU1100:        name = "Au1100"; break;
-       case CPU_AU1550:        name = "Au1550"; break;
-       case CPU_AU1200:        name = "Au1200"; break;
-       case CPU_AU1210:        name = "Au1210"; break;
-       case CPU_AU1250:        name = "Au1250"; break;
-       case CPU_4KEC:          name = "MIPS 4KEc"; break;
-       case CPU_4KSC:          name = "MIPS 4KSc"; break;
-       case CPU_VR41XX:        name = "NEC Vr41xx"; break;
-       case CPU_R5500:         name = "R5500"; break;
-       case CPU_TX49XX:        name = "TX49xx"; break;
-       case CPU_20KC:          name = "MIPS 20Kc"; break;
-       case CPU_24K:           name = "MIPS 24K"; break;
-       case CPU_25KF:          name = "MIPS 25Kf"; break;
-       case CPU_34K:           name = "MIPS 34K"; break;
-       case CPU_1004K:         name = "MIPS 1004K"; break;
-       case CPU_74K:           name = "MIPS 74K"; break;
-       case CPU_VR4111:        name = "NEC VR4111"; break;
-       case CPU_VR4121:        name = "NEC VR4121"; break;
-       case CPU_VR4122:        name = "NEC VR4122"; break;
-       case CPU_VR4131:        name = "NEC VR4131"; break;
-       case CPU_VR4133:        name = "NEC VR4133"; break;
-       case CPU_VR4181:        name = "NEC VR4181"; break;
-       case CPU_VR4181A:       name = "NEC VR4181A"; break;
-       case CPU_SR71000:       name = "Sandcraft SR71000"; break;
-       case CPU_BCM3302:       name = "Broadcom BCM3302"; break;
-       case CPU_BCM4710:       name = "Broadcom BCM4710"; break;
-       case CPU_PR4450:        name = "Philips PR4450"; break;
-       case CPU_LOONGSON2:     name = "ICT Loongson-2"; break;
-       default:
-               BUG();
-       }
-
-       return name;
-}
-
 __cpuinit void cpu_probe(void)
 {
        struct cpuinfo_mips *c = &current_cpu_data;
@@ -915,30 +889,31 @@ __cpuinit void cpu_probe(void)
        c->processor_id = read_c0_prid();
        switch (c->processor_id & 0xff0000) {
        case PRID_COMP_LEGACY:
-               cpu_probe_legacy(c);
+               cpu_probe_legacy(c, cpu);
                break;
        case PRID_COMP_MIPS:
-               cpu_probe_mips(c);
+               cpu_probe_mips(c, cpu);
                break;
        case PRID_COMP_ALCHEMY:
-               cpu_probe_alchemy(c);
+               cpu_probe_alchemy(c, cpu);
                break;
        case PRID_COMP_SIBYTE:
-               cpu_probe_sibyte(c);
+               cpu_probe_sibyte(c, cpu);
                break;
        case PRID_COMP_BROADCOM:
-               cpu_probe_broadcom(c);
+               cpu_probe_broadcom(c, cpu);
                break;
        case PRID_COMP_SANDCRAFT:
-               cpu_probe_sandcraft(c);
+               cpu_probe_sandcraft(c, cpu);
                break;
        case PRID_COMP_NXP:
-               cpu_probe_nxp(c);
+               cpu_probe_nxp(c, cpu);
                break;
-       default:
-               c->cputype = CPU_UNKNOWN;
        }
 
+       BUG_ON(!__cpu_name[cpu]);
+       BUG_ON(c->cputype == CPU_UNKNOWN);
+
        /*
         * Platform code can force the cpu type to optimize code
         * generation. In that case be sure the cpu type is correctly
@@ -958,8 +933,6 @@ __cpuinit void cpu_probe(void)
                }
        }
 
-       __cpu_name[cpu] = cpu_to_name(c);
-
        if (cpu_has_mips_r2)
                c->srsets = ((read_c0_srsctl() >> 26) & 0x0f) + 1;
        else
index b79ea7055ec30210a392e348bb19d6a23ddfd174..8bf88faf5afdcb5e7eca6923fa5f4d41f988880e 100644 (file)
@@ -195,12 +195,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
 /* preload SMP state for boot cpu */
 void __devinit smp_prepare_boot_cpu(void)
 {
-       /*
-        * This assumes that bootup is always handled by the processor
-        * with the logic and physical number 0.
-        */
-       __cpu_number_map[0] = 0;
-       __cpu_logical_map[0] = 0;
        cpu_set(0, phys_cpu_present_map);
        cpu_set(0, cpu_online_map);
        cpu_set(0, cpu_callin_map);
index 80b9e070c2078c1dbc988f5ae147832e1624c8b6..353056110f2b6cca2865bc17a187eaf10806572d 100644 (file)
@@ -32,6 +32,7 @@
 #include <asm/cpu.h>
 #include <asm/dsp.h>
 #include <asm/fpu.h>
+#include <asm/fpu_emulator.h>
 #include <asm/mipsregs.h>
 #include <asm/mipsmtregs.h>
 #include <asm/module.h>
@@ -722,6 +723,21 @@ static void do_trap_or_bp(struct pt_regs *regs, unsigned int code,
                die_if_kernel("Kernel bug detected", regs);
                force_sig(SIGTRAP, current);
                break;
+       case BRK_MEMU:
+               /*
+                * Address errors may be deliberately induced by the FPU
+                * emulator to retake control of the CPU after executing the
+                * instruction in the delay slot of an emulated branch.
+                *
+                * Terminate if exception was recognized as a delay slot return
+                * otherwise handle as normal.
+                */
+               if (do_dsemulret(regs))
+                       return;
+
+               die_if_kernel("Math emu break/trap", regs);
+               force_sig(SIGTRAP, current);
+               break;
        default:
                scnprintf(b, sizeof(b), "%s instruction in kernel code", str);
                die_if_kernel(b, regs);
@@ -1555,6 +1571,8 @@ void __cpuinit set_uncached_handler(unsigned long offset, void *addr,
 #ifdef CONFIG_64BIT
        unsigned long uncached_ebase = TO_UNCAC(ebase);
 #endif
+       if (cpu_has_mips_r2)
+               ebase += (read_c0_ebase() & 0x3ffff000);
 
        if (!addr)
                panic(panic_null_cerr);
@@ -1588,8 +1606,11 @@ void __init trap_init(void)
 
        if (cpu_has_veic || cpu_has_vint)
                ebase = (unsigned long) alloc_bootmem_low_pages(0x200 + VECTORSPACING*64);
-       else
+       else {
                ebase = CAC_BASE;
+               if (cpu_has_mips_r2)
+                       ebase += (read_c0_ebase() & 0x3ffff000);
+       }
 
        per_cpu_trap_init();
 
@@ -1697,11 +1718,11 @@ void __init trap_init(void)
 
        if (cpu_has_vce)
                /* Special exception: R4[04]00 uses also the divec space. */
-               memcpy((void *)(CAC_BASE + 0x180), &except_vec3_r4000, 0x100);
+               memcpy((void *)(ebase + 0x180), &except_vec3_r4000, 0x100);
        else if (cpu_has_4kex)
-               memcpy((void *)(CAC_BASE + 0x180), &except_vec3_generic, 0x80);
+               memcpy((void *)(ebase + 0x180), &except_vec3_generic, 0x80);
        else
-               memcpy((void *)(CAC_BASE + 0x080), &except_vec3_generic, 0x80);
+               memcpy((void *)(ebase + 0x080), &except_vec3_generic, 0x80);
 
        signal_init();
 #ifdef CONFIG_MIPS32_COMPAT
index 20709669e5923c0e974a20c3b797b25f24702694..bf4c4a979abb787775477d1b42e2b7e54a43b9c3 100644 (file)
@@ -499,21 +499,9 @@ sigill:
 
 asmlinkage void do_ade(struct pt_regs *regs)
 {
-       extern int do_dsemulret(struct pt_regs *);
        unsigned int __user *pc;
        mm_segment_t seg;
 
-       /*
-        * Address errors may be deliberately induced by the FPU emulator to
-        * retake control of the CPU after executing the instruction in the
-        * delay slot of an emulated branch.
-        */
-       /* Terminate if exception was recognized as a delay slot return */
-       if (do_dsemulret(regs))
-               return;
-
-       /* Otherwise handle as normal */
-
        /*
         * Did we catch a fault trying to load an instruction?
         * Or are we running in MIPS16 mode?
index 7ec0b217dfd3087fd317810e2bc14cea75ec6f6f..890f77927d628b0c203c92c7712415a9c52a819f 100644 (file)
@@ -48,7 +48,6 @@
 #include <asm/branch.h>
 
 #include "ieee754.h"
-#include "dsemul.h"
 
 /* Strap kernel emulator for full MIPS IV emulation */
 
@@ -346,9 +345,6 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
                        /* cop control register rd -> gpr[rt] */
                        u32 value;
 
-                       if (ir == CP1UNDEF) {
-                               return do_dsemulret(xcp);
-                       }
                        if (MIPSInst_RD(ir) == FPCREG_CSR) {
                                value = ctx->fcr31;
                                value = (value & ~0x3) | mips_rm[value & 0x3];
index 653e325849e417d0ca2f9d646f2c850b5ffc8ec0..df7b9d928efc83730b6d69361e3d2aef36eed3bc 100644 (file)
@@ -18,7 +18,6 @@
 #include <asm/fpu_emulator.h>
 
 #include "ieee754.h"
-#include "dsemul.h"
 
 /* Strap kernel emulator for full MIPS IV emulation */
 
@@ -94,7 +93,7 @@ int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc)
                return SIGBUS;
 
        err = __put_user(ir, &fr->emul);
-       err |= __put_user((mips_instruction)BADINST, &fr->badinst);
+       err |= __put_user((mips_instruction)BREAK_MATH, &fr->badinst);
        err |= __put_user((mips_instruction)BD_COOKIE, &fr->cookie);
        err |= __put_user(cpc, &fr->epc);
 
@@ -130,13 +129,13 @@ int do_dsemulret(struct pt_regs *xcp)
        /*
         * Do some sanity checking on the stackframe:
         *
-        *  - Is the instruction pointed to by the EPC an BADINST?
+        *  - Is the instruction pointed to by the EPC an BREAK_MATH?
         *  - Is the following memory word the BD_COOKIE?
         */
        err = __get_user(insn, &fr->badinst);
        err |= __get_user(cookie, &fr->cookie);
 
-       if (unlikely(err || (insn != BADINST) || (cookie != BD_COOKIE))) {
+       if (unlikely(err || (insn != BREAK_MATH) || (cookie != BD_COOKIE))) {
                fpuemustats.errors++;
                return 0;
        }
diff --git a/arch/mips/math-emu/dsemul.h b/arch/mips/math-emu/dsemul.h
deleted file mode 100644 (file)
index 091f0e7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-extern int mips_dsemul(struct pt_regs *regs, mips_instruction ir, unsigned long cpc);
-extern int do_dsemulret(struct pt_regs *xcp);
-
-/* Instruction which will always cause an address error */
-#define AdELOAD 0x8c000001     /* lw $0,1($0) */
-/* Instruction which will plainly cause a CP1 exception when FPU is disabled */
-#define CP1UNDEF 0x44400001    /* cfc1 $0,$0 undef  */
-
-/* Instruction inserted following the badinst to further tag the sequence */
-#define BD_COOKIE 0x0000bd36 /* tne $0,$0 with baggage */
-
-/* Setup which instruction to use for trampoline */
-#ifdef STANDALONE_EMULATOR
-#define BADINST CP1UNDEF
-#else
-#define BADINST AdELOAD
-#endif
index 4a74423b2ba80a49c4047a3aaf679209c039e620..01129a9d50fa183ee8167a5c3419b59082953ae4 100644 (file)
@@ -49,6 +49,7 @@
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 #include <linux/gpio.h>
+#include <linux/leds.h>
 #include <asm/io.h>
 #include <asm/reboot.h>
 #include <asm/txx9/generic.h>
@@ -210,10 +211,6 @@ static void __init rbtx4927_mem_setup(void)
        /* TX4927-SIO DTR on (PIO[15]) */
        gpio_request(15, "sio-dtr");
        gpio_direction_output(15, 1);
-       gpio_request(0, "led");
-       gpio_direction_output(0, 1);
-       gpio_request(1, "led");
-       gpio_direction_output(1, 1);
 
        tx4927_sio_init(0, 0);
 #ifdef CONFIG_SERIAL_TXX9_CONSOLE
@@ -315,6 +312,25 @@ static void __init rbtx4927_mtd_init(void)
                tx4927_mtd_init(i);
 }
 
+static void __init rbtx4927_gpioled_init(void)
+{
+       static struct gpio_led leds[] = {
+               { .name = "gpioled:green:0", .gpio = 0, .active_low = 1, },
+               { .name = "gpioled:green:1", .gpio = 1, .active_low = 1, },
+       };
+       static struct gpio_led_platform_data pdata = {
+               .num_leds = ARRAY_SIZE(leds),
+               .leds = leds,
+       };
+       struct platform_device *pdev = platform_device_alloc("leds-gpio", 0);
+
+       if (!pdev)
+               return;
+       pdev->dev.platform_data = &pdata;
+       if (platform_device_add(pdev))
+               platform_device_put(pdev);
+}
+
 static void __init rbtx4927_device_init(void)
 {
        toshiba_rbtx4927_rtc_init();
@@ -322,6 +338,7 @@ static void __init rbtx4927_device_init(void)
        tx4927_wdt_init();
        rbtx4927_mtd_init();
        txx9_iocled_init(RBTX4927_LED_ADDR - IO_BASE, -1, 3, 1, "green", NULL);
+       rbtx4927_gpioled_init();
 }
 
 struct txx9_board_vec rbtx4927_vec __initdata = {
index 6daee9b1cd5e02a460bb2b60b6cf2ecdd6ec9a0c..98fbd9391bf8f7daaba63670970feea77665d30d 100644 (file)
@@ -308,16 +308,22 @@ static void __init rbtx4939_device_init(void)
 #if defined(CONFIG_TC35815) || defined(CONFIG_TC35815_MODULE)
        int i, j;
        unsigned char ethaddr[2][6];
+       u8 bdipsw = readb(rbtx4939_bdipsw_addr) & 0x0f;
+
        for (i = 0; i < 2; i++) {
                unsigned long area = CKSEG1 + 0x1fff0000 + (i * 0x10);
-               if (readb(rbtx4939_bdipsw_addr) & 8) {
+               if (bdipsw == 0)
+                       memcpy(ethaddr[i], (void *)area, 6);
+               else {
                        u16 buf[3];
-                       area -= 0x03000000;
+                       if (bdipsw & 8)
+                               area -= 0x03000000;
+                       else
+                               area -= 0x01000000;
                        for (j = 0; j < 3; j++)
                                buf[j] = le16_to_cpup((u16 *)(area + j * 2));
                        memcpy(ethaddr[i], buf, 6);
-               } else
-                       memcpy(ethaddr[i], (void *)area, 6);
+               }
        }
        tx4939_ethaddr_init(ethaddr[0], ethaddr[1]);
 #endif
index 01b884b25696847d6c58817169156c49e49c11e0..26ecb96f9731dec733b23e6368fb3e0f6cf6d629 100644 (file)
@@ -223,6 +223,8 @@ static int gfar_mdio_of_init_one(struct device_node *np)
        if (ret)
                return ret;
 
+       /* The gianfar device will try to use the same ID created below to find
+        * this bus, to coordinate register access (since they share).  */
        mdio_dev = platform_device_register_simple("fsl-gianfar_mdio",
                        res.start&0xfffff, &res, 1);
        if (IS_ERR(mdio_dev))
@@ -394,6 +396,30 @@ static int __init gfar_of_init(void)
                        of_node_put(mdio);
                }
 
+               /* Get MDIO bus controlled by this eTSEC, if any.  Normally only
+                * eTSEC 1 will control an MDIO bus, not necessarily the same
+                * bus that its PHY is on ('mdio' above), so we can't just use
+                * that.  What we do is look for a gianfar mdio device that has
+                * overlapping registers with this device.  That's really the
+                * whole point, to find the device sharing our registers to
+                * coordinate access with it.
+                */
+               for_each_compatible_node(mdio, NULL, "fsl,gianfar-mdio") {
+                       if (of_address_to_resource(mdio, 0, &res))
+                               continue;
+
+                       if (res.start >= r[0].start && res.end <= r[0].end) {
+                               /* Get the ID the mdio bus platform device was
+                                * registered with.  gfar_data.bus_id is
+                                * different because it's for finding a PHY,
+                                * while this is for finding a MII bus.
+                                */
+                               gfar_data.mdio_bus = res.start&0xfffff;
+                               of_node_put(mdio);
+                               break;
+                       }
+               }
+
                ret =
                    platform_device_add_data(gfar_dev, &gfar_data,
                                             sizeof(struct
index d11d7b513191fac5d46dcbe12f600fb3ca0832cd..6f20718d3156b27badfe7774f09bb89f8bfe34f7 100644 (file)
@@ -231,6 +231,10 @@ config SMP
 
          If you don't know what to do here, say N.
 
+config X86_HAS_BOOT_CPU_ID
+       def_bool y
+       depends on X86_VOYAGER
+
 config X86_FIND_SMP_CONFIG
        def_bool y
        depends on X86_MPPARSE || X86_VOYAGER
index 0b7c4a3f0651e8e03e7f0c8ea3083bab77775812..b815664fe3700b77aa031fab7711be4128c858d1 100644 (file)
@@ -513,19 +513,19 @@ config CPU_SUP_UMC_32
          If unsure, say N.
 
 config X86_DS
-       bool "Debug Store support"
-       default y
-       help
-         Add support for Debug Store.
-         This allows the kernel to provide a memory buffer to the hardware
-         to store various profiling and tracing events.
+       def_bool X86_PTRACE_BTS
+       depends on X86_DEBUGCTLMSR
 
 config X86_PTRACE_BTS
-       bool "ptrace interface to Branch Trace Store"
+       bool "Branch Trace Store"
        default y
-       depends on (X86_DS && X86_DEBUGCTLMSR)
+       depends on X86_DEBUGCTLMSR
        help
-         Add a ptrace interface to allow collecting an execution trace
-         of the traced task.
-         This collects control flow changes in a (cyclic) buffer and allows
-         debuggers to fill in the gaps and show an execution trace of the debuggee.
+         This adds a ptrace interface to the hardware's branch trace store.
+
+         Debuggers may use it to collect an execution trace of the debugged
+         application in order to answer the question 'how did I get here?'.
+         Debuggers may trace user mode as well as kernel mode.
+
+         Say Y unless there is no application development on this machine
+         and you want to save a small amount of code size.
index be0ed065249b78cd69365bfa0e5b1abc288dbdb3..63eff3b04d0181be4eb6163522989760d82e23b7 100644 (file)
@@ -1 +1,3 @@
 relocs
+vmlinux.bin.all
+vmlinux.relocs
index 3ffc5a7bf6677e54bb1ec2e1ff53574c63b83d47..3984934619136119dfd7d95045d5930ab415e917 100644 (file)
@@ -50,10 +50,9 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
 {
 }
 
-#if APIC_DEBUG
- #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid)
-#else
- #define inquire_remote_apic(apicid) {}
-#endif
+#define inquire_remote_apic(apicid) do {               \
+               if (apic_verbosity >= APIC_DEBUG)       \
+                       __inquire_remote_apic(apicid);  \
+       } while (0)
 
 #endif /* __ASM_MACH_WAKECPU_H */
index 5618a103f395c1bf16558b57115ef1c4ae976392..ac2abc88cd95fa3e9049acc0440d65d59cd47ac1 100644 (file)
@@ -82,9 +82,9 @@ extern void __iomem *ioremap_wc(unsigned long offset, unsigned long size);
 extern void early_ioremap_init(void);
 extern void early_ioremap_clear(void);
 extern void early_ioremap_reset(void);
-extern void *early_ioremap(unsigned long offset, unsigned long size);
-extern void *early_memremap(unsigned long offset, unsigned long size);
-extern void early_iounmap(void *addr, unsigned long size);
+extern void __iomem *early_ioremap(unsigned long offset, unsigned long size);
+extern void __iomem *early_memremap(unsigned long offset, unsigned long size);
+extern void early_iounmap(void __iomem *addr, unsigned long size);
 extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
 
 
index 98e28ea8cd167afb5c1bf8bd3a04f320365e2edf..e4a552d44465b88b0f422a5cb51fcfba23598751 100644 (file)
@@ -7,7 +7,6 @@ extern struct dma_mapping_ops nommu_dma_ops;
 extern int force_iommu, no_iommu;
 extern int iommu_detected;
 extern int dmar_disabled;
-extern int forbid_dac;
 
 extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);
 
index d5c0b826a4ff2c742d887520a1585876bc5d26f1..9d80db91e9926f040445ebffeb44cac66ce8f4d3 100644 (file)
@@ -33,10 +33,9 @@ static inline void restore_NMI_vector(unsigned short *high, unsigned short *low)
 {
 }
 
-#if APIC_DEBUG
- #define inquire_remote_apic(apicid) __inquire_remote_apic(apicid)
-#else
- #define inquire_remote_apic(apicid) {}
-#endif
+#define inquire_remote_apic(apicid) do {               \
+               if (apic_verbosity >= APIC_DEBUG)       \
+                       __inquire_remote_apic(apicid);  \
+       } while (0)
 
 #endif /* _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H */
index fb16cec702e40ad786f175eede096ffaf8e31116..52597aeadfff029e0b45aa57ee5030a15e774289 100644 (file)
@@ -120,13 +120,13 @@ static inline void pud_clear(pud_t *pudp)
                write_cr3(pgd);
 }
 
-#define pud_page(pud) ((struct page *) __va(pud_val(pud) & PTE_PFN_MASK))
+#define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)
 
 #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))
 
 
 /* Find an entry in the second-level page table.. */
-#define pmd_offset(pud, address) ((pmd_t *)pud_page(*(pud)) +  \
+#define pmd_offset(pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) +    \
                                  pmd_index(address))
 
 #ifdef CONFIG_SMP
index 2766021aef80fc75453492ab611f683397e6aa16..d12811ce51d92fc8d4be51c24981329ba2591aec 100644 (file)
@@ -225,5 +225,11 @@ static inline int hard_smp_processor_id(void)
 
 #endif /* CONFIG_X86_LOCAL_APIC */
 
+#ifdef CONFIG_X86_HAS_BOOT_CPU_ID
+extern unsigned char boot_cpu_id;
+#else
+#define boot_cpu_id    0
+#endif
+
 #endif /* __ASSEMBLY__ */
 #endif /* _ASM_X86_SMP_H */
index c6ad93e315c815c46cce4388e9034190ee86300f..7a5782610b2bcb0af69d99be174d0815a6722663 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <linux/numa.h>
 #include <linux/percpu.h>
+#include <linux/timer.h>
 #include <asm/types.h>
 #include <asm/percpu.h>
 
index 0d9c993aa93ed79af1d18dfae976a405332d5ad7..ef8f831af823a89530297919585e50c9a691e804 100644 (file)
@@ -69,7 +69,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c)
  */
 void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c)
 {
-#ifdef CONFIG_SMP
+#ifdef CONFIG_X86_SMP
        unsigned int eax, ebx, ecx, edx, sub_index;
        unsigned int ht_mask_width, core_plus_mask_width;
        unsigned int core_select_mask, core_level_siblings;
index 25581dcb280ea8d3a9c8840cd70fcc726e10b76f..003a65395bd5b31e3d38329962ffc3cbc8c29807 100644 (file)
@@ -549,6 +549,10 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
                this_cpu->c_early_init(c);
 
        validate_pat_support(c);
+
+#ifdef CONFIG_SMP
+       c->cpu_index = boot_cpu_id;
+#endif
 }
 
 void __init early_cpu_init(void)
@@ -1134,7 +1138,7 @@ void __cpuinit cpu_init(void)
        /*
         * Boot processor to setup the FP and extended state context info.
         */
-       if (!smp_processor_id())
+       if (smp_processor_id() == boot_cpu_id)
                init_thread_xstate();
 
        xsave_init();
index 304d8bad6559f94f0e278e80496ca841741574b4..cbc4332a77b25927947d18c69f47188465a29d3e 100644 (file)
@@ -18,7 +18,6 @@ static u32 *flush_words;
 struct pci_device_id k8_nb_ids[] = {
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_K8_NB_MISC) },
        { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_10H_NB_MISC) },
-       { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_11H_NB_MISC) },
        {}
 };
 EXPORT_SYMBOL(k8_nb_ids);
index 0732adba05ca95bfaf851d3d2193df5074478482..7a385746509a2a625991447e8554a20b4d992c54 100644 (file)
@@ -162,7 +162,10 @@ void machine_kexec(struct kimage *image)
        page_list[VA_PTE_0] = (unsigned long)kexec_pte0;
        page_list[PA_PTE_1] = __pa(kexec_pte1);
        page_list[VA_PTE_1] = (unsigned long)kexec_pte1;
-       page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page) << PAGE_SHIFT);
+
+       if (image->type == KEXEC_TYPE_DEFAULT)
+               page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page)
+                                               << PAGE_SHIFT);
 
        /* The segment registers are funny things, they have both a
         * visible and an invisible part.  Whenever the visible part is
index 7a1f8eeac2c7c212712666b797eb55f4c2f43d83..5f8e5d75a254621799bff0138430fd2344b918a7 100644 (file)
@@ -39,7 +39,7 @@
 #include <asm/microcode.h>
 
 MODULE_DESCRIPTION("AMD Microcode Update Driver");
-MODULE_AUTHOR("Peter Oruba <peter.oruba@amd.com>");
+MODULE_AUTHOR("Peter Oruba");
 MODULE_LICENSE("GPL v2");
 
 #define UCODE_MAGIC                0x00414d44
index 936d8d55f2301626fb57b522e08d5899a6a245b9..82fb2809ce32208eacd7231c38597938031d4036 100644 (file)
@@ -480,8 +480,8 @@ static int __init microcode_init(void)
 
        printk(KERN_INFO
               "Microcode Update Driver: v" MICROCODE_VERSION
-              " <tigran@aivazian.fsnet.co.uk>"
-              " <peter.oruba@amd.com>\n");
+              " <tigran@aivazian.fsnet.co.uk>,"
+              " Peter Oruba\n");
 
        return 0;
 }
index 1972266e8ba59fb845bec4df4e59c5d04707ec5d..192624820217f9eeeb64ee39ada5ad57a76a0df5 100644 (file)
@@ -9,6 +9,8 @@
 #include <asm/calgary.h>
 #include <asm/amd_iommu.h>
 
+static int forbid_dac __read_mostly;
+
 struct dma_mapping_ops *dma_ops;
 EXPORT_SYMBOL(dma_ops);
 
@@ -291,3 +293,17 @@ void pci_iommu_shutdown(void)
 }
 /* Must execute after PCI subsystem */
 fs_initcall(pci_iommu_init);
+
+#ifdef CONFIG_PCI
+/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
+
+static __devinit void via_no_dac(struct pci_dev *dev)
+{
+       if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
+               printk(KERN_INFO "PCI: VIA PCI bridge detected."
+                                "Disabling DAC.\n");
+               forbid_dac = 1;
+       }
+}
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
+#endif
index e3f75bbcedea9287d8941897004e25159b3e9796..a42b02b4df68855714b4ea2f7f3e580e0327e7b3 100644 (file)
@@ -744,7 +744,7 @@ void __init gart_iommu_init(void)
        long i;
 
        if (cache_k8_northbridges() < 0 || num_k8_northbridges == 0) {
-               printk(KERN_INFO "PCI-GART: No AMD northbridge found.\n");
+               printk(KERN_INFO "PCI-GART: No AMD GART found.\n");
                return;
        }
 
index 161bb850fc475b074524cfbba13fc161a4e6a439..62348e4fd8d1e6af29d04726499b13794a78949e 100644 (file)
@@ -759,7 +759,7 @@ __cpuinit int unsynchronized_tsc(void)
        if (!cpu_has_tsc || tsc_unstable)
                return 1;
 
-#ifdef CONFIG_SMP
+#ifdef CONFIG_X86_SMP
        if (apic_is_clustered_box())
                return 1;
 #endif
index 7766d36983fcd7440f82435bcfbbcd37c1d80a6b..a688f3bfaec2df184760f836dda4947edede828d 100644 (file)
@@ -78,7 +78,7 @@ static unsigned __init_or_module vsmp_patch(u8 type, u16 clobbers, void *ibuf,
 
 static void __init set_vsmp_pv_ops(void)
 {
-       void *address;
+       void __iomem *address;
        unsigned int cap, ctl, cfg;
 
        /* set vSMP magic bits to indicate vSMP capable kernel */
index 48ee4f9435f418c45439ab02a1926a1c054cb071..a5d8e1ace1cf700922d1b7268401e4a4feed52c2 100644 (file)
@@ -367,10 +367,9 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx,
  * lazily after a task switch, and Linux uses that gratefully, but wouldn't a
  * name like "FPUTRAP bit" be a little less cryptic?
  *
- * We store cr0 (and cr3) locally, because the Host never changes it.  The
- * Guest sometimes wants to read it and we'd prefer not to bother the Host
- * unnecessarily. */
-static unsigned long current_cr0, current_cr3;
+ * We store cr0 locally because the Host never changes it.  The Guest sometimes
+ * wants to read it and we'd prefer not to bother the Host unnecessarily. */
+static unsigned long current_cr0;
 static void lguest_write_cr0(unsigned long val)
 {
        lazy_hcall(LHCALL_TS, val & X86_CR0_TS, 0, 0);
@@ -399,17 +398,23 @@ static unsigned long lguest_read_cr2(void)
        return lguest_data.cr2;
 }
 
+/* See lguest_set_pte() below. */
+static bool cr3_changed = false;
+
 /* cr3 is the current toplevel pagetable page: the principle is the same as
- * cr0.  Keep a local copy, and tell the Host when it changes. */
+ * cr0.  Keep a local copy, and tell the Host when it changes.  The only
+ * difference is that our local copy is in lguest_data because the Host needs
+ * to set it upon our initial hypercall. */
 static void lguest_write_cr3(unsigned long cr3)
 {
+       lguest_data.pgdir = cr3;
        lazy_hcall(LHCALL_NEW_PGTABLE, cr3, 0, 0);
-       current_cr3 = cr3;
+       cr3_changed = true;
 }
 
 static unsigned long lguest_read_cr3(void)
 {
-       return current_cr3;
+       return lguest_data.pgdir;
 }
 
 /* cr4 is used to enable and disable PGE, but we don't care. */
@@ -498,13 +503,13 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval)
  * to forget all of them.  Fortunately, this is very rare.
  *
  * ... except in early boot when the kernel sets up the initial pagetables,
- * which makes booting astonishingly slow.  So we don't even tell the Host
- * anything changed until we've done the first page table switch. */
+ * which makes booting astonishingly slow: 1.83 seconds!  So we don't even tell
+ * the Host anything changed until we've done the first page table switch,
+ * which brings boot back to 0.25 seconds. */
 static void lguest_set_pte(pte_t *ptep, pte_t pteval)
 {
        *ptep = pteval;
-       /* Don't bother with hypercall before initial setup. */
-       if (current_cr3)
+       if (cr3_changed)
                lazy_hcall(LHCALL_FLUSH_TLB, 1, 0, 0);
 }
 
@@ -521,7 +526,7 @@ static void lguest_set_pte(pte_t *ptep, pte_t pteval)
 static void lguest_flush_tlb_single(unsigned long addr)
 {
        /* Simply set it to zero: if it was not, it will fault back in. */
-       lazy_hcall(LHCALL_SET_PTE, current_cr3, addr, 0);
+       lazy_hcall(LHCALL_SET_PTE, lguest_data.pgdir, addr, 0);
 }
 
 /* This is what happens after the Guest has removed a large number of entries.
@@ -581,6 +586,9 @@ static void __init lguest_init_IRQ(void)
 
        for (i = 0; i < LGUEST_IRQS; i++) {
                int vector = FIRST_EXTERNAL_VECTOR + i;
+               /* Some systems map "vectors" to interrupts weirdly.  Lguest has
+                * a straightforward 1 to 1 mapping, so force that here. */
+               __get_cpu_var(vector_irq)[vector] = i;
                if (vector != SYSCALL_VECTOR) {
                        set_intr_gate(vector, interrupt[vector]);
                        set_irq_chip_and_handler_name(i, &lguest_irq_controller,
index 0f6e8a6523ae1dfb6aed3031bbce9ae1341b6adc..7f4c6af143515af7633e79ddfbe65d6ab6dc98fb 100644 (file)
@@ -90,6 +90,7 @@ static void ack_vic_irq(unsigned int irq);
 static void vic_enable_cpi(void);
 static void do_boot_cpu(__u8 cpuid);
 static void do_quad_bootstrap(void);
+static void initialize_secondary(void);
 
 int hard_smp_processor_id(void);
 int safe_smp_processor_id(void);
@@ -344,6 +345,12 @@ static void do_quad_bootstrap(void)
        }
 }
 
+void prefill_possible_map(void)
+{
+       /* This is empty on voyager because we need a much
+        * earlier detection which is done in find_smp_config */
+}
+
 /* Set up all the basic stuff: read the SMP config and make all the
  * SMP information reflect only the boot cpu.  All others will be
  * brought on-line later. */
@@ -413,6 +420,7 @@ void __init smp_store_cpu_info(int id)
        struct cpuinfo_x86 *c = &cpu_data(id);
 
        *c = boot_cpu_data;
+       c->cpu_index = id;
 
        identify_secondary_cpu(c);
 }
@@ -650,6 +658,8 @@ void __init smp_boot_cpus(void)
         smp_tune_scheduling();
         */
        smp_store_cpu_info(boot_cpu_id);
+       /* setup the jump vector */
+       initial_code = (unsigned long)initialize_secondary;
        printk("CPU%d: ", boot_cpu_id);
        print_cpu_info(&cpu_data(boot_cpu_id));
 
@@ -702,7 +712,7 @@ void __init smp_boot_cpus(void)
 
 /* Reload the secondary CPUs task structure (this function does not
  * return ) */
-void __init initialize_secondary(void)
+static void __init initialize_secondary(void)
 {
 #if 0
        // AC kernels only
index 4ba373c5b8c8b94eec4902f2ec3f1448b8b1f6af..be54176e9eb2ee3fa374d6bdc55ed917a4ea4106 100644 (file)
@@ -233,7 +233,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
        len = (unsigned long) nr_pages << PAGE_SHIFT;
        end = start + len;
        if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ,
-                                       start, len)))
+                                       (void __user *)start, len)))
                goto slow_irqon;
 
        /*
index f79a02f64d108dde4de4a35055240f64fae2371b..9db01db6e3cdf4cb0e11444d49e4d598be280b55 100644 (file)
@@ -671,12 +671,13 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
        unsigned long last_map_addr = 0;
        unsigned long page_size_mask = 0;
        unsigned long start_pfn, end_pfn;
+       unsigned long pos;
 
        struct map_range mr[NR_RANGE_MR];
        int nr_range, i;
        int use_pse, use_gbpages;
 
-       printk(KERN_INFO "init_memory_mapping\n");
+       printk(KERN_INFO "init_memory_mapping: %016lx-%016lx\n", start, end);
 
        /*
         * Find space for the kernel direct mapping tables.
@@ -710,35 +711,50 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 
        /* head if not big page alignment ?*/
        start_pfn = start >> PAGE_SHIFT;
-       end_pfn = ((start + (PMD_SIZE - 1)) >> PMD_SHIFT)
+       pos = start_pfn << PAGE_SHIFT;
+       end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT)
                        << (PMD_SHIFT - PAGE_SHIFT);
-       nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
+       if (start_pfn < end_pfn) {
+               nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
+               pos = end_pfn << PAGE_SHIFT;
+       }
 
        /* big page (2M) range*/
-       start_pfn = ((start + (PMD_SIZE - 1))>>PMD_SHIFT)
+       start_pfn = ((pos + (PMD_SIZE - 1))>>PMD_SHIFT)
                         << (PMD_SHIFT - PAGE_SHIFT);
-       end_pfn = ((start + (PUD_SIZE - 1))>>PUD_SHIFT)
+       end_pfn = ((pos + (PUD_SIZE - 1))>>PUD_SHIFT)
                         << (PUD_SHIFT - PAGE_SHIFT);
-       if (end_pfn > ((end>>PUD_SHIFT)<<(PUD_SHIFT - PAGE_SHIFT)))
-               end_pfn = ((end>>PUD_SHIFT)<<(PUD_SHIFT - PAGE_SHIFT));
-       nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
-                       page_size_mask & (1<<PG_LEVEL_2M));
+       if (end_pfn > ((end>>PMD_SHIFT)<<(PMD_SHIFT - PAGE_SHIFT)))
+               end_pfn = ((end>>PMD_SHIFT)<<(PMD_SHIFT - PAGE_SHIFT));
+       if (start_pfn < end_pfn) {
+               nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
+                               page_size_mask & (1<<PG_LEVEL_2M));
+               pos = end_pfn << PAGE_SHIFT;
+       }
 
        /* big page (1G) range */
-       start_pfn = end_pfn;
-       end_pfn = (end>>PUD_SHIFT) << (PUD_SHIFT - PAGE_SHIFT);
-       nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
+       start_pfn = ((pos + (PUD_SIZE - 1))>>PUD_SHIFT)
+                        << (PUD_SHIFT - PAGE_SHIFT);
+       end_pfn = (end >> PUD_SHIFT) << (PUD_SHIFT - PAGE_SHIFT);
+       if (start_pfn < end_pfn) {
+               nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
                                page_size_mask &
                                 ((1<<PG_LEVEL_2M)|(1<<PG_LEVEL_1G)));
+               pos = end_pfn << PAGE_SHIFT;
+       }
 
        /* tail is not big page (1G) alignment */
-       start_pfn = end_pfn;
-       end_pfn = (end>>PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
-       nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
-                       page_size_mask & (1<<PG_LEVEL_2M));
+       start_pfn = ((pos + (PMD_SIZE - 1))>>PMD_SHIFT)
+                        << (PMD_SHIFT - PAGE_SHIFT);
+       end_pfn = (end >> PMD_SHIFT) << (PMD_SHIFT - PAGE_SHIFT);
+       if (start_pfn < end_pfn) {
+               nr_range = save_mr(mr, nr_range, start_pfn, end_pfn,
+                               page_size_mask & (1<<PG_LEVEL_2M));
+               pos = end_pfn << PAGE_SHIFT;
+       }
 
        /* tail is not big page (2M) alignment */
-       start_pfn = end_pfn;
+       start_pfn = pos>>PAGE_SHIFT;
        end_pfn = end>>PAGE_SHIFT;
        nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
 
@@ -842,7 +858,7 @@ int arch_add_memory(int nid, u64 start, u64 size)
                max_pfn_mapped = last_mapped_pfn;
 
        ret = __add_pages(zone, start_pfn, nr_pages);
-       WARN_ON(1);
+       WARN_ON_ONCE(ret);
 
        return ret;
 }
@@ -884,6 +900,7 @@ static struct kcore_list kcore_mem, kcore_vmalloc, kcore_kernel,
 void __init mem_init(void)
 {
        long codesize, reservedpages, datasize, initsize;
+       unsigned long absent_pages;
 
        start_periodic_check_for_corruption();
 
@@ -899,8 +916,9 @@ void __init mem_init(void)
 #else
        totalram_pages = free_all_bootmem();
 #endif
-       reservedpages = max_pfn - totalram_pages -
-                                       absent_pages_in_range(0, max_pfn);
+
+       absent_pages = absent_pages_in_range(0, max_pfn);
+       reservedpages = max_pfn - totalram_pages - absent_pages;
        after_bootmem = 1;
 
        codesize =  (unsigned long) &_etext - (unsigned long) &_text;
@@ -917,10 +935,11 @@ void __init mem_init(void)
                                 VSYSCALL_END - VSYSCALL_START);
 
        printk(KERN_INFO "Memory: %luk/%luk available (%ldk kernel code, "
-                               "%ldk reserved, %ldk data, %ldk init)\n",
+                        "%ldk absent, %ldk reserved, %ldk data, %ldk init)\n",
                (unsigned long) nr_free_pages() << (PAGE_SHIFT-10),
                max_pfn << (PAGE_SHIFT-10),
                codesize >> 10,
+               absent_pages << (PAGE_SHIFT-10),
                reservedpages << (PAGE_SHIFT-10),
                datasize >> 10,
                initsize >> 10);
index ae71e11eb3e5e4ddeceadc9128d3afea564f27e0..d4c4307ff3e049f1454c3629fb2989f63395ae68 100644 (file)
@@ -387,7 +387,7 @@ static void __iomem *ioremap_default(resource_size_t phys_addr,
                                        unsigned long size)
 {
        unsigned long flags;
-       void *ret;
+       void __iomem *ret;
        int err;
 
        /*
@@ -399,11 +399,11 @@ static void __iomem *ioremap_default(resource_size_t phys_addr,
        if (err < 0)
                return NULL;
 
-       ret = (void *) __ioremap_caller(phys_addr, size, flags,
-                                       __builtin_return_address(0));
+       ret = __ioremap_caller(phys_addr, size, flags,
+                              __builtin_return_address(0));
 
        free_memtype(phys_addr, phys_addr + size);
-       return (void __iomem *)ret;
+       return ret;
 }
 
 void __iomem *ioremap_prot(resource_size_t phys_addr, unsigned long size,
@@ -622,7 +622,7 @@ static inline void __init early_clear_fixmap(enum fixed_addresses idx)
                __early_set_fixmap(idx, 0, __pgprot(0));
 }
 
-static void *prev_map[FIX_BTMAPS_SLOTS] __initdata;
+static void __iomem *prev_map[FIX_BTMAPS_SLOTS] __initdata;
 static unsigned long prev_size[FIX_BTMAPS_SLOTS] __initdata;
 static int __init check_early_ioremap_leak(void)
 {
@@ -645,7 +645,7 @@ static int __init check_early_ioremap_leak(void)
 }
 late_initcall(check_early_ioremap_leak);
 
-static void __init *__early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot)
+static void __init __iomem *__early_ioremap(unsigned long phys_addr, unsigned long size, pgprot_t prot)
 {
        unsigned long offset, last_addr;
        unsigned int nrpages;
@@ -713,23 +713,23 @@ static void __init *__early_ioremap(unsigned long phys_addr, unsigned long size,
        if (early_ioremap_debug)
                printk(KERN_CONT "%08lx + %08lx\n", offset, fix_to_virt(idx0));
 
-       prev_map[slot] = (void *) (offset + fix_to_virt(idx0));
+       prev_map[slot] = (void __iomem *)(offset + fix_to_virt(idx0));
        return prev_map[slot];
 }
 
 /* Remap an IO device */
-void __init *early_ioremap(unsigned long phys_addr, unsigned long size)
+void __init __iomem *early_ioremap(unsigned long phys_addr, unsigned long size)
 {
        return __early_ioremap(phys_addr, size, PAGE_KERNEL_IO);
 }
 
 /* Remap memory */
-void __init *early_memremap(unsigned long phys_addr, unsigned long size)
+void __init __iomem *early_memremap(unsigned long phys_addr, unsigned long size)
 {
        return __early_ioremap(phys_addr, size, PAGE_KERNEL);
 }
 
-void __init early_iounmap(void *addr, unsigned long size)
+void __init early_iounmap(void __iomem *addr, unsigned long size)
 {
        unsigned long virt_addr;
        unsigned long offset;
@@ -779,7 +779,7 @@ void __init early_iounmap(void *addr, unsigned long size)
                --idx;
                --nrpages;
        }
-       prev_map[slot] = 0;
+       prev_map[slot] = NULL;
 }
 
 void __this_fixmap_does_not_exist(void)
index 738fd0f2495823189daffbba1e5c836b227e6c25..eb1bf000d12e9b1aa1769284e263d43593095183 100644 (file)
@@ -481,12 +481,16 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
        return 1;
 }
 #else
+/* This check is needed to avoid cache aliasing when PAT is enabled */
 static inline int range_is_allowed(unsigned long pfn, unsigned long size)
 {
        u64 from = ((u64)pfn) << PAGE_SHIFT;
        u64 to = from + size;
        u64 cursor = from;
 
+       if (!pat_enabled)
+               return 1;
+
        while (cursor < to) {
                if (!devmem_is_allowed(pfn)) {
                        printk(KERN_INFO
index d38f43f593d400e64ab7796c1f90760c66966caf..2f557f570ade135e48faa389ef3fb96d2b5d4970 100644 (file)
@@ -68,6 +68,8 @@ source "drivers/ssb/Kconfig"
 
 source "drivers/mfd/Kconfig"
 
+source "drivers/regulator/Kconfig"
+
 source "drivers/media/Kconfig"
 
 source "drivers/video/Kconfig"
index 75dd6e22faff531cf8d136223bdf379102c299f6..c98c31ec2f752189e2481a278ed8e7f02cf01985 100644 (file)
@@ -355,7 +355,7 @@ static void __sysdev_resume(struct sys_device *dev)
  *     sysdev_suspend - Suspend all system devices.
  *     @state:         Power state to enter.
  *
- *     We perform an almost identical operation as sys_device_shutdown()
+ *     We perform an almost identical operation as sysdev_shutdown()
  *     above, though calling ->suspend() instead. Interrupts are disabled
  *     when this called. Devices are responsible for both saving state and
  *     quiescing or powering down the device.
@@ -437,7 +437,7 @@ aux_driver:
 /**
  *     sysdev_resume - Bring system devices back to life.
  *
- *     Similar to sys_device_suspend(), but we iterate the list forwards
+ *     Similar to sysdev_suspend(), but we iterate the list forwards
  *     to guarantee that parent devices are resumed before their children.
  *
  *     Note: Interrupts are disabled when called.
@@ -488,7 +488,8 @@ ssize_t sysdev_store_ulong(struct sys_device *sysdev,
        if (end == buf)
                return -EINVAL;
        *(unsigned long *)(ea->var) = new;
-       return end - buf;
+       /* Always return full write size even if we didn't consume all */
+       return size;
 }
 EXPORT_SYMBOL_GPL(sysdev_store_ulong);
 
@@ -511,7 +512,8 @@ ssize_t sysdev_store_int(struct sys_device *sysdev,
        if (end == buf || new > INT_MAX || new < INT_MIN)
                return -EINVAL;
        *(int *)(ea->var) = new;
-       return end - buf;
+       /* Always return full write size even if we didn't consume all */
+       return size;
 }
 EXPORT_SYMBOL_GPL(sysdev_store_int);
 
index 3f09cd8bcc38e1d1b16787c2d83114316406585f..5c4ee70d5cf319311deab818996928af5f2736f6 100644 (file)
@@ -40,8 +40,7 @@
  * Heinz Mauelshagen <mge@sistina.com>, Feb 2002
  *
  * Support for falling back on the write file operation when the address space
- * operations prepare_write and/or commit_write are not available on the
- * backing filesystem.
+ * operations write_begin is not available on the backing filesystem.
  * Anton Altaparmakov, 16 Feb 2005
  *
  * Still To Fix:
@@ -765,7 +764,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
                 */
                if (!file->f_op->splice_read)
                        goto out_putf;
-               if (aops->prepare_write || aops->write_begin)
+               if (aops->write_begin)
                        lo_flags |= LO_FLAGS_USE_AOPS;
                if (!(lo_flags & LO_FLAGS_USE_AOPS) && !file->f_op->write)
                        lo_flags |= LO_FLAGS_READ_ONLY;
index e6ee21d99d92ce42cd0b8091544363f9f4758cb5..b0e569ba730d0e7ef1d8fafdcfee3ff20ab1a456 100644 (file)
@@ -867,7 +867,7 @@ static int bluecard_probe(struct pcmcia_device *link)
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
-       link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
+       link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
        link->irq.IRQInfo1 = IRQ_LEVEL_ID;
 
        link->irq.Handler = bluecard_interrupt;
index 2cbe70b66470eb7189a7232fa54e8c79d5db70fe..b3e4d07a4ac2b75bd73a1caf3c91be36c8124a62 100644 (file)
@@ -343,6 +343,7 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
        bt3c_info_t *info = dev_inst;
        unsigned int iobase;
        int iir;
+       irqreturn_t r = IRQ_NONE;
 
        BUG_ON(!info->hdev);
 
@@ -374,11 +375,12 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)
 
                        outb(iir, iobase + CONTROL);
                }
+               r = IRQ_HANDLED;
        }
 
        spin_unlock(&(info->lock));
 
-       return IRQ_HANDLED;
+       return r;
 }
 
 
@@ -657,7 +659,7 @@ static int bt3c_probe(struct pcmcia_device *link)
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
-       link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
+       link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
        link->irq.IRQInfo1 = IRQ_LEVEL_ID;
 
        link->irq.Handler = bt3c_interrupt;
index 8e556b7ff9f63b3e1d95f99526304655df2c73ad..efd689a062eb231dcd95c58af780822d0f00c479 100644 (file)
@@ -293,6 +293,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst)
        unsigned int iobase;
        int boguscount = 0;
        int iir, lsr;
+       irqreturn_t r = IRQ_NONE;
 
        BUG_ON(!info->hdev);
 
@@ -302,6 +303,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst)
 
        iir = inb(iobase + UART_IIR) & UART_IIR_ID;
        while (iir) {
+               r = IRQ_HANDLED;
 
                /* Clear interrupt */
                lsr = inb(iobase + UART_LSR);
@@ -335,7 +337,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst)
 
        spin_unlock(&(info->lock));
 
-       return IRQ_HANDLED;
+       return r;
 }
 
 
@@ -586,7 +588,7 @@ static int btuart_probe(struct pcmcia_device *link)
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
-       link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
+       link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
        link->irq.IRQInfo1 = IRQ_LEVEL_ID;
 
        link->irq.Handler = btuart_interrupt;
index e6e6b037695a2692e178deef1ce9bafd8b7bd227..901bdd95655f3e8065ff3e4715f9acc63713fc66 100644 (file)
@@ -297,6 +297,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
        unsigned char msr;
        int boguscount = 0;
        int iir, lsr;
+       irqreturn_t r = IRQ_NONE;
 
        BUG_ON(!info->hdev);
 
@@ -307,6 +308,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
        iir = inb(iobase + UART_IIR) & UART_IIR_ID;
        while (iir) {
 
+               r = IRQ_HANDLED;
                /* Clear interrupt */
                lsr = inb(iobase + UART_LSR);
 
@@ -343,11 +345,12 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)
                info->ri_latch = msr & UART_MSR_RI;
                clear_bit(XMIT_WAITING, &(info->tx_state));
                dtl1_write_wakeup(info);
+               r = IRQ_HANDLED;
        }
 
        spin_unlock(&(info->lock));
 
-       return IRQ_HANDLED;
+       return r;
 }
 
 
@@ -568,7 +571,7 @@ static int dtl1_probe(struct pcmcia_device *link)
 
        link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
        link->io.NumPorts1 = 8;
-       link->irq.Attributes = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
+       link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING | IRQ_HANDLE_PRESENT;
        link->irq.IRQInfo1 = IRQ_LEVEL_ID;
 
        link->irq.Handler = dtl1_interrupt;
index 122254155ae16019e4b56288b2fcdecf67509c6e..43b35d0369d6c9486b3f5d677313ece83218130c 100644 (file)
@@ -812,28 +812,6 @@ config JS_RTC
          To compile this driver as a module, choose M here: the
          module will be called js-rtc.
 
-config SGI_DS1286
-       tristate "SGI DS1286 RTC support"
-       depends on SGI_HAS_DS1286
-       help
-         If you say Y here and create a character special file /dev/rtc with
-         major number 10 and minor number 135 using mknod ("man mknod"), you
-         will get access to the real time clock built into your computer.
-         Every SGI has such a clock built in. It reports status information
-         via the file /proc/rtc and its behaviour is set by various ioctls on
-         /dev/rtc.
-
-config SGI_IP27_RTC
-       bool "SGI M48T35 RTC support"
-       depends on SGI_IP27
-       help
-         If you say Y here and create a character special file /dev/rtc with
-         major number 10 and minor number 135 using mknod ("man mknod"), you
-         will get access to the real time clock built into your computer.
-         Every SGI has such a clock built in. It reports status information
-         via the file /proc/rtc and its behaviour is set by various ioctls on
-         /dev/rtc.
-
 config GEN_RTC
        tristate "Generic /dev/rtc emulation"
        depends on RTC!=y && !IA64 && !ARM && !M32R && !MIPS && !SPARC && !FRV && !S390 && !SUPERH && !AVR32
index 1a4247dccac4dfa4d79c27e69c2e93fbdb41fab7..438f71317c5ce59b1f0fe5e70450cfe1be009fe6 100644 (file)
@@ -74,8 +74,6 @@ obj-$(CONFIG_RTC)             += rtc.o
 obj-$(CONFIG_HPET)             += hpet.o
 obj-$(CONFIG_GEN_RTC)          += genrtc.o
 obj-$(CONFIG_EFI_RTC)          += efirtc.o
-obj-$(CONFIG_SGI_DS1286)       += ds1286.o
-obj-$(CONFIG_SGI_IP27_RTC)     += ip27-rtc.o
 obj-$(CONFIG_DS1302)           += ds1302.o
 obj-$(CONFIG_XILINX_HWICAP)    += xilinx_hwicap/
 ifeq ($(CONFIG_GENERIC_NVRAM),y)
diff --git a/drivers/char/ds1286.c b/drivers/char/ds1286.c
deleted file mode 100644 (file)
index 0a826d7..0000000
+++ /dev/null
@@ -1,585 +0,0 @@
-/*
- * DS1286 Real Time Clock interface for Linux
- *
- * Copyright (C) 1998, 1999, 2000 Ralf Baechle
- *
- * Based on code written by Paul Gortmaker.
- *
- * This driver allows use of the real time clock (built into nearly all
- * computers) from user space. It exports the /dev/rtc interface supporting
- * various ioctl() and also the /proc/rtc pseudo-file for status
- * information.
- *
- * The ioctls can be used to set the interrupt behaviour and generation rate
- * from the RTC via IRQ 8. Then the /dev/rtc interface can be used to make
- * use of these timer interrupts, be they interval or alarm based.
- *
- * The /dev/rtc interface will block on reads until an interrupt has been
- * received. If a RTC interrupt has already happened, it will output an
- * unsigned long and then block. The output value contains the interrupt
- * status in the low byte and the number of interrupts since the last read
- * in the remaining high bytes. The /dev/rtc interface can also be used with
- * the select(2) call.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- */
-#include <linux/ds1286.h>
-#include <linux/smp_lock.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/miscdevice.h>
-#include <linux/slab.h>
-#include <linux/ioport.h>
-#include <linux/fcntl.h>
-#include <linux/init.h>
-#include <linux/poll.h>
-#include <linux/rtc.h>
-#include <linux/spinlock.h>
-#include <linux/bcd.h>
-#include <linux/proc_fs.h>
-#include <linux/jiffies.h>
-
-#include <asm/uaccess.h>
-#include <asm/system.h>
-
-#define DS1286_VERSION         "1.0"
-
-/*
- *     We sponge a minor off of the misc major. No need slurping
- *     up another valuable major dev number for this. If you add
- *     an ioctl, make sure you don't conflict with SPARC's RTC
- *     ioctls.
- */
-
-static DECLARE_WAIT_QUEUE_HEAD(ds1286_wait);
-
-static ssize_t ds1286_read(struct file *file, char *buf,
-                       size_t count, loff_t *ppos);
-
-static int ds1286_ioctl(struct inode *inode, struct file *file,
-                        unsigned int cmd, unsigned long arg);
-
-static unsigned int ds1286_poll(struct file *file, poll_table *wait);
-
-static void ds1286_get_alm_time (struct rtc_time *alm_tm);
-static void ds1286_get_time(struct rtc_time *rtc_tm);
-static int ds1286_set_time(struct rtc_time *rtc_tm);
-
-static inline unsigned char ds1286_is_updating(void);
-
-static DEFINE_SPINLOCK(ds1286_lock);
-
-static int ds1286_read_proc(char *page, char **start, off_t off,
-                            int count, int *eof, void *data);
-
-/*
- *     Bits in rtc_status. (7 bits of room for future expansion)
- */
-
-#define RTC_IS_OPEN            0x01    /* means /dev/rtc is in use     */
-#define RTC_TIMER_ON           0x02    /* missed irq timer active      */
-
-static unsigned char ds1286_status;    /* bitmapped status byte.       */
-
-static unsigned char days_in_mo[] = {
-       0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
-};
-
-/*
- *     Now all the various file operations that we export.
- */
-
-static ssize_t ds1286_read(struct file *file, char *buf,
-                           size_t count, loff_t *ppos)
-{
-       return -EIO;
-}
-
-static int ds1286_ioctl(struct inode *inode, struct file *file,
-                        unsigned int cmd, unsigned long arg)
-{
-       struct rtc_time wtime;
-
-       switch (cmd) {
-       case RTC_AIE_OFF:       /* Mask alarm int. enab. bit    */
-       {
-               unsigned long flags;
-               unsigned char val;
-
-               if (!capable(CAP_SYS_TIME))
-                       return -EACCES;
-
-               spin_lock_irqsave(&ds1286_lock, flags);
-               val = rtc_read(RTC_CMD);
-               val |=  RTC_TDM;
-               rtc_write(val, RTC_CMD);
-               spin_unlock_irqrestore(&ds1286_lock, flags);
-
-               return 0;
-       }
-       case RTC_AIE_ON:        /* Allow alarm interrupts.      */
-       {
-               unsigned long flags;
-               unsigned char val;
-
-               if (!capable(CAP_SYS_TIME))
-                       return -EACCES;
-
-               spin_lock_irqsave(&ds1286_lock, flags);
-               val = rtc_read(RTC_CMD);
-               val &=  ~RTC_TDM;
-               rtc_write(val, RTC_CMD);
-               spin_unlock_irqrestore(&ds1286_lock, flags);
-
-               return 0;
-       }
-       case RTC_WIE_OFF:       /* Mask watchdog int. enab. bit */
-       {
-               unsigned long flags;
-               unsigned char val;
-
-               if (!capable(CAP_SYS_TIME))
-                       return -EACCES;
-
-               spin_lock_irqsave(&ds1286_lock, flags);
-               val = rtc_read(RTC_CMD);
-               val |= RTC_WAM;
-               rtc_write(val, RTC_CMD);
-               spin_unlock_irqrestore(&ds1286_lock, flags);
-
-               return 0;
-       }
-       case RTC_WIE_ON:        /* Allow watchdog interrupts.   */
-       {
-               unsigned long flags;
-               unsigned char val;
-
-               if (!capable(CAP_SYS_TIME))
-                       return -EACCES;
-
-               spin_lock_irqsave(&ds1286_lock, flags);
-               val = rtc_read(RTC_CMD);
-               val &= ~RTC_WAM;
-               rtc_write(val, RTC_CMD);
-               spin_unlock_irqrestore(&ds1286_lock, flags);
-
-               return 0;
-       }
-       case RTC_ALM_READ:      /* Read the present alarm time */
-       {
-               /*
-                * This returns a struct rtc_time. Reading >= 0xc0
-                * means "don't care" or "match all". Only the tm_hour,
-                * tm_min, and tm_sec values are filled in.
-                */
-
-               memset(&wtime, 0, sizeof(wtime));
-               ds1286_get_alm_time(&wtime);
-               break;
-       }
-       case RTC_ALM_SET:       /* Store a time into the alarm */
-       {
-               /*
-                * This expects a struct rtc_time. Writing 0xff means
-                * "don't care" or "match all". Only the tm_hour,
-                * tm_min and tm_sec are used.
-                */
-               unsigned char hrs, min, sec;
-               struct rtc_time alm_tm;
-
-               if (!capable(CAP_SYS_TIME))
-                       return -EACCES;
-
-               if (copy_from_user(&alm_tm, (struct rtc_time*)arg,
-                                  sizeof(struct rtc_time)))
-                       return -EFAULT;
-
-               hrs = alm_tm.tm_hour;
-               min = alm_tm.tm_min;
-               sec = alm_tm.tm_sec;
-
-               if (hrs >= 24)
-                       hrs = 0xff;
-
-               if (min >= 60)
-                       min = 0xff;
-
-               if (sec != 0)
-                       return -EINVAL;
-
-               min = bin2bcd(min);
-               min = bin2bcd(hrs);
-
-               spin_lock(&ds1286_lock);
-               rtc_write(hrs, RTC_HOURS_ALARM);
-               rtc_write(min, RTC_MINUTES_ALARM);
-               spin_unlock(&ds1286_lock);
-
-               return 0;
-       }
-       case RTC_RD_TIME:       /* Read the time/date from RTC  */
-       {
-               memset(&wtime, 0, sizeof(wtime));
-               ds1286_get_time(&wtime);
-               break;
-       }
-       case RTC_SET_TIME:      /* Set the RTC */
-       {
-               struct rtc_time rtc_tm;
-
-               if (!capable(CAP_SYS_TIME))
-                       return -EACCES;
-
-               if (copy_from_user(&rtc_tm, (struct rtc_time*)arg,
-                                  sizeof(struct rtc_time)))
-                       return -EFAULT;
-
-               return ds1286_set_time(&rtc_tm);
-       }
-       default:
-               return -EINVAL;
-       }
-       return copy_to_user((void *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
-}
-
-/*
- *     We enforce only one user at a time here with the open/close.
- *     Also clear the previous interrupt data on an open, and clean
- *     up things on a close.
- */
-
-static int ds1286_open(struct inode *inode, struct file *file)
-{
-       lock_kernel();
-       spin_lock_irq(&ds1286_lock);
-
-       if (ds1286_status & RTC_IS_OPEN)
-               goto out_busy;
-
-       ds1286_status |= RTC_IS_OPEN;
-
-       spin_unlock_irq(&ds1286_lock);
-       unlock_kernel();
-       return 0;
-
-out_busy:
-       spin_lock_irq(&ds1286_lock);
-       unlock_kernel();
-       return -EBUSY;
-}
-
-static int ds1286_release(struct inode *inode, struct file *file)
-{
-       ds1286_status &= ~RTC_IS_OPEN;
-
-       return 0;
-}
-
-static unsigned int ds1286_poll(struct file *file, poll_table *wait)
-{
-       poll_wait(file, &ds1286_wait, wait);
-
-       return 0;
-}
-
-/*
- *     The various file operations we support.
- */
-
-static const struct file_operations ds1286_fops = {
-       .llseek         = no_llseek,
-       .read           = ds1286_read,
-       .poll           = ds1286_poll,
-       .ioctl          = ds1286_ioctl,
-       .open           = ds1286_open,
-       .release        = ds1286_release,
-};
-
-static struct miscdevice ds1286_dev=
-{
-       .minor  = RTC_MINOR,
-       .name   = "rtc",
-       .fops   = &ds1286_fops,
-};
-
-static int __init ds1286_init(void)
-{
-       int err;
-
-       printk(KERN_INFO "DS1286 Real Time Clock Driver v%s\n", DS1286_VERSION);
-
-       err = misc_register(&ds1286_dev);
-       if (err)
-               goto out;
-
-       if (!create_proc_read_entry("driver/rtc", 0, 0, ds1286_read_proc, NULL)) {
-               err = -ENOMEM;
-
-               goto out_deregister;
-       }
-
-       return 0;
-
-out_deregister:
-       misc_deregister(&ds1286_dev);
-
-out:
-       return err;
-}
-
-static void __exit ds1286_exit(void)
-{
-       remove_proc_entry("driver/rtc", NULL);
-       misc_deregister(&ds1286_dev);
-}
-
-static char *days[] = {
-       "***", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
-/*
- *     Info exported via "/proc/rtc".
- */
-static int ds1286_proc_output(char *buf)
-{
-       char *p, *s;
-       struct rtc_time tm;
-       unsigned char hundredth, month, cmd, amode;
-
-       p = buf;
-
-       ds1286_get_time(&tm);
-       hundredth = rtc_read(RTC_HUNDREDTH_SECOND);
-       hundredth = bcd2bin(hundredth);
-
-       p += sprintf(p,
-                    "rtc_time\t: %02d:%02d:%02d.%02d\n"
-                    "rtc_date\t: %04d-%02d-%02d\n",
-                    tm.tm_hour, tm.tm_min, tm.tm_sec, hundredth,
-                    tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday);
-
-       /*
-        * We implicitly assume 24hr mode here. Alarm values >= 0xc0 will
-        * match any value for that particular field. Values that are
-        * greater than a valid time, but less than 0xc0 shouldn't appear.
-        */
-       ds1286_get_alm_time(&tm);
-       p += sprintf(p, "alarm\t\t: %s ", days[tm.tm_wday]);
-       if (tm.tm_hour <= 24)
-               p += sprintf(p, "%02d:", tm.tm_hour);
-       else
-               p += sprintf(p, "**:");
-
-       if (tm.tm_min <= 59)
-               p += sprintf(p, "%02d\n", tm.tm_min);
-       else
-               p += sprintf(p, "**\n");
-
-       month = rtc_read(RTC_MONTH);
-       p += sprintf(p,
-                    "oscillator\t: %s\n"
-                    "square_wave\t: %s\n",
-                    (month & RTC_EOSC) ? "disabled" : "enabled",
-                    (month & RTC_ESQW) ? "disabled" : "enabled");
-
-       amode = ((rtc_read(RTC_MINUTES_ALARM) & 0x80) >> 5) |
-               ((rtc_read(RTC_HOURS_ALARM) & 0x80) >> 6) |
-               ((rtc_read(RTC_DAY_ALARM) & 0x80) >> 7);
-       if (amode == 7)      s = "each minute";
-       else if (amode == 3) s = "minutes match";
-       else if (amode == 1) s = "hours and minutes match";
-       else if (amode == 0) s = "days, hours and minutes match";
-       else                 s = "invalid";
-       p += sprintf(p, "alarm_mode\t: %s\n", s);
-
-       cmd = rtc_read(RTC_CMD);
-       p += sprintf(p,
-                    "alarm_enable\t: %s\n"
-                    "wdog_alarm\t: %s\n"
-                    "alarm_mask\t: %s\n"
-                    "wdog_alarm_mask\t: %s\n"
-                    "interrupt_mode\t: %s\n"
-                    "INTB_mode\t: %s_active\n"
-                    "interrupt_pins\t: %s\n",
-                    (cmd & RTC_TDF) ? "yes" : "no",
-                    (cmd & RTC_WAF) ? "yes" : "no",
-                    (cmd & RTC_TDM) ? "disabled" : "enabled",
-                    (cmd & RTC_WAM) ? "disabled" : "enabled",
-                    (cmd & RTC_PU_LVL) ? "pulse" : "level",
-                    (cmd & RTC_IBH_LO) ? "low" : "high",
-                    (cmd & RTC_IPSW) ? "unswapped" : "swapped");
-
-       return  p - buf;
-}
-
-static int ds1286_read_proc(char *page, char **start, off_t off,
-                         int count, int *eof, void *data)
-{
-       int len = ds1286_proc_output (page);
-       if (len <= off+count) *eof = 1;
-       *start = page + off;
-       len -= off;
-       if (len>count)
-               len = count;
-       if (len<0)
-               len = 0;
-
-       return len;
-}
-
-/*
- * Returns true if a clock update is in progress
- */
-static inline unsigned char ds1286_is_updating(void)
-{
-       return rtc_read(RTC_CMD) & RTC_TE;
-}
-
-
-static void ds1286_get_time(struct rtc_time *rtc_tm)
-{
-       unsigned char save_control;
-       unsigned long flags;
-
-       /*
-        * read RTC once any update in progress is done. The update
-        * can take just over 2ms. We wait 10 to 20ms. There is no need to
-        * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP.
-        * If you need to know *exactly* when a second has started, enable
-        * periodic update complete interrupts, (via ioctl) and then
-        * immediately read /dev/rtc which will block until you get the IRQ.
-        * Once the read clears, read the RTC time (again via ioctl). Easy.
-        */
-
-       if (ds1286_is_updating() != 0)
-               msleep(20);
-
-       /*
-        * Only the values that we read from the RTC are set. We leave
-        * tm_wday, tm_yday and tm_isdst untouched. Even though the
-        * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
-        * by the RTC when initially set to a non-zero value.
-        */
-       spin_lock_irqsave(&ds1286_lock, flags);
-       save_control = rtc_read(RTC_CMD);
-       rtc_write((save_control|RTC_TE), RTC_CMD);
-
-       rtc_tm->tm_sec = rtc_read(RTC_SECONDS);
-       rtc_tm->tm_min = rtc_read(RTC_MINUTES);
-       rtc_tm->tm_hour = rtc_read(RTC_HOURS) & 0x3f;
-       rtc_tm->tm_mday = rtc_read(RTC_DATE);
-       rtc_tm->tm_mon = rtc_read(RTC_MONTH) & 0x1f;
-       rtc_tm->tm_year = rtc_read(RTC_YEAR);
-
-       rtc_write(save_control, RTC_CMD);
-       spin_unlock_irqrestore(&ds1286_lock, flags);
-
-       rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec);
-       rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min);
-       rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour);
-       rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday);
-       rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon);
-       rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year);
-
-       /*
-        * Account for differences between how the RTC uses the values
-        * and how they are defined in a struct rtc_time;
-        */
-       if (rtc_tm->tm_year < 45)
-               rtc_tm->tm_year += 30;
-       if ((rtc_tm->tm_year += 40) < 70)
-               rtc_tm->tm_year += 100;
-
-       rtc_tm->tm_mon--;
-}
-
-static int ds1286_set_time(struct rtc_time *rtc_tm)
-{
-       unsigned char mon, day, hrs, min, sec, leap_yr;
-       unsigned char save_control;
-       unsigned int yrs;
-       unsigned long flags;
-
-
-       yrs = rtc_tm->tm_year + 1900;
-       mon = rtc_tm->tm_mon + 1;   /* tm_mon starts at zero */
-       day = rtc_tm->tm_mday;
-       hrs = rtc_tm->tm_hour;
-       min = rtc_tm->tm_min;
-       sec = rtc_tm->tm_sec;
-
-       if (yrs < 1970)
-               return -EINVAL;
-
-       leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400));
-
-       if ((mon > 12) || (day == 0))
-               return -EINVAL;
-
-       if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr)))
-               return -EINVAL;
-
-       if ((hrs >= 24) || (min >= 60) || (sec >= 60))
-               return -EINVAL;
-
-       if ((yrs -= 1940) > 255)    /* They are unsigned */
-               return -EINVAL;
-
-       if (yrs >= 100)
-               yrs -= 100;
-
-       sec = bin2bcd(sec);
-       min = bin2bcd(min);
-       hrs = bin2bcd(hrs);
-       day = bin2bcd(day);
-       mon = bin2bcd(mon);
-       yrs = bin2bcd(yrs);
-
-       spin_lock_irqsave(&ds1286_lock, flags);
-       save_control = rtc_read(RTC_CMD);
-       rtc_write((save_control|RTC_TE), RTC_CMD);
-
-       rtc_write(yrs, RTC_YEAR);
-       rtc_write(mon, RTC_MONTH);
-       rtc_write(day, RTC_DATE);
-       rtc_write(hrs, RTC_HOURS);
-       rtc_write(min, RTC_MINUTES);
-       rtc_write(sec, RTC_SECONDS);
-       rtc_write(0, RTC_HUNDREDTH_SECOND);
-
-       rtc_write(save_control, RTC_CMD);
-       spin_unlock_irqrestore(&ds1286_lock, flags);
-
-       return 0;
-}
-
-static void ds1286_get_alm_time(struct rtc_time *alm_tm)
-{
-       unsigned char cmd;
-       unsigned long flags;
-
-       /*
-        * Only the values that we read from the RTC are set. That
-        * means only tm_wday, tm_hour, tm_min.
-        */
-       spin_lock_irqsave(&ds1286_lock, flags);
-       alm_tm->tm_min = rtc_read(RTC_MINUTES_ALARM) & 0x7f;
-       alm_tm->tm_hour = rtc_read(RTC_HOURS_ALARM)  & 0x1f;
-       alm_tm->tm_wday = rtc_read(RTC_DAY_ALARM)    & 0x07;
-       cmd = rtc_read(RTC_CMD);
-       spin_unlock_irqrestore(&ds1286_lock, flags);
-
-       alm_tm->tm_min = bcd2bin(alm_tm->tm_min);
-       alm_tm->tm_hour = bcd2bin(alm_tm->tm_hour);
-       alm_tm->tm_sec = 0;
-}
-
-module_init(ds1286_init);
-module_exit(ds1286_exit);
-
-MODULE_AUTHOR("Ralf Baechle");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS_MISCDEV(RTC_MINOR);
diff --git a/drivers/char/ip27-rtc.c b/drivers/char/ip27-rtc.c
deleted file mode 100644 (file)
index 2abd881..0000000
+++ /dev/null
@@ -1,329 +0,0 @@
-/*
- *     Driver for the SGS-Thomson M48T35 Timekeeper RAM chip
- *
- *     Real Time Clock interface for Linux
- *
- *     TODO: Implement periodic interrupts.
- *
- *     Copyright (C) 2000 Silicon Graphics, Inc.
- *     Written by Ulf Carlsson (ulfc@engr.sgi.com)
- *
- *     Based on code written by Paul Gortmaker.
- *
- *     This driver allows use of the real time clock (built into
- *     nearly all computers) from user space. It exports the /dev/rtc
- *     interface supporting various ioctl() and also the /proc/rtc
- *     pseudo-file for status information.
- *
- *     This program is free software; you can redistribute it and/or
- *     modify it under the terms of the GNU General Public License
- *     as published by the Free Software Foundation; either version
- *     2 of the License, or (at your option) any later version.
- *
- */
-
-#define RTC_VERSION            "1.09b"
-
-#include <linux/bcd.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/smp_lock.h>
-#include <linux/types.h>
-#include <linux/miscdevice.h>
-#include <linux/ioport.h>
-#include <linux/fcntl.h>
-#include <linux/rtc.h>
-#include <linux/init.h>
-#include <linux/poll.h>
-#include <linux/proc_fs.h>
-
-#include <asm/m48t35.h>
-#include <asm/sn/ioc3.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
-#include <asm/system.h>
-#include <asm/sn/klconfig.h>
-#include <asm/sn/sn0/ip27.h>
-#include <asm/sn/sn0/hub.h>
-#include <asm/sn/sn_private.h>
-
-static long rtc_ioctl(struct file *filp, unsigned int cmd,
-                       unsigned long arg);
-
-static int rtc_read_proc(char *page, char **start, off_t off,
-                         int count, int *eof, void *data);
-
-static void get_rtc_time(struct rtc_time *rtc_tm);
-
-/*
- *     Bits in rtc_status. (6 bits of room for future expansion)
- */
-
-#define RTC_IS_OPEN            0x01    /* means /dev/rtc is in use     */
-#define RTC_TIMER_ON           0x02    /* missed irq timer active      */
-
-static unsigned char rtc_status;       /* bitmapped status byte.       */
-static unsigned long rtc_freq; /* Current periodic IRQ rate    */
-static struct m48t35_rtc *rtc;
-
-/*
- *     If this driver ever becomes modularised, it will be really nice
- *     to make the epoch retain its value across module reload...
- */
-
-static unsigned long epoch = 1970;     /* year corresponding to 0x00   */
-
-static const unsigned char days_in_mo[] =
-{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
-
-static long rtc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
-{
-
-       struct rtc_time wtime;
-
-       switch (cmd) {
-       case RTC_RD_TIME:       /* Read the time/date from RTC  */
-       {
-               get_rtc_time(&wtime);
-               break;
-       }
-       case RTC_SET_TIME:      /* Set the RTC */
-       {
-               struct rtc_time rtc_tm;
-               unsigned char mon, day, hrs, min, sec, leap_yr;
-               unsigned int yrs;
-
-               if (!capable(CAP_SYS_TIME))
-                       return -EACCES;
-
-               if (copy_from_user(&rtc_tm, (struct rtc_time*)arg,
-                                  sizeof(struct rtc_time)))
-                       return -EFAULT;
-
-               yrs = rtc_tm.tm_year + 1900;
-               mon = rtc_tm.tm_mon + 1;   /* tm_mon starts at zero */
-               day = rtc_tm.tm_mday;
-               hrs = rtc_tm.tm_hour;
-               min = rtc_tm.tm_min;
-               sec = rtc_tm.tm_sec;
-
-               if (yrs < 1970)
-                       return -EINVAL;
-
-               leap_yr = ((!(yrs % 4) && (yrs % 100)) || !(yrs % 400));
-
-               if ((mon > 12) || (day == 0))
-                       return -EINVAL;
-
-               if (day > (days_in_mo[mon] + ((mon == 2) && leap_yr)))
-                       return -EINVAL;
-
-               if ((hrs >= 24) || (min >= 60) || (sec >= 60))
-                       return -EINVAL;
-
-               if ((yrs -= epoch) > 255)    /* They are unsigned */
-                       return -EINVAL;
-
-               if (yrs > 169)
-                       return -EINVAL;
-
-               if (yrs >= 100)
-                       yrs -= 100;
-
-               sec = bin2bcd(sec);
-               min = bin2bcd(min);
-               hrs = bin2bcd(hrs);
-               day = bin2bcd(day);
-               mon = bin2bcd(mon);
-               yrs = bin2bcd(yrs);
-
-               spin_lock_irq(&rtc_lock);
-               rtc->control |= M48T35_RTC_SET;
-               rtc->year = yrs;
-               rtc->month = mon;
-               rtc->date = day;
-               rtc->hour = hrs;
-               rtc->min = min;
-               rtc->sec = sec;
-               rtc->control &= ~M48T35_RTC_SET;
-               spin_unlock_irq(&rtc_lock);
-
-               return 0;
-       }
-       default:
-               return -EINVAL;
-       }
-       return copy_to_user((void *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
-}
-
-/*
- *     We enforce only one user at a time here with the open/close.
- *     Also clear the previous interrupt data on an open, and clean
- *     up things on a close.
- */
-
-static int rtc_open(struct inode *inode, struct file *file)
-{
-       lock_kernel();
-       spin_lock_irq(&rtc_lock);
-
-       if (rtc_status & RTC_IS_OPEN) {
-               spin_unlock_irq(&rtc_lock);
-               unlock_kernel();
-               return -EBUSY;
-       }
-
-       rtc_status |= RTC_IS_OPEN;
-       spin_unlock_irq(&rtc_lock);
-       unlock_kernel();
-
-       return 0;
-}
-
-static int rtc_release(struct inode *inode, struct file *file)
-{
-       /*
-        * Turn off all interrupts once the device is no longer
-        * in use, and clear the data.
-        */
-
-       spin_lock_irq(&rtc_lock);
-       rtc_status &= ~RTC_IS_OPEN;
-       spin_unlock_irq(&rtc_lock);
-
-       return 0;
-}
-
-/*
- *     The various file operations we support.
- */
-
-static const struct file_operations rtc_fops = {
-       .owner          = THIS_MODULE,
-       .unlocked_ioctl = rtc_ioctl,
-       .open           = rtc_open,
-       .release        = rtc_release,
-};
-
-static struct miscdevice rtc_dev=
-{
-       RTC_MINOR,
-       "rtc",
-       &rtc_fops
-};
-
-static int __init rtc_init(void)
-{
-       rtc = (struct m48t35_rtc *)
-       (KL_CONFIG_CH_CONS_INFO(master_nasid)->memory_base + IOC3_BYTEBUS_DEV0);
-
-       printk(KERN_INFO "Real Time Clock Driver v%s\n", RTC_VERSION);
-       if (misc_register(&rtc_dev)) {
-               printk(KERN_ERR "rtc: cannot register misc device.\n");
-               return -ENODEV;
-       }
-       if (!create_proc_read_entry("driver/rtc", 0, NULL, rtc_read_proc, NULL)) {
-               printk(KERN_ERR "rtc: cannot create /proc/rtc.\n");
-               misc_deregister(&rtc_dev);
-               return -ENOENT;
-       }
-
-       rtc_freq = 1024;
-
-       return 0;
-}
-
-static void __exit rtc_exit (void)
-{
-       /* interrupts and timer disabled at this point by rtc_release */
-
-       remove_proc_entry ("rtc", NULL);
-       misc_deregister(&rtc_dev);
-}
-
-module_init(rtc_init);
-module_exit(rtc_exit);
-
-/*
- *     Info exported via "/proc/rtc".
- */
-
-static int rtc_get_status(char *buf)
-{
-       char *p;
-       struct rtc_time tm;
-
-       /*
-        * Just emulate the standard /proc/rtc
-        */
-
-       p = buf;
-
-       get_rtc_time(&tm);
-
-       /*
-        * There is no way to tell if the luser has the RTC set for local
-        * time or for Universal Standard Time (GMT). Probably local though.
-        */
-       p += sprintf(p,
-                    "rtc_time\t: %02d:%02d:%02d\n"
-                    "rtc_date\t: %04d-%02d-%02d\n"
-                    "rtc_epoch\t: %04lu\n"
-                    "24hr\t\t: yes\n",
-                    tm.tm_hour, tm.tm_min, tm.tm_sec,
-                    tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, epoch);
-
-       return  p - buf;
-}
-
-static int rtc_read_proc(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data)
-{
-        int len = rtc_get_status(page);
-        if (len <= off+count) *eof = 1;
-        *start = page + off;
-        len -= off;
-        if (len>count) len = count;
-        if (len<0) len = 0;
-        return len;
-}
-
-static void get_rtc_time(struct rtc_time *rtc_tm)
-{
-       /*
-        * Do we need to wait for the last update to finish?
-        */
-
-       /*
-        * Only the values that we read from the RTC are set. We leave
-        * tm_wday, tm_yday and tm_isdst untouched. Even though the
-        * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
-        * by the RTC when initially set to a non-zero value.
-        */
-       spin_lock_irq(&rtc_lock);
-       rtc->control |= M48T35_RTC_READ;
-       rtc_tm->tm_sec = rtc->sec;
-       rtc_tm->tm_min = rtc->min;
-       rtc_tm->tm_hour = rtc->hour;
-       rtc_tm->tm_mday = rtc->date;
-       rtc_tm->tm_mon = rtc->month;
-       rtc_tm->tm_year = rtc->year;
-       rtc->control &= ~M48T35_RTC_READ;
-       spin_unlock_irq(&rtc_lock);
-
-       rtc_tm->tm_sec = bcd2bin(rtc_tm->tm_sec);
-       rtc_tm->tm_min = bcd2bin(rtc_tm->tm_min);
-       rtc_tm->tm_hour = bcd2bin(rtc_tm->tm_hour);
-       rtc_tm->tm_mday = bcd2bin(rtc_tm->tm_mday);
-       rtc_tm->tm_mon = bcd2bin(rtc_tm->tm_mon);
-       rtc_tm->tm_year = bcd2bin(rtc_tm->tm_year);
-
-       /*
-        * Account for differences between how the RTC uses the values
-        * and how they are defined in a struct rtc_time;
-        */
-       if ((rtc_tm->tm_year += (epoch - 1900)) <= 69)
-               rtc_tm->tm_year += 100;
-
-       rtc_tm->tm_mon--;
-}
index 835a33c8d5f510c7ff0ae3e0360e6ef8ec7f2551..1d7b429f7ffaf8dd0ad262cfee1e513e4afa1ff9 100644 (file)
@@ -957,3 +957,4 @@ module_exit(cleanup_ipmi);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Corey Minyard <minyard@mvista.com>");
 MODULE_DESCRIPTION("Linux device interface for the IPMI message handler.");
+MODULE_ALIAS("platform:ipmi_si");
index 9a626e50b793ba65ce21d269d64a3536546e970c..4d64a02612a42f96e07450afac5ce4e900de3f6c 100644 (file)
@@ -554,7 +554,7 @@ static int mgslpc_probe(struct pcmcia_device *link)
     /* Initialize the struct pcmcia_device structure */
 
     /* Interrupt setup */
-    link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
+    link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
     link->irq.IRQInfo1   = IRQ_LEVEL_ID;
     link->irq.Handler = NULL;
 
index 5a11e3cbcae26748ac75ac5e3e4e31a724d1fab8..e0dbd388757f2d8d62e5f8a4561b4d567e009746 100644 (file)
@@ -102,6 +102,13 @@ config EDAC_I3000
          Support for error detection and correction on the Intel
          3000 and 3010 server chipsets.
 
+config EDAC_X38
+       tristate "Intel X38"
+       depends on EDAC_MM_EDAC && PCI && X86
+       help
+         Support for error detection and correction on the Intel
+         X38 server chipsets.
+
 config EDAC_I82860
        tristate "Intel 82860"
        depends on EDAC_MM_EDAC && PCI && X86_32
index e5e9104b55204a1672f5bc7e8f5547b3079aed7d..62c2d9bad8dc711166cfb7ac63d144fe87b53319 100644 (file)
@@ -26,6 +26,7 @@ obj-$(CONFIG_EDAC_I82443BXGX)         += i82443bxgx_edac.o
 obj-$(CONFIG_EDAC_I82875P)             += i82875p_edac.o
 obj-$(CONFIG_EDAC_I82975X)             += i82975x_edac.o
 obj-$(CONFIG_EDAC_I3000)               += i3000_edac.o
+obj-$(CONFIG_EDAC_X38)                 += x38_edac.o
 obj-$(CONFIG_EDAC_I82860)              += i82860_edac.o
 obj-$(CONFIG_EDAC_R82600)              += r82600_edac.o
 obj-$(CONFIG_EDAC_PASEMI)              += pasemi_edac.o
index 887072f5dc8b8b703db223751a4bd47b6631e5f8..cd2e3b8087e7a2cddad12d198c9d2e02f13ea922 100644 (file)
@@ -9,6 +9,7 @@
  */
 #undef DEBUG
 
+#include <linux/edac.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
@@ -164,6 +165,8 @@ static int __devinit cell_edac_probe(struct platform_device *pdev)
        if (regs == NULL)
                return -ENODEV;
 
+       edac_op_state = EDAC_OPSTATE_POLL;
+
        /* Get channel population */
        reg = in_be64(&regs->mic_mnt_cfg);
        dev_dbg(&pdev->dev, "MIC_MNT_CFG = 0x%016lx\n", reg);
diff --git a/drivers/edac/x38_edac.c b/drivers/edac/x38_edac.c
new file mode 100644 (file)
index 0000000..2406c2c
--- /dev/null
@@ -0,0 +1,524 @@
+/*
+ * Intel X38 Memory Controller kernel module
+ * Copyright (C) 2008 Cluster Computing, Inc.
+ *
+ * This file may be distributed under the terms of the
+ * GNU General Public License.
+ *
+ * This file is based on i3200_edac.c
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/pci.h>
+#include <linux/pci_ids.h>
+#include <linux/slab.h>
+#include <linux/edac.h>
+#include "edac_core.h"
+
+#define X38_REVISION           "1.1"
+
+#define EDAC_MOD_STR           "x38_edac"
+
+#define PCI_DEVICE_ID_INTEL_X38_HB     0x29e0
+
+#define X38_RANKS              8
+#define X38_RANKS_PER_CHANNEL  4
+#define X38_CHANNELS           2
+
+/* Intel X38 register addresses - device 0 function 0 - DRAM Controller */
+
+#define X38_MCHBAR_LOW 0x48    /* MCH Memory Mapped Register BAR */
+#define X38_MCHBAR_HIGH        0x4b
+#define X38_MCHBAR_MASK        0xfffffc000ULL  /* bits 35:14 */
+#define X38_MMR_WINDOW_SIZE    16384
+
+#define X38_TOM        0xa0    /* Top of Memory (16b)
+                                *
+                                * 15:10 reserved
+                                *  9:0  total populated physical memory
+                                */
+#define X38_TOM_MASK   0x3ff   /* bits 9:0 */
+#define X38_TOM_SHIFT 26       /* 64MiB grain */
+
+#define X38_ERRSTS     0xc8    /* Error Status Register (16b)
+                                *
+                                * 15    reserved
+                                * 14    Isochronous TBWRR Run Behind FIFO Full
+                                *       (ITCV)
+                                * 13    Isochronous TBWRR Run Behind FIFO Put
+                                *       (ITSTV)
+                                * 12    reserved
+                                * 11    MCH Thermal Sensor Event
+                                *       for SMI/SCI/SERR (GTSE)
+                                * 10    reserved
+                                *  9    LOCK to non-DRAM Memory Flag (LCKF)
+                                *  8    reserved
+                                *  7    DRAM Throttle Flag (DTF)
+                                *  6:2  reserved
+                                *  1    Multi-bit DRAM ECC Error Flag (DMERR)
+                                *  0    Single-bit DRAM ECC Error Flag (DSERR)
+                                */
+#define X38_ERRSTS_UE          0x0002
+#define X38_ERRSTS_CE          0x0001
+#define X38_ERRSTS_BITS        (X38_ERRSTS_UE | X38_ERRSTS_CE)
+
+
+/* Intel  MMIO register space - device 0 function 0 - MMR space */
+
+#define X38_C0DRB      0x200   /* Channel 0 DRAM Rank Boundary (16b x 4)
+                                *
+                                * 15:10 reserved
+                                *  9:0  Channel 0 DRAM Rank Boundary Address
+                                */
+#define X38_C1DRB      0x600   /* Channel 1 DRAM Rank Boundary (16b x 4) */
+#define X38_DRB_MASK   0x3ff   /* bits 9:0 */
+#define X38_DRB_SHIFT 26       /* 64MiB grain */
+
+#define X38_C0ECCERRLOG 0x280  /* Channel 0 ECC Error Log (64b)
+                                *
+                                * 63:48 Error Column Address (ERRCOL)
+                                * 47:32 Error Row Address (ERRROW)
+                                * 31:29 Error Bank Address (ERRBANK)
+                                * 28:27 Error Rank Address (ERRRANK)
+                                * 26:24 reserved
+                                * 23:16 Error Syndrome (ERRSYND)
+                                * 15: 2 reserved
+                                *    1  Multiple Bit Error Status (MERRSTS)
+                                *    0  Correctable Error Status (CERRSTS)
+                                */
+#define X38_C1ECCERRLOG 0x680  /* Channel 1 ECC Error Log (64b) */
+#define X38_ECCERRLOG_CE       0x1
+#define X38_ECCERRLOG_UE       0x2
+#define X38_ECCERRLOG_RANK_BITS        0x18000000
+#define X38_ECCERRLOG_SYNDROME_BITS    0xff0000
+
+#define X38_CAPID0 0xe0        /* see P.94 of spec for details */
+
+static int x38_channel_num;
+
+static int how_many_channel(struct pci_dev *pdev)
+{
+       unsigned char capid0_8b; /* 8th byte of CAPID0 */
+
+       pci_read_config_byte(pdev, X38_CAPID0 + 8, &capid0_8b);
+       if (capid0_8b & 0x20) { /* check DCD: Dual Channel Disable */
+               debugf0("In single channel mode.\n");
+               x38_channel_num = 1;
+       } else {
+               debugf0("In dual channel mode.\n");
+               x38_channel_num = 2;
+       }
+
+       return x38_channel_num;
+}
+
+static unsigned long eccerrlog_syndrome(u64 log)
+{
+       return (log & X38_ECCERRLOG_SYNDROME_BITS) >> 16;
+}
+
+static int eccerrlog_row(int channel, u64 log)
+{
+       return ((log & X38_ECCERRLOG_RANK_BITS) >> 27) |
+               (channel * X38_RANKS_PER_CHANNEL);
+}
+
+enum x38_chips {
+       X38 = 0,
+};
+
+struct x38_dev_info {
+       const char *ctl_name;
+};
+
+struct x38_error_info {
+       u16 errsts;
+       u16 errsts2;
+       u64 eccerrlog[X38_CHANNELS];
+};
+
+static const struct x38_dev_info x38_devs[] = {
+       [X38] = {
+               .ctl_name = "x38"},
+};
+
+static struct pci_dev *mci_pdev;
+static int x38_registered = 1;
+
+
+static void x38_clear_error_info(struct mem_ctl_info *mci)
+{
+       struct pci_dev *pdev;
+
+       pdev = to_pci_dev(mci->dev);
+
+       /*
+        * Clear any error bits.
+        * (Yes, we really clear bits by writing 1 to them.)
+        */
+       pci_write_bits16(pdev, X38_ERRSTS, X38_ERRSTS_BITS,
+                        X38_ERRSTS_BITS);
+}
+
+static u64 x38_readq(const void __iomem *addr)
+{
+       return readl(addr) | (((u64)readl(addr + 4)) << 32);
+}
+
+static void x38_get_and_clear_error_info(struct mem_ctl_info *mci,
+                                struct x38_error_info *info)
+{
+       struct pci_dev *pdev;
+       void __iomem *window = mci->pvt_info;
+
+       pdev = to_pci_dev(mci->dev);
+
+       /*
+        * This is a mess because there is no atomic way to read all the
+        * registers at once and the registers can transition from CE being
+        * overwritten by UE.
+        */
+       pci_read_config_word(pdev, X38_ERRSTS, &info->errsts);
+       if (!(info->errsts & X38_ERRSTS_BITS))
+               return;
+
+       info->eccerrlog[0] = x38_readq(window + X38_C0ECCERRLOG);
+       if (x38_channel_num == 2)
+               info->eccerrlog[1] = x38_readq(window + X38_C1ECCERRLOG);
+
+       pci_read_config_word(pdev, X38_ERRSTS, &info->errsts2);
+
+       /*
+        * If the error is the same for both reads then the first set
+        * of reads is valid.  If there is a change then there is a CE
+        * with no info and the second set of reads is valid and
+        * should be UE info.
+        */
+       if ((info->errsts ^ info->errsts2) & X38_ERRSTS_BITS) {
+               info->eccerrlog[0] = x38_readq(window + X38_C0ECCERRLOG);
+               if (x38_channel_num == 2)
+                       info->eccerrlog[1] =
+                               x38_readq(window + X38_C1ECCERRLOG);
+       }
+
+       x38_clear_error_info(mci);
+}
+
+static void x38_process_error_info(struct mem_ctl_info *mci,
+                               struct x38_error_info *info)
+{
+       int channel;
+       u64 log;
+
+       if (!(info->errsts & X38_ERRSTS_BITS))
+               return;
+
+       if ((info->errsts ^ info->errsts2) & X38_ERRSTS_BITS) {
+               edac_mc_handle_ce_no_info(mci, "UE overwrote CE");
+               info->errsts = info->errsts2;
+       }
+
+       for (channel = 0; channel < x38_channel_num; channel++) {
+               log = info->eccerrlog[channel];
+               if (log & X38_ECCERRLOG_UE) {
+                       edac_mc_handle_ue(mci, 0, 0,
+                               eccerrlog_row(channel, log), "x38 UE");
+               } else if (log & X38_ECCERRLOG_CE) {
+                       edac_mc_handle_ce(mci, 0, 0,
+                               eccerrlog_syndrome(log),
+                               eccerrlog_row(channel, log), 0, "x38 CE");
+               }
+       }
+}
+
+static void x38_check(struct mem_ctl_info *mci)
+{
+       struct x38_error_info info;
+
+       debugf1("MC%d: %s()\n", mci->mc_idx, __func__);
+       x38_get_and_clear_error_info(mci, &info);
+       x38_process_error_info(mci, &info);
+}
+
+
+void __iomem *x38_map_mchbar(struct pci_dev *pdev)
+{
+       union {
+               u64 mchbar;
+               struct {
+                       u32 mchbar_low;
+                       u32 mchbar_high;
+               };
+       } u;
+       void __iomem *window;
+
+       pci_read_config_dword(pdev, X38_MCHBAR_LOW, &u.mchbar_low);
+       pci_write_config_dword(pdev, X38_MCHBAR_LOW, u.mchbar_low | 0x1);
+       pci_read_config_dword(pdev, X38_MCHBAR_HIGH, &u.mchbar_high);
+       u.mchbar &= X38_MCHBAR_MASK;
+
+       if (u.mchbar != (resource_size_t)u.mchbar) {
+               printk(KERN_ERR
+                       "x38: mmio space beyond accessible range (0x%llx)\n",
+                       (unsigned long long)u.mchbar);
+               return NULL;
+       }
+
+       window = ioremap_nocache(u.mchbar, X38_MMR_WINDOW_SIZE);
+       if (!window)
+               printk(KERN_ERR "x38: cannot map mmio space at 0x%llx\n",
+                       (unsigned long long)u.mchbar);
+
+       return window;
+}
+
+
+static void x38_get_drbs(void __iomem *window,
+                       u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL])
+{
+       int i;
+
+       for (i = 0; i < X38_RANKS_PER_CHANNEL; i++) {
+               drbs[0][i] = readw(window + X38_C0DRB + 2*i) & X38_DRB_MASK;
+               drbs[1][i] = readw(window + X38_C1DRB + 2*i) & X38_DRB_MASK;
+       }
+}
+
+static bool x38_is_stacked(struct pci_dev *pdev,
+                       u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL])
+{
+       u16 tom;
+
+       pci_read_config_word(pdev, X38_TOM, &tom);
+       tom &= X38_TOM_MASK;
+
+       return drbs[X38_CHANNELS - 1][X38_RANKS_PER_CHANNEL - 1] == tom;
+}
+
+static unsigned long drb_to_nr_pages(
+                       u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL],
+                       bool stacked, int channel, int rank)
+{
+       int n;
+
+       n = drbs[channel][rank];
+       if (rank > 0)
+               n -= drbs[channel][rank - 1];
+       if (stacked && (channel == 1) && drbs[channel][rank] ==
+                               drbs[channel][X38_RANKS_PER_CHANNEL - 1]) {
+               n -= drbs[0][X38_RANKS_PER_CHANNEL - 1];
+       }
+
+       n <<= (X38_DRB_SHIFT - PAGE_SHIFT);
+       return n;
+}
+
+static int x38_probe1(struct pci_dev *pdev, int dev_idx)
+{
+       int rc;
+       int i;
+       struct mem_ctl_info *mci = NULL;
+       unsigned long last_page;
+       u16 drbs[X38_CHANNELS][X38_RANKS_PER_CHANNEL];
+       bool stacked;
+       void __iomem *window;
+
+       debugf0("MC: %s()\n", __func__);
+
+       window = x38_map_mchbar(pdev);
+       if (!window)
+               return -ENODEV;
+
+       x38_get_drbs(window, drbs);
+
+       how_many_channel(pdev);
+
+       /* FIXME: unconventional pvt_info usage */
+       mci = edac_mc_alloc(0, X38_RANKS, x38_channel_num, 0);
+       if (!mci)
+               return -ENOMEM;
+
+       debugf3("MC: %s(): init mci\n", __func__);
+
+       mci->dev = &pdev->dev;
+       mci->mtype_cap = MEM_FLAG_DDR2;
+
+       mci->edac_ctl_cap = EDAC_FLAG_SECDED;
+       mci->edac_cap = EDAC_FLAG_SECDED;
+
+       mci->mod_name = EDAC_MOD_STR;
+       mci->mod_ver = X38_REVISION;
+       mci->ctl_name = x38_devs[dev_idx].ctl_name;
+       mci->dev_name = pci_name(pdev);
+       mci->edac_check = x38_check;
+       mci->ctl_page_to_phys = NULL;
+       mci->pvt_info = window;
+
+       stacked = x38_is_stacked(pdev, drbs);
+
+       /*
+        * The dram rank boundary (DRB) reg values are boundary addresses
+        * for each DRAM rank with a granularity of 64MB.  DRB regs are
+        * cumulative; the last one will contain the total memory
+        * contained in all ranks.
+        */
+       last_page = -1UL;
+       for (i = 0; i < mci->nr_csrows; i++) {
+               unsigned long nr_pages;
+               struct csrow_info *csrow = &mci->csrows[i];
+
+               nr_pages = drb_to_nr_pages(drbs, stacked,
+                       i / X38_RANKS_PER_CHANNEL,
+                       i % X38_RANKS_PER_CHANNEL);
+
+               if (nr_pages == 0) {
+                       csrow->mtype = MEM_EMPTY;
+                       continue;
+               }
+
+               csrow->first_page = last_page + 1;
+               last_page += nr_pages;
+               csrow->last_page = last_page;
+               csrow->nr_pages = nr_pages;
+
+               csrow->grain = nr_pages << PAGE_SHIFT;
+               csrow->mtype = MEM_DDR2;
+               csrow->dtype = DEV_UNKNOWN;
+               csrow->edac_mode = EDAC_UNKNOWN;
+       }
+
+       x38_clear_error_info(mci);
+
+       rc = -ENODEV;
+       if (edac_mc_add_mc(mci)) {
+               debugf3("MC: %s(): failed edac_mc_add_mc()\n", __func__);
+               goto fail;
+       }
+
+       /* get this far and it's successful */
+       debugf3("MC: %s(): success\n", __func__);
+       return 0;
+
+fail:
+       iounmap(window);
+       if (mci)
+               edac_mc_free(mci);
+
+       return rc;
+}
+
+static int __devinit x38_init_one(struct pci_dev *pdev,
+                               const struct pci_device_id *ent)
+{
+       int rc;
+
+       debugf0("MC: %s()\n", __func__);
+
+       if (pci_enable_device(pdev) < 0)
+               return -EIO;
+
+       rc = x38_probe1(pdev, ent->driver_data);
+       if (!mci_pdev)
+               mci_pdev = pci_dev_get(pdev);
+
+       return rc;
+}
+
+static void __devexit x38_remove_one(struct pci_dev *pdev)
+{
+       struct mem_ctl_info *mci;
+
+       debugf0("%s()\n", __func__);
+
+       mci = edac_mc_del_mc(&pdev->dev);
+       if (!mci)
+               return;
+
+       iounmap(mci->pvt_info);
+
+       edac_mc_free(mci);
+}
+
+static const struct pci_device_id x38_pci_tbl[] __devinitdata = {
+       {
+        PCI_VEND_DEV(INTEL, X38_HB), PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+        X38},
+       {
+        0,
+        }                      /* 0 terminated list. */
+};
+
+MODULE_DEVICE_TABLE(pci, x38_pci_tbl);
+
+static struct pci_driver x38_driver = {
+       .name = EDAC_MOD_STR,
+       .probe = x38_init_one,
+       .remove = __devexit_p(x38_remove_one),
+       .id_table = x38_pci_tbl,
+};
+
+static int __init x38_init(void)
+{
+       int pci_rc;
+
+       debugf3("MC: %s()\n", __func__);
+
+       /* Ensure that the OPSTATE is set correctly for POLL or NMI */
+       opstate_init();
+
+       pci_rc = pci_register_driver(&x38_driver);
+       if (pci_rc < 0)
+               goto fail0;
+
+       if (!mci_pdev) {
+               x38_registered = 0;
+               mci_pdev = pci_get_device(PCI_VENDOR_ID_INTEL,
+                                       PCI_DEVICE_ID_INTEL_X38_HB, NULL);
+               if (!mci_pdev) {
+                       debugf0("x38 pci_get_device fail\n");
+                       pci_rc = -ENODEV;
+                       goto fail1;
+               }
+
+               pci_rc = x38_init_one(mci_pdev, x38_pci_tbl);
+               if (pci_rc < 0) {
+                       debugf0("x38 init fail\n");
+                       pci_rc = -ENODEV;
+                       goto fail1;
+               }
+       }
+
+       return 0;
+
+fail1:
+       pci_unregister_driver(&x38_driver);
+
+fail0:
+       if (mci_pdev)
+               pci_dev_put(mci_pdev);
+
+       return pci_rc;
+}
+
+static void __exit x38_exit(void)
+{
+       debugf3("MC: %s()\n", __func__);
+
+       pci_unregister_driver(&x38_driver);
+       if (!x38_registered) {
+               x38_remove_one(mci_pdev);
+               pci_dev_put(mci_pdev);
+       }
+}
+
+module_init(x38_init);
+module_exit(x38_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Cluster Computing, Inc. Hitoshi Mitake");
+MODULE_DESCRIPTION("MC support for Intel X38 memory hub controllers");
+
+module_param(edac_op_state, int, 0444);
+MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI");
index 743e6f8cb20273c903d2177e9298f5d58d12fb3b..1903e7515650df961f3c23ea82c43d499808fbe2 100644 (file)
@@ -1263,6 +1263,7 @@ static const struct hid_device_id hid_blacklist[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658) },
        { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115) },
        { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_GENERIC_13BA, USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LABTEC, USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD) },
index 1a0d0dfc62fc354135e089bb5ace455595d2e451..f5474300b83a23708bdeebfb60b959d729221627 100644 (file)
@@ -48,6 +48,7 @@ err_free:
 static const struct hid_device_id dell_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658) },
        { HID_USB_DEVICE(USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_SK8115) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_GENERIC_13BA, USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE) },
        { }
 };
 MODULE_DEVICE_TABLE(hid, dell_devices);
index a0d6a6cb1842fd03a51738a379303e35c52aa1e7..5cc40429173659d05df493b17a64d9b4f163a46f 100644 (file)
 
 #define USB_VENDOR_ID_GENERAL_TOUCH    0x0dfc
 
+#define USB_VENDOR_ID_GENERIC_13BA     0x13ba
+#define USB_DEVICE_ID_GENERIC_13BA_KBD_MOUSE   0x0017
+
 #define USB_VENDOR_ID_GLAB             0x06c2
 #define USB_DEVICE_ID_4_PHIDGETSERVO_30        0x0038
 #define USB_DEVICE_ID_1_PHIDGETSERVO_30        0x0039
index 42bdd83444c1db874b259416bdf47ce81c6c3f58..18e5ddd722cd5887d71c38d2cbfbf46e20553f1a 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/mm.h>
+#include <linux/mutex.h>
 #include <linux/smp_lock.h>
 #include <linux/spinlock.h>
 #include <asm/unaligned.h>
@@ -776,21 +777,10 @@ static int usbhid_start(struct hid_device *hid)
        struct usb_interface *intf = to_usb_interface(hid->dev.parent);
        struct usb_host_interface *interface = intf->cur_altsetting;
        struct usb_device *dev = interface_to_usbdev(intf);
-       struct usbhid_device *usbhid;
+       struct usbhid_device *usbhid = hid->driver_data;
        unsigned int n, insize = 0;
        int ret;
 
-       WARN_ON(hid->driver_data);
-
-       usbhid = kzalloc(sizeof(struct usbhid_device), GFP_KERNEL);
-       if (usbhid == NULL) {
-               ret = -ENOMEM;
-               goto err;
-       }
-
-       hid->driver_data = usbhid;
-       usbhid->hid = hid;
-
        usbhid->bufsize = HID_MIN_BUFFER_SIZE;
        hid_find_max_report(hid, HID_INPUT_REPORT, &usbhid->bufsize);
        hid_find_max_report(hid, HID_OUTPUT_REPORT, &usbhid->bufsize);
@@ -804,6 +794,7 @@ static int usbhid_start(struct hid_device *hid)
        if (insize > HID_MAX_BUFFER_SIZE)
                insize = HID_MAX_BUFFER_SIZE;
 
+       mutex_lock(&usbhid->setup);
        if (hid_alloc_buffers(dev, hid)) {
                ret = -ENOMEM;
                goto fail;
@@ -888,6 +879,9 @@ static int usbhid_start(struct hid_device *hid)
        usbhid_init_reports(hid);
        hid_dump_device(hid);
 
+       set_bit(HID_STARTED, &usbhid->iofl);
+       mutex_unlock(&usbhid->setup);
+
        return 0;
 
 fail:
@@ -895,8 +889,7 @@ fail:
        usb_free_urb(usbhid->urbout);
        usb_free_urb(usbhid->urbctrl);
        hid_free_buffers(dev, hid);
-       kfree(usbhid);
-err:
+       mutex_unlock(&usbhid->setup);
        return ret;
 }
 
@@ -907,6 +900,8 @@ static void usbhid_stop(struct hid_device *hid)
        if (WARN_ON(!usbhid))
                return;
 
+       mutex_lock(&usbhid->setup);
+       clear_bit(HID_STARTED, &usbhid->iofl);
        spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
        set_bit(HID_DISCONNECTED, &usbhid->iofl);
        spin_unlock_irq(&usbhid->inlock);
@@ -931,8 +926,7 @@ static void usbhid_stop(struct hid_device *hid)
        usb_free_urb(usbhid->urbout);
 
        hid_free_buffers(hid_to_usb_dev(hid), hid);
-       kfree(usbhid);
-       hid->driver_data = NULL;
+       mutex_unlock(&usbhid->setup);
 }
 
 static struct hid_ll_driver usb_hid_driver = {
@@ -947,6 +941,7 @@ static struct hid_ll_driver usb_hid_driver = {
 static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
        struct usb_device *dev = interface_to_usbdev(intf);
+       struct usbhid_device *usbhid;
        struct hid_device *hid;
        size_t len;
        int ret;
@@ -1000,14 +995,26 @@ static int hid_probe(struct usb_interface *intf, const struct usb_device_id *id)
        if (usb_string(dev, dev->descriptor.iSerialNumber, hid->uniq, 64) <= 0)
                hid->uniq[0] = 0;
 
+       usbhid = kzalloc(sizeof(*usbhid), GFP_KERNEL);
+       if (usbhid == NULL) {
+               ret = -ENOMEM;
+               goto err;
+       }
+
+       hid->driver_data = usbhid;
+       usbhid->hid = hid;
+       mutex_init(&usbhid->setup); /* needed on suspend/resume */
+
        ret = hid_add_device(hid);
        if (ret) {
                if (ret != -ENODEV)
                        dev_err(&intf->dev, "can't add hid device: %d\n", ret);
-               goto err;
+               goto err_free;
        }
 
        return 0;
+err_free:
+       kfree(usbhid);
 err:
        hid_destroy_device(hid);
        return ret;
@@ -1016,11 +1023,14 @@ err:
 static void hid_disconnect(struct usb_interface *intf)
 {
        struct hid_device *hid = usb_get_intfdata(intf);
+       struct usbhid_device *usbhid;
 
        if (WARN_ON(!hid))
                return;
 
+       usbhid = hid->driver_data;
        hid_destroy_device(hid);
+       kfree(usbhid);
 }
 
 static int hid_suspend(struct usb_interface *intf, pm_message_t message)
@@ -1028,11 +1038,18 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message)
        struct hid_device *hid = usb_get_intfdata (intf);
        struct usbhid_device *usbhid = hid->driver_data;
 
+       mutex_lock(&usbhid->setup);
+       if (!test_bit(HID_STARTED, &usbhid->iofl)) {
+               mutex_unlock(&usbhid->setup);
+               return 0;
+       }
+
        spin_lock_irq(&usbhid->inlock); /* Sync with error handler */
        set_bit(HID_SUSPENDED, &usbhid->iofl);
        spin_unlock_irq(&usbhid->inlock);
-       del_timer(&usbhid->io_retry);
+       del_timer_sync(&usbhid->io_retry);
        usb_kill_urb(usbhid->urbin);
+       mutex_unlock(&usbhid->setup);
        dev_dbg(&intf->dev, "suspend\n");
        return 0;
 }
@@ -1043,9 +1060,16 @@ static int hid_resume(struct usb_interface *intf)
        struct usbhid_device *usbhid = hid->driver_data;
        int status;
 
+       mutex_lock(&usbhid->setup);
+       if (!test_bit(HID_STARTED, &usbhid->iofl)) {
+               mutex_unlock(&usbhid->setup);
+               return 0;
+       }
+
        clear_bit(HID_SUSPENDED, &usbhid->iofl);
        usbhid->retry_delay = 0;
        status = hid_start_in(hid);
+       mutex_unlock(&usbhid->setup);
        dev_dbg(&intf->dev, "resume status %d\n", status);
        return status;
 }
index abedb13c623e419b12b8c3cc02cef4a8a977f520..55973ff54008f36e6c2381275a1c26e08db25f47 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/types.h>
 #include <linux/slab.h>
 #include <linux/list.h>
+#include <linux/mutex.h>
 #include <linux/timer.h>
 #include <linux/wait.h>
 #include <linux/workqueue.h>
@@ -73,6 +74,7 @@ struct usbhid_device {
        dma_addr_t outbuf_dma;                                          /* Output buffer dma */
        spinlock_t outlock;                                             /* Output fifo spinlock */
 
+       struct mutex setup;
        unsigned long iofl;                                             /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */
        struct timer_list io_retry;                                     /* Retry timer */
        unsigned long stop_retry;                                       /* Time to give up, in jiffies */
index c772e02c28036a9621006e78f66cebee27fd1e41..1fac4e233133879c8b06b07045c5318d87b91840 100644 (file)
@@ -507,7 +507,7 @@ static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, struct i2c_msg *msgs, int
        unsigned long timeout;
        int ret;
 
-       if (!readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN)
+       if (!(readl(i2c->regs + S3C2410_IICCON) & S3C2410_IICCON_IRQEN))
                return -EIO;
 
        ret = s3c24xx_i2c_set_master(i2c);
index c3022a023449ec2012b7911c0be94d8f7446869b..e4c98539c51785deb5320fdc88acf9059f796fdf 100644 (file)
@@ -81,6 +81,7 @@ static struct i2c_algo_bit_data scx200_i2c_data = {
 
 static struct i2c_adapter scx200_i2c_ops = {
        .owner             = THIS_MODULE,
+       .class             = I2C_CLASS_HWMON | I2C_CLASS_SPD,
        .id                = I2C_HW_B_SCX200,
        .algo_data         = &scx200_i2c_data,
        .name   = "NatSemi SCx200 I2C",
index 2768c69257f645750adc49af10ac8f4f5c4f2b66..1f3cc512eff898af0bc3b74c878d8b862c3cbad0 100644 (file)
@@ -58,7 +58,7 @@ static void da903x_led_work(struct work_struct *work)
                offset = DA9030_LED_OFFSET(led->id);
                val = led->flags & ~0x87;
                val |= (led->new_brightness) ? 0x80 : 0; /* EN bit */
-               val |= (led->new_brightness >> 5) & 0x7; /* PWM<2:0> */
+               val |= (0x7 - (led->new_brightness >> 5)) & 0x7; /* PWM<2:0> */
                da903x_write(led->master, DA9030_LED1_CONTROL + offset, val);
                break;
        case DA9030_ID_VIBRA:
index 92dcc06832a462a3210fbd521c323abce9b43cd0..9d7b53ed75b228e05bc865571afdd424da92f483 100644 (file)
@@ -656,9 +656,10 @@ static void do_failures(struct mirror_set *ms, struct bio_list *failures)
                return;
 
        if (!ms->log_failure) {
-               while ((bio = bio_list_pop(failures)))
+               while ((bio = bio_list_pop(failures))) {
                        ms->in_sync = 0;
                        dm_rh_mark_nosync(ms->rh, bio, bio->bi_size, 0);
+               }
                return;
        }
 
index b2d9d1ac28adb4554537fd3568ae4fe52e748a41..6c96db26b87c2ac4c3dd4ba6d29f99d60c24ac17 100644 (file)
@@ -229,19 +229,21 @@ static void __insert_origin(struct origin *o)
  */
 static int register_snapshot(struct dm_snapshot *snap)
 {
-       struct origin *o;
+       struct origin *o, *new_o;
        struct block_device *bdev = snap->origin->bdev;
 
+       new_o = kmalloc(sizeof(*new_o), GFP_KERNEL);
+       if (!new_o)
+               return -ENOMEM;
+
        down_write(&_origins_lock);
        o = __lookup_origin(bdev);
 
-       if (!o) {
+       if (o)
+               kfree(new_o);
+       else {
                /* New origin */
-               o = kmalloc(sizeof(*o), GFP_KERNEL);
-               if (!o) {
-                       up_write(&_origins_lock);
-                       return -ENOMEM;
-               }
+               o = new_o;
 
                /* Initialise the struct */
                INIT_LIST_HEAD(&o->snapshots);
@@ -368,6 +370,7 @@ static struct dm_snap_pending_exception *alloc_pending_exception(struct dm_snaps
        struct dm_snap_pending_exception *pe = mempool_alloc(s->pending_pool,
                                                             GFP_NOIO);
 
+       atomic_inc(&s->pending_exceptions_count);
        pe->snap = s;
 
        return pe;
@@ -375,7 +378,11 @@ static struct dm_snap_pending_exception *alloc_pending_exception(struct dm_snaps
 
 static void free_pending_exception(struct dm_snap_pending_exception *pe)
 {
-       mempool_free(pe, pe->snap->pending_pool);
+       struct dm_snapshot *s = pe->snap;
+
+       mempool_free(pe, s->pending_pool);
+       smp_mb__before_atomic_dec();
+       atomic_dec(&s->pending_exceptions_count);
 }
 
 static void insert_completed_exception(struct dm_snapshot *s,
@@ -600,6 +607,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv)
 
        s->valid = 1;
        s->active = 0;
+       atomic_set(&s->pending_exceptions_count, 0);
        init_rwsem(&s->lock);
        spin_lock_init(&s->pe_lock);
        s->ti = ti;
@@ -726,6 +734,14 @@ static void snapshot_dtr(struct dm_target *ti)
        /* After this returns there can be no new kcopyd jobs. */
        unregister_snapshot(s);
 
+       while (atomic_read(&s->pending_exceptions_count))
+               yield();
+       /*
+        * Ensure instructions in mempool_destroy aren't reordered
+        * before atomic_read.
+        */
+       smp_mb();
+
 #ifdef CONFIG_DM_DEBUG
        for (i = 0; i < DM_TRACKED_CHUNK_HASH_SIZE; i++)
                BUG_ON(!hlist_empty(&s->tracked_chunk_hash[i]));
index f07315fe23621e706bae67ab240d2bb8d89c42d3..99c0106ede2d0e31774abdc7d1b09feb6719a37e 100644 (file)
@@ -160,6 +160,8 @@ struct dm_snapshot {
 
        mempool_t *pending_pool;
 
+       atomic_t pending_exceptions_count;
+
        struct exception_table pending;
        struct exception_table complete;
 
index b4162f6f1b79eb5844ac989a59d9084c3a3bd725..9abf6ed16535c925366eb936887f21425be7edc8 100644 (file)
@@ -3884,6 +3884,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
        if (mode == 0) {
                mdk_rdev_t *rdev;
                struct list_head *tmp;
+               struct block_device *bdev;
 
                printk(KERN_INFO "md: %s stopped.\n", mdname(mddev));
 
@@ -3940,6 +3941,12 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
                mddev->degraded = 0;
                mddev->barriers_work = 0;
                mddev->safemode = 0;
+               bdev = bdget_disk(mddev->gendisk, 0);
+               if (bdev) {
+                       blkdev_ioctl(bdev, 0, BLKRRPART, 0);
+                       bdput(bdev);
+               }
+               kobject_uevent(&disk_to_dev(mddev->gendisk)->kobj, KOBJ_CHANGE);
 
        } else if (mddev->pers)
                printk(KERN_INFO "md: %s switched to read-only mode.\n",
index 11a617ab4243bf87d9b79921de44c4ac5f57a88a..84bdc2ee69e6bc1239775e27ef263cab8ef89805 100644 (file)
@@ -567,8 +567,8 @@ static void i2o_block_biosparam(unsigned long capacity, unsigned short *cyls,
 
 /**
  *     i2o_block_open - Open the block device
- *     @inode: inode for block device being opened
- *     @file: file to open
+ *     @bdev: block device being opened
+ *     @mode: file open mode
  *
  *     Power up the device, mount and lock the media. This function is called,
  *     if the block device is opened for access.
@@ -596,8 +596,8 @@ static int i2o_block_open(struct block_device *bdev, fmode_t mode)
 
 /**
  *     i2o_block_release - Release the I2O block device
- *     @inode: inode for block device being released
- *     @file: file to close
+ *     @disk: gendisk device being released
+ *     @mode: file open mode
  *
  *     Unlock and unmount the media, and power down the device. Gets called if
  *     the block device is closed.
@@ -643,8 +643,8 @@ static int i2o_block_getgeo(struct block_device *bdev, struct hd_geometry *geo)
 
 /**
  *     i2o_block_ioctl - Issue device specific ioctl calls.
- *     @inode: inode for block device ioctl
- *     @file: file for ioctl
+ *     @bdev: block device being opened
+ *     @mode: file open mode
  *     @cmd: ioctl command
  *     @arg: arg
  *
index 08e26beefe64182f78f509343bcdbc5156d81aca..ce39fa54949ba39645d80e1af92a035bc0aa099b 100644 (file)
@@ -113,7 +113,6 @@ static int hdpu_nexus_probe(struct platform_device *pdev)
        if (!hdpu_chassis_id)
                printk(KERN_WARNING "sky_nexus: "
                       "Unable to create proc dir entry: sky_chassis_id\n");
-       }
 
        return 0;
 }
index 35ce28578075e52bb41dafd9b7e2a0f8e99ffe2d..4fc40d8e1bcc57104fb31f24513204e6330f8bf7 100644 (file)
@@ -5,14 +5,14 @@
 obj-$(CONFIG_SGI_XP)           += xp.o
 xp-y                           := xp_main.o
 xp-$(CONFIG_IA64_SGI_SN2)      += xp_sn2.o xp_nofault.o
-xp-$(CONFIG_IA64_GENERIC)      += xp_sn2.o xp_nofault.o xp_uv.o
+xp-$(CONFIG_IA64_GENERIC)      += xp_sn2.o xp_nofault.o
 xp-$(CONFIG_IA64_SGI_UV)       += xp_uv.o
 xp-$(CONFIG_X86_64)            += xp_uv.o
 
 obj-$(CONFIG_SGI_XP)           += xpc.o
 xpc-y                          := xpc_main.o xpc_channel.o xpc_partition.o
 xpc-$(CONFIG_IA64_SGI_SN2)     += xpc_sn2.o
-xpc-$(CONFIG_IA64_GENERIC)     += xpc_sn2.o xpc_uv.o
+xpc-$(CONFIG_IA64_GENERIC)     += xpc_sn2.o
 xpc-$(CONFIG_IA64_SGI_UV)      += xpc_uv.o
 xpc-$(CONFIG_X86_64)           += xpc_uv.o
 
index 859a5281c61b95aca896675cfa497403885aee84..ed1722e50049ff2aea256edbb574bb9969cb3bda 100644 (file)
 #include <asm/system.h>
 #include <asm/sn/arch.h>       /* defines is_shub1() and is_shub2() */
 #define is_shub()      ia64_platform_is("sn2")
+#ifdef CONFIG_IA64_SGI_UV
 #define is_uv()                ia64_platform_is("uv")
+#else
+#define is_uv()                0
+#endif
 #endif
 #ifdef CONFIG_X86_64
 #include <asm/genapic.h>
index 46325fc848114cb5c87658f3095dff0371b43370..e8d5cfbd32c21946238c92b0517f8c2aca6827b7 100644 (file)
@@ -1104,7 +1104,7 @@ xpc_do_exit(enum xp_retval reason)
 
        if (is_shub())
                xpc_exit_sn2();
-       else
+       else if (is_uv())
                xpc_exit_uv();
 }
 
@@ -1363,7 +1363,7 @@ out_2:
 out_1:
        if (is_shub())
                xpc_exit_sn2();
-       else
+       else if (is_uv())
                xpc_exit_uv();
        return ret;
 }
index 5a97d3a9d745ee3ab5d17e5e1b86bce5a9fae132..f483c4221f7602cb80022699e98008c5e2d33d79 100644 (file)
@@ -2315,8 +2315,10 @@ end:
  */
 static int sony_pic_disable(struct acpi_device *device)
 {
-       if (ACPI_FAILURE(acpi_evaluate_object(device->handle,
-                       "_DIS", NULL, NULL)))
+       acpi_status ret = acpi_evaluate_object(device->handle, "_DIS", NULL,
+                                              NULL);
+
+       if (ACPI_FAILURE(ret) && ret != AE_NOT_FOUND)
                return -ENXIO;
 
        dprintk("Device disabled\n");
index 696cf3647ceb3e61c6a9f41bf5ffae889c11ffef..2fadf323c696d381f1fe23fb062e108c1e97a59f 100644 (file)
@@ -391,6 +391,7 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)
 static void mmci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 {
        struct mmci_host *host = mmc_priv(mmc);
+       unsigned long flags;
 
        WARN_ON(host->mrq != NULL);
 
@@ -402,7 +403,7 @@ static void mmci_request(struct mmc_host *mmc, struct mmc_request *mrq)
                return;
        }
 
-       spin_lock_irq(&host->lock);
+       spin_lock_irqsave(&host->lock, flags);
 
        host->mrq = mrq;
 
@@ -411,7 +412,7 @@ static void mmci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 
        mmci_start_command(host, mrq->cmd, 0);
 
-       spin_unlock_irq(&host->lock);
+       spin_unlock_irqrestore(&host->lock, flags);
 }
 
 static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
index c54967f7942ae2ed2f2fd40601a86f8e85d9c125..07a6697e3635608466a00a41d5139281d8eef686 100644 (file)
@@ -644,10 +644,6 @@ This function frees the  transmiter and receiver descriptor rings.
 */
 static void amd8111e_free_ring(struct amd8111e_priv* lp)
 {
-
-       /* Free transmit and receive skbs */
-       amd8111e_free_skbs(lp->amd8111e_net_dev);
-
        /* Free transmit and receive descriptor rings */
        if(lp->rx_ring){
                pci_free_consistent(lp->pci_dev,
@@ -833,12 +829,14 @@ static int amd8111e_rx_poll(struct napi_struct *napi, int budget)
 
        } while(intr0 & RINT0);
 
-       /* Receive descriptor is empty now */
-       spin_lock_irqsave(&lp->lock, flags);
-       __netif_rx_complete(dev, napi);
-       writel(VAL0|RINTEN0, mmio + INTEN0);
-       writel(VAL2 | RDMD0, mmio + CMD0);
-       spin_unlock_irqrestore(&lp->lock, flags);
+       if (rx_pkt_limit > 0) {
+               /* Receive descriptor is empty now */
+               spin_lock_irqsave(&lp->lock, flags);
+               __netif_rx_complete(dev, napi);
+               writel(VAL0|RINTEN0, mmio + INTEN0);
+               writel(VAL2 | RDMD0, mmio + CMD0);
+               spin_unlock_irqrestore(&lp->lock, flags);
+       }
 
 rx_not_empty:
        return num_rx_pkt;
@@ -1231,7 +1229,9 @@ static int amd8111e_close(struct net_device * dev)
 
        amd8111e_disable_interrupt(lp);
        amd8111e_stop_chip(lp);
-       amd8111e_free_ring(lp);
+
+       /* Free transmit and receive skbs */
+       amd8111e_free_skbs(lp->amd8111e_net_dev);
 
        netif_carrier_off(lp->amd8111e_net_dev);
 
@@ -1241,6 +1241,7 @@ static int amd8111e_close(struct net_device * dev)
 
        spin_unlock_irq(&lp->lock);
        free_irq(dev->irq, dev);
+       amd8111e_free_ring(lp);
 
        /* Update the statistics before closing */
        amd8111e_get_stats(dev);
index 0fa53464efb29c8cca393d004e8aaf861f08d93b..6f431a887e7e5fb4f2b6ca27217f204a3d063291 100644 (file)
@@ -1080,7 +1080,8 @@ static int __init at91ether_setup(unsigned long phy_type, unsigned short phy_add
                init_timer(&lp->check_timer);
                lp->check_timer.data = (unsigned long)dev;
                lp->check_timer.function = at91ether_check_link;
-       }
+       } else if (lp->board_data.phy_irq_pin >= 32)
+               gpio_request(lp->board_data.phy_irq_pin, "ethernet_phy");
 
        /* Display ethernet banner */
        printk(KERN_INFO "%s: AT91 ethernet at 0x%08x int=%d %s%s (%s)\n",
@@ -1167,6 +1168,9 @@ static int __devexit at91ether_remove(struct platform_device *pdev)
        struct net_device *dev = platform_get_drvdata(pdev);
        struct at91_private *lp = netdev_priv(dev);
 
+       if (lp->board_data.phy_irq_pin >= 32)
+               gpio_free(lp->board_data.phy_irq_pin);
+
        unregister_netdev(dev);
        free_irq(dev->irq, dev);
        dma_free_coherent(NULL, sizeof(struct recv_desc_bufs), lp->dlist, (dma_addr_t)lp->dlist_phys);
index 3cf59a7f5a1c898def96b55f08888baf20a9743a..246d92b426360b37865352d0d6133e71415770b4 100644 (file)
@@ -2310,7 +2310,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
                if (tpd != ptpd)
                        memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
                tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
-               tpd->word2 = (cpu_to_le16(buffer_info->length) &
+               tpd->word2 &= ~(TPD_BUFLEN_MASK << TPD_BUFLEN_SHIFT);
+               tpd->word2 |= (cpu_to_le16(buffer_info->length) &
                        TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
 
                /*
@@ -2409,8 +2410,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
                vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
                        ((vlan_tag >> 9) & 0x8);
                ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
-               ptpd->word3 |= (vlan_tag & TPD_VL_TAGGED_MASK) <<
-                       TPD_VL_TAGGED_SHIFT;
+               ptpd->word2 |= (vlan_tag & TPD_VLANTAG_MASK) <<
+                       TPD_VLANTAG_SHIFT;
        }
 
        tso = atl1_tso(adapter, skb, ptpd);
index a5015b14a42969849968e9edb2a246b09cbc00fa..ffa73fc8d95e6eca471ee18ec73986653bb492b3 100644 (file)
@@ -504,7 +504,7 @@ struct rx_free_desc {
 #define TPD_PKTNT_MASK         0x0001
 #define TPD_PKTINT_SHIFT       15
 #define TPD_VLANTAG_MASK       0xFFFF
-#define TPD_VLAN_SHIFT         16
+#define TPD_VLANTAG_SHIFT      16
 
 /* tpd word 3 bits 0:13 */
 #define TPD_EOP_MASK           0x0001
index ade5f3f6693bef27e4d006d2b370ace1956339af..87437c788476ab8a05df31a0f7fd1887ffeef497 100644 (file)
@@ -169,11 +169,14 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_
        /* clear slave from tx_hashtbl */
        tx_hash_table = BOND_ALB_INFO(bond).tx_hashtbl;
 
-       index = SLAVE_TLB_INFO(slave).head;
-       while (index != TLB_NULL_INDEX) {
-               u32 next_index = tx_hash_table[index].next;
-               tlb_init_table_entry(&tx_hash_table[index], save_load);
-               index = next_index;
+       /* skip this if we've already freed the tx hash table */
+       if (tx_hash_table) {
+               index = SLAVE_TLB_INFO(slave).head;
+               while (index != TLB_NULL_INDEX) {
+                       u32 next_index = tx_hash_table[index].next;
+                       tlb_init_table_entry(&tx_hash_table[index], save_load);
+                       index = next_index;
+               }
        }
 
        tlb_init_slave(slave);
index 832739f38db4cd43adef5cb922430f2b86fb9ceb..a3efba59eee98daa96aeae7dd1278865a31c6db6 100644 (file)
@@ -1979,6 +1979,20 @@ void bond_destroy(struct bonding *bond)
        unregister_netdevice(bond->dev);
 }
 
+static void bond_destructor(struct net_device *bond_dev)
+{
+       struct bonding *bond = bond_dev->priv;
+
+       if (bond->wq)
+               destroy_workqueue(bond->wq);
+
+       netif_addr_lock_bh(bond_dev);
+       bond_mc_list_destroy(bond);
+       netif_addr_unlock_bh(bond_dev);
+
+       free_netdev(bond_dev);
+}
+
 /*
 * First release a slave and than destroy the bond if no more slaves iare left.
 * Must be under rtnl_lock when this function is called.
@@ -2376,6 +2390,9 @@ static void bond_miimon_commit(struct bonding *bond)
                        continue;
 
                case BOND_LINK_DOWN:
+                       if (slave->link_failure_count < UINT_MAX)
+                               slave->link_failure_count++;
+
                        slave->link = BOND_LINK_DOWN;
 
                        if (bond->params.mode == BOND_MODE_ACTIVEBACKUP ||
@@ -4550,7 +4567,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
 
        bond_set_mode_ops(bond, bond->params.mode);
 
-       bond_dev->destructor = free_netdev;
+       bond_dev->destructor = bond_destructor;
 
        /* Initialize the device options */
        bond_dev->tx_queue_len = 0;
@@ -4589,20 +4606,6 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
        return 0;
 }
 
-/* De-initialize device specific data.
- * Caller must hold rtnl_lock.
- */
-static void bond_deinit(struct net_device *bond_dev)
-{
-       struct bonding *bond = bond_dev->priv;
-
-       list_del(&bond->bond_list);
-
-#ifdef CONFIG_PROC_FS
-       bond_remove_proc_entry(bond);
-#endif
-}
-
 static void bond_work_cancel_all(struct bonding *bond)
 {
        write_lock_bh(&bond->lock);
@@ -4624,6 +4627,22 @@ static void bond_work_cancel_all(struct bonding *bond)
                cancel_delayed_work(&bond->ad_work);
 }
 
+/* De-initialize device specific data.
+ * Caller must hold rtnl_lock.
+ */
+static void bond_deinit(struct net_device *bond_dev)
+{
+       struct bonding *bond = bond_dev->priv;
+
+       list_del(&bond->bond_list);
+
+       bond_work_cancel_all(bond);
+
+#ifdef CONFIG_PROC_FS
+       bond_remove_proc_entry(bond);
+#endif
+}
+
 /* Unregister and free all bond devices.
  * Caller must hold rtnl_lock.
  */
@@ -4635,9 +4654,6 @@ static void bond_free_all(void)
                struct net_device *bond_dev = bond->dev;
 
                bond_work_cancel_all(bond);
-               netif_addr_lock_bh(bond_dev);
-               bond_mc_list_destroy(bond);
-               netif_addr_unlock_bh(bond_dev);
                /* Release the bonded slaves */
                bond_release_all(bond_dev);
                bond_destroy(bond);
index 82dd1a891ce71aa7c88b8509a45d186f6f86d084..002d918fb4c742fc4a66af17a1d427e19959cbe0 100644 (file)
@@ -40,7 +40,7 @@
 #include <asm/io.h>
 
 #define DRV_NAME       "ehea"
-#define DRV_VERSION    "EHEA_0094"
+#define DRV_VERSION    "EHEA_0095"
 
 /* eHEA capability flags */
 #define DLPAR_PORT_ADD_REM 1
index 9b61dc9865d19039ef5fb0c0dced4a7b5a7b5aeb..9d006878f0459db1dfe30c079639638ae2025fcf 100644 (file)
@@ -632,10 +632,13 @@ static void ehea_rebuild_busmap(void)
        }
 }
 
-static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add)
+static int ehea_update_busmap(unsigned long pfn, unsigned long nr_pages, int add)
 {
        unsigned long i, start_section, end_section;
 
+       if (!nr_pages)
+               return 0;
+
        if (!ehea_bmap) {
                ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL);
                if (!ehea_bmap)
@@ -643,7 +646,7 @@ static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add)
        }
 
        start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE;
-       end_section = start_section + ((pgnum * PAGE_SIZE) / EHEA_SECTSIZE);
+       end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE);
        /* Mark entries as valid or invalid only; address is assigned later */
        for (i = start_section; i < end_section; i++) {
                u64 flag;
@@ -692,10 +695,54 @@ int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages)
        return ret;
 }
 
-static int ehea_create_busmap_callback(unsigned long pfn,
-                                      unsigned long nr_pages, void *arg)
+static int ehea_is_hugepage(unsigned long pfn)
+{
+       int page_order;
+
+       if (pfn & EHEA_HUGEPAGE_PFN_MASK)
+               return 0;
+
+       page_order = compound_order(pfn_to_page(pfn));
+       if (page_order + PAGE_SHIFT != EHEA_HUGEPAGESHIFT)
+               return 0;
+
+       return 1;
+}
+
+static int ehea_create_busmap_callback(unsigned long initial_pfn,
+                                      unsigned long total_nr_pages, void *arg)
 {
-       return ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_ADD_SECT);
+       int ret;
+       unsigned long pfn, start_pfn, end_pfn, nr_pages;
+
+       if ((total_nr_pages * PAGE_SIZE) < EHEA_HUGEPAGE_SIZE)
+               return ehea_update_busmap(initial_pfn, total_nr_pages,
+                                         EHEA_BUSMAP_ADD_SECT);
+
+       /* Given chunk is >= 16GB -> check for hugepages */
+       start_pfn = initial_pfn;
+       end_pfn = initial_pfn + total_nr_pages;
+       pfn = start_pfn;
+
+       while (pfn < end_pfn) {
+               if (ehea_is_hugepage(pfn)) {
+                       /* Add mem found in front of the hugepage */
+                       nr_pages = pfn - start_pfn;
+                       ret = ehea_update_busmap(start_pfn, nr_pages,
+                                                EHEA_BUSMAP_ADD_SECT);
+                       if (ret)
+                               return ret;
+
+                       /* Skip the hugepage */
+                       pfn += (EHEA_HUGEPAGE_SIZE / PAGE_SIZE);
+                       start_pfn = pfn;
+               } else
+                       pfn += (EHEA_SECTSIZE / PAGE_SIZE);
+       }
+
+       /* Add mem found behind the hugepage(s)  */
+       nr_pages = pfn - start_pfn;
+       return ehea_update_busmap(start_pfn, nr_pages, EHEA_BUSMAP_ADD_SECT);
 }
 
 int ehea_create_busmap(void)
index 1e58dc06b7d2cbd6d811b11534fa78025b9eb0a6..0817c1e74a1960470a1823dfdeb45f0087f309bc 100644 (file)
@@ -40,6 +40,9 @@
 #define EHEA_PAGESIZE          (1UL << EHEA_PAGESHIFT)
 #define EHEA_SECTSIZE          (1UL << 24)
 #define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT)
+#define EHEA_HUGEPAGESHIFT     34
+#define EHEA_HUGEPAGE_SIZE     (1UL << EHEA_HUGEPAGESHIFT)
+#define EHEA_HUGEPAGE_PFN_MASK ((EHEA_HUGEPAGE_SIZE - 1) >> PAGE_SHIFT)
 
 #if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE)
 #error eHEA module cannot work if kernel sectionsize < ehea sectionsize
index 64b201134fdb85e5f93248644fecfaf7e91969fc..83a5cb6aa23b1fc5c4426a9863303be6bb10dad3 100644 (file)
@@ -586,6 +586,18 @@ static void gfar_configure_serdes(struct net_device *dev)
        struct gfar_mii __iomem *regs =
                        (void __iomem *)&priv->regs->gfar_mii_regs;
        int tbipa = gfar_read(&priv->regs->tbipa);
+       struct mii_bus *bus = gfar_get_miibus(priv);
+
+       if (bus)
+               mutex_lock(&bus->mdio_lock);
+
+       /* If the link is already up, we must already be ok, and don't need to
+        * configure and reset the TBI<->SerDes link.  Maybe U-Boot configured
+        * everything for us?  Resetting it takes the link down and requires
+        * several seconds for it to come back.
+        */
+       if (gfar_local_mdio_read(regs, tbipa, MII_BMSR) & BMSR_LSTATUS)
+               goto done;
 
        /* Single clk mode, mii mode off(for serdes communication) */
        gfar_local_mdio_write(regs, tbipa, MII_TBICON, TBICON_CLK_SELECT);
@@ -596,6 +608,10 @@ static void gfar_configure_serdes(struct net_device *dev)
 
        gfar_local_mdio_write(regs, tbipa, MII_BMCR, BMCR_ANENABLE |
                        BMCR_ANRESTART | BMCR_FULLDPLX | BMCR_SPEED1000);
+
+       done:
+       if (bus)
+               mutex_unlock(&bus->mdio_lock);
 }
 
 static void init_registers(struct net_device *dev)
index bf73eea980101183d521d46c4f6c6c7227abf862..0e2595d24933cd8f6549153782d87010672ee2d7 100644 (file)
@@ -269,6 +269,27 @@ static struct device_driver gianfar_mdio_driver = {
        .remove = gfar_mdio_remove,
 };
 
+static int match_mdio_bus(struct device *dev, void *data)
+{
+       const struct gfar_private *priv = data;
+       const struct platform_device *pdev = to_platform_device(dev);
+
+       return !strcmp(pdev->name, gianfar_mdio_driver.name) &&
+               pdev->id == priv->einfo->mdio_bus;
+}
+
+/* Given a gfar_priv structure, find the mii_bus controlled by this device (not
+ * necessarily the same as the bus the gfar's PHY is on), if one exists.
+ * Normally only the first gianfar controls a mii_bus.  */
+struct mii_bus *gfar_get_miibus(const struct gfar_private *priv)
+{
+       /*const*/ struct device *d;
+
+       d = bus_find_device(gianfar_mdio_driver.bus, NULL, (void *)priv,
+                           match_mdio_bus);
+       return d ? dev_get_drvdata(d) : NULL;
+}
+
 int __init gfar_mdio_init(void)
 {
        return driver_register(&gianfar_mdio_driver);
index 2af28b16a0e278054d11f4cf5873bf76b222e932..02dc970ca1ffb25e79c63c6205a46c0fceafdcfa 100644 (file)
@@ -18,6 +18,8 @@
 #ifndef __GIANFAR_MII_H
 #define __GIANFAR_MII_H
 
+struct gfar_private; /* forward ref */
+
 #define MIIMIND_BUSY            0x00000001
 #define MIIMIND_NOTVALID        0x00000004
 
@@ -44,6 +46,7 @@ int gfar_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value);
 int gfar_local_mdio_write(struct gfar_mii __iomem *regs, int mii_id,
                          int regnum, u16 value);
 int gfar_local_mdio_read(struct gfar_mii __iomem *regs, int mii_id, int regnum);
+struct mii_bus *gfar_get_miibus(const struct gfar_private *priv);
 int __init gfar_mdio_init(void);
 void gfar_mdio_exit(void);
 #endif /* GIANFAR_PHY_H */
index 2ee2622258f587c40196a8917ba78dcf6952b397..901212aa37cbf7a55be095d372b47865d9ebb1df 100644 (file)
@@ -2605,7 +2605,7 @@ static int __devinit emac_init_config(struct emac_instance *dev)
                    of_device_is_compatible(np, "ibm,emac-440gr"))
                        dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX;
                if (of_device_is_compatible(np, "ibm,emac-405ez")) {
-#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CONTROL
+#ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL
                        dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x;
 #else
                        printk(KERN_ERR "%s: Flow control not disabled!\n",
index 1b0eebf84f76e43432c75ca9d0c09635ecbfa00a..4b9794e97a79fdcfac53ace0654305bd43381d7c 100644 (file)
@@ -35,7 +35,6 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/netdevice.h>
-#include <linux/cpumask.h>
 
 #include <linux/mlx4/driver.h>
 #include <linux/mlx4/device.h>
index be09fdb79cb892c8dbf9842d0aee639fe33bfe3a..cee199ceba2f06f6a2c1e82e170668d2743e2530 100644 (file)
@@ -360,9 +360,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
 #define QUERY_PORT_ETH_MTU_OFFSET              0x02
 #define QUERY_PORT_WIDTH_OFFSET                        0x06
 #define QUERY_PORT_MAX_GID_PKEY_OFFSET         0x07
-#define QUERY_PORT_MAC_OFFSET                  0x08
 #define QUERY_PORT_MAX_MACVLAN_OFFSET          0x0a
 #define QUERY_PORT_MAX_VL_OFFSET               0x0b
+#define QUERY_PORT_MAC_OFFSET                  0x10
 
                for (i = 1; i <= dev_cap->num_ports; ++i) {
                        err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT,
index b1556b2e404c5619b445f6a287a07adc6503ee01..a5f428bcc0ebb28011efb551534584e768c4a6e9 100644 (file)
@@ -75,7 +75,7 @@
 #include "myri10ge_mcp.h"
 #include "myri10ge_mcp_gen_header.h"
 
-#define MYRI10GE_VERSION_STR "1.4.3-1.371"
+#define MYRI10GE_VERSION_STR "1.4.3-1.375"
 
 MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
 MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -1393,6 +1393,7 @@ myri10ge_tx_done(struct myri10ge_slice_state *ss, int mcp_index)
                if (tx->req == tx->done) {
                        tx->queue_active = 0;
                        put_be32(htonl(1), tx->send_stop);
+                       mmiowb();
                }
                __netif_tx_unlock(dev_queue);
        }
@@ -2864,6 +2865,7 @@ again:
        if ((mgp->dev->real_num_tx_queues > 1) && tx->queue_active == 0) {
                tx->queue_active = 1;
                put_be32(htonl(1), tx->send_go);
+               mmiowb();
        }
        tx->pkt_start++;
        if ((avail - count) < MXGEFW_MAX_SEND_DESC) {
index fc6f4b8c64b35cc169ab228c9c130b6ed0a4c821..b646e92134dc79a6bbfe6e55f7c80fd0ea19d3f1 100644 (file)
@@ -399,11 +399,11 @@ static int pppoe_rcv(struct sk_buff *skb,
        if (skb->len < len)
                goto drop;
 
-       po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
-       if (!po)
+       if (pskb_trim_rcsum(skb, len))
                goto drop;
 
-       if (pskb_trim_rcsum(skb, len))
+       po = get_item(ph->sid, eth_hdr(skb)->h_source, dev->ifindex);
+       if (!po)
                goto drop;
 
        return sk_receive_skb(sk_pppox(po), skb, 0);
index c70870e0fd613d8292f9ccdc34494487342a6307..6f9895d4e5bdf3016b5930d8b6716a81bf714ed7 100644 (file)
@@ -2060,7 +2060,6 @@ static int smc_request_attrib(struct platform_device *pdev,
                              struct net_device *ndev)
 {
        struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
-       struct smc_local *lp = netdev_priv(ndev);
 
        if (!res)
                return 0;
@@ -2075,7 +2074,6 @@ static void smc_release_attrib(struct platform_device *pdev,
                               struct net_device *ndev)
 {
        struct resource * res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "smc91x-attrib");
-       struct smc_local *lp = netdev_priv(ndev);
 
        if (res)
                release_mem_region(res->start, ATTRIB_SIZE);
index 8e46a513a252a8fecf48629e064a6f220bc7c100..c91852f49a48e015cfc6056d337607087263f837 100644 (file)
@@ -420,9 +420,13 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
        /* Allocate Tx/Rx descriptor memory */
        db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) *
                        DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr);
+       if (!db->desc_pool_ptr)
+               goto err_out_res;
 
        db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC *
                        TX_DESC_CNT + 4, &db->buf_pool_dma_ptr);
+       if (!db->buf_pool_ptr)
+               goto err_out_free_desc;
 
        db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr;
        db->first_tx_desc_dma = db->desc_pool_dma_ptr;
@@ -469,7 +473,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
 
        err = register_netdev (dev);
        if (err)
-               goto err_out_res;
+               goto err_out_free_buf;
 
        printk(KERN_INFO "%s: Davicom DM%04lx at pci%s, "
               "%s, irq %d.\n",
@@ -483,6 +487,12 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev,
 
        return 0;
 
+err_out_free_buf:
+       pci_free_consistent(pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4,
+                           db->buf_pool_ptr, db->buf_pool_dma_ptr);
+err_out_free_desc:
+       pci_free_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20,
+                           db->desc_pool_ptr, db->desc_pool_dma_ptr);
 err_out_res:
        pci_release_regions(pdev);
 err_out_disable:
index 78df2be8a728761cbefe1086ef59e6c7f1f59caf..db3377dae9d5f99156cf569008ca8795dc598fed 100644 (file)
@@ -396,6 +396,20 @@ static void dm9601_set_multicast(struct net_device *net)
        dm_write_reg_async(dev, DM_RX_CTRL, rx_ctl);
 }
 
+static int dm9601_set_mac_address(struct net_device *net, void *p)
+{
+       struct sockaddr *addr = p;
+       struct usbnet *dev = netdev_priv(net);
+
+       if (!is_valid_ether_addr(addr->sa_data))
+               return -EINVAL;
+
+       memcpy(net->dev_addr, addr->sa_data, net->addr_len);
+       dm_write_async(dev, DM_PHY_ADDR, net->addr_len, net->dev_addr);
+
+       return 0;
+}
+
 static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
 {
        int ret;
@@ -406,6 +420,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf)
 
        dev->net->do_ioctl = dm9601_ioctl;
        dev->net->set_multicast_list = dm9601_set_multicast;
+       dev->net->set_mac_address = dm9601_set_mac_address;
        dev->net->ethtool_ops = &dm9601_ethtool_ops;
        dev->net->hard_header_len += DM_TX_OVERHEAD;
        dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
index 2dced383bcfb8a3f93ef4cfc69569f40105cdba5..3590ea5a902da1d6619cf62207fc071fa1e4e35b 100644 (file)
@@ -521,7 +521,7 @@ static void __devexit velocity_remove1(struct pci_dev *pdev)
  *     we don't duplicate code for each option.
  */
 
-static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, char *devname)
+static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, const char *devname)
 {
        if (val == -1)
                *opt = def;
@@ -550,7 +550,7 @@ static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max,
  *     we don't duplicate code for each option.
  */
 
-static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, char *devname)
+static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, const char *devname)
 {
        (*opt) &= (~flag);
        if (val == -1)
@@ -576,7 +576,7 @@ static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 fla
  *     for the current device
  */
 
-static void __devinit velocity_get_options(struct velocity_opt *opts, int index, char *devname)
+static void __devinit velocity_get_options(struct velocity_opt *opts, int index, const char *devname)
 {
 
        velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname);
@@ -863,6 +863,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
        static int first = 1;
        struct net_device *dev;
        int i;
+       const char *drv_string;
        const struct velocity_info_tbl *info = &chip_info_table[ent->driver_data];
        struct velocity_info *vptr;
        struct mac_regs __iomem * regs;
@@ -935,7 +936,9 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi
                dev->dev_addr[i] = readb(&regs->PAR[i]);
 
 
-       velocity_get_options(&vptr->options, velocity_nics, dev->name);
+       drv_string = dev_driver_string(&pdev->dev);
+
+       velocity_get_options(&vptr->options, velocity_nics, drv_string);
 
        /*
         *      Mask out the options cannot be set to the chip
index 327d58589e12885f6aba7792168706b88fc5abce..6e92f7b44b1aa6d315d84898ce6a990b96ed3a0a 100644 (file)
@@ -756,10 +756,11 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb)
        case CISCO_ADDR_REQ:
                /* Stolen from net/ipv4/devinet.c -- SIOCGIFADDR ioctl */
                {
-               struct in_device *in_dev;
-               struct in_ifaddr *ifa;
                __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */
 #ifdef CONFIG_INET
+               struct in_device *in_dev;
+               struct in_ifaddr *ifa;
+
                rcu_read_lock();
                if ((in_dev = __in_dev_get_rcu(dev)) != NULL)
                {
index ccd9cd35ecbe9e7f82ca370739415add9e4026b3..5bf7e01ef0e9fe3c408408e24dc8e43a772f6161 100644 (file)
@@ -695,7 +695,6 @@ EXPORT_SYMBOL(z8530_nop);
  *     z8530_interrupt - Handle an interrupt from a Z8530
  *     @irq:   Interrupt number
  *     @dev_id: The Z8530 device that is interrupting.
- *     @regs: unused
  *
  *     A Z85[2]30 device has stuck its hand in the air for attention.
  *     We scan both the channels on the chip for events and then call
index 0f1d6bdd51a268f4b28ec1e79bc2c93e8fb84810..9e47d727e2206ff28c647f648bb29caf4888057d 100644 (file)
@@ -661,8 +661,7 @@ ath5k_pci_resume(struct pci_dev *pdev)
 {
        struct ieee80211_hw *hw = pci_get_drvdata(pdev);
        struct ath5k_softc *sc = hw->priv;
-       struct ath5k_hw *ah = sc->ah;
-       int i, err;
+       int err;
 
        pci_restore_state(pdev);
 
@@ -688,16 +687,6 @@ ath5k_pci_resume(struct pci_dev *pdev)
                goto err_irq;
        ath5k_led_enable(sc);
 
-       /*
-        * Reset the key cache since some parts do not
-        * reset the contents on initial power up or resume.
-        *
-        * FIXME: This may need to be revisited when mac80211 becomes
-        *        aware of suspend/resume.
-        */
-       for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
-               ath5k_hw_reset_key(ah, i);
-
        return 0;
 err_irq:
        free_irq(pdev->irq, sc);
@@ -718,7 +707,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
        struct ath5k_softc *sc = hw->priv;
        struct ath5k_hw *ah = sc->ah;
        u8 mac[ETH_ALEN];
-       unsigned int i;
        int ret;
 
        ATH5K_DBG(sc, ATH5K_DEBUG_ANY, "devid 0x%x\n", pdev->device);
@@ -736,13 +724,6 @@ ath5k_attach(struct pci_dev *pdev, struct ieee80211_hw *hw)
        if (ret > 0)
                __set_bit(ATH_STAT_MRRETRY, sc->status);
 
-       /*
-        * Reset the key cache since some parts do not
-        * reset the contents on initial power up.
-        */
-       for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
-               ath5k_hw_reset_key(ah, i);
-
        /*
         * Collect the channel list.  The 802.11 layer
         * is resposible for filtering this list based
@@ -2202,7 +2183,8 @@ ath5k_beacon_config(struct ath5k_softc *sc)
 static int
 ath5k_init(struct ath5k_softc *sc, bool is_resume)
 {
-       int ret;
+       struct ath5k_hw *ah = sc->ah;
+       int ret, i;
 
        mutex_lock(&sc->lock);
 
@@ -2235,10 +2217,17 @@ ath5k_init(struct ath5k_softc *sc, bool is_resume)
        if (ret)
                goto done;
 
+       /*
+        * Reset the key cache since some parts do not reset the
+        * contents on initial power up or resume from suspend.
+        */
+       for (i = 0; i < AR5K_KEYTABLE_SIZE; i++)
+               ath5k_hw_reset_key(ah, i);
+
        __set_bit(ATH_STAT_STARTED, sc->status);
 
        /* Set ack to be sent at low bit-rates */
-       ath5k_hw_set_ack_bitrate_high(sc->ah, false);
+       ath5k_hw_set_ack_bitrate_high(ah, false);
 
        mod_timer(&sc->calib_tim, round_jiffies(jiffies +
                        msecs_to_jiffies(ath5k_calinterval * 1000)));
@@ -2953,10 +2942,8 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
                sc->opmode != NL80211_IFTYPE_MESH_POINT &&
                test_bit(ATH_STAT_PROMISC, sc->status))
                rfilt |= AR5K_RX_FILTER_PROM;
-       if (sc->opmode == NL80211_IFTYPE_STATION ||
-               sc->opmode == NL80211_IFTYPE_ADHOC) {
+       if (sc->opmode == NL80211_IFTYPE_ADHOC)
                rfilt |= AR5K_RX_FILTER_BEACON;
-       }
 
        /* Set filters */
        ath5k_hw_set_rx_filter(ah,rfilt);
index 8f92d670f614caddf75ad3a3d1dc221f0870db8d..19980cbd5d5fe6292367733c9423faffe735aaae 100644 (file)
@@ -339,7 +339,7 @@ static struct {
        { ATH5K_DEBUG_BEACON,   "beacon",       "beacon handling" },
        { ATH5K_DEBUG_CALIBRATE, "calib",       "periodic calibration" },
        { ATH5K_DEBUG_TXPOWER,  "txpower",      "transmit power setting" },
-       { ATH5K_DEBUG_LED,      "led",          "LED mamagement" },
+       { ATH5K_DEBUG_LED,      "led",          "LED management" },
        { ATH5K_DEBUG_DUMP_RX,  "dumprx",       "print received skb content" },
        { ATH5K_DEBUG_DUMP_TX,  "dumptx",       "print transmit skb content" },
        { ATH5K_DEBUG_DUMPBANDS, "dumpbands",   "dump bands" },
index ea2e1a20b499d9cb696c7b1ea57c450d428f3f74..ceaa6c475c0615bb786cf52bb7c0f1838ee557c9 100644 (file)
@@ -806,6 +806,8 @@ static const struct ath5k_ini_mode ar5212_rf5111_ini_mode_end[] = {
                { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 } },
        { AR5K_PHY(642),
                { 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788, 0xd03e6788 } },
+       { 0xa228,
+               { 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5, 0x000001b5 } },
        { 0xa23c,
                { 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af, 0x13c889af } },
 };
index 8f1886834e61fba8fe2bd5a7554b978b68717dd0..1b6d45b6772db39c269752e1b5bbef4e328d6389 100644 (file)
@@ -537,9 +537,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
                mdelay(1);
 
                /*
-                * Write some more initial register settings
+                * Write some more initial register settings for revised chips
                 */
-               if (ah->ah_version == AR5K_AR5212) {
+               if (ah->ah_version == AR5K_AR5212 &&
+                   ah->ah_phy_revision > 0x41) {
                        ath5k_hw_reg_write(ah, 0x0002a002, 0x982c);
 
                        if (channel->hw_value == CHANNEL_G)
@@ -558,19 +559,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
                        else
                                ath5k_hw_reg_write(ah, 0x00000000, 0x994c);
 
-                       /* Some bits are disabled here, we know nothing about
-                        * register 0xa228 yet, most of the times this ends up
-                        * with a value 0x9b5 -haven't seen any dump with
-                        * a different value- */
-                       /* Got this from decompiling binary HAL */
-                       data = ath5k_hw_reg_read(ah, 0xa228);
-                       data &= 0xfffffdff;
-                       ath5k_hw_reg_write(ah, data, 0xa228);
-
-                       data = ath5k_hw_reg_read(ah, 0xa228);
-                       data &= 0xfffe03ff;
-                       ath5k_hw_reg_write(ah, data, 0xa228);
-                       data = 0;
+                       /* Got this from legacy-hal */
+                       AR5K_REG_DISABLE_BITS(ah, 0xa228, 0x200);
+
+                       AR5K_REG_MASKED_BITS(ah, 0xa228, 0x800, 0xfffe03ff);
 
                        /* Just write 0x9b5 ? */
                        /* ath5k_hw_reg_write(ah, 0x000009b5, 0xa228); */
index 24a1aeb6448ffa91b3efcaa2c02194996b57a73d..321dbc8c034a9d608fff552fc90cafc3c1480777 100644 (file)
@@ -2090,7 +2090,6 @@ static void iwl_alive_start(struct iwl_priv *priv)
                iwl4965_error_recovery(priv);
 
        iwl_power_update_mode(priv, 1);
-       ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
 
        if (test_and_clear_bit(STATUS_MODE_PENDING, &priv->status))
                iwl4965_set_mode(priv, priv->iw_mode);
@@ -2342,6 +2341,7 @@ static void iwl_bg_alive_start(struct work_struct *data)
        mutex_lock(&priv->mutex);
        iwl_alive_start(priv);
        mutex_unlock(&priv->mutex);
+       ieee80211_notify_mac(priv->hw, IEEE80211_NOTIFY_RE_ASSOC);
 }
 
 static void iwl4965_bg_rf_kill(struct work_struct *work)
index 297696de2da0554543f86cf1a50be458cba82b2b..8265c7d25edcb9cbe51478e00828d93e8a26000c 100644 (file)
@@ -605,9 +605,9 @@ int lbs_get_tx_power(struct lbs_private *priv, s16 *curlevel, s16 *minlevel,
        if (ret == 0) {
                *curlevel = le16_to_cpu(cmd.curlevel);
                if (minlevel)
-                       *minlevel = le16_to_cpu(cmd.minlevel);
+                       *minlevel = cmd.minlevel;
                if (maxlevel)
-                       *maxlevel = le16_to_cpu(cmd.maxlevel);
+                       *maxlevel = cmd.maxlevel;
        }
 
        lbs_deb_leave(LBS_DEB_CMD);
index 8f66903641b92c8bff65b6913ef341626c39f8cc..22c4c611052147ef3c2e1b3d01f1d64026ad9bec 100644 (file)
@@ -598,8 +598,8 @@ static int lbs_process_bss(struct bss_descriptor *bss,
 
                switch (elem->id) {
                case MFIE_TYPE_SSID:
-                       bss->ssid_len = elem->len;
-                       memcpy(bss->ssid, elem->data, elem->len);
+                       bss->ssid_len = min_t(int, 32, elem->len);
+                       memcpy(bss->ssid, elem->data, bss->ssid_len);
                        lbs_deb_scan("got SSID IE: '%s', len %u\n",
                                     escape_essid(bss->ssid, bss->ssid_len),
                                     bss->ssid_len);
index 2d022f83774c6be9fc77d2485c6bd564e2203271..827ca0384a4ca220151a048528964ffcbf172ee3 100644 (file)
@@ -319,7 +319,7 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
        void *tmp;
        int err;
        u8 *end = (u8 *)eeprom + len;
-       u16 synth;
+       u16 synth = 0;
        DECLARE_MAC_BUF(mac);
 
        wrap = (struct eeprom_pda_wrap *) eeprom;
@@ -422,7 +422,8 @@ static int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
                entry = (void *)entry + (entry_len + 1)*2;
        }
 
-       if (!priv->iq_autocal || !priv->output_limit || !priv->curve_data) {
+       if (!synth || !priv->iq_autocal || !priv->output_limit ||
+           !priv->curve_data) {
                printk(KERN_ERR "p54: not all required entries found in eeprom!\n");
                err = -EINVAL;
                goto err;
index 1c2a02a741afee395eb39eb44e2918c647537c2f..88b3cad8b65e0c72b18bcde9d02c2dc11f2f0b97 100644 (file)
@@ -346,68 +346,6 @@ static void p54p_tx(struct ieee80211_hw *dev, struct p54_control_hdr *data,
                printk(KERN_INFO "%s: tx overflow.\n", wiphy_name(dev->wiphy));
 }
 
-static int p54p_open(struct ieee80211_hw *dev)
-{
-       struct p54p_priv *priv = dev->priv;
-       int err;
-
-       init_completion(&priv->boot_comp);
-       err = request_irq(priv->pdev->irq, &p54p_interrupt,
-                         IRQF_SHARED, "p54pci", dev);
-       if (err) {
-               printk(KERN_ERR "%s: failed to register IRQ handler\n",
-                      wiphy_name(dev->wiphy));
-               return err;
-       }
-
-       memset(priv->ring_control, 0, sizeof(*priv->ring_control));
-       err = p54p_upload_firmware(dev);
-       if (err) {
-               free_irq(priv->pdev->irq, dev);
-               return err;
-       }
-       priv->rx_idx_data = priv->tx_idx_data = 0;
-       priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0;
-
-       p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data,
-               ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data);
-
-       p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt,
-               ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt);
-
-       P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
-       P54P_READ(ring_control_base);
-       wmb();
-       udelay(10);
-
-       P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT));
-       P54P_READ(int_enable);
-       wmb();
-       udelay(10);
-
-       P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
-       P54P_READ(dev_int);
-
-       if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
-               printk(KERN_ERR "%s: Cannot boot firmware!\n",
-                      wiphy_name(dev->wiphy));
-               free_irq(priv->pdev->irq, dev);
-               return -ETIMEDOUT;
-       }
-
-       P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));
-       P54P_READ(int_enable);
-       wmb();
-       udelay(10);
-
-       P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE));
-       P54P_READ(dev_int);
-       wmb();
-       udelay(10);
-
-       return 0;
-}
-
 static void p54p_stop(struct ieee80211_hw *dev)
 {
        struct p54p_priv *priv = dev->priv;
@@ -474,6 +412,68 @@ static void p54p_stop(struct ieee80211_hw *dev)
        memset(ring_control, 0, sizeof(*ring_control));
 }
 
+static int p54p_open(struct ieee80211_hw *dev)
+{
+       struct p54p_priv *priv = dev->priv;
+       int err;
+
+       init_completion(&priv->boot_comp);
+       err = request_irq(priv->pdev->irq, &p54p_interrupt,
+                         IRQF_SHARED, "p54pci", dev);
+       if (err) {
+               printk(KERN_ERR "%s: failed to register IRQ handler\n",
+                      wiphy_name(dev->wiphy));
+               return err;
+       }
+
+       memset(priv->ring_control, 0, sizeof(*priv->ring_control));
+       err = p54p_upload_firmware(dev);
+       if (err) {
+               free_irq(priv->pdev->irq, dev);
+               return err;
+       }
+       priv->rx_idx_data = priv->tx_idx_data = 0;
+       priv->rx_idx_mgmt = priv->tx_idx_mgmt = 0;
+
+       p54p_refill_rx_ring(dev, 0, priv->ring_control->rx_data,
+               ARRAY_SIZE(priv->ring_control->rx_data), priv->rx_buf_data);
+
+       p54p_refill_rx_ring(dev, 2, priv->ring_control->rx_mgmt,
+               ARRAY_SIZE(priv->ring_control->rx_mgmt), priv->rx_buf_mgmt);
+
+       P54P_WRITE(ring_control_base, cpu_to_le32(priv->ring_control_dma));
+       P54P_READ(ring_control_base);
+       wmb();
+       udelay(10);
+
+       P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_INIT));
+       P54P_READ(int_enable);
+       wmb();
+       udelay(10);
+
+       P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_RESET));
+       P54P_READ(dev_int);
+
+       if (!wait_for_completion_interruptible_timeout(&priv->boot_comp, HZ)) {
+               printk(KERN_ERR "%s: Cannot boot firmware!\n",
+                      wiphy_name(dev->wiphy));
+               p54p_stop(dev);
+               return -ETIMEDOUT;
+       }
+
+       P54P_WRITE(int_enable, cpu_to_le32(ISL38XX_INT_IDENT_UPDATE));
+       P54P_READ(int_enable);
+       wmb();
+       udelay(10);
+
+       P54P_WRITE(dev_int, cpu_to_le32(ISL38XX_DEV_INT_UPDATE));
+       P54P_READ(dev_int);
+       wmb();
+       udelay(10);
+
+       return 0;
+}
+
 static int __devinit p54p_probe(struct pci_dev *pdev,
                                const struct pci_device_id *id)
 {
@@ -556,11 +556,13 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
        spin_lock_init(&priv->lock);
        tasklet_init(&priv->rx_tasklet, p54p_rx_tasklet, (unsigned long)dev);
 
-       p54p_open(dev);
+       err = p54p_open(dev);
+       if (err)
+               goto err_free_common;
        err = p54_read_eeprom(dev);
        p54p_stop(dev);
        if (err)
-               goto err_free_desc;
+               goto err_free_common;
 
        err = ieee80211_register_hw(dev);
        if (err) {
@@ -573,8 +575,6 @@ static int __devinit p54p_probe(struct pci_dev *pdev,
 
  err_free_common:
        p54_free_common(dev);
-
- err_free_desc:
        pci_free_consistent(pdev, sizeof(*priv->ring_control),
                            priv->ring_control, priv->ring_control_dma);
 
index f839ce044afd80a90b065afd11359d87761ddf4e..95511ac2247054de571fa2aeb896ba10936681eb 100644 (file)
@@ -1,5 +1,5 @@
 menuconfig RT2X00
-       bool "Ralink driver support"
+       tristate "Ralink driver support"
        depends on MAC80211 && WLAN_80211 && EXPERIMENTAL
        ---help---
          This will enable the experimental support for the Ralink drivers,
index b1899e9c1f6573091309b71b68ec017e9ab53599..0cd5fbc7f2c2390eb31f260d2f5b71838389445f 100644 (file)
@@ -112,7 +112,7 @@ static int parport_probe(struct pcmcia_device *link)
 
     link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
     link->io.Attributes2 = IO_DATA_PATH_WIDTH_8;
-    link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
+    link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
     link->irq.IRQInfo1 = IRQ_LEVEL_ID;
     link->conf.Attributes = CONF_ENABLE_IRQ;
     link->conf.IntType = INT_MEMORY_AND_IO;
index 96cf8ecd04ce7b40ea60fc9e1a077607a8c46d77..bbf66ea8fd87b4cbe11029dd8ac2aa826ea1fedc 100644 (file)
@@ -43,20 +43,6 @@ static void __devinit quirk_mellanox_tavor(struct pci_dev *dev)
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR,quirk_mellanox_tavor);
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_MELLANOX,PCI_DEVICE_ID_MELLANOX_TAVOR_BRIDGE,quirk_mellanox_tavor);
 
-/* Many VIA bridges seem to corrupt data for DAC. Disable it here */
-int forbid_dac __read_mostly;
-EXPORT_SYMBOL(forbid_dac);
-
-static __devinit void via_no_dac(struct pci_dev *dev)
-{
-       if ((dev->class >> 8) == PCI_CLASS_BRIDGE_PCI && forbid_dac == 0) {
-               dev_info(&dev->dev,
-                       "VIA PCI bridge detected. Disabling DAC.\n");
-               forbid_dac = 1;
-       }
-}
-DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_ANY_ID, via_no_dac);
-
 /* Deal with broken BIOS'es that neglect to enable passive release,
    which can cause problems in combination with the 82441FX/PPro MTRRs */
 static void quirk_passive_release(struct pci_dev *dev)
index afea2b2558b5d63d3af6fe04f230011a66fdd415..76d4a98f09559b9a78d3f4335a1961b9de11eb6e 100644 (file)
@@ -693,8 +693,9 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
        type = 0;
        if (s->functions > 1)           /* All of this ought to be handled higher up */
                type = IRQF_SHARED;
-       if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)
+       else if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)
                type = IRQF_SHARED;
+       else printk(KERN_WARNING "pcmcia: Driver needs updating to support IRQ sharing.\n");
 
 #ifdef CONFIG_PCMCIA_PROBE
 
index 3688e339db8762ea976c0052f59ab7d51ac7c260..773b29cec8beb768b0ed576afb07a57b9695c3c4 100644 (file)
@@ -79,6 +79,11 @@ struct da903x_regulator_info {
        int     enable_bit;
 };
 
+static inline struct device *to_da903x_dev(struct regulator_dev *rdev)
+{
+       return rdev_get_dev(rdev)->parent->parent;
+}
+
 static inline int check_range(struct da903x_regulator_info *info,
                                int min_uV, int max_uV)
 {
@@ -93,7 +98,7 @@ static int da903x_set_ldo_voltage(struct regulator_dev *rdev,
                                  int min_uV, int max_uV)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da9034_dev = rdev_get_dev(rdev)->parent;
+       struct device *da9034_dev = to_da903x_dev(rdev);
        uint8_t val, mask;
 
        if (check_range(info, min_uV, max_uV)) {
@@ -111,7 +116,7 @@ static int da903x_set_ldo_voltage(struct regulator_dev *rdev,
 static int da903x_get_voltage(struct regulator_dev *rdev)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da9034_dev = rdev_get_dev(rdev)->parent;
+       struct device *da9034_dev = to_da903x_dev(rdev);
        uint8_t val, mask;
        int ret;
 
@@ -128,7 +133,7 @@ static int da903x_get_voltage(struct regulator_dev *rdev)
 static int da903x_enable(struct regulator_dev *rdev)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da9034_dev = rdev_get_dev(rdev)->parent;
+       struct device *da9034_dev = to_da903x_dev(rdev);
 
        return da903x_set_bits(da9034_dev, info->enable_reg,
                                        1 << info->enable_bit);
@@ -137,7 +142,7 @@ static int da903x_enable(struct regulator_dev *rdev)
 static int da903x_disable(struct regulator_dev *rdev)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da9034_dev = rdev_get_dev(rdev)->parent;
+       struct device *da9034_dev = to_da903x_dev(rdev);
 
        return da903x_clr_bits(da9034_dev, info->enable_reg,
                                        1 << info->enable_bit);
@@ -146,7 +151,7 @@ static int da903x_disable(struct regulator_dev *rdev)
 static int da903x_is_enabled(struct regulator_dev *rdev)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da9034_dev = rdev_get_dev(rdev)->parent;
+       struct device *da9034_dev = to_da903x_dev(rdev);
        uint8_t reg_val;
        int ret;
 
@@ -162,7 +167,7 @@ static int da9030_set_ldo1_15_voltage(struct regulator_dev *rdev,
                                       int min_uV, int max_uV)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da903x_dev = rdev_get_dev(rdev)->parent;
+       struct device *da903x_dev = to_da903x_dev(rdev);
        uint8_t val, mask;
        int ret;
 
@@ -189,7 +194,7 @@ static int da9030_set_ldo14_voltage(struct regulator_dev *rdev,
                                  int min_uV, int max_uV)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da903x_dev = rdev_get_dev(rdev)->parent;
+       struct device *da903x_dev = to_da903x_dev(rdev);
        uint8_t val, mask;
        int thresh;
 
@@ -215,7 +220,7 @@ static int da9030_set_ldo14_voltage(struct regulator_dev *rdev,
 static int da9030_get_ldo14_voltage(struct regulator_dev *rdev)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da903x_dev = rdev_get_dev(rdev)->parent;
+       struct device *da903x_dev = to_da903x_dev(rdev);
        uint8_t val, mask;
        int ret;
 
@@ -238,7 +243,7 @@ static int da9034_set_dvc_voltage(struct regulator_dev *rdev,
                                  int min_uV, int max_uV)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da9034_dev = rdev_get_dev(rdev)->parent;
+       struct device *da9034_dev = to_da903x_dev(rdev);
        uint8_t val, mask;
        int ret;
 
@@ -264,7 +269,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev,
                                    int min_uV, int max_uV)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da9034_dev = rdev_get_dev(rdev)->parent;
+       struct device *da9034_dev = to_da903x_dev(rdev);
        uint8_t val, mask;
 
        if (check_range(info, min_uV, max_uV)) {
@@ -283,7 +288,7 @@ static int da9034_set_ldo12_voltage(struct regulator_dev *rdev,
 static int da9034_get_ldo12_voltage(struct regulator_dev *rdev)
 {
        struct da903x_regulator_info *info = rdev_get_drvdata(rdev);
-       struct device *da9034_dev = rdev_get_dev(rdev)->parent;
+       struct device *da9034_dev = to_da903x_dev(rdev);
        uint8_t val, mask;
        int ret;
 
@@ -466,7 +471,7 @@ static int __devinit da903x_regulator_probe(struct platform_device *pdev)
        if (ri->desc.id == DA9030_ID_LDO1 || ri->desc.id == DA9030_ID_LDO15)
                ri->desc.ops = &da9030_regulator_ldo1_15_ops;
 
-       rdev = regulator_register(&ri->desc, pdev->dev.parent, ri);
+       rdev = regulator_register(&ri->desc, &pdev->dev, ri);
        if (IS_ERR(rdev)) {
                dev_err(&pdev->dev, "failed to register regulator %s\n",
                                ri->desc.name);
index 37d131d03f33c19ad17d744ac3d1106ea2067641..45e5b106af7373f40ea01286cafe4f48d82ca2ee 100644 (file)
@@ -189,7 +189,7 @@ static const struct rtc_class_ops ds3234_rtc_ops = {
        .set_time       = ds3234_set_time,
 };
 
-static int ds3234_probe(struct spi_device *spi)
+static int __devinit ds3234_probe(struct spi_device *spi)
 {
        struct rtc_device *rtc;
        unsigned char tmp;
@@ -249,7 +249,7 @@ static int ds3234_probe(struct spi_device *spi)
        return 0;
 }
 
-static int __exit ds3234_remove(struct spi_device *spi)
+static int __devexit ds3234_remove(struct spi_device *spi)
 {
        struct ds3234 *chip = platform_get_drvdata(spi);
        struct rtc_device *rtc = chip->rtc;
index 910bc704939c2c77c7448149819d5284dfe64a67..f59277bbedaa2923a7b4f35127d9fdf9b3b3b309 100644 (file)
@@ -455,6 +455,8 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev)
 
        s3c_rtc_setfreq(&pdev->dev, 1);
 
+       device_init_wakeup(&pdev->dev, 1);
+
        /* register RTC and exit */
 
        rtc = rtc_device_register("s3c", &pdev->dev, &s3c_rtcops,
@@ -507,7 +509,7 @@ static int s3c_rtc_resume(struct platform_device *pdev)
 #define s3c_rtc_resume  NULL
 #endif
 
-static struct platform_driver s3c2410_rtcdrv = {
+static struct platform_driver s3c2410_rtc_driver = {
        .probe          = s3c_rtc_probe,
        .remove         = __devexit_p(s3c_rtc_remove),
        .suspend        = s3c_rtc_suspend,
@@ -523,12 +525,12 @@ static char __initdata banner[] = "S3C24XX RTC, (c) 2004,2006 Simtec Electronics
 static int __init s3c_rtc_init(void)
 {
        printk(banner);
-       return platform_driver_register(&s3c2410_rtcdrv);
+       return platform_driver_register(&s3c2410_rtc_driver);
 }
 
 static void __exit s3c_rtc_exit(void)
 {
-       platform_driver_unregister(&s3c2410_rtcdrv);
+       platform_driver_unregister(&s3c2410_rtc_driver);
 }
 
 module_init(s3c_rtc_init);
index 7de410d5be4a8cd95dfc9fd4a61e7aadb5432800..52d26592c72c1a03ee640710d148d3aa44a1b781 100644 (file)
@@ -3025,7 +3025,7 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb,
        struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill,
        int offset)
 {
-       int length = skb->len - offset;
+       int length = skb->len;
        int length_here;
        int element;
        char *data;
@@ -3037,6 +3037,7 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb,
 
        if (offset >= 0) {
                data = skb->data + offset;
+               length -= offset;
                first_lap = 0;
        }
 
index 955ba7a31b90606dcdaa5309d781a2a27983e2a0..1b1e80336d2c516deffc59eff87e08b9e03706cf 100644 (file)
@@ -373,8 +373,6 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode)
        QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
 
        qeth_set_allowed_threads(card, 0, 1);
-       if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD))
-               return -ERESTARTSYS;
        if (card->read.state == CH_STATE_UP &&
            card->write.state == CH_STATE_UP &&
            (card->state == CARD_STATE_UP)) {
@@ -451,12 +449,15 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card,
                        netif_rx(skb);
                        break;
                case QETH_HEADER_TYPE_OSN:
-                       skb_push(skb, sizeof(struct qeth_hdr));
-                       skb_copy_to_linear_data(skb, hdr,
+                       if (card->info.type == QETH_CARD_TYPE_OSN) {
+                               skb_push(skb, sizeof(struct qeth_hdr));
+                               skb_copy_to_linear_data(skb, hdr,
                                                sizeof(struct qeth_hdr));
-                       len = skb->len;
-                       card->osn_info.data_cb(skb);
-                       break;
+                               len = skb->len;
+                               card->osn_info.data_cb(skb);
+                               break;
+                       }
+                       /* else unknown */
                default:
                        dev_kfree_skb_any(skb);
                        QETH_DBF_TEXT(TRACE, 3, "inbunkno");
@@ -975,12 +976,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode)
        QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
 
        qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
-       if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
-               PRINT_WARN("set_online of card %s interrupted by user!\n",
-                          CARD_BUS_ID(card));
-               return -ERESTARTSYS;
-       }
-
        recover_flag = card->state;
        rc = ccw_device_set_online(CARD_RDEV(card));
        if (rc) {
@@ -1091,11 +1086,7 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev,
        if (card->dev && netif_carrier_ok(card->dev))
                netif_carrier_off(card->dev);
        recover_flag = card->state;
-       if (qeth_l2_stop_card(card, recovery_mode) == -ERESTARTSYS) {
-               PRINT_WARN("Stopping card %s interrupted by user!\n",
-                          CARD_BUS_ID(card));
-               return -ERESTARTSYS;
-       }
+       qeth_l2_stop_card(card, recovery_mode);
        rc  = ccw_device_set_offline(CARD_DDEV(card));
        rc2 = ccw_device_set_offline(CARD_WDEV(card));
        rc3 = ccw_device_set_offline(CARD_RDEV(card));
index 99547dea44de1997eb91fd31690af0ffec89f8d9..ed59fedd5922398746d4def415268f369217dc1b 100644 (file)
@@ -2064,8 +2064,6 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
        QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
 
        qeth_set_allowed_threads(card, 0, 1);
-       if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD))
-               return -ERESTARTSYS;
        if (card->read.state == CH_STATE_UP &&
            card->write.state == CH_STATE_UP &&
            (card->state == CARD_STATE_UP)) {
@@ -3049,11 +3047,6 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode)
        QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *));
 
        qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1);
-       if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) {
-               PRINT_WARN("set_online of card %s interrupted by user!\n",
-                          CARD_BUS_ID(card));
-               return -ERESTARTSYS;
-       }
 
        recover_flag = card->state;
        rc = ccw_device_set_online(CARD_RDEV(card));
@@ -3170,11 +3163,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev,
        if (card->dev && netif_carrier_ok(card->dev))
                netif_carrier_off(card->dev);
        recover_flag = card->state;
-       if (qeth_l3_stop_card(card, recovery_mode) == -ERESTARTSYS) {
-               PRINT_WARN("Stopping card %s interrupted by user!\n",
-                          CARD_BUS_ID(card));
-               return -ERESTARTSYS;
-       }
+       qeth_l3_stop_card(card, recovery_mode);
        rc  = ccw_device_set_offline(CARD_DDEV(card));
        rc2 = ccw_device_set_offline(CARD_WDEV(card));
        rc3 = ccw_device_set_offline(CARD_RDEV(card));
index 210ddb639748171c81a87e2b05ed59df12c431ea..c144b9924d52861d57d84e04733a8e11c43bb4d0 100644 (file)
@@ -121,9 +121,6 @@ static ssize_t qeth_l3_dev_route6_show(struct device *dev,
        if (!card)
                return -EINVAL;
 
-       if (!qeth_is_supported(card, IPA_IPV6))
-               return sprintf(buf, "%s\n", "n/a");
-
        return qeth_l3_dev_route_show(card, &card->options.route6, buf);
 }
 
@@ -135,10 +132,6 @@ static ssize_t qeth_l3_dev_route6_store(struct device *dev,
        if (!card)
                return -EINVAL;
 
-       if (!qeth_is_supported(card, IPA_IPV6)) {
-               return -EOPNOTSUPP;
-       }
-
        return qeth_l3_dev_route_store(card, &card->options.route6,
                                QETH_PROT_IPV6, buf, count);
 }
index c33bcb284df7d465051d8682a16447e16eb40bdf..56f4e6bffc213529ce0d9866223a7d958ab6e92b 100644 (file)
 #include <scsi/scsi_ioctl.h>
 #include "fdomain.h"
 
+#ifndef PCMCIA
 MODULE_AUTHOR("Rickard E. Faith");
 MODULE_DESCRIPTION("Future domain SCSI driver");
 MODULE_LICENSE("GPL");
+#endif
 
   
 #define VERSION          "$Revision: 5.51 $"
index c94d3c4b75211448aabc65651c296819a6dc52bf..579d63a81aa21d27e783dd28eb776723e1b0b111 100644 (file)
@@ -1276,7 +1276,7 @@ config SERIAL_SGI_IOC3
          say Y or M.  Otherwise, say N.
 
 config SERIAL_NETX
-       bool "NetX serial port support"
+       tristate "NetX serial port support"
        depends on ARM && ARCH_NETX
        select SERIAL_CORE
        help
@@ -1288,7 +1288,7 @@ config SERIAL_NETX
 
 config SERIAL_NETX_CONSOLE
        bool "Console on NetX serial port"
-       depends on SERIAL_NETX
+       depends on SERIAL_NETX=y
        select SERIAL_CORE_CONSOLE
        help
          If you have enabled the serial port on the Hilscher NetX SoC
index 3f489329e8d3b45f11a453330bdf65e663ed2dbd..3e5dda8518b71eb6872c2a2bdb998e475c7581da 100644 (file)
@@ -42,8 +42,6 @@
 #define SERIAL_NX_MAJOR        204
 #define MINOR_START    170
 
-#ifdef CONFIG_SERIAL_NETX_CONSOLE
-
 enum uart_regs {
        UART_DR              = 0x00,
        UART_SR              = 0x04,
@@ -528,6 +526,8 @@ static struct netx_port netx_ports[] = {
        }
 };
 
+#ifdef CONFIG_SERIAL_NETX_CONSOLE
+
 static void netx_console_putchar(struct uart_port *port, int ch)
 {
        while (readl(port->membase + UART_FR) & FR_BUSY);
index 543811f6e6e834beb0ba3e26fdfa687403f16ced..8e74657f106c01d152c8e5244e75100bdd94f682 100644 (file)
@@ -133,7 +133,7 @@ static int usbtmc_release(struct inode *inode, struct file *file)
 
 static int usbtmc_ioctl_abort_bulk_in(struct usbtmc_device_data *data)
 {
-       char *buffer;
+       u8 *buffer;
        struct device *dev;
        int rv;
        int n;
index fc9018e72a0979718293e8918422fb5f02dd5c36..e1b42626d04d6c7cdd200d86cd8b0d28a6af47ec 100644 (file)
@@ -106,6 +106,9 @@ static DEFINE_SPINLOCK(hcd_root_hub_lock);
 /* used when updating an endpoint's URB list */
 static DEFINE_SPINLOCK(hcd_urb_list_lock);
 
+/* used to protect against unlinking URBs after the device is gone */
+static DEFINE_SPINLOCK(hcd_urb_unlink_lock);
+
 /* wait queue for synchronous unlinks */
 DECLARE_WAIT_QUEUE_HEAD(usb_kill_urb_queue);
 
@@ -1376,10 +1379,25 @@ static int unlink1(struct usb_hcd *hcd, struct urb *urb, int status)
 int usb_hcd_unlink_urb (struct urb *urb, int status)
 {
        struct usb_hcd          *hcd;
-       int                     retval;
+       int                     retval = -EIDRM;
+       unsigned long           flags;
 
-       hcd = bus_to_hcd(urb->dev->bus);
-       retval = unlink1(hcd, urb, status);
+       /* Prevent the device and bus from going away while
+        * the unlink is carried out.  If they are already gone
+        * then urb->use_count must be 0, since disconnected
+        * devices can't have any active URBs.
+        */
+       spin_lock_irqsave(&hcd_urb_unlink_lock, flags);
+       if (atomic_read(&urb->use_count) > 0) {
+               retval = 0;
+               usb_get_dev(urb->dev);
+       }
+       spin_unlock_irqrestore(&hcd_urb_unlink_lock, flags);
+       if (retval == 0) {
+               hcd = bus_to_hcd(urb->dev->bus);
+               retval = unlink1(hcd, urb, status);
+               usb_put_dev(urb->dev);
+       }
 
        if (retval == 0)
                retval = -EINPROGRESS;
@@ -1528,6 +1546,17 @@ void usb_hcd_disable_endpoint(struct usb_device *udev,
                hcd->driver->endpoint_disable(hcd, ep);
 }
 
+/* Protect against drivers that try to unlink URBs after the device
+ * is gone, by waiting until all unlinks for @udev are finished.
+ * Since we don't currently track URBs by device, simply wait until
+ * nothing is running in the locked region of usb_hcd_unlink_urb().
+ */
+void usb_hcd_synchronize_unlinks(struct usb_device *udev)
+{
+       spin_lock_irq(&hcd_urb_unlink_lock);
+       spin_unlock_irq(&hcd_urb_unlink_lock);
+}
+
 /*-------------------------------------------------------------------------*/
 
 /* called in any context */
index 2dcde61c465e0176d44a418cfdc038666556579c..9465e70f4dd0b478aa1318ac1e232a0f8eb29973 100644 (file)
@@ -232,6 +232,7 @@ extern void usb_hcd_flush_endpoint(struct usb_device *udev,
                struct usb_host_endpoint *ep);
 extern void usb_hcd_disable_endpoint(struct usb_device *udev,
                struct usb_host_endpoint *ep);
+extern void usb_hcd_synchronize_unlinks(struct usb_device *udev);
 extern int usb_hcd_get_frame_number(struct usb_device *udev);
 
 extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver,
index 9b3f16bd12cb4508a51a63d936a527b02b152475..b19cbfcd51da1bd53b500fd4ab3320c3108d8073 100644 (file)
@@ -659,6 +659,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
                        PREPARE_DELAYED_WORK(&hub->init_work, hub_init_func2);
                        schedule_delayed_work(&hub->init_work,
                                        msecs_to_jiffies(delay));
+
+                       /* Suppress autosuspend until init is done */
+                       to_usb_interface(hub->intfdev)->pm_usage_cnt = 1;
                        return;         /* Continues at init2: below */
                } else {
                        hub_power_on(hub, true);
@@ -1429,6 +1432,7 @@ void usb_disconnect(struct usb_device **pdev)
         */
        dev_dbg (&udev->dev, "unregistering device\n");
        usb_disable_device(udev, 0);
+       usb_hcd_synchronize_unlinks(udev);
 
        usb_unlock_device(udev);
 
index f2638009a4648414892179c3fae7d105f73d4c03..4342bd9c3bb610d9582217aae0bc524378a28a7f 100644 (file)
@@ -474,6 +474,12 @@ EXPORT_SYMBOL_GPL(usb_submit_urb);
  * indicating that the request has been canceled (rather than any other
  * code).
  *
+ * Drivers should not call this routine or related routines, such as
+ * usb_kill_urb() or usb_unlink_anchored_urbs(), after their disconnect
+ * method has returned.  The disconnect function should synchronize with
+ * a driver's I/O routines to insure that all URB-related activity has
+ * completed before it returns.
+ *
  * This request is always asynchronous.  Success is indicated by
  * returning -EINPROGRESS, at which time the URB will probably not yet
  * have been given back to the device driver.  When it is eventually
@@ -550,6 +556,9 @@ EXPORT_SYMBOL_GPL(usb_unlink_urb);
  * This routine may not be used in an interrupt context (such as a bottom
  * half or a completion handler), or when holding a spinlock, or in other
  * situations where the caller can't schedule().
+ *
+ * This routine should not be called by a driver after its disconnect
+ * method has returned.
  */
 void usb_kill_urb(struct urb *urb)
 {
@@ -588,6 +597,9 @@ EXPORT_SYMBOL_GPL(usb_kill_urb);
  * This routine may not be used in an interrupt context (such as a bottom
  * half or a completion handler), or when holding a spinlock, or in other
  * situations where the caller can't schedule().
+ *
+ * This routine should not be called by a driver after its disconnect
+ * method has returned.
  */
 void usb_poison_urb(struct urb *urb)
 {
@@ -622,6 +634,9 @@ EXPORT_SYMBOL_GPL(usb_unpoison_urb);
  *
  * this allows all outstanding URBs to be killed starting
  * from the back of the queue
+ *
+ * This routine should not be called by a driver after its disconnect
+ * method has returned.
  */
 void usb_kill_anchored_urbs(struct usb_anchor *anchor)
 {
@@ -651,6 +666,9 @@ EXPORT_SYMBOL_GPL(usb_kill_anchored_urbs);
  * this allows all outstanding URBs to be poisoned starting
  * from the back of the queue. Newly added URBs will also be
  * poisoned
+ *
+ * This routine should not be called by a driver after its disconnect
+ * method has returned.
  */
 void usb_poison_anchored_urbs(struct usb_anchor *anchor)
 {
@@ -672,6 +690,7 @@ void usb_poison_anchored_urbs(struct usb_anchor *anchor)
        spin_unlock_irq(&anchor->lock);
 }
 EXPORT_SYMBOL_GPL(usb_poison_anchored_urbs);
+
 /**
  * usb_unlink_anchored_urbs - asynchronously cancel transfer requests en masse
  * @anchor: anchor the requests are bound to
@@ -680,6 +699,9 @@ EXPORT_SYMBOL_GPL(usb_poison_anchored_urbs);
  * from the back of the queue. This function is asynchronous.
  * The unlinking is just tiggered. It may happen after this
  * function has returned.
+ *
+ * This routine should not be called by a driver after its disconnect
+ * method has returned.
  */
 void usb_unlink_anchored_urbs(struct usb_anchor *anchor)
 {
index 8be3f39891c71c705c61a8a3d95ff53e3289300b..794b5ffe4397bcfd84f38c3d7affaebac6be77af 100644 (file)
@@ -281,6 +281,7 @@ static void serial_close(struct tty_struct *tty, struct file *filp)
                        if (tty->driver_data)
                                tty->driver_data = NULL;
                        tty_port_tty_set(&port->port, NULL);
+                       tty_kref_put(tty);
                }
        }
 
index a2b9ebbef38e98142ff7c3f0666ac3eba101d169..fb9e20e624c1477f909c6ec4825dc7e6d22ebe50 100644 (file)
@@ -333,6 +333,13 @@ UNUSUAL_DEV(  0x0482, 0x0103, 0x0100, 0x0100,
                "Finecam S5",
                US_SC_DEVICE, US_PR_DEVICE, NULL, US_FL_FIX_INQUIRY),
 
+/* Patch submitted by Jens Taprogge <jens.taprogge@taprogge.org> */
+UNUSUAL_DEV(  0x0482, 0x0107, 0x0100, 0x0100,
+               "Kyocera",
+               "CONTAX SL300R T*",
+               US_SC_DEVICE, US_PR_DEVICE, NULL,
+               US_FL_FIX_CAPACITY | US_FL_NOT_LOCKABLE),
+
 /* Reported by Paul Stewart <stewart@wetlogic.net>
  * This entry is needed because the device reports Sub=ff */
 UNUSUAL_DEV(  0x04a4, 0x0004, 0x0001, 0x0001,
index 2afd47eefe74d4f33b3981de401df1f7465f73c2..f8a4bb20f41af0f008cf4c260cc212984ce467d1 100644 (file)
@@ -439,7 +439,7 @@ static int corgi_bl_update_status(struct backlight_device *bd)
        return corgi_bl_set_intensity(lcd, intensity);
 }
 
-void corgibl_limit_intensity(int limit)
+void corgi_lcd_limit_intensity(int limit)
 {
        if (limit)
                corgibl_flags |= CORGIBL_BATTLOW;
@@ -448,7 +448,7 @@ void corgibl_limit_intensity(int limit)
 
        backlight_update_status(the_corgi_lcd->bl_dev);
 }
-EXPORT_SYMBOL(corgibl_limit_intensity);
+EXPORT_SYMBOL(corgi_lcd_limit_intensity);
 
 static struct backlight_ops corgi_bl_ops = {
        .get_brightness = corgi_bl_get_intensity,
index 64b3d30027b825395ee2320f70c2e33f7665a0cf..b92947d62ad6db01d8a2fb17787aec9ebe892d4a 100644 (file)
@@ -2118,7 +2118,7 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int s
                   height, width);
 }
 
-static __inline__ void updatescrollmode(struct display *p,
+static void updatescrollmode(struct display *p,
                                        struct fb_info *info,
                                        struct vc_data *vc)
 {
index cd5f20da738a0cb4e579a046c2a352a58791ea86..6048b55f2878b8755179c0641785ac89fe217b4b 100644 (file)
@@ -1262,8 +1262,8 @@ fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        case FBIOPUT_CON2FBMAP:
                arg = (unsigned long) compat_ptr(arg);
        case FBIOBLANK:
-               ret = fb_ioctl(file, cmd, arg);
-               break;
+               mutex_unlock(&info->lock);
+               return fb_ioctl(file, cmd, arg);
 
        case FBIOGET_FSCREENINFO:
                ret = fb_get_fscreeninfo(inode, file, cmd, arg);
index 8e5263c5b812578416e91d36de0b317649fa20a3..7543d5f7e30911c5b0e374de947821a7b800a998 100644 (file)
@@ -38,7 +38,6 @@
 #include "iface.h"
 #include "viafbdev.h"
 #include "chip.h"
-#include "debug.h"
 #include "accel.h"
 #include "share.h"
 #include "dvi.h"
 
 #include "lcd.h"
 #include "ioctl.h"
-#include "viamode.h"
 #include "via_utility.h"
 #include "vt1636.h"
 #include "tblDPASetting.h"
 #include "tbl1636.h"
-#include "viafbdev.h"
 
 /* External struct*/
 
index 6e46a551395c14dc4d98d5f36ce88c2af21954e9..3e57aa4d643a33035fb7f6f37a494ac9148211de 100644 (file)
@@ -3,8 +3,8 @@
  *
  *      Based on wdt.c. Original copyright messages:
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -15,7 +15,7 @@
  *     warranty for any of this software. This material is provided
  *     "AS-IS" and at no charge.
  *
- *     (c) Copyright 1995    Alan Cox <alan@redhat.com>
+ *     (c) Copyright 1995    Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  *      14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
  *          Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
index a5110f93a7551f0fdb541c634ed2010b6c2ac6f3..a1d7856ea6e0adaccfd974b5aaddd52225fc2e6a 100644 (file)
@@ -6,8 +6,8 @@
  *     Based on acquirewdt.c which is based on wdt.c.
  *     Original copyright messages:
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
  *     warranty for any of this software. This material is provided
  *     "AS-IS" and at no charge.
  *
- *     (c) Copyright 1995    Alan Cox <alan@redhat.com>
+ *     (c) Copyright 1995    Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  *     14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
  *         Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
index 31b42253054ea33773b45c8644dbfd17700559ca..067a57cb3f829baf263a9d92f8b345a566c639cc 100644 (file)
@@ -5,7 +5,7 @@
  * Originally based on softdog.c
  * Copyright 2006-2007 Analog Devices Inc.
  * Copyright 2006-2007 Michele d'Amico
- * Copyright 1996 Alan Cox <alan@redhat.com>
+ * Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  * Enter bugs at http://blackfin.uclinux.org/
  *
index bbd14e34319f62fa4dae1c1347741ce4ef54b276..a171fc6ae1cb7f25893f30aee0a0ad297020e85a 100644 (file)
@@ -8,8 +8,8 @@
  *     Based on wdt.c.
  *     Original copyright messages:
  *
- *      (c) Copyright 1996-1997 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                              http://www.redhat.com
+ *      (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *      This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
index c13383f7fcb988455ee6354b7aab2ee679facd10..74f951c18b90ec69879e7841f322f8c5ec1cae5f 100644 (file)
@@ -394,8 +394,7 @@ static unsigned char __init esb_getdevice(void)
                        goto err_disable;
                }
 
-               BASEADDR = ioremap(pci_resource_start(esb_pci, 0),
-                                  pci_resource_len(esb_pci, 0));
+               BASEADDR = pci_ioremap_bar(esb_pci, 0);
                if (BASEADDR == NULL) {
                        /* Something's wrong here, BASEADDR has to be set */
                        printk(KERN_ERR PFX "failed to get BASEADDR\n");
index 8782ec1f5aa05f3ef1713992ef09788d78b3fd6c..317ef2b16cffb27830813f273f5f0b6caead5d33 100644 (file)
@@ -11,8 +11,8 @@
  *     Based on acquirewdt.c which is based on wdt.c.
  *     Original copyright messages:
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -23,7 +23,7 @@
  *     warranty for any of this software. This material is provided
  *     "AS-IS" and at no charge.
  *
- *     (c) Copyright 1995    Alan Cox <alan@redhat.com>
+ *     (c) Copyright 1995    Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  *     14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
  *          Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
index 73c9e7992febc2c550d575f10d9ff9874bbdbd33..0f761db9a27ca28247171fbbef74339e03f7350e 100644 (file)
@@ -9,7 +9,7 @@
  *     as published by the Free Software Foundation; either version
  *     2 of the License, or (at your option) any later version.
  *
- *     based on softdog.c by Alan Cox <alan@redhat.com>
+ *     based on softdog.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
  */
 
 #include <linux/module.h>
index 2a9bfa81f9d60e9f385ced408fcc54e0a261f0e7..1130ad697ce2908089985abedde2cbd6b7b81d1c 100644 (file)
@@ -4,8 +4,8 @@
  *     (c) Copyright 2004 ARM Limited
  *
  *     Based on the SoftDog driver:
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index 7bcbb7f4745f622758d68e2b36188d94c0668da8..2f2ce7429f5bb86f18cb3d381ad22f43c57624cb 100644 (file)
@@ -16,7 +16,7 @@
  * 20030527: George G. Davis <gdavis@mvista.com>
  *     Initially based on linux-2.4.19-rmk7-pxa1/drivers/char/sa1100_wdt.c
  *     (c) Copyright 2000 Oleg Drokin <green@crimea.edu>
- *     Based on SoftDog driver by Alan Cox <alan@redhat.com>
+ *     Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  * Copyright (c) 2004 Texas Instruments.
  *     1. Modified to support OMAP1610 32-KHz watchdog timer
index 90eb1d4271d7461e4b375791d1156f243a045169..5d76422c402c837ca58a516df7cb9cda2e6a25d9 100644 (file)
@@ -6,7 +6,7 @@
  *     Based on source code of the following authors:
  *       Ken Hollis <kenji@bitgate.com>,
  *       Lindsay Harris <lindsay@bluegum.com>,
- *       Alan Cox <alan@redhat.com>,
+ *       Alan Cox <alan@lxorguk.ukuu.org.uk>,
  *       Matt Domsch <Matt_Domsch@dell.com>,
  *       Rob Radez <rob@osinvestor.com>
  *
index c1685c942de600d424e877e4d5068d7db98832d0..afb089695da84222370f9c23c3a7fff841ef8132 100644 (file)
@@ -5,7 +5,7 @@
  *
  *     Based on source code of the following authors:
  *       Ken Hollis <kenji@bitgate.com>,
- *       Alan Cox <alan@redhat.com>,
+ *       Alan Cox <alan@lxorguk.ukuu.org.uk>,
  *       Matt Domsch <Matt_Domsch@dell.com>,
  *       Rob Radez <rob@osinvestor.com>,
  *       Greg Kroah-Hartman <greg@kroah.com>
index c9c73b69c5e54d2b6bb079c8dd70c99d3ef38aa8..57027f4653ce7c56b5baf783b9c90816f50e084f 100644 (file)
@@ -7,7 +7,8 @@
  *  based on
  *  SoftDog 0.05:      A Software Watchdog Device
  *
- *  (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
+ *  (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                     All Rights Reserved.
  *
  *  This program is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU General Public License
index 86d42801de451b53df52aa438affc0fb937333fb..f7f6ce82a5e251d8e088f7500af6394f778bbd91 100644 (file)
@@ -6,7 +6,7 @@
  * S3C2410 Watchdog Timer Support
  *
  * Based on, softdog.c by Alan Cox,
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  * 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
index 31a48437dc3dba2ce22ba5ae8aef3ce72d1b7c71..ed01e4c2beff7bfb70c9b848e91e027c15a7a901 100644 (file)
@@ -2,7 +2,7 @@
  *     Watchdog driver for the SA11x0/PXA2xx
  *
  *      (c) Copyright 2000 Oleg Drokin <green@crimea.edu>
- *          Based on SoftDog driver by Alan Cox <alan@redhat.com>
+ *          Based on SoftDog driver by Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index 27e526a07c9a2e7e568967aa5d8d53bc09c75948..38f5831c9291661cceec1ddbbf5814a5648003a7 100644 (file)
@@ -35,8 +35,8 @@
  * Based on various other watchdog drivers, which are probably all
  * loosely based on something Alan Cox wrote years ago.
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index fd83dd052d8c44ca43aba02c5a4e8924c4913843..ae74f6bcfa23cb803cba0e800863476880f1ba4c 100644 (file)
@@ -16,8 +16,8 @@
  *     Based on acquirewdt.c which is based on wdt.c.
  *     Original copyright messages:
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -28,7 +28,7 @@
  *     warranty for any of this software. This material is provided
  *     "AS-IS" and at no charge.
  *
- *     (c) Copyright 1995    Alan Cox <alan@redhat.com>
+ *     (c) Copyright 1995    Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  *      14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
  *           Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
index e5e470ca7759ae77367b639c690119ababd1f6b1..06553debc7bc5ae7c21eb86022bb4479b7391ebd 100644 (file)
@@ -10,7 +10,7 @@
  *     as published by the Free Software Foundation; either version
  *     2 of the License, or (at your option) any later version.
  *
- *     based on softdog.c by Alan Cox <alan@redhat.com>
+ *     based on softdog.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
  */
 
 #include <linux/module.h>
index 988ff1d5b4beb14cda7d3eed15c0c3b0dc24478a..2e56cad77d19ae3e1cd0124eb45830f728407bbb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     SMsC 37B787 Watchdog Timer driver for Linux 2.6.x.x
  *
- *      Based on acquirewdt.c by Alan Cox <alan@redhat.com>
+ *     Based on acquirewdt.c by Alan Cox <alan@lxorguk.ukuu.org.uk>
  *       and some other existing drivers
  *
  *     This program is free software; you can redistribute it and/or
index c650464c5c63d2f87720390d93e417f111a1f6ee..7204f9662114f01f976fb7396f190f449c9d4f3c 100644 (file)
@@ -1,8 +1,7 @@
 /*
  *     SoftDog 0.07:   A Software Watchdog Device
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>, All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index 69396adaa5c301e0d045175abb96d56308ce4f41..916890abffdd3ca9f9010d90b53319db932fce4c 100644 (file)
@@ -11,8 +11,8 @@
  *
  *     (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl>
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
@@ -23,7 +23,7 @@
  *     warranty for any of this software. This material is provided
  *     "AS-IS" and at no charge.
  *
- *     (c) Copyright 1995    Alan Cox <alan@redhat.com>
+ *     (c) Copyright 1995    Alan Cox <alan@lxorguk.ukuu.org.uk>
  */
 
 #include <linux/module.h>
index 445d30a01ed310858a4fda9babb590125496cc11..3c7aa412b1f310b4d358a1309a4cbc5469c6d38c 100644 (file)
@@ -12,8 +12,8 @@
  *
  *     (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl>
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index 68377ae171ffb0fbbfb68ab3edda4f891ddd61b5..42e940c238914172e199d5e232369ccc33ccf35e 100644 (file)
@@ -10,8 +10,8 @@
  *     Based on advantechwdt.c which is based on wdt.c.
  *     Original copyright messages:
  *
- *     (c) Copyright 1996-1997 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index deeebb2b13ead3f1c3af305e5978599dd6a3f2e8..eddb9187e7b6ba193db5ad24b23a14bf3ff67e07 100644 (file)
@@ -1,8 +1,8 @@
 /*
  *     Industrial Computer Source WDT500/501 driver
  *
- *     (c) Copyright 1996-1997 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index 191ea6302107f39624a1e185d6e6a72a685722af..f55135662d78f9472ae9ebe38ef634c956225578 100644 (file)
@@ -6,7 +6,8 @@
  *
  *     SoftDog 0.05:   A Software Watchdog Device
  *
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                             All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index ed02bdb38c09ed616973eb58eceeff87ae424efa..c45839a4a34dfd7e7a58c18674bc1cb680d24b64 100644 (file)
@@ -1,8 +1,8 @@
 /*
  *     Industrial Computer Source PCI-WDT500/501 driver
  *
- *     (c) Copyright 1996-1997 Alan Cox <alan@redhat.com>, All Rights Reserved.
- *                             http://www.redhat.com
+ *     (c) Copyright 1996-1997 Alan Cox <alan@lxorguk.ukuu.org.uk>,
+ *                                              All Rights Reserved.
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License
index 06db79d05c1262a8de76fc9dcb820b910b464163..6046239465a147f28a8227ae075472c3bafd2757 100644 (file)
@@ -1251,6 +1251,7 @@ struct kmem_cache *ecryptfs_header_cache_2;
 /**
  * ecryptfs_write_headers_virt
  * @page_virt: The virtual address to write the headers to
+ * @max: The size of memory allocated at page_virt
  * @size: Set to the number of bytes written by this function
  * @crypt_stat: The cryptographic context
  * @ecryptfs_dentry: The eCryptfs dentry
@@ -1278,7 +1279,8 @@ struct kmem_cache *ecryptfs_header_cache_2;
  *
  * Returns zero on success
  */
-static int ecryptfs_write_headers_virt(char *page_virt, size_t *size,
+static int ecryptfs_write_headers_virt(char *page_virt, size_t max,
+                                      size_t *size,
                                       struct ecryptfs_crypt_stat *crypt_stat,
                                       struct dentry *ecryptfs_dentry)
 {
@@ -1296,7 +1298,7 @@ static int ecryptfs_write_headers_virt(char *page_virt, size_t *size,
        offset += written;
        rc = ecryptfs_generate_key_packet_set((page_virt + offset), crypt_stat,
                                              ecryptfs_dentry, &written,
-                                             PAGE_CACHE_SIZE - offset);
+                                             max - offset);
        if (rc)
                ecryptfs_printk(KERN_WARNING, "Error generating key packet "
                                "set; rc = [%d]\n", rc);
@@ -1368,14 +1370,14 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry)
                goto out;
        }
        /* Released in this function */
-       virt = kzalloc(crypt_stat->num_header_bytes_at_front, GFP_KERNEL);
+       virt = (char *)get_zeroed_page(GFP_KERNEL);
        if (!virt) {
                printk(KERN_ERR "%s: Out of memory\n", __func__);
                rc = -ENOMEM;
                goto out;
        }
-       rc = ecryptfs_write_headers_virt(virt, &size, crypt_stat,
-                                        ecryptfs_dentry);
+       rc = ecryptfs_write_headers_virt(virt, PAGE_CACHE_SIZE, &size,
+                                        crypt_stat, ecryptfs_dentry);
        if (unlikely(rc)) {
                printk(KERN_ERR "%s: Error whilst writing headers; rc = [%d]\n",
                       __func__, rc);
@@ -1393,8 +1395,7 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry)
                goto out_free;
        }
 out_free:
-       memset(virt, 0, crypt_stat->num_header_bytes_at_front);
-       kfree(virt);
+       free_page((unsigned long)virt);
 out:
        return rc;
 }
index 19eafbe3c379ae685c8f6f018ab5d152ef1ed9bd..2b2eec1283bfa8d0d830fce2f6f9792e0dedbbca 100644 (file)
@@ -175,7 +175,7 @@ static ssize_t fat_direct_IO(int rw, struct kiocb *iocb,
 
        if (rw == WRITE) {
                /*
-                * FIXME: blockdev_direct_IO() doesn't use ->prepare_write(),
+                * FIXME: blockdev_direct_IO() doesn't use ->write_begin(),
                 * so we need to update the ->mmu_private to block boundary.
                 *
                 * But we must fill the remaining area or hole by nul for
index d15cd6e7251ee03347f25f14f53e371ff7936d09..60d4c32c880869719c7261a4b0370e5d52d590e9 100644 (file)
@@ -860,7 +860,6 @@ out:
  * int journal_get_undo_access() - Notify intent to modify metadata with non-rewindable consequences
  * @handle: transaction
  * @bh: buffer to undo
- * @credits: store the number of taken credits here (if not NULL)
  *
  * Sometimes there is a need to distinguish between metadata which has
  * been committed to disk and that which has not.  The ext3fs code uses
index 74688598bcf72ebadb7f978099f9691747369d6a..e960a8321902cad9398447f3434f31f90a0f2b3c 100644 (file)
@@ -814,7 +814,7 @@ EXPORT_SYMBOL(simple_getattr);
 EXPORT_SYMBOL(simple_link);
 EXPORT_SYMBOL(simple_lookup);
 EXPORT_SYMBOL(simple_pin_fs);
-EXPORT_SYMBOL(simple_prepare_write);
+EXPORT_UNUSED_SYMBOL(simple_prepare_write);
 EXPORT_SYMBOL(simple_readpage);
 EXPORT_SYMBOL(simple_release_fs);
 EXPORT_SYMBOL(simple_rename);
index dc52793ff8f8a06ddf1d89d62d7bb44fb9eee740..d22eb383e1cf80bb8234207e2a681391af802045 100644 (file)
@@ -908,21 +908,16 @@ static int nfs_size_need_update(const struct inode *inode, const struct nfs_fatt
        return nfs_size_to_loff_t(fattr->size) > i_size_read(inode);
 }
 
-static unsigned long nfs_attr_generation_counter;
+static atomic_long_t nfs_attr_generation_counter;
 
 static unsigned long nfs_read_attr_generation_counter(void)
 {
-       smp_rmb();
-       return nfs_attr_generation_counter;
+       return atomic_long_read(&nfs_attr_generation_counter);
 }
 
 unsigned long nfs_inc_attr_generation_counter(void)
 {
-       unsigned long ret;
-       smp_rmb();
-       ret = ++nfs_attr_generation_counter;
-       smp_wmb();
-       return ret;
+       return atomic_long_inc_return(&nfs_attr_generation_counter);
 }
 
 void nfs_fattr_init(struct nfs_fattr *fattr)
index 8d3225a78073f86c682ed21e9b3098a1fef6b843..7efe937a415f6df1219aff0a076df14e56972a80 100644 (file)
@@ -679,8 +679,7 @@ leave:
 
 /* Some parts of this taken from generic_cont_expand, which turned out
  * to be too fragile to do exactly what we need without us having to
- * worry about recursive locking in ->prepare_write() and
- * ->commit_write(). */
+ * worry about recursive locking in ->write_begin() and ->write_end(). */
 static int ocfs2_write_zero_page(struct inode *inode,
                                 u64 size)
 {
index a1e701c27156f78201532e8f701d1af2266744f0..1abab5cee4ba8d552df8300e3561ff7e8a1375c3 100644 (file)
@@ -731,8 +731,8 @@ ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out,
        };
 
        /*
-        * The actor worker might be calling ->prepare_write and
-        * ->commit_write. Most of the time, these expect i_mutex to
+        * The actor worker might be calling ->write_begin and
+        * ->write_end. Most of the time, these expect i_mutex to
         * be held. Since this may result in an ABBA deadlock with
         * pipe->inode, we have to order lock acquiry here.
         */
index 8b00f6643e934444f323c7aa3aeac0aff4b2af43..1164963c3a85f5213edddc91b7def976cd4c8eab 100644 (file)
@@ -25,7 +25,6 @@ struct cgroup;
 
 extern int cgroup_init_early(void);
 extern int cgroup_init(void);
-extern void cgroup_init_smp(void);
 extern void cgroup_lock(void);
 extern bool cgroup_lock_live_group(struct cgroup *cgrp);
 extern void cgroup_unlock(void);
@@ -348,8 +347,6 @@ struct cgroup_subsys {
        struct cgroupfs_root *root;
 
        struct list_head sibling;
-
-       void *private;
 };
 
 #define SUBSYS(_x) extern struct cgroup_subsys _x ## _subsys;
@@ -410,7 +407,6 @@ void cgroup_mm_owner_callbacks(struct task_struct *old,
 
 static inline int cgroup_init_early(void) { return 0; }
 static inline int cgroup_init(void) { return 0; }
-static inline void cgroup_init_smp(void) {}
 static inline void cgroup_fork(struct task_struct *p) {}
 static inline void cgroup_fork_callbacks(struct task_struct *p) {}
 static inline void cgroup_post_fork(struct task_struct *p) {}
index 8f225339eee9e49329b842803d89c2b4c90f9d38..5a361f85cfec483e0a595dcb2f4c2ee632ac56d9 100644 (file)
@@ -44,11 +44,6 @@ static inline bool should_send_signal(struct task_struct *p)
        return !(p->flags & PF_FREEZER_NOSIG);
 }
 
-/*
- * Wake up a frozen process
- */
-extern int __thaw_process(struct task_struct *p);
-
 /* Takes and releases task alloc lock using task_lock() */
 extern int thaw_process(struct task_struct *p);
 
index 5b248d61430c92de2db9df74b6825fefa30fb710..0dcdd9458f4bcce56d1a89c566892f5d5097e876 100644 (file)
@@ -489,13 +489,6 @@ struct address_space_operations {
        int (*readpages)(struct file *filp, struct address_space *mapping,
                        struct list_head *pages, unsigned nr_pages);
 
-       /*
-        * ext3 requires that a successful prepare_write() call be followed
-        * by a commit_write() call - they must be balanced
-        */
-       int (*prepare_write)(struct file *, struct page *, unsigned, unsigned);
-       int (*commit_write)(struct file *, struct page *, unsigned, unsigned);
-
        int (*write_begin)(struct file *, struct address_space *mapping,
                                loff_t pos, unsigned len, unsigned flags,
                                struct page **pagep, void **fsdata);
index 4e625e0094c8b5a4cbc1679f8aa81abdeba5b6fc..708bab58d8d07dde74c3b8019a63b63405893c3a 100644 (file)
@@ -49,7 +49,8 @@ struct gianfar_platform_data {
        u32     device_flags;
        /* board specific information */
        u32     board_flags;
-       char    bus_id[MII_BUS_ID_SIZE];
+       int     mdio_bus;                       /* Bus controlled by us */
+       char    bus_id[MII_BUS_ID_SIZE];        /* Bus PHY is on */
        u32     phy_id;
        u8      mac_addr[6];
        phy_interface_t interface;
index 5355ca4b939e583b8483e19ab888d03a0643630f..e5780f8c934a5a5ef00a9ab9b952ab682388c5ba 100644 (file)
@@ -410,6 +410,7 @@ struct hid_output_fifo {
 #define HID_SUSPENDED          5
 #define HID_CLEAR_HALT         6
 #define HID_DISCONNECTED       7
+#define HID_STARTED            8
 
 struct hid_input {
        struct list_head list;
index 0c1264668be0ccb32ffa98a304a706dd1009b6f3..68cb0265d0094e81237191f7d98fcc440fabaeb0 100644 (file)
 #define __FINIT                .previous
 
 #define __INITDATA     .section        ".init.data","aw"
+#define __INITRODATA   .section        ".init.rodata","a"
 #define __FINITDATA    .previous
 
 #define __DEVINIT        .section      ".devinit.text", "ax"
 #define __DEVINITDATA    .section      ".devinit.data", "aw"
+#define __DEVINITRODATA  .section      ".devinit.rodata", "a"
 
 #define __CPUINIT        .section      ".cpuinit.text", "ax"
 #define __CPUINITDATA    .section      ".cpuinit.data", "aw"
+#define __CPUINITRODATA  .section      ".cpuinit.rodata", "a"
 
 #define __MEMINIT        .section      ".meminit.text", "ax"
 #define __MEMINITDATA    .section      ".meminit.data", "aw"
+#define __MEMINITRODATA  .section      ".meminit.rodata", "a"
 
 /* silence warnings when references are OK */
 #define __REF            .section       ".ref.text", "ax"
 #define __REFDATA        .section       ".ref.data", "aw"
-#define __REFCONST       .section       ".ref.rodata", "aw"
+#define __REFCONST       .section       ".ref.rodata", "a"
 
 #ifndef __ASSEMBLY__
 /*
index 396a350b87a60b79935a9b738c34783581319a2b..fba141d3ca0783303c661f39fb2c503ba418dc56 100644 (file)
@@ -116,6 +116,8 @@ extern int _cond_resched(void);
 # define might_resched() do { } while (0)
 #endif
 
+#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
+  void __might_sleep(char *file, int line);
 /**
  * might_sleep - annotation for functions that can sleep
  *
@@ -126,8 +128,6 @@ extern int _cond_resched(void);
  * be bitten later when the calling function happens to sleep when it is not
  * supposed to.
  */
-#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
-  void __might_sleep(char *file, int line);
 # define might_sleep() \
        do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
 #else
index eb71b45fdf5af411b42aad9b89ae808c1b19d8e8..97b91d1abb433e39ced31566b7d160d46719b66e 100644 (file)
@@ -135,6 +135,7 @@ struct usb_device_id {
 
 struct hid_device_id {
        __u16 bus;
+       __u16 pad1;
        __u32 vendor;
        __u32 product;
        kernel_ulong_t driver_data
index c8bcb59adfdf2570f0a8966eeb7219651d92ab1a..9d77b1d7dca806e540838d27bbc632961a340f0e 100644 (file)
@@ -1537,7 +1537,6 @@ static inline void __netif_tx_unlock_bh(struct netdev_queue *txq)
 /**
  *     netif_tx_lock - grab network device transmit lock
  *     @dev: network device
- *     @cpu: cpu number of lock owner
  *
  * Get network device transmit lock
  */
index aaa423a6f3d9167ed4cd77c23053b271d1874631..40fc7e62608220e9a64dd70493c3b091fa49a0b7 100644 (file)
@@ -59,10 +59,10 @@ struct rlimit {
 #define _STK_LIM       (8*1024*1024)
 
 /*
- * GPG wants 32kB of mlocked memory, to make sure pass phrases
+ * GPG2 wants 64kB of mlocked memory, to make sure pass phrases
  * and other sensitive information are never written to disk.
  */
-#define MLOCK_LIMIT    (8 * PAGE_SIZE)
+#define MLOCK_LIMIT    ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024)
 
 /*
  * Due to binary compatibility, the actual resource numbers
index f5c4a51eb42ea9ec97f460e14a11c24850de82be..c13f1cec9abb154e24296216d91d225d245166b2 100644 (file)
@@ -1585,6 +1585,7 @@ int security_syslog(int type);
 int security_settime(struct timespec *ts, struct timezone *tz);
 int security_vm_enough_memory(long pages);
 int security_vm_enough_memory_mm(struct mm_struct *mm, long pages);
+int security_vm_enough_memory_kern(long pages);
 int security_bprm_alloc(struct linux_binprm *bprm);
 void security_bprm_free(struct linux_binprm *bprm);
 void security_bprm_apply_creds(struct linux_binprm *bprm, int unsafe);
@@ -1820,6 +1821,11 @@ static inline int security_vm_enough_memory(long pages)
        return cap_vm_enough_memory(current->mm, pages);
 }
 
+static inline int security_vm_enough_memory_kern(long pages)
+{
+       return cap_vm_enough_memory(current->mm, pages);
+}
+
 static inline int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
 {
        return cap_vm_enough_memory(mm, pages);
index b8db32cea1de535c4762abd9feabc82db8384381..bf8de281b4ed2a8e8131d34274711f81520d70f6 100644 (file)
@@ -18,6 +18,9 @@
  *     duplex (MicroWire) controllers.  Provide chipslect() and txrx_bufs(),
  *     and custom setup()/cleanup() methods.
  */
+
+#include <linux/workqueue.h>
+
 struct spi_bitbang {
        struct workqueue_struct *workqueue;
        struct work_struct      work;
index d861197f83c76aefdd1ec6dd1854057c6b27f177..8856e2d60e9fe5cc04e83445e2b9ea5a6f63f031 100644 (file)
@@ -1474,7 +1474,6 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
  * ieee80211_beacon_get - beacon generation function
  * @hw: pointer obtained from ieee80211_alloc_hw().
  * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
- * @control: will be filled with information needed to send this beacon.
  *
  * If the beacon frames are generated by the host system (i.e., not in
  * hardware/firmware), the low-level driver uses this function to receive
@@ -1575,7 +1574,6 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
  * ieee80211_get_buffered_bc - accessing buffered broadcast and multicast frames
  * @hw: pointer as obtained from ieee80211_alloc_hw().
  * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
- * @control: will be filled with information needed to send returned frame.
  *
  * Function for accessing buffered broadcast and multicast frames. If
  * hardware/firmware does not implement buffering of broadcast/multicast
@@ -1623,9 +1621,8 @@ unsigned int ieee80211_hdrlen(__le16 fc);
  *
  * @keyconf: the parameter passed with the set key
  * @skb: the skb for which the key is needed
- * @rc4key: a buffer to which the key will be written
  * @type: TBD
- * @key: TBD
+ * @key: a buffer to which the key will be written
  */
 void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
                                struct sk_buff *skb,
@@ -1726,7 +1723,8 @@ void ieee80211_iterate_active_interfaces_atomic(struct ieee80211_hw *hw,
  * @hw: pointer as obtained from ieee80211_alloc_hw().
  * @ra: receiver address of the BA session recipient
  * @tid: the TID to BA on.
- * @return: success if addBA request was sent, failure otherwise
+ *
+ * Return: success if addBA request was sent, failure otherwise
  *
  * Although mac80211/low level driver/user space application can estimate
  * the need to start aggregation on a certain RA/TID, the session level
@@ -1764,7 +1762,8 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
  * @ra: receiver address of the BA session recipient
  * @tid: the TID to stop BA.
  * @initiator: if indicates initiator DELBA frame will be sent.
- * @return: error if no sta with matching da found, success otherwise
+ *
+ * Return: error if no sta with matching da found, success otherwise
  *
  * Although mac80211/low level driver/user space application can estimate
  * the need to stop aggregation on a certain RA/TID, the session level
index 708009be88b6a0f5f60d30a6e37ba5f869728d28..700c53a3c6fa22d9e49f522616da870b99522d3c 100644 (file)
@@ -214,6 +214,8 @@ struct pernet_operations {
 
 extern int register_pernet_subsys(struct pernet_operations *);
 extern void unregister_pernet_subsys(struct pernet_operations *);
+extern int register_pernet_gen_subsys(int *id, struct pernet_operations *);
+extern void unregister_pernet_gen_subsys(int id, struct pernet_operations *);
 extern int register_pernet_device(struct pernet_operations *);
 extern void unregister_pernet_device(struct pernet_operations *);
 extern int register_pernet_gen_device(int *id, struct pernet_operations *);
index ada50c04d09ffbb64135690573740567a59436a5..c04f9e18ea22033d22cfd9bf5e4ba1a74a29addd 100644 (file)
@@ -936,7 +936,6 @@ extern void sock_init_data(struct socket *sock, struct sock *sk);
 
 /**
  *     sk_filter_release: Release a socket filter
- *     @sk: socket
  *     @fp: filter to remove
  *
  *     Remove a filter from a socket and release its resources.
index a1e0357a84d724856b741d5ed2a76c5bc8876769..5e0189876afda7a9d523ae705a113cce1be2c69d 100644 (file)
@@ -28,7 +28,8 @@
  */
 #define SOC_SINGLE_VALUE(xreg, xshift, xmax, xinvert) \
        ((unsigned long)&(struct soc_mixer_control) \
-       {.reg = xreg, .shift = xshift, .max = xmax, .invert = xinvert})
+       {.reg = xreg, .shift = xshift, .rshift = xshift, .max = xmax, \
+       .invert = xinvert})
 #define SOC_SINGLE_VALUE_EXT(xreg, xmax, xinvert) \
        ((unsigned long)&(struct soc_mixer_control) \
        {.reg = xreg, .max = xmax, .invert = xinvert})
index 44e9208f9c78c850593109e62b112485d4baa8f4..86b00c53fadeb833d054fab64d13fb9a0e8d6fde 100644 (file)
@@ -401,16 +401,20 @@ config CGROUP_MEM_RES_CTLR
        depends on CGROUPS && RESOURCE_COUNTERS
        select MM_OWNER
        help
-         Provides a memory resource controller that manages both page cache and
-         RSS memory.
+         Provides a memory resource controller that manages both anonymous
+         memory and page cache. (See Documentation/controllers/memory.txt)
 
          Note that setting this option increases fixed memory overhead
-         associated with each page of memory in the system by 4/8 bytes
-         and also increases cache misses because struct page on many 64bit
-         systems will not fit into a single cache line anymore.
+         associated with each page of memory in the system. By this,
+         20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
+         usage tracking struct at boot. Total amount of this is printed out
+         at boot.
 
          Only enable when you're ok with these trade offs and really
-         sure you need the memory resource controller.
+         sure you need the memory resource controller. Even when you enable
+         this, you can set "cgroup_disable=memory" at your boot option to
+         disable memory resource controller and you can avoid overheads.
+         (and lose benefits of memory resource contoller)
 
          This config option also selects MM_OWNER config option, which
          could in turn add some fork/exit overhead.
index 4c87ee1fe5d30fe1783f0800fde7e3888aad298e..4d42f450b590166f06c34724d5ed74f5ef641db7 100644 (file)
@@ -1,4 +1,4 @@
-
+#include <linux/delay.h>
 #include <linux/raid/md.h>
 #include <linux/delay.h>
 
index e95056954498e42e2f225216eaa0cd6286b6f7b6..7fa476f01d05568ac42541391f935b23b4145c80 100644 (file)
@@ -162,9 +162,13 @@ static int freezer_can_attach(struct cgroup_subsys *ss,
                              struct task_struct *task)
 {
        struct freezer *freezer;
-       int retval;
 
-       /* Anything frozen can't move or be moved to/from */
+       /*
+        * Anything frozen can't move or be moved to/from.
+        *
+        * Since orig_freezer->state == FROZEN means that @task has been
+        * frozen, so it's sufficient to check the latter condition.
+        */
 
        if (is_task_frozen_enough(task))
                return -EBUSY;
@@ -173,13 +177,7 @@ static int freezer_can_attach(struct cgroup_subsys *ss,
        if (freezer->state == CGROUP_FROZEN)
                return -EBUSY;
 
-       retval = 0;
-       task_lock(task);
-       freezer = task_freezer(task);
-       if (freezer->state == CGROUP_FROZEN)
-               retval = -EBUSY;
-       task_unlock(task);
-       return retval;
+       return 0;
 }
 
 static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
@@ -190,8 +188,9 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task)
        freezer = task_freezer(task);
        task_unlock(task);
 
-       BUG_ON(freezer->state == CGROUP_FROZEN);
        spin_lock_irq(&freezer->lock);
+       BUG_ON(freezer->state == CGROUP_FROZEN);
+
        /* Locking avoids race with FREEZING -> THAWED transitions. */
        if (freezer->state == CGROUP_FREEZING)
                freeze_task(task, true);
@@ -276,25 +275,18 @@ static int try_to_freeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
        return num_cant_freeze_now ? -EBUSY : 0;
 }
 
-static int unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
+static void unfreeze_cgroup(struct cgroup *cgroup, struct freezer *freezer)
 {
        struct cgroup_iter it;
        struct task_struct *task;
 
        cgroup_iter_start(cgroup, &it);
        while ((task = cgroup_iter_next(cgroup, &it))) {
-               int do_wake;
-
-               task_lock(task);
-               do_wake = __thaw_process(task);
-               task_unlock(task);
-               if (do_wake)
-                       wake_up_process(task);
+               thaw_process(task);
        }
        cgroup_iter_end(cgroup, &it);
-       freezer->state = CGROUP_THAWED;
 
-       return 0;
+       freezer->state = CGROUP_THAWED;
 }
 
 static int freezer_change_state(struct cgroup *cgroup,
@@ -304,27 +296,22 @@ static int freezer_change_state(struct cgroup *cgroup,
        int retval = 0;
 
        freezer = cgroup_freezer(cgroup);
+
        spin_lock_irq(&freezer->lock);
+
        update_freezer_state(cgroup, freezer);
        if (goal_state == freezer->state)
                goto out;
-       switch (freezer->state) {
+
+       switch (goal_state) {
        case CGROUP_THAWED:
-               retval = try_to_freeze_cgroup(cgroup, freezer);
+               unfreeze_cgroup(cgroup, freezer);
                break;
-       case CGROUP_FREEZING:
-               if (goal_state == CGROUP_FROZEN) {
-                       /* Userspace is retrying after
-                        * "/bin/echo FROZEN > freezer.state" returned -EBUSY */
-                       retval = try_to_freeze_cgroup(cgroup, freezer);
-                       break;
-               }
-               /* state == FREEZING and goal_state == THAWED, so unfreeze */
        case CGROUP_FROZEN:
-               retval = unfreeze_cgroup(cgroup, freezer);
+               retval = try_to_freeze_cgroup(cgroup, freezer);
                break;
        default:
-               break;
+               BUG();
        }
 out:
        spin_unlock_irq(&freezer->lock);
index ba6248b323ef7f64fb78aa1123c2940ffce3e64d..2f4936cf708367c90f3d16fe5a4d9b49ec66e90e 100644 (file)
@@ -121,16 +121,7 @@ void cancel_freezing(struct task_struct *p)
        }
 }
 
-/*
- * Wake up a frozen process
- *
- * task_lock() is needed to prevent the race with refrigerator() which may
- * occur if the freezing of tasks fails.  Namely, without the lock, if the
- * freezing of tasks failed, thaw_tasks() might have run before a task in
- * refrigerator() could call frozen_process(), in which case the task would be
- * frozen and no one would thaw it.
- */
-int __thaw_process(struct task_struct *p)
+static int __thaw_process(struct task_struct *p)
 {
        if (frozen(p)) {
                p->flags &= ~PF_FROZEN;
@@ -140,6 +131,15 @@ int __thaw_process(struct task_struct *p)
        return 0;
 }
 
+/*
+ * Wake up a frozen process
+ *
+ * task_lock() is needed to prevent the race with refrigerator() which may
+ * occur if the freezing of tasks fails.  Namely, without the lock, if the
+ * freezing of tasks failed, thaw_tasks() might have run before a task in
+ * refrigerator() could call frozen_process(), in which case the task would be
+ * frozen and no one would thaw it.
+ */
 int thaw_process(struct task_struct *p)
 {
        task_lock(p);
index a9e422df6bf63e28648432efa7f0503aa09ffe8f..9830a037d8db1543215f02c01918af3fd980bb10 100644 (file)
@@ -102,7 +102,7 @@ int profile_setup(char *str)
 __setup("profile=", profile_setup);
 
 
-int profile_init(void)
+int __ref profile_init(void)
 {
        int buffer_bytes;
        if (!prof_on)
index 7fec0e4272342c162d1f8b8d09bb7a824f11393e..6aac5c60b25d7954f963c40fa15205e7705b02b4 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/device.h>
+#include <linux/pfn.h>
 #include <asm/io.h>
 
 
@@ -849,7 +850,8 @@ int iomem_map_sanity_check(resource_size_t addr, unsigned long size)
                        continue;
                if (p->end < addr)
                        continue;
-               if (p->start <= addr && (p->end >= addr + size - 1))
+               if (PFN_DOWN(p->start) <= PFN_DOWN(addr) &&
+                   PFN_DOWN(p->end) >= PFN_DOWN(addr + size - 1))
                        continue;
                printk(KERN_WARNING "resource map sanity check conflict: "
                       "0x%llx 0x%llx 0x%llx 0x%llx %s\n",
index ad958c1ec70859704afc3ae3d444c03914b37a6b..5ae17762ec32533dc391a64625198a17a1d67c4f 100644 (file)
@@ -319,7 +319,7 @@ static int __init init_sched_debug_procfs(void)
 {
        struct proc_dir_entry *pe;
 
-       pe = proc_create("sched_debug", 0644, NULL, &sched_debug_fops);
+       pe = proc_create("sched_debug", 0444, NULL, &sched_debug_fops);
        if (!pe)
                return -ENOMEM;
        return 0;
index 105217da5c82eeed7fef7d7c66cf8ec59c6cc2dc..4530fc65445518272ae851fa44e90378cfd908e1 100644 (file)
@@ -1144,7 +1144,8 @@ static int kill_something_info(int sig, struct siginfo *info, pid_t pid)
                struct task_struct * p;
 
                for_each_process(p) {
-                       if (p->pid > 1 && !same_thread_group(p, current)) {
+                       if (task_pid_vnr(p) > 1 &&
+                                       !same_thread_group(p, current)) {
                                int err = group_send_sig_info(sig, info, p);
                                ++count;
                                if (err != -EPERM)
index e0cea282e0c58e8f37c7a8aedadfdfd8452ac60c..b58f43bec3636e050bc6129d1fa58341aac1c946 100644 (file)
@@ -8,7 +8,6 @@ config NOP_TRACER
 
 config HAVE_FUNCTION_TRACER
        bool
-       select NOP_TRACER
 
 config HAVE_DYNAMIC_FTRACE
        bool
@@ -28,6 +27,7 @@ config TRACING
        select RING_BUFFER
        select STACKTRACE
        select TRACEPOINTS
+       select NOP_TRACER
 
 menu "Tracers"
 
index 7618c528756bed917540dd5c3dae6b1cf9285611..4a39d24568c82ffddbcbfed2a6dcb5d2b9eb7f22 100644 (file)
@@ -1339,6 +1339,14 @@ void __init ftrace_init(void)
 }
 
 #else
+
+static int __init ftrace_nodyn_init(void)
+{
+       ftrace_enabled = 1;
+       return 0;
+}
+device_initcall(ftrace_nodyn_init);
+
 # define ftrace_startup()              do { } while (0)
 # define ftrace_shutdown()             do { } while (0)
 # define ftrace_startup_sysctl()       do { } while (0)
index a610ca77155891f45d625fe2c5927cae4a3fa8dd..8a499e2adaec2554218051c730f77ccc784ef184 100644 (file)
@@ -656,7 +656,11 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
        entry->preempt_count            = pc & 0xff;
        entry->pid                      = (tsk) ? tsk->pid : 0;
        entry->flags =
+#ifdef CONFIG_TRACE_IRQFLAGS_SUPPORT
                (irqs_disabled_flags(flags) ? TRACE_FLAG_IRQS_OFF : 0) |
+#else
+               TRACE_FLAG_IRQS_NOSUPPORT |
+#endif
                ((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) |
                ((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) |
                (need_resched() ? TRACE_FLAG_NEED_RESCHED : 0);
@@ -1244,7 +1248,8 @@ lat_print_generic(struct trace_seq *s, struct trace_entry *entry, int cpu)
        trace_seq_printf(s, "%8.8s-%-5d ", comm, entry->pid);
        trace_seq_printf(s, "%3d", cpu);
        trace_seq_printf(s, "%c%c",
-                       (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' : '.',
+                       (entry->flags & TRACE_FLAG_IRQS_OFF) ? 'd' :
+                        (entry->flags & TRACE_FLAG_IRQS_NOSUPPORT) ? 'X' : '.',
                        ((entry->flags & TRACE_FLAG_NEED_RESCHED) ? 'N' : '.'));
 
        hardirq = entry->flags & TRACE_FLAG_HARDIRQ;
index 6889ca48f1f1fab8d57f3afb3ab7c9d9cb884c4f..8465ad052707afe380e2fba0017c0f37fb1d5093 100644 (file)
@@ -120,18 +120,20 @@ struct trace_boot {
 /*
  * trace_flag_type is an enumeration that holds different
  * states when a trace occurs. These are:
- *  IRQS_OFF   - interrupts were disabled
- *  NEED_RESCED - reschedule is requested
- *  HARDIRQ    - inside an interrupt handler
- *  SOFTIRQ    - inside a softirq handler
- *  CONT       - multiple entries hold the trace item
+ *  IRQS_OFF           - interrupts were disabled
+ *  IRQS_NOSUPPORT     - arch does not support irqs_disabled_flags
+ *  NEED_RESCED                - reschedule is requested
+ *  HARDIRQ            - inside an interrupt handler
+ *  SOFTIRQ            - inside a softirq handler
+ *  CONT               - multiple entries hold the trace item
  */
 enum trace_flag_type {
        TRACE_FLAG_IRQS_OFF             = 0x01,
-       TRACE_FLAG_NEED_RESCHED         = 0x02,
-       TRACE_FLAG_HARDIRQ              = 0x04,
-       TRACE_FLAG_SOFTIRQ              = 0x08,
-       TRACE_FLAG_CONT                 = 0x10,
+       TRACE_FLAG_IRQS_NOSUPPORT       = 0x02,
+       TRACE_FLAG_NEED_RESCHED         = 0x04,
+       TRACE_FLAG_HARDIRQ              = 0x08,
+       TRACE_FLAG_SOFTIRQ              = 0x10,
+       TRACE_FLAG_CONT                 = 0x20,
 };
 
 #define TRACE_BUF_SIZE         1024
index d640f87bdc9edf8b70d23925f0dcdebdc6c54ce4..d83660fd6fdde53617121f3f72e38b58158126b9 100644 (file)
@@ -402,6 +402,8 @@ static int __init dynamic_printk_init(void)
                                iter->logical_modname,
                                iter->flag_names, iter->hash, iter->hash2);
        }
+       if (dynamic_enabled == DYNAMIC_ENABLED_ALL)
+               set_all(true);
        return 0;
 }
 module_init(dynamic_printk_init);
@@ -411,7 +413,7 @@ static int __init dynamic_printk_setup(char *str)
 {
        if (str)
                return -ENOENT;
-       set_all(true);
+       dynamic_enabled = DYNAMIC_ENABLED_ALL;
        return 0;
 }
 /* Use early_param(), so we can get debug output as early as possible */
index ab8553658af3fb2fcfac7b0c80bc2ed8d1343721..f3e5f8944d1763474b4c19e411af129ed03ab324 100644 (file)
@@ -2029,48 +2029,8 @@ int pagecache_write_begin(struct file *file, struct address_space *mapping,
 {
        const struct address_space_operations *aops = mapping->a_ops;
 
-       if (aops->write_begin) {
-               return aops->write_begin(file, mapping, pos, len, flags,
+       return aops->write_begin(file, mapping, pos, len, flags,
                                                        pagep, fsdata);
-       } else {
-               int ret;
-               pgoff_t index = pos >> PAGE_CACHE_SHIFT;
-               unsigned offset = pos & (PAGE_CACHE_SIZE - 1);
-               struct inode *inode = mapping->host;
-               struct page *page;
-again:
-               page = __grab_cache_page(mapping, index);
-               *pagep = page;
-               if (!page)
-                       return -ENOMEM;
-
-               if (flags & AOP_FLAG_UNINTERRUPTIBLE && !PageUptodate(page)) {
-                       /*
-                        * There is no way to resolve a short write situation
-                        * for a !Uptodate page (except by double copying in
-                        * the caller done by generic_perform_write_2copy).
-                        *
-                        * Instead, we have to bring it uptodate here.
-                        */
-                       ret = aops->readpage(file, page);
-                       page_cache_release(page);
-                       if (ret) {
-                               if (ret == AOP_TRUNCATED_PAGE)
-                                       goto again;
-                               return ret;
-                       }
-                       goto again;
-               }
-
-               ret = aops->prepare_write(file, page, offset, offset+len);
-               if (ret) {
-                       unlock_page(page);
-                       page_cache_release(page);
-                       if (pos + len > inode->i_size)
-                               vmtruncate(inode, inode->i_size);
-               }
-               return ret;
-       }
 }
 EXPORT_SYMBOL(pagecache_write_begin);
 
@@ -2079,32 +2039,9 @@ int pagecache_write_end(struct file *file, struct address_space *mapping,
                                struct page *page, void *fsdata)
 {
        const struct address_space_operations *aops = mapping->a_ops;
-       int ret;
-
-       if (aops->write_end) {
-               mark_page_accessed(page);
-               ret = aops->write_end(file, mapping, pos, len, copied,
-                                                       page, fsdata);
-       } else {
-               unsigned offset = pos & (PAGE_CACHE_SIZE - 1);
-               struct inode *inode = mapping->host;
-
-               flush_dcache_page(page);
-               ret = aops->commit_write(file, page, offset, offset+len);
-               unlock_page(page);
-               mark_page_accessed(page);
-               page_cache_release(page);
-
-               if (ret < 0) {
-                       if (pos + len > inode->i_size)
-                               vmtruncate(inode, inode->i_size);
-               } else if (ret > 0)
-                       ret = min_t(size_t, copied, ret);
-               else
-                       ret = copied;
-       }
 
-       return ret;
+       mark_page_accessed(page);
+       return aops->write_end(file, mapping, pos, len, copied, page, fsdata);
 }
 EXPORT_SYMBOL(pagecache_write_end);
 
@@ -2226,174 +2163,6 @@ repeat:
 }
 EXPORT_SYMBOL(__grab_cache_page);
 
-static ssize_t generic_perform_write_2copy(struct file *file,
-                               struct iov_iter *i, loff_t pos)
-{
-       struct address_space *mapping = file->f_mapping;
-       const struct address_space_operations *a_ops = mapping->a_ops;
-       struct inode *inode = mapping->host;
-       long status = 0;
-       ssize_t written = 0;
-
-       do {
-               struct page *src_page;
-               struct page *page;
-               pgoff_t index;          /* Pagecache index for current page */
-               unsigned long offset;   /* Offset into pagecache page */
-               unsigned long bytes;    /* Bytes to write to page */
-               size_t copied;          /* Bytes copied from user */
-
-               offset = (pos & (PAGE_CACHE_SIZE - 1));
-               index = pos >> PAGE_CACHE_SHIFT;
-               bytes = min_t(unsigned long, PAGE_CACHE_SIZE - offset,
-                                               iov_iter_count(i));
-
-               /*
-                * a non-NULL src_page indicates that we're doing the
-                * copy via get_user_pages and kmap.
-                */
-               src_page = NULL;
-
-               /*
-                * Bring in the user page that we will copy from _first_.
-                * Otherwise there's a nasty deadlock on copying from the
-                * same page as we're writing to, without it being marked
-                * up-to-date.
-                *
-                * Not only is this an optimisation, but it is also required
-                * to check that the address is actually valid, when atomic
-                * usercopies are used, below.
-                */
-               if (unlikely(iov_iter_fault_in_readable(i, bytes))) {
-                       status = -EFAULT;
-                       break;
-               }
-
-               page = __grab_cache_page(mapping, index);
-               if (!page) {
-                       status = -ENOMEM;
-                       break;
-               }
-
-               /*
-                * non-uptodate pages cannot cope with short copies, and we
-                * cannot take a pagefault with the destination page locked.
-                * So pin the source page to copy it.
-                */
-               if (!PageUptodate(page) && !segment_eq(get_fs(), KERNEL_DS)) {
-                       unlock_page(page);
-
-                       src_page = alloc_page(GFP_KERNEL);
-                       if (!src_page) {
-                               page_cache_release(page);
-                               status = -ENOMEM;
-                               break;
-                       }
-
-                       /*
-                        * Cannot get_user_pages with a page locked for the
-                        * same reason as we can't take a page fault with a
-                        * page locked (as explained below).
-                        */
-                       copied = iov_iter_copy_from_user(src_page, i,
-                                                               offset, bytes);
-                       if (unlikely(copied == 0)) {
-                               status = -EFAULT;
-                               page_cache_release(page);
-                               page_cache_release(src_page);
-                               break;
-                       }
-                       bytes = copied;
-
-                       lock_page(page);
-                       /*
-                        * Can't handle the page going uptodate here, because
-                        * that means we would use non-atomic usercopies, which
-                        * zero out the tail of the page, which can cause
-                        * zeroes to become transiently visible. We could just
-                        * use a non-zeroing copy, but the APIs aren't too
-                        * consistent.
-                        */
-                       if (unlikely(!page->mapping || PageUptodate(page))) {
-                               unlock_page(page);
-                               page_cache_release(page);
-                               page_cache_release(src_page);
-                               continue;
-                       }
-               }
-
-               status = a_ops->prepare_write(file, page, offset, offset+bytes);
-               if (unlikely(status))
-                       goto fs_write_aop_error;
-
-               if (!src_page) {
-                       /*
-                        * Must not enter the pagefault handler here, because
-                        * we hold the page lock, so we might recursively
-                        * deadlock on the same lock, or get an ABBA deadlock
-                        * against a different lock, or against the mmap_sem
-                        * (which nests outside the page lock).  So increment
-                        * preempt count, and use _atomic usercopies.
-                        *
-                        * The page is uptodate so we are OK to encounter a
-                        * short copy: if unmodified parts of the page are
-                        * marked dirty and written out to disk, it doesn't
-                        * really matter.
-                        */
-                       pagefault_disable();
-                       copied = iov_iter_copy_from_user_atomic(page, i,
-                                                               offset, bytes);
-                       pagefault_enable();
-               } else {
-                       void *src, *dst;
-                       src = kmap_atomic(src_page, KM_USER0);
-                       dst = kmap_atomic(page, KM_USER1);
-                       memcpy(dst + offset, src + offset, bytes);
-                       kunmap_atomic(dst, KM_USER1);
-                       kunmap_atomic(src, KM_USER0);
-                       copied = bytes;
-               }
-               flush_dcache_page(page);
-
-               status = a_ops->commit_write(file, page, offset, offset+bytes);
-               if (unlikely(status < 0))
-                       goto fs_write_aop_error;
-               if (unlikely(status > 0)) /* filesystem did partial write */
-                       copied = min_t(size_t, copied, status);
-
-               unlock_page(page);
-               mark_page_accessed(page);
-               page_cache_release(page);
-               if (src_page)
-                       page_cache_release(src_page);
-
-               iov_iter_advance(i, copied);
-               pos += copied;
-               written += copied;
-
-               balance_dirty_pages_ratelimited(mapping);
-               cond_resched();
-               continue;
-
-fs_write_aop_error:
-               unlock_page(page);
-               page_cache_release(page);
-               if (src_page)
-                       page_cache_release(src_page);
-
-               /*
-                * prepare_write() may have instantiated a few blocks
-                * outside i_size.  Trim these off again. Don't need
-                * i_size_read because we hold i_mutex.
-                */
-               if (pos + bytes > inode->i_size)
-                       vmtruncate(inode, inode->i_size);
-               break;
-       } while (iov_iter_count(i));
-
-       return written ? written : status;
-}
-
 static ssize_t generic_perform_write(struct file *file,
                                struct iov_iter *i, loff_t pos)
 {
@@ -2494,10 +2263,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
        struct iov_iter i;
 
        iov_iter_init(&i, iov, nr_segs, count, written);
-       if (a_ops->write_begin)
-               status = generic_perform_write(file, &i, pos);
-       else
-               status = generic_perform_write_2copy(file, &i, pos);
+       status = generic_perform_write(file, &i, pos);
 
        if (likely(status >= 0)) {
                written += status;
index 74f4d158022ec00ae1d405596fdbb5bb465c88b5..de14ac21e5b55d647fa732f5a6230ce2e2764824 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -175,7 +175,8 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
 
        /* Don't let a single process grow too big:
           leave 3% of the size of this process for other processes */
-       allowed -= mm->total_vm / 32;
+       if (mm)
+               allowed -= mm->total_vm / 32;
 
        /*
         * cast `allowed' as a signed long because vm_committed_space
index 2696b24f2bb37c427168655b8f690c46c931dcf6..7695dc850785e853f066e63992c242ffee14c30c 100644 (file)
@@ -1454,7 +1454,8 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
 
        /* Don't let a single process grow too big:
           leave 3% of the size of this process for other processes */
-       allowed -= current->mm->total_vm / 32;
+       if (mm)
+               allowed -= mm->total_vm / 32;
 
        /*
         * cast `allowed' as a signed long because vm_committed_space
index d38d7e61fcd0bed76af19f52ac9fc03d3a9eb262..0ed075215e5f6e3e7905fdc4ac3f739062533b42 100644 (file)
@@ -161,8 +161,8 @@ static inline struct shmem_sb_info *SHMEM_SB(struct super_block *sb)
  */
 static inline int shmem_acct_size(unsigned long flags, loff_t size)
 {
-       return (flags & VM_ACCOUNT)?
-               security_vm_enough_memory(VM_ACCT(size)): 0;
+       return (flags & VM_ACCOUNT) ?
+               security_vm_enough_memory_kern(VM_ACCT(size)) : 0;
 }
 
 static inline void shmem_unacct_size(unsigned long flags, loff_t size)
@@ -179,8 +179,8 @@ static inline void shmem_unacct_size(unsigned long flags, loff_t size)
  */
 static inline int shmem_acct_block(unsigned long flags)
 {
-       return (flags & VM_ACCOUNT)?
-               0: security_vm_enough_memory(VM_ACCT(PAGE_CACHE_SIZE));
+       return (flags & VM_ACCOUNT) ?
+               0 : security_vm_enough_memory_kern(VM_ACCT(PAGE_CACHE_SIZE));
 }
 
 static inline void shmem_unacct_blocks(unsigned long flags, long pages)
index 036536945dd9e06f53adf21c165f087a4700c3cc..f1cc03bbf6ac93e7dc4db183041f57a6f3364140 100644 (file)
@@ -897,7 +897,8 @@ EXPORT_SYMBOL(vm_unmap_ram);
  * @count: number of pages
  * @node: prefer to allocate data structures on this node
  * @prot: memory protection to use. PAGE_KERNEL for regular RAM
- * @returns: a pointer to the address that has been mapped, or NULL on failure
+ *
+ * Returns: a pointer to the address that has been mapped, or %NULL on failure
  */
 void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t prot)
 {
index f1d07b5c1e17257c21f6669588946a0df08b77a4..1895a4ca9c4f7878467afee19ab714f072c76d57 100644 (file)
@@ -325,6 +325,38 @@ void unregister_pernet_subsys(struct pernet_operations *module)
 }
 EXPORT_SYMBOL_GPL(unregister_pernet_subsys);
 
+int register_pernet_gen_subsys(int *id, struct pernet_operations *ops)
+{
+       int rv;
+
+       mutex_lock(&net_mutex);
+again:
+       rv = ida_get_new_above(&net_generic_ids, 1, id);
+       if (rv < 0) {
+               if (rv == -EAGAIN) {
+                       ida_pre_get(&net_generic_ids, GFP_KERNEL);
+                       goto again;
+               }
+               goto out;
+       }
+       rv = register_pernet_operations(first_device, ops);
+       if (rv < 0)
+               ida_remove(&net_generic_ids, *id);
+       mutex_unlock(&net_mutex);
+out:
+       return rv;
+}
+EXPORT_SYMBOL_GPL(register_pernet_gen_subsys);
+
+void unregister_pernet_gen_subsys(int id, struct pernet_operations *ops)
+{
+       mutex_lock(&net_mutex);
+       unregister_pernet_operations(ops);
+       ida_remove(&net_generic_ids, id);
+       mutex_unlock(&net_mutex);
+}
+EXPORT_SYMBOL_GPL(unregister_pernet_gen_subsys);
+
 /**
  *      register_pernet_device - register a network namespace device
  *     @ops:  pernet operations structure for the subsystem
index 99f656d35b4f5556be314cbb3ec4c732228f5709..a47f5bad110dc99ae7218df0a034a72459ef9e31 100644 (file)
@@ -1973,28 +1973,27 @@ static void pktgen_setup_inject(struct pktgen_dev *pkt_dev)
 
        /* make sure that we don't pick a non-existing transmit queue */
        ntxq = pkt_dev->odev->real_num_tx_queues;
-       if (ntxq <= num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) {
+       if (ntxq > num_online_cpus() && (pkt_dev->flags & F_QUEUE_MAP_CPU)) {
                printk(KERN_WARNING "pktgen: WARNING: QUEUE_MAP_CPU "
-                      "disabled because CPU count (%d) exceeds number ",
-                      num_online_cpus());
-               printk(KERN_WARNING "pktgen: WARNING: of tx queues "
-                      "(%d) on %s \n", ntxq, pkt_dev->odev->name);
+                      "disabled because CPU count (%d) exceeds number "
+                      "of tx queues (%d) on %s\n", num_online_cpus(), ntxq,
+                      pkt_dev->odev->name);
                pkt_dev->flags &= ~F_QUEUE_MAP_CPU;
        }
        if (ntxq <= pkt_dev->queue_map_min) {
                printk(KERN_WARNING "pktgen: WARNING: Requested "
-                      "queue_map_min (%d) exceeds number of tx\n",
-                      pkt_dev->queue_map_min);
-               printk(KERN_WARNING "pktgen: WARNING: queues (%d) on "
-                      "%s, resetting\n", ntxq, pkt_dev->odev->name);
+                      "queue_map_min (zero-based) (%d) exceeds valid range "
+                      "[0 - %d] for (%d) queues on %s, resetting\n",
+                      pkt_dev->queue_map_min, (ntxq ?: 1)- 1, ntxq,
+                      pkt_dev->odev->name);
                pkt_dev->queue_map_min = ntxq - 1;
        }
-       if (ntxq <= pkt_dev->queue_map_max) {
+       if (pkt_dev->queue_map_max >= ntxq) {
                printk(KERN_WARNING "pktgen: WARNING: Requested "
-                      "queue_map_max (%d) exceeds number of tx\n",
-                      pkt_dev->queue_map_max);
-               printk(KERN_WARNING "pktgen: WARNING: queues (%d) on "
-                      "%s, resetting\n", ntxq, pkt_dev->odev->name);
+                      "queue_map_max (zero-based) (%d) exceeds valid range "
+                      "[0 - %d] for (%d) queues on %s, resetting\n",
+                      pkt_dev->queue_map_max, (ntxq ?: 1)- 1, ntxq,
+                      pkt_dev->odev->name);
                pkt_dev->queue_map_max = ntxq - 1;
        }
 
index 0b024cd6b8091429838dc5dfe329b865b563a4b9..98f4807080508b183d35b64e82558cce321f3f88 100644 (file)
@@ -94,8 +94,8 @@ minstrel_stats_open(struct inode *inode, struct file *file)
                                prob / 10, prob % 10,
                                mr->last_success,
                                mr->last_attempts,
-                               mr->succ_hist,
-                               mr->att_hist);
+                               (unsigned long long)mr->succ_hist,
+                               (unsigned long long)mr->att_hist);
        }
        p += sprintf(p, "\nTotal packet count::    ideal %d      "
                        "lookaround %d\n\n",
@@ -106,7 +106,7 @@ minstrel_stats_open(struct inode *inode, struct file *file)
        return 0;
 }
 
-static int
+static ssize_t
 minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *o)
 {
        struct minstrel_stats_info *ms;
index a2cdbcbf64c4c2b81b83490db9648b3b828d9649..4ab62ad85dd493e473b68bc2affa5eb63783fbfb 100644 (file)
@@ -335,7 +335,7 @@ static int __init nf_ct_proto_gre_init(void)
        rv = nf_conntrack_l4proto_register(&nf_conntrack_l4proto_gre4);
        if (rv < 0)
                return rv;
-       rv = register_pernet_gen_device(&proto_gre_net_id, &proto_gre_net_ops);
+       rv = register_pernet_gen_subsys(&proto_gre_net_id, &proto_gre_net_ops);
        if (rv < 0)
                nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_gre4);
        return rv;
@@ -344,7 +344,7 @@ static int __init nf_ct_proto_gre_init(void)
 static void nf_ct_proto_gre_fini(void)
 {
        nf_conntrack_l4proto_unregister(&nf_conntrack_l4proto_gre4);
-       unregister_pernet_gen_device(proto_gre_net_id, &proto_gre_net_ops);
+       unregister_pernet_gen_subsys(proto_gre_net_id, &proto_gre_net_ops);
 }
 
 module_init(nf_ct_proto_gre_init);
index 21124ec0a73d64d8b4f937b6a7d93d37a6f81a69..bfdade72e066f65c52a3bd82a70807b51de6a3f0 100644 (file)
@@ -256,6 +256,11 @@ static struct input_handler rfkill_handler = {
 
 static int __init rfkill_handler_init(void)
 {
+       unsigned long last_run = jiffies - msecs_to_jiffies(500);
+       rfkill_wlan.last = last_run;
+       rfkill_bt.last = last_run;
+       rfkill_uwb.last = last_run;
+       rfkill_wimax.last = last_run;
        return input_register_handler(&rfkill_handler);
 }
 
index 436bf1b4b76c4fb428df75b948b82df4ff566629..cb216b2df666dc260b79a0d0f2259ac123d5fabf 100644 (file)
@@ -228,19 +228,21 @@ static int
 rpcauth_prune_expired(struct list_head *free, int nr_to_scan)
 {
        spinlock_t *cache_lock;
-       struct rpc_cred *cred;
+       struct rpc_cred *cred, *next;
        unsigned long expired = jiffies - RPC_AUTH_EXPIRY_MORATORIUM;
 
-       while (!list_empty(&cred_unused)) {
-               cred = list_entry(cred_unused.next, struct rpc_cred, cr_lru);
+       list_for_each_entry_safe(cred, next, &cred_unused, cr_lru) {
+
+               /* Enforce a 60 second garbage collection moratorium */
+               if (time_in_range(cred->cr_expire, expired, jiffies) &&
+                   test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags) != 0)
+                       continue;
+
                list_del_init(&cred->cr_lru);
                number_cred_unused--;
                if (atomic_read(&cred->cr_count) != 0)
                        continue;
-               /* Enforce a 5 second garbage collection moratorium */
-               if (time_in_range(cred->cr_expire, expired, jiffies) &&
-                   test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) != 0)
-                       continue;
+
                cache_lock = &cred->cr_auth->au_credcache->lock;
                spin_lock(cache_lock);
                if (atomic_read(&cred->cr_count) == 0) {
@@ -453,7 +455,7 @@ need_lock:
        }
        if (test_bit(RPCAUTH_CRED_UPTODATE, &cred->cr_flags) == 0)
                rpcauth_unhash_cred(cred);
-       else if (test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags) != 0) {
+       if (test_bit(RPCAUTH_CRED_HASHED, &cred->cr_flags) != 0) {
                cred->cr_expire = jiffies;
                list_add_tail(&cred->cr_lru, &cred_unused);
                number_cred_unused++;
index 9a288d5eea646e65953bf92b015f2e557d15239e..0a50361e3d83535492160f7f08a36a5a5c34d4be 100644 (file)
@@ -249,6 +249,7 @@ struct sock_xprt {
        void                    (*old_data_ready)(struct sock *, int);
        void                    (*old_state_change)(struct sock *);
        void                    (*old_write_space)(struct sock *);
+       void                    (*old_error_report)(struct sock *);
 };
 
 /*
@@ -698,8 +699,9 @@ static int xs_tcp_send_request(struct rpc_task *task)
        case -EAGAIN:
                xs_nospace(task);
                break;
-       case -ECONNREFUSED:
        case -ECONNRESET:
+               xs_tcp_shutdown(xprt);
+       case -ECONNREFUSED:
        case -ENOTCONN:
        case -EPIPE:
                status = -ENOTCONN;
@@ -742,6 +744,22 @@ out_release:
        xprt_release_xprt(xprt, task);
 }
 
+static void xs_save_old_callbacks(struct sock_xprt *transport, struct sock *sk)
+{
+       transport->old_data_ready = sk->sk_data_ready;
+       transport->old_state_change = sk->sk_state_change;
+       transport->old_write_space = sk->sk_write_space;
+       transport->old_error_report = sk->sk_error_report;
+}
+
+static void xs_restore_old_callbacks(struct sock_xprt *transport, struct sock *sk)
+{
+       sk->sk_data_ready = transport->old_data_ready;
+       sk->sk_state_change = transport->old_state_change;
+       sk->sk_write_space = transport->old_write_space;
+       sk->sk_error_report = transport->old_error_report;
+}
+
 /**
  * xs_close - close a socket
  * @xprt: transport
@@ -765,9 +783,8 @@ static void xs_close(struct rpc_xprt *xprt)
        transport->sock = NULL;
 
        sk->sk_user_data = NULL;
-       sk->sk_data_ready = transport->old_data_ready;
-       sk->sk_state_change = transport->old_state_change;
-       sk->sk_write_space = transport->old_write_space;
+
+       xs_restore_old_callbacks(transport, sk);
        write_unlock_bh(&sk->sk_callback_lock);
 
        sk->sk_no_check = 0;
@@ -1179,6 +1196,28 @@ static void xs_tcp_state_change(struct sock *sk)
        read_unlock(&sk->sk_callback_lock);
 }
 
+/**
+ * xs_tcp_error_report - callback mainly for catching RST events
+ * @sk: socket
+ */
+static void xs_tcp_error_report(struct sock *sk)
+{
+       struct rpc_xprt *xprt;
+
+       read_lock(&sk->sk_callback_lock);
+       if (sk->sk_err != ECONNRESET || sk->sk_state != TCP_ESTABLISHED)
+               goto out;
+       if (!(xprt = xprt_from_sock(sk)))
+               goto out;
+       dprintk("RPC:       %s client %p...\n"
+                       "RPC:       error %d\n",
+                       __func__, xprt, sk->sk_err);
+
+       xprt_force_disconnect(xprt);
+out:
+       read_unlock(&sk->sk_callback_lock);
+}
+
 /**
  * xs_udp_write_space - callback invoked when socket buffer space
  *                             becomes available
@@ -1454,10 +1493,9 @@ static void xs_udp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
 
                write_lock_bh(&sk->sk_callback_lock);
 
+               xs_save_old_callbacks(transport, sk);
+
                sk->sk_user_data = xprt;
-               transport->old_data_ready = sk->sk_data_ready;
-               transport->old_state_change = sk->sk_state_change;
-               transport->old_write_space = sk->sk_write_space;
                sk->sk_data_ready = xs_udp_data_ready;
                sk->sk_write_space = xs_udp_write_space;
                sk->sk_no_check = UDP_CSUM_NORCV;
@@ -1589,13 +1627,13 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
 
                write_lock_bh(&sk->sk_callback_lock);
 
+               xs_save_old_callbacks(transport, sk);
+
                sk->sk_user_data = xprt;
-               transport->old_data_ready = sk->sk_data_ready;
-               transport->old_state_change = sk->sk_state_change;
-               transport->old_write_space = sk->sk_write_space;
                sk->sk_data_ready = xs_tcp_data_ready;
                sk->sk_state_change = xs_tcp_state_change;
                sk->sk_write_space = xs_tcp_write_space;
+               sk->sk_error_report = xs_tcp_error_report;
                sk->sk_allocation = GFP_ATOMIC;
 
                /* socket options */
index 9ee9783aea5700810ec575fe5de15936ae664ba2..f4053dc7b5d67be454c7ac4ed11a48886903e4db 100644 (file)
@@ -82,7 +82,7 @@ modpost = scripts/mod/modpost                    \
  $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a,)       \
  $(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile)   \
  $(if $(KBUILD_EXTMOD),-I $(modulesymfile))      \
- $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(EXTRA_SYMBOLS))) \
+ $(if $(KBUILD_EXTRA_SYMBOLS), $(patsubst %, -e %,$(KBUILD_EXTRA_SYMBOLS))) \
  $(if $(KBUILD_EXTMOD),-o $(modulesymfile))      \
  $(if $(CONFIG_DEBUG_SECTION_MISMATCH),,-S)      \
  $(if $(CONFIG_MARKERS),-K $(kernelmarkersfile)) \
index 41564b142c0451f8512905ee5534bec1910544b3..60d00d1c4eee2051d0bb9d274ef95a9832962153 100755 (executable)
@@ -113,10 +113,10 @@ EOF
 }
 
 syscall_list() {
-sed -n -e '/^\#define/ s/[^_]*__NR_\([^[:space:]]*\).*/\
+sed -n -e '/^\#define/ s/[^_]*__NR_\([^[:space:]]*\).*/\
 \#if !defined \(__NR_\1\) \&\& !defined \(__IGNORE_\1\)\
 \#warning syscall \1 not implemented\
-\#endif/p }' $1
+\#endif/p' $1
 }
 
 (ignore_list && syscall_list ${srctree}/arch/x86/include/asm/unistd_32.h) | \
index 15d53a6b1a1f99901b9bdf07e052331ce2a86a2e..488a3b1f760f77009d8a2a0f65b17aca9e7f3b9d 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
 #
 # headers_check.pl execute a number of trivial consistency checks
 #
@@ -17,7 +17,6 @@
 # 2) TODO: check for leaked CONFIG_ symbols
 
 use strict;
-use warnings;
 
 my ($dir, $arch, @files) = @ARGV;
 
@@ -27,14 +26,15 @@ my $lineno = 0;
 my $filename;
 
 foreach my $file (@files) {
+       local *FH;
        $filename = $file;
-       open(my $fh, '<', "$filename") or die "$filename: $!\n";
+       open(FH, "<$filename") or die "$filename: $!\n";
        $lineno = 0;
-       while ($line = <$fh>) {
+       while ($line = <FH>) {
                $lineno++;
                check_include();
        }
-       close $fh;
+       close FH;
 }
 exit $ret;
 
index 68591cd0873127d2c00d2405f81975f2a37fafb8..7d2b4146e02ff1a58c3c1e53f996902a0620901f 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -w
 #
 # headers_install prepare the listed header files for use in
 # user space and copy the files to their destination.
 # 3) Drop all sections defined out by __KERNEL__ (using unifdef)
 
 use strict;
-use warnings;
 
 my ($readdir, $installdir, $arch, @files) = @ARGV;
 
 my $unifdef = "scripts/unifdef -U__KERNEL__";
 
 foreach my $file (@files) {
+       local *INFILE;
+       local *OUTFILE;
        my $tmpfile = "$installdir/$file.tmp";
-       open(my $infile, '<', "$readdir/$file")
+       open(INFILE, "<$readdir/$file")
                or die "$readdir/$file: $!\n";
-       open(my $outfile, '>', "$tmpfile") or die "$tmpfile: $!\n";
-       while (my $line = <$infile>) {
+       open(OUTFILE, ">$tmpfile") or die "$tmpfile: $!\n";
+       while (my $line = <INFILE>) {
                $line =~ s/([\s(])__user\s/$1/g;
                $line =~ s/([\s(])__force\s/$1/g;
                $line =~ s/([\s(])__iomem\s/$1/g;
                $line =~ s/\s__attribute_const__\s/ /g;
                $line =~ s/\s__attribute_const__$//g;
                $line =~ s/^#include <linux\/compiler.h>//;
-               printf $outfile "%s", $line;
+               printf OUTFILE "%s", $line;
        }
-       close $outfile;
-       close $infile;
+       close OUTFILE;
+       close INFILE;
        system $unifdef . " $tmpfile > $installdir/$file";
        unlink $tmpfile;
 }
index d9cc6901d68082ea74a2add806d72b01738679c4..aadc5223dcdb015565910ed0a30f4d009e1efb27 100644 (file)
@@ -290,6 +290,15 @@ static int parse_file(const char *fname, struct md4_ctx *md)
        release_file(file, len);
        return 1;
 }
+/* Check whether the file is a static library or not */
+static int is_static_library(const char *objfile)
+{
+       int len = strlen(objfile);
+       if (objfile[len - 2] == '.' && objfile[len - 1] == 'a')
+               return 1;
+       else
+               return 0;
+}
 
 /* We have dir/file.o.  Open dir/.file.o.cmd, look for deps_ line to
  * figure out source file. */
@@ -420,7 +429,8 @@ void get_src_version(const char *modname, char sum[], unsigned sumlen)
        while ((fname = strsep(&sources, " ")) != NULL) {
                if (!*fname)
                        continue;
-               if (!parse_source_files(fname, &md))
+               if (!(is_static_library(fname)) &&
+                               !parse_source_files(fname, &md))
                        goto release;
        }
 
index ffd61fe0c1ad58744c25dd3044148e516c6bf5ab..2500886fb90aa0273743cc67ba40da48c6b4fa5c 100755 (executable)
@@ -57,15 +57,17 @@ fi
 echo "%build"
 
 if ! $PREBUILT; then
-echo "make clean && make %{_smp_mflags}"
+echo "make clean && make %{?_smp_mflags}"
 echo ""
 fi
 
 echo "%install"
 echo "%ifarch ia64"
 echo 'mkdir -p $RPM_BUILD_ROOT/boot/efi $RPM_BUILD_ROOT/lib/modules'
+echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware'
 echo "%else"
 echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules'
+echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware'
 echo "%endif"
 
 echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install'
@@ -92,5 +94,6 @@ echo "%files"
 echo '%defattr (-, root, root)'
 echo "%dir /lib/modules"
 echo "/lib/modules/$KERNELRELEASE"
+echo "/lib/firmware"
 echo "/boot/*"
 echo ""
index 83b75126c9f7b5c57a92c8f996dc94e6c61d6680..72d233528ade5dfb5a98c022795c12c55aae7bbc 100755 (executable)
@@ -9,11 +9,13 @@ usage() {
 cd "${1:-.}" || usage
 
 # Check for git and a git repo.
-if head=`git rev-parse --verify HEAD 2>/dev/null`; then
+if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
        # Do we have an untagged version?
        if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
                if tag=`git describe 2>/dev/null`; then
                        echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
+               else
+                       printf '%s%s' -g $head
                fi
        fi
 
@@ -55,7 +57,7 @@ if rev=`svn info 2>/dev/null | grep '^Revision'`; then
 
        # Are there uncommitted changes?
        if [ $changes != 0 ]; then
-               printf -- '-svn%s%s%s' "$rev" -dirty "$changes"
+               printf -- '-svn%s%s' "$rev" -dirty
        else
                printf -- '-svn%s' "$rev"
        fi
index 255b08559b2b62e057d5fda7a8b4396b2bdbb065..c0acfa7177e5d1a01d19375f94bfa1ff819637a3 100644 (file)
@@ -198,14 +198,23 @@ int security_settime(struct timespec *ts, struct timezone *tz)
 
 int security_vm_enough_memory(long pages)
 {
+       WARN_ON(current->mm == NULL);
        return security_ops->vm_enough_memory(current->mm, pages);
 }
 
 int security_vm_enough_memory_mm(struct mm_struct *mm, long pages)
 {
+       WARN_ON(mm == NULL);
        return security_ops->vm_enough_memory(mm, pages);
 }
 
+int security_vm_enough_memory_kern(long pages)
+{
+       /* If current->mm is a kernel thread then we will pass NULL,
+          for this specific case that is fine */
+       return security_ops->vm_enough_memory(current->mm, pages);
+}
+
 int security_bprm_alloc(struct linux_binprm *bprm)
 {
        return security_ops->bprm_alloc_security(bprm);
index 6d71f9a7ccbb9a063324d1bc381edc2e113f4e84..b0bf42691047307adc597b3c11a2a1c583f56e14 100644 (file)
@@ -225,8 +225,13 @@ struct snd_kcontrol *snd_ctl_new1(const struct snd_kcontrol_new *ncontrol,
        kctl.id.iface = ncontrol->iface;
        kctl.id.device = ncontrol->device;
        kctl.id.subdevice = ncontrol->subdevice;
-       if (ncontrol->name)
+       if (ncontrol->name) {
                strlcpy(kctl.id.name, ncontrol->name, sizeof(kctl.id.name));
+               if (strcmp(ncontrol->name, kctl.id.name) != 0)
+                       snd_printk(KERN_WARNING
+                                  "Control name '%s' truncated to '%s'\n",
+                                  ncontrol->name, kctl.id.name);
+       }
        kctl.id.index = ncontrol->index;
        kctl.count = ncontrol->count ? ncontrol->count : 1;
        access = ncontrol->access == 0 ? SNDRV_CTL_ELEM_ACCESS_READWRITE :
index 6704acbca8c08015cd5c67b22d9d9a78f149c072..bd510eceff1ff413422c0c5d004440e7a2fd44af 100644 (file)
@@ -1927,9 +1927,9 @@ static int snd_ac97_dev_register(struct snd_device *device)
        ac97->dev.bus = &ac97_bus_type;
        ac97->dev.parent = ac97->bus->card->dev;
        ac97->dev.release = ac97_device_release;
-       snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "%d-%d:%s",
-                ac97->bus->card->number, ac97->num,
-                snd_ac97_get_short_name(ac97));
+       dev_set_name(&ac97->dev, "%d-%d:%s",
+                    ac97->bus->card->number, ac97->num,
+                    snd_ac97_get_short_name(ac97));
        if ((err = device_register(&ac97->dev)) < 0) {
                snd_printk(KERN_ERR "Can't register ac97 bus\n");
                ac97->dev.bus = NULL;
index 6447754ae56e3a6ef97af1434325df5d15ac8209..ba1ab737b55fe44010700aad11a3b316de91e861 100644 (file)
@@ -64,6 +64,7 @@ static struct hda_vendor_id hda_vendor_ids[] = {
        { 0x14f1, "Conexant" },
        { 0x17e8, "Chrontel" },
        { 0x1854, "LG" },
+       { 0x1aec, "Wolfson Microelectronics" },
        { 0x434d, "C-Media" },
        { 0x8384, "SigmaTel" },
        {} /* terminator */
index f080f8ce0ecb6a6bb56d3f2515ebaa0960b90d39..35722ec920cb0ed556cee27e19ad44929d34bc61 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/slab.h>
 #include <linux/pci.h>
 #include <linux/mutex.h>
+#include <linux/reboot.h>
 #include <sound/core.h>
 #include <sound/initval.h>
 #include "hda_codec.h"
@@ -397,6 +398,9 @@ struct azx {
 
        /* for pending irqs */
        struct work_struct irq_pending_work;
+
+       /* reboot notifier (for mysterious hangup problem at power-down) */
+       struct notifier_block reboot_notifier;
 };
 
 /* driver types */
@@ -1978,6 +1982,28 @@ static int azx_resume(struct pci_dev *pci)
 #endif /* CONFIG_PM */
 
 
+/*
+ * reboot notifier for hang-up problem at power-down
+ */
+static int azx_halt(struct notifier_block *nb, unsigned long event, void *buf)
+{
+       struct azx *chip = container_of(nb, struct azx, reboot_notifier);
+       azx_stop_chip(chip);
+       return NOTIFY_OK;
+}
+
+static void azx_notifier_register(struct azx *chip)
+{
+       chip->reboot_notifier.notifier_call = azx_halt;
+       register_reboot_notifier(&chip->reboot_notifier);
+}
+
+static void azx_notifier_unregister(struct azx *chip)
+{
+       if (chip->reboot_notifier.notifier_call)
+               unregister_reboot_notifier(&chip->reboot_notifier);
+}
+
 /*
  * destructor
  */
@@ -1985,6 +2011,8 @@ static int azx_free(struct azx *chip)
 {
        int i;
 
+       azx_notifier_unregister(chip);
+
        if (chip->initialized) {
                azx_clear_irq_pending(chip);
                for (i = 0; i < chip->num_streams; i++)
@@ -2348,6 +2376,7 @@ static int __devinit azx_probe(struct pci_dev *pci,
        pci_set_drvdata(pci, card);
        chip->running = 1;
        power_down_all_codecs(chip);
+       azx_notifier_register(chip);
 
        dev++;
        return err;
index 2b00c4afdf97c29b2761b374add4488b69916860..d3fd432cb3eaa243249a0785e162d98210ac1509 100644 (file)
@@ -3860,6 +3860,7 @@ static const char *ad1884a_models[AD1884A_MODELS] = {
 
 static struct snd_pci_quirk ad1884a_cfg_tbl[] = {
        SND_PCI_QUIRK(0x103c, 0x3030, "HP", AD1884A_MOBILE),
+       SND_PCI_QUIRK(0x103c, 0x3056, "HP", AD1884A_MOBILE),
        SND_PCI_QUIRK(0x17aa, 0x20ac, "Thinkpad X300", AD1884A_THINKPAD),
        {}
 };
index 788fdc6f326436d8388faf3294c86e5d91274d13..df9b0bc7f8785a82b6ca6ee0649b7c26ddc0659a 100644 (file)
@@ -566,10 +566,8 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol,
                        nid = codec->slave_dig_outs[smux_idx - 1];
                if (spec->cur_smux[smux_idx] == smux->num_items - 1)
                        val = AMP_OUT_MUTE;
-               if (smux_idx == 0)
-                       nid = spec->multiout.dig_out_nid;
                else
-                       nid = codec->slave_dig_outs[smux_idx - 1];
+                       val = AMP_OUT_UNMUTE;
                /* un/mute SPDIF out */
                snd_hda_codec_write_cache(codec, nid, 0,
                        AC_VERB_SET_AMP_GAIN_MUTE, val);
index 5b442383fcdabb7b3655ebcc575109933a554639..58d7cda03de5827f44b58ab435c602460c909b0f 100644 (file)
@@ -2688,12 +2688,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
                return err;
        }
 
-       if (ice_has_con_ac97(ice))
+       if (ice_has_con_ac97(ice)) {
                err = snd_ice1712_pcm(ice, pcm_dev++, NULL);
                if (err < 0) {
                        snd_card_free(card);
                        return err;
                }
+       }
 
        err = snd_ice1712_ac97_mixer(ice);
        if (err < 0) {
@@ -2715,12 +2716,13 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
                }
        }
 
-       if (ice_has_con_ac97(ice))
+       if (ice_has_con_ac97(ice)) {
                err = snd_ice1712_pcm_ds(ice, pcm_dev++, NULL);
                if (err < 0) {
                        snd_card_free(card);
                        return err;
                }
+       }
 
        if (!c->no_mpu401) {
                err = snd_mpu401_uart_new(card, 0, MPU401_HW_ICE1712,
index c88d1eace1c475ac81ecb07fa8f3994a05c4d994..19d3391e229f2f7e02615a12344142464dfcb902 100644 (file)
@@ -2702,6 +2702,7 @@ static struct snd_pci_quirk intel8x0_clock_list[] __devinitdata = {
        SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000),
        SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100),
        SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000),
+       SND_PCI_QUIRK(0x1028, 0x01ad, "AD1981B", 48000),
        SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000),
        { }     /* terminator */
 };
index aba402b3c99994a95489bde9e526da23f7d4ea69..945b32ed98840039a93289c108c27fd69656a927 100644 (file)
@@ -140,7 +140,7 @@ SOC_SINGLE("Capture ADC Boost (+20dB) Switch", AC97_VIDEO, 6, 1, 0),
 
 SOC_SINGLE("ALC Target Volume", AC97_CODEC_CLASS_REV, 12, 15, 0),
 SOC_SINGLE("ALC Hold Time", AC97_CODEC_CLASS_REV, 8, 15, 0),
-SOC_SINGLE("ALC Decay Time ", AC97_CODEC_CLASS_REV, 4, 15, 0),
+SOC_SINGLE("ALC Decay Time", AC97_CODEC_CLASS_REV, 4, 15, 0),
 SOC_SINGLE("ALC Attack Time", AC97_CODEC_CLASS_REV, 0, 15, 0),
 SOC_ENUM("ALC Function", wm9713_enum[6]),
 SOC_SINGLE("ALC Max Volume", AC97_PCI_SVID, 11, 7, 0),
index 86923299bc1049d9a74d274d449d6f0e5f32494e..94a02eaa4825a0ef1494c0f8e3798c2daef69504 100644 (file)
@@ -277,7 +277,7 @@ static int psc_i2s_trigger(struct snd_pcm_substream *substream, int cmd)
        struct mpc52xx_psc __iomem *regs = psc_i2s->psc_regs;
        u16 imr;
        u8 psc_cmd;
-       long flags;
+       unsigned long flags;
 
        if (substream->pstr->stream == SNDRV_PCM_STREAM_CAPTURE)
                s = &psc_i2s->capture;
@@ -699,9 +699,11 @@ static ssize_t psc_i2s_stat_store(struct device *dev,
        return count;
 }
 
-DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
-DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
-DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show, psc_i2s_stat_store);
+static DEVICE_ATTR(status, 0644, psc_i2s_status_show, NULL);
+static DEVICE_ATTR(playback_underrun, 0644, psc_i2s_stat_show,
+                       psc_i2s_stat_store);
+static DEVICE_ATTR(capture_overrun, 0644, psc_i2s_stat_show,
+                       psc_i2s_stat_store);
 
 /* ---------------------------------------------------------------------
  * OF platform bus binding code:
@@ -819,8 +821,8 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
 
        /* Register the SYSFS files */
        rc = device_create_file(psc_i2s->dev, &dev_attr_status);
-       rc = device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
-       rc = device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
+       rc |= device_create_file(psc_i2s->dev, &dev_attr_capture_overrun);
+       rc |= device_create_file(psc_i2s->dev, &dev_attr_playback_underrun);
        if (rc)
                dev_info(psc_i2s->dev, "error creating sysfs files\n");
 
index 462e635dfc74bc084f2c140480c4e6fe8e8cd7cc..a3adbf06b1e5e6dc1d2f51efa2a0213ae4dc9083 100644 (file)
@@ -1462,7 +1462,7 @@ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol,
        struct soc_mixer_control *mc =
                (struct soc_mixer_control *)kcontrol->private_value;
        int max = mc->max;
-       unsigned int shift = mc->min;
+       unsigned int shift = mc->shift;
        unsigned int rshift = mc->rshift;
 
        if (max == 1)
index 69689e79bf799b512efb44f82d542bad8d250b56..92115755d98e7f8626651ebbf3af6782e60ccd0e 100644 (file)
@@ -1480,6 +1480,36 @@ YAMAHA_DEVICE(0x7010, "UB99"),
                }
        }
 },
+{
+       /* Advanced modes of the Edirol UA-25EX.
+        * For the standard mode, UA-25EX has ID 0582:00e7, which
+        * offers only 16-bit PCM at 44.1 kHz and no MIDI.
+        */
+       USB_DEVICE_VENDOR_SPEC(0x0582, 0x00e6),
+       .driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
+               .vendor_name = "EDIROL",
+               .product_name = "UA-25EX",
+               .ifnum = QUIRK_ANY_INTERFACE,
+               .type = QUIRK_COMPOSITE,
+               .data = (const struct snd_usb_audio_quirk[]) {
+                       {
+                               .ifnum = 0,
+                               .type = QUIRK_AUDIO_EDIROL_UAXX
+                       },
+                       {
+                               .ifnum = 1,
+                               .type = QUIRK_AUDIO_EDIROL_UAXX
+                       },
+                       {
+                               .ifnum = 2,
+                               .type = QUIRK_AUDIO_EDIROL_UAXX
+                       },
+                       {
+                               .ifnum = -1
+                       }
+               }
+       }
+},
 
 /* Guillemot devices */
 {