Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
authorSteve French <sfrench@us.ibm.com>
Tue, 13 Dec 2005 18:15:39 +0000 (10:15 -0800)
committerSteve French <sfrench@us.ibm.com>
Tue, 13 Dec 2005 18:15:39 +0000 (10:15 -0800)
Signed-off-by: Steve French <sfrench@us.ibm.com>
238 files changed:
Documentation/arm/00-INDEX
Documentation/dvb/README.dvb-usb
Documentation/dvb/README.flexcop
Documentation/dvb/avermedia.txt
Documentation/dvb/cards.txt
Documentation/dvb/contributors.txt
Documentation/dvb/readme.txt
Documentation/filesystems/ext3.txt
Makefile
arch/arm/kernel/ptrace.c
arch/i386/kernel/kprobes.c
arch/i386/kernel/smpboot.c
arch/i386/kernel/traps.c
arch/i386/mm/ioremap.c
arch/i386/pci/direct.c
arch/i386/pci/mmconfig.c
arch/i386/pci/pci.h
arch/ia64/Kconfig
arch/ia64/configs/sn2_defconfig
arch/ia64/configs/tiger_defconfig
arch/ia64/ia32/binfmt_elf32.c
arch/ia64/ia32/ia32priv.h
arch/ia64/kernel/kprobes.c
arch/ia64/kernel/process.c
arch/ia64/kernel/salinfo.c
arch/ia64/mm/discontig.c
arch/ia64/sn/kernel/io_init.c
arch/ia64/sn/kernel/sn2/ptc_deadlock.S
arch/mips/mm/init.c
arch/powerpc/Kconfig
arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/setup_64.c
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/hugetlbpage.c
arch/powerpc/mm/numa.c
arch/powerpc/mm/stab.c
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/platforms/pseries/lpar.c
arch/ppc/Kconfig
arch/ppc/kernel/smp.c
arch/ppc/platforms/pmac_feature.c
arch/sparc/Makefile
arch/sparc/lib/atomic32.c
arch/sparc64/kernel/kprobes.c
arch/um/include/um_uaccess.h
arch/um/kernel/skas/include/uaccess-skas.h
arch/x86_64/ia32/ia32_binfmt.c
arch/x86_64/kernel/kprobes.c
arch/x86_64/kernel/smpboot.c
arch/x86_64/kernel/time.c
arch/x86_64/mm/ioremap.c
arch/x86_64/mm/numa.c
arch/x86_64/pci/mmconfig.c
drivers/acpi/pci_link.c
drivers/block/cciss.c
drivers/char/Kconfig
drivers/char/drm/radeon_cp.c
drivers/char/ipmi/ipmi_msghandler.c
drivers/char/watchdog/mpcore_wdt.c
drivers/connector/cn_proc.c
drivers/macintosh/windfarm_pm81.c
drivers/md/raid1.c
drivers/md/raid5.c
drivers/media/common/Kconfig
drivers/media/common/Makefile
drivers/media/common/ir-common.c
drivers/media/common/saa7146_core.c
drivers/media/common/saa7146_fops.c
drivers/media/common/saa7146_i2c.c
drivers/media/common/saa7146_vbi.c
drivers/media/common/saa7146_video.c
drivers/media/dvb/b2c2/flexcop-common.h
drivers/media/dvb/b2c2/flexcop-fe-tuner.c
drivers/media/dvb/bt8xx/dvb-bt8xx.c
drivers/media/dvb/dvb-core/demux.h
drivers/media/dvb/dvb-core/dmxdev.c
drivers/media/dvb/dvb-core/dmxdev.h
drivers/media/dvb/dvb-core/dvb_ca_en50221.c
drivers/media/dvb/dvb-core/dvb_filter.c
drivers/media/dvb/dvb-core/dvb_filter.h
drivers/media/dvb/dvb-core/dvb_frontend.c
drivers/media/dvb/dvb-core/dvb_frontend.h
drivers/media/dvb/dvb-core/dvb_net.c
drivers/media/dvb/dvb-core/dvb_ringbuffer.c
drivers/media/dvb/dvb-core/dvb_ringbuffer.h
drivers/media/dvb/dvb-core/dvbdev.c
drivers/media/dvb/dvb-core/dvbdev.h
drivers/media/dvb/dvb-usb/vp702x-fe.c
drivers/media/dvb/dvb-usb/vp7045-fe.c
drivers/media/dvb/frontends/at76c651.c
drivers/media/dvb/frontends/bcm3510.c
drivers/media/dvb/frontends/cx22700.c
drivers/media/dvb/frontends/cx22702.c
drivers/media/dvb/frontends/cx22702.h
drivers/media/dvb/frontends/cx24110.c
drivers/media/dvb/frontends/l64781.c
drivers/media/dvb/frontends/l64781.h
drivers/media/dvb/frontends/lgdt330x.c
drivers/media/dvb/frontends/mt312.c
drivers/media/dvb/frontends/nxt2002.c
drivers/media/dvb/frontends/nxt200x.c
drivers/media/dvb/frontends/nxt6000.c
drivers/media/dvb/frontends/or51132.c
drivers/media/dvb/frontends/s5h1420.c
drivers/media/dvb/frontends/s5h1420.h
drivers/media/dvb/frontends/sp8870.c
drivers/media/dvb/frontends/sp887x.c
drivers/media/dvb/frontends/stv0299.c
drivers/media/dvb/frontends/tda10021.c
drivers/media/dvb/frontends/tda10021.h
drivers/media/dvb/frontends/tda1004x.c
drivers/media/dvb/frontends/tda8083.c
drivers/media/dvb/ttpci/av7110.c
drivers/media/dvb/ttpci/av7110_hw.c
drivers/media/dvb/ttpci/av7110_v4l.c
drivers/media/dvb/ttpci/budget-core.c
drivers/media/dvb/ttpci/budget-patch.c
drivers/media/dvb/ttpci/budget.c
drivers/media/dvb/ttpci/budget.h
drivers/media/dvb/ttpci/fdump.c
drivers/media/dvb/ttpci/ttpci-eeprom.c
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/dvb/ttusb-budget/dvb-ttusb-dspbootcode.h
drivers/media/dvb/ttusb-dec/ttusb_dec.c
drivers/media/video/Kconfig
drivers/media/video/bt832.c
drivers/media/video/bttv-driver.c
drivers/media/video/bttvp.h
drivers/media/video/cx88/cx88-blackbird.c
drivers/media/video/cx88/cx88-input.c
drivers/media/video/cx88/cx88.h
drivers/media/video/em28xx/em28xx-core.c
drivers/media/video/em28xx/em28xx-i2c.c
drivers/media/video/em28xx/em28xx-video.c
drivers/media/video/em28xx/em28xx.h
drivers/media/video/ir-kbd-gpio.c
drivers/media/video/ir-kbd-i2c.c
drivers/media/video/msp3400.c
drivers/media/video/saa6588.c
drivers/media/video/saa711x.c
drivers/media/video/saa7134/saa6752hs.c
drivers/media/video/saa7134/saa7134-alsa.c
drivers/media/video/saa7134/saa7134-cards.c
drivers/media/video/saa7134/saa7134-core.c
drivers/media/video/saa7134/saa7134-empress.c
drivers/media/video/saa7134/saa7134-i2c.c
drivers/media/video/saa7134/saa7134-oss.c
drivers/media/video/tda9887.c
drivers/media/video/tvaudio.c
drivers/media/video/tveeprom.c
drivers/media/video/tvp5150.c
drivers/media/video/video-buf-dvb.c
drivers/mfd/ucb1x00-ts.c
drivers/mmc/mmc.c
drivers/mtd/devices/blkmtd.c
drivers/net/pcnet32.c
drivers/net/sk98lin/skge.c
drivers/net/skge.c
drivers/net/tg3.c
drivers/scsi/libata-core.c
drivers/scsi/libata-scsi.c
drivers/scsi/sata_mv.c
drivers/scsi/sata_promise.c
drivers/scsi/sata_sx4.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_scan.c
drivers/serial/8250_pci.c
drivers/video/bw2.c
drivers/video/cfbcopyarea.c
drivers/video/cfbfillrect.c
drivers/video/cfbimgblt.c
drivers/video/cg14.c
drivers/video/cg3.c
drivers/video/cg6.c
drivers/video/console/fbcon.c
drivers/video/fbmem.c
drivers/video/ffb.c
drivers/video/leo.c
drivers/video/p9100.c
drivers/video/tcx.c
fs/inotify.c
fs/xattr.c
include/asm-arm/arch-pxa/irq.h
include/asm-arm/io.h
include/asm-arm/memory.h
include/asm-ia64/ia32.h
include/asm-ia64/local.h
include/asm-ia64/sn/pcidev.h
include/asm-ia64/spinlock.h
include/asm-powerpc/mmu.h
include/linux/cn_proc.h
include/linux/dvb/audio.h
include/linux/dvb/ca.h
include/linux/dvb/dmx.h
include/linux/dvb/osd.h
include/linux/dvb/video.h
include/linux/fb.h
include/linux/i2c-id.h
include/linux/inotify.h
include/linux/kprobes.h
include/linux/libata.h
include/linux/list.h
include/linux/mm.h
include/linux/parport_pc.h
include/linux/rcupdate.h
include/linux/sysctl.h
include/linux/time.h
include/media/saa7146.h
include/media/saa7146_vv.h
include/net/dn.h
kernel/audit.c
kernel/kprobes.c
kernel/rcupdate.c
kernel/rcutorture.c
kernel/sys.c
kernel/time.c
mm/bootmem.c
mm/memory.c
net/core/dev.c
net/core/skbuff.c
net/decnet/af_decnet.c
net/decnet/sysctl_net_decnet.c
net/ieee80211/Kconfig
net/ipv4/netfilter/Kconfig
net/ipv4/netfilter/ip_conntrack_core.c
net/ipv4/netfilter/ip_conntrack_netlink.c
net/ipv4/netfilter/ip_conntrack_proto_tcp.c
net/ipv4/netfilter/ip_nat_tftp.c
net/ipv4/tcp_output.c
net/ipv4/tcp_vegas.c
net/ipv6/esp6.c
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
net/ipv6/tcp_ipv6.c
net/netfilter/Kconfig
net/netfilter/nf_conntrack_core.c
net/netfilter/nfnetlink.c
net/packet/af_packet.c

index d753fe59a248df4b8953cd2ac0e8222b6222d4dc..2c6a3b38967ea74a06c4b129c85fc1c1a54dd533 100644 (file)
@@ -16,5 +16,7 @@ empeg
        - Empeg documentation
 mem_alignment
        - alignment abort handler documentation
+memory.txt
+       - description of the virtual memory layout
 nwfpe
        - NWFPE floating point emulator documentation
index ac0797ea646c6f2c725fe4cf8c064ee38532d654..46b78b7331c27e4f0fe131336f08c25235138ad5 100644 (file)
@@ -50,12 +50,12 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
 0. History & News:
   2005-06-30 - added support for WideView WT-220U (Thanks to Steve Chang)
   2005-05-30 - added basic isochronous support to the dvb-usb-framework
-               added support for Conexant Hybrid reference design and Nebula DigiTV USB
+              added support for Conexant Hybrid reference design and Nebula DigiTV USB
   2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework
   2005-04-02 - re-enabled and improved remote control code.
   2005-03-31 - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.
   2005-03-30 - first commit of the dvb-usb-module based on the dibusb-source. First device is a new driver for the
-               TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
+              TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
 
   (change from dvb-dibusb to dvb-usb)
   2005-03-28 - added support for the AVerMedia AverTV DVB-T USB2.0 device (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)
@@ -64,50 +64,50 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
   2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB2
   2005-01-31 - distorted streaming is gone for USB1.1 devices
   2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb
-             - first almost working version for HanfTek UMT-010
-             - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
+            - first almost working version for HanfTek UMT-010
+            - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
   2005-01-10 - refactoring completed, now everything is very delightful
-             - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
-               Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
+            - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
+              Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
   2004-12-29 - after several days of struggling around bug of no returning URBs fixed.
   2004-12-26 - refactored the dibusb-driver, splitted into separate files
-             - i2c-probing enabled
+            - i2c-probing enabled
   2004-12-06 - possibility for demod i2c-address probing
-             - new usb IDs (Compro, Artec)
+            - new usb IDs (Compro, Artec)
   2004-11-23 - merged changes from DiB3000MC_ver2.1
-             - revised the debugging
-             - possibility to deliver the complete TS for USB2.0
+            - revised the debugging
+            - possibility to deliver the complete TS for USB2.0
   2004-11-21 - first working version of the dib3000mc/p frontend driver.
   2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke.
   2004-11-07 - added remote control support. Thanks to David Matthews.
   2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec)
-             - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
-             - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
-               better settled there (added xfer_ops-struct)
-             - created a common files for frontends (mc/p/mb)
+            - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
+            - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
+              better settled there (added xfer_ops-struct)
+            - created a common files for frontends (mc/p/mb)
   2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)
   2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
-               to Amaury Demol for reporting
-             - changed usb TS transfer method (several urbs, stopping transfer
-               before setting a new pid)
+              to Amaury Demol for reporting
+            - changed usb TS transfer method (several urbs, stopping transfer
+              before setting a new pid)
   2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks
-               to Christian Motschke for reporting
+              to Christian Motschke for reporting
   2004-09-05 - released the dibusb device and dib3000mb-frontend driver
 
   (old news for vp7041.c)
   2004-07-15 - found out, by accident, that the device has a TUA6010XS for
-               PLL
+              PLL
   2004-07-12 - figured out, that the driver should also work with the
-               CTS Portable (Chinese Television System)
+              CTS Portable (Chinese Television System)
   2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working
-               properly with firmware extracted from 2.422
-             - #if for 2.6.4 (dvb), compile issue
-             - changed firmware handling, see vp7041.txt sec 1.1
+              properly with firmware extracted from 2.422
+            - #if for 2.6.4 (dvb), compile issue
+            - changed firmware handling, see vp7041.txt sec 1.1
   2004-07-02 - some tuner modifications, v0.1, cleanups, first public
   2004-06-28 - now using the dvb_dmx_swfilter_packets, everything
-               runs fine now
+              runs fine now
   2004-06-27 - able to watch and switching channels (pre-alpha)
-             - no section filtering yet
+            - no section filtering yet
   2004-06-06 - first TS received, but kernel oops :/
   2004-05-14 - firmware loader is working
   2004-05-11 - start writing the driver
index a50c70f9ca7208d90df90f247cf7d38110272163..5515469de7cf6aaf2d339fd18eec62df773b70d2 100644 (file)
@@ -174,7 +174,7 @@ Debugging
 Everything which is identical in the following table, can be put into a common
 flexcop-module.
 
-                  PCI                  USB
+                 PCI                  USB
 -------------------------------------------------------------------------------
 Different:
 Register access:  accessing IO memory  USB control message
index 09020ebd202b1bfa38e2b016f3628922fea26e4e..2dc260b2b0a4a417c0e489b4713037373d1b0dd5 100644 (file)
@@ -1,6 +1,6 @@
 
 HOWTO: Get An Avermedia DVB-T working under Linux
-           ______________________________________________
+          ______________________________________________
 
    Table of Contents
    Assumptions and Introduction
index 19329cf7b09798462293f70928bca66e89b80f5a..9e10092440e1d61836481300004740ee1f89d984 100644 (file)
@@ -16,7 +16,7 @@ Hardware supported by the linuxtv.org DVB drivers
   shielding, and the whole metal box has its own part number.
 
 
-o Frontends drivers: 
+o Frontends drivers:
   - dvb_dummy_fe: for testing...
   DVB-S:
    - ves1x93           : Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
@@ -24,7 +24,7 @@ o Frontends drivers:
    - grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
    - mt312             : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
    - stv0299           : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
-                         LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL), 
+                         LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
                          Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB
   DVB-C:
    - ves1820           : various (ves1820 demodulator, sp5659c or spXXXX PLL)
@@ -35,8 +35,8 @@ o Frontends drivers:
    - grundig_29504-401 : Grundig 29504-401 (LSI L64781 demodulator), tsa5060 PLL
    - tda1004x          : Philips tda10045h (td1344 or tdm1316l PLL)
    - nxt6000           : Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),
-                                 Comtech DVBT-6k07 (SP5730 PLL)
-                                 (NxtWave Communications NXT6000 demodulator)
+                         Comtech DVBT-6k07 (SP5730 PLL)
+                         (NxtWave Communications NXT6000 demodulator)
    - sp887x            : Microtune 7202D
    - dib3000mb : DiBcom 3000-MB demodulator
   DVB-S/C/T:
index 2cbd2d0f6fdf73475d9623fbdcf9075094373d4e..4c33cced5f657fd25be698d01a25473a11c0dfd4 100644 (file)
@@ -15,7 +15,7 @@ Michael Holzt <kju@debian.org>
 
 Diego Picciani <d.picciani@novacomp.it>
   for CyberLogin for Linux which allows logging onto EON
-  (in case you are wondering where CyberLogin is, EON changed its login 
+  (in case you are wondering where CyberLogin is, EON changed its login
   procedure and CyberLogin is no longer used.)
 
 Martin Schaller <martin@smurf.franken.de>
@@ -57,7 +57,7 @@ Augusto Cardoso <augusto@carhil.net>
 Davor Emard <emard@softhome.net>
   for his work on the budget drivers, the demux code,
   the module unloading problems, ...
-  
+
 Hans-Frieder Vogt <hfvogt@arcor.de>
   for his work on calculating and checking the crc's for the
   TechnoTrend/Hauppauge DEC driver firmware
index 754c98c6ad942049dcb5cfcf05e48abd161738f3..f5c50b22de3b89e09bb8553854cc8452d76bc110 100644 (file)
@@ -20,7 +20,7 @@ http://linuxtv.org/downloads/
 
 What's inside this directory:
 
-"cards.txt" 
+"cards.txt"
 contains a list of supported hardware.
 
 "contributors.txt"
@@ -37,7 +37,7 @@ that require it.
 contains detailed informations about the
 TT DEC2000/DEC3000 USB DVB hardware.
 
-"bt8xx.txt" 
+"bt8xx.txt"
 contains detailed installation instructions for the
 various bt8xx based "budget" DVB cards
 (Nebula, Pinnacle PCTV, Twinhan DST)
index 9ab7f446f7adb76e1752aa4d020a9fa201fe03f1..9840d5b8d5b9997621964653f6b3d348dd08f9b7 100644 (file)
@@ -57,19 +57,19 @@ oldalloc            This disables the Orlov block allocator and enables the
                        we'd like to get some feedback if it's the contrary for
                        you.
 
-user_xattr     (*)     Enables POSIX Extended Attributes. It's enabled by
-                       default, however you need to confifure its support
-                       (CONFIG_EXT3_FS_XATTR). This is neccesary if you want
-                       to use POSIX Acces Control Lists support. You can visit
-                       http://acl.bestbits.at to know more about POSIX Extended
-                       attributes.
-
-nouser_xattr           Disables POSIX Extended Attributes.
-
-acl            (*)     Enables POSIX Access Control Lists support. This is
-                       enabled by default, however you need to configure
-                       its support (CONFIG_EXT3_FS_POSIX_ACL). If you want
-                       to know more about ACLs visit http://acl.bestbits.at
+user_xattr             Enables Extended User Attributes. Additionally, you need
+                       to have extended attribute support enabled in the kernel
+                       configuration (CONFIG_EXT3_FS_XATTR). See the attr(5)
+                       manual page and http://acl.bestbits.at to learn more
+                       about extended attributes.
+
+nouser_xattr           Disables Extended User Attributes.
+
+acl                    Enables POSIX Access Control Lists support.  Additionally,
+                       you need to have ACL support enabled in the kernel
+                       configuration (CONFIG_EXT3_FS_POSIX_ACL). See the acl(5)
+                       manual page and http://acl.bestbits.at for more
+                       information.
 
 noacl                  This option disables POSIX Access Control List support.
 
index b1c458c2522d5ae30c538a867101b1f4cbea18cc..ad457e1bd0d25707febd5f6f53934357c86d1326 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -408,7 +408,7 @@ outputmakefile:
 # of make so .config is not included in this case either (for *config).
 
 no-dot-config-targets := clean mrproper distclean \
-                        cscope TAGS tags help %docs check% kernelrelease
+                        cscope TAGS tags help %docs check%
 
 config-targets := 0
 mixed-targets  := 0
index 9a340e790da52a9b801857c2da22226f89c91d66..2b84f78d7b0f78585698e54bf137f3cde7634205 100644 (file)
@@ -242,6 +242,15 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
                 */
                long aluop1, aluop2, ccbit;
 
+               if ((insn & 0x0fffffd0) == 0x012fff10) {
+                       /*
+                        * bx or blx
+                        */
+                       alt = get_user_reg(child, insn & 15);
+                       break;
+               }
+
+
                if ((insn & 0xf000) != 0xf000)
                        break;
 
index 32b0c24ab9a6dcca721414a7027635aa06d2c828..19edcd526ba4800f9c71c66ef7ad18da5eb1b7bc 100644 (file)
@@ -191,7 +191,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
                         */
                        save_previous_kprobe(kcb);
                        set_current_kprobe(p, regs, kcb);
-                       p->nmissed++;
+                       kprobes_inc_nmissed_count(p);
                        prepare_singlestep(p, regs);
                        kcb->kprobe_status = KPROBE_REENTER;
                        return 1;
index d16520da4550e6d1b5d318a56a2f1ba1b852728c..9ed449af8e9fdd350a42ff2c606c0af154dad875 100644 (file)
@@ -1338,8 +1338,7 @@ int __cpu_disable(void)
        if (cpu == 0)
                return -EBUSY;
 
-       /* We enable the timer again on the exit path of the death loop */
-       disable_APIC_timer();
+       clear_local_APIC();
        /* Allow any queued timer interrupts to get serviced */
        local_irq_enable();
        mdelay(1);
index c34d1bfc51619b0ee978740d34ffad9d6dd499bb..f0dffa03fbbaec9d1efec46f02441b0427eb92f8 100644 (file)
@@ -650,13 +650,6 @@ fastcall void do_nmi(struct pt_regs * regs, long error_code)
 
        cpu = smp_processor_id();
 
-#ifdef CONFIG_HOTPLUG_CPU
-       if (!cpu_online(cpu)) {
-               nmi_exit();
-               return;
-       }
-#endif
-
        ++nmi_count(cpu);
 
        if (!rcu_dereference(nmi_callback)(regs, cpu))
index 5d09de8d1c6b17e2048f485aa940f53589ec94e1..8498b5ac3955c54939bec5acca0754ba314238c0 100644 (file)
@@ -223,9 +223,15 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 }
 EXPORT_SYMBOL(ioremap_nocache);
 
+/**
+ * iounmap - Free a IO remapping
+ * @addr: virtual address from ioremap_*
+ *
+ * Caller must ensure there is only one unmapping for the same pointer.
+ */
 void iounmap(volatile void __iomem *addr)
 {
-       struct vm_struct *p;
+       struct vm_struct *p, *o;
 
        if ((void __force *)addr <= high_memory)
                return;
@@ -239,22 +245,37 @@ void iounmap(volatile void __iomem *addr)
                        addr < phys_to_virt(ISA_END_ADDRESS))
                return;
 
-       write_lock(&vmlist_lock);
-       p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));
-       if (!p) { 
-               printk(KERN_WARNING "iounmap: bad address %p\n", addr);
+       addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr);
+
+       /* Use the vm area unlocked, assuming the caller
+          ensures there isn't another iounmap for the same address
+          in parallel. Reuse of the virtual address is prevented by
+          leaving it in the global lists until we're done with it.
+          cpa takes care of the direct mappings. */
+       read_lock(&vmlist_lock);
+       for (p = vmlist; p; p = p->next) {
+               if (p->addr == addr)
+                       break;
+       }
+       read_unlock(&vmlist_lock);
+
+       if (!p) {
+               printk("iounmap: bad address %p\n", addr);
                dump_stack();
-               goto out_unlock;
+               return;
        }
 
+       /* Reset the direct mapping. Can block */
        if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
                change_page_attr(virt_to_page(__va(p->phys_addr)),
                                 p->size >> PAGE_SHIFT,
                                 PAGE_KERNEL);
                global_flush_tlb();
        } 
-out_unlock:
-       write_unlock(&vmlist_lock);
+
+       /* Finally remove it */
+       o = remove_vm_area((void *)addr);
+       BUG_ON(p != o || o == NULL);
        kfree(p); 
 }
 EXPORT_SYMBOL(iounmap);
index 94331d6be7a366199bb321b192549f3c7d305022..e3ac502bf2fbac541cf57f52bef2a5a7300b881f 100644 (file)
@@ -13,7 +13,7 @@
 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \
        (0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3))
 
-static int pci_conf1_read(unsigned int seg, unsigned int bus,
+int pci_conf1_read(unsigned int seg, unsigned int bus,
                          unsigned int devfn, int reg, int len, u32 *value)
 {
        unsigned long flags;
@@ -42,7 +42,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus,
        return 0;
 }
 
-static int pci_conf1_write(unsigned int seg, unsigned int bus,
+int pci_conf1_write(unsigned int seg, unsigned int bus,
                           unsigned int devfn, int reg, int len, u32 value)
 {
        unsigned long flags;
index dfbf80cff8346af0504df3601e6e251becc7de06..08a084901212ecddbf1b27b57a2ab48c62eddb7a 100644 (file)
 /* The base address of the last MMCONFIG device accessed */
 static u32 mmcfg_last_accessed_device;
 
+static DECLARE_BITMAP(fallback_slots, 32);
+
 /*
  * Functions for accessing PCI configuration space with MMCONFIG accesses
  */
-static u32 get_base_addr(unsigned int seg, int bus)
+static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
 {
        int cfg_num = -1;
        struct acpi_table_mcfg_config *cfg;
 
+       if (seg == 0 && bus == 0 &&
+           test_bit(PCI_SLOT(devfn), fallback_slots))
+               return 0;
+
        while (1) {
                ++cfg_num;
                if (cfg_num >= pci_mmcfg_config_num) {
-                       /* something bad is going on, no cfg table is found. */
-                       /* so we fall back to the old way we used to do this */
-                       /* and just rely on the first entry to be correct. */
-                       return pci_mmcfg_config[0].base_address;
+                       /* Not found - fallback to type 1 */
+                       return 0;
                }
                cfg = &pci_mmcfg_config[cfg_num];
                if (cfg->pci_segment_group_number != seg)
@@ -44,9 +48,9 @@ static u32 get_base_addr(unsigned int seg, int bus)
        }
 }
 
-static inline void pci_exp_set_dev_base(unsigned int seg, int bus, int devfn)
+static inline void pci_exp_set_dev_base(unsigned int base, int bus, int devfn)
 {
-       u32 dev_base = get_base_addr(seg, bus) | (bus << 20) | (devfn << 12);
+       u32 dev_base = base | (bus << 20) | (devfn << 12);
        if (dev_base != mmcfg_last_accessed_device) {
                mmcfg_last_accessed_device = dev_base;
                set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);
@@ -57,13 +61,18 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
                          unsigned int devfn, int reg, int len, u32 *value)
 {
        unsigned long flags;
+       u32 base;
 
        if (!value || (bus > 255) || (devfn > 255) || (reg > 4095))
                return -EINVAL;
 
+       base = get_base_addr(seg, bus, devfn);
+       if (!base)
+               return pci_conf1_read(seg,bus,devfn,reg,len,value);
+
        spin_lock_irqsave(&pci_config_lock, flags);
 
-       pci_exp_set_dev_base(seg, bus, devfn);
+       pci_exp_set_dev_base(base, bus, devfn);
 
        switch (len) {
        case 1:
@@ -86,13 +95,18 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
                           unsigned int devfn, int reg, int len, u32 value)
 {
        unsigned long flags;
+       u32 base;
 
        if ((bus > 255) || (devfn > 255) || (reg > 4095)) 
                return -EINVAL;
 
+       base = get_base_addr(seg, bus, devfn);
+       if (!base)
+               return pci_conf1_write(seg,bus,devfn,reg,len,value);
+
        spin_lock_irqsave(&pci_config_lock, flags);
 
-       pci_exp_set_dev_base(seg, bus, devfn);
+       pci_exp_set_dev_base(base, bus, devfn);
 
        switch (len) {
        case 1:
@@ -116,6 +130,37 @@ static struct pci_raw_ops pci_mmcfg = {
        .write =        pci_mmcfg_write,
 };
 
+/* K8 systems have some devices (typically in the builtin northbridge)
+   that are only accessible using type1
+   Normally this can be expressed in the MCFG by not listing them
+   and assigning suitable _SEGs, but this isn't implemented in some BIOS.
+   Instead try to discover all devices on bus 0 that are unreachable using MM
+   and fallback for them.
+   We only do this for bus 0/seg 0 */
+static __init void unreachable_devices(void)
+{
+       int i;
+       unsigned long flags;
+
+       for (i = 0; i < 32; i++) {
+               u32 val1;
+               u32 addr;
+
+               pci_conf1_read(0, 0, PCI_DEVFN(i, 0), 0, 4, &val1);
+               if (val1 == 0xffffffff)
+                       continue;
+
+               /* Locking probably not needed, but safer */
+               spin_lock_irqsave(&pci_config_lock, flags);
+               addr = get_base_addr(0, 0, PCI_DEVFN(i, 0));
+               if (addr != 0)
+                       pci_exp_set_dev_base(addr, 0, PCI_DEVFN(i, 0));
+               if (addr == 0 || readl((u32 *)addr) != val1)
+                       set_bit(i, fallback_slots);
+               spin_unlock_irqrestore(&pci_config_lock, flags);
+       }
+}
+
 static int __init pci_mmcfg_init(void)
 {
        if ((pci_probe & PCI_PROBE_MMCONF) == 0)
@@ -131,6 +176,8 @@ static int __init pci_mmcfg_init(void)
        raw_pci_ops = &pci_mmcfg;
        pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
 
+       unreachable_devices();
+
  out:
        return 0;
 }
index 127d53ad16bef02f65cd8011cbd1c5ec6fd70e7a..f550781ec3105f48d517b2ed09fcc80ddc5cba24 100644 (file)
@@ -74,3 +74,10 @@ extern spinlock_t pci_config_lock;
 
 extern int (*pcibios_enable_irq)(struct pci_dev *dev);
 extern void (*pcibios_disable_irq)(struct pci_dev *dev);
+
+extern int pci_conf1_write(unsigned int seg, unsigned int bus,
+                          unsigned int devfn, int reg, int len, u32 value);
+extern int pci_conf1_read(unsigned int seg, unsigned int bus,
+                         unsigned int devfn, int reg, int len, u32 *value);
+
+
index b76ce1fe2e7f31c04858901fac13dd66e7efff29..199eeaf0f4e3829267b6de3ebf4efdedbaa4d68c 100644 (file)
@@ -58,7 +58,7 @@ config IA64_UNCACHED_ALLOCATOR
        bool
        select GENERIC_ALLOCATOR
 
-config ZONE_DMA_IS_DMA32
+config DMA_IS_DMA32
        bool
        default y
 
index 87cfd31a4a3932a401d6e69d5dd0c86bd843112d..e1924cc9687b91c385ab494116b53217df3ba2da 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.13-rc6
-# Tue Aug 16 14:40:41 2005
+# Linux kernel version: 2.6.15-rc4
+# Fri Dec  2 10:33:48 2005
 #
 
 #
@@ -16,6 +16,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 #
 CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
@@ -26,6 +27,7 @@ CONFIG_HOTPLUG=y
 CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 CONFIG_CPUSETS=y
+CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
@@ -55,12 +57,30 @@ CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
 
+#
+# Block layer
+#
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
 #
 # Processor type and features
 #
 CONFIG_IA64=y
 CONFIG_64BIT=y
 CONFIG_MMU=y
+CONFIG_SWIOTLB=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_TIME_INTERPOLATION=y
@@ -68,6 +88,7 @@ CONFIG_EFI=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_IA64_UNCACHED_ALLOCATOR=y
+CONFIG_ZONE_DMA_IS_DMA32=y
 # CONFIG_IA64_GENERIC is not set
 # CONFIG_IA64_DIG is not set
 # CONFIG_IA64_HP_ZX1 is not set
@@ -87,14 +108,10 @@ CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_NUMA=y
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_HOLES_IN_ZONE=y
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 # CONFIG_IA64_CYCLONE is not set
 CONFIG_IOSAPIC=y
 CONFIG_IA64_SGI_SN_XP=m
-CONFIG_FORCE_MAX_ZONEORDER=18
+CONFIG_FORCE_MAX_ZONEORDER=17
 CONFIG_SMP=y
 CONFIG_NR_CPUS=512
 # CONFIG_HOTPLUG_CPU is not set
@@ -107,7 +124,17 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
-CONFIG_HAVE_DEC_LOCK=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
+CONFIG_NUMA=y
+CONFIG_VIRTUAL_MEM_MAP=y
+CONFIG_HOLES_IN_ZONE=y
+CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
 CONFIG_IA64_MCA_RECOVERY=y
@@ -126,20 +153,28 @@ CONFIG_BINFMT_ELF=y
 # Power management and ACPI
 #
 CONFIG_PM=y
-CONFIG_ACPI=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
 
 #
 # ACPI (Advanced Configuration and Power Interface) Support
 #
+CONFIG_ACPI=y
 # CONFIG_ACPI_BUTTON is not set
 # CONFIG_ACPI_FAN is not set
 # CONFIG_ACPI_PROCESSOR is not set
 CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_SYSTEM=y
 # CONFIG_ACPI_CONTAINER is not set
 
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
 #
 # Bus options (PCI, PCMCIA)
 #
@@ -147,7 +182,6 @@ CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCI_MSI is not set
 CONFIG_PCI_LEGACY_PROC=y
-CONFIG_PCI_NAMES=y
 # CONFIG_PCI_DEBUG is not set
 
 #
@@ -191,8 +225,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_BIC=y
 CONFIG_IPV6=m
@@ -204,6 +238,11 @@ CONFIG_IPV6=m
 # CONFIG_IPV6_TUNNEL is not set
 # CONFIG_NETFILTER is not set
 
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
 #
 # SCTP Configuration (EXPERIMENTAL)
 #
@@ -220,8 +259,11 @@ CONFIG_IPV6=m
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
 # CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
 
 #
 # Network testing
@@ -230,6 +272,7 @@ CONFIG_IPV6=m
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
 
 #
 # Device Drivers
@@ -243,6 +286,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
 # CONFIG_DEBUG_DRIVER is not set
 
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
 #
 # Memory Technology Devices (MTD)
 #
@@ -275,16 +323,7 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 CONFIG_ATA_OVER_ETH=m
 
 #
@@ -349,6 +388,7 @@ CONFIG_IDEDMA_AUTO=y
 #
 # SCSI device support
 #
+# CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
 CONFIG_SCSI_PROC_FS=y
 
@@ -375,11 +415,13 @@ CONFIG_SCSI_CONSTANTS=y
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_SAS_ATTRS=y
 
 #
 # SCSI low-level drivers
 #
+CONFIG_ISCSI_TCP=m
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_ACARD is not set
@@ -389,15 +431,19 @@ CONFIG_SCSI_FC_ATTRS=y
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
 CONFIG_SCSI_SATA=y
 # CONFIG_SCSI_SATA_AHCI is not set
 # CONFIG_SCSI_SATA_SVW is not set
 # CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_MV is not set
 # CONFIG_SCSI_SATA_NV is not set
-# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_PDC_ADMA is not set
 # CONFIG_SCSI_SATA_QSTOR is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
 # CONFIG_SCSI_SATA_SX4 is not set
 # CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIL24 is not set
 # CONFIG_SCSI_SATA_SIS is not set
 # CONFIG_SCSI_SATA_ULI is not set
 # CONFIG_SCSI_SATA_VIA is not set
@@ -411,7 +457,6 @@ CONFIG_SCSI_SATA_VITESSE=y
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 CONFIG_SCSI_QLOGIC_1280=y
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA21XX is not set
 CONFIG_SCSI_QLA22XX=y
@@ -451,6 +496,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_FUSION=y
 CONFIG_FUSION_SPI=y
 CONFIG_FUSION_FC=y
+CONFIG_FUSION_SAS=y
 CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 
@@ -478,6 +524,10 @@ CONFIG_NETDEVICES=y
 #
 # CONFIG_ARCNET is not set
 
+#
+# PHY device support
+#
+
 #
 # Ethernet (10 or 100Mbit)
 #
@@ -493,6 +543,7 @@ CONFIG_NETDEVICES=y
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
 # CONFIG_SK98LIN is not set
 CONFIG_TIGON3=y
@@ -501,10 +552,10 @@ CONFIG_TIGON3=y
 #
 # Ethernet (10000 Mbit)
 #
+CONFIG_CHELSIO_T1=m
 # CONFIG_IXGB is not set
 CONFIG_S2IO=m
 # CONFIG_S2IO_NAPI is not set
-# CONFIG_2BUFF_MODE is not set
 
 #
 # Token Ring devices
@@ -583,6 +634,7 @@ CONFIG_HW_CONSOLE=y
 CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_ROCKETPORT is not set
 # CONFIG_CYCLADES is not set
+# CONFIG_DIGIEPCA is not set
 # CONFIG_MOXA_SMARTIO is not set
 # CONFIG_ISI is not set
 # CONFIG_SYNCLINKMP is not set
@@ -629,7 +681,8 @@ CONFIG_EFI_RTC=y
 #
 # Ftape, the floppy tape device driver
 #
-# CONFIG_AGP is not set
+CONFIG_AGP=y
+CONFIG_AGP_SGI_TIOCA=y
 # CONFIG_DRM is not set
 CONFIG_RAW_DRIVER=m
 # CONFIG_HPET is not set
@@ -641,12 +694,12 @@ CONFIG_MMTIMER=y
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
 #
 # CONFIG_I2C is not set
-# CONFIG_I2C_SENSOR is not set
 
 #
 # Dallas's 1-wire bus
@@ -657,11 +710,16 @@ CONFIG_MMTIMER=y
 # Hardware Monitoring support
 #
 # CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
 
 #
 # Misc devices
 #
 
+#
+# Multimedia Capabilities Port drivers
+#
+
 #
 # Multimedia devices
 #
@@ -721,12 +779,15 @@ CONFIG_USB_UHCI_HCD=m
 #
 # USB Device Class drivers
 #
-# CONFIG_USB_BLUETOOTH_TTY is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
 #
 # CONFIG_USB_STORAGE is not set
 
@@ -751,9 +812,11 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_MTOUCH is not set
 # CONFIG_USB_ITMTOUCH is not set
 # CONFIG_USB_EGALAX is not set
+# CONFIG_USB_YEALINK is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
 
 #
 # USB Imaging devices
@@ -824,11 +887,13 @@ CONFIG_USB_MON=y
 # InfiniBand support
 #
 CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_VERBS=m
+# CONFIG_INFINIBAND_USER_MAD is not set
+CONFIG_INFINIBAND_USER_ACCESS=m
 CONFIG_INFINIBAND_MTHCA=m
 # CONFIG_INFINIBAND_MTHCA_DEBUG is not set
 CONFIG_INFINIBAND_IPOIB=m
 # CONFIG_INFINIBAND_IPOIB_DEBUG is not set
+CONFIG_INFINIBAND_SRP=m
 
 #
 # SN Devices
@@ -858,16 +923,12 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
-
-#
-# XFS support
-#
 CONFIG_XFS_FS=y
 CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
 CONFIG_XFS_QUOTA=y
 # CONFIG_XFS_SECURITY is not set
 CONFIG_XFS_POSIX_ACL=y
+CONFIG_XFS_RT=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
@@ -878,6 +939,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
 CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
 
 #
 # CD-ROM/DVD Filesystems
@@ -904,13 +966,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_SYSFS=y
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
 CONFIG_RAMFS=y
+CONFIG_RELAYFS_FS=m
 
 #
 # Miscellaneous filesystems
@@ -959,6 +1019,7 @@ CONFIG_CIFS=m
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 #
 # Partition Types
@@ -1028,18 +1089,21 @@ CONFIG_NLS_UTF8=y
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
+CONFIG_CRC16=m
 CONFIG_CRC32=y
-# CONFIG_LIBCRC32C is not set
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
 
 #
-# Profiling support
+# Instrumentation Support
 #
 # CONFIG_PROFILING is not set
+# CONFIG_KPROBES is not set
 
 #
 # Kernel hacking
@@ -1048,6 +1112,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOG_BUF_SHIFT=20
+CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
 CONFIG_DEBUG_PREEMPT=y
@@ -1056,7 +1121,8 @@ CONFIG_DEBUG_PREEMPT=y
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_FS is not set
-# CONFIG_KPROBES is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
@@ -1097,7 +1163,7 @@ CONFIG_CRYPTO_DES=m
 # CONFIG_CRYPTO_ANUBIS is not set
 CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 
 #
index 9bc8bcafc9050ffd5f70f55caeeb8b0d1cef2a99..b1e8f09e9fd5654f46b3736156741b397bf8a2a9 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.14-rc1
-# Wed Sep 14 15:17:57 2005
+# Linux kernel version: 2.6.15-rc4
+# Fri Dec  2 16:06:32 2005
 #
 
 #
@@ -58,18 +58,37 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
 
+#
+# Block layer
+#
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
 #
 # Processor type and features
 #
 CONFIG_IA64=y
 CONFIG_64BIT=y
 CONFIG_MMU=y
+CONFIG_SWIOTLB=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_TIME_INTERPOLATION=y
 CONFIG_EFI=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ZONE_DMA_IS_DMA32=y
 # CONFIG_IA64_GENERIC is not set
 CONFIG_IA64_DIG=y
 # CONFIG_IA64_HP_ZX1 is not set
@@ -82,18 +101,16 @@ CONFIG_MCKINLEY=y
 # CONFIG_IA64_PAGE_SIZE_8KB is not set
 CONFIG_IA64_PAGE_SIZE_16KB=y
 # CONFIG_IA64_PAGE_SIZE_64KB is not set
+CONFIG_PGTABLE_3=y
+# CONFIG_PGTABLE_4 is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_IA64_L1_CACHE_SHIFT=7
-# CONFIG_NUMA is not set
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_HOLES_IN_ZONE=y
 CONFIG_IA64_CYCLONE=y
 CONFIG_IOSAPIC=y
-# CONFIG_IA64_SGI_SN_XP is not set
-CONFIG_FORCE_MAX_ZONEORDER=18
+CONFIG_FORCE_MAX_ZONEORDER=17
 CONFIG_SMP=y
 CONFIG_NR_CPUS=4
 CONFIG_HOTPLUG_CPU=y
@@ -106,7 +123,13 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_HAVE_DEC_LOCK=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_VIRTUAL_MEM_MAP=y
+CONFIG_HOLES_IN_ZONE=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
 CONFIG_IA64_MCA_RECOVERY=y
@@ -118,7 +141,6 @@ CONFIG_IA64_PALINFO=y
 #
 CONFIG_EFI_VARS=y
 CONFIG_EFI_PCDP=y
-# CONFIG_DELL_RBU is not set
 CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=m
 
@@ -126,6 +148,7 @@ CONFIG_BINFMT_MISC=m
 # Power management and ACPI
 #
 CONFIG_PM=y
+CONFIG_PM_LEGACY=y
 # CONFIG_PM_DEBUG is not set
 
 #
@@ -226,14 +249,16 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
 # CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
 
 #
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
-# CONFIG_NETFILTER_NETLINK is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
@@ -295,14 +320,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_ATA_OVER_ETH is not set
 
 #
@@ -400,6 +417,7 @@ CONFIG_SCSI_FC_ATTRS=y
 #
 # SCSI low-level drivers
 #
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_ACARD is not set
@@ -409,6 +427,7 @@ CONFIG_SCSI_FC_ATTRS=y
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -424,7 +443,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 CONFIG_SCSI_QLOGIC_FC=y
 # CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
 CONFIG_SCSI_QLOGIC_1280=y
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 CONFIG_SCSI_QLA21XX=m
 CONFIG_SCSI_QLA22XX=m
@@ -463,6 +481,7 @@ CONFIG_DM_ZERO=m
 CONFIG_FUSION=y
 CONFIG_FUSION_SPI=y
 CONFIG_FUSION_FC=y
+# CONFIG_FUSION_SAS is not set
 CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=y
 
@@ -503,6 +522,7 @@ CONFIG_NET_ETHERNET=y
 CONFIG_MII=m
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 
 #
@@ -727,6 +747,7 @@ CONFIG_MAX_RAW_DEVS=256
 # TPM devices
 #
 # CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
 
 #
 # I2C support
@@ -812,12 +833,15 @@ CONFIG_USB_UHCI_HCD=y
 #
 # USB Device Class drivers
 #
-# CONFIG_USB_BLUETOOTH_TTY is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
 
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
 #
 CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1123,9 +1147,10 @@ CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_PENDING_IRQ=y
 
 #
-# Profiling support
+# Instrumentation Support
 #
 # CONFIG_PROFILING is not set
+# CONFIG_KPROBES is not set
 
 #
 # Kernel hacking
@@ -1142,7 +1167,8 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_FS is not set
-# CONFIG_KPROBES is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
index a7280d9f6c1634d80cdd7b1b48a90d6eb3a138f4..4e7a6a1ec6c7c3f9c542483cbef4071e33ef972d 100644 (file)
@@ -261,8 +261,6 @@ elf32_set_personality (void)
 {
        set_personality(PER_LINUX32);
        current->thread.map_base  = IA32_PAGE_OFFSET/3;
-       current->thread.task_size = IA32_PAGE_OFFSET;   /* use what Linux/x86 uses... */
-       set_fs(USER_DS);                                /* set addr limit for new TASK_SIZE */
 }
 
 static unsigned long
index e3e9290e3ff2f433f649daa418a2c35a0c00ed5e..68ceb4e690c7a63a91960f750ab6282094938246 100644 (file)
@@ -305,7 +305,6 @@ struct old_linux32_dirent {
 #define ELF_DATA       ELFDATA2LSB
 #define ELF_ARCH       EM_386
 
-#define IA32_PAGE_OFFSET       0xc0000000
 #define IA32_STACK_TOP         IA32_PAGE_OFFSET
 #define IA32_GATE_OFFSET       IA32_PAGE_OFFSET
 #define IA32_GATE_END          IA32_PAGE_OFFSET + PAGE_SIZE
index 2895d6e6062f72df56f7f064fe8057077496c9d1..89a70400c4f638efa3ed6face511777cf90bb5b4 100644 (file)
@@ -630,7 +630,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
                         */
                        save_previous_kprobe(kcb);
                        set_current_kprobe(p, kcb);
-                       p->nmissed++;
+                       kprobes_inc_nmissed_count(p);
                        prepare_ss(p, regs);
                        kcb->kprobe_status = KPROBE_REENTER;
                        return 1;
index 2e33665d9c18db01046f41e64002db351a08f180..a4da715a360ca74c01b0a3c55f39ef43179c3fc3 100644 (file)
@@ -721,8 +721,11 @@ flush_thread (void)
        /* drop floating-point and debug-register state if it exists: */
        current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
        ia64_drop_fpu(current);
-       if (IS_IA32_PROCESS(ia64_task_regs(current)))
+       if (IS_IA32_PROCESS(ia64_task_regs(current))) {
                ia32_drop_partial_page_list(current);
+               current->thread.task_size = IA32_PAGE_OFFSET;
+               set_fs(USER_DS);
+       }
 }
 
 /*
index ca68e6e44a7272275602b8914cd87166a70f5d3e..1461dc660b43af305b6b0687518f0e771b7d8dfe 100644 (file)
@@ -293,7 +293,7 @@ retry:
                if (file->f_flags & O_NONBLOCK)
                        return -EAGAIN;
                if (down_interruptible(&data->sem))
-                       return -ERESTARTSYS;
+                       return -EINTR;
        }
 
        n = data->cpu_check;
index 0f776b032d31355da25f2bdbb47982e3560301cb..c87d6d1d58130411828e2daef886398ced41d93d 100644 (file)
@@ -50,8 +50,10 @@ static nodemask_t memory_less_mask __initdata;
  * To prevent cache aliasing effects, align per-node structures so that they
  * start at addresses that are strided by node number.
  */
+#define MAX_NODE_ALIGN_OFFSET  (32 * 1024 * 1024)
 #define NODEDATA_ALIGN(addr, node)                                             \
-       ((((addr) + 1024*1024-1) & ~(1024*1024-1)) + (node)*PERCPU_PAGE_SIZE)
+       ((((addr) + 1024*1024-1) & ~(1024*1024-1)) +                            \
+            (((node)*PERCPU_PAGE_SIZE) & (MAX_NODE_ALIGN_OFFSET - 1)))
 
 /**
  * build_node_maps - callback to setup bootmem structs for each node
index 05e4ea8899818f8bc06cff895246a3cd55906bbe..318087e35b66c2ad2cef6114469d4e873d5fe6b1 100644 (file)
@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.
  */
 
 #include <linux/bootmem.h>
@@ -146,6 +146,24 @@ sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev,
        return ret_stuff.v0;
 }
 
+/*
+ * sn_pcidev_info_get() - Retrieve the pcidev_info struct for the specified
+ *                       device.
+ */
+inline struct pcidev_info *
+sn_pcidev_info_get(struct pci_dev *dev)
+{
+       struct pcidev_info *pcidev;
+
+       list_for_each_entry(pcidev,
+                           &(SN_PCI_CONTROLLER(dev)->pcidev_info), pdi_list) {
+               if (pcidev->pdi_linux_pcidev == dev) {
+                       return pcidev;
+               }
+       }
+       return NULL;
+}
+
 /*
  * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for 
  *     each node in the system.
@@ -229,6 +247,50 @@ static void sn_fixup_ionodes(void)
 
 }
 
+/*
+ * sn_pci_window_fixup() - Create a pci_window for each device resource.
+ *                        Until ACPI support is added, we need this code
+ *                        to setup pci_windows for use by
+ *                        pcibios_bus_to_resource(),
+ *                        pcibios_resource_to_bus(), etc.
+ */
+static void
+sn_pci_window_fixup(struct pci_dev *dev, unsigned int count,
+                   int64_t * pci_addrs)
+{
+       struct pci_controller *controller = PCI_CONTROLLER(dev->bus);
+       unsigned int i;
+       unsigned int idx;
+       unsigned int new_count;
+       struct pci_window *new_window;
+
+       if (count == 0)
+               return;
+       idx = controller->windows;
+       new_count = controller->windows + count;
+       new_window = kcalloc(new_count, sizeof(struct pci_window), GFP_KERNEL);
+       if (new_window == NULL)
+               BUG();
+       if (controller->window) {
+               memcpy(new_window, controller->window,
+                      sizeof(struct pci_window) * controller->windows);
+               kfree(controller->window);
+       }
+
+       /* Setup a pci_window for each device resource. */
+       for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
+               if (pci_addrs[i] == -1)
+                       continue;
+
+               new_window[idx].offset = dev->resource[i].start - pci_addrs[i];
+               new_window[idx].resource = dev->resource[i];
+               idx++;
+       }
+
+       controller->windows = new_count;
+       controller->window = new_window;
+}
+
 void sn_pci_unfixup_slot(struct pci_dev *dev)
 {
        struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
@@ -246,21 +308,23 @@ void sn_pci_unfixup_slot(struct pci_dev *dev)
  */
 void sn_pci_fixup_slot(struct pci_dev *dev)
 {
+       unsigned int count = 0;
        int idx;
        int segment = pci_domain_nr(dev->bus);
        int status = 0;
        struct pcibus_bussoft *bs;
        struct pci_bus *host_pci_bus;
        struct pci_dev *host_pci_dev;
+       struct pcidev_info *pcidev_info;
+       int64_t pci_addrs[PCI_ROM_RESOURCE + 1];
        struct sn_irq_info *sn_irq_info;
        unsigned long size;
        unsigned int bus_no, devfn;
 
        pci_dev_get(dev); /* for the sysdata pointer */
-       dev->sysdata = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL);
-       if (SN_PCIDEV_INFO(dev) <= 0)
+       pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
+       if (pcidev_info <= 0)
                BUG();          /* Cannot afford to run out of memory */
-       memset(SN_PCIDEV_INFO(dev), 0, sizeof(struct pcidev_info));
 
        sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
        if (sn_irq_info <= 0)
@@ -270,22 +334,34 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
        /* Call to retrieve pci device information needed by kernel. */
        status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, 
                                     dev->devfn,
-                                    (u64) __pa(SN_PCIDEV_INFO(dev)),
+                                    (u64) __pa(pcidev_info),
                                     (u64) __pa(sn_irq_info));
        if (status)
                BUG(); /* Cannot get platform pci device information */
 
+       /* Add pcidev_info to list in sn_pci_controller struct */
+       list_add_tail(&pcidev_info->pdi_list,
+                     &(SN_PCI_CONTROLLER(dev->bus)->pcidev_info));
+
        /* Copy over PIO Mapped Addresses */
        for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {
                unsigned long start, end, addr;
 
-               if (!SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx])
+               if (!pcidev_info->pdi_pio_mapped_addr[idx]) {
+                       pci_addrs[idx] = -1;
                        continue;
+               }
 
                start = dev->resource[idx].start;
                end = dev->resource[idx].end;
                size = end - start;
-               addr = SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx];
+               if (size == 0) {
+                       pci_addrs[idx] = -1;
+                       continue;
+               }
+               pci_addrs[idx] = start;
+               count++;
+               addr = pcidev_info->pdi_pio_mapped_addr[idx];
                addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
                dev->resource[idx].start = addr;
                dev->resource[idx].end = addr + size;
@@ -294,23 +370,27 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
                else
                        dev->resource[idx].parent = &iomem_resource;
        }
+       /* Create a pci_window in the pci_controller struct for
+        * each device resource.
+        */
+       if (count > 0)
+               sn_pci_window_fixup(dev, count, pci_addrs);
 
        /*
         * Using the PROMs values for the PCI host bus, get the Linux
         * PCI host_pci_dev struct and set up host bus linkages
         */
 
-       bus_no = (SN_PCIDEV_INFO(dev)->pdi_slot_host_handle >> 32) & 0xff;
-       devfn = SN_PCIDEV_INFO(dev)->pdi_slot_host_handle & 0xffffffff;
+       bus_no = (pcidev_info->pdi_slot_host_handle >> 32) & 0xff;
+       devfn = pcidev_info->pdi_slot_host_handle & 0xffffffff;
        host_pci_bus = pci_find_bus(segment, bus_no);
        host_pci_dev = pci_get_slot(host_pci_bus, devfn);
 
-       SN_PCIDEV_INFO(dev)->host_pci_dev = host_pci_dev;
-       SN_PCIDEV_INFO(dev)->pdi_host_pcidev_info =
-                                               SN_PCIDEV_INFO(host_pci_dev);
-       SN_PCIDEV_INFO(dev)->pdi_linux_pcidev = dev;
+       pcidev_info->host_pci_dev = host_pci_dev;
+       pcidev_info->pdi_linux_pcidev = dev;
+       pcidev_info->pdi_host_pcidev_info = SN_PCIDEV_INFO(host_pci_dev);
        bs = SN_PCIBUS_BUSSOFT(dev->bus);
-       SN_PCIDEV_INFO(dev)->pdi_pcibus_info = bs;
+       pcidev_info->pdi_pcibus_info = bs;
 
        if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {
                SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];
@@ -320,11 +400,11 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
 
        /* Only set up IRQ stuff if this device has a host bus context */
        if (bs && sn_irq_info->irq_irq) {
-               SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = sn_irq_info;
-               dev->irq = SN_PCIDEV_INFO(dev)->pdi_sn_irq_info->irq_irq;
+               pcidev_info->pdi_sn_irq_info = sn_irq_info;
+               dev->irq = pcidev_info->pdi_sn_irq_info->irq_irq;
                sn_irq_fixup(dev, sn_irq_info);
        } else {
-               SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = NULL;
+               pcidev_info->pdi_sn_irq_info = NULL;
                kfree(sn_irq_info);
        }
 }
@@ -338,6 +418,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
        int status = 0;
        int nasid, cnode;
        struct pci_controller *controller;
+       struct sn_pci_controller *sn_controller;
        struct pcibus_bussoft *prom_bussoft_ptr;
        struct hubdev_info *hubdev_info;
        void *provider_soft = NULL;
@@ -349,10 +430,15 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
                return;         /*bus # does not exist */
        prom_bussoft_ptr = __va(prom_bussoft_ptr);
 
-       controller = kzalloc(sizeof(struct pci_controller), GFP_KERNEL);
+       /* Allocate a sn_pci_controller, which has a pci_controller struct
+        * as the first member.
+        */
+       sn_controller = kzalloc(sizeof(struct sn_pci_controller), GFP_KERNEL);
+       if (!sn_controller)
+               BUG();
+       INIT_LIST_HEAD(&sn_controller->pcidev_info);
+       controller = &sn_controller->pci_controller;
        controller->segment = segment;
-       if (!controller)
-               BUG();
 
        if (bus == NULL) {
                bus = pci_scan_bus(busnum, &pci_root_ops, controller);
@@ -389,6 +475,29 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
                goto error_return;
        }
 
+       /*
+        * Setup pci_windows for legacy IO and MEM space.
+        * (Temporary until ACPI support is in place.)
+        */
+       controller->window = kcalloc(2, sizeof(struct pci_window), GFP_KERNEL);
+       if (controller->window == NULL)
+               BUG();
+       controller->window[0].offset = prom_bussoft_ptr->bs_legacy_io;
+       controller->window[0].resource.name = "legacy_io";
+       controller->window[0].resource.flags = IORESOURCE_IO;
+       controller->window[0].resource.start = prom_bussoft_ptr->bs_legacy_io;
+       controller->window[0].resource.end =
+           controller->window[0].resource.start + 0xffff;
+       controller->window[0].resource.parent = &ioport_resource;
+       controller->window[1].offset = prom_bussoft_ptr->bs_legacy_mem;
+       controller->window[1].resource.name = "legacy_mem";
+       controller->window[1].resource.flags = IORESOURCE_MEM;
+       controller->window[1].resource.start = prom_bussoft_ptr->bs_legacy_mem;
+       controller->window[1].resource.end =
+           controller->window[1].resource.start + (1024 * 1024) - 1;
+       controller->window[1].resource.parent = &iomem_resource;
+       controller->windows = 2;
+
        /*
         * Generic bus fixup goes here.  Don't reference prom_bussoft_ptr
         * after this point.
@@ -421,7 +530,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
 
 error_return:
 
-       kfree(controller);
+       kfree(sn_controller);
        return;
 }
 
@@ -434,7 +543,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
                dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
                return;
        }
-       element->sysdata = dev->sysdata;
+       element->sysdata = SN_PCIDEV_INFO(dev);
        list_add(&element->entry, &sn_sysdata_list);
 }
 
index 3fa95065a4460e618a4cb4d4e1979ed830fc6cee..bebbcc4f8dd408df200a3a7f330a78a04a6cc26a 100644 (file)
@@ -39,9 +39,13 @@ sn2_ptc_deadlock_recovery_core:
        mov     r8=r0
 
 1:
+       cmp.ne  p8,p9=r0,ptc1           // Test for shub type (ptc1 non-null on shub1)
+                                       // p8 = 1 if shub1, p9 = 1 if shub2
+
        add     scr2=ALIAS_OFFSET,piowc // Address of WRITE_STATUS alias register 
-       ;;
-       ld8.acq scr1=[scr2];;
+       mov     scr1=7;;                // Clear DEADLOCK, WRITE_ERROR, MULTI_WRITE_ERROR
+(p8)   st8.rel [scr2]=scr1;;
+(p9)   ld8.acq scr1=[scr2];;
 
 5:     ld8.acq scr1=[piowc];;          // Wait for PIOs to complete.
        hint    @pause
index 3a49036e0ae8f378056e46c88689276dda9035bb..4ee91c9a556fed7f53dfb534cfc8d474392952a7 100644 (file)
@@ -67,8 +67,8 @@ unsigned long setup_zero_pages(void)
 
        page = virt_to_page(empty_zero_page);
        while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) {
-               set_bit(PG_reserved, &page->flags);
-               reset_page_mapcount(page);
+               SetPageReserved(page);
+               set_page_count(page, 1);
                page++;
        }
 
index bb2efdd566a9d590d64184b10b097e4b7ed17e95..db93dbc0e21a9896ee25c8dcc1c517f8f330d5cd 100644 (file)
@@ -227,7 +227,7 @@ config SMP
          If you don't know what to do here, say N.
 
 config NR_CPUS
-       int "Maximum number of CPUs (2-32)"
+       int "Maximum number of CPUs (2-128)"
        range 2 128
        depends on SMP
        default "32" if PPC64
index 511af54e6230ca13eeba65dd7765dcb9f7c8947c..5368f9c2e6bff7707c040812f1260c8269d1373d 100644 (file)
@@ -177,7 +177,7 @@ static inline int kprobe_handler(struct pt_regs *regs)
                        save_previous_kprobe(kcb);
                        set_current_kprobe(p, regs, kcb);
                        kcb->kprobe_saved_msr = regs->msr;
-                       p->nmissed++;
+                       kprobes_inc_nmissed_count(p);
                        prepare_singlestep(p, regs);
                        kcb->kprobe_status = KPROBE_REENTER;
                        return 1;
index 608fee7c7e20621dcf829507e893cbaee4ea05da..e3fb78397dc6d2b84e1f6fd8d0b7e9fc89e92ffe 100644 (file)
@@ -102,7 +102,15 @@ int boot_cpuid_phys = 0;
 dev_t boot_dev;
 u64 ppc64_pft_size;
 
-struct ppc64_caches ppc64_caches;
+/* Pick defaults since we might want to patch instructions
+ * before we've read this from the device tree.
+ */
+struct ppc64_caches ppc64_caches = {
+       .dline_size = 0x80,
+       .log_dline_size = 7,
+       .iline_size = 0x80,
+       .log_iline_size = 7
+};
 EXPORT_SYMBOL_GPL(ppc64_caches);
 
 /*
index 706e8a63ced93218334a227b62f5303595c27790..a33583f3b0e7d0e2c7f07b5ccc3bec039bf3f14e 100644 (file)
@@ -601,7 +601,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
        /* Handle hugepage regions */
        if (unlikely(in_hugepage_area(mm->context, ea))) {
                DBG_LOW(" -> huge page !\n");
-               return hash_huge_page(mm, access, ea, vsid, local);
+               return hash_huge_page(mm, access, ea, vsid, local, trap);
        }
 
        /* Get PTE and page size from page tables */
index 6bc9dbad7dea20cd744d10f682f74562533f614f..54131b877da36cb3a827000d802ca76ce82507ad 100644 (file)
@@ -148,43 +148,63 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
        return 0;
 }
 
+struct slb_flush_info {
+       struct mm_struct *mm;
+       u16 newareas;
+};
+
 static void flush_low_segments(void *parm)
 {
-       u16 areas = (unsigned long) parm;
+       struct slb_flush_info *fi = parm;
        unsigned long i;
 
-       asm volatile("isync" : : : "memory");
+       BUILD_BUG_ON((sizeof(fi->newareas)*8) != NUM_LOW_AREAS);
+
+       if (current->active_mm != fi->mm)
+               return;
+
+       /* Only need to do anything if this CPU is working in the same
+        * mm as the one which has changed */
 
-       BUILD_BUG_ON((sizeof(areas)*8) != NUM_LOW_AREAS);
+       /* update the paca copy of the context struct */
+       get_paca()->context = current->active_mm->context;
 
+       asm volatile("isync" : : : "memory");
        for (i = 0; i < NUM_LOW_AREAS; i++) {
-               if (! (areas & (1U << i)))
+               if (! (fi->newareas & (1U << i)))
                        continue;
                asm volatile("slbie %0"
                             : : "r" ((i << SID_SHIFT) | SLBIE_C));
        }
-
        asm volatile("isync" : : : "memory");
 }
 
 static void flush_high_segments(void *parm)
 {
-       u16 areas = (unsigned long) parm;
+       struct slb_flush_info *fi = parm;
        unsigned long i, j;
 
-       asm volatile("isync" : : : "memory");
 
-       BUILD_BUG_ON((sizeof(areas)*8) != NUM_HIGH_AREAS);
+       BUILD_BUG_ON((sizeof(fi->newareas)*8) != NUM_HIGH_AREAS);
 
+       if (current->active_mm != fi->mm)
+               return;
+
+       /* Only need to do anything if this CPU is working in the same
+        * mm as the one which has changed */
+
+       /* update the paca copy of the context struct */
+       get_paca()->context = current->active_mm->context;
+
+       asm volatile("isync" : : : "memory");
        for (i = 0; i < NUM_HIGH_AREAS; i++) {
-               if (! (areas & (1U << i)))
+               if (! (fi->newareas & (1U << i)))
                        continue;
                for (j = 0; j < (1UL << (HTLB_AREA_SHIFT-SID_SHIFT)); j++)
                        asm volatile("slbie %0"
                                     :: "r" (((i << HTLB_AREA_SHIFT)
-                                            + (j << SID_SHIFT)) | SLBIE_C));
+                                             + (j << SID_SHIFT)) | SLBIE_C));
        }
-
        asm volatile("isync" : : : "memory");
 }
 
@@ -229,6 +249,7 @@ static int prepare_high_area_for_htlb(struct mm_struct *mm, unsigned long area)
 static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)
 {
        unsigned long i;
+       struct slb_flush_info fi;
 
        BUILD_BUG_ON((sizeof(newareas)*8) != NUM_LOW_AREAS);
        BUILD_BUG_ON((sizeof(mm->context.low_htlb_areas)*8) != NUM_LOW_AREAS);
@@ -244,19 +265,20 @@ static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)
 
        mm->context.low_htlb_areas |= newareas;
 
-       /* update the paca copy of the context struct */
-       get_paca()->context = mm->context;
-
        /* the context change must make it to memory before the flush,
         * so that further SLB misses do the right thing. */
        mb();
-       on_each_cpu(flush_low_segments, (void *)(unsigned long)newareas, 0, 1);
+
+       fi.mm = mm;
+       fi.newareas = newareas;
+       on_each_cpu(flush_low_segments, &fi, 0, 1);
 
        return 0;
 }
 
 static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
 {
+       struct slb_flush_info fi;
        unsigned long i;
 
        BUILD_BUG_ON((sizeof(newareas)*8) != NUM_HIGH_AREAS);
@@ -280,7 +302,10 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
        /* the context change must make it to memory before the flush,
         * so that further SLB misses do the right thing. */
        mb();
-       on_each_cpu(flush_high_segments, (void *)(unsigned long)newareas, 0, 1);
+
+       fi.mm = mm;
+       fi.newareas = newareas;
+       on_each_cpu(flush_high_segments, &fi, 0, 1);
 
        return 0;
 }
@@ -639,8 +664,36 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
        return -ENOMEM;
 }
 
+/*
+ * Called by asm hashtable.S for doing lazy icache flush
+ */
+static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags,
+                                                 pte_t pte, int trap)
+{
+       struct page *page;
+       int i;
+
+       if (!pfn_valid(pte_pfn(pte)))
+               return rflags;
+
+       page = pte_page(pte);
+
+       /* page is dirty */
+       if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) {
+               if (trap == 0x400) {
+                       for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++)
+                               __flush_dcache_icache(page_address(page+i));
+                       set_bit(PG_arch_1, &page->flags);
+               } else {
+                       rflags |= HPTE_R_N;
+               }
+       }
+       return rflags;
+}
+
 int hash_huge_page(struct mm_struct *mm, unsigned long access,
-                  unsigned long ea, unsigned long vsid, int local)
+                  unsigned long ea, unsigned long vsid, int local,
+                  unsigned long trap)
 {
        pte_t *ptep;
        unsigned long old_pte, new_pte;
@@ -691,6 +744,11 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
        rflags = 0x2 | (!(new_pte & _PAGE_RW));
        /* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */
        rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N);
+       if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
+               /* No CPU has hugepages but lacks no execute, so we
+                * don't need to worry about that case */
+               rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte),
+                                                      trap);
 
        /* Check if pte already has an hpte (case 2) */
        if (unlikely(old_pte & _PAGE_HASHPTE)) {
@@ -703,7 +761,8 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
                slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
                slot += (old_pte & _PAGE_F_GIX) >> 12;
 
-               if (ppc_md.hpte_updatepp(slot, rflags, va, 1, local) == -1)
+               if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_huge_psize,
+                                        local) == -1)
                        old_pte &= ~_PAGE_HPTEFLAGS;
        }
 
index f72cf87364cb29d9953131fc1f0ef46d5a407087..ba7a3055a9fc42f20b70f80b7bc298f40137a559 100644 (file)
@@ -125,7 +125,7 @@ void __init get_region(unsigned int nid, unsigned long *start_pfn,
 
        /* We didnt find a matching region, return start/end as 0 */
        if (*start_pfn == -1UL)
-               start_pfn = 0;
+               *start_pfn = 0;
 }
 
 static inline void map_cpu_to_node(int cpu, int node)
index cfbb4e1f966b3331e7e89dda329ae925841616d1..51e7951414e5ca561b1d51257be70efe52a84139 100644 (file)
@@ -288,11 +288,6 @@ void stab_initialize(unsigned long stab)
                return;
        }
 #endif /* CONFIG_PPC_ISERIES */
-#ifdef CONFIG_PPC_PSERIES
-       if (platform_is_lpar()) {
-               plpar_hcall_norets(H_SET_ASR, stabreal);
-               return;
-       }
-#endif
+
        mtspr(SPRN_ASR, stabreal);
 }
index 0d7fa00fcb00cd8d608b5045557a6f6f5128bb72..f6e22da2a5daa8dd27a2bcade5b12ff19599b60f 100644 (file)
@@ -1650,11 +1650,19 @@ void pmac_tweak_clock_spreading(int enable)
         */
 
        if (macio->type == macio_intrepid) {
-               if (enable)
-                       UN_OUT(UNI_N_CLOCK_SPREADING, 2);
-               else
-                       UN_OUT(UNI_N_CLOCK_SPREADING, 0);
-               mdelay(40);
+               struct device_node *clock =
+                       of_find_node_by_path("/uni-n@f8000000/hw-clock");
+               if (clock && get_property(clock, "platform-do-clockspreading",
+                                         NULL)) {
+                       printk(KERN_INFO "%sabling clock spreading on Intrepid"
+                              " ASIC\n", enable ? "En" : "Dis");
+                       if (enable)
+                               UN_OUT(UNI_N_CLOCK_SPREADING, 2);
+                       else
+                               UN_OUT(UNI_N_CLOCK_SPREADING, 0);
+                       mdelay(40);
+               }
+               of_node_put(clock);
        }
 
        while (machine_is_compatible("PowerBook5,2") ||
@@ -1724,6 +1732,9 @@ void pmac_tweak_clock_spreading(int enable)
                        pmac_low_i2c_close(ui2c);
                        break;
                }
+               printk(KERN_INFO "%sabling clock spreading on i2c clock chip\n",
+                      enable ? "En" : "Dis");
+
                pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
                rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
                DBG("write result: %d,", rc);
index c78f2b290a73a52b90356f32f54af51569227796..2043659ea7b19cfb4fcde1ea7d2ce8ddd4768a3b 100644 (file)
@@ -109,6 +109,9 @@ static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
        u64 rc;
        union tce_entry tce;
 
+       tcenum <<= TCE_PAGE_FACTOR;
+       npages <<= TCE_PAGE_FACTOR;
+
        tce.te_word = 0;
        tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
        tce.te_rdwr = 1;
@@ -143,10 +146,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
        union tce_entry tce, *tcep;
        long l, limit;
 
-       tcenum <<= TCE_PAGE_FACTOR;
-       npages <<= TCE_PAGE_FACTOR;
-
-       if (npages == 1)
+       if (TCE_PAGE_FACTOR == 0 && npages == 1)
                return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
                                           direction);
 
@@ -164,6 +164,9 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
                __get_cpu_var(tce_page) = tcep;
        }
 
+       tcenum <<= TCE_PAGE_FACTOR;
+       npages <<= TCE_PAGE_FACTOR;
+
        tce.te_word = 0;
        tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
        tce.te_rdwr = 1;
index a50e5f3f396dc177da02deea3cbad714d01be4ce..cf1bc11b334685264c296363f0a0dd06ca1b38cf 100644 (file)
@@ -298,18 +298,6 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
        if (!(vflags & HPTE_V_BOLTED))
                DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
 
-#if 1
-       {
-               int i;
-               for (i=0;i<8;i++) {
-                       unsigned long w0, w1;
-                       plpar_pte_read(0, hpte_group, &w0, &w1);
-                       BUG_ON (HPTE_V_COMPARE(hpte_v, w0)
-                               && (w0 & HPTE_V_VALID));
-               }
-       }
-#endif
-
        /* Now fill in the actual HPTE */
        /* Set CEC cookie to 0         */
        /* Zero page = 0               */
index 8fa51b0a32d2d5390450d6478117ec1e7410a804..cc3f64c084c5e886b29eadd081c77edc5bcace91 100644 (file)
@@ -767,14 +767,14 @@ config CPM2
          on it (826x, 827x, 8560).
 
 config PPC_CHRP
-       bool "  Common Hardware Reference Platform (CHRP) based machines"
+       bool
        depends on PPC_MULTIPLATFORM
        select PPC_I8259
        select PPC_INDIRECT_PCI
        default y
 
 config PPC_PMAC
-       bool "  Apple PowerMac based machines"
+       bool
        depends on PPC_MULTIPLATFORM
        select PPC_INDIRECT_PCI
        default y
@@ -785,7 +785,7 @@ config PPC_PMAC64
        default y
 
 config PPC_PREP
-       bool "  PowerPC Reference Platform (PReP) based machines"
+       bool
        depends on PPC_MULTIPLATFORM
        select PPC_I8259
        select PPC_INDIRECT_PCI
index 43b8fc2ca591c86388427c4b822eababd6991e11..becbfa397556a378c87aea3c05e8418073072fb4 100644 (file)
@@ -301,6 +301,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
 
        /* Probe platform for CPUs: always linear. */
        num_cpus = smp_ops->probe();
+       
+       if (num_cpus < 2)
+               smp_tb_synchronized = 1;
+       
        for (i = 0; i < num_cpus; ++i)
                cpu_set(i, cpu_possible_map);
 
index 1e69b05931620a2f1420adea43a27cac67644f6b..6b7b3a150631485cbf7ce43fe763f2ab8f55748a 100644 (file)
@@ -1606,11 +1606,19 @@ void pmac_tweak_clock_spreading(int enable)
         */
 
        if (macio->type == macio_intrepid) {
-               if (enable)
-                       UN_OUT(UNI_N_CLOCK_SPREADING, 2);
-               else
-                       UN_OUT(UNI_N_CLOCK_SPREADING, 0);
-               mdelay(40);
+               struct device_node *clock =
+                       of_find_node_by_path("/uni-n@f8000000/hw-clock");
+               if (clock && get_property(clock, "platform-do-clockspreading",
+                                         NULL)) {
+                       printk(KERN_INFO "%sabling clock spreading on Intrepid"
+                              " ASIC\n", enable ? "En" : "Dis");
+                       if (enable)
+                               UN_OUT(UNI_N_CLOCK_SPREADING, 2);
+                       else
+                               UN_OUT(UNI_N_CLOCK_SPREADING, 0);
+                       mdelay(40);
+               }
+               of_node_put(clock);
        }
 
        while (machine_is_compatible("PowerBook5,2") ||
@@ -1680,6 +1688,8 @@ void pmac_tweak_clock_spreading(int enable)
                        pmac_low_i2c_close(ui2c);
                        break;
                }
+               printk(KERN_INFO "%sabling clock spreading on i2c clock chip\n",
+                      enable ? "En" : "Dis");
                pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
                rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
                DBG("write result: %d,", rc);
index dea48f6cff38be962d2c9f6cb7a12d251d4317fb..4cdbb2d59ed0a3e04c5e1d10a5bcf308c8ee7f22 100644 (file)
@@ -34,7 +34,7 @@ libs-y += arch/sparc/prom/ arch/sparc/lib/
 # Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
 INIT_Y         := $(patsubst %/, %/built-in.o, $(init-y))
 CORE_Y         := $(core-y)
-CORE_Y         += kernel/ mm/ fs/ ipc/ security/ crypto/
+CORE_Y         += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
 CORE_Y         := $(patsubst %/, %/built-in.o, $(CORE_Y))
 DRIVERS_Y      := $(patsubst %/, %/built-in.o, $(drivers-y))
 NET_Y          := $(patsubst %/, %/built-in.o, $(net-y))
index cb3cf0f228221154a2dd5e658b8550733a966866..de84f8534bacd24d310a635bc1769ed3c6fd06d1 100644 (file)
@@ -66,7 +66,6 @@ int atomic_add_unless(atomic_t *v, int a, int u)
        return ret != u;
 }
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
 /* Atomic operations are already serializing */
 void atomic_set(atomic_t *v, int i)
 {
index 96bd09b098f431876c87778594983f0bf514f85d..a97b0f0727ab15be8ee7678848b5d81ebf282ded 100644 (file)
@@ -138,7 +138,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
                         */
                        save_previous_kprobe(kcb);
                        set_current_kprobe(p, regs, kcb);
-                       p->nmissed++;
+                       kprobes_inc_nmissed_count(p);
                        kcb->kprobe_status = KPROBE_REENTER;
                        prepare_singlestep(p, regs, kcb);
                        return 1;
index f8760a3f43b0f0f6e0402f21089d87e56ba62c29..4567f1eeb4a7d25f8d079aa846a752514e7d6340 100644 (file)
@@ -17,6 +17,8 @@
 #include "uaccess-skas.h"
 #endif
 
+#include "asm/fixmap.h"
+
 #define __under_task_size(addr, size) \
        (((unsigned long) (addr) < TASK_SIZE) && \
          (((unsigned long) (addr) + (size)) < TASK_SIZE))
index f611f83ad4ff815397f1746a10ba2e5656c3d9bc..64516c556cdf98a425b14d4d7c961babc224125d 100644 (file)
@@ -7,7 +7,6 @@
 #define __SKAS_UACCESS_H
 
 #include "asm/errno.h"
-#include "asm/fixmap.h"
 
 /* No SKAS-specific checking. */
 #define access_ok_skas(type, addr, size) 0
index 830feb272eca434c10f73adcb1499abeb71d7f9a..2b760d0d9ce292a515af2977f5423d8f26b75069 100644 (file)
@@ -217,8 +217,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr
        if (!tsk_used_math(tsk))
                return 0;
        if (!regs)
-               regs = (struct pt_regs *)tsk->thread.rsp0;
-       --regs;
+               regs = ((struct pt_regs *)tsk->thread.rsp0) - 1;
        if (tsk == current)
                unlazy_fpu(tsk);
        set_fs(KERNEL_DS); 
index dddeb678b440df5782af858f8db64100082c6f8a..afe11f4fbd1d49d068e7bc3fb64f6d759c342ef1 100644 (file)
@@ -329,7 +329,7 @@ int __kprobes kprobe_handler(struct pt_regs *regs)
                                 */
                                save_previous_kprobe(kcb);
                                set_current_kprobe(p, regs, kcb);
-                               p->nmissed++;
+                               kprobes_inc_nmissed_count(p);
                                prepare_singlestep(p, regs);
                                kcb->kprobe_status = KPROBE_REENTER;
                                return 1;
index 683c33f7b96753219a2c1043246dcdfac12b999e..ecbd7b83acc1ff7b9024d6de6fd1762ed58320f0 100644 (file)
@@ -1181,7 +1181,7 @@ int __cpu_disable(void)
        if (cpu == 0)
                return -EBUSY;
 
-       disable_APIC_timer();
+       clear_local_APIC();
 
        /*
         * HACK:
index fdaddc4e52847a1f0fea0c50ff960aadcc9caf60..74102796e5c06d4fdd749c5e50e0726262d1c975 100644 (file)
@@ -59,7 +59,7 @@ static int notsc __initdata = 0;
 unsigned int cpu_khz;                                  /* TSC clocks / usec, not used here */
 static unsigned long hpet_period;                      /* fsecs / HPET clock */
 unsigned long hpet_tick;                               /* HPET clocks / interrupt */
-static int hpet_use_timer;
+static int hpet_use_timer;                             /* Use counter of hpet for time keeping, otherwise PIT */
 unsigned long vxtime_hz = PIT_TICK_RATE;
 int report_lost_ticks;                         /* command line option */
 unsigned long long monotonic_base;
@@ -908,12 +908,14 @@ void __init time_init(void)
        if (!hpet_init())
                 vxtime_hz = (1000000000000000L + hpet_period / 2) /
                        hpet_period;
+       else
+               vxtime.hpet_address = 0;
 
        if (hpet_use_timer) {
                cpu_khz = hpet_calibrate_tsc();
                timename = "HPET";
 #ifdef CONFIG_X86_PM_TIMER
-       } else if (pmtmr_ioport) {
+       } else if (pmtmr_ioport && !vxtime.hpet_address) {
                vxtime_hz = PM_TIMER_FREQUENCY;
                timename = "PM";
                pit_init();
index ecf7acb5db9b4b0a8f744e0665d089bb7a040d78..0d260e4492f7f96775dbbb641478a0a65ca838ba 100644 (file)
@@ -247,9 +247,15 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
        return __ioremap(phys_addr, size, _PAGE_PCD);
 }
 
+/**
+ * iounmap - Free a IO remapping
+ * @addr: virtual address from ioremap_*
+ *
+ * Caller must ensure there is only one unmapping for the same pointer.
+ */
 void iounmap(volatile void __iomem *addr)
 {
-       struct vm_struct *p;
+       struct vm_struct *p, *o;
 
        if (addr <= high_memory) 
                return; 
@@ -257,12 +263,31 @@ void iounmap(volatile void __iomem *addr)
                addr < phys_to_virt(ISA_END_ADDRESS))
                return;
 
-       write_lock(&vmlist_lock);
-       p = __remove_vm_area((void *)((unsigned long)addr & PAGE_MASK));
-       if (!p)
+       addr = (volatile void *)(PAGE_MASK & (unsigned long __force)addr);
+       /* Use the vm area unlocked, assuming the caller
+          ensures there isn't another iounmap for the same address
+          in parallel. Reuse of the virtual address is prevented by
+          leaving it in the global lists until we're done with it.
+          cpa takes care of the direct mappings. */
+       read_lock(&vmlist_lock);
+       for (p = vmlist; p; p = p->next) {
+               if (p->addr == addr)
+                       break;
+       }
+       read_unlock(&vmlist_lock);
+
+       if (!p) {
                printk("iounmap: bad address %p\n", addr);
-       else if (p->flags >> 20)
+               dump_stack();
+               return;
+       }
+
+       /* Reset the direct mapping. Can block */
+       if (p->flags >> 20)
                ioremap_change_attr(p->phys_addr, p->size, 0);
-       write_unlock(&vmlist_lock);
+
+       /* Finally remove it */
+       o = remove_vm_area((void *)addr);
+       BUG_ON(p != o || o == NULL);
        kfree(p); 
 }
index a828a01739cc791015d1bd02e8e04a555bdf288f..15b67d2760cbf8116eba1762a59e821adaddb073 100644 (file)
@@ -53,6 +53,8 @@ static int __init populate_memnodemap(
        int res = -1;
        unsigned long addr, end;
 
+       if (shift >= 64)
+               return -1;
        memset(memnodemap, 0xff, sizeof(memnodemap));
        for (i = 0; i < numnodes; i++) {
                addr = nodes[i].start;
@@ -65,7 +67,7 @@ static int __init populate_memnodemap(
                        if (memnodemap[addr >> shift] != 0xff)
                                return -1;
                        memnodemap[addr >> shift] = i;
-                       addr += (1 << shift);
+                       addr += (1UL << shift);
                } while (addr < end);
                res = 1;
        } 
index a0838c4a94e4c032d9d6024fb0eaed96b0d3dab3..9c4f907e301c7878bc94748d0f41b3db84cd0904 100644 (file)
@@ -8,10 +8,13 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/acpi.h>
+#include <linux/bitmap.h>
 #include "pci.h"
 
 #define MMCONFIG_APER_SIZE (256*1024*1024)
 
+static DECLARE_BITMAP(fallback_slots, 32);
+
 /* Static virtual mapping of the MMCONFIG aperture */
 struct mmcfg_virt {
        struct acpi_table_mcfg_config *cfg;
@@ -19,7 +22,7 @@ struct mmcfg_virt {
 };
 static struct mmcfg_virt *pci_mmcfg_virt;
 
-static char *get_virt(unsigned int seg, int bus)
+static char *get_virt(unsigned int seg, unsigned bus)
 {
        int cfg_num = -1;
        struct acpi_table_mcfg_config *cfg;
@@ -27,10 +30,9 @@ static char *get_virt(unsigned int seg, int bus)
        while (1) {
                ++cfg_num;
                if (cfg_num >= pci_mmcfg_config_num) {
-                       /* something bad is going on, no cfg table is found. */
-                       /* so we fall back to the old way we used to do this */
-                       /* and just rely on the first entry to be correct. */
-                       return pci_mmcfg_virt[0].virt;
+                       /* Not found - fall back to type 1. This happens
+                          e.g. on the internal devices of a K8 northbridge. */
+                       return NULL;
                }
                cfg = pci_mmcfg_virt[cfg_num].cfg;
                if (cfg->pci_segment_group_number != seg)
@@ -41,20 +43,30 @@ static char *get_virt(unsigned int seg, int bus)
        }
 }
 
-static inline char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
+static char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
 {
-
-       return get_virt(seg, bus) + ((bus << 20) | (devfn << 12));
+       char *addr;
+       if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots))
+               return NULL;
+       addr = get_virt(seg, bus);
+       if (!addr)
+               return NULL;
+       return addr + ((bus << 20) | (devfn << 12));
 }
 
 static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
                          unsigned int devfn, int reg, int len, u32 *value)
 {
-       char *addr = pci_dev_base(seg, bus, devfn);
+       char *addr;
 
+       /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
        if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095)))
                return -EINVAL;
 
+       addr = pci_dev_base(seg, bus, devfn);
+       if (!addr)
+               return pci_conf1_read(seg,bus,devfn,reg,len,value);
+
        switch (len) {
        case 1:
                *value = readb(addr + reg);
@@ -73,11 +85,16 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
 static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
                           unsigned int devfn, int reg, int len, u32 value)
 {
-       char *addr = pci_dev_base(seg, bus, devfn);
+       char *addr;
 
+       /* Why do we have this when nobody checks it. How about a BUG()!? -AK */
        if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
                return -EINVAL;
 
+       addr = pci_dev_base(seg, bus, devfn);
+       if (!addr)
+               return pci_conf1_write(seg,bus,devfn,reg,len,value);
+
        switch (len) {
        case 1:
                writeb(value, addr + reg);
@@ -98,6 +115,30 @@ static struct pci_raw_ops pci_mmcfg = {
        .write =        pci_mmcfg_write,
 };
 
+/* K8 systems have some devices (typically in the builtin northbridge)
+   that are only accessible using type1
+   Normally this can be expressed in the MCFG by not listing them
+   and assigning suitable _SEGs, but this isn't implemented in some BIOS.
+   Instead try to discover all devices on bus 0 that are unreachable using MM
+   and fallback for them.
+   We only do this for bus 0/seg 0 */
+static __init void unreachable_devices(void)
+{
+       int i;
+       for (i = 0; i < 32; i++) {
+               u32 val1;
+               char *addr;
+
+               pci_conf1_read(0, 0, PCI_DEVFN(i,0), 0, 4, &val1);
+               if (val1 == 0xffffffff)
+                       continue;
+               addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0));
+               if (addr == NULL|| readl(addr) != val1) {
+                       set_bit(i, &fallback_slots);
+               }
+       }
+}
+
 static int __init pci_mmcfg_init(void)
 {
        int i;
@@ -128,6 +169,8 @@ static int __init pci_mmcfg_init(void)
                printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);
        }
 
+       unreachable_devices();
+
        raw_pci_ops = &pci_mmcfg;
        pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
 
index 82292b77e5c681b874334913078926106546bb2f..78927c0f155102a01f3acf97b87887819bfc546f 100644 (file)
@@ -316,7 +316,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
        if (!link || !irq)
                return_VALUE(-EINVAL);
 
-       resource = kmalloc(sizeof(*resource) + 1, GFP_KERNEL);
+       resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
        if (!resource)
                return_VALUE(-ENOMEM);
 
index a9e33db46e68b5432627835ea1945f02d40d861c..c3441b3f086eabaa5165ad5bec0e9ecb3ab3b258 100644 (file)
@@ -1146,7 +1146,6 @@ static int revalidate_allvol(ctlr_info_t *host)
                                del_gendisk(disk);
                        if (q)
                                blk_cleanup_queue(q);
-                       put_disk(disk);
                }
        }
 
@@ -1465,9 +1464,10 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
                        request_queue_t *q = disk->queue;
                        if (disk->flags & GENHD_FL_UP)
                                del_gendisk(disk);
-                       if (q)  
+                       if (q) {
                                blk_cleanup_queue(q);
-                       put_disk(disk); 
+                               drv->queue = NULL;
+                       }
                }
        }
 
@@ -3243,7 +3243,6 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
                                del_gendisk(disk);
                        if (q)
                                blk_cleanup_queue(q);
-                       put_disk(disk);
                }
        }
 
index 970f70d498f4c814e1cf3362e33d7e23ac53c299..b46a72d782d6ca5d8249dd72e4d4181208799d28 100644 (file)
@@ -943,6 +943,15 @@ config RAW_DRIVER
           Applications should simply open the device (eg /dev/hda1)
           with the O_DIRECT flag.
 
+config MAX_RAW_DEVS
+       int "Maximum number of RAW devices to support (1-8192)"
+       depends on RAW_DRIVER
+       default "256"
+       help
+         The maximum number of RAW devices that are supported.
+         Default is 256. Increase this number in case you need lots of
+         raw devices.
+
 config HPET
        bool "HPET - High Precision Event Timer" if (X86 || IA64)
        default n
@@ -974,15 +983,6 @@ config HPET_MMAP
          exposed to the user.  If this applies to your hardware,
          say N here.
 
-config MAX_RAW_DEVS
-       int "Maximum number of RAW devices to support (1-8192)"
-       depends on RAW_DRIVER
-       default "256"
-       help
-         The maximum number of RAW devices that are supported.
-         Default is 256. Increase this number in case you need lots of
-         raw devices.
-
 config HANGCHECK_TIMER
        tristate "Hangcheck timer"
        depends on X86 || IA64 || PPC64 || ARCH_S390
index 03839ea31092d2f407e5d70e869392b2cc767472..9f2b4efd0c7aaccbaa7673d8a95e4f01c8a5ae0a 100644 (file)
@@ -1522,7 +1522,7 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
 
        dev_priv->gart_size = init->gart_size;
        dev_priv->gart_vm_start = dev_priv->fb_location
-           + RADEON_READ(RADEON_CONFIG_APER_SIZE);
+           + RADEON_READ(RADEON_CONFIG_APER_SIZE) * 2;
 
 #if __OS_HAS_AGP
        if (!dev_priv->is_pci)
index 6b302a930e5fad66204630d1fafb4421178b7fdd..1f56b4cf0f589f6622acbdc70da0e1e5a0d520d3 100644 (file)
@@ -2986,7 +2986,7 @@ static void send_panic_events(char *str)
        msg.cmd = 2; /* Platform event command. */
        msg.data = data;
        msg.data_len = 8;
-       data[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */
+       data[0] = 0x41; /* Kernel generator ID, IPMI table 5-4 */
        data[1] = 0x03; /* This is for IPMI 1.0. */
        data[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */
        data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */
index 9defcf861b67095e2a245b1ddeae0686d75badc7..b4d843489881adaacdf3e2326ed09bf49b9b0f7d 100644 (file)
@@ -180,10 +180,6 @@ static ssize_t mpcore_wdt_write(struct file *file, const char *data, size_t len,
 {
        struct mpcore_wdt *wdt = file->private_data;
 
-       /*  Can't seek (pwrite) on this device  */
-       if (ppos != &file->f_pos)
-               return -ESPIPE;
-
        /*
         *      Refresh the timer.
         */
index fcdf0fff13a6cc449e431957e061e67d253eefbe..969d2b4aaec06952132d9fc4f516355bcdc38d3b 100644 (file)
@@ -56,6 +56,7 @@ void proc_fork_connector(struct task_struct *task)
        msg = (struct cn_msg*)buffer;
        ev = (struct proc_event*)msg->data;
        get_seq(&msg->seq, &ev->cpu);
+       getnstimestamp(&ev->timestamp);
        ev->what = PROC_EVENT_FORK;
        ev->event_data.fork.parent_pid = task->real_parent->pid;
        ev->event_data.fork.parent_tgid = task->real_parent->tgid;
@@ -81,6 +82,7 @@ void proc_exec_connector(struct task_struct *task)
        msg = (struct cn_msg*)buffer;
        ev = (struct proc_event*)msg->data;
        get_seq(&msg->seq, &ev->cpu);
+       getnstimestamp(&ev->timestamp);
        ev->what = PROC_EVENT_EXEC;
        ev->event_data.exec.process_pid = task->pid;
        ev->event_data.exec.process_tgid = task->tgid;
@@ -114,6 +116,7 @@ void proc_id_connector(struct task_struct *task, int which_id)
        } else
                return;
        get_seq(&msg->seq, &ev->cpu);
+       getnstimestamp(&ev->timestamp);
 
        memcpy(&msg->id, &cn_proc_event_id, sizeof(msg->id));
        msg->ack = 0; /* not used */
@@ -133,6 +136,7 @@ void proc_exit_connector(struct task_struct *task)
        msg = (struct cn_msg*)buffer;
        ev = (struct proc_event*)msg->data;
        get_seq(&msg->seq, &ev->cpu);
+       getnstimestamp(&ev->timestamp);
        ev->what = PROC_EVENT_EXIT;
        ev->event_data.exit.process_pid = task->pid;
        ev->event_data.exit.process_tgid = task->tgid;
@@ -165,6 +169,7 @@ static void cn_proc_ack(int err, int rcvd_seq, int rcvd_ack)
        msg = (struct cn_msg*)buffer;
        ev = (struct proc_event*)msg->data;
        msg->seq = rcvd_seq;
+       getnstimestamp(&ev->timestamp);
        ev->cpu = -1;
        ev->what = PROC_EVENT_NONE;
        ev->event_data.ack.err = err;
index 322c74b2687f4cbe6aa30ec6b3b2a484d937e6f8..80ddf9776bde23c0a85e294e8fa76eef6ac7ee42 100644 (file)
@@ -207,7 +207,7 @@ static struct wf_smu_sys_fans_param wf_smu_sys_all_params[] = {
        },
        /* Model ID 3 */
        {
-               .model_id       = 2,
+               .model_id       = 3,
                .itarget        = 0x350000,
                .gd             = 0x08e00000,
                .gp             = 0x00566666,
@@ -219,7 +219,7 @@ static struct wf_smu_sys_fans_param wf_smu_sys_all_params[] = {
        },
        /* Model ID 5 */
        {
-               .model_id       = 2,
+               .model_id       = 5,
                .itarget        = 0x3a0000,
                .gd             = 0x15400000,
                .gp             = 0x00233333,
index 3066c587b5391202dda91f8e4a9bdc977a4b335a..229d7b20429721f0939fd84d207bff5441127d4b 100644 (file)
@@ -320,7 +320,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
                 * this branch is our 'one mirror IO has finished' event handler:
                 */
                r1_bio->bios[mirror] = NULL;
-               bio_put(bio);
                if (!uptodate) {
                        md_error(r1_bio->mddev, conf->mirrors[mirror].rdev);
                        /* an I/O failed, we can't clear the bitmap */
@@ -377,7 +376,6 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
                }
                if (test_bit(R1BIO_BehindIO, &r1_bio->state)) {
                        /* free extra copy of the data pages */
-/* FIXME bio has been freed!!! */
                        int i = bio->bi_vcnt;
                        while (i--)
                                __free_page(bio->bi_io_vec[i].bv_page);
@@ -391,6 +389,9 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
                raid_end_bio_io(r1_bio);
        }
 
+       if (r1_bio->bios[mirror]==NULL)
+               bio_put(bio);
+
        rdev_dec_pending(conf->mirrors[mirror].rdev, conf->mddev);
        return 0;
 }
index 36d5f8ac82650bfb4eda7ddce550b44af2f80ac1..fafc4bc045f79082fe4c2d4d77a09327720af1c8 100644 (file)
@@ -98,7 +98,7 @@ static inline void __release_stripe(raid5_conf_t *conf, struct stripe_head *sh)
                        list_add_tail(&sh->lru, &conf->inactive_list);
                        atomic_dec(&conf->active_stripes);
                        if (!conf->inactive_blocked ||
-                           atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4))
+                           atomic_read(&conf->active_stripes) < (conf->max_nr_stripes*3/4))
                                wake_up(&conf->wait_for_stripe);
                }
        }
@@ -264,7 +264,8 @@ static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector
                                conf->inactive_blocked = 1;
                                wait_event_lock_irq(conf->wait_for_stripe,
                                                    !list_empty(&conf->inactive_list) &&
-                                                   (atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4)
+                                                   (atomic_read(&conf->active_stripes)
+                                                    < (conf->max_nr_stripes *3/4)
                                                     || !conf->inactive_blocked),
                                                    conf->device_lock,
                                                    unplug_slaves(conf->mddev);
@@ -1917,7 +1918,7 @@ static int run(mddev_t *mddev)
                        goto abort;
                }
        }
-memory = conf->max_nr_stripes * (sizeof(struct stripe_head) +
+       memory = conf->max_nr_stripes * (sizeof(struct stripe_head) +
                 conf->raid_disks * ((sizeof(struct bio) + PAGE_SIZE))) / 1024;
        if (grow_stripes(conf, conf->max_nr_stripes)) {
                printk(KERN_ERR 
index caebd0a1c021c28745ca089c784f7e35149ae9e9..6a901a0268e174a6cdfde7a4b08aee76ff956fe6 100644 (file)
@@ -1,12 +1,12 @@
 config VIDEO_SAA7146
-        tristate
+       tristate
        select I2C
 
 config VIDEO_SAA7146_VV
-        tristate
+       tristate
        select VIDEO_BUF
        select VIDEO_VIDEOBUF
        select VIDEO_SAA7146
 
 config VIDEO_VIDEOBUF
-        tristate
+       tristate
index 97b4341255ea5bcf9084adde0865b61dcda5daea..bd458cb9b4ea9c972ad13843a2ffabb5cc21f034 100644 (file)
@@ -1,5 +1,5 @@
-saa7146-objs    := saa7146_i2c.o saa7146_core.o 
-saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o  
+saa7146-objs    := saa7146_i2c.o saa7146_core.o
+saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o
 
 obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o
 obj-$(CONFIG_VIDEO_SAA7146_VV) += saa7146_vv.o
index 7972c73bc14eba1e1c3560a2c072cb28d917e624..97fa3fc571c419d34ec043f56f12863f9ea7132b 100644 (file)
@@ -313,6 +313,7 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
        if (ir_codes)
                memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes));
 
+
        dev->keycode     = ir->ir_codes;
        dev->keycodesize = sizeof(IR_KEYTAB_TYPE);
        dev->keycodemax  = IR_KEYTAB_SIZE;
index 206cc2f61f26154bb3f5e1a6b62e888ee74e8065..2899d34e5f7e3249c8be04ea941d2be7bb9af327 100644 (file)
@@ -174,8 +174,8 @@ void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt)
 
 int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
 {
-        u32          *cpu;
-        dma_addr_t   dma_addr;
+       u32          *cpu;
+       dma_addr_t   dma_addr;
 
        cpu = pci_alloc_consistent(pci, PAGE_SIZE, &dma_addr);
        if (NULL == cpu) {
@@ -405,7 +405,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
 
        pci_set_drvdata(pci, dev);
 
-        init_MUTEX(&dev->lock);
+       init_MUTEX(&dev->lock);
        spin_lock_init(&dev->int_slock);
        spin_lock_init(&dev->slock);
 
index 37888989ea2e36e75b55a9fa22b09947453eee03..09ec964dec5c07742e4afa923c80f7f360762a07 100644 (file)
@@ -1,6 +1,6 @@
 #include <media/saa7146_vv.h>
 
-#define BOARD_CAN_DO_VBI(dev)   (dev->revision != 0 && dev->vv_data->vbi_minor != -1) 
+#define BOARD_CAN_DO_VBI(dev)   (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
 
 /****************************************************************************/
 /* resource management functions, shamelessly stolen from saa7134 driver */
@@ -102,9 +102,9 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
        /* finish current buffer */
        if (NULL == q->curr) {
                DEB_D(("aiii. no current buffer\n"));
-               return; 
+               return;
        }
-                       
+
        q->curr->vb.state = state;
        do_gettimeofday(&q->curr->vb.ts);
        wake_up(&q->curr->vb.done);
@@ -143,13 +143,13 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
                        // fixme: fix this for vflip != 0
 
                        saa7146_write(dev, PROT_ADDR1, 0);
-                       saa7146_write(dev, MC2, (MASK_02|MASK_18));             
+                       saa7146_write(dev, MC2, (MASK_02|MASK_18));
 
                        /* write the address of the rps-program */
                        saa7146_write(dev, RPS_ADDR0, dev->d_rps0.dma_handle);
                        /* turn on rps */
                        saa7146_write(dev, MC1, (MASK_12 | MASK_28));
-                               
+
 /*
                        printk("vdma%d.base_even:     0x%08x\n", 1,saa7146_read(dev,BASE_EVEN1));
                        printk("vdma%d.base_odd:      0x%08x\n", 1,saa7146_read(dev,BASE_ODD1));
@@ -246,7 +246,7 @@ static int fops_open(struct inode *inode, struct file *file)
                goto out;
        }
        memset(fh,0,sizeof(*fh));
-       
+
        file->private_data = fh;
        fh->dev = dev;
        fh->type = type;
@@ -275,7 +275,7 @@ out:
                file->private_data = NULL;
        }
        up(&saa7146_devices_lock);
-        return result;
+       return result;
 }
 
 static int fops_release(struct inode *inode, struct file *file)
@@ -405,7 +405,7 @@ static struct file_operations video_fops =
 static void vv_callback(struct saa7146_dev *dev, unsigned long status)
 {
        u32 isr = status;
-       
+
        DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status));
 
        if (0 != (isr & (MASK_27))) {
@@ -454,11 +454,11 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
           handle different devices that might need different
           configuration data) */
        dev->ext_vv_data = ext_vv;
-       
+
        vv->video_minor = -1;
        vv->vbi_minor = -1;
 
-       vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);     
+       vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
        if( NULL == vv->d_clipping.cpu_addr ) {
                ERR(("out of memory. aborting.\n"));
                kfree(vv);
@@ -468,7 +468,7 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
 
        saa7146_video_uops.init(dev,vv);
        saa7146_vbi_uops.init(dev,vv);
-       
+
        dev->vv_data = vv;
        dev->vv_callback = &vv_callback;
 
@@ -480,12 +480,12 @@ int saa7146_vv_release(struct saa7146_dev* dev)
        struct saa7146_vv *vv = dev->vv_data;
 
        DEB_EE(("dev:%p\n",dev));
+
        pci_free_consistent(dev->pci, SAA7146_RPS_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
-       kfree(vv);
+       kfree(vv);
        dev->vv_data = NULL;
        dev->vv_callback = NULL;
-       
+
        return 0;
 }
 
@@ -498,7 +498,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
        DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type));
 
        // released by vfd->release
-       vfd = video_device_alloc();
+       vfd = video_device_alloc();
        if (vfd == NULL)
                return -ENOMEM;
 
@@ -530,7 +530,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
 int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev)
 {
        struct saa7146_vv *vv = dev->vv_data;
-       
+
        DEB_EE(("dev:%p\n",dev));
 
        if( VFL_TYPE_GRABBER == (*vid)->type ) {
index fec6beab8c2873d95715f67a38b4d20bc97d04c9..8aabdd8fb3c53a5b928fa78ff3e1a3b9d9fd19c1 100644 (file)
@@ -276,8 +276,8 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
        int i = 0, count = 0;
        u32* buffer = dev->d_i2c.cpu_addr;
        int err = 0;
-        int address_err = 0;
-        int short_delay = 0;
+       int address_err = 0;
+       int short_delay = 0;
 
        if (down_interruptible (&dev->i2c_lock))
                return -ERESTARTSYS;
@@ -325,7 +325,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
                                        if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) {
                                                goto out;
                                        }
-                                       address_err++;
+                                       address_err++;
                                }
                                DEB_I2C(("error while sending message(s). starting again.\n"));
                                break;
@@ -336,14 +336,14 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
                        break;
                }
 
-               /* delay a bit before retrying */
-               msleep(10);
+               /* delay a bit before retrying */
+               msleep(10);
 
        } while (err != num && retries--);
 
-        /* if every retry had an address error, exit right away */
-        if (address_err == retries) {
-               goto out;
+       /* if every retry had an address error, exit right away */
+       if (address_err == retries) {
+               goto out;
        }
 
        /* if any things had to be read, get the results */
index cb86a97fda1faad89cfd12a3f40527803913c7a7..063986ec16b51752868cf1d8440875202327aac7 100644 (file)
@@ -6,8 +6,8 @@ static int vbi_workaround(struct saa7146_dev *dev)
 {
        struct saa7146_vv *vv = dev->vv_data;
 
-        u32          *cpu;
-        dma_addr_t   dma_addr;
+       u32          *cpu;
+       dma_addr_t   dma_addr;
 
        int count = 0;
        int i;
index 8dd4d15ca36d8f038531eacda23af1925a202cba..1d961023b837c973852225cc0ba621205d4651ed 100644 (file)
@@ -150,23 +150,23 @@ static int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
        maxh  = vv->standard->v_max_out;
 
        if (V4L2_FIELD_ANY == field) {
-                field = (win->w.height > maxh/2)
-                        ? V4L2_FIELD_INTERLACED
-                        : V4L2_FIELD_TOP;
-               }
-        switch (field) {
-        case V4L2_FIELD_TOP:
-        case V4L2_FIELD_BOTTOM:
-        case V4L2_FIELD_ALTERNATE:
-                maxh = maxh / 2;
-                break;
-        case V4L2_FIELD_INTERLACED:
-                break;
-        default: {
+               field = (win->w.height > maxh/2)
+                       ? V4L2_FIELD_INTERLACED
+                       : V4L2_FIELD_TOP;
+               }
+       switch (field) {
+       case V4L2_FIELD_TOP:
+       case V4L2_FIELD_BOTTOM:
+       case V4L2_FIELD_ALTERNATE:
+               maxh = maxh / 2;
+               break;
+       case V4L2_FIELD_INTERLACED:
+               break;
+       default: {
                DEB_D(("no known field mode '%d'.\n",field));
-                return -EINVAL;
+               return -EINVAL;
+       }
        }
-        }
 
        win->field = field;
        if (win->w.width > maxw)
@@ -887,7 +887,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
 
                DEB_EE(("VIDIOC_QUERYCAP\n"));
 
-                strcpy(cap->driver, "saa7146 v4l2");
+               strcpy(cap->driver, "saa7146 v4l2");
                strlcpy(cap->card, dev->ext->name, sizeof(cap->card));
                sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
                cap->version = SAA7146_VERSION_CODE;
@@ -1011,19 +1011,19 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
                err = set_control(fh,arg);
                return err;
        }
-        case VIDIOC_G_PARM:
-        {
-                struct v4l2_streamparm *parm = arg;
+       case VIDIOC_G_PARM:
+       {
+               struct v4l2_streamparm *parm = arg;
                if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) {
                        return -EINVAL;
                }
-                memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));
+               memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));
                parm->parm.capture.readbuffers = 1;
                // fixme: only for PAL!
                parm->parm.capture.timeperframe.numerator = 1;
                parm->parm.capture.timeperframe.denominator = 25;
-                return 0;
-        }
+               return 0;
+       }
        case VIDIOC_G_FMT:
        {
                struct v4l2_format *f = arg;
@@ -1383,7 +1383,7 @@ static struct videobuf_queue_ops video_qops = {
 
 static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
 {
-        INIT_LIST_HEAD(&vv->video_q.queue);
+       INIT_LIST_HEAD(&vv->video_q.queue);
 
        init_timer(&vv->video_q.timeout);
        vv->video_q.timeout.function = saa7146_buffer_timeout;
index a94912ac1872797384b53f3f4a1e4cba24e476a8..344a3c898460768057e8efdf649ed5b0d937537c 100644 (file)
@@ -132,7 +132,7 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device *fc, int extended);
  * I2C-channel of the flexcop.
  */
 int flexcop_i2c_request(struct flexcop_device*, flexcop_access_op_t,
-                       flexcop_i2c_port_t, u8 chipaddr, u8 addr, u8 *buf, u16 len);
+                       flexcop_i2c_port_t, u8 chipaddr, u8 addr, u8 *buf, u16 len);
 
 /* from flexcop-sram.c */
 int flexcop_sram_set_dest(struct flexcop_device *fc, flexcop_sram_dest_t dest, flexcop_sram_dest_target_t target);
index a35330315f6597f4019026ca11649f0584bec1c3..21a9045b3ef6f1358cea5d823ed86dfb7553ba05 100644 (file)
@@ -298,7 +298,7 @@ static int flexcop_fe_request_firmware(struct dvb_frontend* fe, const struct fir
 }
 
 static int lgdt3303_pll_set(struct dvb_frontend* fe,
-                            struct dvb_frontend_parameters* params)
+                           struct dvb_frontend_parameters* params)
 {
        struct flexcop_device *fc = fe->dvb->priv;
        u8 buf[4];
@@ -332,7 +332,7 @@ static int lgdt3303_pll_set(struct dvb_frontend* fe,
                        return -EREMOTEIO;
        }
 
-        return 0;
+       return 0;
 }
 
 static struct lgdt330x_config air2pc_atsc_hd5000_config = {
index 2e398090cf63e1e70d3af43aee7b9079862aa760..77977e9c013e7d1e1bfd0b157a5f461e9418502b 100644 (file)
@@ -556,9 +556,9 @@ static int tdvs_tua6034_pll_set(struct dvb_frontend* fe, struct dvb_frontend_par
        dprintk("%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
                __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
        if ((err = i2c_transfer(card->i2c_adapter, &msg, 1)) != 1) {
-               printk(KERN_WARNING "dvb-bt8xx: %s error "
-                       "(addr %02x <- %02x, err = %i)\n",
-                       __FUNCTION__, buf[0], buf[1], err);
+               printk(KERN_WARNING "dvb-bt8xx: %s error "
+                       "(addr %02x <- %02x, err = %i)\n",
+                       __FUNCTION__, buf[0], buf[1], err);
                if (err < 0)
                        return err;
                else
index 7d7b0067f2281740f4e3393687744742ccbb948b..9f025825b2d2ca816940254fbd3fb8f4dcf9145a 100644 (file)
@@ -86,25 +86,25 @@ enum dmx_success {
 
 enum dmx_ts_pes
 {  /* also send packets to decoder (if it exists) */
-        DMX_TS_PES_AUDIO0,
+       DMX_TS_PES_AUDIO0,
        DMX_TS_PES_VIDEO0,
        DMX_TS_PES_TELETEXT0,
        DMX_TS_PES_SUBTITLE0,
        DMX_TS_PES_PCR0,
 
-        DMX_TS_PES_AUDIO1,
+       DMX_TS_PES_AUDIO1,
        DMX_TS_PES_VIDEO1,
        DMX_TS_PES_TELETEXT1,
        DMX_TS_PES_SUBTITLE1,
        DMX_TS_PES_PCR1,
 
-        DMX_TS_PES_AUDIO2,
+       DMX_TS_PES_AUDIO2,
        DMX_TS_PES_VIDEO2,
        DMX_TS_PES_TELETEXT2,
        DMX_TS_PES_SUBTITLE2,
        DMX_TS_PES_PCR2,
 
-        DMX_TS_PES_AUDIO3,
+       DMX_TS_PES_AUDIO3,
        DMX_TS_PES_VIDEO3,
        DMX_TS_PES_TELETEXT3,
        DMX_TS_PES_SUBTITLE3,
@@ -121,17 +121,17 @@ enum dmx_ts_pes
 
 
 struct dmx_ts_feed {
-        int is_filtering; /* Set to non-zero when filtering in progress */
-        struct dmx_demux *parent; /* Back-pointer */
-        void *priv; /* Pointer to private data of the API client */
-        int (*set) (struct dmx_ts_feed *feed,
+       int is_filtering; /* Set to non-zero when filtering in progress */
+       struct dmx_demux *parent; /* Back-pointer */
+       void *priv; /* Pointer to private data of the API client */
+       int (*set) (struct dmx_ts_feed *feed,
                    u16 pid,
                    int type,
                    enum dmx_ts_pes pes_type,
                    size_t circular_buffer_size,
                    struct timespec timeout);
-        int (*start_filtering) (struct dmx_ts_feed* feed);
-        int (*stop_filtering) (struct dmx_ts_feed* feed);
+       int (*start_filtering) (struct dmx_ts_feed* feed);
+       int (*stop_filtering) (struct dmx_ts_feed* feed);
 };
 
 /*--------------------------------------------------------------------------*/
@@ -139,35 +139,35 @@ struct dmx_ts_feed {
 /*--------------------------------------------------------------------------*/
 
 struct dmx_section_filter {
-        u8 filter_value [DMX_MAX_FILTER_SIZE];
-        u8 filter_mask [DMX_MAX_FILTER_SIZE];
-        u8 filter_mode [DMX_MAX_FILTER_SIZE];
-        struct dmx_section_feed* parent; /* Back-pointer */
-        void* priv; /* Pointer to private data of the API client */
+       u8 filter_value [DMX_MAX_FILTER_SIZE];
+       u8 filter_mask [DMX_MAX_FILTER_SIZE];
+       u8 filter_mode [DMX_MAX_FILTER_SIZE];
+       struct dmx_section_feed* parent; /* Back-pointer */
+       void* priv; /* Pointer to private data of the API client */
 };
 
 struct dmx_section_feed {
-        int is_filtering; /* Set to non-zero when filtering in progress */
-        struct dmx_demux* parent; /* Back-pointer */
-        void* priv; /* Pointer to private data of the API client */
+       int is_filtering; /* Set to non-zero when filtering in progress */
+       struct dmx_demux* parent; /* Back-pointer */
+       void* priv; /* Pointer to private data of the API client */
 
-        int check_crc;
+       int check_crc;
        u32 crc_val;
 
-        u8 *secbuf;
-        u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
-        u16 secbufp, seclen, tsfeedp;
+       u8 *secbuf;
+       u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
+       u16 secbufp, seclen, tsfeedp;
 
-        int (*set) (struct dmx_section_feed* feed,
+       int (*set) (struct dmx_section_feed* feed,
                    u16 pid,
                    size_t circular_buffer_size,
                    int check_crc);
-        int (*allocate_filter) (struct dmx_section_feed* feed,
+       int (*allocate_filter) (struct dmx_section_feed* feed,
                                struct dmx_section_filter** filter);
-        int (*release_filter) (struct dmx_section_feed* feed,
+       int (*release_filter) (struct dmx_section_feed* feed,
                               struct dmx_section_filter* filter);
-        int (*start_filtering) (struct dmx_section_feed* feed);
-        int (*stop_filtering) (struct dmx_section_feed* feed);
+       int (*start_filtering) (struct dmx_section_feed* feed);
+       int (*stop_filtering) (struct dmx_section_feed* feed);
 };
 
 /*--------------------------------------------------------------------------*/
@@ -205,10 +205,10 @@ enum dmx_frontend_source {
 };
 
 struct dmx_frontend {
-        struct list_head connectivity_list; /* List of front-ends that can
+       struct list_head connectivity_list; /* List of front-ends that can
                                               be connected to a particular
                                               demux */
-        enum dmx_frontend_source source;
+       enum dmx_frontend_source source;
 };
 
 /*--------------------------------------------------------------------------*/
@@ -240,38 +240,38 @@ struct dmx_frontend {
 #define DMX_FE_ENTRY(list) list_entry(list, struct dmx_frontend, connectivity_list)
 
 struct dmx_demux {
-        u32 capabilities;            /* Bitfield of capability flags */
-        struct dmx_frontend* frontend;    /* Front-end connected to the demux */
-        void* priv;                  /* Pointer to private data of the API client */
-        int (*open) (struct dmx_demux* demux);
-        int (*close) (struct dmx_demux* demux);
-        int (*write) (struct dmx_demux* demux, const char* buf, size_t count);
-        int (*allocate_ts_feed) (struct dmx_demux* demux,
+       u32 capabilities;            /* Bitfield of capability flags */
+       struct dmx_frontend* frontend;    /* Front-end connected to the demux */
+       void* priv;                  /* Pointer to private data of the API client */
+       int (*open) (struct dmx_demux* demux);
+       int (*close) (struct dmx_demux* demux);
+       int (*write) (struct dmx_demux* demux, const char* buf, size_t count);
+       int (*allocate_ts_feed) (struct dmx_demux* demux,
                                 struct dmx_ts_feed** feed,
                                 dmx_ts_cb callback);
-        int (*release_ts_feed) (struct dmx_demux* demux,
+       int (*release_ts_feed) (struct dmx_demux* demux,
                                struct dmx_ts_feed* feed);
-        int (*allocate_section_feed) (struct dmx_demux* demux,
+       int (*allocate_section_feed) (struct dmx_demux* demux,
                                      struct dmx_section_feed** feed,
                                      dmx_section_cb callback);
-        int (*release_section_feed) (struct dmx_demux* demux,
+       int (*release_section_feed) (struct dmx_demux* demux,
                                     struct dmx_section_feed* feed);
-        int (*add_frontend) (struct dmx_demux* demux,
+       int (*add_frontend) (struct dmx_demux* demux,
                             struct dmx_frontend* frontend);
-        int (*remove_frontend) (struct dmx_demux* demux,
+       int (*remove_frontend) (struct dmx_demux* demux,
                                struct dmx_frontend* frontend);
-        struct list_head* (*get_frontends) (struct dmx_demux* demux);
-        int (*connect_frontend) (struct dmx_demux* demux,
+       struct list_head* (*get_frontends) (struct dmx_demux* demux);
+       int (*connect_frontend) (struct dmx_demux* demux,
                                 struct dmx_frontend* frontend);
-        int (*disconnect_frontend) (struct dmx_demux* demux);
+       int (*disconnect_frontend) (struct dmx_demux* demux);
 
-        int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);
+       int (*get_pes_pids) (struct dmx_demux* demux, u16 *pids);
 
        int (*get_caps) (struct dmx_demux* demux, struct dmx_caps *caps);
 
        int (*set_source) (struct dmx_demux* demux, const dmx_source_t *src);
 
-        int (*get_stc) (struct dmx_demux* demux, unsigned int num,
+       int (*get_stc) (struct dmx_demux* demux, unsigned int num,
                        u64 *stc, unsigned int *base);
 };
 
index 8028c3a5e287c8a5abe8a42b73984545df911506..7b8373ad121b051cccbcbd675ca32e4f9d16efaa 100644 (file)
@@ -947,7 +947,7 @@ static int dvb_demux_do_ioctl(struct inode *inode, struct file *file,
 
        case DMX_GET_STC:
                if (!dmxdev->demux->get_stc) {
-                       ret=-EINVAL;
+                       ret=-EINVAL;
                        break;
                }
                ret = dmxdev->demux->get_stc(dmxdev->demux,
index 395a9cd75012c148bb0142adcaeb2e9dd67b1931..fd72920c21998586cab856d1796f543460d2968d 100644 (file)
@@ -53,51 +53,51 @@ enum dmxdev_state {
 };
 
 struct dmxdev_buffer {
-        u8 *data;
-        int size;
-        int pread;
-        int pwrite;
+       u8 *data;
+       int size;
+       int pread;
+       int pwrite;
        wait_queue_head_t queue;
-        int error;
+       int error;
 };
 
 struct dmxdev_filter {
        struct dvb_device *dvbdev;
 
-        union {
-               struct dmx_section_filter *sec;
+       union {
+               struct dmx_section_filter *sec;
        } filter;
 
-        union {
-                struct dmx_ts_feed *ts;
-                struct dmx_section_feed *sec;
+       union {
+               struct dmx_ts_feed *ts;
+               struct dmx_section_feed *sec;
        } feed;
 
-        union {
-               struct dmx_sct_filter_params sec;
-               struct dmx_pes_filter_params pes;
+       union {
+               struct dmx_sct_filter_params sec;
+               struct dmx_pes_filter_params pes;
        } params;
 
-        int type;
-        enum dmxdev_state state;
-        struct dmxdev *dev;
-        struct dmxdev_buffer buffer;
+       int type;
+       enum dmxdev_state state;
+       struct dmxdev *dev;
+       struct dmxdev_buffer buffer;
 
        struct semaphore mutex;
 
-        /* only for sections */
-        struct timer_list timer;
-        int todo;
-        u8 secheader[3];
+       /* only for sections */
+       struct timer_list timer;
+       int todo;
+       u8 secheader[3];
 
-        u16 pid;
+       u16 pid;
 };
 
 
 struct dmxdev_dvr {
-        int state;
-        struct dmxdev *dev;
-        struct dmxdev_buffer buffer;
+       int state;
+       struct dmxdev *dev;
+       struct dmxdev_buffer buffer;
 };
 
 
@@ -105,16 +105,16 @@ struct dmxdev {
        struct dvb_device *dvbdev;
        struct dvb_device *dvr_dvbdev;
 
-        struct dmxdev_filter *filter;
-        struct dmxdev_dvr *dvr;
-        struct dmx_demux *demux;
+       struct dmxdev_filter *filter;
+       struct dmxdev_dvr *dvr;
+       struct dmx_demux *demux;
 
-        int filternum;
-        int capabilities;
+       int filternum;
+       int capabilities;
 #define DMXDEV_CAP_DUPLEX 1
-        struct dmx_frontend *dvr_orig_fe;
+       struct dmx_frontend *dvr_orig_fe;
 
-        struct dmxdev_buffer dvr_buffer;
+       struct dmxdev_buffer dvr_buffer;
 #define DVR_BUFFER_SIZE (10*188*1024)
 
        struct semaphore mutex;
index cb2e7d6ba2836c5ca2549b020dbae71770edc3a4..5956c35d34accd234cf1cf5ecf4bc0fdd0a2f12f 100644 (file)
@@ -498,7 +498,7 @@ static int dvb_ca_en50221_parse_attributes(struct dvb_ca_private *ca, int slot)
        /* process the CFTABLE_ENTRY tuples, and any after those */
        while ((!end_chain) && (address < 0x1000)) {
                if ((status = dvb_ca_en50221_read_tuple(ca, slot, &address, &tupleType,
-                                                       &tupleLength, tuple)) < 0)
+                                                       &tupleLength, tuple)) < 0)
                        return status;
                switch (tupleType) {
                case 0x1B:      // CISTPL_CFTABLE_ENTRY
index bd5143906084dea1eb1b26ab5ee29553a2363a25..c49fd0bd7181dd89a2c67d73a891e5073cde6e9f 100644 (file)
@@ -72,12 +72,12 @@ static int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, in
        u8 pct;
 
        if (pr) printk( "Pic header: ");
-        pic->temporal_reference[field] = (( headr[0] << 2 ) |
+       pic->temporal_reference[field] = (( headr[0] << 2 ) |
                                          (headr[1] & 0x03) )& 0x03ff;
        if (pr) printk( " temp ref: 0x%04x", pic->temporal_reference[field]);
 
        pct = ( headr[1] >> 2 ) & 0x07;
-        pic->picture_coding_type[field] = pct;
+       pic->picture_coding_type[field] = pct;
        if (pr) {
                switch(pct){
                        case I_FRAME:
@@ -93,17 +93,17 @@ static int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, in
        }
 
 
-        pic->vinfo.vbv_delay  = (( headr[1] >> 5 ) | ( headr[2] << 3) |
+       pic->vinfo.vbv_delay  = (( headr[1] >> 5 ) | ( headr[2] << 3) |
                                 ( (headr[3] & 0x1F) << 11) ) & 0xffff;
 
        if (pr) printk( " vbv delay: 0x%04x", pic->vinfo.vbv_delay);
 
-        pic->picture_header_parameter = ( headr[3] & 0xe0 ) |
+       pic->picture_header_parameter = ( headr[3] & 0xe0 ) |
                ((headr[4] & 0x80) >> 3);
 
-        if ( pct == B_FRAME ){
-                pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f;
-        }
+       if ( pct == B_FRAME ){
+               pic->picture_header_parameter |= ( headr[4] >> 3 ) & 0x0f;
+       }
        if (pr) printk( " pic head param: 0x%x",
                        pic->picture_header_parameter);
 
@@ -124,18 +124,18 @@ static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
                       ((headr[0]<<4)& 0x30)| ((headr[1]>>4)& 0x0F),
                       ((headr[1]<<3)& 0x38)| ((headr[2]>>5)& 0x0F));
 
-        if ( ( headr[3] & 0x40 ) != 0 ){
-                pic->closed_gop = 1;
-        } else {
-                pic->closed_gop = 0;
-        }
+       if ( ( headr[3] & 0x40 ) != 0 ){
+               pic->closed_gop = 1;
+       } else {
+               pic->closed_gop = 0;
+       }
        if (pr) printk("closed: %d", pic->closed_gop);
 
-        if ( ( headr[3] & 0x20 ) != 0 ){
-                pic->broken_link = 1;
-        } else {
-                pic->broken_link = 0;
-        }
+       if ( ( headr[3] & 0x20 ) != 0 ){
+               pic->broken_link = 1;
+       } else {
+               pic->broken_link = 0;
+       }
        if (pr) printk(" broken: %d\n", pic->broken_link);
 
        return 0;
@@ -146,7 +146,7 @@ static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
 /* needs 8 byte input */
 static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
 {
-        int sw;
+       int sw;
        int form = -1;
 
        if (pr) printk("Reading sequence header\n");
@@ -154,9 +154,9 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
        vi->horizontal_size     = ((headr[1] &0xF0) >> 4) | (headr[0] << 4);
        vi->vertical_size       = ((headr[1] &0x0F) << 8) | (headr[2]);
 
-        sw = (int)((headr[3]&0xF0) >> 4) ;
+       sw = (int)((headr[3]&0xF0) >> 4) ;
 
-        switch( sw ){
+       switch( sw ){
        case 1:
                if (pr)
                        printk("Videostream: ASPECT: 1:1");
@@ -165,84 +165,84 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
        case 2:
                if (pr)
                        printk("Videostream: ASPECT: 4:3");
-                vi->aspect_ratio = 133;
+               vi->aspect_ratio = 133;
                break;
        case 3:
                if (pr)
                        printk("Videostream: ASPECT: 16:9");
-                vi->aspect_ratio = 177;
+               vi->aspect_ratio = 177;
                break;
        case 4:
                if (pr)
                        printk("Videostream: ASPECT: 2.21:1");
-                vi->aspect_ratio = 221;
+               vi->aspect_ratio = 221;
                break;
 
-        case 5 ... 15:
+       case 5 ... 15:
                if (pr)
                        printk("Videostream: ASPECT: reserved");
-                vi->aspect_ratio = 0;
+               vi->aspect_ratio = 0;
                break;
 
-        default:
-                vi->aspect_ratio = 0;
-                return -1;
+       default:
+               vi->aspect_ratio = 0;
+               return -1;
        }
 
        if (pr)
                printk("  Size = %dx%d",vi->horizontal_size,vi->vertical_size);
 
-        sw = (int)(headr[3]&0x0F);
+       sw = (int)(headr[3]&0x0F);
 
-        switch ( sw ) {
+       switch ( sw ) {
        case 1:
                if (pr)
                        printk("  FRate: 23.976 fps");
-                vi->framerate = 23976;
+               vi->framerate = 23976;
                form = -1;
                break;
        case 2:
                if (pr)
                        printk("  FRate: 24 fps");
-                vi->framerate = 24000;
+               vi->framerate = 24000;
                form = -1;
                break;
        case 3:
                if (pr)
                        printk("  FRate: 25 fps");
-                vi->framerate = 25000;
+               vi->framerate = 25000;
                form = VIDEO_MODE_PAL;
                break;
        case 4:
                if (pr)
                        printk("  FRate: 29.97 fps");
-                vi->framerate = 29970;
+               vi->framerate = 29970;
                form = VIDEO_MODE_NTSC;
                break;
        case 5:
                if (pr)
                        printk("  FRate: 30 fps");
-                vi->framerate = 30000;
+               vi->framerate = 30000;
                form = VIDEO_MODE_NTSC;
                break;
        case 6:
                if (pr)
                        printk("  FRate: 50 fps");
-                vi->framerate = 50000;
+               vi->framerate = 50000;
                form = VIDEO_MODE_PAL;
                break;
        case 7:
                if (pr)
                        printk("  FRate: 60 fps");
-                vi->framerate = 60000;
+               vi->framerate = 60000;
                form = VIDEO_MODE_NTSC;
                break;
        }
 
        vi->bit_rate = (headr[4] << 10) | (headr[5] << 2) | (headr[6] & 0x03);
 
-        vi->vbv_buffer_size
-                = (( headr[6] & 0xF8) >> 3 ) | (( headr[7] & 0x1F )<< 5);
+       vi->vbv_buffer_size
+               = (( headr[6] & 0xF8) >> 3 ) | (( headr[7] & 0x1F )<< 5);
 
        if (pr){
                printk("  BRate: %d Mbit/s",4*(vi->bit_rate)/10000);
@@ -250,7 +250,7 @@ static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
                printk("\n");
        }
 
-        vi->video_format = form;
+       vi->video_format = form;
 
        return 0;
 }
@@ -308,7 +308,7 @@ static int get_ainfo(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr)
        if (!found) return -1;
 
        if (c+3 >= count) return -1;
-        headr = mbuf+c;
+       headr = mbuf+c;
 
        ai->layer = (headr[1] & 0x06) >> 1;
 
@@ -368,7 +368,7 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p
        if (c+5 >= count) return -1;
 
        ai->layer = 0;  // 0 for AC3
-        headr = mbuf+c+2;
+       headr = mbuf+c+2;
 
        frame = (headr[2]&0x3f);
        ai->bit_rate = ac3_bitrates[frame >> 1]*1000;
@@ -396,159 +396,159 @@ EXPORT_SYMBOL(dvb_filter_get_ac3info);
 #if 0
 static u8 *skip_pes_header(u8 **bufp)
 {
-        u8 *inbuf = *bufp;
-        u8 *buf = inbuf;
-        u8 *pts = NULL;
-        int skip = 0;
+       u8 *inbuf = *bufp;
+       u8 *buf = inbuf;
+       u8 *pts = NULL;
+       int skip = 0;
 
        static const int mpeg1_skip_table[16] = {
                1, 0xffff,      5,     10, 0xffff, 0xffff, 0xffff, 0xffff,
-               0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
+               0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff
        };
 
 
-        if ((inbuf[6] & 0xc0) == 0x80){ /* mpeg2 */
-                if (buf[7] & PTS_ONLY)
-                        pts = buf+9;
-                else pts = NULL;
-                buf = inbuf + 9 + inbuf[8];
-        } else {        /* mpeg1 */
-                for (buf = inbuf + 6; *buf == 0xff; buf++)
-                        if (buf == inbuf + 6 + 16) {
-                                break;
-                        }
-                if ((*buf & 0xc0) == 0x40)
-                        buf += 2;
-                skip = mpeg1_skip_table [*buf >> 4];
-                if (skip == 5 || skip == 10) pts = buf;
-                else pts = NULL;
-
-                buf += mpeg1_skip_table [*buf >> 4];
-        }
-
-        *bufp = buf;
-        return pts;
+       if ((inbuf[6] & 0xc0) == 0x80){ /* mpeg2 */
+               if (buf[7] & PTS_ONLY)
+                       pts = buf+9;
+               else pts = NULL;
+               buf = inbuf + 9 + inbuf[8];
+       } else {        /* mpeg1 */
+               for (buf = inbuf + 6; *buf == 0xff; buf++)
+                       if (buf == inbuf + 6 + 16) {
+                               break;
+                       }
+               if ((*buf & 0xc0) == 0x40)
+                       buf += 2;
+               skip = mpeg1_skip_table [*buf >> 4];
+               if (skip == 5 || skip == 10) pts = buf;
+               else pts = NULL;
+
+               buf += mpeg1_skip_table [*buf >> 4];
+       }
+
+       *bufp = buf;
+       return pts;
 }
 #endif
 
 #if 0
 static void initialize_quant_matrix( u32 *matrix )
 {
-        int i;
-
-        matrix[0]  = 0x08101013;
-        matrix[1]  = 0x10131616;
-        matrix[2]  = 0x16161616;
-        matrix[3]  = 0x1a181a1b;
-        matrix[4]  = 0x1b1b1a1a;
-        matrix[5]  = 0x1a1a1b1b;
-        matrix[6]  = 0x1b1d1d1d;
-        matrix[7]  = 0x2222221d;
-        matrix[8]  = 0x1d1d1b1b;
-        matrix[9]  = 0x1d1d2020;
-        matrix[10] = 0x22222526;
-        matrix[11] = 0x25232322;
-        matrix[12] = 0x23262628;
-        matrix[13] = 0x28283030;
-        matrix[14] = 0x2e2e3838;
-        matrix[15] = 0x3a454553;
-
-        for ( i = 16 ; i < 32 ; i++ )
-                matrix[i] = 0x10101010;
+       int i;
+
+       matrix[0]  = 0x08101013;
+       matrix[1]  = 0x10131616;
+       matrix[2]  = 0x16161616;
+       matrix[3]  = 0x1a181a1b;
+       matrix[4]  = 0x1b1b1a1a;
+       matrix[5]  = 0x1a1a1b1b;
+       matrix[6]  = 0x1b1d1d1d;
+       matrix[7]  = 0x2222221d;
+       matrix[8]  = 0x1d1d1b1b;
+       matrix[9]  = 0x1d1d2020;
+       matrix[10] = 0x22222526;
+       matrix[11] = 0x25232322;
+       matrix[12] = 0x23262628;
+       matrix[13] = 0x28283030;
+       matrix[14] = 0x2e2e3838;
+       matrix[15] = 0x3a454553;
+
+       for ( i = 16 ; i < 32 ; i++ )
+               matrix[i] = 0x10101010;
 }
 #endif
 
 #if 0
 static void initialize_mpg_picture(struct mpg_picture *pic)
 {
-        int i;
-
-        /* set MPEG1 */
-        pic->mpeg1_flag = 1;
-        pic->profile_and_level = 0x4A ;        /* MP@LL */
-        pic->progressive_sequence = 1;
-        pic->low_delay = 0;
-
-        pic->sequence_display_extension_flag = 0;
-        for ( i = 0 ; i < 4 ; i++ ){
-                pic->frame_centre_horizontal_offset[i] = 0;
-                pic->frame_centre_vertical_offset[i] = 0;
-        }
-        pic->last_frame_centre_horizontal_offset = 0;
-        pic->last_frame_centre_vertical_offset = 0;
-
-        pic->picture_display_extension_flag[0] = 0;
-        pic->picture_display_extension_flag[1] = 0;
-        pic->sequence_header_flag = 0;
+       int i;
+
+       /* set MPEG1 */
+       pic->mpeg1_flag = 1;
+       pic->profile_and_level = 0x4A ;        /* MP@LL */
+       pic->progressive_sequence = 1;
+       pic->low_delay = 0;
+
+       pic->sequence_display_extension_flag = 0;
+       for ( i = 0 ; i < 4 ; i++ ){
+               pic->frame_centre_horizontal_offset[i] = 0;
+               pic->frame_centre_vertical_offset[i] = 0;
+       }
+       pic->last_frame_centre_horizontal_offset = 0;
+       pic->last_frame_centre_vertical_offset = 0;
+
+       pic->picture_display_extension_flag[0] = 0;
+       pic->picture_display_extension_flag[1] = 0;
+       pic->sequence_header_flag = 0;
        pic->gop_flag = 0;
-        pic->sequence_end_flag = 0;
+       pic->sequence_end_flag = 0;
 }
 #endif
 
 #if 0
 static void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic )
 {
-        int16_t last_h_offset;
-        int16_t last_v_offset;
-
-        int16_t *p_h_offset;
-        int16_t *p_v_offset;
-
-        if ( pic->mpeg1_flag ){
-                pic->picture_structure[field_type] = VIDEO_FRAME_PICTURE;
-                pic->top_field_first = 0;
-                pic->repeat_first_field = 0;
-                pic->progressive_frame = 1;
-                pic->picture_coding_parameter = 0x000010;
-        }
-
-        /* Reset flag */
-        pic->picture_display_extension_flag[field_type] = 0;
-
-        last_h_offset = pic->last_frame_centre_horizontal_offset;
-        last_v_offset = pic->last_frame_centre_vertical_offset;
-        if ( field_type == FIRST_FIELD ){
-                p_h_offset = pic->frame_centre_horizontal_offset;
-                p_v_offset = pic->frame_centre_vertical_offset;
-                *p_h_offset = last_h_offset;
-                *(p_h_offset + 1) = last_h_offset;
-                *(p_h_offset + 2) = last_h_offset;
-                *p_v_offset = last_v_offset;
-                *(p_v_offset + 1) = last_v_offset;
-                *(p_v_offset + 2) = last_v_offset;
-        } else {
-                pic->frame_centre_horizontal_offset[3] = last_h_offset;
-                pic->frame_centre_vertical_offset[3] = last_v_offset;
-        }
+       int16_t last_h_offset;
+       int16_t last_v_offset;
+
+       int16_t *p_h_offset;
+       int16_t *p_v_offset;
+
+       if ( pic->mpeg1_flag ){
+               pic->picture_structure[field_type] = VIDEO_FRAME_PICTURE;
+               pic->top_field_first = 0;
+               pic->repeat_first_field = 0;
+               pic->progressive_frame = 1;
+               pic->picture_coding_parameter = 0x000010;
+       }
+
+       /* Reset flag */
+       pic->picture_display_extension_flag[field_type] = 0;
+
+       last_h_offset = pic->last_frame_centre_horizontal_offset;
+       last_v_offset = pic->last_frame_centre_vertical_offset;
+       if ( field_type == FIRST_FIELD ){
+               p_h_offset = pic->frame_centre_horizontal_offset;
+               p_v_offset = pic->frame_centre_vertical_offset;
+               *p_h_offset = last_h_offset;
+               *(p_h_offset + 1) = last_h_offset;
+               *(p_h_offset + 2) = last_h_offset;
+               *p_v_offset = last_v_offset;
+               *(p_v_offset + 1) = last_v_offset;
+               *(p_v_offset + 2) = last_v_offset;
+       } else {
+               pic->frame_centre_horizontal_offset[3] = last_h_offset;
+               pic->frame_centre_vertical_offset[3] = last_v_offset;
+       }
 }
 #endif
 
 #if 0
 static void init_mpg_picture( struct mpg_picture *pic, int chan, int32_t field_type)
 {
-        pic->picture_header = 0;
-        pic->sequence_header_data
-                = ( INIT_HORIZONTAL_SIZE << 20 )
-                        | ( INIT_VERTICAL_SIZE << 8 )
-                        | ( INIT_ASPECT_RATIO << 4 )
-                        | ( INIT_FRAME_RATE );
-        pic->mpeg1_flag = 0;
-        pic->vinfo.horizontal_size
-                = INIT_DISP_HORIZONTAL_SIZE;
-        pic->vinfo.vertical_size
-                = INIT_DISP_VERTICAL_SIZE;
-        pic->picture_display_extension_flag[field_type]
-                = 0;
-        pic->pts_flag[field_type] = 0;
-
-        pic->sequence_gop_header = 0;
-        pic->picture_header = 0;
-        pic->sequence_header_flag = 0;
-        pic->gop_flag = 0;
-        pic->sequence_end_flag = 0;
-        pic->sequence_display_extension_flag = 0;
-        pic->last_frame_centre_horizontal_offset = 0;
-        pic->last_frame_centre_vertical_offset = 0;
+       pic->picture_header = 0;
+       pic->sequence_header_data
+               = ( INIT_HORIZONTAL_SIZE << 20 )
+                       | ( INIT_VERTICAL_SIZE << 8 )
+                       | ( INIT_ASPECT_RATIO << 4 )
+                       | ( INIT_FRAME_RATE );
+       pic->mpeg1_flag = 0;
+       pic->vinfo.horizontal_size
+               = INIT_DISP_HORIZONTAL_SIZE;
+       pic->vinfo.vertical_size
+               = INIT_DISP_VERTICAL_SIZE;
+       pic->picture_display_extension_flag[field_type]
+               = 0;
+       pic->pts_flag[field_type] = 0;
+
+       pic->sequence_gop_header = 0;
+       pic->picture_header = 0;
+       pic->sequence_header_flag = 0;
+       pic->gop_flag = 0;
+       pic->sequence_end_flag = 0;
+       pic->sequence_display_extension_flag = 0;
+       pic->last_frame_centre_horizontal_offset = 0;
+       pic->last_frame_centre_vertical_offset = 0;
        pic->channel = chan;
 }
 #endif
@@ -588,11 +588,11 @@ int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
                buf[1]&=~0x40;
        }
        if (!len)
-               return 0;
+               return 0;
        buf[3]=0x30|((p2ts->cc++)&0x0f);
        rest=183-len;
        if (rest) {
-               buf[5]=0x00;
+               buf[5]=0x00;
                if (rest-1)
                        memset(buf+6, 0xff, rest-1);
        }
index b0848f7836b746026421df1c3e290c0b185c88bc..375e3be184b1afc54bacb55ad951948e819ed1c9 100644 (file)
@@ -29,8 +29,8 @@ typedef int (dvb_filter_pes2ts_cb_t) (void *, unsigned char *);
 
 struct dvb_filter_pes2ts {
        unsigned char buf[188];
-        unsigned char cc;
-        dvb_filter_pes2ts_cb_t *cb;
+       unsigned char cc;
+       dvb_filter_pes2ts_cb_t *cb;
        void *priv;
 };
 
@@ -162,7 +162,7 @@ struct dvb_video_info {
        u32 bit_rate;
        u32 comp_bit_rate;
        u32 vbv_buffer_size;
-        s16 vbv_delay;
+       s16 vbv_delay;
        u32 CSPF;
        u32 off;
 };
@@ -173,60 +173,60 @@ struct dvb_video_info {
 #define VIDEO_FRAME_PICTURE 0x03
 
 struct mpg_picture {
-        int       channel;
+       int       channel;
        struct dvb_video_info vinfo;
-        u32      *sequence_gop_header;
-        u32      *picture_header;
-        s32       time_code;
-        int       low_delay;
-        int       closed_gop;
-        int       broken_link;
-        int       sequence_header_flag;
-        int       gop_flag;
-        int       sequence_end_flag;
-
-        u8        profile_and_level;
-        s32       picture_coding_parameter;
-        u32       matrix[32];
-        s8        matrix_change_flag;
-
-        u8        picture_header_parameter;
+       u32      *sequence_gop_header;
+       u32      *picture_header;
+       s32       time_code;
+       int       low_delay;
+       int       closed_gop;
+       int       broken_link;
+       int       sequence_header_flag;
+       int       gop_flag;
+       int       sequence_end_flag;
+
+       u8        profile_and_level;
+       s32       picture_coding_parameter;
+       u32       matrix[32];
+       s8        matrix_change_flag;
+
+       u8        picture_header_parameter;
   /* bit 0 - 2: bwd f code
      bit 3    : fpb vector
      bit 4 - 6: fwd f code
      bit 7    : fpf vector */
 
-        int       mpeg1_flag;
-        int       progressive_sequence;
-        int       sequence_display_extension_flag;
-        u32       sequence_header_data;
-        s16       last_frame_centre_horizontal_offset;
-        s16       last_frame_centre_vertical_offset;
-
-        u32       pts[2]; /* [0] 1st field, [1] 2nd field */
-        int       top_field_first;
-        int       repeat_first_field;
-        int       progressive_frame;
-        int       bank;
-        int       forward_bank;
-        int       backward_bank;
-        int       compress;
-        s16       frame_centre_horizontal_offset[OFF_SIZE];
-                  /* [0-2] 1st field, [3] 2nd field */
-        s16       frame_centre_vertical_offset[OFF_SIZE];
-                  /* [0-2] 1st field, [3] 2nd field */
-        s16       temporal_reference[2];
-                  /* [0] 1st field, [1] 2nd field */
-
-        s8        picture_coding_type[2];
-                  /* [0] 1st field, [1] 2nd field */
-        s8        picture_structure[2];
-                  /* [0] 1st field, [1] 2nd field */
-        s8        picture_display_extension_flag[2];
-                  /* [0] 1st field, [1] 2nd field */
-                  /* picture_display_extenion() 0:no 1:exit*/
-        s8        pts_flag[2];
-                  /* [0] 1st field, [1] 2nd field */
+       int       mpeg1_flag;
+       int       progressive_sequence;
+       int       sequence_display_extension_flag;
+       u32       sequence_header_data;
+       s16       last_frame_centre_horizontal_offset;
+       s16       last_frame_centre_vertical_offset;
+
+       u32       pts[2]; /* [0] 1st field, [1] 2nd field */
+       int       top_field_first;
+       int       repeat_first_field;
+       int       progressive_frame;
+       int       bank;
+       int       forward_bank;
+       int       backward_bank;
+       int       compress;
+       s16       frame_centre_horizontal_offset[OFF_SIZE];
+                 /* [0-2] 1st field, [3] 2nd field */
+       s16       frame_centre_vertical_offset[OFF_SIZE];
+                 /* [0-2] 1st field, [3] 2nd field */
+       s16       temporal_reference[2];
+                 /* [0] 1st field, [1] 2nd field */
+
+       s8        picture_coding_type[2];
+                 /* [0] 1st field, [1] 2nd field */
+       s8        picture_structure[2];
+                 /* [0] 1st field, [1] 2nd field */
+       s8        picture_display_extension_flag[2];
+                 /* [0] 1st field, [1] 2nd field */
+                 /* picture_display_extenion() 0:no 1:exit*/
+       s8        pts_flag[2];
+                 /* [0] 1st field, [1] 2nd field */
 };
 
 struct dvb_audio_info {
index 6ffa6b2163631117661d16c7a7f540d79b3ee8b6..95ea5095e07e07ae0ecb5d46240aaa297d7b7442 100644 (file)
@@ -372,10 +372,10 @@ static int dvb_frontend_thread(void *data)
 
        snprintf (name, sizeof(name), "kdvb-fe-%i", fe->dvb->num);
 
-        lock_kernel();
-        daemonize(name);
-        sigfillset(&current->blocked);
-        unlock_kernel();
+       lock_kernel();
+       daemonize(name);
+       sigfillset(&current->blocked);
+       unlock_kernel();
 
        fepriv->status = 0;
        dvb_frontend_init(fe);
index 348c9b0b988aeab22245fd58ae369ae91b88fdaf..1e0840d02f1f5e0307cbd7b9cc1d9eabc53c7f56 100644 (file)
 #include "dvbdev.h"
 
 struct dvb_frontend_tune_settings {
-        int min_delay_ms;
-        int step_size;
-        int max_drift;
-        struct dvb_frontend_parameters parameters;
+       int min_delay_ms;
+       int step_size;
+       int max_drift;
+       struct dvb_frontend_parameters parameters;
 };
 
 struct dvb_frontend;
index df536bd2e103b85690645511753fd0b83a29aab8..86bba81e851e0efe9eeed9b06979493328439dcc 100644 (file)
@@ -713,7 +713,7 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
        if (buffer1_len > 32768)
                printk(KERN_WARNING "length > 32k: %zu.\n", buffer1_len);
        /* printk("TS callback: %u bytes, %u TS cells @ %p.\n",
-                 buffer1_len, buffer1_len / TS_SZ, buffer1); */
+                 buffer1_len, buffer1_len / TS_SZ, buffer1); */
        dvb_net_ule(dev, buffer1, buffer1_len);
        return 0;
 }
@@ -721,8 +721,8 @@ static int dvb_net_ts_callback(const u8 *buffer1, size_t buffer1_len,
 
 static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
 {
-        u8 *eth;
-        struct sk_buff *skb;
+       u8 *eth;
+       struct sk_buff *skb;
        struct net_device_stats *stats = &(((struct dvb_net_priv *) dev->priv)->stats);
        int snap = 0;
 
@@ -754,7 +754,7 @@ static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
                        return;
                }
                snap = 8;
-        }
+       }
        if (pkt[7]) {
                /* FIXME: assemble datagram from multiple sections */
                stats->rx_errors++;
@@ -778,14 +778,14 @@ static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
        memcpy(eth + 14, pkt + 12 + snap, pkt_len - 12 - 4 - snap);
 
        /* create ethernet header: */
-        eth[0]=pkt[0x0b];
-        eth[1]=pkt[0x0a];
-        eth[2]=pkt[0x09];
-        eth[3]=pkt[0x08];
-        eth[4]=pkt[0x04];
-        eth[5]=pkt[0x03];
+       eth[0]=pkt[0x0b];
+       eth[1]=pkt[0x0a];
+       eth[2]=pkt[0x09];
+       eth[3]=pkt[0x08];
+       eth[4]=pkt[0x04];
+       eth[5]=pkt[0x03];
 
-        eth[6]=eth[7]=eth[8]=eth[9]=eth[10]=eth[11]=0;
+       eth[6]=eth[7]=eth[8]=eth[9]=eth[10]=eth[11]=0;
 
        if (snap) {
                eth[12] = pkt[18];
@@ -807,7 +807,7 @@ static void dvb_net_sec(struct net_device *dev, u8 *pkt, int pkt_len)
 
        stats->rx_packets++;
        stats->rx_bytes+=skb->len;
-        netif_rx(skb);
+       netif_rx(skb);
 }
 
 static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
@@ -815,7 +815,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len,
                 struct dmx_section_filter *filter,
                 enum dmx_success success)
 {
-        struct net_device *dev = filter->priv;
+       struct net_device *dev = filter->priv;
 
        /**
         * we rely on the DVB API definition where exactly one complete
@@ -885,8 +885,8 @@ static int dvb_net_feed_start(struct net_device *dev)
 {
        int ret = 0, i;
        struct dvb_net_priv *priv = dev->priv;
-        struct dmx_demux *demux = priv->demux;
-        unsigned char *mac = (unsigned char *) dev->dev_addr;
+       struct dmx_demux *demux = priv->demux;
+       unsigned char *mac = (unsigned char *) dev->dev_addr;
 
        dprintk("%s: rx_mode %i\n", __FUNCTION__, priv->rx_mode);
        down(&priv->mutex);
@@ -1129,12 +1129,12 @@ static int dvb_net_stop(struct net_device *dev)
        struct dvb_net_priv *priv = dev->priv;
 
        priv->in_use--;
-        return dvb_net_feed_stop(dev);
+       return dvb_net_feed_stop(dev);
 }
 
 static struct net_device_stats * dvb_net_get_stats(struct net_device *dev)
 {
-        return &((struct dvb_net_priv*) dev->priv)->stats;
+       return &((struct dvb_net_priv*) dev->priv)->stats;
 }
 
 static void dvb_net_setup(struct net_device *dev)
@@ -1360,10 +1360,10 @@ static struct file_operations dvb_net_fops = {
 };
 
 static struct dvb_device dvbdev_net = {
-        .priv = NULL,
-        .users = 1,
-        .writers = 1,
-        .fops = &dvb_net_fops,
+       .priv = NULL,
+       .users = 1,
+       .writers = 1,
+       .fops = &dvb_net_fops,
 };
 
 
index fb6d94a69d71f3290814bb73611e12d790345f81..283c6e9339a4651b5b6c954e124d7e38025a1d0a 100644 (file)
 
 void dvb_ringbuffer_init(struct dvb_ringbuffer *rbuf, void *data, size_t len)
 {
-        rbuf->pread=rbuf->pwrite=0;
-        rbuf->data=data;
-        rbuf->size=len;
+       rbuf->pread=rbuf->pwrite=0;
+       rbuf->data=data;
+       rbuf->size=len;
 
-        init_waitqueue_head(&rbuf->queue);
+       init_waitqueue_head(&rbuf->queue);
 
-        spin_lock_init(&(rbuf->lock));
+       spin_lock_init(&(rbuf->lock));
 }
 
 
 
 int dvb_ringbuffer_empty(struct dvb_ringbuffer *rbuf)
 {
-        return (rbuf->pread==rbuf->pwrite);
+       return (rbuf->pread==rbuf->pwrite);
 }
 
 
 
 ssize_t dvb_ringbuffer_free(struct dvb_ringbuffer *rbuf)
 {
-        ssize_t free;
+       ssize_t free;
 
-        free = rbuf->pread - rbuf->pwrite;
-        if (free <= 0)
-                free += rbuf->size;
-        return free-1;
+       free = rbuf->pread - rbuf->pwrite;
+       if (free <= 0)
+               free += rbuf->size;
+       return free-1;
 }
 
 
 
 ssize_t dvb_ringbuffer_avail(struct dvb_ringbuffer *rbuf)
 {
-        ssize_t avail;
+       ssize_t avail;
 
-        avail = rbuf->pwrite - rbuf->pread;
-        if (avail < 0)
-                avail += rbuf->size;
-        return avail;
+       avail = rbuf->pwrite - rbuf->pread;
+       if (avail < 0)
+               avail += rbuf->size;
+       return avail;
 }
 
 
 
 void dvb_ringbuffer_flush(struct dvb_ringbuffer *rbuf)
 {
-        rbuf->pread = rbuf->pwrite;
+       rbuf->pread = rbuf->pwrite;
 }
 
 
 
 void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf)
 {
-        unsigned long flags;
+       unsigned long flags;
 
-        spin_lock_irqsave(&rbuf->lock, flags);
-        dvb_ringbuffer_flush(rbuf);
-        spin_unlock_irqrestore(&rbuf->lock, flags);
+       spin_lock_irqsave(&rbuf->lock, flags);
+       dvb_ringbuffer_flush(rbuf);
+       spin_unlock_irqrestore(&rbuf->lock, flags);
 
-        wake_up(&rbuf->queue);
+       wake_up(&rbuf->queue);
 }
 
 
 
 ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf, size_t len, int usermem)
 {
-        size_t todo = len;
-        size_t split;
-
-        split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0;
-        if (split > 0) {
-                if (!usermem)
-                        memcpy(buf, rbuf->data+rbuf->pread, split);
-                else
-                        if (copy_to_user(buf, rbuf->data+rbuf->pread, split))
-                                return -EFAULT;
-                buf += split;
-                todo -= split;
-                rbuf->pread = 0;
-        }
-        if (!usermem)
-                memcpy(buf, rbuf->data+rbuf->pread, todo);
-        else
-                if (copy_to_user(buf, rbuf->data+rbuf->pread, todo))
-                        return -EFAULT;
-
-        rbuf->pread = (rbuf->pread + todo) % rbuf->size;
-
-        return len;
+       size_t todo = len;
+       size_t split;
+
+       split = (rbuf->pread + len > rbuf->size) ? rbuf->size - rbuf->pread : 0;
+       if (split > 0) {
+               if (!usermem)
+                       memcpy(buf, rbuf->data+rbuf->pread, split);
+               else
+                       if (copy_to_user(buf, rbuf->data+rbuf->pread, split))
+                               return -EFAULT;
+               buf += split;
+               todo -= split;
+               rbuf->pread = 0;
+       }
+       if (!usermem)
+               memcpy(buf, rbuf->data+rbuf->pread, todo);
+       else
+               if (copy_to_user(buf, rbuf->data+rbuf->pread, todo))
+                       return -EFAULT;
+
+       rbuf->pread = (rbuf->pread + todo) % rbuf->size;
+
+       return len;
 }
 
 
 
 ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf, size_t len)
 {
-        size_t todo = len;
-        size_t split;
+       size_t todo = len;
+       size_t split;
 
-        split = (rbuf->pwrite + len > rbuf->size) ? rbuf->size - rbuf->pwrite : 0;
+       split = (rbuf->pwrite + len > rbuf->size) ? rbuf->size - rbuf->pwrite : 0;
 
-        if (split > 0) {
-                memcpy(rbuf->data+rbuf->pwrite, buf, split);
-                buf += split;
-                todo -= split;
-                rbuf->pwrite = 0;
-        }
-        memcpy(rbuf->data+rbuf->pwrite, buf, todo);
-        rbuf->pwrite = (rbuf->pwrite + todo) % rbuf->size;
+       if (split > 0) {
+               memcpy(rbuf->data+rbuf->pwrite, buf, split);
+               buf += split;
+               todo -= split;
+               rbuf->pwrite = 0;
+       }
+       memcpy(rbuf->data+rbuf->pwrite, buf, todo);
+       rbuf->pwrite = (rbuf->pwrite + todo) % rbuf->size;
 
-        return len;
+       return len;
 }
 
 ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf, size_t len)
 {
-        int status;
-        ssize_t oldpwrite = rbuf->pwrite;
+       int status;
+       ssize_t oldpwrite = rbuf->pwrite;
 
-        DVB_RINGBUFFER_WRITE_BYTE(rbuf, len >> 8);
-        DVB_RINGBUFFER_WRITE_BYTE(rbuf, len & 0xff);
-        DVB_RINGBUFFER_WRITE_BYTE(rbuf, PKT_READY);
-        status = dvb_ringbuffer_write(rbuf, buf, len);
+       DVB_RINGBUFFER_WRITE_BYTE(rbuf, len >> 8);
+       DVB_RINGBUFFER_WRITE_BYTE(rbuf, len & 0xff);
+       DVB_RINGBUFFER_WRITE_BYTE(rbuf, PKT_READY);
+       status = dvb_ringbuffer_write(rbuf, buf, len);
 
-        if (status < 0) rbuf->pwrite = oldpwrite;
-        return status;
+       if (status < 0) rbuf->pwrite = oldpwrite;
+       return status;
 }
 
 ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,
-                                int offset, u8* buf, size_t len, int usermem)
+                               int offset, u8* buf, size_t len, int usermem)
 {
-        size_t todo;
-        size_t split;
-        size_t pktlen;
-
-        pktlen = rbuf->data[idx] << 8;
-        pktlen |= rbuf->data[(idx + 1) % rbuf->size];
-        if (offset > pktlen) return -EINVAL;
-        if ((offset + len) > pktlen) len = pktlen - offset;
-
-        idx = (idx + DVB_RINGBUFFER_PKTHDRSIZE + offset) % rbuf->size;
-        todo = len;
-        split = ((idx + len) > rbuf->size) ? rbuf->size - idx : 0;
-        if (split > 0) {
-                if (!usermem)
-                        memcpy(buf, rbuf->data+idx, split);
-                else
-                        if (copy_to_user(buf, rbuf->data+idx, split))
-                                return -EFAULT;
-                buf += split;
-                todo -= split;
-                idx = 0;
-        }
-        if (!usermem)
-                memcpy(buf, rbuf->data+idx, todo);
-        else
-                if (copy_to_user(buf, rbuf->data+idx, todo))
-                        return -EFAULT;
-
-        return len;
+       size_t todo;
+       size_t split;
+       size_t pktlen;
+
+       pktlen = rbuf->data[idx] << 8;
+       pktlen |= rbuf->data[(idx + 1) % rbuf->size];
+       if (offset > pktlen) return -EINVAL;
+       if ((offset + len) > pktlen) len = pktlen - offset;
+
+       idx = (idx + DVB_RINGBUFFER_PKTHDRSIZE + offset) % rbuf->size;
+       todo = len;
+       split = ((idx + len) > rbuf->size) ? rbuf->size - idx : 0;
+       if (split > 0) {
+               if (!usermem)
+                       memcpy(buf, rbuf->data+idx, split);
+               else
+                       if (copy_to_user(buf, rbuf->data+idx, split))
+                               return -EFAULT;
+               buf += split;
+               todo -= split;
+               idx = 0;
+       }
+       if (!usermem)
+               memcpy(buf, rbuf->data+idx, todo);
+       else
+               if (copy_to_user(buf, rbuf->data+idx, todo))
+                       return -EFAULT;
+
+       return len;
 }
 
 void dvb_ringbuffer_pkt_dispose(struct dvb_ringbuffer *rbuf, size_t idx)
 {
-        size_t pktlen;
-
-        rbuf->data[(idx + 2) % rbuf->size] = PKT_DISPOSED;
-
-        // clean up disposed packets
-        while(dvb_ringbuffer_avail(rbuf) > DVB_RINGBUFFER_PKTHDRSIZE) {
-                if (DVB_RINGBUFFER_PEEK(rbuf, 2) == PKT_DISPOSED) {
-                        pktlen = DVB_RINGBUFFER_PEEK(rbuf, 0) << 8;
-                        pktlen |= DVB_RINGBUFFER_PEEK(rbuf, 1);
-                        DVB_RINGBUFFER_SKIP(rbuf, pktlen + DVB_RINGBUFFER_PKTHDRSIZE);
-                } else {
-                        // first packet is not disposed, so we stop cleaning now
-                        break;
-                }
-        }
+       size_t pktlen;
+
+       rbuf->data[(idx + 2) % rbuf->size] = PKT_DISPOSED;
+
+       // clean up disposed packets
+       while(dvb_ringbuffer_avail(rbuf) > DVB_RINGBUFFER_PKTHDRSIZE) {
+               if (DVB_RINGBUFFER_PEEK(rbuf, 2) == PKT_DISPOSED) {
+                       pktlen = DVB_RINGBUFFER_PEEK(rbuf, 0) << 8;
+                       pktlen |= DVB_RINGBUFFER_PEEK(rbuf, 1);
+                       DVB_RINGBUFFER_SKIP(rbuf, pktlen + DVB_RINGBUFFER_PKTHDRSIZE);
+               } else {
+                       // first packet is not disposed, so we stop cleaning now
+                       break;
+               }
+       }
 }
 
 ssize_t dvb_ringbuffer_pkt_next(struct dvb_ringbuffer *rbuf, size_t idx, size_t* pktlen)
 {
-        int consumed;
-        int curpktlen;
-        int curpktstatus;
+       int consumed;
+       int curpktlen;
+       int curpktstatus;
 
-        if (idx == -1) {
+       if (idx == -1) {
               idx = rbuf->pread;
        } else {
-                curpktlen = rbuf->data[idx] << 8;
-                curpktlen |= rbuf->data[(idx + 1) % rbuf->size];
-               idx = (idx + curpktlen + DVB_RINGBUFFER_PKTHDRSIZE) % rbuf->size;
+               curpktlen = rbuf->data[idx] << 8;
+               curpktlen |= rbuf->data[(idx + 1) % rbuf->size];
+               idx = (idx + curpktlen + DVB_RINGBUFFER_PKTHDRSIZE) % rbuf->size;
        }
 
-        consumed = (idx - rbuf->pread) % rbuf->size;
+       consumed = (idx - rbuf->pread) % rbuf->size;
 
-        while((dvb_ringbuffer_avail(rbuf) - consumed) > DVB_RINGBUFFER_PKTHDRSIZE) {
+       while((dvb_ringbuffer_avail(rbuf) - consumed) > DVB_RINGBUFFER_PKTHDRSIZE) {
 
-                curpktlen = rbuf->data[idx] << 8;
-                curpktlen |= rbuf->data[(idx + 1) % rbuf->size];
-                curpktstatus = rbuf->data[(idx + 2) % rbuf->size];
+               curpktlen = rbuf->data[idx] << 8;
+               curpktlen |= rbuf->data[(idx + 1) % rbuf->size];
+               curpktstatus = rbuf->data[(idx + 2) % rbuf->size];
 
-                if (curpktstatus == PKT_READY) {
-                        *pktlen = curpktlen;
-                        return idx;
-                }
+               if (curpktstatus == PKT_READY) {
+                       *pktlen = curpktlen;
+                       return idx;
+               }
 
-                consumed += curpktlen + DVB_RINGBUFFER_PKTHDRSIZE;
-                idx = (idx + curpktlen + DVB_RINGBUFFER_PKTHDRSIZE) % rbuf->size;
-        }
+               consumed += curpktlen + DVB_RINGBUFFER_PKTHDRSIZE;
+               idx = (idx + curpktlen + DVB_RINGBUFFER_PKTHDRSIZE) % rbuf->size;
+       }
 
-        // no packets available
-        return -1;
+       // no packets available
+       return -1;
 }
 
 
index d18e9c4ba9ea31a476c18908738035d495c4d96b..fa476f662f82c453da2028ca8267fee6b6ae11f8 100644 (file)
 #include <linux/wait.h>
 
 struct dvb_ringbuffer {
-        u8               *data;
-        ssize_t           size;
-        ssize_t           pread;
-        ssize_t           pwrite;
+       u8               *data;
+       ssize_t           size;
+       ssize_t           pread;
+       ssize_t           pwrite;
 
-        wait_queue_head_t queue;
-        spinlock_t        lock;
+       wait_queue_head_t queue;
+       spinlock_t        lock;
 };
 
 #define DVB_RINGBUFFER_PKTHDRSIZE 3
@@ -106,7 +106,7 @@ extern void dvb_ringbuffer_flush_spinlock_wakeup(struct dvb_ringbuffer *rbuf);
 ** returns number of bytes transferred or -EFAULT
 */
 extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf,
-                                   size_t len, int usermem);
+                                  size_t len, int usermem);
 
 
 /* write routines & macros */
@@ -121,7 +121,7 @@ extern ssize_t dvb_ringbuffer_read(struct dvb_ringbuffer *rbuf, u8 *buf,
 ** returns number of bytes transferred or -EFAULT
 */
 extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
-                                    size_t len);
+                                   size_t len);
 
 
 /**
@@ -133,7 +133,7 @@ extern ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
  * returns Number of bytes written, or -EFAULT, -ENOMEM, -EVINAL.
  */
 extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf,
-                                        size_t len);
+                                       size_t len);
 
 /**
  * Read from a packet in the ringbuffer. Note: unlike dvb_ringbuffer_read(), this
@@ -149,7 +149,7 @@ extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf,
  * returns Number of bytes read, or -EFAULT.
  */
 extern ssize_t dvb_ringbuffer_pkt_read(struct dvb_ringbuffer *rbuf, size_t idx,
-                                       int offset, u8* buf, size_t len, int usermem);
+                                      int offset, u8* buf, size_t len, int usermem);
 
 /**
  * Dispose of a packet in the ring buffer.
index 477b4fa56430ab3c4305561277d489aafec1ef0e..a4aee8665854f49691e2f695b6803fa792a80b33 100644 (file)
@@ -47,7 +47,7 @@ static LIST_HEAD(dvb_adapter_list);
 static DECLARE_MUTEX(dvbdev_register_lock);
 
 static const char * const dnames[] = {
-        "video", "audio", "sec", "frontend", "demux", "dvr", "ca",
+       "video", "audio", "sec", "frontend", "demux", "dvr", "ca",
        "net", "osd"
 };
 
@@ -90,15 +90,15 @@ static int dvb_device_open(struct inode *inode, struct file *file)
 
                file->private_data = dvbdev;
                old_fops = file->f_op;
-                file->f_op = fops_get(dvbdev->fops);
-                if(file->f_op->open)
-                        err = file->f_op->open(inode,file);
-                if (err) {
-                        fops_put(file->f_op);
-                        file->f_op = fops_get(old_fops);
-                }
-                fops_put(old_fops);
-                return err;
+               file->f_op = fops_get(dvbdev->fops);
+               if(file->f_op->open)
+                       err = file->f_op->open(inode,file);
+               if (err) {
+                       fops_put(file->f_op);
+                       file->f_op = fops_get(old_fops);
+               }
+               fops_put(old_fops);
+               return err;
        }
        return -ENODEV;
 }
@@ -117,21 +117,21 @@ static struct cdev dvb_device_cdev = {
 
 int dvb_generic_open(struct inode *inode, struct file *file)
 {
-        struct dvb_device *dvbdev = file->private_data;
+       struct dvb_device *dvbdev = file->private_data;
 
-        if (!dvbdev)
-                return -ENODEV;
+       if (!dvbdev)
+               return -ENODEV;
 
        if (!dvbdev->users)
-                return -EBUSY;
+               return -EBUSY;
 
        if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
-                if (!dvbdev->readers)
-                       return -EBUSY;
+               if (!dvbdev->readers)
+                       return -EBUSY;
                dvbdev->readers--;
        } else {
-                if (!dvbdev->writers)
-                       return -EBUSY;
+               if (!dvbdev->writers)
+                       return -EBUSY;
                dvbdev->writers--;
        }
 
@@ -143,10 +143,10 @@ EXPORT_SYMBOL(dvb_generic_open);
 
 int dvb_generic_release(struct inode *inode, struct file *file)
 {
-        struct dvb_device *dvbdev = file->private_data;
+       struct dvb_device *dvbdev = file->private_data;
 
        if (!dvbdev)
-                return -ENODEV;
+               return -ENODEV;
 
        if ((file->f_flags & O_ACCMODE) == O_RDONLY) {
                dvbdev->readers++;
@@ -163,10 +163,10 @@ EXPORT_SYMBOL(dvb_generic_release);
 int dvb_generic_ioctl(struct inode *inode, struct file *file,
                      unsigned int cmd, unsigned long arg)
 {
-        struct dvb_device *dvbdev = file->private_data;
+       struct dvb_device *dvbdev = file->private_data;
 
-        if (!dvbdev)
-               return -ENODEV;
+       if (!dvbdev)
+               return -ENODEV;
 
        if (!dvbdev->kernel_ioctl)
                return -EINVAL;
@@ -334,63 +334,63 @@ EXPORT_SYMBOL(dvb_unregister_adapter);
    to the v4l "videodev.o" module, which is unnecessary for some
    cards (ie. the budget dvb-cards don't need the v4l module...) */
 int dvb_usercopy(struct inode *inode, struct file *file,
-                    unsigned int cmd, unsigned long arg,
+                    unsigned int cmd, unsigned long arg,
                     int (*func)(struct inode *inode, struct file *file,
                     unsigned int cmd, void *arg))
 {
-        char    sbuf[128];
-        void    *mbuf = NULL;
-        void    *parg = NULL;
-        int     err  = -EINVAL;
-
-        /*  Copy arguments into temp kernel buffer  */
-        switch (_IOC_DIR(cmd)) {
-        case _IOC_NONE:
+       char    sbuf[128];
+       void    *mbuf = NULL;
+       void    *parg = NULL;
+       int     err  = -EINVAL;
+
+       /*  Copy arguments into temp kernel buffer  */
+       switch (_IOC_DIR(cmd)) {
+       case _IOC_NONE:
                /*
                 * For this command, the pointer is actually an integer
                 * argument.
                 */
                parg = (void *) arg;
                break;
-        case _IOC_READ: /* some v4l ioctls are marked wrong ... */
-        case _IOC_WRITE:
-        case (_IOC_WRITE | _IOC_READ):
-                if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {
-                        parg = sbuf;
-                } else {
-                        /* too big to allocate from stack */
-                        mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL);
-                        if (NULL == mbuf)
-                                return -ENOMEM;
-                        parg = mbuf;
-                }
-
-                err = -EFAULT;
-                if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd)))
-                        goto out;
-                break;
-        }
-
-        /* call driver */
-        if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD)
-                err = -EINVAL;
-
-        if (err < 0)
-                goto out;
-
-        /*  Copy results into user buffer  */
-        switch (_IOC_DIR(cmd))
-        {
-        case _IOC_READ:
-        case (_IOC_WRITE | _IOC_READ):
-                if (copy_to_user((void __user *)arg, parg, _IOC_SIZE(cmd)))
-                        err = -EFAULT;
-                break;
-        }
+       case _IOC_READ: /* some v4l ioctls are marked wrong ... */
+       case _IOC_WRITE:
+       case (_IOC_WRITE | _IOC_READ):
+               if (_IOC_SIZE(cmd) <= sizeof(sbuf)) {
+                       parg = sbuf;
+               } else {
+                       /* too big to allocate from stack */
+                       mbuf = kmalloc(_IOC_SIZE(cmd),GFP_KERNEL);
+                       if (NULL == mbuf)
+                               return -ENOMEM;
+                       parg = mbuf;
+               }
+
+               err = -EFAULT;
+               if (copy_from_user(parg, (void __user *)arg, _IOC_SIZE(cmd)))
+                       goto out;
+               break;
+       }
+
+       /* call driver */
+       if ((err = func(inode, file, cmd, parg)) == -ENOIOCTLCMD)
+               err = -EINVAL;
+
+       if (err < 0)
+               goto out;
+
+       /*  Copy results into user buffer  */
+       switch (_IOC_DIR(cmd))
+       {
+       case _IOC_READ:
+       case (_IOC_WRITE | _IOC_READ):
+               if (copy_to_user((void __user *)arg, parg, _IOC_SIZE(cmd)))
+                       err = -EFAULT;
+               break;
+       }
 
 out:
-        kfree(mbuf);
-        return err;
+       kfree(mbuf);
+       return err;
 }
 
 static int __init init_dvbdev(void)
@@ -427,10 +427,10 @@ error:
 
 static void __exit exit_dvbdev(void)
 {
-        devfs_remove("dvb");
+       devfs_remove("dvb");
        class_destroy(dvb_class);
        cdev_del(&dvb_device_cdev);
-        unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
+       unregister_chrdev_region(MKDEV(DVB_MAJOR, 0), MAX_DVB_MINORS);
 }
 
 module_init(init_dvbdev);
index a251867f30f1cfde7cb3523a1eb2a2f9ba36fa7d..0cc6e4a0e27c7e37924c36be26403822536c6b36 100644 (file)
@@ -68,8 +68,8 @@ struct dvb_device {
        int writers;
        int users;
 
-        /* don't really need those !? -- FIXME: use video_usercopy  */
-        int (*kernel_ioctl)(struct inode *inode, struct file *file,
+       /* don't really need those !? -- FIXME: use video_usercopy  */
+       int (*kernel_ioctl)(struct inode *inode, struct file *file,
                            unsigned int cmd, void *arg);
 
        void *priv;
@@ -97,7 +97,7 @@ we simply define out own dvb_usercopy(), which will hopefully become
 generic_usercopy()  someday... */
 
 extern int dvb_usercopy(struct inode *inode, struct file *file,
-                           unsigned int cmd, unsigned long arg,
+                           unsigned int cmd, unsigned long arg,
                            int (*func)(struct inode *inode, struct file *file,
                            unsigned int cmd, void *arg));
 
index f20d8dbd0be825014ac50440e8058db7597990eb..104b5d016c7b17e3c76376164b8c2464c18e9299 100644 (file)
@@ -190,7 +190,7 @@ static int vp702x_fe_get_frontend(struct dvb_frontend* fe,
 }
 
 static int vp702x_fe_send_diseqc_msg (struct dvb_frontend* fe,
-                                   struct dvb_diseqc_master_cmd *m)
+                                   struct dvb_diseqc_master_cmd *m)
 {
        struct vp702x_fe_state *st = fe->demodulator_priv;
        u8 cmd[8],ibuf[10];
index 2746edfeccbaad800bcdec66a149d924503a4a47..83f1de1e7e571daaede818ace9b90c50fbab484a 100644 (file)
@@ -58,7 +58,7 @@ static int vp7045_fe_read_ber(struct dvb_frontend* fe, u32 *ber)
        struct vp7045_fe_state *state = fe->demodulator_priv;
        *ber = (vp7045_read_reg(state->d, 0x0D) << 16) |
               (vp7045_read_reg(state->d, 0x0E) << 8) |
-               vp7045_read_reg(state->d, 0x0F);
+               vp7045_read_reg(state->d, 0x0F);
        return 0;
 }
 
index 72a2b5455b0bfd46873e84eb4ec942547f4f28fa..8e0f4b3a141758757035d3ac8161a8cf5a4e111c 100644 (file)
@@ -361,9 +361,9 @@ static int at76c651_read_ucblocks(struct dvb_frontend* fe, u32* ucblocks)
 
 static int at76c651_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings *fesettings)
 {
-        fesettings->min_delay_ms = 50;
-        fesettings->step_size = 0;
-        fesettings->max_drift = 0;
+       fesettings->min_delay_ms = 50;
+       fesettings->step_size = 0;
+       fesettings->max_drift = 0;
        return 0;
 }
 
index f6d4ee78bdd43d84b63402dba4a42b13e0713c13..8ceb9a33c7af35bb2fdd70cb9aa513f2947dd71d 100644 (file)
@@ -69,7 +69,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info,2=i2c (|-able)).");
 #define dbufout(b,l,m) {\
            int i; \
            for (i = 0; i < l; i++) \
-               m("%02x ",b[i]); \
+               m("%02x ",b[i]); \
 }
 #define deb_info(args...) dprintk(0x01,args)
 #define deb_i2c(args...)  dprintk(0x02,args)
@@ -827,7 +827,7 @@ static struct dvb_frontend_ops bcm3510_ops = {
                .type = FE_ATSC,
                .frequency_min =  54000000,
                .frequency_max = 803000000,
-                /* stepsize is just a guess */
+               /* stepsize is just a guess */
                .frequency_stepsize = 0,
                .caps =
                        FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
index 0c2ed44386189224518863fb8a28a3e0de5ba8de..755f774f6b7d4262077def4b7a22b4f5b09efec1 100644 (file)
@@ -355,10 +355,10 @@ static int cx22700_get_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
 
 static int cx22700_get_tune_settings(struct dvb_frontend* fe, struct dvb_frontend_tune_settings* fesettings)
 {
-        fesettings->min_delay_ms = 150;
-        fesettings->step_size = 166667;
-        fesettings->max_drift = 166667*2;
-        return 0;
+       fesettings->min_delay_ms = 150;
+       fesettings->step_size = 166667;
+       fesettings->max_drift = 166667*2;
+       return 0;
 }
 
 static void cx22700_release(struct dvb_frontend* fe)
@@ -407,7 +407,7 @@ static struct dvb_frontend_ops cx22700_ops = {
                .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
                      FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
                      FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 |
-                     FE_CAN_RECOVER
+                     FE_CAN_RECOVER
        },
 
        .release = cx22700_release,
index d9a8ede14b45151a019ac43ba51a4465d704d725..5de0e6d350b1ae7223bee890f9710efda14f87d3 100644 (file)
@@ -2,7 +2,7 @@
     Conexant 22702 DVB OFDM demodulator driver
 
     based on:
-        Alps TDMB7 DVB OFDM demodulator driver
+       Alps TDMB7 DVB OFDM demodulator driver
 
     Copyright (C) 2001-2002 Convergence Integrated Media GmbH
          Holger Waechtler <holger@convergence.de>
index 1f250885d2ce40da97fdcb40630d2b7e0f427b23..5633976a58f19b9e90cf5b566510c4c481df6ead 100644 (file)
@@ -2,7 +2,7 @@
     Conexant 22702 DVB OFDM demodulator driver
 
     based on:
-        Alps TDMB7 DVB OFDM demodulator driver
+       Alps TDMB7 DVB OFDM demodulator driver
 
     Copyright (C) 2001-2002 Convergence Integrated Media GmbH
          Holger Waechtler <holger@convergence.de>
index 654d7dc879d9fbb7e7d7fd9acdf43620215270e4..0c4db80ec332b7611e210308204e8a808b64e686 100644 (file)
@@ -55,81 +55,81 @@ static int debug;
        } while (0)
 
 static struct {u8 reg; u8 data;} cx24110_regdata[]=
-                      /* Comments beginning with @ denote this value should
-                         be the default */
-        {{0x09,0x01}, /* SoftResetAll */
-         {0x09,0x00}, /* release reset */
-         {0x01,0xe8}, /* MSB of code rate 27.5MS/s */
-         {0x02,0x17}, /* middle byte " */
-         {0x03,0x29}, /* LSB         " */
-         {0x05,0x03}, /* @ DVB mode, standard code rate 3/4 */
-         {0x06,0xa5}, /* @ PLL 60MHz */
-         {0x07,0x01}, /* @ Fclk, i.e. sampling clock, 60MHz */
-         {0x0a,0x00}, /* @ partial chip disables, do not set */
-         {0x0b,0x01}, /* set output clock in gapped mode, start signal low
-                         active for first byte */
-         {0x0c,0x11}, /* no parity bytes, large hold time, serial data out */
-         {0x0d,0x6f}, /* @ RS Sync/Unsync thresholds */
-         {0x10,0x40}, /* chip doc is misleading here: write bit 6 as 1
-                         to avoid starting the BER counter. Reset the
-                         CRC test bit. Finite counting selected */
-         {0x15,0xff}, /* @ size of the limited time window for RS BER
-                         estimation. It is <value>*256 RS blocks, this
-                         gives approx. 2.6 sec at 27.5MS/s, rate 3/4 */
-         {0x16,0x00}, /* @ enable all RS output ports */
-         {0x17,0x04}, /* @ time window allowed for the RS to sync */
-         {0x18,0xae}, /* @ allow all standard DVB code rates to be scanned
-                         for automatically */
-                      /* leave the current code rate and normalization
-                         registers as they are after reset... */
-         {0x21,0x10}, /* @ during AutoAcq, search each viterbi setting
-                         only once */
-         {0x23,0x18}, /* @ size of the limited time window for Viterbi BER
-                         estimation. It is <value>*65536 channel bits, i.e.
-                         approx. 38ms at 27.5MS/s, rate 3/4 */
-         {0x24,0x24}, /* do not trigger Viterbi CRC test. Finite count window */
-                      /* leave front-end AGC parameters at default values */
-                      /* leave decimation AGC parameters at default values */
-         {0x35,0x40}, /* disable all interrupts. They are not connected anyway */
-         {0x36,0xff}, /* clear all interrupt pending flags */
-         {0x37,0x00}, /* @ fully enable AutoAcqq state machine */
-         {0x38,0x07}, /* @ enable fade recovery, but not autostart AutoAcq */
-                      /* leave the equalizer parameters on their default values */
-                      /* leave the final AGC parameters on their default values */
-         {0x41,0x00}, /* @ MSB of front-end derotator frequency */
-         {0x42,0x00}, /* @ middle bytes " */
-         {0x43,0x00}, /* @ LSB          " */
-                      /* leave the carrier tracking loop parameters on default */
-                      /* leave the bit timing loop parameters at gefault */
-         {0x56,0x4d}, /* set the filtune voltage to 2.7V, as recommended by */
-                      /* the cx24108 data sheet for symbol rates above 15MS/s */
-         {0x57,0x00}, /* @ Filter sigma delta enabled, positive */
-         {0x61,0x95}, /* GPIO pins 1-4 have special function */
-         {0x62,0x05}, /* GPIO pin 5 has special function, pin 6 is GPIO */
-         {0x63,0x00}, /* All GPIO pins use CMOS output characteristics */
-         {0x64,0x20}, /* GPIO 6 is input, all others are outputs */
-         {0x6d,0x30}, /* tuner auto mode clock freq 62kHz */
-         {0x70,0x15}, /* use auto mode, tuner word is 21 bits long */
-         {0x73,0x00}, /* @ disable several demod bypasses */
-         {0x74,0x00}, /* @  " */
-         {0x75,0x00}  /* @  " */
-                      /* the remaining registers are for SEC */
+                     /* Comments beginning with @ denote this value should
+                        be the default */
+       {{0x09,0x01}, /* SoftResetAll */
+        {0x09,0x00}, /* release reset */
+        {0x01,0xe8}, /* MSB of code rate 27.5MS/s */
+        {0x02,0x17}, /* middle byte " */
+        {0x03,0x29}, /* LSB         " */
+        {0x05,0x03}, /* @ DVB mode, standard code rate 3/4 */
+        {0x06,0xa5}, /* @ PLL 60MHz */
+        {0x07,0x01}, /* @ Fclk, i.e. sampling clock, 60MHz */
+        {0x0a,0x00}, /* @ partial chip disables, do not set */
+        {0x0b,0x01}, /* set output clock in gapped mode, start signal low
+                        active for first byte */
+        {0x0c,0x11}, /* no parity bytes, large hold time, serial data out */
+        {0x0d,0x6f}, /* @ RS Sync/Unsync thresholds */
+        {0x10,0x40}, /* chip doc is misleading here: write bit 6 as 1
+                        to avoid starting the BER counter. Reset the
+                        CRC test bit. Finite counting selected */
+        {0x15,0xff}, /* @ size of the limited time window for RS BER
+                        estimation. It is <value>*256 RS blocks, this
+                        gives approx. 2.6 sec at 27.5MS/s, rate 3/4 */
+        {0x16,0x00}, /* @ enable all RS output ports */
+        {0x17,0x04}, /* @ time window allowed for the RS to sync */
+        {0x18,0xae}, /* @ allow all standard DVB code rates to be scanned
+                        for automatically */
+                     /* leave the current code rate and normalization
+                        registers as they are after reset... */
+        {0x21,0x10}, /* @ during AutoAcq, search each viterbi setting
+                        only once */
+        {0x23,0x18}, /* @ size of the limited time window for Viterbi BER
+                        estimation. It is <value>*65536 channel bits, i.e.
+                        approx. 38ms at 27.5MS/s, rate 3/4 */
+        {0x24,0x24}, /* do not trigger Viterbi CRC test. Finite count window */
+                     /* leave front-end AGC parameters at default values */
+                     /* leave decimation AGC parameters at default values */
+        {0x35,0x40}, /* disable all interrupts. They are not connected anyway */
+        {0x36,0xff}, /* clear all interrupt pending flags */
+        {0x37,0x00}, /* @ fully enable AutoAcqq state machine */
+        {0x38,0x07}, /* @ enable fade recovery, but not autostart AutoAcq */
+                     /* leave the equalizer parameters on their default values */
+                     /* leave the final AGC parameters on their default values */
+        {0x41,0x00}, /* @ MSB of front-end derotator frequency */
+        {0x42,0x00}, /* @ middle bytes " */
+        {0x43,0x00}, /* @ LSB          " */
+                     /* leave the carrier tracking loop parameters on default */
+                     /* leave the bit timing loop parameters at gefault */
+        {0x56,0x4d}, /* set the filtune voltage to 2.7V, as recommended by */
+                     /* the cx24108 data sheet for symbol rates above 15MS/s */
+        {0x57,0x00}, /* @ Filter sigma delta enabled, positive */
+        {0x61,0x95}, /* GPIO pins 1-4 have special function */
+        {0x62,0x05}, /* GPIO pin 5 has special function, pin 6 is GPIO */
+        {0x63,0x00}, /* All GPIO pins use CMOS output characteristics */
+        {0x64,0x20}, /* GPIO 6 is input, all others are outputs */
+        {0x6d,0x30}, /* tuner auto mode clock freq 62kHz */
+        {0x70,0x15}, /* use auto mode, tuner word is 21 bits long */
+        {0x73,0x00}, /* @ disable several demod bypasses */
+        {0x74,0x00}, /* @  " */
+        {0x75,0x00}  /* @  " */
+                     /* the remaining registers are for SEC */
        };
 
 
 static int cx24110_writereg (struct cx24110_state* state, int reg, int data)
 {
-        u8 buf [] = { reg, data };
+       u8 buf [] = { reg, data };
        struct i2c_msg msg = { .addr = state->config->demod_address, .flags = 0, .buf = buf, .len = 2 };
        int err;
 
-        if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
+       if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
                dprintk ("%s: writereg error (err == %i, reg == 0x%02x,"
                         " data == 0x%02x)\n", __FUNCTION__, err, reg, data);
                return -EREMOTEIO;
        }
 
-        return 0;
+       return 0;
 }
 
 static int cx24110_readreg (struct cx24110_state* state, u8 reg)
@@ -153,27 +153,27 @@ static int cx24110_set_inversion (struct cx24110_state* state, fe_spectral_inver
 
        switch (inversion) {
        case INVERSION_OFF:
-                cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);
-                /* AcqSpectrInvDis on. No idea why someone should want this */
-                cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)&0xf7);
-                /* Initial value 0 at start of acq */
-                cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)&0xef);
-                /* current value 0 */
-                /* The cx24110 manual tells us this reg is read-only.
-                   But what the heck... set it ayways */
-                break;
+               cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);
+               /* AcqSpectrInvDis on. No idea why someone should want this */
+               cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)&0xf7);
+               /* Initial value 0 at start of acq */
+               cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)&0xef);
+               /* current value 0 */
+               /* The cx24110 manual tells us this reg is read-only.
+                  But what the heck... set it ayways */
+               break;
        case INVERSION_ON:
-                cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);
-                /* AcqSpectrInvDis on. No idea why someone should want this */
-                cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)|0x08);
-                /* Initial value 1 at start of acq */
-                cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)|0x10);
-                /* current value 1 */
-                break;
+               cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x1);
+               /* AcqSpectrInvDis on. No idea why someone should want this */
+               cx24110_writereg(state,0x5,cx24110_readreg(state,0x5)|0x08);
+               /* Initial value 1 at start of acq */
+               cx24110_writereg(state,0x22,cx24110_readreg(state,0x22)|0x10);
+               /* current value 1 */
+               break;
        case INVERSION_AUTO:
-                cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xfe);
-                /* AcqSpectrInvDis off. Leave initial & current states as is */
-                break;
+               cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xfe);
+               /* AcqSpectrInvDis off. Leave initial & current states as is */
+               break;
        default:
                return -EINVAL;
        }
@@ -185,18 +185,18 @@ static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec)
 {
 /* fixme (low): error handling */
 
-        static const int rate[]={-1,1,2,3,5,7,-1};
-        static const int g1[]={-1,0x01,0x02,0x05,0x15,0x45,-1};
-        static const int g2[]={-1,0x01,0x03,0x06,0x1a,0x7a,-1};
+       static const int rate[]={-1,1,2,3,5,7,-1};
+       static const int g1[]={-1,0x01,0x02,0x05,0x15,0x45,-1};
+       static const int g2[]={-1,0x01,0x03,0x06,0x1a,0x7a,-1};
 
-        /* Well, the AutoAcq engine of the cx24106 and 24110 automatically
-           searches all enabled viterbi rates, and can handle non-standard
-           rates as well. */
+       /* Well, the AutoAcq engine of the cx24106 and 24110 automatically
+          searches all enabled viterbi rates, and can handle non-standard
+          rates as well. */
 
-        if (fec>FEC_AUTO)
-                fec=FEC_AUTO;
+       if (fec>FEC_AUTO)
+               fec=FEC_AUTO;
 
-        if (fec==FEC_AUTO) { /* (re-)establish AutoAcq behaviour */
+       if (fec==FEC_AUTO) { /* (re-)establish AutoAcq behaviour */
                cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)&0xdf);
                /* clear AcqVitDis bit */
                cx24110_writereg(state,0x18,0xae);
@@ -208,7 +208,7 @@ static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec)
                cx24110_writereg(state,0x1a,0x05); cx24110_writereg(state,0x1b,0x06);
                /* set the puncture registers for code rate 3/4 */
                return 0;
-        } else {
+       } else {
                cx24110_writereg(state,0x37,cx24110_readreg(state,0x37)|0x20);
                /* set AcqVitDis bit */
                if(rate[fec]>0) {
@@ -219,10 +219,10 @@ static int cx24110_set_fec (struct cx24110_state* state, fe_code_rate_t fec)
                        cx24110_writereg(state,0x1a,g1[fec]);
                        cx24110_writereg(state,0x1b,g2[fec]);
                        /* not sure if this is the right way: I always used AutoAcq mode */
-           } else
+          } else
                   return -EOPNOTSUPP;
 /* fixme (low): which is the correct return code? */
-        };
+       };
        return 0;
 }
 
@@ -245,72 +245,72 @@ static fe_code_rate_t cx24110_get_fec (struct cx24110_state* state)
 static int cx24110_set_symbolrate (struct cx24110_state* state, u32 srate)
 {
 /* fixme (low): add error handling */
-        u32 ratio;
-        u32 tmp, fclk, BDRI;
+       u32 ratio;
+       u32 tmp, fclk, BDRI;
 
-        static const u32 bands[]={5000000UL,15000000UL,90999000UL/2};
-        int i;
+       static const u32 bands[]={5000000UL,15000000UL,90999000UL/2};
+       int i;
 
 dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate);
-        if (srate>90999000UL/2)
-                srate=90999000UL/2;
-        if (srate<500000)
-                srate=500000;
+       if (srate>90999000UL/2)
+               srate=90999000UL/2;
+       if (srate<500000)
+               srate=500000;
 
-        for(i=0;(i<sizeof(bands)/sizeof(bands[0]))&&(srate>bands[i]);i++)
+       for(i=0;(i<sizeof(bands)/sizeof(bands[0]))&&(srate>bands[i]);i++)
                ;
-        /* first, check which sample rate is appropriate: 45, 60 80 or 90 MHz,
-           and set the PLL accordingly (R07[1:0] Fclk, R06[7:4] PLLmult,
-           R06[3:0] PLLphaseDetGain */
-        tmp=cx24110_readreg(state,0x07)&0xfc;
-        if(srate<90999000UL/4) { /* sample rate 45MHz*/
+       /* first, check which sample rate is appropriate: 45, 60 80 or 90 MHz,
+          and set the PLL accordingly (R07[1:0] Fclk, R06[7:4] PLLmult,
+          R06[3:0] PLLphaseDetGain */
+       tmp=cx24110_readreg(state,0x07)&0xfc;
+       if(srate<90999000UL/4) { /* sample rate 45MHz*/
                cx24110_writereg(state,0x07,tmp);
                cx24110_writereg(state,0x06,0x78);
                fclk=90999000UL/2;
-        } else if(srate<60666000UL/2) { /* sample rate 60MHz */
+       } else if(srate<60666000UL/2) { /* sample rate 60MHz */
                cx24110_writereg(state,0x07,tmp|0x1);
                cx24110_writereg(state,0x06,0xa5);
                fclk=60666000UL;
-        } else if(srate<80888000UL/2) { /* sample rate 80MHz */
+       } else if(srate<80888000UL/2) { /* sample rate 80MHz */
                cx24110_writereg(state,0x07,tmp|0x2);
                cx24110_writereg(state,0x06,0x87);
                fclk=80888000UL;
-        } else { /* sample rate 90MHz */
+       } else { /* sample rate 90MHz */
                cx24110_writereg(state,0x07,tmp|0x3);
                cx24110_writereg(state,0x06,0x78);
                fclk=90999000UL;
-        };
-        dprintk("cx24110 debug: fclk %d Hz\n",fclk);
-        /* we need to divide two integers with approx. 27 bits in 32 bit
-           arithmetic giving a 25 bit result */
-        /* the maximum dividend is 90999000/2, 0x02b6446c, this number is
-           also the most complex divisor. Hence, the dividend has,
-           assuming 32bit unsigned arithmetic, 6 clear bits on top, the
-           divisor 2 unused bits at the bottom. Also, the quotient is
-           always less than 1/2. Borrowed from VES1893.c, of course */
+       };
+       dprintk("cx24110 debug: fclk %d Hz\n",fclk);
+       /* we need to divide two integers with approx. 27 bits in 32 bit
+          arithmetic giving a 25 bit result */
+       /* the maximum dividend is 90999000/2, 0x02b6446c, this number is
+          also the most complex divisor. Hence, the dividend has,
+          assuming 32bit unsigned arithmetic, 6 clear bits on top, the
+          divisor 2 unused bits at the bottom. Also, the quotient is
+          always less than 1/2. Borrowed from VES1893.c, of course */
 
-        tmp=srate<<6;
-        BDRI=fclk>>2;
-        ratio=(tmp/BDRI);
+       tmp=srate<<6;
+       BDRI=fclk>>2;
+       ratio=(tmp/BDRI);
 
-        tmp=(tmp%BDRI)<<8;
-        ratio=(ratio<<8)+(tmp/BDRI);
+       tmp=(tmp%BDRI)<<8;
+       ratio=(ratio<<8)+(tmp/BDRI);
 
-        tmp=(tmp%BDRI)<<8;
-        ratio=(ratio<<8)+(tmp/BDRI);
+       tmp=(tmp%BDRI)<<8;
+       ratio=(ratio<<8)+(tmp/BDRI);
 
-        tmp=(tmp%BDRI)<<1;
-        ratio=(ratio<<1)+(tmp/BDRI);
+       tmp=(tmp%BDRI)<<1;
+       ratio=(ratio<<1)+(tmp/BDRI);
 
-        dprintk("srate= %d (range %d, up to %d)\n", srate,i,bands[i]);
-        dprintk("fclk = %d\n", fclk);
-        dprintk("ratio= %08x\n", ratio);
+       dprintk("srate= %d (range %d, up to %d)\n", srate,i,bands[i]);
+       dprintk("fclk = %d\n", fclk);
+       dprintk("ratio= %08x\n", ratio);
 
-        cx24110_writereg(state, 0x1, (ratio>>16)&0xff);
-        cx24110_writereg(state, 0x2, (ratio>>8)&0xff);
-        cx24110_writereg(state, 0x3, (ratio)&0xff);
+       cx24110_writereg(state, 0x1, (ratio>>16)&0xff);
+       cx24110_writereg(state, 0x2, (ratio>>8)&0xff);
+       cx24110_writereg(state, 0x3, (ratio)&0xff);
 
-        return 0;
+       return 0;
 
 }
 
@@ -324,48 +324,48 @@ int cx24110_pll_write (struct dvb_frontend* fe, u32 data)
 
        dprintk("cx24110 debug: cx24108_write(%8.8x)\n",data);
 
-        cx24110_writereg(state,0x6d,0x30); /* auto mode at 62kHz */
-        cx24110_writereg(state,0x70,0x15); /* auto mode 21 bits */
+       cx24110_writereg(state,0x6d,0x30); /* auto mode at 62kHz */
+       cx24110_writereg(state,0x70,0x15); /* auto mode 21 bits */
 
-        /* if the auto tuner writer is still busy, clear it out */
-        while (cx24110_readreg(state,0x6d)&0x80)
+       /* if the auto tuner writer is still busy, clear it out */
+       while (cx24110_readreg(state,0x6d)&0x80)
                cx24110_writereg(state,0x72,0);
 
-        /* write the topmost 8 bits */
-        cx24110_writereg(state,0x72,(data>>24)&0xff);
+       /* write the topmost 8 bits */
+       cx24110_writereg(state,0x72,(data>>24)&0xff);
 
-        /* wait for the send to be completed */
-        while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
+       /* wait for the send to be completed */
+       while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
                ;
 
-        /* send another 8 bytes */
-        cx24110_writereg(state,0x72,(data>>16)&0xff);
-        while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
+       /* send another 8 bytes */
+       cx24110_writereg(state,0x72,(data>>16)&0xff);
+       while ((cx24110_readreg(state,0x6d)&0xc0)==0x80)
                ;
 
-        /* and the topmost 5 bits of this byte */
-        cx24110